本文整理汇总了PHP中misc::makesize方法的典型用法代码示例。如果您正苦于以下问题:PHP misc::makesize方法的具体用法?PHP misc::makesize怎么用?PHP misc::makesize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类misc
的用法示例。
在下文中一共展示了misc::makesize方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: report
function report($id, $name, $down, $up, $rank, $first, $last)
{
if ($down > 0) {
$ratio = substr($up / $down, 0, 5);
} else {
$ratio = "∞";
}
if ($down > $up) {
$diff = "<b><font color='red'>↓ " . misc::makesize($down - $up) . "</font></b>";
} elseif ($up > $down) {
$diff = "<b><font color='blue'>↑ " . misc::makesize($up - $down) . "</font></b>";
} else {
$diff = "<b><font color='cyan'>0</font></b>";
}
print "\n<tr>\n<td class='lista' align='center'><b><font color='blue'>" . $id . "</font></b></td>";
print "\n<td class='lista' align='center'><b><font color='lavender'><a href='userdetails.php?id=" . $id . "'>" . $name . "</a></font></b></td>";
print "\n<td class='lista' align='center'><b><font color='red'>↓ " . misc::makesize($down) . "</b></font></td>";
print "\n<td class='lista' align='center'><b><font color='green'>↑ " . misc::makesize($up) . "</b></font></td>";
print "\n<td class='lista' align='center'><b>" . $ratio . "</b></td>";
print "\n<td class='lista' align='center'><b>" . $rank . "</b></td>";
print "\n<td class='lista' align='center'><b>" . $diff . "</b></td>";
print "\n<td class='lista' align='center'><b>" . date("d/m/Y H:i:s", $first) . "</b></td>";
print "\n<td class='lista' align='center'><b>" . date("d/m/Y H:i:s", $last) . "</b></td>";
print "\n<td class='lista' align='center'><b><a href='account.php?act=mod&uid=" . $id . "&returnto=admincp.php?user=" . user::$current["uid"] . "&code=" . user::$current["random"] . "&do=searchdiff'><img src='./style/base/edit.png' border='0' alt='Edit'/></b></td>";
print "\n<td class='lista' align='center'><b><a href='account.php?act=del&uid=" . $id . "&returnto=admincp.php?user=" . user::$current["uid"] . "&code=" . user::$current["random"] . "&do=searchdiff'><img src='./style/base/delete.png' border='0' alt='Delete'/></b></td>";
print "\n<td class='lista' align='center'><input type='checkbox' name='uyedegis[]' value='" . $id . "' /></td>\n</tr>";
}
示例2: print_version
function print_version()
{
global $time_start, $gzip, $PRINT_DEBUG, $tracker_version;
$time_end = get_microtime();
$max_mem = memory_get_peak_usage();
print "<p align='center'>";
if ($PRINT_DEBUG) {
print "[ Execution time: " . number_format($time_end - $time_start, 4) . " sec. ] - [Memory usage: " . misc::makesize($max_mem) . "] - [ GZIP: " . $gzip . " ]<br />";
}
print "BtiTracker (" . $tracker_version . ") by <a href='https://github.com/Yupy/BtiTracker-1.5.0' target='_blank'>Yupy</a> & <a href='http://www.btiteam.org' target='_blank'>Btiteam</a></p>";
}
示例3: _torrenttable
function _torrenttable($res, $frame_caption, $speed = "false")
{
global $db;
block_begin($frame_caption, 'center');
begin_table();
$num = 0;
while ($a = $res->fetch_assoc()) {
++$num;
if ($a["leechers"] > 0) {
$r = (int) $a["seeds"] / (int) $a["leechers"];
$ratio = number_format($r, 2);
} else {
$ratio = INFINITE;
}
if (!isset($menu)) {
$menu = "";
}
if ($menu != "1") {
echo "<tr>" . "<table width='100%' class='lista'>" . "<td class='header' align='center'>" . USER_LEVEL . "</td>" . "<td class='header'>" . FILE . "</td>";
if ($speed != "true") {
echo "<td class='header' align='center'>" . FINISHED . "</td>" . "<td class='header' align='center'>" . SEEDERS . "</td>" . "<td class='header' align='center'>" . LEECHERS . "</td>" . "<td class='header' align='center'>" . PEERS . "</td>" . "<td class='header' align='center'>" . RATIO . "</td>";
} else {
echo "<td class='header' align='right'>" . SPEED . "</td>";
}
echo "</tr>";
$menu = 1;
}
print "<tr><td class='lista' align='center'>" . $num . "</td><td class='lista' align='left'>";
print "<a href='" . "details.php?id=" . $a['hash'] . "'>" . "<b>";
print security::html_safe($a["name"]) . "</b></a></td>";
if ($speed != "true") {
print "<td class='lista' align='center' width='10%' ><a href='torrent_history.php?id=" . $a["hash"] . "'>" . number_format((int) $a["finished"]) . "</a></td><td class='lista' align='center' width='10%' ><a href='peers.php?id=" . $a["hash"] . "'>" . number_format((int) $a["seeds"]) . "</a></td><td class='lista' align='center' width='10%' > <a href='peers.php?id=" . $a["hash"] . "'>" . number_format((int) $a["leechers"]) . "</a></td><td class='lista' align='center' width='10%' > <a href='peers.php?id=" . $a["hash"] . "'>" . number_format((int) $a["leechers"] + (int) $a["seeds"]) . "</a></td><td class='lista' align='center' width='10%'>" . $ratio . "</td>\n";
} else {
print "<td class='lista' align='center'>" . misc::makesize((int) $a["speed"]) . "/s" . "\n";
}
}
end_table();
block_end();
}
示例4: number_format
echo "\t<td align='center' class='lista'><a href='torrent_history.php?id=" . $data["hash"] . "' title='History - " . security::html_safe($data["filename"]) . "'>" . number_format((int) $data["finished"], 0) . "</a></td>";
} else {
echo "\t<td align='center' class='lista'>---</td>";
}
} else {
// linkcolor
echo "\t<td align='center' class='" . linkcolor($data["seeds"]) . "'>" . (int) $data["seeds"] . "</td>";
echo "\t<td align='center' class='" . linkcolor($data["leechers"]) . "'>" . (int) $data["leechers"] . "</td>";
if ($data["finished"] > 0) {
echo "\t<td align='center' class='lista'>" . number_format((int) $data["finished"], 0) . "</td>";
} else {
echo "\t<td align='center' class='lista'>---</td>";
}
}
if ($data["dwned"] > 0) {
echo "\t<td align='center' class='lista'>" . misc::makesize((int) $data["dwned"]) . "</td>";
} else {
echo "\t<td align='center' class='lista'>" . NA . "</td>";
}
if ($data["speed"] < 0 || $data["external"] == "yes") {
$speed = NA;
echo "\t<td align='center' class='lista'>" . $speed . "</td>\n";
} else {
if ($data["speed"] > 2097152) {
$speed = round((int) $data["speed"] / 1048576, 2) . " MiB per sec";
echo "\t<td align='center' class='lista'>" . $speed . "</td>\n";
} else {
$speed = round((int) $data["speed"] / 1024, 2) . " KiB per sec";
echo "\t<td align='center' class='lista'>" . $speed . "</TD>\n";
}
}
示例5: SetAllCheckBoxes
$dbstatus = $db->query("SHOW TABLE STATUS");
if ($dbstatus->num_rows > 0) {
$ad_display .= "\n <script type='text/javascript'>\n <!--\n function SetAllCheckBoxes(FormName, FieldName, CheckValue)\n {\n if(!document.forms[FormName])\n return;\n var objCheckBoxes = document.forms[FormName].elements[FieldName];\n if(!objCheckBoxes)\n return;\n var countCheckBoxes = objCheckBoxes.length;\n if(!countCheckBoxes)\n objCheckBoxes.checked = CheckValue;\n else\n // set the check value for all check boxes\n for(var i = 0; i < countCheckBoxes; i++)\n objCheckBoxes[i].checked = CheckValue;\n }\n -->\n </script>\n <form name='dbutil' action='admincp.php?user=" . user::$current["uid"] . "&code=" . user::$current["random"] . "&do=dbutil&action=tables' method='post'>\n <table class='lista' cellspacing='1' cellpadding='0' align='center' border='0' width='100%'>\n <tr>\n <td align='center' class='header'> </td>\n <td align='center' class='header'>Name</td>\n <td align='center' class='header'>Records</td>\n <td align='center' class='header'>Data Length</td>\n <td align='center' class='header'>Overhead</td>\n </tr>\n ";
$tables = 0;
$bytes = 0;
$records = 0;
$overhead = 0;
// display current status for tables
while ($tstatus = $dbstatus->fetch_array(MYSQLI_BOTH)) {
$ad_display .= "\n <tr>\n <td class='lista' align='center'><input type='checkbox' name='tname[]' value='{$tstatus['Name']}' /></td>\n <td class='lista'>{$tstatus['Name']}</td>\n <td class='lista' align='right'>{$tstatus['Rows']}</td>\n <td class='lista' align='right'>" . misc::makesize((int) $tstatus['Data_length'] + (int) $tstatus['Index_length']) . "</td>\n <td class='lista' align='right'>" . ($tstatus['Data_free'] == 0 ? "-" : misc::makesize((int) $tstatus['Data_free'])) . "</td>\n </tr>\n ";
$tables++;
$bytes += (int) $tstatus['Data_length'] + (int) $tstatus['Index_length'];
$records += $tstatus['Rows'];
$overhead += (int) $tstatus['Data_free'];
}
$ad_display .= "\n <tr>\n <td align='center' class='lista'><input type='checkbox' name='all' onclick=\"SetAllCheckBoxes('dbutil','tname[]',this.checked)\" /></td>\n <td align='center' class='lista'>" . $tables . " table(s)</td>\n <td align='right' class='lista'>" . $records . "</td>\n <td align='right' class='lista'>" . misc::makesize($bytes) . "</td>\n <td align='right' class='lista'>" . misc::makesize($overhead) . "</td>\n </tr>\n <tr>\n <td colspan='5'>\n If checked: \n <input type='submit' name='doit' value='Repair' /> \n <input type='submit' name='doit' value='Optimize' /> \n <input type='submit' name='doit' value='Analyze' /> \n <input type='submit' name='doit' value='Check' /> \n <input type='submit' name='doit' value='Delete' onclick='return confirm('Warning, this will delete selected tables!')' />\n </td>\n </tr>\n </table>\n ";
unset($tables);
unset($bytes);
unset($records);
unset($overhead);
}
break;
default:
print "\n\t\t<table class='lista' cellspacing='1' cellpadding='2' align='center' border='0' width='100%'>\n <tr>\n <td class='header' align='center' width='50%' colspan='3'>\n <input type='button' name='query' value='Query' onclick='window.location.href='admincp.php?user=" . user::$current["uid"] . "&code=" . user::$current["random"] . "&do=dbutil&action=qry'' />\n </td>\n <td class='header' align='center' width='50%' colspan='2'>\n <input type='button' name='status' value='DB Status' onclick='window.location.href='admincp.php?user=" . user::$current["uid"] . "&code=" . user::$current["random"] . "&do=dbutil&action=status'' />\n </td>\n </tr>\n </table>\n ";
// thanks to tdbdev.net and CoLdFuSiOn for the mysql stats code
include INCL_PATH . 'mysql_stats.php';
print "<div align='center'>The code for mysql server status is provided by CoLdFuSiOn (Tbdev.net)</div>";
break;
}
echo $ad_display;
block_end();
示例6: style_list
$style = style_list();
$langue = language_list();
$curuser_stats = CACHE_PATH . 'curuser_stats_' . user::$current['uid'] . '.txt';
$curuser_stats_expire = 15 * 60;
if (file_exists($curuser_stats) && is_array(unserialize(file_get_contents($curuser_stats))) && vars::$timestamp - filemtime($curuser_stats) < $curuser_stats_expire) {
$rowuser = unserialize(@file_get_contents($curuser_stats));
} else {
$resuser = $db->query("SELECT uploaded, downloaded FROM users WHERE id = " . user::$current["uid"]);
$rowuser = $resuser->fetch_array(MYSQLI_BOTH);
$handle = fopen($curuser_stats, "w+");
fwrite($handle, serialize($rowuser));
fclose($handle);
}
print "<td class='lista' align='center'>" . USER_LEVEL . ": " . security::html_safe(user::$current["level"]) . "</td>\n";
print "<td class='green' align='center'>↑ " . misc::makesize((double) $rowuser['uploaded']);
print "</td><td class='red' align='center'>↓ " . misc::makesize((double) $rowuser['downloaded']);
print "</td><td class='lista' align='center'>(SR " . ((int) $rowuser['downloaded'] > 0 ? number_format((double) $rowuser['uploaded'] / (double) $rowuser['downloaded'], 2) : "∞") . ")</td>\n";
if (user::$current["admin_access"] == "yes") {
print "\n<td align='center' class='lista'><a href='admincp.php?user=" . user::$current["uid"] . "&code=" . user::$current["random"] . "'>" . MNU_ADMINCP . "</a></td>\n";
}
print "<td class='lista' align='center'><a href='usercp.php?uid=" . user::$current["uid"] . "'>" . USER_CP . "</a></td>\n";
$resmail = $db->query("SELECT COUNT(*) FROM messages WHERE readed = 'no' AND receiver = " . user::$current['uid']);
if ($resmail && $resmail->num_rows > 0) {
$mail = $resmail->fetch_row();
if ($mail[0] > 0) {
print "<td class='lista' align='center'><a href='usercp.php?uid=" . user::$current["uid"] . "&do=pm&action=list'>" . MAILBOX . "</a> (<font color='#FF0000'><b>" . (int) $mail[0] . "</b></font>)</td>\n";
} else {
print "<td class='lista' align='center'><a href='usercp.php?uid=" . user::$current["uid"] . "&do=pm&action=list'>" . MAILBOX . "</a></td>\n";
}
} else {
print "<td class='lista' align='center'><a href='usercp.php?uid=" . user::$current["uid"] . "&do=pm&action=list'>" . MAILBOX . "</a></td>\n";
示例7: fopen
require_once CLASS_PATH . 'class.Bencode.php';
if (file_exists($row["url"])) {
print "\n <tr>\n <td align='right' class='header' valign='top'>\n <a name='#expand' href='#expand' onclick=\"javascript:ShowHide('files', 'msgfile');\">Show/Hide Files: </td>\n <td align='left' class='lista'>\n <div name='files' style='display:none' id='files'>\n <table class='lista'>\n <tr>\n <td align='center' class='header'>" . FILE_NAME . "</td>\n <td align='center' class='header'>" . SIZE . "</td>\n </tr>";
$ffile = fopen($row["url"], "rb");
$content = fread($ffile, filesize($row["url"]));
fclose($ffile);
$content = bencdec::decode($content);
$numfiles = 0;
if (isset($content["info"]) && $content["info"]) {
$thefile = $content["info"];
if (isset($thefile["length"])) {
$numfiles++;
print "\n<tr>\n<td align='left' class='lista'>" . security::html_safe($thefile["name"]) . "</td>\n<td align='right' class='lista'>" . misc::makesize((int) $thefile["length"]) . "</td></tr>\n";
} elseif (isset($thefile["files"])) {
foreach ($thefile["files"] as $singlefile) {
print "\n<tr>\n<td align='left' class='lista'>" . security::html_safe(implode("/", $singlefile["path"])) . "</td>\n<td align='right' class='lista'>" . misc::makesize((int) $singlefile["length"]) . "</td></tr>\n";
$numfiles++;
}
} else {
print "\n<tr>\n<td colspan='2'>No Data...</td></tr>\n";
// can't be but...
}
}
print "</table></div>\n <div name='msgfile' style='display:block' id='msgfile' align='center'>" . $numfiles . "" . ($numfiles == 1 ? " file" : " files") . "</div>\n </td></tr>\n";
}
// end files in torrents
include INCL_PATH . 'offset.php';
print "<tr><td align='right' class='header'> " . ADDED . ":</td><td class='lista' align='center'>" . date("d/m/Y H:m:s", $row["data"] - $offset) . "</td></tr>\n";
if ($row["anonymous"] == "true") {
if (user::$current["edit_torrents"] == "yes") {
$uploader = "<a href=userdetails.php?id=" . (int) $row['uploader'] . ">" . TORRENT_ANONYMOUS . "</a>";
示例8: while
print "<td align='center' class='header'>" . PEER_CLIENT . "</td>\n";
print "<td align='center' class='header'>" . DOWNLOADED . "</td>\n";
print "<td align='center' class='header'>" . UPLOADED . "</td>\n";
print "<td align='center' class='header'>" . RATIO . "</td>\n";
print "<td align='center' class='header'>" . FINISHED . "</td></tr>\n";
while ($row = $res->fetch_array(MYSQLI_BOTH)) {
print "<tr><td align='center' class='lista'>" . "<a href='userdetails.php?id=" . (int) $row["uid"] . "'>" . security::html_safe(unesc($row["username"])) . "</a></td>" . "<td align='center' class='lista'><a href='usercp.php?do=pm&action=edit&uid=" . user::$current['uid'] . "&what=new&to=" . urlencode(unesc($row["username"])) . "'>" . image_or_link($STYLEPATH . "/pm.png", "", "PM") . "</a></td>";
if ($row["flagpic"] != "") {
print "<td align='center' class='lista'><img src='images/flag/" . $row["flagpic"] . "' alt='" . security::html_safe($row["country"]) . "' /></td>";
} else {
print "<td align='center' class='lista'><img src='images/flag/unknown.gif' alt='" . UNKNOWN . "' /></td>";
}
print "<td align='center' class='lista'>" . $row["active"] . "</td>";
print "<td align='center' class='lista'>" . security::html_safe($row["agent"]) . "</td>";
$dled = misc::makesize((double) $row["downloaded"]);
$upld = misc::makesize((double) $row["uploaded"]);
print "<td align='center' class='lista'>" . $dled . "</td>";
print "<td align='center' class='lista'>" . $upld . "</td>";
if (intval($row["downloaded"]) > 0) {
$ratio = number_format((double) $row["uploaded"] / (double) $row["downloaded"], 2);
} else {
$ratio = "∞";
}
print "<td align='center' class='lista'>" . $ratio . "</td>";
print "<td align='center' class='lista'>" . get_elapsed_time($row["date"]) . " ago</td></tr>";
}
if ($res->num_rows == 0) {
print "<tr><td align='center' colspan='9' class='lista'>No history to display</td></tr>";
}
print "</table>";
print "</div><br /><br /><center><a href='javascript: history.go(-1);'>" . BACK . "</a>";
示例9: image_or_link
}
$wait -= $timer;
if ($wait <= 0) {
$wait = 0;
}
}
//end waitingtime
echo "</td>";
echo "\t<td align='left' class='lista'><a href='details.php?id=" . $data["hash"] . "' title='" . VIEW_DETAILS . ": " . security::html_safe($data["filename"]) . "'>" . security::html_safe($data["filename"]) . "</a></td>";
echo "\t<td align='center' class='lista'><a href='torrents.php?category=" . (int) $data['catid'] . "'>" . image_or_link($data["image"] == "" ? "" : "images/categories/" . $data["image"], "", security::html_safe($data["cname"])) . "</td>";
if (max(0, user::$current["WT"]) > 0) {
echo "\t<td align='center' class='lista'>" . $wait . " h</td>";
}
include INCL_PATH . 'offset.php';
echo "\t<td nowrap='nowrap' class='lista' align='center'>" . date("d/m/Y H:m:s", $data["added"] - $offset) . "</td>";
echo "\t<td nowrap='nowrap' align='center' class='lista'>" . misc::makesize((int) $data["size"]) . "</td>";
if ($data["external"] == "no") {
echo "\t<td align='center' class='" . linkcolor($data["seeds"]) . "'><a href='peers.php?id=" . $data["hash"] . "' title='" . PEERS_DETAILS . "'>" . (int) $data["seeds"] . "</a></td>\n";
echo "\t<td align='center' class='" . linkcolor($data["leechers"]) . "'><a href='peers.php?id=" . $data["hash"] . "' title='" . PEERS_DETAILS . "'>" . (int) $data["leechers"] . "</a></td>\n";
if ($data["finished"] > 0) {
echo "\t<td align='center' class='lista'><a href='torrent_history.php?id=" . $data["hash"] . "' title='History - " . security::html_safe($data["filename"]) . "'>" . (int) $data["finished"] . "</a></td>";
} else {
echo "\t<td align='center' class='lista'>---</td>";
}
} else {
// linkcolor
echo "\t<td align='center' class='" . linkcolor($data["seeds"]) . "'>" . (int) $data["seeds"] . "</td>";
echo "\t<td align='center' class='" . linkcolor($data["leechers"]) . "'>" . (int) $data["leechers"] . "</td>";
if ($data["finished"] > 0) {
echo "\t<td align='center' class='lista'>" . (int) $data["finished"] . "</td>";
} else {
示例10: list
</tr>
<?php
$anq->free();
$anq = $db->query("SELECT history.uid FROM history INNER JOIN namemap ON history.infohash = namemap.info_hash WHERE history.uid = " . $id . " AND history.date IS NOT NULL ORDER BY date DESC");
if ($anq->num_rows > 0) {
list($pagertop, $limit) = misc::pager($utorrents == 0 ? 15 : $utorrents, $anq->num_rows, security::esc_url($_SERVER["PHP_SELF"]) . "?id=" . $id . "&", array("pagename" => "historypage"));
$anq = $db->query("SELECT namemap.filename, namemap.size, namemap.info_hash, history.active, history.agent, history.downloaded, history.uploaded, summary.seeds, summary.leechers, summary.finished\n FROM history INNER JOIN namemap ON history.infohash = namemap.info_hash INNER JOIN summary ON summary.info_hash = namemap.info_hash WHERE history.uid = " . $id . " AND history.date IS NOT NULL ORDER BY date DESC " . $limit);
print "<div align='center'>" . $pagertop . "</div>";
while ($torlist = $anq->fetch_object()) {
print "\n<tr>\n<td class='lista'><a href='details.php?id=" . $torlist->info_hash . "'>" . security::html_safe(unesc($torlist->filename)) . "</td>";
print "\n<td class='lista' align='center'>" . misc::makesize((int) $torlist->size) . "</td>";
print "\n<td class='lista' align='center'>" . security::html_safe($torlist->agent) . "</td>";
print "\n<td align='center' class='lista'>" . ($torlist->active == 'yes' ? ACTIVATED : 'Stopped') . "</td>";
print "\n<td align='center' class='lista'>" . misc::makesize((double) $torlist->downloaded) . "</td>";
print "\n<td align='center' class='lista'>" . misc::makesize((double) $torlist->uploaded) . "</td>";
if ($torlist->downloaded > 0) {
$peerratio = number_format((double) $torlist->uploaded / (double) $torlist->downloaded, 2);
} else {
$peerratio = "∞";
}
print "\n<td align='center' class='lista'>" . unesc($peerratio) . "</td>";
print "\n<td align='center' class='" . linkcolor($torlist->seeds) . "'><a href='peers.php?id=" . $torlist->info_hash . "'>" . (int) $torlist->seeds . "</td>";
print "\n<td align='center' class='" . linkcolor($torlist->leechers) . "'><a href='peers.php?id=" . $torlist->info_hash . "'>" . (int) $torlist->leechers . "</td>";
print "\n<td align='center' class='lista'><a href='torrent_history.php?id=" . $torlist->info_hash . "'>" . (int) $torlist->finished . "</td>\n</tr>";
}
print "\n</table>";
} else {
print "<tr>\n<td class='lista' align='center' colspan='10'>No history for this user</td>\n</tr>\n</table>";
}
block_end();
示例11: while
echo EDIT;
?>
</td>
<td align='center' class='header'><?php
echo DELETE;
?>
</td>
</tr>
<?php
if ($resuploaded && $resuploaded->num_rows > 0) {
while ($rest = $resuploaded->fetch_array(MYSQLI_BOTH)) {
print "\n<tr>\n<td class='lista'>" . security::html_safe(unesc($rest["filename"])) . "</td>";
include INCL_PATH . 'offset.php';
print "\n<td class='lista' align='center'>" . date("d/m/Y H:m:s", $rest["added"] - $offset) . "</td>";
print "\n<td class='lista' align='right'>" . misc::makesize((int) $rest["size"]) . "</td>";
print "\n<td align='right' class='" . linkcolor($rest["seeds"]) . "'>" . (int) $rest['seeds'] . "</td>";
print "\n<td align='right' class='" . linkcolor($rest["leechers"]) . "'>" . (int) $rest['leechers'] . "</td>";
print "\n<td class='lista' align='right'>" . ($rest["finished"] > 0 ? (int) $rest["finished"] : "---") . "</td>";
print "<td class='lista' align='center'><a href='edit.php?info_hash=" . $rest["hash"] . "&returnto=" . urlencode("torrents.php") . "'>" . image_or_link($STYLEPATH . "/edit.png", "", EDIT) . "</a></td>";
print "<td class='lista' align='center'><a href='delete.php?info_hash=" . $rest["hash"] . "&returnto=" . urlencode("torrents.php") . "'>" . image_or_link($STYLEPATH . "/delete.png", "", DELETE) . "</a></td>\n</tr>";
}
print "\n</table>";
} else {
print "<tr>\n<td class='lista' align='center' colspan='8'>" . NO_TORR_UP_USER . "</td>\n</tr>\n</table>";
}
block_end();
// ------------------------
print "<br />";
}
block_end();
示例12: categories
</tr>
<tr>
<?php
echo "<td align='right' class='header'>" . CATEGORY_FULL . ":</td><td class='lista' align='left'>";
categories($results["cat_name"]);
echo "</td>";
include INCL_PATH . 'offset.php';
?>
</tr>
<tr>
<td align='right' class='header'><?php
echo SIZE;
?>
:</td><td class='lista'><?php
echo misc::makesize((int) $results["size"]);
?>
</td>
</tr>
<tr>
<td align='right' class='header'><?php
echo ADDED;
?>
:</td><td class='lista'><?php
echo date("d/m/Y H:m:s", $results["data"] - $offset);
?>
</td>
</tr>
<tr>
<td align='right' class='header'><?php
echo DOWNLOADED;
示例13: print_version
function print_version()
{
global $time_start, $gzip, $PRINT_DEBUG, $tracker_version;
$time_end = get_microtime();
$max_mem = memory_get_peak_usage();
print "<p align='center'>";
if ($PRINT_DEBUG) {
print "<small>[ Execution Time: " . number_format($time_end - $time_start, 4) . " sec. ] - [Memcached Queries: " . MCached::$count . " (" . round(MCached::$time, 4) . " sec.)] - [Memory Usage: " . misc::makesize($max_mem) . "]</small><br />";
}
print "BtiTracker (" . $tracker_version . ") by <a href='https://github.com/Yupy/BtiTracker-1.5.1' target='_blank'>Yupy</a> & <a href='http://www.btiteam.org' target='_blank'>Btiteam</a></p>";
}
示例14: number_format
}
if ($leechers > 0) {
$percent = number_format($seeds / $leechers * 100, 0);
} else {
$percent = number_format($seeds * 100, 0);
}
$peers = $seeds + $leechers;
$row = MCached::get('main::tracker::toolbar::total::traffic');
if ($row === MCached::NO_RESULT) {
$res = $db->query("SELECT SUM(downloaded) AS dled, SUM(uploaded) AS upld FROM users");
$row = $res->fetch_array(MYSQLI_BOTH);
MCached::add('main::tracker::toolbar::total::traffic', $row, 300);
}
$dled = 0 + (double) $row["dled"];
$upld = 0 + (double) $row["upld"];
$traffic = misc::makesize($dled + $upld);
?>
<table class='lista' cellpadding='2' cellspacing='0' width='100%'>
<tr>
<td class='lista' align='center'><?php
echo BLOCK_INFO;
?>
:</td>
<td class='lista' align='center'><?php
echo MEMBERS;
?>
:</td><td align='right'><?php
echo $users;
?>
</td>
<td class='lista' align='center'><?php
示例15: block_begin
exit;
}
}
block_begin(DELETE_TORRENT);
print "<table width='100%' class='lista' border='0' cellspacing='5' cellpadding='5'>\n";
print "<tr><td align='right' class='header'>" . FILE_NAME . ":</td><td class='lista'>" . security::html_safe($row["filename"]) . "</td></tr>";
print "<tr><td align='right' class='header'>" . INFO_HASH . ":</td><td class='lista'>" . security::html_safe($row["info_hash"]) . "</td></tr>";
if (!empty($row["comment"])) {
print "<tr><td align='right' class='header'>" . DESCRIPTION . ":</td><td align='left' class='lista'>" . format_comment(unesc($row["comment"])) . "</td></tr>";
}
if (isset($row["cat_name"])) {
print "<tr><td align='right' class='header'>" . CATEGORY_FULL . ":</td><td class='lista'>" . security::html_safe($row["cat_name"]) . "</td></tr>";
} else {
print "<tr><td align='right' class='header'>" . CATEGORY_FULL . ":</td><td class='lista'>(None)</td></tr>";
}
print "<tr><td align='right' class='header'>" . SIZE . ":</td><td class='lista'>" . misc::makesize((int) $row["size"]) . "</td></tr>";
print "<tr><td align='right' class='header'>" . ADDED . ":</td><td class='lista'>" . date("d/m/Y H:m:s", $row["data"]) . "</td></tr>";
if ($row["speed"] < 0) {
$speed = "N/A";
} else {
if ($row["speed"] > 2097152) {
$speed = round((int) $row["speed"] / 1048576, 2) . " MiB per sec";
} else {
$speed = round((int) $row["speed"] / 1024, 2) . " KiB per sec";
}
}
print "<tr><td align='right' class='header'>" . SPEED . ":</td><td class='lista'>" . $speed . "</td></tr>";
print "<tr><td align='right' class='header'>" . DOWNLOADED . ":</td><td class='lista'>" . (int) $row["finished"] . "</td></tr>";
print "<tr><td align='right' class='header'>" . PEERS . ":</td><td class='lista'>" . SEEDERS . ": " . (int) $row["seeds"] . ", " . LEECHERS . ": " . (int) $row["leechers"] . " = " . ((int) $row["leechers"] + (int) $row["seeds"]) . " " . PEERS . "</td></tr>";
print "</table>\n";
print "<form action='" . $scriptname . "?info_hash=" . $id . "&returnto=" . $link . "' name='delete' method='post'>";