function bjtable($res, $frame_caption) { begin_frame($frame_caption, true); begin_table(); ?> <tr> <td class="colhead">Rank</td> <td align="left" class="colhead">User</td> <td align="right" class="colhead">Wins</td> <td align="right" class="colhead">Losses</td> <td align="right" class="colhead">Games</td> <td align="right" class="colhead">Percentage</td> <td align="right" class="colhead">Win/Loss</td> </tr> <?php $num = 0; while ($a = mysql_fetch_assoc($res)) { ++$num; //Calculate Win % $win_perc = number_format($a[wins] / $a[games] * 100, 1); // Add a user's +/- statistic $plus_minus = $a[wins] - $a[losses]; if ($plus_minus >= 0) { $plus_minus = mksize(($a[wins] - $a[losses]) * 100 * 1024 * 1024); } else { $plus_minus = "-"; $plus_minus .= mksize(($a[losses] - $a[wins]) * 100 * 1024 * 1024); } print "<tr><td>{$num}</td><td align=left><table border=0 class=main cellspacing=0 cellpadding=0><tr><td class=embedded>" . "<b><a href=userdetails.php?id=" . $a[id] . ">" . $a[username] . "</a></b></td>" . "</tr></table></td><td align=right>" . number_format($a[wins], 0) . "</td>" . "</td><td align=right>" . number_format($a[losses], 0) . "</td>" . "</td><td align=right>" . number_format($a[games], 0) . "</td>" . "</td><td align=right>{$win_perc}</td>" . "</td><td align=right>{$plus_minus}</td>" . "</tr>\n"; } end_table(); end_frame(); }
/** |--------------------------------------------------------------------------| | https://github.com/Bigjoos/ | |--------------------------------------------------------------------------| | Licence Info: GPL | |--------------------------------------------------------------------------| | Copyright (C) 2010 U-232 V4 | |--------------------------------------------------------------------------| | A bittorrent tracker source based on TBDev.net/tbsource/bytemonsoon. | |--------------------------------------------------------------------------| | Project Leaders: Mindless,putyn. | |--------------------------------------------------------------------------| _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ / \ ( U | - | 2 | 3 | 2 )-( S | o | u | r | c | e )-( C | o | d | e ) \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ \_/ */ function rsstfreakinfo() { require_once INCL_DIR . 'html_functions.php'; global $INSTALLER09; $html = ''; $use_limit = true; $limit = 5; $xml = file_get_contents('http://feed.torrentfreak.com/Torrentfreak/'); $html = begin_main_frame() . begin_frame('Torrent Freak news'); $icount = 1; $doc = new DOMDocument(); @$doc->loadXML($xml); $items = $doc->getElementsByTagName('item'); foreach ($items as $item) { $html .= '<h3><u>' . $item->getElementsByTagName('title')->item(0)->nodeValue . '</u></h3><font class="small">by ' . str_replace(array('<![CDATA[', ']]>'), '', $item->getElementsByTagName('creator')->item(0)->nodeValue) . ' on ' . $item->getElementsByTagName('pubDate')->item(0)->nodeValue . '</font><br />' . str_replace(array('<![CDATA[', ']]>'), '', $item->getElementsByTagName('description')->item(0)->nodeValue) . '<br /><a href="' . $item->getElementsByTagName('link')->item(0)->nodeValue . '" target="_blank"><font class="small">Read more</font></a>'; if ($use_limit && $icount == $limit) { break; } $icount++; } $html = str_replace(array('“', '”'), '"', $html); $html = str_replace(array("’", "‘", "‘"), "'", $html); $html = str_replace("–", "-", $html); $html .= end_frame() . end_main_frame(); return $html; }
function bjtable($res, $frame_caption) { $htmlout = ''; $htmlout .= begin_frame($frame_caption, true); $htmlout .= begin_table(); $htmlout .= "<tr>\r\n\t<td class='colhead'>Rank</td>\r\n\t<td class='colhead' align='left'>User</td>\r\n\t<td class='colhead' align='right'>Wins</td>\r\n\t<td class='colhead' align='right'>Losses</td>\r\n\t<td class='colhead' align='right'>Games</td>\r\n\t<td class='colhead' align='right'>Percentage</td>\r\n\t<td class='colhead' align='right'>Win/Loss</td>\r\n\t</tr>"; $num = 0; while ($a = mysqli_fetch_assoc($res)) { ++$num; //==Calculate Win % $win_perc = number_format($a['wins'] / $a['games'] * 100, 1); //==Add a user's +/- statistic $plus_minus = $a['wins'] - $a['losses']; if ($plus_minus >= 0) { $plus_minus = mksize(($a['wins'] - $a['losses']) * 100 * 1024 * 1024); } else { $plus_minus = "-"; $plus_minus .= mksize(($a['losses'] - $a['wins']) * 100 * 1024 * 1024); } $htmlout .= "<tr><td>{$num}</td><td align='left'>" . "<b><a href='userdetails.php?id=" . $a['id'] . "'>" . $a['username'] . "</a></b></td>" . "<td align='right'>" . number_format($a['wins'], 0) . "</td>" . "<td align='right'>" . number_format($a['losses'], 0) . "</td>" . "<td align='right'>" . number_format($a['games'], 0) . "</td>" . "<td align='right'>{$win_perc}</td>" . "<td align='right'>{$plus_minus}</td>" . "</tr>\n"; } $htmlout .= end_table(); $htmlout .= end_frame(); return $htmlout; }
function commenttable_new($rows) { global $CURUSER, $HTTP_SERVER_VARS; begin_main_frame(); begin_frame(); $count = 0; foreach ($rows as $row) { $subres = mysql_query("SELECT name from torrents where id=" . unsafeChar($row["torrent"])) or sqlerr(__FILE__, __LINE__); $subrow = mysql_fetch_array($subres); print "<br /><a href=\"details.php?id=" . safeChar($row["torrent"]) . "\">" . safeChar($subrow["name"]) . "</a><br />\n"; print "<p class=sub>#" . $row["id"] . " by "; if (isset($row["username"])) { print "<a name=comm" . $row["id"] . " href=userdetails.php?id=" . safeChar($row["user"]) . "><b>" . safechar($row["username"]) . "</b></a>" . ($row["warned"] == "yes" ? "<img src=" . "pic/warned.gif alt=\"Warned\">" : ""); } else { print "<a name=\"comm" . safeChar($row["id"]) . "\"><i>(orphaned)</i></a>\n"; } print " at " . safeChar($row["added"]) . " GMT" . "- [<a href=comment.php?action=edit&cid={$row['id']}>Edit</a>]" . "- [<a href=deletecomment.php?id={$row['id']}>Delete</a>]</p>\n"; $avatar = $CURUSER["avatars"] == "yes" ? safechar($row["avatar"]) : ""; if (!$avatar) { $avatar = "pic/default_avatar.gif"; } begin_table(true); print "<tr valign=top>\n"; print "<td align=center width=150 style='padding: 0px'><img width=150 src={$avatar}></td>\n"; print "<td class=text>" . format_comment($row["text"]) . "</td>\n"; print "</tr>\n"; end_table(); } end_frame(); end_main_frame(); }
function usercommenttable($rows) { global $CURUSER, $pic_base_url, $userid; begin_main_frame(); begin_frame(); $count = 0; foreach ($rows as $row) { echo "<p class=sub>#" . $row["id"] . " by "; if (isset($row["username"])) { $title = $row["title"]; if ($title == "") { $title = get_user_class_name($row["class"]); } else { $title = safeChar($title); } echo "<a name=comm" . $row["id"] . " href=userdetails.php?id=" . $row["user"] . "><b>" . safeChar($row["username"]) . "</b></a>" . ($row["donor"] == "yes" ? "<img src=\"{$pic_base_url}star.gif\" alt='Donor'>" : "") . ($row["warned"] == "yes" ? "<img src=" . "\"{$pic_base_url}warned.gif\" alt=\"Warned\">" : "") . " ({$title})\n"; } else { echo "<a name=\"comm" . $row["id"] . "\"><i>(orphaned)</i></a>\n"; } echo " at " . $row["added"] . " GMT" . ($userid == $CURUSER["id"] || $row["user"] == $CURUSER["id"] || get_user_class() >= UC_MODERATOR ? "- [<a href=usercomment.php?action=edit&cid={$row['id']}>Edit</a>]" : "") . ($userid == $CURUSER["id"] || get_user_class() >= UC_MODERATOR ? "- [<a href=usercomment.php?action=delete&cid={$row['id']}>Delete</a>]" : "") . ($row["editedby"] && get_user_class() >= UC_MODERATOR ? "- [<a href=usercomment.php?action=vieworiginal&cid={$row['id']}>View original</a>]" : "") . "</p>\n"; $avatar = $CURUSER["avatars"] == "yes" ? safeChar($row["avatar"]) : ""; $text = format_comment($row["text"]); if ($row["editedby"]) { $text .= "<p><font size=1 class=small>Last edited by <a href=userdetails.php?id={$row['editedby']}><b>{$row['username']}</b></a> at {$row['editedat']} GMT</font></p>\n"; } begin_table(true); echo "<tr valign=top>\n"; echo "<td align=center width=150 style='padding: 0px'><img width=150 src=\"{$avatar}\"></td>\n"; echo "<td class=text>{$text}</td>\n"; echo "</tr>\n"; end_table(); } end_frame(); end_main_frame(); }
function insert_badwords_frame() { global $badwords, $BASEURL; begin_frame("Badwords", true); print "<center>"; begin_table(false, 5); print "<tr>"; for ($I = 0; $I < 3; $I++) { if ($I > 0) { print "<td class=\"tablecat\"> </td>"; } print "<td class=\"tablecat\">Eingeben...</td><td class=\"tablecat\">...für Schlimmes Wort</td>"; } print "</tr>\n"; $I = 0; print "<tr>"; while (list($code, $url) = each($badwords)) { if ($I && $I % 3 == 0) { print "</tr>\n<tr>"; } if ($I % 3) { print "<td class=\"inposttable\"> </td>"; } print "<td class=\"tablea\">{$code}</td><td class=\"tableb\">{$url}</td>"; $I++; } if ($I % 3) { print "<td class=\"inposttable\" colspan=" . (3 - $I % 3) * 3 . "> </td>"; } print "</tr>\n"; end_table(); print "</center>"; end_frame(); }
function showerror($heading = "Error", $text, $sort = "Error") { stdhead("{$sort}: {$heading}"); begin_frame("<font class='error'>{$sort}: {$heading}</font>"); echo $text; end_frame(); stdfoot(); die; }
function insert_smilies_frame() { global $smilies, $BASEURL, $pic_base_url; begin_frame("Smilies", true); begin_table(false, 5); print "<tr><td class='colhead'>Type...</td><td class='colhead'>To make a...</td></tr>\n"; while (list($code, $url) = each($smilies)) { print "<tr><td>{$code}</td><td><img src=\"{$pic_base_url}smilies/{$url}\" alt='' /></td></tr>\n"; } end_table(); end_frame(); }
function insert_smilies_frame() { global $smilies, $BASEURL; begin_frame("Smilies", true); begin_table(false, 5); print "<tr><td class=colhead>Type...</td><td class=colhead>To make a...</td></tr>\n"; while (list($code, $url) = each($smilies)) { print "<tr><td>{$code}</td><td><img src={$BASEURL}/pic/smilies/{$url}></td>\n"; } end_table(); end_frame(); }
function insert_smilies_frame() { global $smilies, $DEFAULTBASEURL; begin_frame("Смайлы", true); begin_table(false, 5); print "<tr><td class=\"colhead\">Написание</td><td class=\"colhead\">Смайл</td></tr>\n"; while (list($code, $url) = each($smilies)) { print "<tr><td>{$code}</td><td><img src=\"{$DEFAULTBASEURL}/pic/smilies/{$url}\"></td>\n"; } end_table(); end_frame(); }
function insert_smilies_frame() { global $smilies, $INSTALLER09; $htmlout = ''; $htmlout .= begin_frame("Smilies", true); $htmlout .= begin_table(false, 5); $htmlout .= "<tr><td class='colhead'>Type...</td><td class='colhead'>To make a...</td></tr>\n"; foreach ($smilies as $code => $url) { $htmlout .= "<tr><td>{$code}</td><td><img src=\"{$INSTALLER09['pic_base_url']}smilies/{$url}\" alt='' /></td></tr>\n"; } $htmlout .= end_table(); $htmlout .= end_frame(); return $htmlout; }
function reqcommenttable($rows) { global $CURUSER, $HTTP_SERVER_VARS; begin_main_frame(); begin_frame(); $count = 0; foreach ($rows as $row) { print("<p class=sub>#" . $row["id"] . " bY: "); if (isset($row["username"])) { $username = $row["username"]; $ratres = mysql_query("SELECT uploaded, downloaded FROM users WHERE username='******'"); $rat = mysql_fetch_array($ratres); if ($rat["downloaded"] > 0) { $ratio = $rat['uploaded'] / $rat['downloaded']; $ratio = number_format($ratio, 3); $color = get_ratio_color($ratio); if ($color) $ratio = "<font color=$color>$ratio</font>"; } else if ($rat["uploaded"] > 0) $ratio = "Inf."; else $ratio = "---"; $title = $row["title"]; if ($title == "") $title = get_user_class_name($row["class"]); else $title = htmlspecialchars($title); print("<a name=comm".$row["id"]." href=userdetails.php?id=".$row["user"]."><b>".htmlspecialchars($row["username"])."</b></a>".($row["donor"] == "yes" ? "<img src=pic/star.gif alt='Donor'>" : "").($row["warned"] == "yes" ? "<img src="."/pic/warned.gif alt=\"Warned\">" : "")." ($title) (Ratio: $ratio)\n"); } else print("<a name=\"comm" . $row["id"] . "\"><i>(orphaned)</i></a>\n"); print(" at " . $row["added"] . " GMT" .($row["user"] == $CURUSER["id"] || get_user_class() >= UC_MODERATOR ? "- [<a href=reqcomment.php?action=edit&cid=$row[id]>Edit</a>]" : "") .(get_user_class() >= UC_MODERATOR ? "- [<a href=reqcomment.php?action=delete&cid=$row[id]>Delete</a>]" : "") . "</p>\n");$avatar = ($CURUSER["avatars"] == "yes" ? htmlspecialchars($row["avatar"]) : ""); if (!$avatar) $avatar = "/pic/default_avatar.gif"; $text = format_comment($row["text"]); begin_table(true); print("<tr valign=top>\n"); print("<td align=center width=150 style='padding: 0px'><img width=150 src=$avatar></td>\n"); print("<td class=text>$text</td>\n"); print("</tr>\n"); end_table(); } end_frame(); end_main_frame(); }
/** * https://09source.kicks-ass.net:8443/svn/installer09/ * Licence Info: GPL * Copyright (C) 2010 Installer09 v.2 * A bittorrent tracker source based on TBDev.net/tbsource/bytemonsoon. * Project Leaders: Mindless,putyn,kidvision. **/ function rsstfreakinfo() { require_once INCL_DIR . 'html_functions.php'; global $TBDEV; $html = ''; $use_limit = true; $limit = 5; $xml = file_get_contents('http://feed.torrentfreak.com/Torrentfreak/'); preg_match_all('/\\<(title|pubDate|dc:creator|link|description)\\>(.+?)\\<\\/\\1\\>/i', $xml, $out, PREG_PATTERN_ORDER); $feeds = $out[2]; $c = count($feeds); $html = begin_main_frame() . begin_frame('Torrent Freak news'); for ($i = 5; $i < $c; $i += 5) { $html .= '<h3><u>' . $feeds[$i] . '</u></h3><font class="small">by ' . $feeds[$i + 3] . ' on ' . $feeds[$i + 2] . '</font><br /><p>' . str_replace(array('<![CDATA[', ']]>'), '', $feeds[$i + 4]) . '</p><br /><a href="' . $feeds[$i + 1] . '" target="_blank"><font class="small">Read more</font></a>'; if ($use_limit && $i >= $limit * 5) { break; } } $html .= end_frame() . end_main_frame(); return $html; }
function usercommenttable($rows) { $htmlout = ''; global $CURUSER, $INSTALLER09, $userid, $lang; $htmlout .= "<table class='main' width='750' border='0' cellspacing='0' cellpadding='0'>" . "<tr><td class='embedded'>"; $htmlout .= begin_frame(); $count = 0; foreach ($rows as $row) { $htmlout .= "<p class='sub'>#" . (int) $row["id"] . " by "; if (isset($row["username"])) { $title = $row["title"]; if ($title == "") { $title = get_user_class_name($row["class"]); } else { $title = htmlsafechars($title); } $htmlout .= "<a name='comm" . (int) $row['id'] . "' href='userdetails.php?id=" . (int) $row['user'] . "'><b>" . htmlsafechars($row['username']) . "</b></a>" . ($row["donor"] == "yes" ? "<img src=\"{$INSTALLER09['pic_base_url']}star.gif\" alt='{$lang['userdetails_donor']}' />" : "") . ($row["warned"] >= "1" ? "<img src=" . "\"{$INSTALLER09['pic_base_url']}warned.gif\" alt=\"{$lang['userdetails_warned']}\" />" : "") . " ({$title})\n"; } else { $htmlout .= "<a name=\"comm" . (int) $row["id"] . "\"><i>{$lang['userdetails_orphaned']}</i></a>\n"; } $htmlout .= " " . get_date($row["added"], 'DATE', 0, 1) . "" . ($userid == $CURUSER["id"] || $row["user"] == $CURUSER["id"] || $CURUSER['class'] >= UC_STAFF ? " - [<a href='usercomment.php?action=edit&cid=" . (int) $row['id'] . "'>{$lang['userdetails_comm_edit']}</a>]" : "") . ($userid == $CURUSER["id"] || $CURUSER['class'] >= UC_STAFF ? " - [<a href='usercomment.php?action=delete&cid=" . (int) $row['id'] . "'>{$lang['userdetails_comm_delete']}</a>]" : "") . ($row["editedby"] && $CURUSER['class'] >= UC_STAFF ? " - [<a href='usercomment.php?action=vieworiginal&cid=" . (int) $row['id'] . "'>{$lang['userdetails_comm_voriginal']}</a>]" : "") . "</p>\n"; $avatar = $CURUSER["avatars"] == "yes" ? htmlsafechars($row["avatar"]) : ""; if (!$avatar) { $avatar = "{$INSTALLER09['pic_base_url']}default_avatar.gif"; } $text = format_comment($row["text"]); if ($row["editedby"]) { $text .= "<font size='1' class='small'><br /><br />{$lang['userdetails_comm_ledited']}<a href='userdetails.php?id=" . (int) $row['editedby'] . "'><b>" . htmlsafechars($row['username']) . "</b></a> " . get_date($row['editedat'], 'DATE', 0, 1) . "</font>\n"; } $htmlout .= "<table width='100%' border='1' cellspacing='0' cellpadding='5'>"; $htmlout .= "<tr valign='top'>\n"; $htmlout .= "<td align='center' width='150' style='padding:0px'><img width='150' src=\"{$avatar}\" alt=\"Avatar\" /></td>\n"; $htmlout .= "<td class='text'>{$text}</td>\n"; $htmlout .= "</tr>\n"; $htmlout .= "</table>"; } $htmlout .= end_frame(); $htmlout .= "</td></tr></table>"; return $htmlout; }
print "<br /><center><a href='torrents.php'>" . T_("BROWSE_TORRENTS") . "</a> - <a href='torrents-search.php'>" . T_("SEARCH_TORRENTS") . "</a></center><br />"; if ($site_config["MEMBERSONLY"] && !$CURUSER) { echo "<br /><br /><center><b>" . T_("BROWSE_MEMBERS_ONLY") . "</b></center><br /><br />"; } else { $query = "SELECT torrents.id, torrents.anon, torrents.announce, torrents.category, torrents.leechers, torrents.nfo, torrents.seeders, torrents.name, torrents.times_completed, torrents.size, torrents.added, torrents.comments, torrents.numfiles, torrents.filename, torrents.owner, torrents.external, torrents.freeleech, categories.name AS cat_name, categories.image AS cat_pic, categories.parent_cat AS cat_parent, users.username, users.privacy, IF(torrents.numratings < 2, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating FROM torrents LEFT JOIN categories ON category = categories.id LEFT JOIN users ON torrents.owner = users.id WHERE visible = 'yes' AND banned = 'no' ORDER BY id DESC LIMIT 25"; $res = SQL_Query_exec($query); if (mysql_num_rows($res)) { torrenttable($res); } else { print "<div class='f-border'>"; print "<div class='f-cat' width='100%'>" . T_("NOTHING_FOUND") . "</div>"; print "<div>"; print T_("NO_UPLOADS"); print "</div>"; print "</div>"; } if ($CURUSER) { SQL_Query_exec("UPDATE users SET last_browse=" . gmtime() . " WHERE id={$CURUSER['id']}"); } } end_frame(); if (!$site_config["MEMBERSONLY"] || $CURUSER) { } if ($site_config['DISCLAIMERON']) { begin_frame(T_("DISCLAIMER")); echo "<MARQUEE behavior=\"scroll\" align=\"center\" direction=\"up\" height=\"80\" scrollamount=\"0.8\" scrolldelay= \"20\" onmouseover='this.stop()' onmouseout='this.start()'>\n"; echo T_("DISCLAIMERTXT"); echo "</marquee>"; end_frame(); } stdfoot();
echo "</table>"; print textbbcode("compose", "msg", "{$msg}"); echo "<table width='600px' border='0' align='center' cellpadding='4' cellspacing='0'>"; if (!isset($_GET['templates'])) { $output .= "<input type=\"submit\" name=\"send\" value=\"Send\" /> <label><input type=\"checkbox\" name=\"save\" checked='checked' />Save Copy In Outbox</label> <input type=\"submit\" name=\"draft\" value=\"Save Draft\" /> "; } tr2($output . "<input type=\"submit\" name=\"template\" value=\"Save Template\" />"); echo "</table>"; end_form(); end_frame(); stdfoot(); die; } end_frame(); } begin_frame($pagename); echo "<center>"; print submenu('overview,inbox,outbox,compose,draft,templates', 'overview'); echo "</center><br />"; if ($type == "Overview") { begin_table(); $res = SQL_Query_exec("SELECT COUNT(*), COUNT(`unread` = 'yes') FROM messages WHERE `receiver` = {$CURUSER['id']} AND `location` IN ('in','both')"); $res = SQL_Query_exec("SELECT COUNT(*) FROM messages WHERE receiver=" . $CURUSER["id"] . " AND `location` IN ('in','both')"); $inbox = mysql_result($res, 0); $res = SQL_Query_exec("SELECT COUNT(*) FROM messages WHERE `receiver` = " . $CURUSER["id"] . " AND `location` IN ('in','both') AND `unread` = 'yes'"); $unread = mysql_result($res, 0); $res = SQL_Query_exec("SELECT COUNT(*) FROM messages WHERE `sender` = " . $CURUSER["id"] . " AND `location` IN ('out','both')"); $outbox = mysql_result($res, 0); $res = SQL_Query_exec("SELECT COUNT(*) FROM messages WHERE `sender` = " . $CURUSER["id"] . " AND `location` = 'draft'"); $draft = mysql_result($res, 0); $res = SQL_Query_exec("SELECT COUNT(*) FROM messages WHERE `sender` = " . $CURUSER["id"] . " AND `location` = 'template'");
$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"; } if ($count1 > $perpage) { $HTMLOUT .= $pager['pagerbottom'];
if($filled !== '1' && $t['count'] === '0') echo '<td><a href="/minar_eftirsp.php?rid='.$t['id'].$uline.'&eyda=1">Eyða eftirspurn</a></td>'; elseif($t['filled']) echo '<td><a href="'.$t['filled'].'">Uppfyllt</a></td>'; else echo '<td>Ekki hægt að eyða</td>'; echo '<td>'.$t['count'].'</td>'; echo '</tr>'; } } else echo '<tr><td colspan="4">Engar skráðar eftirspurnir</td></tr>'; echo '<tr><td colspan="4">Sé ekki hægt að eyða eftirspurn er annað hvort búið að uppfylla hana eða greiða henni atkvæði.</td></tr>'; echo '</table>'; end_frame(); begin_frame('Eftirspurnir sem hafa fengið atkvæði frá mér'); echo '<table>'; $sql = 'SELECT addedrequests.*,requests.request,requests.filled,requests.filledby FROM addedrequests,requests WHERE addedrequests.userid='.$uid.' AND (requests.id = addedrequests.requestid) ORDER BY requests.id DESC'; // echo $sql; $res = mysql_query($sql) or sqlerr(); $num_rows = mysql_num_rows($res); echo '<tr><td colspan="3">Fjöldi atkvæða: '.$num_rows.'</td></tr>'; echo '<tr><td><b>Atkvæði með:</b></td><td><b>Draga til baka atkvæðið?</b></td><td><b>Uppfyllt?</b></td></tr>'; if($num_rows > '0') { $uline = '&uid='.$uid; while($s = mysql_fetch_assoc($res)) { echo '<tr>'; echo '<td><a href="/reqdetails.php?id='.$s['requestid'].'">'.$s['request'].'</td>'; echo '<td><a href="/minar_eftirsp.php?vid='.$s['id'].$uline.'&draga=1">Draga til baka</a></td>'; if($s['filledby'] != '0') echo '<td><a href="'.$s['filled'].'">Uppfyllt</a></td>';
function insert_compose_frame($id, $newtopic = true, $quote = false, $attachment = false) { global $CURUSER, $INSTALLER09, $Multi_forum; $htmlout = ''; if ($newtopic) { $res = sql_query("SELECT name FROM forums WHERE id=" . sqlesc($id)) or sqlerr(__FILE__, __LINE__); $arr = mysqli_fetch_assoc($res) or die("Bad forum ID!"); // $htmlout .="<h3>New topic in <a href='{$INSTALLER09['baseurl']}/forums.php?action=viewforum&forumid=".$id."'>".htmlsafechars($arr["name"])."</a> forum</h3>"; $htmlout .= "<!--<div class='navigation'>\n\t\t\t\t<a href='index.php'>" . $INSTALLER09["site_name"] . "</a> \n\t\t\t\t>\n\t\t\t\t<a href='forums.php'>Forums</a>\n\t\t\t\t>\n\t\t\t\t<a href='{$INSTALLER09['baseurl']}/forums.php?action=viewforum&forumid=" . $id . "'>" . htmlsafechars($arr["name"]) . "</a>\n\t\t\t\t<br><img src='templates/1/pic/carbon/nav_bit.png' alt=''>\n\t\t\t\t<span class='active'>New Topic</span>\n\t\t\t\t</div><br />-->"; } else { $res = sql_query("SELECT t.forum_id, t.topic_name, t.locked, f.min_class_read, f.name AS forum_name FROM topics AS t LEFT JOIN forums AS f ON f.id = t.forum_id WHERE t.id=" . sqlesc($id)) or sqlerr(__FILE__, __LINE__); $arr = mysqli_fetch_assoc($res) or die("Forum error, Topic not found."); $forum = htmlsafechars($arr["forum_name"]); $forumid = (int) $arr['forum_id']; if ($arr['locked'] == 'yes') { stderr("Sorry", "The topic is locked."); $htmlout .= end_table(); $htmlout .= end_main_frame(); echo stdhead("Compose", true, $stdhead) . $htmlout . stdfoot($stdfoot); exit; } if ($CURUSER["class"] < $arr["min_class_read"]) { $htmlout .= stdmsg("Sorry", "You are not allowed in here."); $htmlout .= end_table(); $htmlout .= end_main_frame(); echo stdhead("Compose") . $htmlout . stdfoot(); exit; } $htmlout .= "<!--<div class='navigation'>\n\t\t\t\t<a href='index.php'>" . $INSTALLER09["site_name"] . "</a> \n\t\t\t\t>\n\t\t\t\t<a href='forums.php'>Forums</a>\n\t\t\t\t>\n\t\t\t\t<a href='{$INSTALLER09['baseurl']}/forums.php?action=viewforum&forumid=" . $forumid . "'>{$forum}</a>\n\t\t\t\t>\n\t\t\t\t<a href='{$INSTALLER09['baseurl']}/forums.php?action=viewtopic&topicid=" . $id . "'>" . htmlsafechars($arr["topic_name"]) . "</a>\n\t\t\t\t<br><img src='templates/1/pic/carbon/nav_bit.png' alt=''>\n\t\t\t\t<span class='active'>Post Reply</span>\n\t\t\t\t</div><br />-->"; // $htmlout .="<h3 align='center'>Reply to topic:<a href='{$INSTALLER09['baseurl']}/forums.php?action=viewtopic&topicid=".$id."'>".htmlsafechars($arr["topic_name"])."</a></h3>"; } $htmlout .= "\n <script type='text/javascript'>\n /*<![CDATA[*/\n function Preview()\n {\n document.compose.action = './forums/preview.php'\n document.compose.target = '_blank';\n document.compose.submit();\n return true;\n }\n /*]]>*/\n </script>"; //$htmlout .= begin_frame("Compose", true); $htmlout .= "<form method='post' name='compose' action='{$INSTALLER09['baseurl']}/forums.php' enctype='multipart/form-data'>\n\t <input type='hidden' name='action' value='post' />\n\t <input type='hidden' name='" . ($newtopic ? 'forumid' : 'topicid') . "' value='" . $id . "' />"; //$htmlout .= begin_table(true); $htmlout .= "<table border='0' cellspacing='0' cellpadding='5' class='tborder'>\n\t<tr>\n<td class='thead' colspan='2'><strong>Compose</strong></td>\n</tr>\n\t"; if ($newtopic) { $htmlout .= "<tr>\n\t\t\t<td class=row width='10%'>Subject</td>\n\t\t\t<td class=row align='left'>\n\t\t\t\t<input type='text' class='form-control col-md-12' size='100' maxlength='{$Multi_forum['configs']['maxsubjectlength']}' name='topic_name' />\n\t\t\t</td>\n\t\t</tr>"; } if ($quote) { $postid = (int) $_GET["postid"]; if (!is_valid_id($postid)) { stderr("Error", "Invalid ID!"); $htmlout .= end_table(); $htmlout .= end_main_frame(); echo stdhead("Compose", true, $stdhead) . $htmlout . stdfoot($stdfoot); exit; } $res = sql_query("SELECT posts.*, users.username FROM posts JOIN users ON posts.user_id = users.id WHERE posts.id =" . sqlesc($postid)) or sqlerr(__FILE__, __LINE__); if (mysqli_num_rows($res) == 0) { stderr("Error", "No post with this ID"); $htmlout .= end_table(); $htmlout .= end_main_frame(); echo stdhead("Error - No post with this ID", true, $stdhead) . $htmlout . stdfoot($stdfoot); exit; } $arr = mysqli_fetch_assoc($res); } $htmlout .= "<tr>\n\t\t<td class=row valign='top'>Body</td>\n\t\t<td class=row>"; $qbody = $quote ? "[quote=" . htmlsafechars($arr["username"]) . "]" . htmlsafechars($arr["body"]) . "[/quote]" : ""; //if (function_exists('BBcode')) //$htmlout .= BBcode($qbody, true); if (function_exists('textbbcode')) { $htmlout .= ' ' . textbbcode('compose', 'body', isset($qbody) ? htmlsafechars($qbody) : '') . ' '; } else { $htmlout .= "<textarea name='body' style='width:99%' rows='7'>{$qbody}</textarea>"; } $htmlout .= "</td></tr>"; if ($Multi_forum['configs']['use_attachment_mod'] && $attachment) { $htmlout .= "<tr>\n\t\t\t\t<td colspan='2'><fieldset class='fieldset'><legend>Add Attachment</legend>\n\t\t\t\t<input type='checkbox' name='uploadattachment' value='yes' />\n\t\t\t\t<input type='file' name='file' size='60' />\n <div class='error'>Allowed Files: rar, zip<br />Size Limit " . mksize($Multi_forum['configs']['maxfilesize']) . "</div></fieldset>\n\t\t\t\t</td>\n\t\t\t</tr>"; } $htmlout .= "<tr>\n \t <td class=row align='center' colspan='2'>" . post_icons() . "</td>\n \t </tr><tr class=row>\n \t\t <td colspan='2' align='center'>\n \t <input class='btn btn-primary dropdown-toggle' type='submit' value='Submit' /><input class='btn btn-primary dropdown-toggle' type='button' value='Preview' name='button2' onclick='return Preview();' />\n"; if ($newtopic) { $htmlout .= "Anonymous Topic<input type='checkbox' name='anonymous' value='yes'/>\n"; } else { $htmlout .= "Anonymous Post<input type='checkbox' name='anonymous' value='yes'/>\n"; } $htmlout .= "</td></tr></form>\n"; $htmlout .= "<tr>\n\t\t\t\t<td colspan='2' align='right' class='tfoot'>\n\t\t\t\t" . insert_quick_jump_menu() . "\n\t\t\t\t</td>\n\t\t\t</tr>"; $htmlout .= end_table(); $htmlout .= "<br />"; // $htmlout .= end_frame(); // ------ Get 10 last posts if this is a reply if (!$newtopic && $INSTALLER09['show_last_10']) { $postres = sql_query("SELECT p.id, p.added, p.body, p.anonymous, u.id AS uid, u.enabled, u.class, u.donor, u.warned, u.chatpost, u.leechwarn, u.pirate, u.king, u.username, u.avatar, u.offensive_avatar " . "FROM posts AS p " . "LEFT JOIN users AS u ON u.id = p.user_id " . "WHERE p.topic_id=" . sqlesc($id) . " " . "ORDER BY p.id DESC LIMIT 10") or sqlerr(__FILE__, __LINE__); if (mysqli_num_rows($postres) > 0) { $htmlout .= "<br />"; $htmlout .= begin_frame("10 last posts, in reverse order"); while ($post = mysqli_fetch_assoc($postres)) { //$avatar = ($CURUSER["avatars"] == "all" ? htmlsafechars($post["avatar"]) : ($CURUSER["avatars"] == "some" && $post["offavatar"] == "no" ? htmlsafechars($post["avatar"]) : "")); $avatar = $CURUSER["avatars"] == "yes" ? avatar_stuff($post) : ""; if ($post['anonymous'] == 'yes') { $avatar = $INSTALLER09['pic_base_url'] . $Multi_forum['configs']['forum_pics']['default_avatar']; } else { $avatar = $CURUSER["avatars"] == "yes" ? avatar_stuff($post) : ''; } if (empty($avatar)) { $avatar = $INSTALLER09['pic_base_url'] . $Multi_forum['configs']['forum_pics']['default_avatar']; } $user_stuff = $post; $user_stuff['id'] = (int) $post['uid']; if ($post["anonymous"] == "yes") { if ($CURUSER['class'] < UC_STAFF && $post["uid"] != $CURUSER["id"]) { $htmlout .= "<p class='sub'>#" . (int) $post["id"] . " by <i>Anonymous</i> at " . get_date($post["added"], 'LONG', 1, 0) . "</p>"; } else { $htmlout .= "<p class='sub'>#" . (int) $post["id"] . " by <i>Anonymous</i> [<b>" . format_username($user_stuff, true) . "</b>] at " . get_date($post["added"], 'LONG', 1, 0) . "</p>"; } } else { $htmlout .= "<p class='sub'>#" . (int) $post["id"] . " by " . (!empty($post["username"]) ? format_username($user_stuff, true) : "unknown[" . (int) $post['uid'] . "]") . " at " . get_date($post["added"], 'LONG', 1, 0) . "</p>"; } $htmlout .= begin_table(true); $htmlout .= "<tr>\n\t\t\t\t <td height='100' width='100' align='center' style='padding: 0px' valign='top'><img height='100' width='100' src='" . $avatar . "' alt='User avvy' /></td>\n\t\t\t\t <td class='comment' valign='top'>" . format_comment($post["body"]) . "</td>\n\t\t\t\t </tr>"; $htmlout .= end_table(); } $htmlout .= end_frame(); } } //$htmlout .= insert_quick_jump_menu(); return $htmlout; }
} if (isset($showpmbutton)) { $HTMLOUT .= "<tr>\r\n <td colspan='2' align='center'>\r\n <form method='get' action='sendmessage.php'>\r\n <input type='hidden' name='receiver' value='{$user["id"]}' />\r\n <input type='submit' value='{$lang['userdetails_msg_btn']}' class='btn' />\r\n </form>\r\n </td></tr>"; } //==Report User $HTMLOUT .= tr("Report User", "<form method='post' action='report.php?type=User&id={$id}'><input type='submit' value='Report User' class='button' /> Click to Report this user for Breaking the rules.</form>", 1); //==End if ($user['paranoia'] < 1 || $CURUSER['id'] == $id || $CURUSER['class'] >= UC_STAFF) { if (isset($user['last_status'])) { $HTMLOUT .= "<tr valign='top'><td class='rowhead'>Status</td><td align='left'>" . format_urls($user['last_status']) . "<br/><small>added " . get_date($user['last_update'], '', 0, 1) . "</small></td></tr>\n"; } } $HTMLOUT .= "</table>\n"; $HTMLOUT .= "<script type='text/javascript'>\r\n /*<![CDATA[*/\r\n function togglepic(bu, picid, formid){\r\n\t var pic = document.getElementById(picid);\r\n\t var form = document.getElementById(formid);\r\n\t\r\n\t if(pic.src == bu + '/pic/plus.gif')\t{\r\n\t\tpic.src = bu + '/pic/minus.gif';\r\n\t\tform.value = 'minus';\r\n\t }else{\r\n\t\tpic.src = bu + '/pic/plus.gif';\r\n\t\tform.value = 'plus';\r\n\t }\r\n }\r\n /*]]>*/\r\n </script>"; if ($CURUSER['class'] >= UC_STAFF && $user["class"] < $CURUSER['class']) { $HTMLOUT .= begin_frame("Edit User", true); $HTMLOUT .= "<form method='post' action='modtask.php'>\n"; require_once CLASS_DIR . 'validator.php'; $HTMLOUT .= validatorForm("ModTask_{$user['id']}"); $HTMLOUT .= "<input type='hidden' name='action' value='edituser' />\n"; $HTMLOUT .= "<input type='hidden' name='userid' value='{$id}' />\n"; $HTMLOUT .= "<input type='hidden' name='returnto' value='userdetails.php?id={$id}' />\n"; $HTMLOUT .= "\r\n <table class='main' border='1' cellspacing='0' cellpadding='5'>\n"; $HTMLOUT .= "<tr><td class='rowhead'>{$lang['userdetails_title']}</td><td colspan='2' align='left'><input type='text' size='60' name='title' value='" . htmlspecialchars($user['title']) . "' /></td></tr>\n"; $avatar = htmlspecialchars($user["avatar"]); $HTMLOUT .= "<tr><td class='rowhead'>{$lang['userdetails_avatar_url']}</td><td colspan='2' align='left'><input type='text' size='60' name='avatar' value='{$avatar}' /></td></tr>\n"; $HTMLOUT .= "<tr>\r\n\t\t <td class='rowhead'>Signature Rights</td>\r\n\t\t <td colspan='2' align='left'><input name='signature_post' value='yes' type='radio'" . ($user['signature_post'] == "yes" ? " checked='checked'" : "") . " />Yes \r\n\t\t <input name='signature_post' value='no' type='radio'" . ($user['signature_post'] == "no" ? " checked='checked'" : "") . " />No Disable this members signature rights.</td>\r\n\t </tr>\r\n\t <tr>\r\n\t\t <td class='rowhead'>View Signatures</td>\r\n\t\t <td colspan='2' align='left'><input name='signatures' value='yes' type='radio'" . ($user['signatures'] == "yes" ? " checked='checked'" : "") . " />Yes \r\n\t\t <input name='signatures' value='no' type='radio'" . ($user['signatures'] == "no" ? " checked='checked'" : "") . " /></td>\r\n\t </tr>\r\n\t <tr>\r\n\t\t <td class='rowhead'>Signature</td>\r\n\t\t <td colspan='2' align='left'><textarea cols='60' rows='2' name='signature'>" . htmlspecialchars($user['signature']) . "</textarea></td>\r\n\t </tr>\r\n\t <tr>\r\n\t\t <td class='rowhead'>Google Talk</td>\r\n\t\t <td colspan='2' align='left'><input type='text' size='60' name='google_talk' value='" . htmlspecialchars($user['google_talk']) . "' /></td>\r\n\t </tr>\r\n\t <tr>\r\n\t\t <td class='rowhead'>MSN</td>\r\n\t\t <td colspan='2' align='left'><input type='text' size='60' name='msn' value='" . htmlspecialchars($user['msn']) . "' /></td>\r\n\t </tr>\r\n\t <tr>\r\n\t\t <td class='rowhead'>AIM</td>\r\n\t\t <td colspan='2' align='left'><input type='text' size='60' name='aim' value='" . htmlspecialchars($user['aim']) . "' /></td>\r\n\t </tr>\r\n\t <tr>\r\n\t\t <td class='rowhead'>Yahoo</td>\r\n\t\t <td colspan='2' align='left'><input type='text' size='60' name='yahoo' value='" . htmlspecialchars($user['yahoo']) . "' /></td>\r\n\t </tr>\r\n\t <tr>\r\n\t\t <td class='rowhead'>ICQ</td>\r\n\t \t <td colspan='2' align='left'><input type='text' size='60' name='icq' value='" . htmlspecialchars($user['icq']) . "' /></td>\r\n\t </tr>\r\n\t <tr>\r\n\t\t <td class='rowhead'>Website</td>\r\n\t\t <td colspan='2' align='left'><input type='text' size='60' name='website' value='" . htmlspecialchars($user['website']) . "' /></td>\r\n\t </tr>"; //== we do not want mods to be able to change user classes or amount donated... // === Donor mod time based by snuggles if ($CURUSER["class"] == UC_SYSOP) { $donor = $user["donor"] == "yes";
<? begin_frame(); ?> 8. Nú er komið að því að deila .torrent skránni og er fyllt út í formið sem er á Istorrent. En við gerðum mistök þar sem við getum ekki látið skrána heita bara "FreeBSD 6.0.torrent". Það er ekkert mál að breyta nafninu þar sem það hefur ekki áhrif á innihaldið. Þá förum við bara á staðinn sem við vistuðum hana og breytum nafninu í "FreeBSD 6.0-i386.torrent" áður en við fyllum formið út.<br /> <br /> <? end_frame(); ?> <? begin_frame(); ?> 9. Þegar því ferli er lokið ferðu aftur í µtorrent og velur "File" og þar fyrir neðan "Add torrent..." eða "Add torrent (no default save)..." en það það fer eftir stillingum. Það fyrrgreinda er þó nóg í bili. Þar velur þú torrent skránna sem þú náðir í frá Istorrent. Eftir það færðu glugga þar sem þú getur valið möppuna sem þú bjóst til (sem við gerum í þessu dæmi) eða skránna sem við bjuggum til. Síðan er smellt á "OK".<br /> <br /> <? end_frame(); ?> <? begin_frame(); ?> 10. µtorrent fer síðan yfir skránna og athugar hvort hún sé nákvæmlega sú sama og torrent skráin segir. Eftir það mun µtorrent sjálfkrafa tilkynna Istorrent að deiling á skránna sé hafin og færslan birtist á Istorrent vefnum þar sem venjulegir notendur geta náð í torrent skránna og byrjað að niðurhala frá þér. Munið síðan eftir reglunum sem varða deilingu á efni og deila efninu vel. <? end_frame(); end_main_frame(); stdfoot(); ?>
} begin_frame(T_("NEWS")); echo htmlspecialchars($row['title']) . "<br /><br />" . format_comment($row['body']) . "<br />"; end_frame(); } //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 {
exit; } switch ($do) { case "disabled": $query = "SELECT id,username, class, downloaded, uploaded, IF(downloaded>0, round((uploaded/downloaded),2), '---') as ratio, disable_reason, added, last_access FROM users WHERE enabled='no' ORDER BY last_access DESC "; $title = "Disabled users"; $link = "<a href=\"staffpanel.php?tool=warn&action=warn&?do=warned\">warned users</a>"; break; case "warned": $query = "SELECT id, username, class, downloaded, uploaded, IF(downloaded>0, round((uploaded/downloaded),2), '---') as ratio, warn_reason, warned, added, last_access FROM users WHERE warned>='1' ORDER BY last_access DESC, warned DESC "; $title = "Warned users"; $link = "<a href=\"staffpanel.php?tool=warn&action=warn&do=disabled\">disabled users</a>"; break; } $g = sql_query($query) or print mysql_error(); $count = mysql_num_rows($g); $HTMLOUT .= begin_main_frame(); $HTMLOUT .= begin_frame($title . " [<font class=\"small\">total - " . $count . " user" . ($count > 1 ? "s" : "") . "</font>] - " . $link); if ($count == 0) { $HTMLOUT .= stdmsg("hey", "There is no " . strtolower($title)); } else { $HTMLOUT .= "<form action='staffpanel.php?tool=warn&action=warn' method='post'>\r\n\t\t<table width='600' cellpadding='3' cellspacing='2' style='border-collapse:separate;' align='center'>\r\n\t\t<tr> \t\r\n\t\t\t<td class='colhead' align='left' width='100%' >User</td>\r\n\t\t\t<td class='colhead' align='center' nowrap='nowrap'>Ratio</td>\r\n\t\t\t<td class='colhead' align='center' nowrap='nowrap'>Class</td>\r\n\t\t\t<td class='colhead' align='center' nowrap='nowrap'>Last access</td>\r\n\t\t\t<td class='colhead' align='center' nowrap='nowrap'>Joined</td>\r\n\t\t\t<td class='colhead' align='center' nowrap='nowrap'><input type='checkbox' name='checkall' /></td>\r\n\t\t</tr>"; while ($a = mysql_fetch_assoc($g)) { $tip = $do == "warned" ? "Warned for : " . $a["warn_reason"] . "<br />" . " Warned till " . get_date($a["warned"], 'DATE', 1) . " - " . mkprettytime($a['warned'] - time()) : "Disabled for " . $a["disable_reason"]; $HTMLOUT .= "<tr>\r\n\t\t\t\t <td align='left' width='100%'><a href='userdetails.php?id={$a["id"]}' onmouseover=\"Tip('({$tip})')\" onmouseout=\"UnTip()\">{$a["username"]}</a></td>\r\n\t\t\t\t <td align='left' nowrap='nowrap'>{$a["ratio"]}<br /><font class='small'><b>D: </b>" . mksize($a["downloaded"]) . " <b>U:</b> " . mksize($a["uploaded"]) . "</font></td>\r\n\t\t\t\t <td align='center' nowrap='nowrap'>" . get_user_class_name($a["class"]) . "</td>\r\n\t\t\t\t <td align='center' nowrap='nowrap'>" . get_date($a["last_access"], 'LONG', 0, 1) . "</td>\r\n\t\t\t\t <td align='center' nowrap='nowrap'>" . get_date($a["added"], 'DATE', 1) . "</td>\r\n\t\t\t\t <td align='center' nowrap='nowrap'><input type='checkbox' name='users[]' value='{$a["id"]}' /></td>\r\n\t\t\t\t</tr>"; } $HTMLOUT .= "<tr>\r\n\t\t\t<td colspan='6' class='colhead' align='center'>\r\n\t\t\t\t<select name='action'>\r\n\t\t\t\t\t<option value='unwarn'>Unwarn</option>\r\n\t\t\t\t\t<option value='disable'>Disable</option>\r\n\t\t\t\t\t<option value='delete'>Delete</option>\r\n\t\t\t\t</select>\r\n\t\t\t\t»\r\n\t\t\t\t<input type='submit' value='Apply' />\r\n\t\t\t\t<input type='hidden' value='" . htmlspecialchars($_SERVER["REQUEST_URI"]) . "' name='ref' />\r\n\t\t\t</td>\r\n\t\t\t</tr>\r\n\t\t\t</table>\r\n\t\t\t</form>"; } $HTMLOUT .= end_frame(); $HTMLOUT .= end_main_frame(); echo stdhead($title) . $HTMLOUT . stdfoot($stdfoot);
$id = isset($_GET["id"]) ? 0 + $_GET["id"] : 0; if ($id == 0) { stderr("Err", "Not a valid id"); } else { $res = sql_query("SELECT id, name,filename FROM subtitles WHERE id={$id} ") or sqlerr(__FILE__, __LINE__); $arr = mysqli_fetch_assoc($res); if (mysqli_num_rows($res) == 0) { stderr("Sorry", "There is no subtitle with that id"); } $file = $INSTALLER09['sub_up_dir'] . "/" . $arr["filename"]; $fileContent = file_get_contents($file); $HTMLOUT .= "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"\n\t\t\"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n\t\t<html xmlns='http://www.w3.org/1999/xhtml'>\n\t\t<head>\n\t\t<title>Preview for - " . htmlsafechars($arr["name"]) . "</title>\n\t\t</head>\n\t\t<body>\n\t<div style='font-size:12px;color:black;background-color:#CCCCCC;'>Subtitle preview<br />" . htmlsafechars($fileContent) . "</div>\n\t</body></html>"; echo $HTMLOUT; } } else { $HTMLOUT .= begin_frame(); $s = isset($_GET["s"]) ? htmlsafechars($_GET["s"]) : ""; $w = isset($_GET["w"]) ? htmlsafechars($_GET["w"]) : ""; 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);
return preg_replace('/[\\D]/', '', $output[5]) * 1024; } } else { // We now assume the OS is UNIX // Tested on Mac OS X 10.4.6 and Linux Red Hat Enterprise 4 // This should work on most UNIX systems $pid = getmypid(); exec("ps -eo%mem,rss,pid | grep {$pid}", $output); $output = explode(" ", $output[0]); // rss is given in 1024 byte units return $output[1] * 1024; } } } stdhead("Cleanup comments"); begin_main_frame(); begin_frame("Cleaned comments", false); $sres = mysql_query("SELECT DISTINCT torrent FROM comments ") or sqlerr(__FILE__, __LINE__); while ($sarr = mysql_fetch_assoc($sres)) { $ures = mysql_query("SELECT id FROM torrents WHERE id = {$sarr['torrent']}") or sqlerr(__FILE__, __LINE__); if (mysql_num_rows($ures) == 0) { mysql_query("DELETE FROM comments WHERE torrent = {$sarr['torrent']}") or sqlerr(__FILE__, __LINE__); } @mysql_free_result($ures); } @mysql_free_result($sres); write_log("cyberfun_clean_comments_from_deleted_torrents", "Comment Table Cleaned by " . $CURUSER["username"]); print "Memory usage:" . memory_get_usage() . "<br /><br />"; end_frame(); end_main_frame(); stdfoot();
class_check(UC_MODERATOR); $lang = array_merge($lang, load_language('cheaters')); $HTMLOUT = ""; if (isset($_POST["nowarned"]) && $_POST["nowarned"] == "nowarned") { if (empty($_POST["desact"]) && empty($_POST["remove"])) { stderr("Error...", "You must select a user."); } if (!empty($_POST["remove"])) { sql_query("DELETE FROM cheaters WHERE id IN (" . implode(", ", $_POST["remove"]) . ")") or sqlerr(__FILE__, __LINE__); } if (!empty($_POST["desact"])) { sql_query("UPDATE users SET enabled = 'no' WHERE id IN (" . implode(", ", $_POST["desact"]) . ")") or sqlerr(__FILE__, __LINE__); } } $HTMLOUT .= begin_main_frame(); $HTMLOUT .= begin_frame("Cheating Users:", true); $res = sql_query("SELECT COUNT(*) FROM cheaters") or sqlerr(); $row = mysql_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'>\r\n<script type='text/javascript'>\r\n/*<![CDATA[*/\r\nfunction klappe(id)\r\n{var klappText=document.getElementById('k'+id);var klappBild=document.getElementById('pic'+id);if(klappText.style.display=='none'){klappText.style.display='block';}\r\nelse{klappText.style.display='none';}}\r\nfunction klappe_news(id)\r\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';}\r\nelse{klappText.style.display='none';klappBild.src='{$INSTALLER09['pic_base_url']}plus.gif';}}\t\r\n</script>\r\n<script type='text/javascript'>\r\nvar checkflag = 'false';\r\nfunction check(field) {\r\nif (checkflag == 'false') {\r\nfor (i = 0; i < field.length; i++) {\r\nfield[i].checked = true;}\r\ncheckflag = 'true';\r\nreturn 'Uncheck All Disable'; }\r\nelse {\r\nfor (i = 0; i < field.length; i++) {\r\nfield[i].checked = false; }\r\ncheckflag = 'false';\r\nreturn 'Check All Disable'; }\r\n}\r\nfunction check2(field) {\r\nif (checkflag == 'false') {\r\nfor (i = 0; i < field.length; i++) {\r\nfield[i].checked = true;}\r\ncheckflag = 'true';\r\nreturn 'Uncheck All Remove'; }\r\nelse {\r\nfor (i = 0; i < field.length; i++) {\r\nfield[i].checked = false; }\r\ncheckflag = 'false';\r\nreturn 'Check All Remove'; }\r\n}\r\n/*]]>*/\r\n</script>"; if ($count > $perpage) { $HTMLOUT .= $pager['pagertop']; } $HTMLOUT .= "<table width=\"80%\">\r\n<tr>\r\n<td class=\"table\" width=\"10\" align=\"center\" valign=\"middle\">#</td>\r\n<td class=\"table\">{$lang['cheaters_uname']}</td>\r\n<td class=\"table\" width=\"10\" align=\"center\" valign=\"middle\">{$lang['cheaters_d']}</td>\r\n<td class=\"table\" width=\"10\" align=\"center\" valign=\"middle\">{$lang['cheaters_r']}</td></tr>\n"; $res = sql_query("SELECT * FROM cheaters ORDER BY added DESC " . $pager['limit'] . "") or sqlerr(__FILE__, __LINE__); while ($arr = mysql_fetch_assoc($res)) { $rrr = sql_query("SELECT id, username, class, downloaded, uploaded FROM users WHERE id = {$arr['userid']}"); $aaa = mysql_fetch_assoc($rrr); $rrr2 = sql_query("SELECT name FROM torrents WHERE id = {$arr['torrentid']}");
print "<tr><td class='table_col2' style=\"vertical-align: top;\">Answer:</td><td class='table_col2'><textarea rows='3' cols='35' name=\"answer\"></textarea></td></tr>\n"; print "<tr><td class='table_col1'>Status:</td><td class='table_col1'><select name=\"flag\" style=\"width: 110px;\"><option value=\"0\" style=\"color: #ff0000;\">Hidden</option><option value=\"1\" style=\"color: #000000;\">Normal</option><option value=\"2\" style=\"color: #0000FF;\">Updated</option><option value=\"3\" style=\"color: #008000;\" selected=\"selected\">New</option></select></td></tr>"; print "<tr><td class='table_col2'>Category:</td><td class='table_col2'><select style=\"width: 300px;\" name=\"categ\">"; $res = SQL_Query_exec("SELECT `id`, `question` FROM `faq` WHERE `type`='categ' ORDER BY `order` ASC"); while ($arr = mysql_fetch_array($res, MYSQL_BOTH)) { $selected = $arr[id] == $_GET[inid] ? " selected=\"selected\"" : ""; print "<option value=\"{$arr['id']}\"" . $selected . ">{$arr['question']}</option>"; } print "</select></td></tr>\n"; print "<tr><td colspan=\"2\" align=\"center\"><input type=\"submit\" name=\"edit\" value=\"Add\" style=\"width: 60px;\" /></td></tr>\n"; print "</table></form>"; end_frame(); stdfoot(); } elseif ($_GET[action] == "addsection") { stdhead(T_("FAQ_MANAGEMENT")); begin_frame(); print "<h1 align=\"center\">Add Section</h1>"; print "<form method=\"post\" action=\"faq-actions.php?action=addnewsect\">"; print "<table border=\"0\" class=\"table_table\" cellspacing=\"0\" cellpadding=\"10\" align=\"center\">\n"; print "<tr><td class='table_col1'>Title:</td><td class='table_col1'><input style=\"width: 300px;\" type=\"text\" name=\"title\" value=\"\" /></td></tr>\n"; print "<tr><td class='table_col2'>Status:</td><td class='table_col2'><select name=\"flag\" style=\"width: 110px;\"><option value=\"0\" style=\"color: #ff0000;\">Hidden</option><option value=\"1\" style=\"color: #000000;\" selected=\"selected\">Normal</option></select></td></tr>"; print "<tr><td colspan=\"2\" align=\"center\"><input type=\"submit\" name=\"edit\" value=\"Add\" style=\"width: 60px;\" /></td></tr>\n"; print "</table></form>"; end_frame(); stdfoot(); } elseif ($_GET[action] == "addnewitem" && $_POST[question] != NULL && $_POST[answer] != NULL && is_valid_int($_POST[flag]) && is_valid_int($_POST[categ])) { $question = sqlesc($_POST[question]); $answer = sqlesc($_POST[answer]); $res = SQL_Query_exec("SELECT MAX(`order`) FROM `faq` WHERE `type`='item' AND `categ`='{$_POST['categ']}'"); while ($arr = mysql_fetch_array($res, MYSQL_BOTH)) { $order = $arr[0] + 1;
$addparam = $pagerlink; } if ($count) { //SEARCH QUERIES! list($pagertop, $pagerbottom, $limit) = pager(20, $count, "../search/?" . $addparam); $query = "SELECT torrents.id, torrents.anon, torrents.announce, torrents.category, torrents.leechers, torrents.nfo, torrents.seeders, torrents.name, torrents.times_completed, torrents.size, torrents.added, torrents.comments, torrents.numfiles, torrents.filename, torrents.owner, torrents.external, torrents.freeleech, categories.name AS cat_name, categories.parent_cat AS cat_parent, categories.image AS cat_pic, users.username, users.privacy, IF(torrents.numratings < 2, NULL, ROUND(torrents.ratingsum / torrents.numratings, 1)) AS rating FROM torrents LEFT JOIN categories ON category = categories.id LEFT JOIN users ON torrents.owner = users.id {$where} {$parent_check} {$orderby} {$limit}"; $res = SQL_Query_exec($query); } else { unset($res); } if (isset($cleansearchstr)) { stdhead(T_("SEARCH_RESULTS_FOR") . " \"" . htmlspecialchars($searchstr) . "\""); } else { stdhead(T_("BROWSE_TORRENTS")); } begin_frame(T_("SEARCH_TORRENTS")); // get all parent cats echo "<center><b>" . T_("CATEGORIES") . ":</b> "; $catsquery = SQL_Query_exec("SELECT distinct parent_cat FROM categories ORDER BY parent_cat"); echo " - <a href='../browse/'>" . T_("SHOWALL") . "</a>"; while ($catsrow = mysql_fetch_assoc($catsquery)) { echo " - <a href='../browse/?parent_cat=" . urlencode($catsrow['parent_cat']) . "'>{$catsrow['parent_cat']}</a>"; } echo "</center>"; ?> <br /><br /> <center> <form method="get" action="../search/"> <table border="0" align="center"> <tr align='right'>
?> /theme.css" /> <script type="text/javascript" src="<?php echo $site_config['SITEURL']; ?> /backend/java_klappe.js"></script> </head> <body class="shoutbox_body"> <?php echo '<div class="shoutbox_contain"><table border="0" style="width: 99%; table-layout:fixed">'; } else { if ($site_config["MEMBERSONLY"]) { loggedinonly(); } stdhead(); begin_frame(T_("SHOUTBOX_HISTORY")); echo '<div class="shoutbox_history">'; $query = 'SELECT COUNT(*) FROM shoutbox'; $result = SQL_Query_exec($query); $row = mysql_fetch_row($result); echo '<div align="center">Pages: '; $pages = round($row[0] / 100) + 1; $i = 1; while ($pages > 0) { echo "<a href='" . $site_config['SITEURL'] . "/shoutbox.php?history=1&page=" . $i . "'>[" . $i . "]</a> "; $i++; $pages--; } echo '</div><br /><table border="0" style="width: 99%; table-layout:fixed">'; } if (isset($_GET['history'])) {
{ $result = format_comment($example); print "<p class=sub><b>{$name}</b></p>\n"; print "<table class=main width=100% border=1 cellspacing=0 cellpadding=5>\n"; print "<tr valign=top><td width=25%>Description:</td><td>{$description}\n"; print "<tr valign=top><td>Syntax:</td><td><tt>{$syntax}</tt>\n"; print "<tr valign=top><td>Example:</td><td><tt>{$example}</tt>\n"; print "<tr valign=top><td>Result:</td><td>{$result}\n"; if ($remarks != "") { print "<tr><td>Remarks:</td><td>{$remarks}\n"; } print "</table>\n"; } stdhead("Tags"); begin_main_frame(); begin_frame("Tags"); $test = $_POST["test"]; ?> <p>The Yoursite forums supports a number of <i>BB tags</i> which you can embed to modify how your posts are displayed.</p> <form method=post action=?> <textarea name=test cols=60 rows=3><?php print $test ? safechar($test) : ""; ?> </textarea> <input type=submit value="Test this code!" style='height: 23px; margin-left: 5px'> </form> <?php if ($test != "") { print "<p><hr>" . format_comment($test) . "<hr></p>\n"; }