<?php ini_set("display_errors", "On"); include 'Init.php'; OpenDB(); $result = RunDB("select count(id) from metadata"); $row = mysql_fetch_row($result); $allNum = $row[0]; CloseDB(); ?> <!DOCTYPE html> <html lang="zh-cn"> <head> <meta charset="utf-8"> <title>DHT 资源搜索站</title> <link href="static/bootstrap.css" rel="stylesheet"> <link href="static/flat-ui.css" rel="stylesheet"> </head> <body> <div class="container"> <div style="height:180px;"></div> <div class="row"> <div class="col-md-3"></div> <div class="col-md-6"><h3 class="text-center">DHT 资源搜索站</h3></div> <div class="col-md-3"></div> </div> <div style="height:70px;"></div> <div class="row"> <div class="col-md-3"></div> <div class="col-md-6"> <div class="input-group">
$info_hash = array(); $info_time = array(); $info_name = array(); $info_size = array(); $info_files_num = array(); $info_files_name = array(); $info_files_size = array(); $hashs = array_keys($hashsl); if ($g_p > ceil(count($hashs) / 10)) { $g_p = ceil(count($hashs) / 10); } for ($d = 10 * ($g_p - 1); $d < 10 * $g_p; $d++) { if ($d >= count($hashs)) { break; } $result = RunDB("select * from metadata where `hash`='" . $hashs[$d] . "'"); if (mysql_num_rows($result) > 0) { $row = mysql_fetch_row($result); array_push($info_hash, $row[1]); $row[2] = format_date($row[2]); array_push($info_time, $row[2]); array_push($info_name, $row[3]); $row[5] = format_size($row[5]); array_push($info_size, $row[5]); array_push($info_files_num, $row[6]); array_push($info_files_name, $row[7]); $row[8] = format_size($row[8]); array_push($info_files_size, $row[8]); } } }
<?php include 'Init.php'; @($g_h = trim($_GET['h'])); if (!isset($g_h) || $g_h == "") { header('Location: /'); } if (!ereg("^[0-9a-zA-Z]*\$", $g_h)) { header('Location: /'); } else { OpenDB(); $result = RunDB("select * from metadata where `hash`='" . $g_h . "'"); if (mysql_num_rows($result) <= 0) { header('Location: /'); } else { $row = mysql_fetch_row($result); $info_hash = $row[1]; $row[2] = format_date_utc($row[2]); $info_time = $row[2]; $info_name = $row[3]; $row[4] = format_date_utc($row[4]); $info_created = $row[4]; $row[5] = format_size($row[5]); $info_size = $row[5]; $info_files_num = $row[6]; $info_files_name = $row[7]; $row[8] = format_size($row[8]); $info_files_size = $row[8]; $info_keyword = getKeyword($info_name); if (strpos($info_keyword, "|") === false) { $info_keyword = ' <a target="_blank" href="s.php?kw=' . urlencode($info_keyword) . '">' . $info_keyword . '</a> ' . "\n";