Permalink
Browse files

Support Add multiple account

  • Loading branch information...
giaythuytinh176 committed May 12, 2015
1 parent bd76ac9 commit fdddf2e4607dc9f553c9436f1f82beba3d86e646
Showing with 20 additions and 10 deletions.
  1. +2 −2 class.php
  2. +1 −1 index.php
  3. +13 −3 proccess.php
  4. +1 −1 skin/bootstrap/admin.php
  5. +1 −1 skin/bootstrap/index.php
  6. +1 −1 skin/default/admin.php
  7. +1 −1 skin/default/index.php
@@ -1066,7 +1066,7 @@ function mega($url)
$info = $megafile->file_info();
$link = $info['binary_url'];
$link = 'https://mega.co.nz/';
$filesize = $info['size'];
$filename = isset($this->reserved['filename']) ? $this->reserved['filename'] : Tools_get::convert_name($info['attr']['n']);
@@ -2102,7 +2102,7 @@ private function mega_get_file_info($hash) {
$iv = array_merge(array_slice($key, 4, 2), array(0, 0));
$meta_mac = array_slice($key, 6, 2);
$info = $this->mega_api_req(array('a' => 'g', 'g' => 1, 'p' => $id));
if (!$info['g']) die('No such file on mega. Maybe it was deleted.');
if (!$info['g']) die('<b><font color=red>No such file on mega. Maybe it was deleted.</font></b>');
return array('id' => $id, 'key' => $key, 'k' => $k, 'iv' => $iv, 'meta_mac' => $meta_mac, 'binary_url' => $info['g'], 'attr' => $this->mega_dec_attr($this->base64urldecode($info['at']), $k), 'size' => $info['s']);
}
@@ -24,7 +24,7 @@
require_once('class.php');
$obj = new stream_get();
$obj->using = $using;
$obj->current_version = 91;
$obj->current_version = 93;
$obj->msg = false;
if (!empty($_COOKIE['msg'])) $obj->msg = htmlspecialchars($_COOKIE['msg']);
setcookie('msg', '');
@@ -50,9 +50,19 @@
$obj->acc[$_POST['type']]['proxy'] = '';
$obj->acc[$_POST['type']]['direct'] = false;
}
$_POST['account'] = str_replace(' ', '', $_POST['account']);
$obj->save_account($_POST['type'], $_POST['account']);
$msg = $_POST['type'] . 'Account Added!';
$account = explode("\n", $_POST['account']);
$maxacc = count($account);
if (($maxacc == 2 && $account[1] == '') || $maxacc == 1) {
$_POST['account'] = $account[0];
$obj->save_account($_POST['type'], $_POST['account']);
}
else {
for ($i=0; $i < $maxacc; $i++) {
$_POST['account'] = $account[$i];
$obj->save_account($_POST['type'], $_POST['account']);
}
}
$msg = count($account). ' Account '.$_POST['type'].' Added!';
} elseif (isset($_GET['del']) && !empty($_GET['host'])) {
$acc = $obj->acc[$_GET['host']]['accounts'];
unset($obj->acc[$_GET['host']]['accounts']);
@@ -108,7 +108,7 @@
</select>
</td>
<td>
&nbsp; &nbsp; &nbsp; <input type="text" name="account" id="accounts" value="" size="50"><br />
&nbsp; &nbsp; &nbsp; <textarea type="text" name="account" id="accounts" value="" rows="5" cols="50"></textarea><br />
</td>
<td>
&nbsp; &nbsp; &nbsp; <button class="btn btn-primary" type="submit">Submit</button>
@@ -238,7 +238,7 @@

<script type="text/javascript" language="javascript" src="ajax.js?ver=1.0"></script>
<!-- Copyright please don't remove-->
<STRONG><SPAN class='powered' style="font-size: 12px;">Code LeechViet. Developed by ..:: [H] ::..<br/>Powered by <a href='http://www.rapidleech.com/index.php/topic/14663-dev-vinaget-v270-beta/'><?php printf($obj->lang['version']); ?> Revision <?php printf($obj->current_version); ?></a> by [FZ]. Skin by Rhuan Gonzaga</SPAN><br/>
<STRONG><SPAN class='powered' style="font-size: 12px;">Code LeechViet. Developed by ..:: [H] ::..<br/>Powered by <a href='http://rapidleech.com/forum/viewforum.php?f=23'><?php printf($obj->lang['version']); ?> Revision <?php printf($obj->current_version); ?></a> by [FZ]. Skin by Rhuan Gonzaga</SPAN><br/>
<SPAN class='copyright' style="font-size: 12px;">Copyright 2009-<?php echo date('Y');?> by <a href='http://vinaget.us/'>http://vinaget.us</a>. All rights reserved. </SPAN><br /><br />
<!-- Copyright please don't remove-->
</div>
@@ -108,7 +108,7 @@
</select>
</td>
<td>
&nbsp; &nbsp; &nbsp; <input type="text" name="account" id="accounts" value="" size="50"><br />
&nbsp; &nbsp; &nbsp; <textarea type="text" name="account" id="accounts" value="" rows="5" cols="50"></textarea><br />
</td>
<td>
&nbsp; &nbsp; &nbsp; <input type=submit value="Submit">
@@ -195,7 +195,7 @@
<hr />
<script type="text/javascript" language="javascript" src="ajax.js?ver=1.0"></script>
<!-- Copyright please don't remove-->
<STRONG><SPAN class='powered'>Code LeechViet. Developed by ..:: [H] ::..<br/>Powered by <a href='http://www.rapidleech.com/index.php/topic/14663-dev-vinaget-v270-beta/'><?php printf($obj->lang['version']); ?> Revision <?php printf($obj->current_version); ?></a> by [FZ]</SPAN><br/>
<STRONG><SPAN class='powered'>Code LeechViet. Developed by ..:: [H] ::..<br/>Powered by <a href='http://rapidleech.com/forum/viewforum.php?f=23'><?php printf($obj->lang['version']); ?> Revision <?php printf($obj->current_version); ?></a> by [FZ]</SPAN><br/>
<SPAN class='copyright'>Copyright 2009-<?php echo date('Y');?> by <a href='http://vinaget.us/'>http://vinaget.us</a>. All rights reserved. </SPAN><br />
<!-- Copyright please don't remove-->
</div>

1 comment on commit fdddf2e

@0utc0ntr0l

This comment has been minimized.

Copy link

0utc0ntr0l commented on fdddf2e May 30, 2015

mega.co.nz plugin not working

Please sign in to comment.