function etime($txt = '') { global $TEST_TIME; $stop_time = gettime(); $diff_time = substr($stop_time - $TEST_TIME, 0, 8); global $TTALL; if ($diff_time < 1) { $TTALL += $diff_time; } echo $txt . ': ' . $diff_time . ' (' . $TTALL . ')<br/>'; }
function write_sessions(){ // $database = 'fscontent'; // $host = 'localhost'; // $user = '******'; // $password = ''; $database = $GLOBALS["database"];; $host = $GLOBALS["host"]; $user = $GLOBALS["user"]; $password = $GLOBALS["password"]; $i = 0; //print('Database:'.$database.', Host:'.$host.', User:.'.$user.', Password:'******'<a href="reportes.php?session_id='.$row['ID'].'">'.gettime($row['ID']).'</a>';?></td> <td><?echo $row['PARTICION'];?></td> <td><?echo $row['TIEMPO_ANALISIS'];?> s</td> <td><?echo $row['NUM_ELEMENTOS'];?></td> <td><?echo $row['NUM_INSERCIONES'];?></td> </tr> <? $i++; } }
public function info() { $itemid = I('get.id'); //项目详情 $info = D('User/item')->getInfo(array('a.id' => $itemid, 'a.status' => 1)); if (!$info) { $this->error('缺少参数!'); } $info['last_time'] = gettime($info['end_time'] - time()); $info['content'] = htmlspecialchars_decode($info['content']); $info['success_rate'] = D('User/ItemWithOrder')->successRate($itemid); // 完成率 $info['count_money'] = D('User/ItemWithOrder')->countMoney($itemid); // 现已融资 $info['invest_money'] = $info['raising_money'] - $info['has_investment']; //投资方共融资 $this->iteminfo = $info; //面包屑导航组装 $bread = '<ul class="x12 bread padding-big-top"> <li><a href="' . __ROOT__ . '/" class="icon-home"> 首页</a></li> <li><a href="' . item_category($info['cid'], 'url') . '">' . item_category($info['cid'], 'name') . '</a></li> </ul>'; $this->bread = $bread; //问答内容 $questionsList = D('Home/ItemQuestions')->loadList(array('itemid' => $itemid)); foreach ($questionsList as $key => $value) { $questionsList[$key]['u_name'] = user($value['uin'], 'name'); $questionsList[$key]['header'] = user($value['uin'], 'header'); } $this->questionsList = $questionsList; //投资列表 $this->invest = D('User/ItemWithOrder')->loadList(array('a.itemid' => $itemid)); //项目动态 $itemLog = M('item_log')->where(array('itemid' => $itemid))->select(); $this->log = $itemLog; //领投人列表 $leadUser = D('User/ItemLeadUser')->loadList(array('a.itemid' => $itemid)); foreach ($leadUser as $key => $value) { $leadUser[$key]['countmoney'] = D('User/ItemWithOrder')->countMoney($itemid, $value['uin']); } //视频列表 $this->video = D('User/ItemVideo')->loadList($itemid, 'RIGHT'); $this->leaduser = $leadUser; $this->display(); }
} else { $user = $CURUSER; } if ($user["status"] == "pending") { stderr($lang_userdetails['std_sorry'], $lang_userdetails['std_user_not_confirmed']); } if ($user[added] == "0000-00-00 00:00:00") { $joindate = $lang_userdetails['text_not_available']; } else { $joindate = $user[added] . " (" . gettime($user["added"], true, false, true) . ")"; } $lastseen = $user["last_access"]; if ($lastseen == "0000-00-00 00:00:00") { $lastseen = $lang_userdetails['text_not_available']; } else { $lastseen .= " (" . gettime($lastseen, true, false, true) . ")"; } $res = sql_query("SELECT COUNT(*) FROM comments WHERE user="******"SELECT COUNT(*) FROM posts WHERE userid=" . $user[id]) or sqlerr(); $arr3 = mysql_fetch_row($res); $forumposts = $arr3[0]; $arr = get_country_row($user[country]); $country = "<img src=\"pic/flag/" . $arr[flagpic] . "\" alt=\"" . $arr[name] . "\" style='margin-left: 8pt' />"; $arr = get_downloadspeed_row($user[download]); $download = "<img class=\"speed_down\" src=\"pic/trans.gif\" alt=\"Downstream Rate\" title=\"" . $lang_userdetails['title_download'] . $arr[name] . "\" /> " . $arr[name]; $arr = get_uploadspeed_row($user[upload]); $upload = "<img class=\"speed_up\" src=\"pic/trans.gif\" alt=\"Upstream Rate\" title=\"" . $lang_userdetails['title_upload'] . $arr[name] . "\" /> " . $arr[name]; $arr = get_isp_row($user[isp]); $isp = $arr[name];
function gen_footer() { $f2 = ''; // profilirovanie scenarija: global $TIME_START; $stop_time = gettime(); $diff_time = substr($stop_time - $TIME_START, 0, 6); $f2 .= '<p><small>' . $diff_time . 'сек.</small></p>'; $f2 .= '<div class="y" id="ladh654">©_himura_</div>'; $f2 .= '</body></html>'; // pqjanstvo global $AFF; if (is_in('pqjan', $AFF)) { global $f; $c = strlen($f); $sym = array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9'); //for ($i = 0; $i < $c; $i++) // if ($f[$i] >= 'А' && $f[$i] <= 'Я' || $f[$i] >= 'а' && $f[$i] <= 'я') $f[$i] = $sym[((int)$f[$i] % 10)]; $temp = $f; $temp = str_replace('Э', '0', $temp); $temp = str_replace('Ю', '1', $temp); $temp = str_replace('Я', '2', $temp); $temp = str_replace('Ж', '3', $temp); $temp = str_replace('Ч', '4', $temp); $temp = str_replace('Ш', '5', $temp); $temp = str_replace('Ц', '6', $temp); $temp = str_replace('э', '7', $temp); $temp = str_replace('ю', '8', $temp); $temp = str_replace('Я', '9', $temp); $temp = str_replace('ж', '0', $temp); $temp = str_replace('ч', '1', $temp); $temp = str_replace('ш', '2', $temp); $temp = str_replace('щ', '3', $temp); $temp = str_replace('б', '4', $temp); $temp = str_replace('в', '5', $temp); $temp = str_replace('г', '6', $temp); $temp = str_replace('д', '7', $temp); $temp = str_replace('з', '8', $temp); $temp = str_replace('й', '9', $temp); $temp = str_replace('л', '0', $temp); $temp = str_replace('м', '1', $temp); $temp = str_replace('н', '2', $temp); $temp = str_replace('п', '3', $temp); $temp = str_replace('р', '4', $temp); $temp = str_replace('т', '5', $temp); $temp = str_replace('ф', '6', $temp); $temp = str_replace('ц', '7', $temp); $temp = str_replace('ъ', '8', $temp); $temp = str_replace('у', '9', $temp); $temp = str_replace('ь', '0', $temp); $temp = str_replace('Б', '1', $temp); $temp = str_replace('В', '2', $temp); $temp = str_replace('Г', '3', $temp); $temp = str_replace('Д', '4', $temp); $temp = str_replace('З', '5', $temp); $temp = str_replace('И', '6', $temp); $temp = str_replace('Й', '7', $temp); $temp = str_replace('Л', '8', $temp); $temp = str_replace('П', '9', $temp); $temp = str_replace('Р', '0', $temp); $temp = str_replace('Ф', '1', $temp); $temp = str_replace('Ц', '2', $temp); $temp = str_replace('Ъ', '3', $temp); $temp = str_replace('Ы', '4', $temp); $temp = str_replace('Ь', '5', $temp); $temp = str_replace('у', '6', $temp); $temp = str_replace('и', '7', $temp); $temp = str_replace('с', '8', $temp); $temp = str_replace('х', '9', $temp); $temp = str_replace('У', '0', $temp); $temp = str_replace('С', '1', $temp); $temp = str_replace('Х', '2', $temp); $temp = str_replace('Н', '3', $temp); $f = $temp; } global $dbcnx; mysql_close($dbcnx); return $f2; }
//print("<tr><td class=colhead align=center>".$lang_log['text_previous_polls']."</td></tr>\n"); function srt($a, $b) { if ($a[0] > $b[0]) { return -1; } if ($a[0] < $b[0]) { return 1; } return 0; } while ($poll = mysql_fetch_assoc($polls)) { $o = array($poll["option0"], $poll["option1"], $poll["option2"], $poll["option3"], $poll["option4"], $poll["option5"], $poll["option6"], $poll["option7"], $poll["option8"], $poll["option9"], $poll["option10"], $poll["option11"], $poll["option12"], $poll["option13"], $poll["option14"], $poll["option15"], $poll["option16"], $poll["option17"], $poll["option18"], $poll["option19"]); print "<tr><td align=center>\n"; print "<p class=sub>"; $added = gettime($poll['added'], true, false); print $added; if (get_user_class() >= $pollmanage_class) { print " - [<a href=makepoll.php?action=edit&pollid={$poll['id']}><b>" . $lang_log['text_edit'] . "</b></a>]\n"; print " - [<a href=?action=poll&do=delete&pollid={$poll['id']}><b>" . $lang_log['text_delete'] . "</b></a>]\n"; } print "<a name={$poll['id']}>"; print "</p>\n"; print "<table class=main border=1 cellspacing=0 cellpadding=5><tr><td class=text>\n"; print "<p align=center><b>" . $poll["question"] . "</b></p>"; $pollanswers = sql_query("SELECT selection FROM pollanswers WHERE pollid=" . $poll["id"] . " AND selection < 20") or sqlerr(); $tvotes = mysql_num_rows($pollanswers); $vs = array(); // count for each option ([0]..[19]) $os = array(); // votes and options: array(array(123, "Option 1"), array(45, "Option 2"))
function rr_post_vars() { global $soa, $rr_active_types; $rr = array(); $rr['id'] = (int) postvar('id'); $rr['active'] = $rr_active_types[gettrinary(postvar('active'))]; $rr['serial'] = postvar('serial'); $rr['stamp'] = postvar('stamp'); $rr['name'] = trim(postvar('name')); $rr['ttl'] = gettime(postvar('ttl')); $rr['type'] = strtoupper(trim(postvar('type'))); $rr['aux'] = (int) postvar('aux'); $rr['data'] = trim(postvar('data')); if (!strlen($rr['name'])) { $rr['name'] = $soa['origin']; } return $rr; }
<script src="curtain_imageresizer.js" type="text/javascript"></script><style type="text/css">body {overflow-y:scroll; overflow-x: hidden}</style> </head><body class='inframe'> <?php print get_style_addicode(); if (!($row = $Cache->get_value('current_fun_content'))) { $result = sql_query("SELECT fun.*, IF(ADDTIME(added, '1 0:0:0') < NOW(),true,false) AS neednew FROM fun WHERE status != 'banned' AND status != 'dull' ORDER BY added DESC LIMIT 1") or sqlerr(__FILE__, __LINE__); $row = mysql_fetch_array($result); $Cache->cache_value('current_fun_content', $row, 1043); } if ($row) { $title = $row['title']; $username = get_username($row["userid"], false, true, true, true, false, false, "", false); if ($CURUSER['timetype'] != 'timealive') { $time = $lang_fun['text_on'] . $row['added']; } else { $time = $lang_fun['text_blank'] . gettime($row['added'], true, false); } $Cache->new_page('current_fun', 874, true); if (!$Cache->get_page()) { $Cache->add_row(); $Cache->add_part(); print "<table border=0 cellspacing=0 cellpadding=2 width='100%'><tr><td class=shoutrow align=center><font class=big>" . $title . "</font><font class=small>" . $lang_fun['text_posted_by']; $Cache->end_part(); $Cache->add_part(); print "</font></td></tr><tr><td class=shoutrow>\n"; print format_comment($row['body'], true, true, true) . "</td></tr></table>"; $Cache->end_part(); $Cache->end_row(); $Cache->cache_page(); } while ($Cache->next_row()) {
begin_frame(); while ($arr = mysql_fetch_assoc($res)) { $commentid = $arr["id"]; $torrent = $arr["name"]; // make sure the line doesn't wrap if (strlen($torrent) > 55) { $torrent = substr($torrent, 0, 52) . "..."; } $torrentid = $arr["t_id"]; //find the page; this code should probably be in details.php instead $subres = sql_query("SELECT COUNT(*) FROM comments WHERE torrent = {$torrentid} AND id < {$commentid}") or sqlerr(__FILE__, __LINE__); $subrow = mysql_fetch_row($subres); $count = $subrow[0]; $comm_page = floor($count / 20); $page_url = $comm_page ? "&page={$comm_page}" : ""; $added = gettime($arr["added"], true, false, false); print "<p class=sub><table border=0 cellspacing=0 cellpadding=0><tr><td class=embedded>" . "{$added} --- " . $lang_userhistory['text_torrent'] . ($torrent ? "<a href=details.php?id={$torrentid}&tocomm=1&hit=1>{$torrent}</a>" : " [Deleted] ") . " --- " . $lang_userhistory['text_comment'] . "</b>#<a href=details.php?id={$torrentid}&tocomm=1&hit=1{$page_url}>{$commentid}</a>\n\t </td></tr></table></p>\n"; print "<br />"; print "<table class=main width=100% border=1 cellspacing=0 cellpadding=5>\n"; $body = format_comment($arr["text"]); print "<tr valign=top><td class=comment>{$body}</td></tr>\n"; print "</td></tr></table>\n"; print "<br />"; } end_frame(); end_main_frame(); if ($commentcount > $perpage) { echo $pagerbottom; } stdfoot(); die;
} break; case "subtitle": $type = $lang_reports['text_subtitle']; $res = sql_query("SELECT id, torrent_id, title FROM subs WHERE id=" . sqlesc($row['reportid'])); if (mysql_num_rows($res) == 0) { $reporting = $lang_reports['text_subtitle_does_not_exist']; } else { $arr = mysql_fetch_array($res); $reporting = "<a href=\"downloadsubs.php?torrentid=" . $arr['torrent_id'] . "&subid=" . $arr['id'] . "\">" . htmlspecialchars($arr['title']) . "</a>" . $lang_reports['text_for_torrent_id'] . "<a href=\"details.php?id=" . $arr['torrent_id'] . "\">" . $arr['torrent_id'] . "</a>"; } break; default: break; } print "<tr><td class=rowfollow><nobr>" . gettime($row['added']) . "</nobr></td><td class=rowfollow>" . get_username($row['addedby']) . "</td><td class=rowfollow>" . $reporting . "</td><td class=rowfollow><nobr>" . $type . "</nobr></td><td class=rowfollow>" . htmlspecialchars($row['reason']) . "</td><td class=rowfollow><nobr>" . $dealtwith . "</nobr></td><td class=rowfollow><input type=\"checkbox\" name=\"delreport[]\" value=\"" . $row[id] . "\" /></td></tr>\n"; } ?> <tr><td class="colhead" colspan="7" align="right"><input type="submit" name="setdealt" value="<?php echo $lang_reports['submit_set_dealt']; ?> " /><input type="submit" name="delete" value="<?php echo $lang_reports['submit_delete']; ?> " /></td></tr> </form> <?php print "</table>"; print $pagerbottom; end_main_frame(); stdfoot();
$s .= "</table>\n"; tr("<a href=\"javascript: klappe_news('othercopy')\"><span class=\"nowrap\"><img class=\"" . ($copies_count > 5 ? "plus" : "minus") . "\" src=\"pic/trans.gif\" alt=\"Show/Hide\" id=\"picothercopy\" title=\"" . $lang_detail['title_show_or_hide'] . "\" /> " . $lang_details['row_other_copies'] . "</span></a>", "<b>" . $copies_count . $lang_details['text_other_copies'] . " </b><br /><div id='kothercopy' style=\"" . ($copies_count > 5 ? "display: none;" : "display: block;") . "\">" . $s . "</div>", 1); } } if ($row["type"] == "multi") { $files_info = "<b>" . $lang_details['text_num_files'] . "</b>" . $row["numfiles"] . $lang_details['text_files'] . "<br />"; $files_info .= "<span id=\"showfl\"><a href=\"javascript: viewfilelist(" . $id . ")\" >" . $lang_details['text_see_full_list'] . "</a></span><span id=\"hidefl\" style=\"display: none;\"><a href=\"javascript: hidefilelist()\">" . $lang_details['text_hide_list'] . "</a></span>"; } function hex_esc($matches) { return sprintf("%02x", ord($matches[0])); } if ($enablenfo_main == 'yes') { tr($lang_details['row_torrent_info'], "<table><tr>" . ($files_info != "" ? "<td class=\"no_border_wide\">" . $files_info . "</td>" : "") . "<td class=\"no_border_wide\"><b>" . $lang_details['row_info_hash'] . ":</b> " . preg_replace_callback('/./s', "hex_esc", hash_pad($row["info_hash"])) . "</td>" . (get_user_class() >= $torrentstructure_class ? "<td class=\"no_border_wide\"><b>" . $lang_details['text_torrent_structure'] . "</b><a href=\"torrent_info.php?id=" . $id . "\">" . $lang_details['text_torrent_info_note'] . "</a></td>" : "") . "</tr></table><span id='filelist'></span>", 1); } tr($lang_details['row_hot_meter'], "<table><tr><td class=\"no_border_wide\"><b>" . $lang_details['text_views'] . "</b>" . $row["views"] . "</td><td class=\"no_border_wide\"><b>" . $lang_details['text_hits'] . "</b>" . $row["hits"] . "</td><td class=\"no_border_wide\"><b>" . $lang_details['text_snatched'] . "</b><a href=\"viewsnatches.php?id=" . $id . "\"><b>" . $row["times_completed"] . $lang_details['text_view_snatches'] . "</td><td class=\"no_border_wide\"><b>" . $lang_details['row_last_seeder'] . "</b>" . gettime($row["last_action"]) . "</td></tr></table>", 1); $bwres = sql_query("SELECT uploadspeed.name AS upname, downloadspeed.name AS downname, isp.name AS ispname FROM users LEFT JOIN uploadspeed ON users.upload = uploadspeed.id LEFT JOIN downloadspeed ON users.download = downloadspeed.id LEFT JOIN isp ON users.isp = isp.id WHERE users.id=" . $row['owner']); $bwrow = mysql_fetch_array($bwres); if ($bwrow['upname'] && $bwrow['downname']) { tr($lang_details['row_uploader_bandwidth'], "<img class=\"speed_down\" src=\"pic/trans.gif\" alt=\"Downstream Rate\" /> " . $bwrow['downname'] . " <img class=\"speed_up\" src=\"pic/trans.gif\" alt=\"Upstream Rate\" /> " . $bwrow['upname'] . " " . $bwrow['ispname'], 1); } /* // Health $seedersTmp = $row['seeders']; $leechersTmp = $row['leechers']; if ($leechersTmp >= 1) // it is possible that there's traffic while have no seeders { $progressPerTorrent = 0; $i = 0; $subres = sql_query("SELECT seeder, finishedat, downloadoffset, uploadoffset, ip, port, uploaded, downloaded, to_go, UNIX_TIMESTAMP(started) AS st, connectable, agent, peer_id, UNIX_TIMESTAMP(last_action) AS la, userid FROM peers WHERE torrent = $row[id]") or sqlerr();
$smarty->assign("page_title", @$page_title); $smarty->assign("meta_keywords", @$meta_keywords); $smarty->assign("meta_description", @$meta_description); if (!empty($_COOKIE['order_later'])) { $productsOrderLater = @unserialize($_COOKIE['order_later']); if (!empty($productsOrderLater)) { $smarty->assign('order_later_count', count($productsOrderLater)); $smarty->assign('order_later_array', $productsOrderLater); } } if (!empty($page_content['id'])) { $files_list = $db->get_all("SELECT id,ext,title FROM fw_tree_files WHERE parent='" . $page_content['id'] . "'"); $smarty->assign("files_list", $files_list); } /*-------------------пїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ-------------------- */ $t_endtime = gettime(); $t_result = $t_endtime - $t_starttime; $pgt = substr($t_result, 0, 5); /*----------пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅпїЅпїЅ пїЅпїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅ--------- */ if ($deny_access) { $template = BASE_PATH . '/templates/access_denided.html'; } elseif ($page_found) { $template = BASE_PATH . '/modules/' . $module_name . '/front/templates/' . $template; } else { //$template=BASE_PATH.'/templates/404.html'; $main_template = BASE_PATH . '/templates/404.html'; //$navigation[]=array("url"=>"/","title"=>"пїЅпїЅпїЅпїЅпїЅпїЅ 404. пїЅпїЅпїЅпїЅпїЅпїЅпїЅпїЅ пїЅпїЅ пїЅпїЅпїЅпїЅпїЅпїЅпїЅ"); } $temp = ''; //print_r($navigation); for ($i = 0; $i < count($navigation); $i++) {
<td width="50%" class="colhead" align="left"><?php echo $from; ?> </td> <td width="50%" class="colhead" align="left"><?php echo $lang_messages['col_date']; ?> </td> </tr> <tr> <td class="rowfollow" align="left"><?php echo $sender; ?> </td> <td class="rowfollow" align="left"><?php echo gettime($added, true, false); ?> <?php echo $unread; ?> </td> </tr> <tr> <td colspan="2" align="left"><?php echo $body; ?> </td> </tr> <tr> <td align=left> <?php
if (isUserLoggedIn()) { echo '<meta http-equiv="refresh" content="0; URL=index.php?page=account">'; die; } if (isLoginDisabled()) { echo "Logins are currently disabled."; } else { if (!empty($_POST)) { if ($_SESSION["Login_Attempts"] > 4) { $account = mysql_real_escape_string(strip_tags($loggedInUser->display_username)); $uagent = mysql_real_escape_string(getuseragent()); //get user agent $ip = mysql_real_escape_string(getIP()); //get user ip if (isUserLoggedIn) { if ($account != null) { $account = mysql_real_escape_string($loggedInUser->display_username); } else { $account = mysql_real_escape_string("Guest/Not Logged In"); } } $date = mysql_real_escape_string(gettime()); $sql = @mysql_query("INSERT INTO access_violations (username, ip, user_agent, time) VALUES ('{$account}', '{$ip}', '{$uagent}', '{$date}');"); $captcha = md5($_POST["captcha"]); if ($captcha != $_SESSION['captcha']) { $errors[] = lang("CAPTCHA_FAIL"); } } $errors = array(); $username = trim($_POST["username"]); $password = trim($_POST["password"]);
print "<br />"; print "<h2 align=left><a name=\"friends\">" . $lang_friends['text_friendlist'] . "</a></h2>\n"; print "<table width=737 border=1 cellspacing=0 cellpadding=5><tr class=tablea><td>"; $i = 0; unset($friend_id_arr); $res = sql_query("SELECT f.friendid as id, u.last_access, u.class, u.avatar, u.title FROM friends AS f LEFT JOIN users as u ON f.friendid = u.id WHERE userid={$userid} ORDER BY id") or sqlerr(__FILE__, __LINE__); if (mysql_num_rows($res) == 0) { $friends = $lang_friends['text_friends_empty']; } else { while ($friend = mysql_fetch_array($res)) { $friend_id_arr[] = $friend["id"]; $title = $friend["title"]; if (!$title) { $title = get_user_class_name($friend["class"], false, true, true); } $body1 = get_username($friend["id"]) . " ({$title})<br /><br />" . $lang_friends['text_last_seen_on'] . gettime($friend['last_access'], true, false); $body2 = "<a href=friends.php?id={$userid}&action=delete&type=friend&targetid=" . $friend['id'] . ">" . $lang_friends['text_remove_from_friends'] . "</a>" . "<br /><br /><a href=sendmessage.php?receiver=" . $friend['id'] . ">" . $lang_friends['text_send_pm'] . "</a>"; $avatar = $CURUSER["avatars"] == "yes" ? htmlspecialchars($friend["avatar"]) : ""; if (!$avatar) { $avatar = "pic/default_avatar.png"; } if ($i % 2 == 0) { print "<table width=100% style='padding: 0px'><tr><td class=bottom style='padding: 5px' width=50% align=center>"; } else { print "<td class=bottom style='padding: 5px' width=50% align=center class=tablea>"; } print "<table class=main width=100% height=75px class=tablea>"; print "<tr valign=top class=tableb><td width=75 align=center style='padding: 0px'>" . ($avatar ? "<div style='width:75px;height:75px;overflow: hidden'><img width=75px src=\"{$avatar}\"></div>" : "") . "</td><td>\n"; print "<table class=main>"; print "<tr><td class=embedded style='padding: 5px' width=80%>{$body1}</td>\n"; print "<td class=embedded style='padding: 5px' width=20%>{$body2}</td></tr>\n";
function supply_snatchtable($res, $frame_caption) { global $lang_topten; global $CURUSER; global $lang_topten; begin_frame($frame_caption, true); begin_table(); ?> <tr> <td class="colhead"><?php echo $lang_topten['col_rank']; ?> </td> <td class="colhead" align="left"> <?php echo $lang_topten['col_user']; ?> </td> <td class="colhead" align="left"> <?php echo $lang_topten['col_torrent_uploaded']; ?> </td> <td class="colhead"> <?php echo $lang_topten['col_uploaded']; ?> </td> <td class="colhead" align="left"> <?php echo $lang_topten['col_torrent_downloaded']; ?> </td> <td class="colhead"> <?php echo $lang_topten['col_downloaded']; ?> </td> <td class="colhead" align="right"> <?php echo $lang_topten['col_ratio']; ?> </td> <td class="colhead" align="left"> <?php echo $lang_topten['col_joined']; ?> </td> </tr> <?php $num = 0; while ($a = mysql_fetch_assoc($res)) { ++$num; if ($a["downloaded"]) { $ratio = $a["uploaded"] / $a["downloaded"]; $color = get_ratio_color($ratio); $ratio = number_format($ratio, 2); if ($color) { $ratio = "<font color=\"{$color}\">{$ratio}</font>"; } } else { $ratio = $lang_topten['text_inf']; } print "<tr><td class=\"rowfollow\" align=\"center\">{$num}</td><td class=\"rowfollow\" align=\"left\">" . get_username($a["userid"]) . "</td><td class=\"rowfollow\" align=\"right\">" . number_format($a["supplied"]) . "</td><td class=\"rowfollow\" align=\"right\">" . mksize($a["uploaded"]) . "</td><td class=\"rowfollow\" align=\"right\">" . number_format($a["snatched"]) . "</td><td class=\"rowfollow\" align=\"right\">" . mksize($a["downloaded"]) . "</td><td class=\"rowfollow\" align=\"right\">" . $ratio . "</td><td class=\"rowfollow\" align=\"left\">" . gettime($a["added"]) . "</td></tr>"; } end_table(); end_frame(); }
$addtime = gettime($arr['added'], false, true); $dispname = $arr[name]; $count_dispname = mb_strlen($arr[name], "UTF-8"); $max_length_of_offer_name = 70; if ($count_dispname > $max_length_of_offer_name) { $dispname = mb_substr($dispname, 0, $max_length_of_offer_name - 2, "UTF-8") . ".."; } print "<tr><td class=\"rowfollow\" style=\"padding: 0px\"><a href=\"?category=" . $arr['cat_id'] . "\">" . return_category_image($arr['cat_id'], "") . "</a></td><td style='text-align: left'><a href=\"?id=" . $arr[id] . "&off_details=1\" title=\"" . htmlspecialchars($arr[name]) . "\"><b>" . htmlspecialchars($dispname) . "</b></a>" . ($CURUSER['appendnew'] != 'no' && strtotime($arr["added"]) >= $last_offer ? "<b> (<font class='new'>" . $lang_offers['text_new'] . "</font>)</b>" : "") . $allowed . "</td><td class=\"rowfollow nowrap\" style='padding: 5px' align=\"center\">" . $v_res . "</td><td class=\"rowfollow nowrap\" " . (get_user_class() < $againstoffer_class ? " colspan=\"2\" " : "") . " style='padding: 5px'><a href=\"?id=" . $arr[id] . "&vote=yeah\" title=\"" . $lang_offers['title_i_want_this'] . "\"><font color=\"green\"><b>" . $lang_offers['text_yep'] . "</b></font></a></td>" . (get_user_class() >= $againstoffer_class ? "<td class=\"rowfollow nowrap\" align=\"center\"><a href=\"?id=" . $arr[id] . "&vote=against\" title=\"" . $lang_offers['title_do_not_want_it'] . "\"><font color=\"red\"><b>" . $lang_offers['text_nah'] . "</b></font></a></td>" : ""); print "<td class=\"rowfollow\">" . $comment . "</td><td class=\"rowfollow nowrap\">" . $addtime . "</td>"; if ($offervotetimeout_main > 0 && $offeruptimeout_main > 0) { if ($arr["allowed"] == 'allowed') { $futuretime = strtotime($arr['allowedtime']) + $offeruptimeout_main; $timeout = gettime(date("Y-m-d H:i:s", $futuretime), false, true, true, false, true); } elseif ($arr["allowed"] == 'pending') { $futuretime = strtotime($arr['added']) + $offervotetimeout_main; $timeout = gettime(date("Y-m-d H:i:s", $futuretime), false, true, true, false, true); } if (!$timeout) { $timeout = "N/A"; } print "<td class=\"rowfollow nowrap\">" . $timeout . "</td>"; } print "<td class=\"rowfollow\">" . $addedby . "</td>" . (get_user_class() >= $offermanage_class ? "<td class=\"rowfollow\"><a href=\"?id=" . $arr[id] . "&del_offer=1\"><img class=\"staff_delete\" src=\"pic/trans.gif\" alt=\"D\" title=\"" . $lang_offers['title_delete'] . "\" /></a><br /><a href=\"?id=" . $arr[id] . "&edit_offer=1\"><img class=\"staff_edit\" src=\"pic/trans.gif\" alt=\"E\" title=\"" . $lang_offers['title_edit'] . "\" /></a></td>" : "") . "</tr>"; } print "</table>\n"; echo $pagerbottom; if (!isset($CURUSER) || $CURUSER['showlastcom'] == 'yes') { create_tooltip_container($lastcom_tooltip, 400); } } end_main_frame();
$num = $arr[0]; if (!$num) { stdmsg($lang_subtitles['text_sorry'], $lang_subtitles['text_nothing_here']); stdfoot(); die; } list($pagertop, $pagerbottom, $limit) = pager($perpage, $num, "subtitles.php?" . $q . "&"); print $pagertop; $i = 0; $res = sql_query("SELECT subs.*, language.flagpic, language.lang_name FROM subs LEFT JOIN language ON subs.lang_id=language.id {$query} ORDER BY id DESC {$limit}") or sqlerr(); print "<table width=940 border=1 cellspacing=0 cellpadding=5>\n"; print "<tr><td class=colhead>" . $lang_subtitles['col_lang'] . "</td><td width=100% class=colhead align=center>" . $lang_subtitles['col_title'] . "</td><td class=colhead align=center><img class=\"time\" src=\"pic/trans.gif\" alt=\"time\" title=\"" . $lang_subtitles['title_date_added'] . "\" /></td>\n\t\t<td class=colhead align=center><img class=\"size\" src=\"pic/trans.gif\" alt=\"size\" title=\"" . $lang_subtitles['title_size'] . "\" /></td><td class=colhead align=center>" . $lang_subtitles['col_hits'] . "</td><td class=colhead align=center>" . $lang_subtitles['col_upped_by'] . "</td><td class=colhead align=center>" . $lang_subtitles['col_report'] . "</td></tr>\n"; $mod = get_user_class() >= $submanage_class; $pu = get_user_class() >= $delownsub_class; while ($arr = mysql_fetch_assoc($res)) { // the number $start_subid is just for legacy support of prevoiusly uploaded subs, if the site is completely new, it should be 0 or just remove it $lang = "<td class=rowfollow align=center valign=middle>" . "<img border=\"0\" src=\"pic/flag/" . $arr["flagpic"] . "\" alt=\"" . $arr["lang_name"] . "\" title=\"" . $arr["lang_name"] . "\"/>" . "</td>\n"; $title = "<td class=rowfollow align=left><a href=\"" . ($arr['id'] <= $start_subid ? "downloadsubs_legacy.php/" . $arr['filename'] : "downloadsubs.php?torrentid=" . $arr['torrent_id'] . "&subid=" . $arr['id']) . "\"<b>" . htmlspecialchars($arr["title"]) . "</b></a>" . ($mod || $pu && $arr["uppedby"] == $CURUSER["id"] ? " <font class=small><a href=?delete={$arr['id']}>" . $lang_subtitles['text_delete'] . "</a></font>" : "") . "</td>\n"; $addtime = gettime($arr["added"], false, false); $added = "<td class=rowfollow align=center><nobr>" . $addtime . "</nobr></td>\n"; $size = "<td class=rowfollow align=center>" . mksize_loose($arr['size']) . "</td>\n"; $hits = "<td class=rowfollow align=center>" . number_format($arr['hits']) . "</td>\n"; $uppedby = "<td class=rowfollow align=center>" . ($arr["anonymous"] == 'yes' ? $lang_subtitles['text_anonymous'] . (get_user_class() >= $viewanonymous_class ? "<br />" . get_username($arr['uppedby'], false, true, true, false, true) : "") : get_username($arr['uppedby'])) . "</td>\n"; $report = "<td class=rowfollow align=center><a href=\"report.php?subtitle={$arr['id']}\"><img class=\"f_report\" src=\"pic/trans.gif\" alt=\"Report\" title=\"" . $lang_subtitles['title_report_subtitle'] . "\" /></a></td>\n"; print "<tr>" . $lang . $title . $added . $size . $hits . $uppedby . $report . "</tr>\n"; $i++; } print "</table>\n"; print $pagerbottom; } stdfoot();
$ratio = $lang_viewsnatches['text_inf']; } else { $ratio = "---"; } $uploaded = mksize($arr["uploaded"]); $downloaded = mksize($arr["downloaded"]); $seedtime = mkprettytime($arr["seedtime"]); $leechtime = mkprettytime($arr["leechtime"]); $uprate = $arr["seedtime"] > 0 ? mksize($arr["uploaded"] / ($arr["seedtime"] + $arr["leechtime"])) : mksize(0); $downrate = $arr["leechtime"] > 0 ? mksize($arr["downloaded"] / $arr["leechtime"]) : mksize(0); //end $highlight = $CURUSER["id"] == $arr["userid"] ? " bgcolor=#00A527" : ""; $userrow = get_user_row($arr['userid']); if ($userrow['privacy'] == 'strong') { $username = $lang_viewsnatches['text_anonymous']; if (get_user_class() >= $viewanonymous_class || $arr["id"] == $CURUSER['id']) { $username .= "<br />(" . get_username($arr[userid]) . ")"; } } else { $username = get_username($arr[userid]); } $reportImage = "<img class=\"f_report\" src=\"pic/trans.gif\" alt=\"Report\" title=\"" . $lang_viewsnatches['title_report'] . "\" />"; print "<tr{$highlight}><td class=rowfollow align=center>" . $username . "</td>" . (get_user_class() >= $userprofile_class ? "<td class=rowfollow align=center>" . $arr[ip] . "</td>" : "") . "<td class=rowfollow align=center>" . $uploaded . "@" . $uprate . $lang_viewsnatches['text_per_second'] . "<br />" . $downloaded . "@" . $downrate . $lang_viewsnatches['text_per_second'] . "</td><td class=rowfollow align=center>{$ratio}</td><td class=rowfollow align=center>{$seedtime}</td><td class=rowfollow align=center>{$leechtime}</td><td class=rowfollow align=center>" . gettime($arr[completedat], true, false) . "</td><td class=rowfollow align=center>" . gettime($arr[last_action], true, false) . "</td><td class=rowfollow align=center style='padding: 0px'>" . ($userrow['privacy'] != 'strong' || get_user_class() >= $viewanonymous_class ? "<a href=report.php?user={$arr['userid']}>{$reportImage}</a>" : $reportImage) . "</td></tr>\n"; } print "</table>\n"; print $pagerbottom; } else { stdmsg($lang_viewsnatches['std_sorry'], $lang_viewsnatches['std_no_snatched_users']); } end_main_frame(); stdfoot();
echo '<form method="get" action="" class="well form-search"> <input class="input-medium search-query" type="text" placeholder="Search Query" name="search" value="' . $q . '"> <button class="btn primary" type="submit">Search</button> </form>'; if ($count == '0') { echo "<section>No results found for {$q}</section>"; } else { $query = "SELECT STRAIGHT_JOIN temp_predb.rel_name, temp_predb.rel_section, temp_predb.rel_time, temp_predb.rel_size, temp_predb.rel_files, " . "temp_predb.rel_genre, nfo.id AS nfoid, sfv.id AS sfvid, m3u.id AS m3uid, nukes.n_reason AS nreason , unnukes.un_reason AS unreason, " . "delpre.d_reason AS dreason, delpre.readded AS undel " . "FROM temp_predb " . "LEFT JOIN nukes ON temp_predb.rel_id = nukes.rel_id " . "LEFT JOIN unnukes ON temp_predb.rel_id = unnukes.rel_id " . "LEFT JOIN delpre ON temp_predb.rel_id = delpre.rel_id " . "LEFT JOIN nfo ON temp_predb.rel_name = nfo.rel_name " . "LEFT JOIN sfv ON temp_predb.rel_name = sfv.rel_name " . "LEFT JOIN m3u ON temp_predb.rel_name = m3u.rel_name " . "ORDER BY temp_predb.rel_time DESC LIMIT 0, 100"; $res = mysql_query($query) or die(mysql_error()); $svar = $q != '' ? $count == 100 ? "<p>Displaying {$count} Search Results found for {$q}. Limited to 100 results re-define your search.</p>" : "<p>Displaying {$count} Search Results found for {$q}.</p>" : ''; echo "<section>{$svar}\n\t\t<table class='zebra-striped'>\n\t\t\t<thead>\n\t\t\t <tr>\n\t\t\t\t<th>Section</th>\n\t\t\t\t<th>Added</th>\n\t\t\t\t<th>Release Name</th>\n\t\t\t\t<th>Info</th>\n\t\t\t </tr>\n\t\t\t</thead>\n\t\t\t<tbody>"; while ($row = mysql_fetch_assoc($res)) { $nuked = $row['nreason'] != '' ? "<a href='#' title={$row['nreason']}><span class='label important'>NUKED</span></a> " : ''; $unnuked = $row['unreason'] != '' ? "<a href='#' title={$row['unreason']}><span class='label success'>UNNUKED</span></a> " : ''; $delpre = $row['dreason'] != '' && $row['undel'] == 'N' ? "<a href='#' title={$row['dreason']}><span class='label important'>DELETED</span></a> " : ''; $undelpre = $row['undel'] == 'Y' ? "<a href='#' title={$row['dreason']}><span class='label success'>UNDELETED</span></a> " : ''; $nfo = $row['nfoid'] != '' ? "<a href='get.php?type=nfo&id={$row['nfoid']}' title='Download NFO'><span class='label warning'>NFO</span></a> " : ''; $sfv = $row['sfvid'] != '' ? "<a href='get.php?type=sfv&id={$row['sfvid']}' title='Download SFV'><span class='label notice'>SFV</span></a> " : ''; $m3u = $row['m3uid'] != '' ? "<a href='get.php?type=m3u&id={$row['m3uid']}' title='Download M3U'><span class='label'>M3U</span></a> " : ''; $genre = $row['rel_genre'] == '' ? '' : "Genre: " . $row['rel_genre']; echo "<tr>"; echo "<td>{$row['rel_section']}</td>"; echo "<td><a href='#' title='Pred " . gettime($row['rel_time']) . " ago' rel='tooltip'>" . get_date_time($row['rel_time']) . "</a></td>"; echo "<td><a href='#' title='" . $row['rel_name'] . "' rel='tooltip'>" . CutName($row['rel_name']) . "</a> " . $nuked . $unnuked . $delpre . $undelpre . "<br />" . $nfo . $sfv . $m3u . $genre . "</td>"; echo "<td><b>{$row['rel_files']}</b>F in <b>{$row['rel_size']}</b>MB</td>"; echo "</tr>"; } echo "</tbody></table></section>"; } mysql_query("TRUNCATE TABLE temp_predb") or die(mysql_error()); echo stdfoot();
$SFVres = mysql_query("SELECT sfv_data FROM `sfvdb` WHERE `sfv_rlsname` = " . sqlesc($rlsname)) or die(mysql_error()); $SFVrow = mysql_fetch_assoc($SFVres); if ($SFVrow != '') { $sfv = $SFVrow['sfv_data'] != '' ? "<a class=\"btn\" href='get.php?t=2&h=" . $hash . "' rel='tooltip' title='Download SFV'><span class='label label-info'><i class=\"icon-download-alt\"></i> SFV</span></a> " : ''; } $M3Ures = mysql_query("SELECT m3u_data FROM `m3udb` WHERE `m3u_rlsname` = " . sqlesc($rlsname)) or die(mysql_error()); $M3Urow = mysql_fetch_assoc($M3Ures); if ($M3Urow != '') { $m3u = $M3Urow['m3u_data'] != '' ? "<a class=\"btn\" href='get.php?t=3&h=" . $hash . "' rel='tooltip' title='Download M3U'><span class='label label-warning'><i class=\"icon-download-alt\"></i> M3U</span></a> " : ''; } echo stdhead('Info', $row['rlsname']); echo '<div class="row">'; echo '<div class="span4">'; echo '<div class="well">'; echo 'Section: <span class="label">' . $row['section'] . '</span><br><br>'; echo 'Pre\'d: <strong>' . gettime($row['unixtime']) . ' ago</strong> (' . get_date_time($row['unixtime']) . ')<br><br>'; echo $row['size'] != 0 && $row['files'] != 0 ? 'Info: <b>' . $row['files'] . '</b>F in <b>' . $row['size'] . '</b>MB<br><br>' : ''; echo $row['genre'] != '' ? 'Genre: ' . $row['genre'] . '<br><br>' : ''; echo $row['nukereason'] != '' && $row['nukestatus'] == 'Nuked' ? "<a href='javascript:;' rel='tooltip' title=\"" . $row['nukereason'] . "/" . $row['nukenet'] . "\"><span class='label label-important'>NUKED</span></a> " : ''; echo $row['nukereason'] != '' && $row['nukestatus'] == 'ModNuked' ? "<a href='javascript:;' rel='tooltip' title=\"" . $row['nukereason'] . "/" . $row['nukenet'] . "\"><span class='label label-important'>MODNUKED</span></a> " : ''; echo $row['nukereason'] != '' && $row['nukestatus'] == 'UnNuked' ? "<a href='javascript:;' rel='tooltip' title=\"" . $row['nukereason'] . "/" . $row['nukenet'] . "\"><span class='label label-success'>UNNUKED</span></a> " : ''; echo $row['nukereason'] != '' && $row['nukestatus'] == 'Deleted' ? "<a href='javascript:;' rel='tooltip' title=\"" . $row['nukereason'] . "/" . $row['nukenet'] . "\"><span class='label label-important'>DELETED</span></a> " : ''; echo $row['nukereason'] != '' && $row['nukestatus'] == 'UnDeleted' ? "<a href='javascript:;' rel='tooltip' title=\"" . $row['nukereason'] . "/" . $row['nukenet'] . "\"><span class='label label-info'>UNDELETED</span></a> " : ''; echo $nfo != '' || $sfv != '' || $m3u != '' ? 'Files: ' . $nfo . $sfv . $m3u : ''; echo '</div>'; echo '</div>'; echo '<div class="span8">'; echo '<div class="well">'; if ($nfo == '' && $sfv == '' && $m3u == '') { echo '<h3>No Files found for this release.</h3>'; } else {
function write_superbloque(){ //start write_superbloque $database = $GLOBALS["database"];; $host = $GLOBALS["host"]; $user = $GLOBALS["user"]; $password = $GLOBALS["password"]; $i = 0; $connection = mysql_connect($host,$user,$password) or die ("Imposible conectar al servidor, verifique que escribio el host correcto"); $db = mysql_select_db($database,$connection) or die ("Imposible seleccionar base de datos, Verifique que escribio el nombre correcto"); $query = "SELECT * FROM superbloque WHERE SESSION_ID = ".$_GET['session_id'].';'; $result = mysql_query($query) or die ("Imposible ejecutar Consulta."); $row = mysql_fetch_array($result); ?> <table style="text-align: left; width: 100%;" border="1" cellpadding="2" cellspacing="2"> <tbody> <tr> <td style="font-weight: bold;" align="left" nowrap="nowrap" valign="middle">Número de Inodos:</td> <td align="left" nowrap="nowrap" valign="middle"><?echo $row['NUM_INODOS'];?></td> </tr> <tr> <td style="font-weight: bold;" align="left" nowrap="nowrap" valign="middle">Número de Bloques:</td> <td align="left" nowrap="nowrap" valign="middle"><?echo $row['NUM_BLOQUES'];?></td> </tr> <tr> <td style="font-weight: bold;" align="left" nowrap="nowrap" valign="middle">Número de Bloques reservados:</td> <td align="left" nowrap="nowrap" valign="middle"><?echo $row['NUM_BLOQUES_RES'];?></td> </tr> <tr> <td style="font-weight: bold;" align="left" nowrap="nowrap" valign="middle">Total de Inodos Libres:</td> <td align="left" nowrap="nowrap" valign="middle"><?echo $row['NUM_BLOQUES_LIBRES'];?></td> </tr> <tr> <td style="font-weight: bold;" align="left" nowrap="nowrap" valign="middle">Primer bloque de datos:</td> <td align="left" nowrap="nowrap" valign="middle"><?echo $row['NUM_INODOS'];?></td> </tr> <tr> <td style="font-weight: bold;" align="left" nowrap="nowrap" valign="middle">Tamaño de Bloques:</td> <td align="left" nowrap="nowrap" valign="middle"><?echo $row['TAM_BLOQUES'];?> bytes</td> </tr> <tr> <td style="font-weight: bold;" align="left" nowrap="nowrap" valign="middle">Tamaño de Fragmento:</td> <td align="left" nowrap="nowrap" valign="middle"><?echo $row['TAM_FRAGMENTO'];?> bytes</td> </tr> <tr> <td style="font-weight: bold;" align="left" nowrap="nowrap" valign="middle">Bloques por Grupo:</td> <td align="left" nowrap="nowrap" valign="middle"><?echo $row['BLOQUES_POR_GRUPO'];?></td> </tr> <tr> <td style="font-weight: bold;" align="left" nowrap="nowrap" valign="middle">Fragmentos por Grupo:</td> <td align="left" nowrap="nowrap" valign="middle"><?echo $row['FRAGMENTOS_POR_GRUPO'];?></td> </tr> <tr> <td style="font-weight: bold;" align="left" nowrap="nowrap" valign="middle">Inodos por Grupo</td> <td align="left" nowrap="nowrap" valign="middle"><?echo $row['INODOS_POR_GRUPO'];?></td> </tr> <tr> <td style="font-weight: bold;" align="left" nowrap="nowrap" valign="middle">Última vez Montado:</td> <td align="left" nowrap="nowrap" valign="middle"><?echo gettime($row['MONTADO_EL']);?></td> </tr> <tr> <td style="font-weight: bold;" align="left" nowrap="nowrap" valign="middle">Última vez Escrito:</td> <td align="left" nowrap="nowrap" valign="middle"><?echo gettime($row['ESCRITO_EL']);?></td> </tr> <tr> <td style="font-weight: bold;" align="left" nowrap="nowrap" valign="middle">Número de veces Montado:</td> <td align="left" nowrap="nowrap" valign="middle"><?echo $row['VECES_MONTADO'];?> veces</td> </tr> <tr> <td style="font-weight: bold;" align="left" nowrap="nowrap" valign="middle">Número Máximo de veces montado para chequeo:</td> <td align="left" nowrap="nowrap" valign="middle"><?echo $row['MAX_VECES_MONTADO'];?> veces</td> </tr> <tr> <td style="font-weight: bold;" align="left" nowrap="nowrap" valign="middle">Número Mágico:</td> <td align="left" nowrap="nowrap" valign="middle"><?echo '0x'.sprintf("%x",$row['MAGIC']);?></td> </tr> <tr> <td style="font-weight: bold;" align="left" nowrap="nowrap" valign="middle">Estado:</td> <td align="left" nowrap="nowrap" valign="middle"><?echo $row['ESTADO'];?></td> </tr> <tr> <td style="font-weight: bold;" align="left" nowrap="nowrap" valign="middle">Comportamiento a Errores:</td> <td align="left" nowrap="nowrap" valign="middle"><?echo $row['COMPORT_ERROR'];?></td> </tr> <tr> <td style="font-weight: bold;" align="left" nowrap="nowrap" valign="middle">Version menor:</td> <td align="left" nowrap="nowrap" valign="middle"><?echo $row['REVISION_MENOR'];?></td> </tr> <tr> <td style="font-weight: bold;" align="left" nowrap="nowrap" valign="middle">Ultima vez chequeado:</td> <td align="left" nowrap="nowrap" valign="middle"><?echo gettime($row['ULTIMO_FSCK']);?></td> </tr> <tr> <td style="font-weight: bold;" align="left" nowrap="nowrap" valign="middle">Intervalo de Chequeo:</td> <td align="left" nowrap="nowrap" valign="middle"><?echo ($row['INTERVALO_FSCK']/3600/24);?> dias</td> </tr> <tr> <td style="font-weight: bold;" align="left" nowrap="nowrap" valign="middle">Sistema Operativo Creador:</td> <td align="left" nowrap="nowrap" valign="middle"><?echo $row['SISTEMA_OPERATIVO'];?></td> </tr> <tr> <td style="font-weight: bold;" align="left" nowrap="nowrap" valign="middle">Version:</td> <td align="left" nowrap="nowrap" valign="middle"><?echo $row['REVISION'];?></td> </tr> <tr> <td style="font-weight: bold;" align="left" nowrap="nowrap" valign="middle">UID predet. de bloques res.</td> <td align="left" nowrap="nowrap" valign="middle"><?echo $row['USUARIO_BLOQUES_RES'];?></td> </tr> <tr> <td style="font-weight: bold;" align="left" nowrap="nowrap" valign="middle">GID predet. de bloques res.</td> <td align="left" nowrap="nowrap" valign="middle"><?echo $row['GRUPO_BLOQUES_RES'];?></td> </tr> <tr> <td style="font-weight: bold;" align="left" nowrap="nowrap" valign="middle">Ultimo Punto de Montaje:</td> <td align="left" nowrap="nowrap" valign="middle"><?echo $row['DIR_MONTAJE'];?></td> </tr> </tbody> </table> <? }// End write_superbloque
} $topiccount = number_format($forums_arr["topiccount"]); $postcount = number_format($forums_arr["postcount"]); // Find last post ID //Returns the ID of the last post of a forum if (!($arr = $Cache->get_value('forum_' . $forumid . '_last_replied_topic_content'))) { $res = sql_query("SELECT * FROM topics WHERE forumid=" . sqlesc($forumid) . " ORDER BY lastpost DESC LIMIT 1") or sqlerr(__FILE__, __LINE__); $arr = mysql_fetch_array($res); $Cache->cache_value('forum_' . $forumid . '_last_replied_topic_content', $arr, 900); } if ($arr) { $lastpostid = $arr['lastpost']; // Get last post info $post_arr = get_post_row($lastpostid); $lastposterid = $post_arr["userid"]; $lastpostdate = gettime($post_arr["added"], true, false); $lasttopicid = $arr['id']; $hlcolor = $arr['hlcolor']; $lasttopicdissubject = $lasttopicsubject = $arr['subject']; $max_length_of_topic_subject = 35; $count_dispname = mb_strlen($lasttopicdissubject, "UTF-8"); if ($count_dispname > $max_length_of_topic_subject) { $lasttopicdissubject = mb_substr($lasttopicdissubject, 0, $max_length_of_topic_subject - 2, "UTF-8") . ".."; } $lasttopic = highlight_topic(htmlspecialchars($lasttopicdissubject), $hlcolor); $lastpost = "<a href=\"" . htmlspecialchars("?action=viewtopic&topicid=" . $lasttopicid . "&page=last#last") . "\" title=\"" . htmlspecialchars($lasttopicsubject) . "\">" . $lasttopic . "</a><br />" . $lastpostdate . " | " . get_username($lastposterid); $lastreadpost = get_last_read_post_id($lasttopicid); if ($lastreadpost >= $lastpostid) { $img = get_topic_image("read"); } else { $img = get_topic_image("unread");
$res_topics = sql_query("SELECT * FROM readposts INNER JOIN topics ON topics.id = readposts.topicid WHERE readposts.userid = " . $CURUSER[id] . " ORDER BY readposts.id DESC LIMIT 5") or sqlerr(); while ($topicarr = mysql_fetch_assoc($res_topics)) { $topicid = $topicarr["id"]; $topic_title = $topicarr["subject"]; $topic_userid = $topicarr["userid"]; $topic_views = $topicarr["views"]; $views = number_format($topic_views); /// GETTING TOTAL NUMBER OF POSTS /// if (!($posts = $Cache->get_value('topic_' . $topicid . '_post_count'))) { $posts = get_row_count("posts", "WHERE topicid=" . sqlesc($topicid)); $Cache->cache_value('topic_' . $topicid . '_post_count', $posts, 3600); } $replies = max(0, $posts - 1); /// GETTING USERID AND DATE OF LAST POST /// $arr = get_post_row($topicarr['lastpost']); $postid = 0 + $arr["id"]; $userid = 0 + $arr["userid"]; $added = gettime($arr['added'], true, false); /// GET NAME OF LAST POSTER /// $username = get_username($userid); /// GET NAME OF THE AUTHOR /// $author = get_username($topic_userid); $subject = "<a href=forums.php?action=viewtopic&topicid={$topicid}><b>" . htmlspecialchars($topicarr["subject"]) . "</b></a>"; print "<tr class=tableb><td style='padding-left: 10px' align=left class=rowfollow>{$subject}</td>" . "<td align=center class=rowfollow>" . $replies . "/" . $views . "</td>" . "<td align=center class=rowfollow>" . $author . "</td>" . "<td align=center class=rowfollow><nobr>" . $added . " | " . $username . "</nobr></td></tr>"; } ?> </table> </td> </tr> <?php stdfoot();
while ($user = mysql_fetch_array($res)) { if ($user['added'] == '0000-00-00 00:00:00') { $added = $lang_ipsearch['text_not_available']; } else { $added = gettime($user['added']); } if ($user['last_access'] == '0000-00-00 00:00:00') { $lastaccess = $lang_ipsearch['text_not_available']; } else { $lastaccess = gettime($user['last_access']); } if ($user['last_ip']) { $ipstr = $user['last_ip']; } else { $ipstr = $lang_ipsearch['text_not_available']; } $resip = sql_query("SELECT ip FROM iplog WHERE userid=" . sqlesc($user['id']) . " GROUP BY iplog.ip") or sqlerr(__FILE__, __LINE__); $iphistory = mysql_num_rows($resip); if ($user["invited_by"] > 0) { $invited_by = get_username($user['invited_by']); } else { $invited_by = $lang_ipsearch['text_not_available']; } echo "<tr><td align=\"center\">" . get_username($user['id']) . "</td>" . "<td align=\"center\">" . $ipstr . "</td>\n<td align=\"center\">" . $lastaccess . "</td>\n<td align=\"center\"><a href=\"iphistory.php?id=" . $user['id'] . "\">" . $iphistory . "</a></td>\n<td align=\"center\">" . gettime($user['access']) . "</td>\n<td align=\"center\">" . gettime($user['added']) . "</td>\n<td align=\"center\">" . $invited_by . "</td>\n</tr>\n"; } echo "</table>"; echo $pagerbottom; } end_main_frame(); stdfoot(); }
<?php require_once 'models/config.php'; include 'models/chat.config.php'; //___ $id = $loggedInUser->user_id; $username = $loggedInUser->display_username; //___ if (isUserCBanned($id)) { die; } else { if (isUserAdmin($id)) { $color = "#0404B4"; } else { if (isUserMod($id)) { $color = "#B43104"; } else { $color = "#000000"; } } $color_ = $db->real_escape_string(htmlentities($color)); $user = $db->real_escape_string(htmlentities($username)); $message = $db->real_escape_string(strip_tags($_POST['message'], '<a>')); $timestamp = $db->real_escape_string(gettime()); $db->Query("INSERT INTO messages (color, username, message, timestamp) VALUES ('{$color_}','{$user}','{$message}','{$timestamp}')"); }
function maketable($res, $mode = 'seeding') { global $lang_getusertorrentlistajax, $CURUSER, $smalldescription_main; switch ($mode) { case 'uploaded': $showsize = true; $showsenum = true; $showlenum = true; $showuploaded = true; $showdownloaded = false; $showratio = false; $showsetime = true; $showletime = false; $showcotime = false; $showanonymous = true; $columncount = 8; break; case 'seeding': $showsize = true; $showsenum = true; $showlenum = true; $showuploaded = true; $showdownloaded = true; $showratio = true; $showsetime = false; $showletime = false; $showcotime = false; $showanonymous = false; $columncount = 8; break; case 'leeching': $showsize = true; $showsenum = true; $showlenum = true; $showuploaded = true; $showdownloaded = true; $showratio = true; $showsetime = false; $showletime = false; $showcotime = false; $showanonymous = false; $columncount = 8; break; case 'completed': $showsize = false; $showsenum = false; $showlenum = false; $showuploaded = true; $showdownloaded = false; $showratio = false; $showsetime = true; $showletime = true; $showcotime = true; $showanonymous = false; $columncount = 8; break; case 'incomplete': $showsize = false; $showsenum = false; $showlenum = false; $showuploaded = true; $showdownloaded = true; $showratio = true; $showsetime = false; $showletime = true; $showcotime = false; $showanonymous = false; $columncount = 7; break; default: break; } $ret = "<table border=\"1\" cellspacing=\"0\" cellpadding=\"5\" width=\"800\"><tr><td class=\"colhead\" style=\"padding: 0px\">" . $lang_getusertorrentlistajax['col_type'] . "</td><td class=\"colhead\" align=\"center\">" . $lang_getusertorrentlistajax['col_name'] . "</td>" . ($showsize ? "<td class=\"colhead\" align=\"center\"><img class=\"size\" src=\"pic/trans.gif\" alt=\"size\" title=\"" . $lang_getusertorrentlistajax['title_size'] . "\" /></td>" : "") . ($showsenum ? "<td class=\"colhead\" align=\"center\"><img class=\"seeders\" src=\"pic/trans.gif\" alt=\"seeders\" title=\"" . $lang_getusertorrentlistajax['title_seeders'] . "\" /></td>" : "") . ($showlenum ? "<td class=\"colhead\" align=\"center\"><img class=\"leechers\" src=\"pic/trans.gif\" alt=\"leechers\" title=\"" . $lang_getusertorrentlistajax['title_leechers'] . "\" /></td>" : "") . ($showuploaded ? "<td class=\"colhead\" align=\"center\">" . $lang_getusertorrentlistajax['col_uploaded'] . "</td>" : "") . ($showdownloaded ? "<td class=\"colhead\" align=\"center\">" . $lang_getusertorrentlistajax['col_downloaded'] . "</td>" : "") . ($showratio ? "<td class=\"colhead\" align=\"center\">" . $lang_getusertorrentlistajax['col_ratio'] . "</td>" : "") . ($showsetime ? "<td class=\"colhead\" align=\"center\">" . $lang_getusertorrentlistajax['col_se_time'] . "</td>" : "") . ($showletime ? "<td class=\"colhead\" align=\"center\">" . $lang_getusertorrentlistajax['col_le_time'] . "</td>" : "") . ($showcotime ? "<td class=\"colhead\" align=\"center\">" . $lang_getusertorrentlistajax['col_time_completed'] . "</td>" : "") . ($showanonymous ? "<td class=\"colhead\" align=\"center\">" . $lang_getusertorrentlistajax['col_anonymous'] . "</td>" : "") . "</tr>\n"; while ($arr = mysql_fetch_assoc($res)) { $catimage = htmlspecialchars($arr["image"]); $catname = htmlspecialchars($arr["catname"]); $sphighlight = get_torrent_bg_color($arr['sp_state']); $sp_torrent = get_torrent_promotion_append($arr['sp_state']); //torrent name $dispname = $nametitle = htmlspecialchars($arr["torrentname"]); $count_dispname = mb_strlen($dispname, "UTF-8"); $max_lenght_of_torrent_name = $CURUSER['fontsize'] == 'large' ? 70 : 80; if ($count_dispname > $max_lenght_of_torrent_name) { $dispname = mb_substr($dispname, 0, $max_lenght_of_torrent_name, "UTF-8") . ".."; } if ($smalldescription_main == 'yes') { //small description $dissmall_descr = htmlspecialchars(trim($arr["small_descr"])); $count_dissmall_descr = mb_strlen($dissmall_descr, "UTF-8"); $max_lenght_of_small_descr = 80; // maximum length if ($count_dissmall_descr > $max_lenght_of_small_descr) { $dissmall_descr = mb_substr($dissmall_descr, 0, $max_lenght_of_small_descr, "UTF-8") . ".."; } } else { $dissmall_descr == ""; } $ret .= "<tr" . $sphighlight . "><td class=\"rowfollow nowrap\" valign=\"middle\" style='padding: 0px'>" . return_category_image($arr['category'], "torrents.php?allsec=1&") . "</td>\n" . "<td class=\"rowfollow\" width=\"100%\" align=\"left\"><a href=\"" . htmlspecialchars("details.php?id=" . $arr[torrent] . "&hit=1") . "\" title=\"" . $nametitle . "\"><b>" . $dispname . "</b></a>" . $sp_torrent . ($dissmall_descr == "" ? "" : "<br />" . $dissmall_descr) . "</td>"; //size if ($showsize) { $ret .= "<td class=\"rowfollow\" align=\"center\">" . mksize_compact($arr['size']) . "</td>"; } //number of seeders if ($showsenum) { $ret .= "<td class=\"rowfollow\" align=\"center\">" . $arr['seeders'] . "</td>"; } //number of leechers if ($showlenum) { $ret .= "<td class=\"rowfollow\" align=\"center\">" . $arr['leechers'] . "</td>"; } //uploaded amount if ($showuploaded) { $uploaded = mksize_compact($arr["uploaded"]); $ret .= "<td class=\"rowfollow\" align=\"center\">" . $uploaded . "</td>"; } //downloaded amount if ($showdownloaded) { $downloaded = mksize_compact($arr["downloaded"]); $ret .= "<td class=\"rowfollow\" align=\"center\">" . $downloaded . "</td>"; } //ratio if ($showratio) { if ($arr['downloaded'] > 0) { $ratio = number_format($arr['uploaded'] / $arr['downloaded'], 3); $ratio = "<font color=\"" . get_ratio_color($ratio) . "\">" . $ratio . "</font>"; } elseif ($arr['uploaded'] > 0) { $ratio = "Inf."; } else { $ratio = "---"; } $ret .= "<td class=\"rowfollow\" align=\"center\">" . $ratio . "</td>"; } if ($showsetime) { $ret .= "<td class=\"rowfollow\" align=\"center\">" . mkprettytime($arr['seedtime']) . "</td>"; } if ($showletime) { $ret .= "<td class=\"rowfollow\" align=\"center\">" . mkprettytime($arr['leechtime']) . "</td>"; } if ($showcotime) { $ret .= "<td class=\"rowfollow\" align=\"center\">" . "" . str_replace(" ", "<br />", gettime($arr['completedat'], false)) . "</td>"; } if ($showanonymous) { $ret .= "<td class=\"rowfollow\" align=\"center\">" . $arr['anonymous'] . "</td>"; } $ret .= "</tr>\n"; } $ret .= "</table>\n"; return $ret; }
function get_torrent_promotion_append($promotion = 1, $forcemode = "", $showtimeleft = false, $added = "", $promotionTimeType = 0, $promotionUntil = '') { global $CURUSER, $lang_functions; global $expirehalfleech_torrent, $expirefree_torrent, $expiretwoup_torrent, $expiretwoupfree_torrent, $expiretwouphalfleech_torrent, $expirethirtypercentleech_torrent; $sp_torrent = ""; $onmouseover = ""; if (get_global_sp_state() == 1) { switch ($promotion) { case 2: if ($showtimeleft && ($expirefree_torrent && $promotionTimeType == 0 || $promotionTimeType == 2)) { if ($promotionTimeType == 2) { $futuretime = strtotime($promotionUntil); } else { $futuretime = strtotime($added) + $expirefree_torrent * 86400; } $timeout = gettime(date("Y-m-d H:i:s", $futuretime), false, false, true, false, true); if ($timeout) { $onmouseover = " onmouseover=\"domTT_activate(this, event, 'content', '" . htmlspecialchars("<b><font class=\"free\">" . $lang_functions['text_free'] . "</font></b>" . $lang_functions['text_will_end_in'] . "<b>" . $timeout . "</b>") . "', 'trail', false, 'delay',500,'lifetime',3000,'fade','both','styleClass','niceTitle', 'fadeMax',87, 'maxWidth', 300);\""; } else { $promotion = 1; } } break; case 3: if ($showtimeleft && ($expiretwoup_torrent && $promotionTimeType == 0 || $promotionTimeType == 2)) { if ($promotionTimeType == 2) { $futuretime = strtotime($promotionUntil); } else { $futuretime = strtotime($added) + $expiretwoup_torrent * 86400; } $timeout = gettime(date("Y-m-d H:i:s", $futuretime), false, false, true, false, true); if ($timeout) { $onmouseover = " onmouseover=\"domTT_activate(this, event, 'content', '" . htmlspecialchars("<b><font class=\"twoup\">" . $lang_functions['text_two_times_up'] . "</font></b>" . $lang_functions['text_will_end_in'] . "<b>" . $timeout . "</b>") . "', 'trail', false, 'delay',500,'lifetime',3000,'fade','both','styleClass','niceTitle', 'fadeMax',87, 'maxWidth', 300);\""; } else { $promotion = 1; } } break; case 4: if ($showtimeleft && ($expiretwoupfree_torrent && $promotionTimeType == 0 || $promotionTimeType == 2)) { if ($promotionTimeType == 2) { $futuretime = strtotime($promotionUntil); } else { $futuretime = strtotime($added) + $expiretwoupfree_torrent * 86400; } $timeout = gettime(date("Y-m-d H:i:s", $futuretime), false, false, true, false, true); if ($timeout) { $onmouseover = " onmouseover=\"domTT_activate(this, event, 'content', '" . htmlspecialchars("<b><font class=\"twoupfree\">" . $lang_functions['text_free_two_times_up'] . "</font></b>" . $lang_functions['text_will_end_in'] . "<b>" . $timeout . "</b>") . "', 'trail', false, 'delay',500,'lifetime',3000,'fade','both','styleClass','niceTitle', 'fadeMax',87, 'maxWidth', 300);\""; } else { $promotion = 1; } } break; case 5: if ($showtimeleft && ($expirehalfleech_torrent && $promotionTimeType == 0 || $promotionTimeType == 2)) { if ($promotionTimeType == 2) { $futuretime = strtotime($promotionUntil); } else { $futuretime = strtotime($added) + $expirehalfleech_torrent * 86400; } $timeout = gettime(date("Y-m-d H:i:s", $futuretime), false, false, true, false, true); if ($timeout) { $onmouseover = " onmouseover=\"domTT_activate(this, event, 'content', '" . htmlspecialchars("<b><font class=\"halfdown\">" . $lang_functions['text_half_down'] . "</font></b>" . $lang_functions['text_will_end_in'] . "<b>" . $timeout . "</b>") . "', 'trail', false, 'delay',500,'lifetime',3000,'fade','both','styleClass','niceTitle', 'fadeMax',87, 'maxWidth', 300);\""; } else { $promotion = 1; } } break; case 6: if ($showtimeleft && ($expiretwouphalfleech_torrent && $promotionTimeType == 0 || $promotionTimeType == 2)) { if ($promotionTimeType == 2) { $futuretime = strtotime($promotionUntil); } else { $futuretime = strtotime($added) + $expiretwouphalfleech_torrent * 86400; } $timeout = gettime(date("Y-m-d H:i:s", $futuretime), false, false, true, false, true); if ($timeout) { $onmouseover = " onmouseover=\"domTT_activate(this, event, 'content', '" . htmlspecialchars("<b><font class=\"twouphalfdown\">" . $lang_functions['text_half_down_two_up'] . "</font></b>" . $lang_functions['text_will_end_in'] . "<b>" . $timeout . "</b>") . "', 'trail', false, 'delay',500,'lifetime',3000,'fade','both','styleClass','niceTitle', 'fadeMax',87, 'maxWidth', 300);\""; } else { $promotion = 1; } } break; case 7: if ($showtimeleft && ($expirethirtypercentleech_torrent && $promotionTimeType == 0 || $promotionTimeType == 2)) { if ($promotionTimeType == 2) { $futuretime = strtotime($promotionUntil); } else { $futuretime = strtotime($added) + $expirethirtypercentleech_torrent * 86400; } $timeout = gettime(date("Y-m-d H:i:s", $futuretime), false, false, true, false, true); if ($timeout) { $onmouseover = " onmouseover=\"domTT_activate(this, event, 'content', '" . htmlspecialchars("<b><font class=\"thirtypercent\">" . $lang_functions['text_thirty_percent_down'] . "</font></b>" . $lang_functions['text_will_end_in'] . "<b>" . $timeout . "</b>") . "', 'trail', false, 'delay',500,'lifetime',3000,'fade','both','styleClass','niceTitle', 'fadeMax',87, 'maxWidth', 300);\""; } else { $promotion = 1; } } break; } } if ($CURUSER['appendpromotion'] == 'word' && $forcemode == "" || $forcemode == 'word') { if ($promotion == 2 && get_global_sp_state() == 1 || get_global_sp_state() == 2) { $sp_torrent = " <b>[<font class='free' " . $onmouseover . ">" . $lang_functions['text_free'] . "</font>]</b>"; } elseif ($promotion == 3 && get_global_sp_state() == 1 || get_global_sp_state() == 3) { $sp_torrent = " <b>[<font class='twoup' " . $onmouseover . ">" . $lang_functions['text_two_times_up'] . "</font>]</b>"; } elseif ($promotion == 4 && get_global_sp_state() == 1 || get_global_sp_state() == 4) { $sp_torrent = " <b>[<font class='twoupfree' " . $onmouseover . ">" . $lang_functions['text_free_two_times_up'] . "</font>]</b>"; } elseif ($promotion == 5 && get_global_sp_state() == 1 || get_global_sp_state() == 5) { $sp_torrent = " <b>[<font class='halfdown' " . $onmouseover . ">" . $lang_functions['text_half_down'] . "</font>]</b>"; } elseif ($promotion == 6 && get_global_sp_state() == 1 || get_global_sp_state() == 6) { $sp_torrent = " <b>[<font class='twouphalfdown' " . $onmouseover . ">" . $lang_functions['text_half_down_two_up'] . "</font>]</b>"; } elseif ($promotion == 7 && get_global_sp_state() == 1 || get_global_sp_state() == 7) { $sp_torrent = " <b>[<font class='thirtypercent' " . $onmouseover . ">" . $lang_functions['text_thirty_percent_down'] . "</font>]</b>"; } } elseif ($CURUSER['appendpromotion'] == 'icon' && $forcemode == "" || $forcemode == 'icon') { if ($promotion == 2 && get_global_sp_state() == 1 || get_global_sp_state() == 2) { $sp_torrent = " <img class=\"pro_free\" src=\"pic/trans.gif\" alt=\"Free\" " . ($onmouseover ? $onmouseover : "title=\"" . $lang_functions['text_free'] . "\"") . " />"; } elseif ($promotion == 3 && get_global_sp_state() == 1 || get_global_sp_state() == 3) { $sp_torrent = " <img class=\"pro_2up\" src=\"pic/trans.gif\" alt=\"2X\" " . ($onmouseover ? $onmouseover : "title=\"" . $lang_functions['text_two_times_up'] . "\"") . " />"; } elseif ($promotion == 4 && get_global_sp_state() == 1 || get_global_sp_state() == 4) { $sp_torrent = " <img class=\"pro_free2up\" src=\"pic/trans.gif\" alt=\"2X Free\" " . ($onmouseover ? $onmouseover : "title=\"" . $lang_functions['text_free_two_times_up'] . "\"") . " />"; } elseif ($promotion == 5 && get_global_sp_state() == 1 || get_global_sp_state() == 5) { $sp_torrent = " <img class=\"pro_50pctdown\" src=\"pic/trans.gif\" alt=\"50%\" " . ($onmouseover ? $onmouseover : "title=\"" . $lang_functions['text_half_down'] . "\"") . " />"; } elseif ($promotion == 6 && get_global_sp_state() == 1 || get_global_sp_state() == 6) { $sp_torrent = " <img class=\"pro_50pctdown2up\" src=\"pic/trans.gif\" alt=\"2X 50%\" " . ($onmouseover ? $onmouseover : "title=\"" . $lang_functions['text_half_down_two_up'] . "\"") . " />"; } elseif ($promotion == 7 && get_global_sp_state() == 1 || get_global_sp_state() == 7) { $sp_torrent = " <img class=\"pro_30pctdown\" src=\"pic/trans.gif\" alt=\"30%\" " . ($onmouseover ? $onmouseover : "title=\"" . $lang_functions['text_thirty_percent_down'] . "\"") . " />"; } } return $sp_torrent; }
print "<td class=\"colfollow\">" . $row['torrent_count'] . "</td>"; print "<td class=\"colfollow\">" . ($row2['added'] ? gettime($row2['added']) : $lang_uploaders['text_not_available']) . "</td>"; print "<td class=\"colfollow\">" . ($row2['name'] ? "<a href=\"details.php?id=" . $row2['id'] . "\">" . htmlspecialchars($row2['name']) . "</a>" : $lang_uploaders['text_not_available']) . "</td>"; print "</tr>"; $hasupuserid[] = $row['userid']; unset($row2); } $res3 = sql_query("SELECT users.id AS userid, users.username AS username, 0 AS torrent_count, 0 AS torrent_size FROM users WHERE class >= " . UC_UPLOADER . (count($hasupuserid) ? " AND users.id NOT IN (" . implode(",", $hasupuserid) . ")" : "") . " ORDER BY username ASC") or sqlerr(__FILE__, __LINE__); while ($row = mysql_fetch_array($res3)) { $res2 = sql_query("SELECT torrents.id, torrents.name, torrents.added FROM torrents WHERE owner=" . $row['userid'] . " ORDER BY id DESC LIMIT 1"); $row2 = mysql_fetch_array($res2); print "<tr>"; print "<td class=\"colfollow\">" . get_username($row['userid'], false, true, true, false, false, true) . "</td>"; print "<td class=\"colfollow\">" . ($row['torrent_size'] ? mksize($row['torrent_size']) : "0") . "</td>"; print "<td class=\"colfollow\">" . $row['torrent_count'] . "</td>"; print "<td class=\"colfollow\">" . ($row2['added'] ? gettime($row2['added']) : $lang_uploaders['text_not_available']) . "</td>"; print "<td class=\"colfollow\">" . ($row2['name'] ? "<a href=\"details.php?id=" . $row2['id'] . "\">" . htmlspecialchars($row2['name']) . "</a>" : $lang_uploaders['text_not_available']) . "</td>"; print "</tr>"; $count++; unset($row2); } print "</table>"; ?> </div> <div style="margin-top: 8px; margin-bottom: 8px;"> <span id="order" onclick="dropmenu(this);"><span style="cursor: pointer;" class="big"><b><?php echo $lang_uploaders['text_order_by']; ?> </b></span> <span id="orderlist" class="dropmenu" style="display: none"><ul> <li><a href="?year=<?php
while ($row = mysql_fetch_array($cheatersres)) { $upspeed = $row['uploaded'] > 0 ? $row['uploaded'] / $row['anctime'] : 0; $lespeed = $row['downloaded'] > 0 ? $row['downloaded'] / $row['anctime'] : 0; $torrentres = sql_query("SELECT name FROM torrents WHERE id=" . sqlesc($row['torrentid'])); $torrentrow = mysql_fetch_array($torrentres); if ($torrentrow) { $torrent = "<a href=details.php?id=" . $row['torrentid'] . ">" . htmlspecialchars($torrentrow['name']) . "</a>"; } else { $torrent = $lang_cheaterbox['text_torrent_does_not_exist']; } if ($row['dealtwith']) { $dealtwith = "<font color=green>" . $lang_cheaterbox['text_yes'] . "</font> - " . get_username($row['dealtby']); } else { $dealtwith = "<font color=red>" . $lang_cheaterbox['text_no'] . "</font>"; } print "<tr><td class=rowfollow>" . gettime($row['added']) . "</td><td class=rowfollow>" . get_username($row['userid']) . "</td><td class=rowfollow>" . $row['hit'] . "</td><td class=rowfollow>" . $torrent . "</td><td class=rowfollow>" . mksize($row['uploaded']) . ($upspeed ? " @ " . mksize($upspeed) . "/s" : "") . "</td><td class=rowfollow>" . mksize($row['downloaded']) . ($lespeed ? " @ " . mksize($lespeed) . "/s" : "") . "</td><td class=rowfollow>" . $row['anctime'] . " sec" . "</td><td class=rowfollow>" . $row['seeders'] . "</td><td class=rowfollow>" . $row['leechers'] . "</td><td class=rowfollow>" . htmlspecialchars($row['comment']) . "</td><td class=rowfollow>" . $dealtwith . "</td><td class=rowfollow><input type=\"checkbox\" name=\"delcheater[]\" value=\"" . $row[id] . "\" /></td></tr>\n"; } ?> <tr><td class="colhead" colspan="12" style="text-align: right"><input type="submit" name="setdealt" value="<?php echo $lang_cheaterbox['submit_set_dealt']; ?> " /><input type="submit" name="delete" value="<?php echo $lang_cheaterbox['submit_delete']; ?> " /></td></tr> </form> <?php print "</table>"; print $pagerbottom; end_main_frame(); stdfoot();