echo $i; ?> " style="float:left; border:1px solid;"><?php echo lang(30); ?> </iframe> <?php } ?> <script type="text/javascript">startauto();</script><br /> <a href="files/myuploads.txt">myuploads.txt</a> <?php } else { $options['show_all'] = true; $_COOKIE["showAll"] = 1; _create_list(); require_once "classes/options.php"; unset($Path); ?> <form name="flist" method="post" action="auul.php?action=upload"> <p><b><?php echo lang(47); ?> </b></p> <div style="overflow:auto; height:200px; width: 300px;"> <table> <?php $d = opendir(HOST_DIR . "upload/"); while (false !== ($modules = readdir($d))) { if ($modules != "." && $modules != "..") { if (is_file(HOST_DIR . "upload/" . $modules)) {
foreach ($premium_acc as $dhost => $val) { if ($val) { $ada_acc = true; break; } } } // check if max download reach $trheute = $visitors->heute + 1; if ($trheute > $options["maximum_free_downloads"]) { $msgNya = $L->sprintf($L->say['alert_premix_free'], $options["maximum_free_downloads"], $options["delay_per_ip"]); } } // Init call create_list if ($czFlst == 0 && (!isset($_COOKIE["showAll"]) || isset($_COOKIE["showAll"]) && $_COOKIE["showAll"] != 1)) { _create_list(false, true); // medic mode, to force list in downloaded files updateListInFile(FILES_LST); // relist file } // Check traffic $is_exceed = $is_expired = false; if ($options["limitbytraffic"]) { require_once CLASS_DIR . "limit_traffic.class.php"; $traffic = new traffics(); if ($traffic->is_error != 0) { html_error($traffic->ret_msg, 0); } $traffic->get(); if ($options["day_reset_trafic"] > 0) { $traffic->autoreset();
// time | newName | fileName $fileName = rawurldecode(base64_decode($partFN[2])); $smthExists = FALSE; foreach ($list as $time => $record) { if ($fileName == basename($record["name"])) { $fileName = $list[$partFN[0]]["name"]; $lineset = $record; break; } } $ck_showall = isset($_COOKIE["showAll"]) ? $_COOKIE["showAll"] : false; if ($ck_showall == 1) { // we are in showall mode // force and get list in showdownload mode unset($list); _create_list(false, false, 2); $lineset = isset($list[$partFN[0]]) ? $list[$partFN[0]] : ''; } if (file_exists($fileName)) { $oldName = $fileName; $newName = str_replace("~", "", iconv("UTF-8", "ISO-8859-1//TRANSLIT", rawurldecode(base64_decode($partFN[1])))); $newName = dirname($oldName) . PATH_SPLITTER . $newName; $filetype = strrchr($newName, "."); if (is_array($options['forbidden_filetypes']) && in_array(strtolower($filetype), $options['forbidden_filetypes'])) { // ERROR echo "((suc))0((/suc))<msg>" . $L->sprintf($L->say['forbidden_rename'], $filetype) . "</msg>"; } else { if (@rename($oldName, $newName)) { $smthExists = TRUE; foreach ($list as $key => $file) { if ($file["name"] == $oldName) {
$rotKey = stristr($dkey, "-"); $rotKey = (int) substr($rotKey, 1, strlen($rotKey)); $hashdel = explode(":", trim(base64_decode(rotN($_GET['d'], -$rotKey)))); $fileDate = (int) $hashdel[0]; $backupshow_all = $options['show_all']; $options['show_all'] = true; _create_list(true, false, 1); } if (!$list) { notexist(); } else { $fileName = $list[$fileDate]["name"]; // we load $list from show download mode unset($list); $options['show_all'] = $backupshow_all; _create_list(true, false, 2); } if (!file_exists($fileName) || strlen($fileName) == 0) { notexist(); } } if (!$wajax) { ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=<?php echo $charSet; ?> " /> <meta name="robots" content="noindex, nofollow" />
function unrar_go_go() { global $options, $list, $L; ?> <script type="text/javascript"> /* <![CDATA[ */ function rar_st(elementid, st){ document.getElementById(elementid).innerHTML = st; return true; } /* ]]> */ </script> <?php for ($i = 0; $i < count($_GET["files"]); $i++) { $file = $list[$_GET["files"][$i]]; if (count($_GET['filestounrar'][$i]) == 0) { continue; } foreach ($_GET['filestounrar'][$i] as $rar_item) { flush(); $rar = new rlRar($file["name"], $options['check_these_before_unzipping'] ? $options['forbidden_filetypes'] : array('.xxx')); if ($rar->rar_return === false) { ?> <script type="text/javascript">rar_st('<?php echo 'unrar' . $_GET["files"][$i] . '-' . str_replace('=', '-', $rar_item); ?> ', '<?php echo $L->say['rar_disappear']; ?> ');</script> <?php } else { $rar_result = $rar->extract(base64_decode($rar_item), $options['download_dir'], $_GET['passwords'][$i], 'unrar' . $_GET["files"][$i] . '-' . str_replace('=', '-', $rar_item), $i); echo $rar_result; if (strpos($rar_result, ", 'OK')") !== false) { _create_list(); $rar_tolist = realpath($options['download_dir']) . '/' . basename(base64_decode($rar_item)); $time = getNowzone(@filemtime($rar_tolist)); while (isset($list[$time])) { $time++; } $list[$time] = array("name" => $rar_tolist, "size" => bytesToKbOrMbOrGb(filesize($rar_tolist)), "date" => $time); if (!updateListInFile($list)) { ?> <script type="text/javascript">var tmp = document.getElementById('rar_finished'); tmp.innerHTML = "<?php echo $L->say['couldnt_upd_list']; ?> <br /><br />" + tmp.innerHTML</script>; <?php } } } } } ?> <script type="text/javascript">document.getElementById('unrar_finished').style.display = '';</script> <?php }
function rar_go_go() { global $options, $list, $L; ?> <script type="text/javascript"> /* <![CDATA[ */ function rar_st(elementid, st){ document.getElementById(elementid).innerHTML = st; return true; } /* ]]> */ </script> <?php flush(); require_once CLASS_DIR . "rar.php"; if ($options['disable_to']['act_del']) { $_GET['rar_opts']['delete'] = 0; } if ($options['disable_to']['act_archive_compression']) { $_GET['rar_opts']['comp_lvl'] = 0; } if ($_GET['rar_opts']['separated']) { $am = count($_GET['rar_opts']['filestorar']); } else { $am = 1; } for ($i = 0; $i < $am; $i++) { $name = $_GET['rar_opts']['separated'] ? basename($list[$_GET['rar_opts']['filestorar'][$i]]['name']) . '.rar' : $_GET['rar_opts']['rarfilename']; $rar = new rlRar($name, $options['check_these_before_unzipping'] ? $options['forbidden_filetypes'] : array('.xxx')); if ($rar->rar_return !== 'rar') { ?> <script type="text/javascript">rar_st('rar_status<?php echo $i; ?> ', '<?php echo $L->say['rar_disappear']; ?> ');</script> <?php } else { $rar_opts_tmp = $_GET['rar_opts']; if ($_GET['rar_opts']['separated']) { $rar_opts_tmp['filestorar'] = array($_GET['rar_opts']['filestorar'][$i]); } $rar_result = $rar->addtoarchive($rar_opts_tmp, $options['download_dir'], 'rar_status' . $i, $i); echo $rar_result; if (strpos($rar_result, ", 'Done')") !== false) { _create_list(); clearstatcache(); if ($_GET['rar_opts']['delete'] == true) { foreach ($_GET['rar_opts']['filestorar'] as $rar_tounlist) { $rar_tounlist = basename($list[$rar_tounlist]['name']); if (empty($rar_tounlist)) { continue; } $rar_tounlist = realpath($options['download_dir']) . '/' . $rar_tounlist; if (is_file($rar_tounlist)) { continue; } foreach ($list as $list_key => $list_item) { if ($list_item['name'] === $rar_tounlist) { unset($list[$list_key]); } } } } $rar_tolist = realpath($options['download_dir']) . '/' . basename($rar->filename); if ($_GET['rar_opts']['vols'] && !is_file($rar_tolist)) { if (substr(strtolower($rar_tolist), -4) == '.rar') { $rar_tolist = substr($rar_tolist, 0, -4); } $tmp = basename(strtolower($rar_tolist)) . '.part'; $rar_dir = opendir(realpath($options['download_dir']) . '/'); while (false !== ($rar_f_dd = readdir($rar_dir))) { $rar_f_dd_ = basename(strtolower($rar_f_dd)); if ($tmp == substr($rar_f_dd_, 0, strlen($tmp)) && is_numeric(substr($rar_f_dd_, strlen($tmp), -4))) { $rar_f_dd = realpath($options['download_dir']) . '/' . basename($rar_f_dd); $time = getNowzone(@filemtime($rar_f_dd)); while (isset($list[$time])) { $time++; } $list[$time] = array("name" => $rar_f_dd, "size" => bytesToKbOrMbOrGb(filesize($rar_f_dd)), "date" => $time); } } closedir($rar_dir); } elseif (is_file($rar_tolist)) { $time = getNowzone(@filemtime($rar_tolist)); while (isset($list[$time])) { $time++; } $list[$time] = array("name" => $rar_tolist, "size" => bytesToKbOrMbOrGb(filesize($rar_tolist)), "date" => $time); } if (!updateListInFile($list)) { ?> <script type="text/javascript">var tmp = document.getElementById('rar_finished'); tmp.innerHTML = "<?php echo $L->say['couldnt_upd_list']; ?> <br /><br />" + tmp.innerHTML</script>; <?php } } } } ?> <script type="text/javascript">document.getElementById('rar_finished').style.display = '';</script> <?php }
echo "<div style=\"padding-top:20px;padding-bottom:20px;\"><div class=\"warn_alert\">{$limitmsg}</div></div>"; } } ?> <noscript><p><b><?php echo $L->say['js_disable']; ?> </b></p></noscript> <?php $c = 0; $total_size = 0; $nn = "\n"; $kumulatifsz = true; // true mean do not count md5_file() _create_list(true); if (isset($list["files"]["totalsize"])) { $total_size = $list["files"]["totalsize"]; $kumulatifsz = false; } if ($list) { //$morethanone = (count($list)>1); if ($options["show_all"] === true) { unset($Path); } ?> <script type="text/javascript"> /* <![CDATA[ */ var dFile = new Object(); var text = "", thead, tfoot; <?php
function calcUsedSpace() { global $list; $total_size = 0; if (!$list) { _create_list(); } if (isset($list["files"]["totalsize"])) { $total_size = $list["files"]["totalsize"]; } else { foreach ($list as $key => $file) { if (@file_exists($file["name"])) { $total_size += filesize($file["name"]); } } } return $total_size; }