function average($collection) { $size = size($collection); if ($size === 0) { return 0; } else { return sum($collection) / $size; } }
function fileList() { global $DB; $key = $_REQUEST['key']; $ba = urlencode('查看列表'); $n = $DB->count("SELECT count(*) from udisk WHERE 1"); echo "<div class='title'>文件列表(共有{$n}个文件)</div>"; echo "<a href=\"admin.php?a=1&act={$ba}&key={$key}\">刷新列表</a><br/>"; global $pagesize; $numrows = $n; $pages = intval($numrows / $pagesize); if ($numrows % $pagesize) { $pages++; } if (isset($_GET['page'])) { $page = intval($_GET['page']); } else { $page = 1; } $offset = $pagesize * ($page - 1); $rs = $DB->query("select * from udisk where 1 order by datetime desc limit {$offset},{$pagesize}"); $i = 0; while ($myrow = $DB->fetch($rs)) { $i++; $pagesl = $i + ($page - 1) * $pagesize; $size = size($myrow['size']); $ext = '.' . $myrow['type']; if ($myrow['pwd'] != null) { $pwd_ext1 = '&' . $myrow['pwd']; $pwd_ext2 = '&pwd=' . $myrow['pwd']; } echo '<div class="content">' . $i . '.<a href="../down.php/' . $myrow['fileurl'] . $ext . $pwd_ext1 . '">' . $myrow['filename'] . '</a>(' . $size . ')-'; echo '<a href="admin.php?a=1&key=' . $key . '&act=read&name=' . $myrow['fileurl'] . $pwd_ext2 . '">查看</a>.<a href="admin.php?a=1&key=' . $key . '&act=del1&name=' . $myrow['fileurl'] . '">删除</a></div>'; } echo '<div class="pages">共有' . $pages . '页(' . $page . '/' . $pages . ')'; $first = 1; $prev = $page - 1; $next = $page + 1; $last = $pages; if ($page > 1) { echo ' <a href="admin.php?a=1&act=查看列表&key=' . $key . '&page=' . $first . '">首页</a>.'; echo '<a href="admin.php?a=1&act=查看列表&key=' . $key . '&page=' . $prev . '">上一页</a>'; } if ($page < $pages) { echo ' <a href="admin.php?a=1&act=查看列表&key=' . $key . '&page=' . $next . '">下一页</a>.'; echo '<a href="admin.php?a=1&act=查看列表&key=' . $key . '&page=' . $last . '">尾页</a>'; } echo '</div>'; foot(); }
function title($title) { print "<HTML>"; print "<link href='styles/style.css' rel='stylesheet' type='text/css'>"; print "<body>"; print "<h2 style='font-size:750%'>" . $title . "</h2>"; print "<br>"; print "Seeding: "; $size = size(); print $size; print "GB | "; print "<a href='index.php'>Home</a> | "; print '<a href="remove.php">Eligible</a> | <a href="main.php">Update</a> | <a href="showdeleted.php">Show Deleted</a> | <a href="add.php">Add</a> | <a href="prune.php">Prune</a><br>'; }
function fileList() { global $DB; $n = $DB->count("SELECT count(*) from udisk WHERE 1"); echo "<div class='title'>文件列表(共有{$n}个文件)</div>"; global $pagesize; $numrows = $n; $pages = intval($numrows / $pagesize); if ($numrows % $pagesize) { $pages++; } if (isset($_GET['page'])) { $page = intval($_GET['page']); } else { $page = 1; } $offset = $pagesize * ($page - 1); $rs = $DB->query("select * from udisk where hide=0 order by datetime desc limit {$offset},{$pagesize}"); $i = 0; while ($myrow = $DB->fetch($rs)) { $i++; $pagesl = $i + ($page - 1) * $pagesize; $size = size($myrow['size']); $ext = '.' . $myrow['type']; echo '<div class="content">' . $i . '.<a href="../down.php/' . $myrow['fileurl'] . $ext . '">' . $myrow['filename'] . '</a>(' . $size . ')-<a href="list.php?act=view&name=' . $myrow['fileurl'] . '">查看</a></div>'; } echo '<div class="pages">共有' . $pages . '页(' . $page . '/' . $pages . ')'; $first = 1; $prev = $page - 1; $next = $page + 1; $last = $pages; if ($page > 1) { echo ' <a href="list.php?page=' . $first . '">首页</a>.'; echo '<a href="list.php?page=' . $prev . '">上一页</a>'; } if ($page < $pages) { echo ' <a href="list.php?page=' . $next . '">下一页</a>.'; echo '<a href="list.php?page=' . $last . '">尾页</a>'; } echo '</div>'; foot(); }
function median($collection) { $size = size($collection); if ($size === 0) { $median = null; } else { $sorted = values(sort($collection)); if ($size % 2 === 0) { // For an even number of values, // the median is the average of the middle two values $start = $size / 2 - 1; $end = $start + 1; $median = average(array(at($sorted, $start), at($sorted, $end))); } else { // For an odd number of values, // the median is the middle value $index = floor($size / 2); $median = at($sorted, $index); } } return $median; }
function sql_files() { $files = dir_read('.', null, array('.sql')); $files2 = array(); foreach ($files as $file) { $files2[md5($file)] = $file . sprintf(' (%s)', size(filesize($file))); } return $files2; }
/** * Returns true if this set contains no elements. */ public function isEmpty() { return $this->set - size() == 0 ? true : false; }
while ($row_reference = mysqli_fetch_array($query_reference, MYSQLI_BOTH)) { echo $row_reference['clanak_text']; } ?> </div> <!-------------------------- DIV 4--------------------------------------------> <div id="download" class="tabcontent"> Ovdje možete preuzeti elektronske dokumente:<br><br> <?php $row_download = mysqli_fetch_array($query_download, MYSQLI_BOTH); $download_content = $row_download['clanak_text']; $download_document = explode(";", $download_content); for ($i = 0; $i < count($download_document); $i++) { $document_path_n_title = explode(",", $download_document[$i]); $pdf_full_path = filter_input(INPUT_SERVER, 'DOCUMENT_ROOT') . $document_path_n_title[0]; $pdf_size = size($pdf_full_path); echo '<ul> <li> <img alt="" class="pdfImg" src="/img/icons/pdf.jpg"> <a href="' . $document_path_n_title[0] . '" target="_blank" title="' . $document_path_n_title[1] . '">' . $document_path_n_title[1] . ' ' . $pdf_size . ' </a> </li> </ul>'; } ?> </div> <!-------------------------- DIV 5--------------------------------------------> <div id="kontakt" class="tabcontent"> <?php while ($row_kontakt = mysqli_fetch_array($query_kontakt, MYSQLI_BOTH)) { echo '<a id="' . $row_kontakt['clanak_naslov'] . '"></a>';
function insertNewAsset($config, $db, $user, $category, $asset) { /* see if there's an entry with the specified identifier already */ $r = $db->GetRecords("SELECT * FROM `{$category}` WHERE identifier='{$asset['Identifier']}' LIMIT 1"); if ($r === false) { return SLAM_makeErrorHTML('Database error: could not check for duplicate identifiers: ' . $db->ErrorState(), true); } if (count($r) > 0) { // pre-existing entry with that identifier!, get next highest asset number and regenerate identifier if (($results = $db->Query("SHOW TABLE STATUS WHERE `name`='{$category}'")) === false) { return SLAM_makeErrorHTML('Database error: error retrieving table status:' . $db->ErrorState(), true); } if (size($results) == 0) { return SLAM_makeErrorHTML('Database error: could not get table\'s next available identifier.', true); } else { $row = $results[0]; $asset['Serial'] = $row['Auto_increment']; $asset['Identifier'] = "{$config->values['lab_prefix']}{$config->categories[$category]['prefix']}_{$row['Auto_increment']}"; } } /* separate the permissions from the asset attributes to be saved */ $permissions = (array) $asset['permissions']; unset($asset['permissions']); /* insert the asset attributes into the database */ $q = SLAM_makeInsertionStatement($db, 'INSERT', $category, $asset); if ($db->Query($q) === false) { return SLAM_makeErrorHTML('Database error: could not save record: ' . $db->ErrorState(), true); } /* save the permissions as well */ $asset['permissions'] = $permissions; if (($ret = SLAM_saveAssetPerms($config, $db, $asset)) !== true) { return $ret; } return True; }
function fileList() { global $DB; $key = $_REQUEST['key']; $ba = urlencode('查看列表'); $n = $DB->count("SELECT count(*) from udisk WHERE 1"); echo "<p>以下是本站全部已上传文件列表 共有{$n}个文件!(<a href=\"admin.php?a=1&act={$ba}&key={$key}\">刷新列表</a>)</p>"; echo '<table class="table">'; echo '<tr><td>序号</td><td>操作</td><td>文件名</td><td>文件大小</td><td>上传日期时间</td><td>文件格式</td><td>上传者IP</td></tr>'; global $pagesize; $numrows = $n; $pages = intval($numrows / $pagesize); if ($numrows % $pagesize) { $pages++; } if (isset($_GET['page'])) { $page = intval($_GET['page']); } else { $page = 1; } $offset = $pagesize * ($page - 1); $rs = $DB->query("select * from udisk where 1 order by datetime desc limit {$offset},{$pagesize}"); $i = 0; while ($myrow = $DB->fetch($rs)) { $i++; $pagesl = $i + ($page - 1) * $pagesize; $size = size($myrow['size']); if ($myrow['pwd'] != null) { $pwd_ext1 = '&' . $myrow['pwd']; $pwd_ext2 = '&pwd=' . $myrow['pwd']; } $type = $myrow['type']; if ($type != NULL) { $type = '.' . $type; } else { $type = '未知'; } $ext = '.' . $myrow['type']; echo '<tr><td>' . $i . '</td><td><a href="down.php/' . $myrow['fileurl'] . $ext . $pwd_ext1 . '">下载</a> | <a href="admin.php?a=1&key=' . $key . '&act=read&name=' . $myrow['fileurl'] . $pwd_ext2 . '">查看</a> | <a href="admin.php?a=1&key=' . $key . '&act=del1&name=' . $myrow['fileurl'] . '">删除</a></td><td>' . $myrow['filename'] . '</td><td>' . $size . '</td><td>' . $myrow['datetime'] . '</td><td>' . $type . '</td><td><a href="http://www.ip138.com/ips138.asp?ip=' . $myrow['ip'] . '" target="_blank">' . $myrow['ip'] . '</a></td></tr>'; } echo '</table>'; echo "共有" . $pages . "页(" . $page . "/" . $pages . ")<br>"; for ($i = 1; $i < $page; $i++) { echo "<a href='admin.php?a=1&act=查看列表&key=" . $key . "&page=" . $i . "'>[" . $i . "]</a> "; } echo "[" . $page . "]"; for ($i = $page + 1; $i <= $pages; $i++) { echo "<a href='admin.php?a=1&act=查看列表&key=" . $key . "&page=" . $i . "'>[" . $i . "]</a> "; } echo '<br>'; $first = 1; $prev = $page - 1; $next = $page + 1; $last = $pages; if ($page > 1) { echo "<a href='admin.php?a=1&act=查看列表&key=" . $key . "&page=" . $first . "'>首页</a>."; echo "<a href='admin.php?a=1&act=查看列表&key=" . $key . "&page=" . $prev . "'>上一页</a>"; } if ($page < $pages) { echo "<a href='admin.php?a=1&act=查看列表&key=" . $key . "&page=" . $next . "'>下一页</a>."; echo "<a href='admin.php?a=1&act=查看列表&key=" . $key . "&page=" . $last . "'>尾页</a>"; } }
if ($config['percent_graph_type'] == 'used') { // swap $tmp = $pvalue; $pvalue = $pempty; $pempty = $tmp; } $w = $config['percent_graph_width'] + 2; if (empty($ci['istotal'])) { $graph = freeblock_to_graph($ci['free_blocks'], $ci['size']); $blocksgraph = "<div class=\"blocksgraph\" style=\"width: {$w}px\">{$graph}</div>"; } else { $blocksgraph = ''; } $ci_slots = size($ci['slots']); $ci_size = size($ci['size']); $ci_avail = size($ci['avail']); $ci = number_formats($ci, $numkeys); $hits_avg_h = number_format(array_avg($ci['hits_by_hour']), 2); $hits_avg_s = number_format(array_avg($ci['hits_by_second']), 2); $hits_graph_h = get_cache_hits_graph($ci, 'hits_by_hour'); if (!empty($ci['istotal'])) { $ci['status'] = '-'; $ci['can_readonly'] = '-'; } else { if ($ci['disabled']) { $ci['status'] = $l_disabled . sprintf("(%s)", age($ci['disabled'])); } else { if ($ci['type'] == XC_TYPE_PHP) { $ci['status'] = $ci['compiling'] ? $l_compiling . sprintf("(%s)", age($ci['compiling'])) : $l_normal; } else { $ci['status'] = '-';
}, 'email' => function ($value) { return filter_var($value, FILTER_VALIDATE_EMAIL) !== false; }, 'filename' => function ($value) { return v::match($value, '/^[a-z0-9@._-]+$/i') && v::min($value, 2); }, 'in' => function ($value, $in) { return in_array($value, $in, true); }, 'integer' => function ($value) { return filter_var($value, FILTER_VALIDATE_INT) !== false; }, 'ip' => function ($value) { return filter_var($value, FILTER_VALIDATE_IP) !== false; }, 'match' => function ($value, $preg) { return preg_match($preg, $value) > 0; }, 'max' => function ($value, $max) { return size($value) <= $max; }, 'min' => function ($value, $min) { return size($value) >= $min; }, 'notIn' => function ($value, $notIn) { return !v::in($value, $notIn); }, 'num' => function ($value) { return is_numeric($value); }, 'required' => function ($key, $array) { return !empty($array[$key]); }, 'same' => function ($value, $other) { return $value === $other; }, 'size' => function ($value, $size) { return size($value) == $size; }, 'url' => function ($value) { // In search for the perfect regular expression: https://mathiasbynens.be/demo/url-regex $regex = '_^(?:(?:https?|ftp)://)(?:\\S+(?::\\S*)?@)?(?:(?!10(?:\\.\\d{1,3}){3})(?!127(?:\\.\\d{1,3}){3})(?!169\\.254(?:\\.\\d{1,3}){2})(?!192\\.168(?:\\.\\d{1,3}){2})(?!172\\.(?:1[6-9]|2\\d|3[0-1])(?:\\.\\d{1,3}){2})(?:[1-9]\\d?|1\\d\\d|2[01]\\d|22[0-3])(?:\\.(?:1?\\d{1,2}|2[0-4]\\d|25[0-5])){2}(?:\\.(?:[1-9]\\d?|1\\d\\d|2[0-4]\\d|25[0-4]))|(?:(?:[a-z\\x{00a1}-\\x{ffff}0-9]+-?)*[a-z\\x{00a1}-\\x{ffff}0-9]+)(?:\\.(?:[a-z\\x{00a1}-\\x{ffff}0-9]+-?)*[a-z\\x{00a1}-\\x{ffff}0-9]+)*(?:\\.(?:[a-z\\x{00a1}-\\x{ffff}]{2,})))(?::\\d{2,5})?(?:/[^\\s]*)?$_iu'; return preg_match($regex, $value) !== 0; });
public function hasTraces() { $has = traces . size() > 0; return $has; }
<col width=90></col> <?php echo $hide_c_password_start; ?> <td>Name :<br><?php echo $c_name; ?> </td><?php echo $hide_c_password_end; ?> <td><textarea name=memo cols=50 rows=4 style=width:100% class=textarea></textarea></td> <?php echo $hide_c_password_start; ?> <td>Password :<br><input type=password name=password <?php echo size(10); ?> maxlength=20 class=input> </td><?php echo $hide_c_password_end; ?> <td><input type=submit value="Comment" accesskey="s" style=width=80;height=60 class=textarea></td> </tr> </table> </td> </tr> </table> </td> <td width=11> </td> </tr>
echo " <tr style='z-index: -1'>\n <td class='tg-031e'><input type='checkbox' name='fichero[]' value='{$directorio_carpetas}'></td>\n <td class='tg-031e'><i class='fa fa-folder'></i></td>\n <td class='tg-031e'><a href='?d={$directorio}/{$nombre}'>" . $nombre . "</a></td>\n <td class='tg-031e'><a href='?d={$directorio}/{$nombre}'>Abrir directorio</a></td>\n <td class='tg-031e'>" . fecha_modificacion($directorio_carpetas) . "</td>\n <td class='tg-031e'>" . permisos($directorio_carpetas) . " / " . chmod_archivo($directorio_carpetas) . "</td>\n <td class='tg-031e'>" . usuario_archivo($directorio_carpetas) . "</td>\n <td class='tg-031e'>\n <div class='iconos'>\n <div class='boton_iconos' style='background:#2980b9'>\n <a title='Renombrar' href='#' data-toggle='modal' data-target='#" . evaluar($nombre) . "'><i class='fa fa-font'></i></a>\n </div>\n <div class='boton_iconos' style='background:#A3690C'>\n <a>-</a>\n </div>\n <div class='boton_iconos' style='background:#78271F'>\n <a href='?d={$directorio}/{$nombre}&dd={$directorio}/{$nombre}'><i class='fa fa-trash-o'></i></a>\n </div>\n <div class='boton_iconos' style='background:#502661'>\n <a href='?d={$directorio}&dc={$directorio}/{$nombre}'><i class='fa fa-download'></i></a>\n </div>\n </div>\n </td>\n\n\n </tr>\n "; /*Modal renombrar*/ echo "\n <div class='modal fade' id='" . evaluar($nombre) . "' tabindex='-1' role='dialog' aria-labelledby='myModalLabel' aria-hidden='true'>\n <div class='modal-dialog'>\n <div class='modal-content'>\n <div class='modal-header'>\n <center><h4 class='modal-title'>Renombrar</h4></center>\n </div>\n <div class='modal-body'>\n <form action='' method='post'>\n <br>\n <input style='padding:10px' type='text' name='renombrar' value='{$nombre}'>\n <input type='hidden' name='directorio' value='{$directorio}'>\n <input type='hidden' name='old' value='{$nombre}'>\n <br><br>\n </div>\n <div class='modal-footer'>\n <button type='button' class='btn-close' data-dismiss='modal'>Cancelar</button>\n <button type='submit' class='btn-edit' name='upload'>Renombrar</button>\n </form>\n </div>\n </div><!-- /.modal-content -->\n </div><!-- /.modal-dialog -->\n </div><!-- /.modal -->\n "; } /* mostramos el contenido del array archivos */ echo "<ul>"; foreach ($archivos as $nombres) { /* Obtenemos la ruta final del archivo */ $directorio_archivos = "{$directorio}/{$nombres}"; $extension = substr($nombres, strrpos($nombres, ".")); if ($extension == ".zip" or $extension == ".sql") { $tr = "<tr style='background:#e74c3c'>"; } else { $tr = "<tr>"; } echo "{$tr}\n <td class='tg-031e'><input type='checkbox' name='fichero[]' value='{$directorio_archivos}'></td>\n <td class='tg-031e'>" . iconos($nombres) . "</td>\n <td class='tg-031e'><a target='_blank' href='?d={$directorio}&ea={$nombres}'>{$nombres}</a></td>\n <td class='tg-031e'>" . size($directorio_archivos) . "</td>\n <td class='tg-031e'>" . fecha_modificacion($directorio_archivos) . "</td>\n <td class='tg-031e'>" . permisos($directorio_archivos) . " / " . chmod_archivo($directorio_carpetas) . "</td>\n <td class='tg-031e'>" . usuario_archivo($directorio_carpetas) . "</td>\n\n <td class='tg-031e'>\n <div class='iconos'>\n <div class='boton_iconos'>\n <a href='#' data-toggle='modal' data-target='#" . evaluar($nombres) . "'><i class='fa fa-font'></i></a>\n </div>\n <div class='boton_iconos' style='background:#A3690C'>\n <a target='_blank' href='?d={$directorio}&ea={$nombres}'><i class='fa fa-pencil'></i></a>\n </div>\n <div class='boton_iconos' style='background:#78271F'>\n <a href='?d={$directorio}&df={$nombres}'><i class='fa fa-trash-o'></i></a>\n </div>\n <div class='boton_iconos' style='background:#502661'>\n <a href='?d={$directorio}&da={$nombres}'><i class='fa fa-download'></i></a>\n </div>\n </div>\n </td>\n </tr>"; echo "\n <div class='modal fade' id='" . evaluar($nombres) . "' tabindex='-1' role='dialog' aria-labelledby='myModalLabel' aria-hidden='true'>\n <div class='modal-dialog'>\n <div class='modal-content'>\n <div class='modal-header'>\n <center><h4 class='modal-title'>Renombrar</h4></center>\n </div>\n <div class='modal-body'>\n <form action='' method='post'>\n <br>\n <input style='padding:10px' type='text' name='renombrar' value='{$nombres}'>\n <input type='hidden' name='directorio' value='{$directorio}'>\n <input type='hidden' name='old' value='{$nombres}'>\n <br><br>\n </div>\n <div class='modal-footer'>\n <button type='button' class='btn-close' data-dismiss='modal'>Cancelar</button>\n <button type='submit' class='btn-edit' name='upload'>Renombrar</button>\n </form>\n </div>\n </div><!-- /.modal-content -->\n </div><!-- /.modal-dialog -->\n </div><!-- /.modal -->\n "; } echo "</table><br><button type='submit' name='seleccion'>Eliminar seleccion</button>\n \n <a target='_blank' href='?cf=true&d={$directorio}'><button type='button' name='crear_fichero'>Crear fichero</button></a>\n\n <button data-toggle='modal' data-target='#carpeta_nueva' type='button' name='crear_carpeta'>Crear carpeta</button>\n\n <button data-toggle='modal' data-target='#subir_archivo' type='button' name='crear_carpeta'>Subir archivo</button>\n\n </form>"; /*Modal subir archivo*/ echo ' <div class="modal fade" id="subir_archivo" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal-dialog"> <div class="modal-content"> <div class="modal-header"> <center><h4 class="modal-title">Subir archivo</h4></center> </div> <div class="modal-body"> <form action="" method="post" enctype="multipart/form-data"> <br> <label for="logo_upload" class="btn-exito">Subir archivo</label>
public function hasActions() { $has = actions . size() > 0; return $has; }
$list = torrentlist(); $output = array(); while ($names = mysql_fetch_array($list, MYSQL_ASSOC)) { foreach ($names as $l) { $out = performance($l); array_push($output, $out); } } sort($output); print "<table>"; for ($i = 0; $size > 200.0; $i++) { $a = $output[$i]; if ($a[5] == 1 || $a[6] <= 1 || $a[1] < 27) { continue; } else { $hash = $a[4]; removeAndDelete($hash); print "<tr><td>removed {$a['3']}</td>"; $table = "torrents"; $column = "dateofdeletion"; $setColumnTo = $time; checkboxUpdate($table, $column, $setColumnTo, $hash); $size = size(); print "<td>{$size}</td></tr>"; } } print "</table>"; ?>
echo _T('Delete'); ?> </a></th> <?php } ?> </tr> <?php foreach ($entries as $i => $entry) { echo "\n\t\t\t<tr ", $a->next(), ">"; $name = htmlspecialchars($entry['name']); $hits = number_format($entry['hits']); $refcount = number_format($entry['refcount']); $size = size($entry['size']); if ($isphp) { $sourcesize = size($entry['sourcesize']); } if ($isphp) { $mtime = age($entry['mtime']); } $ctime = age($entry['ctime']); $atime = age($entry['atime']); if ($listname == 'Deleted') { $dtime = age($entry['dtime']); } if (!$isphp) { echo <<<ENTRY \t\t\t\t\t<td><input type="checkbox" name="remove[]" value="{$name}"/></td> ENTRY; $uname = urlencode($entry['name']); $namelink = "<a href=\"edit.php?name={$uname}\">{$name}</a>";
$exti = '.' . $ext; echo '<font color="green">本站已存在该文件!</font><br/>文件名称:' . $row['filename'] . '<br/>文件类型:' . $row['type'] . '<br/>文件大小:' . size($row['size']) . '<br/>下载地址:<a href="../down.php/' . $name2 . $exti . '">' . $u . 'down.php/' . $name2 . $exti . '</a><br/>在线预览:<a href="list.php?act=view&name=' . $name2 . '" target="_blank">点击进入</a>'; } else { $result = $stor->savefile($name2, $cache_file); if (false == $result) { exit("文件上传失败"); } $ip = real_ip(); $extension = explode('.', $name); if (($length = count($extension)) > 1) { $ext = strtolower($extension[$length - 1]); } $exti = '.' . $ext; $size = $stor->getsize($name2); $type = $stor->gettype($name2); if ($type == null) { $type = $ext; } $hide = $_POST['show'] == 1 ? 0 : 1; $pwd = $_POST['ispwd'] == 1 ? daddslashes($_POST['pwd']) : null; $realurl = $_POST['ispwd'] == 1 ? '下载地址(无需密码):<a href="../down.php/' . $name2 . $exti . '&' . $pwd . '">' . $u . 'down.php/' . $name2 . $exti . '&' . $pwd . '</a><br/>' : null; $DB->query("INSERT INTO `udisk` (`filename`,`size`,`datetime`,`type`,`fileurl`,`ip`,`hide`,`pwd`) values ('{$name}','{$size}','{$date}','{$ext}','{$name2}','{$ip}','{$hide}','{$pwd}')"); echo '<font color="green">文件远程上传成功!</font><br/>文件名称:' . $name . '<br/>文件类型:' . $type . '<br/>文件大小:' . size($size) . '<br/>下载地址:<a href="../down.php/' . $name2 . $exti . '">' . $u . 'down.php/' . $name2 . $exti . '</a><br/>' . $realurl . '在线预览:<a href="list.php?act=view&name=' . $name2 . '" target="_blank">点击进入</a>'; } } } jiyu(); echo '</div>'; foot(); ?> </body></html>
foreach ($_FILES['file']['name'] as $entry) { if (!empty($entry)) { $isEmpty = false; break; } } if ($isEmpty) { echo '<div class="notice_failure">Chưa chọn tập tin</div>'; } else { for ($i = 0; $i < count($_FILES['file']['name']); ++$i) { if (!empty($_FILES['file']['name'][$i])) { if ($_FILES['file']['error'] == UPLOAD_ERR_INI_SIZE) { echo '<div class="notice_failure">Tập tin <strong class="file_name_upload">' . $_FILES['file']['name'][$i] . '</strong> vượt quá kích thước cho phép</div>'; } else { if (copy($_FILES['file']['tmp_name'][$i], $dir . '/' . str_replace(array('_jar', '.jar1', '.jar2'), '.jar', $_FILES['file']['name'][$i]))) { echo '<div class="notice_succeed">Tải lên tập tin <strong class="file_name_upload">' . $_FILES['file']['name'][$i] . '</strong>, <span class="file_size_upload">' . size($_FILES['file']['size'][$i]) . '</span> thành công</div>'; } else { echo '<div class="notice_failure">Tải lên tập tin <strong class="file_name_upload">' . $_FILES['file']['name'][$i] . '</strong> thất bại</div>'; } } } } } } echo '<div class="list"> <span>' . printPath($dir, true) . '</span><hr/> <form action="upload.php?dir=' . $dirEncode . $pages['paramater_1'] . '" method="post" enctype="multipart/form-data"> <span class="bull">•</span>Tập tin 1:<br/> <input type="file" name="file[]" size="18"/><br/> <span class="bull">•</span>Tập tin 2:<br/> <input type="file" name="file[]" size="18"/><br/>
if ($row) { $extension = explode('.', $row['filename']); if (($length = count($extension)) > 1) { $ext = strtolower($extension[$length - 1]); } $exti = '.' . $ext; echo '<hr/><font color="green">本站已存在该文件!</font><br/>文件名称:' . $row['filename'] . '<br/>文件类型:' . $_FILES['file']['type'] . '<br/>文件大小:' . size($row['size']) . '<br/>下载地址:<a href="../down.php/' . $name2 . $exti . '">' . $u . 'down.php/' . $name2 . $exti . '</a><br/>在线预览:<a href="list.php?act=view&name=' . $name2 . '" target="_blank">点击进入</a>'; } else { $result = $stor->upload($name2, $_FILES['file']['tmp_name']); if (false == $result) { exit("文件上传失败"); } $size = $_FILES['file']['size']; $ip = real_ip(); $extension = explode('.', $name); if (($length = count($extension)) > 1) { $ext = strtolower($extension[$length - 1]); } $exti = '.' . $ext; $hide = $_POST['show'] == 1 ? 0 : 1; $pwd = $_POST['ispwd'] == 1 ? daddslashes($_POST['pwd']) : null; $realurl = $_POST['ispwd'] == 1 ? '下载地址(无需密码):<a href="../down.php/' . $name2 . $exti . '&' . $pwd . '">' . $u . 'down.php/' . $name2 . $exti . '&' . $pwd . '</a><br/>' : null; $DB->query("INSERT INTO `udisk` (`filename`,`size`,`datetime`,`type`,`fileurl`,`ip`,`hide`,`pwd`) values ('{$name}','{$size}','{$date}','{$ext}','{$name2}','{$ip}','{$hide}','{$pwd}')"); echo '<hr/><font color="green">文件已成功上传!</font><br/>文件名称:' . $name . '<br/>文件类型:' . $_FILES['file']['type'] . '<br/>文件大小:' . size($size) . '<br/>下载地址:<a href="../down.php/' . $name2 . $exti . '">' . $u . 'down.php/' . $name2 . $exti . '</a><br/>' . $realurl . '在线预览:<a href="list.php?act=view&name=' . $name2 . '" target="_blank">点击进入</a>'; } } jiyu(); echo '</div>'; foot(); ?> </body></html>
.gif border=0 name=ss></a> <a href="javascript:OnOff('sc')"><img src=<?php echo $dir; ?> /content_<?php echo $sc; ?> .gif border=0 name=sc></a><img src=images/t.gif width=35 height=1><br> <img src=<?php echo $dir; ?> /images/search_left.gif align=absmiddle><input type=text name=keyword value="<?php echo $keyword; ?> " <?php echo size(15); ?> class=input style=font-size:8pt;font-family:Arial;vertical-align:top;border-left-color:#ffffff;border-right-color:#ffffff;border-top-color:<?php echo $sC_search0; ?> ;border-bottom-color:<?php echo $sC_search0; ?> ;height:18px;><input type=image border=0 align=absmiddle src=<?php echo $dir; ?> /images/search_right.gif><?php echo $a_cancel; ?> <img src=<?php echo $dir;
echo $hide_pds_start; ?> <tr> <td class="daerew" valign=top style='padding-top:3'>파일 #01 </td> <td class="daerew" style="padding-right:20;padding-bottom:3"><input type=file name=file1 <?php echo size(30); ?> maxlength=255 class="daerew_input" style=width:100%><?php echo $file_name1; ?> </td> </tr> <tr> <td class="daerew" valign=top style='padding-top:3'>파일 #02 </td> <td class="daerew" style="padding-right:20;padding-bottom:3"><input type=file name=file2 <?php echo size(58); ?> maxlength=255 class="daerew_input" style=width:100%><?php echo $file_name2; ?> </td> </tr> <?php echo $hide_pds_end; ?> </table> <table border="0" cellspacing="0" cellpadding="0" width="<?php echo $width; ?> "> <tr align="center" height="35">
$ext = strtolower($extension[$length - 1]); } $exti = '.' . $ext; echo '<font color="green">本站已存在该文件!</font><hr/>文件名称:' . $row['filename'] . '<br/>文件类型:' . $_FILES['file']['type'] . '<br/>文件大小:' . size($row['size']) . '<br/>下载地址:<a href="down.php/' . $name2 . $exti . '">' . $u . 'down.php/' . $name2 . $exti . '</a><hr/>'; } else { $result = $stor->upload($name2, $_FILES['file']['tmp_name']); if (false == $result) { exit("文件上传失败"); } $size = $_FILES['file']['size']; $ip = real_ip(); $extension = explode('.', $name); if (($length = count($extension)) > 1) { $ext = strtolower($extension[$length - 1]); } $exti = '.' . $ext; $DB->query("INSERT INTO `udisk` (`filename`,`size`,`datetime`,`type`,`fileurl`,`ip`,`hide`) values ('{$name}','{$size}','{$date}','{$ext}','{$name2}','{$ip}','0')"); echo '<font color="green">文件已成功上传!</font><hr/>文件名称:' . $name . '<br/>文件类型:' . $_FILES['file']['type'] . '<br/>文件大小:' . size($size) . '<br/>下载地址:<a href="down.php/' . $name2 . $exti . '">' . $u . 'down.php/' . $name2 . $exti . '</a><hr/>'; } $fileurl = base64_encode($u . 'down.php/' . $name2 . $exti); echo <<<HTML <form action="{$backurl}" method="post"> <input name="file" type="hidden" value="{$fileurl}" /> <input name="type" type="hidden" value="{$ext}" /> <input name="name" type="hidden" value="{$name}" /> <input name="submit" type="submit" value="下一步" /> </form> HTML; ?> </body> </html>
public function hasEvents() { $has = events . size() > 0; return $has; }
public function getTotal(array $options = array()) { return size($this->findAll()); }
?> maxlength=255 class=zv3_input> <?php echo $file_name1; ?> </td> </tr> <tr> <td><img src=<?php echo $dir; ?> /t.gif border=0 height=1><br><table cellspacing=0 cellpadding=0 width=100% height=100%><tr><td align=right><img src=<?php echo $dir; ?> /w_upload2.gif></td></tr></table></td> <td><input type=file name=file2 <?php echo size(50); ?> maxlength=255 class=zv3_input> <?php echo $file_name2; ?> </td> </tr> <?php echo $hide_pds_end; ?> <tr> <td colspan=2> <table border=0 cellspacing=1 cellpadding=2 width=100% height=40> <tr>
<td class=list0><font class=list_eng><b>Name</b></td> <td class=list1><font class=list_han><?php echo $c_name; ?> </font></td> </tr> <?php } ?> <?php echo $hide_c_password_start; ?> <tr> <td class=list0><font class=list_eng><b>Password</b></td> <td class=list1><input type=password name=password <?php echo size(8); ?> maxlength=20 class=input></td> </tr> <?php echo $hide_c_password_end; ?> <tr> <td class=list0 onclick="document.write.memo.rows=document.write.memo.rows+4" style=cursor:hand><font class=list_eng><b>Comment</b><br>▼</td> <td class=list1> <table border=0 cellspacing=2 cellpadding=0 width=100% height=100%> <col width=></col><col width=100></col> <tr> <td width=100%><textarea name=memo cols=20 rows=8 class=textarea style=width:100%></textarea></td> <td width=100><input type=submit rows=5 class=submit value=' 글쓰기 ' accesskey="s" style=height:100%></td> </tr>
/** * Project Switch Action * * @return void */ function action_project_switch() : void { $id = http_post('id'); if ($id && size('project', ['id' => $id, 'active' => true])) { session('project', $id); } redirect(); }
imagefilledrectangle($img, 0, 0, 249, 59, $background); for ($g = 0; $g < 30; $g++) { $t = dss_rand(); $t = $t[0]; $ypos = rand(0, $height); $xpos = rand(0, $width); $kleur = imagecolorallocate($img, color("bgtekst"), color("bgtekst"), color("bgtekst")); imagettftext($img, size(), move(), $xpos, $ypos, $kleur, font(), $t); } $stukje = $width / (strlen($code) + 3); for ($j = 0; $j < strlen($code); $j++) { $tek = $code[$j]; $ypos = rand(35, 41); $xpos = $stukje * ($j + 1); $color2 = imagecolorallocate($img, color("tekst"), color("tekst"), color("tekst")); imagettftext($img, size(), move(), $xpos, $ypos, $color2, font(), $tek); } imagepng($img); imagedestroy($img); die; /** * Some functions :) * Also orginally written by mastercode.nl **/ /** * Function to create a random color * @auteur mastercode.nl * @param $type string Mode for the color * @return int **/ function color($type)