function read_invitations() { global $TABLE_PREFIX, $admintpl, $language, $CURUSER, $STYLEPATH, $btit_settings; $scriptname = htmlspecialchars($_SERVER["PHP_SELF"] . "?page=admin&user="******"uid"] . "&code=" . $CURUSER["random"] . "&do=invitations"); $addparam = ""; $res = get_result("SELECT COUNT(*) as invites FROM {$TABLE_PREFIX}invitations", true); $count = $res[0]["invites"]; list($pagertop, $pagerbottom, $limit) = pager('15', $count, $scriptname . "&"); $admintpl->set("inv_pagertop", $pagertop); $admintpl->set("inv_pagerbottom", $pagerbottom); $results = get_result("SELECT * FROM {$TABLE_PREFIX}invitations ORDER BY id DESC {$limit}", true); $invitees = array(); $i = 0; foreach ($results as $id => $data) { $res = do_sqlquery("SELECT username FROM {$TABLE_PREFIX}users WHERE id = " . $data["inviter"], true); if (mysql_num_rows($res) > 0) { $inviter_name = mysql_result($res, 0, 0); } else { $inviter_name = 'Unknown'; } $invitees[$i]["inviter"] = "<a href=\"index.php?page=userdetails&user="******"inviter"] . "\">" . $inviter_name . "</a>"; $invitees[$i]["invitee"] = unesc($data["invitee"]); $invitees[$i]["hash"] = unesc($data["hash"]); $invitees[$i]["time_invited"] = $data["time_invited"]; $invitees[$i]["delete"] = "<a href=\"index.php?page=admin&user="******"uid"] . "&code=" . $CURUSER["random"] . "&do=invitations&action=delete&id=" . $data["id"] . "\" onclick=\"return confirm('" . AddSlashes($language["DELETE_CONFIRM"]) . "')\">" . image_or_link("{$STYLEPATH}/images/delete.png", "", $language["DELETE"]) . "</a>"; $i++; } $admintpl->set("invitees", $invitees); $admintpl->set("language", $language); }
function cleanup_show_main() { $count1 = get_row_count('cleanup'); $perpage = 15; $pager = pager($perpage, $count1, 'staffpanel.php?tool=cleanup_manager&'); $htmlout = "<h2>Current Cleanup Tasks</h2>\n <table class='torrenttable' bgcolor='#333333' border='1' cellpadding='5px' width='80%'>\n <tr>\n <td class='colhead'>Cleanup Title & Description</td>\n <td class='colhead' width='150px'>Runs every</td>\n <td class='colhead' width='150px'>Next Clean Time</td>\n <td class='colhead' width='40px'>Edit</td>\n <td class='colhead' width='40px'>Delete</td>\n <td class='colhead' width='40px'>Off/On</td>\n <td class='colhead' style='width: 40px;'>Run now</td>\n </tr>"; $sql = sql_query("SELECT * FROM cleanup ORDER BY clean_time ASC " . $pager['limit']) or sqlerr(__FILE__, __LINE__); if (!mysqli_num_rows($sql)) { stderr('Error', 'F*****g panic now!'); } while ($row = mysqli_fetch_assoc($sql)) { $row['_clean_time'] = get_date($row['clean_time'], 'LONG'); $row['clean_increment'] = $row['clean_increment']; $row['_class'] = $row['clean_on'] != 1 ? " style='color:red'" : ''; $row['_title'] = $row['clean_on'] != 1 ? " (Locked)" : ''; $row['_clean_time'] = $row['clean_on'] != 1 ? "<span style='color:red'>{$row['_clean_time']}</span>" : $row['_clean_time']; $htmlout .= "<tr>\n <td{$row['_class']}><strong>{$row['clean_title']}{$row['_title']}</strong><br />{$row['clean_desc']}</td>\n <td>" . mkprettytime($row['clean_increment']) . "</td>\n <td>{$row['_clean_time']}</td>\n <td align='center'><a href='staffpanel.php?tool=cleanup_manager&action=cleanup_manager&mode=edit&cid={$row['clean_id']}'>\n <img src='./pic/aff_tick.gif' alt='Edit Cleanup' title='Edit' border='0' height='12' width='12' /></a></td>\n\n <td align='center'><a href='staffpanel.php?tool=cleanup_manager&action=cleanup_manager&mode=delete&cid={$row['clean_id']}'>\n <img src='./pic/aff_cross.gif' alt='Delete Cleanup' title='Delete' border='0' height='12' width='12' /></a></td>\n <td align='center'><a href='staffpanel.php?tool=cleanup_manager&action=cleanup_manager&mode=unlock&cid={$row['clean_id']}&clean_on={$row['clean_on']}'>\n <img src='./pic/warned.png' alt='On/Off Cleanup' title='on/off' border='0' height='12' width='12' /></a></td>\n<td align='center'><a href='staffpanel.php?tool=cleanup_manager&action=cleanup_manager&mode=run&cid={$row['clean_id']}'>Run it now</a></td>\n </tr>"; } $htmlout .= "</table>"; if ($count1 > $perpage) { $htmlout .= $pager['pagerbottom']; } $htmlout .= "<br />\n <span class='btn'><a href='./staffpanel.php?tool=cleanup_manager&action=cleanup_manager&mode=new'>Add New</a></span>"; echo stdhead('Cleanup Manager - View') . $htmlout . stdfoot(); }
public function index() { $table = 'Article'; $M = M($table); $select = $M->table($table . ' a')->field("a.*,t.*")->join("topic t on a.id=t.id")->order('a.id desc'); $page_size = C('PAGE_SIZE'); if (array_key_exists('p', $_GET)) { $p = $_GET['p']; } else { $p = 1; } pager($select, $p, 'Comm:Index:list'); }
function display($table, $vyber, $sub, $page, $extended) { if ($_POST["filter_meno"]) { $filter_do_meno = sec_input(sec_sql($_POST["filter_do_meno"])); $_SESSION["filter_do_meno"] = $filter_do_meno; } if (!empty($_SESSION["filter_do_meno"])) { $where[] = "meno LIKE \"%" . $_SESSION["filter_do_meno"] . "%\""; } echo "<div class=\"confirm_order\">\r\n <a href=\"?vyber={$vyber}&sub={$table}&action=insert\">Vložiť novú položku</a>\r\n </div>"; if ($table == "dodavatel") { $query = "SELECT id, meno, vymaz from {$table} ORDER BY vymaz, meno ASC"; $th = "<th>Meno</th><th>úpravy</th>"; } if ($table == "do_produkt") { echo "<div class=\"main_box_33\">"; echo "<form method=\"POST\">"; echo textfield("filter_do_meno", $_SESSION["filter_do_meno"], "Meno", 15, 10); echo submit("filter_meno", "Zobraz"); echo "</form>"; echo "</div>"; if (count($where) > 0) { $where = "WHERE " . implode(" AND ", $where); } $query = "SELECT id, meno, email_meno, vymaz from {$table} {$where} ORDER BY vymaz, meno ASC"; $th = "<th>Meno</th><th>Em@il Meno</th><th>úpravy</th>"; } $pager = pager("{$table}", $page, $vyber . "&sub=" . $sub, $query); $page_from = $pager[page_from]; echo "<div class=\"pager\">Strany: " . implode(" | ", $pager[pages]) . "</div>"; echo "Počet všetkých položiek: {$pager['num_max']}"; $query .= " LIMIT {$page_from}"; echo "<table id=\"nast_material\">"; echo "<thead>\r\n <tr>\r\n {$th}\r\n </tr> \r\n </thead>\r\n <tbody>"; $value = sql_query($query); //dd($value); foreach ($value as $riadok) { if ($table == "dodavatel") { $td = "<td>{$riadok[meno]}</td> \r\n "; } if ($table == "do_produkt") { $td = "<td>{$riadok[meno]}</td><td>{$riadok[email_meno]}</td> \r\n "; } echo "<tr" . ($riadok[vymaz] == 1 ? " class=\"vymazane\"" : "") . ">\r\n {$td}\r\n <td>\r\n <a href=\"?vyber={$vyber}&sub={$sub}&action=edit&id={$riadok[id]}&page={$page}\">upraviť</a> | \r\n <a href=\"?vyber={$vyber}&sub={$sub}&action=delete&id={$riadok[id]}\">\r\n " . ($riadok[vymaz] == 1 ? "zobraziť" : "vymazať") . "</a> \r\n <img src=\"assets/images/" . ($riadok[vymaz] == 0 ? "checked" : "unchecked") . ".png\">\r\n </td></tr>"; } echo "</tbody>\r\n </table>"; echo "<div class=\"pager\">Strany: " . implode(" | ", $pager[pages]) . "</div>"; }
function getHtml($backupId, $page, $totalCount, $take) { global $db; $start = ($page - 1) * $take; $cmd = "select * from weibos where backupid='{$backupId}' order by dateline desc limit {$start}, {$take}"; $weibos = $db->fetchAll($cmd); $html = ""; foreach ($weibos as $w) { $temp = '<li class="item">'; $temp .= '<div>' . preg_replace("/@([^@)(。,:\\s]+)(?=()|(|。|,|:|?|\\s|\$))/u", "<a href=\"http://weibo.com/n/\$1\" target=\"_blank\">@\$1</a>", preg_replace("/(http:\\/\\/.+?)(\\s|\$)/", '<a href="$1" target="_blank">$1</a>', $w['content'])) . '</div>'; if (!empty($w['refer_content'])) { $temp .= '<div class="refer">'; $temp .= '<div class="comment">' . $w['refer_content'] . '</div>'; $temp .= '<div>'; if (!empty($w['refer_img'])) { $temp .= '<img src="' . $w['refer_img'] . '" />'; } $temp .= '</div>'; $temp .= '</div>'; } $temp .= '<div>'; if (!empty($w['img'])) { $temp .= '<img src="' . $w['img'] . '" onclick="toggleImg(this);" />'; } $temp .= '</div>'; $temp .= '</li>'; $html .= $temp; } $head = <<<EOF <!DOCTYPE html> <html> <head> \t<meta http-equiv="content-type" content="text/html; charset=UTF-8"> \t<title>HTML TEMPLATE</title> \t<style> \th1{text-align:center;} \tbody{font-size:14px;line-height:22px;background:url(images/bg.jpg);} \ta{color:#06c;text-decoration:none;} \tul{margin:0;padding:0;}
function customers_list($event = '', $step = '', $message = '') { global $statuses, $comments_disabled_after, $step, $txp_user; pagetop("Customers", $message); extract(get_prefs()); extract(gpsa(array('page', 'sort', 'dir', 'crit', 'qty', 'search_method'))); $sesutats = array_flip($statuses); $dir = $dir == 'desc' ? 'desc' : 'asc'; switch ($sort) { case 'RealName': $sort_sql = 'RealName ' . $dir; break; case 'orders': $sort_sql = 'orders ' . $dir; break; default: $dir = 'desc'; $sort_sql = 'user_id ' . $dir; break; } $switch_dir = $dir == 'desc' ? 'asc' : 'desc'; $criteria = "privs = 0"; if ($search_method and $crit) { $crit_escaped = doSlash($crit); $critsql = array('id' => "ID = '{$crit_escaped}'", 'title_body' => "Title rlike '{$crit_escaped}' or Body rlike '{$crit_escaped}'", 'section' => "Section rlike '{$crit_escaped}'", 'categories' => "Category1 rlike '{$crit_escaped}' or Category2 rlike '{$crit_escaped}'", 'status' => "Status = '" . @$sesutats[gTxt($crit_escaped)] . "'", 'author' => "AuthorID rlike '{$crit_escaped}'"); if (array_key_exists($search_method, $critsql)) { $criteria = $critsql[$search_method]; $limit = 500; } else { $search_method = ''; $crit = ''; } } else { $search_method = ''; $crit = ''; } $total = safe_count('txp_users', "{$criteria}"); if (isset($qty)) { $customers_list_pageby = $qty; } else { $customers_list_pageby = 15; } $limit = max(@$customers_list_pageby, 15); list($page, $offset, $numPages) = pager($total, $limit, $page); $rs = safe_rows_start('*', 'txp_users', "{$criteria} order by {$sort_sql} limit {$offset}, {$limit}"); $customersOnPage = $offset + $limit; if ($rs) { echo n . n . '<form name="longform" method="post" action="index.php" onsubmit="return verify(\'' . gTxt('are_you_sure') . '\')">' . n . startTable('list', '', '', '', '700') . n . tr(n . tda("Displaying {$offset} - {$customersOnPage} of {$total} customers", ' colspan="2" style="border: none; padding-bottom: 15px;"') . n . tda('<a href="?event=customers&step=edit_customer" class="navlink">Add a new customer</a> <a href="?event=customers&step=export_customer" class="navlink">Export customers</a>', ' colspan="2" style="text-align: right; border: none; padding-bottom: 15px;"')) . n . tr(n . column_head('Customer', 'RealName', 'customers', true, $switch_dir, $crit, $search_method) . column_head('Phone', 'shipping_phone', 'customers', true, $switch_dir, $crit, $search_method) . column_head('Email', 'email', 'customers', true, $switch_dir, $crit, $search_method) . column_head('Orders', 'order_num', 'customers', true, $switch_dir, $crit, $search_method)); include_once txpath . '/publish/taghandlers.php'; while ($a = nextRow($rs)) { extract($a); $order_num = safe_count("orders", "user_id = {$user_id}"); $RealName = eLink('customers', 'edit_customer', 'user_id', $user_id, $RealName); $Orders = eLink('order', 'edit', 'customer', $name, $order_num); echo n . n . tr(n . td($RealName, "25%") . td($billing_phone, "25%") . td($email, "25%") . td($Orders, "25%")); } echo n . endTable() . n . '</form>' . n . nav_form('customers', $page, $numPages, $sort, $dir, $crit, $search_method) . n . pageby_form('customers', $customers_list_pageby); } }
//TORRENT if ($type == "torrent") { $res = SQL_Query_exec("SELECT id, name FROM torrents WHERE id = {$id}"); $row = mysql_fetch_array($res); if (!$row) { show_error_msg(T_("ERROR"), "News id invalid", 0); stdfoot(); } echo "<center><b>" . T_("COMMENTSFOR") . "</b> <a href='torrents-details.php?id=" . $row['id'] . "'>" . htmlspecialchars($row['name']) . "</a></center><br />"; } begin_frame(T_("COMMENTS")); $subres = SQL_Query_exec("SELECT COUNT(*) FROM comments WHERE {$type} = {$id}"); $subrow = mysql_fetch_array($subres); $commcount = $subrow[0]; if ($commcount) { list($pagertop, $pagerbottom, $limit) = pager(10, $commcount, "comments.php?id={$id}&type={$type}&"); $commquery = "SELECT comments.id, text, user, comments.added, avatar, signature, username, title, class, uploaded, downloaded, privacy, donated FROM comments LEFT JOIN users ON comments.user = users.id WHERE {$type} = {$id} ORDER BY comments.id {$limit}"; $commres = SQL_Query_exec($commquery); } else { unset($commres); } if ($commcount) { print $pagertop; commenttable($commres, $type); print $pagerbottom; } else { print "<br /><b>" . T_("NOCOMMENTS") . "</b><br />\n"; } echo "<center>"; echo "<form name=\"comment\" method=\"post\" action=\"comments.php?type={$type}&id={$id}&takecomment=yes\">"; echo textbbcode("comment", "body") . "<br />";
<!--List Item--> <tr> <td><?php echo htmlspecialchars(nicedate($log[$n]["date"],true)) ?></td> <td><?php echo htmlspecialchars($log[$n]["fullname"])?></td> <td><?php echo $lang["collectionlog-" . $log[$n]["type"]] ; if ($log[$n]["notes"] != "" ) { ## notes field contains user IDs, collection references and /or standard texts ## Translate the standard texts $standard = array('#all_users', '#new_resource'); $translated = array($lang["all_users"], $lang["new_resource"]); $newnotes = str_replace($standard, $translated, $log[$n]["notes"]); echo $newnotes; } ?></td> <td><?php if ($log[$n]['resource']!=0){?><a onClick="return CentralSpaceLoad(this,true);" href='<?php echo $baseurl_short?>pages/view.php?ref=<?php echo urlencode($log[$n]["resource"]) ?>'><?php echo $log[$n]["resource"]?></a><?php } ?></td> <td><?php if ($log[$n]['resource']!=0){?><a onClick="return CentralSpaceLoad(this,true);" href='<?php echo $baseurl_short?>pages/view.php?ref=<?php echo urlencode($log[$n]["resource"]) ?>'><?php echo i18n_get_translated($log[$n]["title"])?></a><?php } ?></td> </tr> <?php } ?> </table> </div> <!-- End of Listview --> <div class="BottomInpageNav"> <?php pager(false); ?></div> </div> <!-- End of BasicsBox --> <?php include "../include/footer.php"; ?>
if ($s && $w == "name") { $where = "WHERE s.name LIKE " . sqlesc("%" . $s . "%"); } elseif ($s && $w == "imdb") { $where = "WHERE s.imdb LIKE " . sqlesc("%" . $s . "%"); } elseif ($s && $w == "comment") { $where = "WHERE s.comment LIKE " . sqlesc("%" . $s . "%"); } else { $where = ""; } $link = $s && $w ? "s={$s}&w={$w}&" : ""; $count = get_row_count("subtitles AS s", "{$where}"); if ($count == 0 && !$s && !$w) { stdmsg("", "There is no subtitle, go <a href=\"subtitles.php?mode=upload\">here</a> and start uploading.", false); } $perpage = 5; $pager = pager($perpage, $count, "subtitles.php?" . $link); $res = sql_query("SELECT s.id, s.name,s.lang, s.imdb,s.fps,s.poster,s.cds,s.hits,s.added,s.owner,s.comment, u.username FROM subtitles AS s LEFT JOIN users AS u ON s.owner=u.id {$where} ORDER BY s.added DESC {$pager['limit']}") or sqlerr(__FILE__, __LINE__); $HTMLOUT .= "<table width='700' cellpadding='5' cellspacing='0' border='0' align='center' style='font-weight:bold'>\n<tr><td style='border:none' valign='middle'>\n<fieldset style='text-align:center; border:#0066CC solid 1px; background-color:#999999'>\n<legend style='text-align:center; border:#0066CC solid 1px ; background-color:#999999;font-size:13px;'><b>Search</b></legend>\n<form action='subtitles.php' method='get'>\n<input size='50' value='" . $s . "' name='s' type='text' />\n<select name='w'>\n<option value='name' " . ($w == "name" ? "selected='selected'" : "") . ">Name</option>\n<option value='imdb' " . ($w == "imdb" ? "selected='selected'" : "") . ">IMDb</option>\n<option value='comment' " . ($w == "comment" ? "selected='selected'" : "") . ">Comments</option>\n</select>\n<input type='submit' value='Search' /> <input type='button' onclick=\"window.location.href='subtitles.php?mode=upload'\" value='Upload' />\n</form></fieldset></td></tr>"; if ($s) { $HTMLOUT .= "<tr><td style='border:none;'>Search result for <i>'{$s}'</i><br />" . (mysqli_num_rows($res) == 0 ? "Nothing found! Try again with a refined search string." : "") . "</td></tr>"; } $HTMLOUT .= "\n</table>\n<br />"; if (mysqli_num_rows($res) > 0) { if ($count > $perpage) { $HTMLOUT .= "<div align=\"left\" style=\"padding:5px\">{$pager['pagertop']}</div>"; } $HTMLOUT .= "<table width='700' cellpadding='5' cellspacing='0' border='1' align='center' style='font-weight:bold'>\n<tr><td class='colhead' align='center'>Lang</td>\n<td class='colhead' align='left' style='width:80%'>Name</td>\n<td class='colhead' align='center'>IMDb</td>\n<td class='colhead' align='center'>Added</td>\n<td class='colhead' align='center'>Hits</td>\n<td class='colhead' align='center'>FPS</td>\n<td class='colhead' align='center'>CD#</td>"; while ($arr = mysqli_fetch_assoc($res)) { if ($arr["owner"] == $CURUSER["id"] || $CURUSER['class'] > UC_MODERATOR) { $HTMLOUT .= "<td class='colhead' align='center'>Tools</td>"; }
?> </h1> <div class="pull-right"> <a class="btn btn-primary" href="<?php echo site_url('import/form'); ?> "><i class="icon-plus icon-white"></i> <?php echo lang('new'); ?> </a> </div> <div class="pull-right"> <?php echo pager(site_url('import/index'), 'mdl_import'); ?> </div> </div> <?php echo $this->layout->load_view('layout/alerts'); ?> <table class="table table-striped"> <thead> <tr> <th><?php echo lang('id');
} else { $admintpl->set("poll_delete", false, true); } $admintpl->set("show_poller", false, true); $admintpl->set("new_poll", true, true); $admintpl->set("polls", $polls); $admintpl->set("new_polls", $newpolls); } /*** * Show poll voters ***/ if (isset($votes) && !isset($_POST['new']) && empty($id)) { //Per Page Listing Limitation Start - 7:29 PM 3/22/2007 $count = $voters; $perpage = $GLOBALS["votesppage"]; list($pagertop, $pagerbottom, $limit) = pager($perpage, $count, "index.php?page=admin&user="******"uid"] . "&code=" . $CURUSER["random"] . "&do=poller&votes=" . $votes . "&voters=" . $voters . "&" . $addparams); //Per Page Listing Limitation Stop //mysql query to select all information on polls in the database $resource = do_sqlquery("SELECT pv.*, username, prefixcolor, suffixcolor, optionText, defaultChecked FROM {$TABLE_PREFIX}poller_vote pv LEFT JOIN {$TABLE_PREFIX}users u ON pv.memberID=u.id LEFT JOIN {$TABLE_PREFIX}users_level ul on u.id_level=ul.id_level LEFT JOIN {$TABLE_PREFIX}poller_option po on pv.optionID=po.ID WHERE pv.pollerID='" . $votes . "' GROUP BY pv.voteDate " . $limit . "", true); //die("SELECT pv.*, username, prefixcolor, suffixcolor, optionText, defaultChecked FROM {$TABLE_PREFIX}poller_vote pv LEFT JOIN {$TABLE_PREFIX}users u ON pv.memberID=u.id LEFT JOIN {$TABLE_PREFIX}users_level ul on u.id_level=ul.id_level LEFT JOIN {$TABLE_PREFIX}poller_option po on pv.optionID=po.ID WHERE pv.pollerID='".$votes."' GROUP BY pv.voteDate ".$limit.""); $block_title = $language["POLLING_SYSTEM"] . " - " . $language["POLL_VOTERS"]; //Per Page Listing Limitation Start - 7:35 PM 3/22/2007 if ($count > $perpage) { $admintpl->set("poll_pager_top", $pagertop); } else { $admintpl->set("poll_pager_top", ""); } //Per Page Listing Limitation Stop $i = 0; while ($results = mysqli_fetch_assoc($resource)) { //background color for checked poll option
$HTMLOUT .= "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\r\n\t\t\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\r\n\t\t<html xmlns='http://www.w3.org/1999/xhtml'>\r\n\t\t<head>\r\n\t\t<title>Error!</title>\r\n\t\t</head>\r\n\t\t<body>\r\n\t<div style='font-size:33px;color:white;background-color:red;text-align:center;'>Incorrect access<br />You cannot access this file directly.</div>\r\n\t</body></html>"; echo $HTMLOUT; exit; } require_once INCL_DIR . 'user_functions.php'; require_once INCL_DIR . 'pager_functions.php'; require_once INCL_DIR . 'html_functions.php'; require_once INCL_DIR . 'bbcode_functions.php'; require_once CLASS_DIR . 'class_check.php'; class_check(UC_STAFF); $lang = array_merge($lang); $HTMLOUT = ''; // ////////////////////// $count1 = get_row_count('shoutbox'); $perpage = 15; $pager = pager($perpage, $count1, 'staffpanel.php?tool=shistory&action=shistory&'); $res = sql_query("SELECT s.id, s.userid, s.date , s.text, s.to_user, u.username, u.pirate, u.king, u.enabled, u.class, u.donor, u.warned, u.leechwarn, u.chatpost FROM shoutbox as s LEFT JOIN users as u ON s.userid=u.id ORDER BY s.date DESC " . $pager['limit'] . "") or sqlerr(__FILE__, __LINE__); if ($count1 > $perpage) { $HTMLOUT .= $pager['pagertop']; } $HTMLOUT .= begin_main_frame(); if (mysql_num_rows($res) == 0) { $HTMLOUT .= "No shouts here"; } else { $HTMLOUT .= "<table align='center' border='0' cellspacing='0' cellpadding='2' width='100%' class='small'>\n"; while ($arr = mysql_fetch_assoc($res)) { if ($arr['to_user'] != $CURUSER['id'] && $arr['to_user'] != 0 && $arr['userid'] != $CURUSER['id']) { continue; } if ($arr['to_user'] == $CURUSER['id'] || $arr['userid'] == $CURUSER['id'] && $arr['to_user'] != 0) { $private = "<img src='{$INSTALLER09['pic_base_url']}private-shout.png' alt='Private shout' title='Private shout!' width='16' style='padding-left:2px;padding-right:2px;' border='0' />";
<thead> <tr> <th>Message</th> <th>Added</th> <th>User</th> <th>IP</th> <th>Trace</th> <th>User agent</th> </tr> </thead> <tbody> '; $from = get_pager_from($_GET); $num_exceptions = db_count_num('exceptions'); $results_per_page = 30; pager(CONFIG_SITE_ADMIN_URL . 'list_exceptions/', $num_exceptions, $results_per_page, $from); $exceptions = db_query_fetch_all(' SELECT e.id, e.message, e.added, e.added_by, e.trace, INET_NTOA(e.user_ip) AS user_ip, e.user_agent, u.team_name FROM exceptions AS e LEFT JOIN users AS u ON u.id = e.added_by ORDER BY e.id DESC LIMIT ' . $from . ', ' . $results_per_page); foreach ($exceptions as $exception) {
</h1> <div class="pull-right"> <a class="btn btn-sm btn-primary" href="<?php echo site_url('custom_fields/form'); ?> "> <i class="fa fa-plus"></i> <?php echo lang('new'); ?> </a> </div> <div class="pull-right"> <?php echo pager(site_url('custom_fields/index'), 'mdl_custom_fields'); ?> </div> </div> <div id="content table-content"> <?php echo $this->layout->load_view('layout/alerts'); ?> <table class="table table-striped"> <thead> <tr>
require_once CLASS_DIR . 'class_check.php'; class_check(UC_SYSOP); $lang = array_merge($lang); $HTMLOUT = $where = ''; $search = isset($_POST['search']) ? strip_tags($_POST['search']) : ''; if (!empty($search)) { $where = "WHERE txt LIKE " . sqlesc("%{$search}%") . ""; } //== Delete items older than 1 month $secs = 30 * 86400; sql_query("DELETE FROM infolog WHERE " . time() . " - added > {$secs}") or sqlerr(__FILE__, __LINE__); $res = sql_query("SELECT COUNT(*) FROM infolog {$where}"); $row = mysql_fetch_array($res); $count = $row[0]; $perpage = 15; $pager = pager($perpage, $count, "staffpanel.php?tool=sysoplog&action=sysoplog&"); $HTMLOUT = ''; $res = sql_query("SELECT added, txt FROM infolog {$where} ORDER BY added DESC {$pager['limit']}") or sqlerr(__FILE__, __LINE__); $HTMLOUT .= "<h1>Staff actions log</h1>"; $HTMLOUT .= "<table border='1' cellspacing='0' width='115' cellpadding='5'>\n\r\n <tr>\r\n\t\t\t <td class='tabletitle' align='left'>Search Log</td>\n\r\n\t\t\t </tr>\r\n <tr>\r\n\t\t\t <td class='table' align='left'>\n\r\n\t\t\t <form method='post' action='staffpanel.php?tool=sysoplog&action=sysoplog'>\n\r\n\t\t\t <input type='text' name='search' size='40' value='' />\n\r\n\t\t\t <input type='submit' value='Search' style='height: 20px' />\n\r\n\t\t\t </form></td></tr></table>"; if ($count > $perpage) { $HTMLOUT .= $pager['pagertop']; } if (mysql_num_rows($res) == 0) { $HTMLOUT .= "<b>No records found</b>"; } else { $HTMLOUT .= "<table border='1' cellspacing='0' cellpadding='5'>\r\n <tr>\r\n <td class='colhead' align='left'>Date</td>\r\n <td class='colhead' align='left'>Time</td>\r\n <td class='colhead' align='left'>Event</td>\r\n </tr>"; while ($arr = mysql_fetch_assoc($res)) { $color = '#FF4763'; if (strpos($arr['txt'], 'Warned')) { $color = "#FF0000";
$totalrows = mysql_result($res, 0, 0); $loop = array(); if (!empty($totalrows)) { if ($o >= $totalrows) { $o = $totalrows - $r; $o = $o >= 0 ? $o : 0; } $query = "SELECT * FROM {$from} WHERE {$where} ORDER BY `news_id` DESC LIMIT {$o},{$r}"; if (!($res = @mysql_query($query))) { trigger_error(mysql_error(), E_USER_ERROR); } while ($rsrow = mysql_fetch_assoc($res)) { $rsrow['news_title'] = sanitize_and_format($rsrow['news_title'], TYPE_STRING, $__field2format[TEXT_DB2DISPLAY]); $loop[] = $rsrow; } $output['pager2'] = pager($totalrows, $o, $r); } $output['return2me'] = 'site_news.php'; if (!empty($_SERVER['QUERY_STRING'])) { $output['return2me'] .= '?' . $_SERVER['QUERY_STRING']; } $output['return2me'] = rawurlencode($output['return2me']); $tpl->set_file('content', 'site_news.html'); $tpl->set_loop('loop', $loop); $tpl->set_var('output', $output); $tpl->process('content', 'content', TPL_LOOP | TPL_NOLOOP); $tpl->drop_loop('loop'); $tpl->drop_var('output.pager2'); unset($loop); $tplvars['title'] = 'Site news'; $tplvars['page'] = 'site_news';
</h1> <div class="pull-right"> <a class="btn btn-sm btn-primary" href="<?php echo site_url('families/form'); ?> "><i class="fa fa-plus"></i> <?php echo lang('new'); ?> </a> </div> <div class="pull-right"> <?php echo pager(site_url('families/index'), 'mdl_families'); ?> </div> </div> <div id="content" class="table-content"> <?php $this->layout->load_view('layout/alerts'); ?> <div class="table-responsive"> <table class="table table-striped"> <thead>
print $HTMLOUT; exit; } require_once INCL_DIR . 'user_functions.php'; require_once INCL_DIR . 'pager_functions.php'; require_once INCL_DIR . 'html_functions.php'; require_once INCL_DIR . 'bbcode_functions.php'; $lang = array_merge($lang); if (!min_class(UC_STAFF)) { header("Location: {$TBDEV['baseurl']}/index.php"); } $HTMLOUT = ""; // ////////////////////// $count1 = get_row_count('shoutbox'); $perpage = 15; $pager = pager($perpage, $count1, 'admin.php?action=shistory&'); $res = sql_query("SELECT s.id, s.userid, s.date , s.text, s.to_user, u.username, u.pirate, u.king, u.enabled, u.class, u.donor, u.warned, u.leechwarn, u.chatpost FROM shoutbox as s LEFT JOIN users as u ON s.userid=u.id ORDER BY s.date DESC " . $pager['limit'] . "") or sqlerr(__FILE__, __LINE__); if ($count1 > $perpage) { $HTMLOUT .= $pager['pagertop']; } $HTMLOUT .= begin_main_frame(); if (mysql_num_rows($res) == 0) { $HTMLOUT .= "No shouts here"; } else { $HTMLOUT .= "<table align='center' border='0' cellspacing='0' cellpadding='2' width='100%' class='small'>\n"; while ($arr = mysql_fetch_assoc($res)) { if ($arr['to_user'] != $CURUSER['id'] && $arr['to_user'] != 0 && $arr['userid'] != $CURUSER['id']) { continue; } if ($arr['to_user'] == $CURUSER['id'] || $arr['userid'] == $CURUSER['id'] && $arr['to_user'] != 0) { $private = "<img src='{$TBDEV['pic_base_url']}private-shout.png' alt='Private shout' title='Private shout!' width='16' style='padding-left:2px;padding-right:2px;' border='0' />";
} $HTMLOUT .= "<tr>\r\n<td align='right'><b>offered By</b></td><td align='left'>\r\n<a class='altlink' href='userdetails.php?id={$num['userid']}'>{$num['username']}</a> {$edit} {$delete} {$reset} |\r\n<a class='altlink' href='viewoffers.php'><b>All offers</b></a> </td></tr><tr><td align='right'>\r\n<b>Vote for this offer</b></td><td align='left'><a href='viewoffers.php?id=" . $id . "&offer_vote'><b>Vote</b></a>\r\n</td></tr>\r\n" . ($INSTALLER09['reports'] ? "<tr><td align='right'><b>Report Offer</b></td><td align='left'>\r\nfor breaking the rules \r\n<form action='report.php?type=Offer&id={$id}' method='post'><input class='btn' type='submit' name='submit' value='Report Offer' /></form></td>\r\n</tr>" : ''); if ($num['torrentid'] == 0) { $HTMLOUT .= "<tr><td align='right' valign='top'><b>Accept This Offer</b></td>\r\n <td>\r\n <form method='post' action='viewoffers.php?id=" . $id . "&offer_filled'>\r\n <strong>" . $INSTALLER09['baseurl'] . "/details.php?id=</strong><input type='text' size='10' name='torrentid' value='' /> <input type='submit' value='Fill Offer' class='btn' /><br />\r\n Enter the <b>ID</b> of the torrent. (copy/paste the <strong>ID</strong> from another window/tab the correct ID number)<br /></form></td>\r\n </tr>\n"; } else { $HTMLOUT .= "<tr><td align='right' valign='top'><b>This Offer was accepted:</b></td><td><a class='altlink' href='details.php?id=" . $num['torrentid'] . "'><b>" . $INSTALLER09['baseurl'] . "/details.php?id=" . $num['torrentid'] . "</b></a></td></tr>"; } $HTMLOUT .= "<tr><td class='embedded' colspan='2'><p><a name='startcomments'></a></p>\n"; $commentbar = "<p align='center'><a class='index' href='comment.php?action=add&tid={$id}&type=offer'>Add Comment</a></p>\n"; $subres = sql_query("SELECT COUNT(*) FROM comments WHERE offer = {$id}"); $subrow = mysql_fetch_array($subres); $count = $subrow[0]; $HTMLOUT .= '</td></tr></table>'; if (!$count) { $HTMLOUT .= '<h2>No comments</h2>'; } else { $pager = pager(25, $count, "viewoffers.php?id={$id}&offer_details&", array('lastpagedefault' => 1)); $subres = sql_query("SELECT comments.id, comments.text, comments.user, comments.editedat, \r\n comments.editedby, comments.ori_text, comments.offer AS offer, \r\n comments.added, comments.anonymous, users.avatar, users.av_w ,users.av_h,\r\n users.warned, users.username, users.title, users.class, users.last_access, \r\n users.enabled, users.reputation, users.donor, users.downloaded, users.uploaded \r\n FROM comments LEFT JOIN users ON comments.user = users.id \r\n WHERE offer = {$id} ORDER BY comments.id") or sqlerr(__FILE__, __LINE__); $allrows = array(); while ($subrow = mysql_fetch_assoc($subres)) { $allrows[] = $subrow; } $HTMLOUT .= $commentbar; $HTMLOUT .= $pager['pagertop']; require_once INCL_DIR . 'html_functions.php'; $HTMLOUT .= commenttable($allrows, 'offer'); $HTMLOUT .= $pager['pagerbottom']; } $HTMLOUT .= $commentbar; /////////////////////// HTML OUTPUT ////////////////////////////// print stdhead('Offer Details') . $HTMLOUT . stdfoot($stdfoot);
<div id="headerbar"> <h1><?php echo lang('recurring_invoices'); ?> </h1> <div class="pull-right"> <?php echo pager(site_url('invoices/recurring/index'), 'mdl_invoices_recurring'); ?> </div> </div> <div id="content" class="table-content"> <div id="filter_results"> <div class="table-responsive"> <table class="table table-striped"> <thead> <tr> <th><?php echo lang('status'); ?> </th> <th><?php echo lang('base_invoice'); ?> </th> <th><?php echo lang('client');
} $res = sql_query("SELECT users.id, users.username, usersachiev.achpoints, usersachiev.spentpoints FROM users LEFT JOIN usersachiev ON users.id = usersachiev.id WHERE users.id = " . sqlesc($id)) or sqlerr(__FILE__, __LINE__); $arr = mysqli_fetch_assoc($res); if (!$arr) { stderr("Error", "It appears that there is no user with that id."); } $achpoints = (int) $arr['achpoints']; $spentpoints = (int) $arr['spentpoints']; $res = sql_query("SELECT COUNT(*) FROM achievements WHERE userid =" . sqlesc($id)) or sqlerr(__FILE__, __LINE__); $row = mysqli_fetch_row($res); $count = $row[0]; $perpage = 15; if (!$count) { stderr("No Achievements", "It appears that <a class='altlink' href='userdetails.php?id=" . (int) $arr['id'] . "'>" . htmlsafechars($arr['username']) . "</a> currently has no achievements."); } $pager = pager($perpage, $count, "?id={$id}&"); if ($id == $CURUSER['id']) { $HTMLOUT .= "<span class='btn'><a href='/achievementlist.php'>[<b>Achievements List</b>]</a></span> <span class='btn'><a href='/postcounter.php'>[<b>Forum Post Counter</b>]</a></span> <span class='btn'><a href='/topiccounter.php'>[<b>Forum Topic Counter</b>]</a></span> <span class='btn'><a href='/invitecounter.php'>[<b>Invite Counter</b>]</a></span>"; } $HTMLOUT .= "<h1>Achievements for user: <a class='altlink' href='{$INSTALLER09['baseurl']}/userdetails.php?id=" . (int) $arr['id'] . "'>" . htmlsafechars($arr['username']) . "</a></h1>\n <h2>Currently " . htmlsafechars($row['0']) . " achievement" . ($row[0] == 1 ? "" : "s") . ".</h2>\n"; if ($id == $CURUSER['id']) { $HTMLOUT .= "<h2><a class='altlink' href='achievementbonus.php'>" . htmlsafechars($achpoints) . " Points Available // " . htmlsafechars($spentpoints) . " Points spent.</a></h2>\n"; } if ($count > $perpage) { $HTMLOUT .= $pager['pagertop']; } $HTMLOUT .= "<table border='0' cellspacing='0' cellpadding='5'>\n <tr>\n <td class='colhead' align='center'>Award</td>\n <td class='colhead' align='center'>Description</td>\n <td class='colhead' align='center'>Date Earned</td>\n </tr>\n"; $res = sql_query("SELECT * FROM achievements WHERE userid=" . sqlesc($id) . " ORDER BY date DESC {$pager['limit']}") or sqlerr(__FILE__, __LINE__); while ($arr = mysqli_fetch_assoc($res)) { $HTMLOUT .= "<tr>\n <td class='one' align='center'><img src='pic/achievements/" . htmlsafechars($arr['icon']) . "' alt='" . htmlsafechars($arr['achievement']) . "' title='" . htmlsafechars($arr['achievement']) . "' /></td>\n <td class='two' align='center'>" . htmlsafechars($arr['description']) . "</td>\n <td class='one' align='center'>" . get_date($arr['date'], '') . "</td>\n </tr>\n"; }
if ($_SERVER["REQUEST_METHOD"] == "POST") { $email = htmlsafechars(trim($_POST["email"])); $comment = htmlsafechars(trim($_POST["comment"])); if (!$email || !$comment) { stderr("{$lang['ad_banemail_error']}", "{$lang['ad_banemail_missing']}"); } sql_query("INSERT INTO bannedemails (added, addedby, comment, email) VALUES(" . TIME_NOW . ", " . sqlesc($CURUSER['id']) . ", " . sqlesc($comment) . ", " . sqlesc($email) . ")") or sqlerr(__FILE__, __LINE__); header("Location: staffpanel.php?tool=bannedemails"); die; } $HTMLOUT .= begin_frame("{$lang['ad_banemail_add']}", true); $HTMLOUT .= "<form method=\"post\" action=\"staffpanel.php?tool=bannedemails\">\n<table border='1' cellspacing='0' cellpadding='5'>\n<tr><td class='rowhead'>{$lang['ad_banemail_email']}</td>\n<td><input type=\"text\" name=\"email\" size=\"40\"/></td></tr>\n<tr><td class='rowhead'align='left'>{$lang['ad_banemail_comment']}</td>\n<td><input type=\"text\" name=\"comment\" size=\"40\"/></td></tr>\n<tr><td colspan='2'>{$lang['ad_banemail_info']}</td></tr>\n<tr><td colspan='2' align='center'>\n<input type=\"submit\" value=\"{$lang['ad_banemail_ok']}\" class=\"btn\"/></td></tr>\n</table></form>\n"; $HTMLOUT .= end_frame(); $count1 = get_row_count('bannedemails'); $perpage = 15; $pager = pager($perpage, $count1, 'staffpanel.php?tool=bannedemails&'); $res = sql_query("SELECT b.id, b.added, b.addedby, b.comment, b.email, u.username FROM bannedemails AS b LEFT JOIN users AS u ON b.addedby=u.id ORDER BY added DESC " . $pager['limit']) or sqlerr(__FILE__, __LINE__); $HTMLOUT .= begin_frame("{$lang['ad_banemail_current']}", true); if ($count1 > $perpage) { $HTMLOUT .= $pager['pagertop']; } if (mysqli_num_rows($res) == 0) { $HTMLOUT .= "<p align='center'><b>{$lang['ad_banemail_nothing']}</b></p>\n"; } else { $HTMLOUT .= "<table border='1' cellspacing='0' cellpadding='5'>\n"; $HTMLOUT .= "<tr><td class='colhead'>{$lang['ad_banemail_add1']}</td><td class='colhead' align='left'>{$lang['ad_banemail_email']}</td>" . "<td class='colhead' align='left'>{$lang['ad_banemail_by']}</td><td class='colhead' align='left'>{$lang['ad_banemail_comment']}</td><td class='colhead'>{$lang['ad_banemail_remove']}</td></tr>\n"; while ($arr = mysqli_fetch_assoc($res)) { $HTMLOUT .= "<tr><td align='left'>" . get_date($arr['added'], '') . "</td>\n <td align='left'>" . htmlsafechars($arr['email']) . "</td>\n <td align='left'><a href='{$INSTALLER09['baseurl']}/userdetails.php?id=" . (int) $arr['addedby'] . "'>" . htmlsafechars($arr['username']) . "</a></td>\n <td align='left'>" . htmlsafechars($arr['comment']) . "</td>\n <td align='left'><a href='staffpanel.php?tool=bannedemails&remove=" . (int) $arr['id'] . "'>{$lang['ad_banemail_remove1']}</a></td></tr>\n"; } $HTMLOUT .= "</table>\n"; }
exit; } require_once INCL_DIR . 'user_functions.php'; require_once INCL_DIR . 'html_functions.php'; require_once INCL_DIR . 'pager_functions.php'; require_once CLASS_DIR . 'class_check.php'; class_check(UC_STAFF); $lang = array_merge($lang); $HTMLOUT = $count = ''; $res = sql_query("SELECT COUNT(id) FROM peers") or sqlerr(__FILE__, __LINE__); $row = mysqli_fetch_row($res); $count = $row[0]; $peersperpage = 15; $HTMLOUT .= "<h2 align='center'>Site peers</h2>\r\n<font class='small'>There is approx " . htmlsafechars($count) . " peers currently</font>"; $HTMLOUT .= begin_main_frame(); $pager = pager($peersperpage, $count, "staffpanel.php?tool=view_peers&action=view_peers&"); if ($count > $peersperpage) { $HTMLOUT .= $pager['pagertop']; } $sql = "SELECT p.id, p.userid, p.torrent, p.passkey, p.peer_id, p.ip, p.port, p.uploaded, p.downloaded, p.to_go, p.seeder, p.started, p.last_action, p.connectable, p.agent, p.finishedat, p.downloadoffset, p.uploadoffset, u.username, t.name " . "FROM peers AS p " . "LEFT JOIN users AS u ON u.id=p.userid " . "LEFT JOIN torrents AS t ON t.id=p.torrent WHERE started != '0'" . "ORDER BY p.started DESC {$pager['limit']}"; $result = sql_query($sql) or sqlerr(__FILE__, __LINE__); if (mysqli_num_rows($result) != 0) { $HTMLOUT .= "<table width='100%' border='1' cellspacing='0' cellpadding='5' align='center'>\r\n<tr>\r\n<td class='colhead' align='center' width='1%'>User</td>\r\n<td class='colhead' align='center' width='1%'>Torrent</td>\r\n<td class='colhead' align='center' width='1%'>Ip</td>\r\n<td class='colhead' align='center' width='1%'>Port</td>\r\n<td class='colhead' align='center' width='1%'>Up</td>\r\n" . ($INSTALLER09['ratio_free'] ? "" : "<td class='colhead' align='center' width='1%'>Dn</td>") . "\r\n<td class='colhead' align='center' width='1%'>Pssky</td>\r\n<td class='colhead' align='center' width='1%'>Con</td>\r\n<td class='colhead' align='center' width='1%'>Seed</td>\r\n<td class='colhead' align='center' width='1%'>Start</td>\r\n<td class='colhead' align='center' width='1%'>Last</td>\r\n<td class='colhead' align='center' width='1%'>Up/Off</td>\r\n" . ($INSTALLER09['ratio_free'] ? "" : "<td class='colhead' align='center' width='1%'>Dn/Off</td>") . "\r\n<td class='colhead' align='center' width='1%'>To Go</td>\r\n</tr>"; while ($row = mysqli_fetch_assoc($result)) { $smallname = substr(htmlsafechars($row["name"]), 0, 25); if ($smallname != htmlsafechars($row["name"])) { $smallname .= '...'; } $HTMLOUT .= '<tr> <td><a href="userdetails.php?id=' . (int) $row['userid'] . '">' . htmlsafechars($row['username']) . '</a></td> <td><a href="details.php?id=' . (int) $row['torrent'] . '">' . $smallname . '</a></td>
echo $users_url; ?> " onClick="return CentralSpaceLoad(this,true);"><?php echo $lang["users"]; ?> </a> </div> </td> </tr> <?php } ?> </table> </div> <div class="BottomInpageNav"><?php pager(false); ?> </div> </div> <!-- end of BasicsBox --> <div class="BasicsBox"> <form method="post" action="<?php echo $baseurl_short; ?> pages/admin/admin_group_management.php" onSubmit="return CentralSpacePost(this,false);"> <input type="hidden" name="orderby" value="<?php echo $order_by; ?> ">
stderr($lang['cheaters_err'], $lang['cheaters_seluser']); } if (!empty($_POST["remove"])) { sql_query("DELETE FROM cheaters WHERE id IN (" . implode(", ", array_map("sqlesc", $_POST["remove"])) . ")") or sqlerr(__FILE__, __LINE__); } if (!empty($_POST["desact"])) { sql_query("UPDATE users SET enabled = 'no' WHERE id IN (" . implode(", ", array_map("sqlesc", $_POST["desact"])) . ")") or sqlerr(__FILE__, __LINE__); } } $HTMLOUT .= "<div class='row'><div class='col-md-12'>"; $HTMLOUT .= "<h2>{$lang['cheaters_users']}</h2>"; $res = sql_query("SELECT COUNT(*) FROM cheaters") or sqlerr(__FILE__, __LINE__); $row = mysqli_fetch_array($res); $count = $row[0]; $perpage = 15; $pager = pager($perpage, $count, "staffpanel.php?tool=cheaters&action=cheaters&"); $HTMLOUT .= "<form action='staffpanel.php?tool=cheaters&action=cheaters' method='post'>\n<script type='text/javascript'>\n/*<![CDATA[*/\nfunction klappe(id)\n{var klappText=document.getElementById('k'+id);var klappBild=document.getElementById('pic'+id);if(klappText.style.display=='none'){klappText.style.display='block';}\nelse{klappText.style.display='none';}}\nfunction klappe_news(id)\n{var klappText=document.getElementById('k'+id);var klappBild=document.getElementById('pic'+id);if(klappText.style.display=='none'){klappText.style.display='block';klappBild.src='{$INSTALLER09['pic_base_url']}minus.gif';}\nelse{klappText.style.display='none';klappBild.src='{$INSTALLER09['pic_base_url']}plus.gif';}}\t\n</script>\n<script type='text/javascript'>\nvar checkflag = 'false';\nfunction check(field) {\nif (checkflag == 'false') {\nfor (i = 0; i < field.length; i++) {\nfield[i].checked = true;}\ncheckflag = 'true';\nreturn 'Uncheck All Disable'; }\nelse {\nfor (i = 0; i < field.length; i++) {\nfield[i].checked = false; }\ncheckflag = 'false';\nreturn 'Check All Disable'; }\n}\nfunction check2(field) {\nif (checkflag == 'false') {\nfor (i = 0; i < field.length; i++) {\nfield[i].checked = true;}\ncheckflag = 'true';\nreturn 'Uncheck All Remove'; }\nelse {\nfor (i = 0; i < field.length; i++) {\nfield[i].checked = false; }\ncheckflag = 'false';\nreturn 'Check All Remove'; }\n}\n/*]]>*/\n</script>"; if ($count > $perpage) { $HTMLOUT .= $pager['pagertop']; } $HTMLOUT .= "<table class='table table-bordered'>\n<tr>\n<td>#</td>\n<td>{$lang['cheaters_uname']}</td>\n<td>{$lang['cheaters_d']}</td>\n<td>{$lang['cheaters_r']}</td></tr>\n"; $res = sql_query("SELECT c.id as cid, c.added, c.userid, c.torrentid, c.client, c.rate, c.beforeup, c.upthis, c.timediff, c.userip, u.id, u.username, u.class, u.downloaded, u.uploaded, u.chatpost, u.leechwarn, u.warned, u.pirate, u.king, u.donor, u.enabled, t.id AS tid, t.name AS tname FROM cheaters AS c LEFT JOIN users AS u ON u.id=c.userid LEFT JOIN torrents AS t ON t.id=c.torrentid ORDER BY added DESC " . $pager['limit']) or sqlerr(__FILE__, __LINE__); while ($arr = mysqli_fetch_assoc($res)) { $torrname = htmlsafechars(CutName($arr["tname"], 80)); $users = $arr; $users['id'] = (int) $arr['userid']; $cheater = "<b><a href='{$INSTALLER09['baseurl']}/userdetails.php?id=" . (int) $arr['id'] . "'>" . format_username($users) . "</a></b>{$lang['cheaters_hbcc']}<br />\n <b>{$lang['cheaters_torrent']} <a href='{$INSTALLER09['baseurl']}/details.php?id=" . (int) $arr['tid'] . "' title='{$torrname}'>{$torrname}</a></b>\n<br />{$lang['cheaters_upped']} <b>" . mksize((int) $arr['upthis']) . "</b><br />{$lang['cheaters_speed']} <b>" . mksize((int) $arr['rate']) . "/s</b><br />{$lang['cheaters_within']} <b>" . (int) $arr['timediff'] . " {$lang['cheaters_sec']}</b><br />{$lang['cheaters_uc']} <b>" . htmlsafechars($arr['client']) . "</b><br />{$lang['cheaters_ipa']} <b>" . htmlsafechars($arr['userip']) . "</b>"; $HTMLOUT .= "<tr><td>" . (int) $arr['cid'] . "</td>\n <td>" . format_username($users) . "<a href=\"javascript:klappe('a1" . (int) $arr['cid'] . "')\"> {$lang['cheaters_added']}" . get_date($arr['added'], 'DATE') . "</a>\n <div id=\"ka1" . (int) $arr['cid'] . "\" style=\"display: none;\"><font color=\"black\">{$cheater}</font></div></td>\n <td><input type=\"checkbox\" name=\"desact[]\" value=\"" . (int) $arr["id"] . "\"/></td>\n <td><input type=\"checkbox\" name=\"remove[]\" value=\"" . (int) $arr["cid"] . "\"/></td></tr>"; } $HTMLOUT .= "<tr>\n<td>\n<input type=\"button\" value=\"{$lang['cheaters_cad']}\" onclick=\"this.value=check(this.form.elements['desact[]'])\"/> <input type=\"button\" value=\"{$lang['cheaters_car']}\" onclick=\"this.value=check(this.form.elements['remove[]'])\"/> <input type=\"hidden\" name=\"nowarned\" value=\"nowarned\" /><input type=\"submit\" name=\"submit\" value=\"{$lang['cheaters_ac']}\" />\n</td>\n</tr>\n</table></form>"; if ($count > $perpage) {
$secs_elapsed = floor($st - $mins * 60); return "<font color='red'><b>0:{$mins}:{$secs_elapsed}</b></font>"; } if ($secs > 0) { return "<font color='red'><b>0:0:{$secs}</b></font>"; } return "<font color='red'><b>{$lang['ad_snatched_torrents_none']}<br />{$lang['ad_snatched_torrents_reported']}</b></font>"; } $count = number_format(get_row_count("snatched", "WHERE complete_date != '0'")); $HTMLOUT .= "<h2 align='center'>{$lang['ad_snatched_torrents_allsnatched']}</h2>\r\n<font class='small'>{$lang['ad_snatched_torrents_currently']} " . htmlspecialchars($count) . " {$lang['ad_snatched_torrents_snatchedtor']}</font>"; $HTMLOUT .= begin_main_frame(); $res = sql_query("SELECT COUNT(id) FROM snatched") or sqlerr(); $row = mysql_fetch_row($res); $count = $row[0]; $snatchedperpage = 15; $pager = pager($snatchedperpage, $count, "staffpanel.php?tool=snatched_torrents&action=snatched_torrents&"); if ($count > $snatchedperpage) { $HTMLOUT .= $pager['pagertop']; } $sql = "SELECT sn.userid, sn.id, sn.torrentid, sn.timesann, sn.hit_and_run, sn.mark_of_cain, sn.uploaded, sn.downloaded, sn.start_date, sn.complete_date, sn.seeder, sn.leechtime, sn.seedtime, u.username, t.name " . "FROM snatched AS sn " . "LEFT JOIN users AS u ON u.id=sn.userid " . "LEFT JOIN torrents AS t ON t.id=sn.torrentid WHERE complete_date != '0'" . "ORDER BY sn.complete_date DESC " . $pager['limit'] . ""; $result = sql_query($sql) or print mysql_error(); if (mysql_num_rows($result) != 0) { $HTMLOUT .= "<table width='100%' border='1' cellspacing='0' cellpadding='5' align='center'>\r\n<tr>\r\n<td class='colhead' align='center' width='1%'>{$lang['ad_snatched_torrents_name']}</td>\r\n<td class='colhead' align='center' width='1%'>{$lang['ad_snatched_torrents_torname']}</td>\r\n<td class='colhead' align='center' width='1%'>{$lang['ad_snatched_torrents_hnr']}</td>\r\n<td class='colhead' align='center' width='1%'>{$lang['ad_snatched_torrents_marked']}</td>\r\n<td class='colhead' align='center' width='1%'>{$lang['ad_snatched_torrents_announced']}</td>\r\n<td class='colhead' align='center' width='1%'>{$lang['ad_snatched_torrents_upload']}</td>\r\n<td class='colhead' align='center' width='1%'>{$lang['ad_snatched_torrents_download']}</td>\r\n<td class='colhead' align='center' width='1%'>{$lang['ad_snatched_torrents_seedtime']}</td>\r\n<td class='colhead' align='center' width='1%'>{$lang['ad_snatched_torrents_leechtime']}</td>\r\n<td class='colhead' align='center' width='1%'>{$lang['ad_snatched_torrents_startdate']}</td>\r\n<td class='colhead' align='center' width='1%'>{$lang['ad_snatched_torrents_enddate']}</td>\r\n<td class='colhead' align='center' width='1%'>{$lang['ad_snatched_torrents_seeding']}</td>\r\n</tr>"; while ($row = mysql_fetch_assoc($result)) { $smallname = substr(htmlspecialchars($row["name"]), 0, 25); if ($smallname != htmlspecialchars($row["name"])) { $smallname .= '...'; } $HTMLOUT .= "<tr><td><a href='/userdetails.php?id=" . $row['userid'] . "'><b>" . $row['username'] . "</b></a></td>\r\n<td align='center'><a href='/details.php?id=" . $row['torrentid'] . "'><b>" . $smallname . "</b></a></td>\r\n<td align='center'><b>" . get_date($row['hit_and_run'], 'LONG', 0, 1) . "</b></td>\r\n<td align='center'><b>" . $row['mark_of_cain'] . "</b></td>\r\n<td align='center'><b>" . $row['timesann'] . "</b></td>\r\n<td align='center'><b>" . mksize($row['uploaded']) . "</b></td>\r\n<td align='center'><b>" . mksize($row['downloaded']) . "</b></td>\r\n<td align='center'><b>" . get_snatched_color($row["seedtime"]) . "</b></td>\r\n<td align='center'><b>" . mkprettytime($row["leechtime"]) . "</b></td>\r\n<td align='center'><b>" . get_date($row['start_date'], 'LONG', 0, 1) . "</b></td>"; if ($row['complete_date'] > 0) { $HTMLOUT .= "<td align='center'><b>" . get_date($row['complete_date'], 'LONG', 0, 1) . "</b></td>";
if ($err = is_object($GLOBALS["___mysqli_ston"]) ? mysqli_error($GLOBALS["___mysqli_ston"]) : (($___mysqli_res = mysqli_connect_error()) ? $___mysqli_res : false)) { return $err; } if (@mysqli_num_rows($r)) { while ($row = mysqli_fetch_array($r)) { $result[] = $row; } } if (count($result) == 0) { return $default_value; } return $result; } $count1 = get_row_count('events'); $perpage = 15; $pager = pager($perpage, $count1, 'staffpanel.php?tool=events&action=events&'); $scheduled_events = mysql_fetch_all("SELECT e.id, e.userid, e.startTime, e.endTime, e.overlayText, e.displayDates, e.freeleechEnabled, e.duploadEnabled, e.hdownEnabled, u.id, u.username, u.class, u.chatpost, u.leechwarn, u.warned, u.pirate, u.king, u.donor, u.enabled FROM events AS e LEFT JOIN users AS u ON u.id=e.userid ORDER BY startTime DESC " . $pager['limit'] . ";", array()); if (is_array($scheduled_events)) { foreach ($scheduled_events as $scheduled_event) { if (is_array($scheduled_event) && array_key_exists('startTime', $scheduled_event) && array_key_exists('endTime', $scheduled_event)) { $startTime = 0; $endTime = 0; $overlayText = ""; $displayDates = true; $startTime = $scheduled_event['startTime']; $endTime = $scheduled_event['endTime']; if (time() < $endTime && time() > $startTime) { if (array_key_exists('overlayText', $scheduled_event)) { $overlayText = $scheduled_event['overlayText']; } if (!is_string($overlayText)) {
$addt = "<br>\n" . $language['TEAM_HEADER'] . "\n<form name='smolf3d' method='get' action='index.php'>\n<CENTER><table cellspacing=0 cellpadding=5 width=50%>\n<input type='hidden' name='page' value='admin'>\n<input type='hidden' name='user' value='{$CURUSER['uid']}'>\n<input type='hidden' name='code' value='{$CURUSER['random']}'>\n<input type='hidden' name='do' value='teams'>\n<tr><td class=header colspan=2 align=center>" . $language['TEAM_ADD'] . "</td></tr><tr>\n<tr><td class=header>" . $language['TEAM_NAME'] . "</td><td align='left' class=lista><input type='text' size=50 name='team_name'></td></tr>\n<tr><td class=header>" . $language['TEAM_OWNER'] . "</td><td align='left' class=lista><input type='text' size=50 name='team_owner'>" . $language['TEAM_ONE'] . "</td></tr>\n<tr><td class=header>" . $language['TEAM_DESC'] . "</td><td class=lista align=center valign=top><center>{$desc}</center></td></tr>\n\n<tr><td class=header>" . $language['TEAM_LOGO'] . "</td><td align='left' class=lista><input type='text' size=50 name='team_image'><input type='hidden' name='add' value='true'></td></tr>\n<tr><td class=header colspan=2><div align='center'><input class=btn value='Add Team' type='Submit'></div></td></tr>\n</table></CENTER>"; $admintpl->set("add_team", $addt); if ($success == TRUE) { $successadd = "<br><h2>Team successfully added!</h2>"; } $admintpl->set("success", $successadd); $close = "<br>\n</form>"; $admintpl->set("close", $close); //ELSE Display Teams $current = "\n<table class=main cellspacing=0 cellpadding=3 width=50%><tr><td class=header align=center colspan=6>" . $language['TEAM_CURR'] . "</td></tr><tr>\n<td class=header style=\"text-align:center\">" . $language['TEAM_ID_H'] . "</td><td class=header style=\"text-align:center\">" . $language['TEAM_LOGO_H'] . "</td><td class=header style=\"text-align:center\">" . $language['TEAM_NAME_H'] . "</td><td class=header style=\"text-align:center\">" . $language['TEAM_OWNER_H'] . "</td><td class=header style=\"text-align:center\">" . $language['TEAM_DESC_H'] . "</td><td class=header style=\"text-align:center\">" . $language['TEAM_EDIT_H'] . "</td>"; $admintpl->set("current", $current); $teamsres = do_sqlquery("SELECT COUNT(*) from {$TABLE_PREFIX}teams where id>0 ORDER BY id ASC {$limit}"); $teamnum = mysqli_fetch_row($teamsres); $num2 = $teamnum[0]; $perpage = max(0, $CURUSER["torrentsperpage"]) > 0 ? $CURUSER["torrentsperpage"] : 10; list($pagertop, $pagerbottom, $limit) = pager($perpage, $num2, "index.php?page=admin&user="******"uid"] . "&code=" . $CURUSER["random"] . "&do=teams&"); $admintpl->set("pagertop", $pagertop); $admintpl->set("pagerbottom", $pagerbottom); $teamres = do_sqlquery("SELECT id, name, image, owner, info from {$TABLE_PREFIX}teams where id>0 ORDER BY id ASC {$limit}"); $teams = array(); $i = 0; while ($row = mysqli_fetch_array($teamres)) { $teams[$i][id] = (int) $row['id']; $teams[$i][name] = htmlspecialchars($row['name']); $teams[$i][image] = htmlspecialchars($row['image']); $teams[$i][owner] = (int) $row['owner']; $teams[$i][info] = format_comment($row['info']); $owner = (int) $row['owner']; $OWNERNAME1 = mysqli_query($GLOBALS["___mysqli_ston"], "SELECT username, ul.prefixcolor, ul.suffixcolor FROM {$TABLE_PREFIX}users u left join {$TABLE_PREFIX}users_level ul on u.id_level=ul.id WHERE u.id={$owner}"); $OWNERNAME2 = mysqli_fetch_array($OWNERNAME1); $teams[$i][OWNERNAME] = stripslashes($OWNERNAME2[prefixcolor]) . $OWNERNAME2['username'] . stripslashes($OWNERNAME2[suffixcolor]);
<div class="headerbar"> <h1><?php echo lang('version_history'); ?> </h1> <div class="pull-right"> <?php echo pager(site_url('settings/versions/index'), 'mdl_versions'); ?> </div> </div> <div class="table-content"> <div class="table-responsive-"> <table class="table table-striped"> <thead> <tr> <th><?php echo lang('date_applied'); ?> </th> <th><?php echo lang('sql_file'); ?> </th> <th><?php
function log_list($message = '') { global $event, $log_list_pageby, $expire_logs_after; pagetop(gTxt('visitor_logs'), $message); extract(gpsa(array('page', 'sort', 'dir', 'crit', 'search_method'))); if ($sort === '') { $sort = get_pref('log_sort_column', 'time'); } if ($dir === '') { $dir = get_pref('log_sort_dir', 'desc'); } $dir = $dir == 'asc' ? 'asc' : 'desc'; $expire_logs_after = assert_int($expire_logs_after); safe_delete('txp_log', "time < date_sub(now(), interval {$expire_logs_after} day)"); switch ($sort) { case 'ip': $sort_sql = 'ip ' . $dir; break; case 'host': $sort_sql = 'host ' . $dir; break; case 'page': $sort_sql = 'page ' . $dir; break; case 'refer': $sort_sql = 'refer ' . $dir; break; case 'method': $sort_sql = 'method ' . $dir; break; case 'status': $sort_sql = 'status ' . $dir; break; default: $sort = 'time'; $sort_sql = 'time ' . $dir; break; } set_pref('log_sort_column', $sort, 'log', 2, '', 0, PREF_PRIVATE); set_pref('log_sort_dir', $dir, 'log', 2, '', 0, PREF_PRIVATE); $switch_dir = $dir == 'desc' ? 'asc' : 'desc'; $criteria = 1; if ($search_method and $crit) { $crit_escaped = doSlash(str_replace(array('\\', '%', '_', '\''), array('\\\\', '\\%', '\\_', '\\\''), $crit)); $critsql = array('ip' => "ip like '%{$crit_escaped}%'", 'host' => "host like '%{$crit_escaped}%'", 'page' => "page like '%{$crit_escaped}%'", 'refer' => "refer like '%{$crit_escaped}%'", 'method' => "method like '%{$crit_escaped}%'", 'status' => "status like '%{$crit_escaped}%'"); if (array_key_exists($search_method, $critsql)) { $criteria = $critsql[$search_method]; $limit = 500; } else { $search_method = ''; $crit = ''; } } else { $search_method = ''; $crit = ''; } $total = safe_count('txp_log', "{$criteria}"); echo '<div id="' . $event . '_control" class="txp-control-panel">'; if ($total < 1) { if ($criteria != 1) { echo n . log_search_form($crit, $search_method) . n . graf(gTxt('no_results_found'), ' class="indicator"') . '</div>'; } else { echo graf(gTxt('no_refers_recorded'), ' class="indicator"') . '</div>'; } return; } $limit = max($log_list_pageby, 15); list($page, $offset, $numPages) = pager($total, $limit, $page); echo n . log_search_form($crit, $search_method) . '</div>'; $rs = safe_rows_start('*, unix_timestamp(time) as uTime', 'txp_log', "{$criteria} order by {$sort_sql} limit {$offset}, {$limit}"); if ($rs) { echo n . '<div id="' . $event . '_container" class="txp-container txp-list">'; echo n . n . '<form action="index.php" id="log_form" method="post" name="longform" onsubmit="return verify(\'' . gTxt('are_you_sure') . '\')">' . startTable('list', '', 'list', '', '90%') . n . '<thead>' . n . tr(n . column_head('time', 'time', 'log', true, $switch_dir, $crit, $search_method, ('time' == $sort ? "{$dir} " : '') . 'date time') . column_head('IP', 'ip', 'log', true, $switch_dir, $crit, $search_method, ('ip' == $sort ? "{$dir} " : '') . 'log_detail ip') . column_head('host', 'host', 'log', true, $switch_dir, $crit, $search_method, ('host' == $sort ? "{$dir} " : '') . 'host') . column_head('page', 'page', 'log', true, $switch_dir, $crit, $search_method, ('page' == $sort ? "{$dir} " : '') . 'page') . column_head('referrer', 'refer', 'log', true, $switch_dir, $crit, $search_method, ('refer' == $sort ? "{$dir} " : '') . 'refer') . column_head('method', 'method', 'log', true, $switch_dir, $crit, $search_method, ('method' == $sort ? "{$dir} " : '') . 'log_detail method') . column_head('status', 'status', 'log', true, $switch_dir, $crit, $search_method, ('status' == $sort ? "{$dir} " : '') . 'log_detail status') . hCell('', '', ' class="multi-edit"')) . n . '</thead>'; $tfoot = n . '<tfoot>' . tr(tda(toggle_box('log_detail'), ' class="detail-toggle" colspan="2" style="text-align: left; border: none;"') . tda(select_buttons() . log_multiedit_form($page, $sort, $dir, $crit, $search_method), ' class="multi-edit" colspan="6" style="text-align: right; border: none;"')) . n . '</tfoot>'; echo $tfoot; echo '<tbody>'; $ctr = 1; while ($a = nextRow($rs)) { extract($a, EXTR_PREFIX_ALL, 'log'); if ($log_refer) { $log_refer = 'http://' . $log_refer; $log_refer = '<a href="' . htmlspecialchars($log_refer) . '" target="_blank">' . htmlspecialchars(soft_wrap($log_refer, 30)) . '</a>'; } if ($log_page) { $log_anchor = preg_replace('/\\/$/', '', $log_page); $log_anchor = soft_wrap(substr($log_anchor, 1), 30); $log_page = '<a href="' . htmlspecialchars($log_page) . '" target="_blank">' . htmlspecialchars($log_anchor) . '</a>'; if ($log_method == 'POST') { $log_page = '<strong>' . $log_page . '</strong>'; } } echo tr(n . td(gTime($log_uTime), 85, 'date time') . td($log_ip, 20, 'log_detail ip') . td(soft_wrap($log_host, 30), '', 'host') . td($log_page, '', 'page') . td($log_refer, '', 'refer') . td(htmlspecialchars($log_method), 60, 'log_detail method') . td($log_status, 60, 'log_detail status') . td(fInput('checkbox', 'selected[]', $log_id), '', 'multi-edit'), ' class="' . ($ctr % 2 == 0 ? 'even' : 'odd') . '"'); $ctr++; } echo '</tbody>' . n . endTable() . n . '</form>' . n . '<div id="' . $event . '_navigation" class="txp-navigation">' . n . nav_form('log', $page, $numPages, $sort, $dir, $crit, $search_method, $total, $limit) . n . pageby_form('log', $log_list_pageby) . n . '</div>' . n . '</div>'; } }