} else { $query = 'SELECT * FROM shoutbox ORDER BY msgid DESC LIMIT 20'; } $result = SQL_Query_exec($query); $alt = false; while ($row = mysql_fetch_assoc($result)) { if ($alt) { echo '<tr class="shoutbox_noalt">'; $alt = false; } else { echo '<tr class="shoutbox_alt">'; $alt = true; } echo '<td style="font-size: 9px; width: 118px;">'; echo "<div align='left' style='float: left'>"; echo date('jS M, g:ia', utc_to_tz_time($row['date'])); echo "</div>"; if ($CURUSER["edit_users"] == "yes" || $CURUSER['username'] == $row['user']) { echo "<div align='right' style='float: right'><a href='" . $site_config['SITEURL'] . "/shoutbox.php?del=" . $row['msgid'] . "' style='font-size: 8px'>[D]</a></div>"; } echo '</td><td style="font-size: 12px; padding-left: 5px"><a href="' . $site_config['SITEURL'] . '/account-details.php?id=' . $row['userid'] . '" target="_parent"><b>' . $row['user'] . ':</b></a> ' . nl2br(format_comment($row['message'])); echo '</td></tr>'; } ?> </table> </div> <br /> <?php //if the user is logged in, show the shoutbox, if not, dont.
show_error_msg(T_("ERROR"), T_("THEME_DATEBASE_ERROR") . " " . htmlspecialchars(mysql_error()), 0); } } begin_frame(T_("BANNED_IPS")); echo "<p align=\"justify\">This page allows you to prevent individual users or groups of users from accessing your tracker by placing a block on their IP or IP range.<br />\n If you wish to temporarily disable an account, but still wish a user to be able to view your tracker, you can use the 'Disable Account' option which is found in the user's profile page.</p><br />"; $count = get_row_count("bans"); if ($count == 0) { print "<b>No Bans Found</b><br />\n"; } else { list($pagertop, $pagerbottom, $limit) = pager(50, $count, "admincp.php?action=ipbans&"); // 50 per page echo $pagertop; echo "<form id='ipbans' action='admincp.php?action=ipbans&do=del' method='post'><table width='98%' cellspacing='0' cellpadding='5' align='center' class='table_table'>\n <tr>\n <th class='table_head'>" . T_("DATE_ADDED") . "</th>\n <th class='table_head'>First IP</th>\n <th class='table_head'>Last IP</th>\n <th class='table_head'>" . T_("ADDED_BY") . "</th>\n <th class='table_head'>Comment</th>\n <th class='table_head'><input type='checkbox' name='checkall' onclick='checkAll(this.form.id);' /></th>\n </tr>"; $res = SQL_Query_exec("SELECT bans.*, users.username FROM bans LEFT JOIN users ON bans.addedby=users.id ORDER BY added {$limit}"); while ($arr = mysql_fetch_assoc($res)) { echo "<tr>\n <td align='center' class='table_col1'>" . date('d/m/Y H:i:s', utc_to_tz_time($arr["added"])) . "</td>\n <td align='center' class='table_col2'>{$arr['first']}</td>\n <td align='center' class='table_col1'>{$arr['last']}</td>\n <td align='center' class='table_col2'><a href='account-details.php?id={$arr['addedby']}'>{$arr['username']}</a></td>\n <td align='center' class='table_col1'>{$arr['comment']}</td>\n <td align='center' class='table_col2'><input type='checkbox' name='delids[]' value='{$arr['id']}' /></td>\n </tr>"; } echo "</table><br /><center><input type='submit' value='Delete Checked' /></center></form><br />"; echo $pagerbottom; } echo "<br />"; print "<form method='post' action='admincp.php?action=ipbans&do=add'>\n"; print "<table cellspacing='0' cellpadding='5' align='center' class='table_table' width='98%'>\n"; print "<tr><th class='table_head' align='center'>Add Ban</th></tr>\n"; print "<tr><td class='table_col1' align='center'>First IP: <input type='text' name='first' size='40' /></td></tr>\n"; print "<tr><td class='table_col1' align='center'>Last IP: <input type='text' name='last' size='40' /></td></tr>\n"; print "<tr><td class='table_col1' align='center'>Comment: <input type='text' name='comment' size='40' /></td></tr>\n"; print "<tr><td class='table_head' align='center'><input type='submit' value='Okay' /></td></tr>\n"; print "</table></form><br />\n"; end_frame(); stdfoot();
$news_flag = 0; while ($array = mysql_fetch_assoc($res)) { if (!$array["username"]) { $array["username"] = T_('UNKNOWN_USER'); } $numcomm = get_row_count("comments", "WHERE news='" . $array['id'] . "'"); // Show first 2 items expanded if ($news_flag < 2) { $disp = "block"; $pic = "minus"; } else { $disp = "none"; $pic = "plus"; } print "<br /><a href=\"javascript: klappe_news('a" . $array['id'] . "')\"><img border=\"0\" src=\"" . $site_config["SITEURL"] . "/images/{$pic}.gif\" id=\"pica" . $array['id'] . "\" alt=\"Show/Hide\" />"; print " <b>" . $array['title'] . "</b></a> - <b>" . T_("POSTED") . ":</b> " . date("d-M-y", utc_to_tz_time($array['added'])) . " <b>" . T_("BY") . ":</b> {$array['username']}"; print "<div id=\"ka" . $array['id'] . "\" style=\"display: {$disp};\"> " . format_comment($array["body"]) . " <br /><br />" . T_("COMMENTS") . " (<a href='comments.php?type=news&id=" . $array['id'] . "'>" . number_format($numcomm) . "</a>)</div><br /> "; $news_flag++; } print "</ul></td></tr></table>\n"; } else { echo "<br /><b>" . T_("NO_NEWS") . "</b>"; } end_frame(); } if ($site_config['SHOUTBOX'] && !($CURUSER['hideshoutbox'] == 'yes')) { begin_frame(T_("SHOUTBOX")); echo '<iframe name="shout_frame" src="shoutbox.php" frameborder="0" marginheight="0" marginwidth="0" width="99%" height="210" scrolling="no" align="middle"></iframe>'; printf(T_("SHOUTBOX_REFRESH"), 5) . "<br />"; end_frame(); }
stdhead("Personal lists for " . $user['username']); begin_frame("Personal lists for " . class_user($user[username]) . ""); print "<table class=table_table align=center width=90% border=0 cellspacing=0 cellpadding=0><tr><td>"; print "<div style='margin-top:20px; margin-bottom:10px' align=left><font size=2><b>List of friends</b></font></div>\n"; print "<table align=center width=100% border=1 cellspacing=0 cellpadding=5><tr><td class=table_col1>"; $i = 0; $res = SQL_Query_exec("SELECT f.friendid as id, u.username AS name, u.class, u.avatar, u.title, u.enabled, u.last_access FROM friends AS f LEFT JOIN users as u ON f.friendid = u.id WHERE userid={$userid} ORDER BY name"); if (mysql_num_rows($res) == 0) { $friends = "Your friends list is empty!"; } else { while ($friend = mysql_fetch_array($res)) { $title = $friend["title"]; if (!$title) { $title = get_user_class_name($friend["class"]); } $body = "<a href=account-details.php?id=" . $friend['id'] . "><b>" . class_user($friend['name']) . "</b></a> \n\t\t\t<a href=mailbox.php?compose&id=" . $friend['id'] . "><img src=images/button_pm.gif title=Send PM border=0></a> \n\t\t\t<a href=friends.php?id={$userid}&action=delete&type=friend&targetid=" . $friend['id'] . "><img src=images/close.png title=Remove border=0></a>\n\t\t\t<div style='margin-top:10px; margin-bottom:2px'>Last seen: " . date("<\\b>d.M.Y<\\/\\b> H:i", utc_to_tz_time($friend['last_access'])) . "</div>\n\t\t\t[<b>" . get_elapsed_time(sql_timestamp_to_unix_timestamp($friend[last_access])) . " ago</b>]"; $avatar = htmlspecialchars($friend["avatar"]); if (!$avatar) { $avatar = "/images/default_avatar.png"; } if ($i % 2 == 0) { print "<table width=100% style='padding: 0px'><tr><td style='padding: 5px' width=50% align=center>"; } else { print "<td style='padding: 5px' width=50% align=center>"; } print "<table class=table_table width=100% height=75px>"; print "<tr valign=top><td width=75 align=center style='padding: 0px'>" . ($avatar ? "<div style='width:150px; overflow: hidden'><img width=150px src=\"{$avatar}\"></div>" : "") . "</td><td>\n"; print "<table class=table_table>"; print "<tr><td style='padding: 5px' width=100%>{$body}</td></tr>\n"; print "</table>"; print "</td></tr>";
stdhead("Personal lists for " . $user['username']); begin_frame("Personal lists for " . class_user($user[username]) . ""); print "<div style='margin-top:10px; margin-bottom:20px' align='center'><font size=2><font color=#0080FF><b>List of Personal watched users</b></font></div>"; ?> <table class="table_table" border="0" width="100%"> <tr> <th class="table_head"><b>User Name</b></td></th> <th class="table_head"><b>Account enabled?</b></td></th> <th class="table_head"><b>Contact user</td></th> <th class="table_head"><b>Last Seen</b></td></th> <th class="table_head"><b>REMOVE</b></td></th> </tr> <?php $res = SQL_Query_exec("SELECT b.bkid as id, u.username AS name, u.class, u.avatar, u.title, u.enabled, u.last_access FROM bookmarkuser AS b LEFT JOIN users as u ON b.bkid = u.id WHERE userid={$userid} ORDER BY name"); if (mysql_num_rows($res) == 0) { $bookmarkuser = "******"; } else { while ($bookmarkuser = mysql_fetch_array($res)) { $title = $bookmarkuser["title"]; if (!$title) { $title = get_user_class_name($bookmarkuser["class"]); } $banned = $bookmarkuser["enabled"]; echo "<tr>\n <td class='table_col1' align='center'><a href='../user/?id=" . $bookmarkuser['id'] . "'><b>" . class_user($bookmarkuser['name']) . "</b></a></td>\n <td class='table_col2' align='center'>{$banned}</td>\n <td class='table_col1' align='center'><a href='../message/?compose&id=" . $bookmarkuser['id'] . "'><img src='../images/button_pm.gif' title='Send PM'></a></td>\n <td class='table_col2' align='center'><div style='margin-top:10px; margin-bottom:2px'>Last seen: " . date("<\\b>d.M.Y<\\/\\b> H:i", utc_to_tz_time($bookmarkuser['last_access'])) . "</div>[<b>" . get_elapsed_time(sql_timestamp_to_unix_timestamp($bookmarkuser[last_access])) . " ago</b>]</td>\n <td class='table_col1' align='center'><b><a href='../watch/?id={$userid}&action=delete&type=bookmarkuser&targetid=" . $bookmarkuser['id'] . "'><font style='margin-left:7px'><input type='submit' value='Remove' class='btn btn-success'/></font></a></b></td>\n </tr>"; } } ?> </table> <?php end_frame(); stdfoot();
if (window.addEventListener) window.addEventListener("load", initializemarquee, false) else if (window.attachEvent) window.attachEvent("onload", initializemarquee) else if (document.getElementById) window.onload=initializemarquee <?php } ?> </script> <div id="marqueecontainer" onmouseover="copyspeed=pausespeed" onmouseout="copyspeed=marqueespeed" style="background-color: transparent;"> <div id="vmarquee" style="position: absolute; width: 100%; background-color: transparent;"> <!--YOUR SCROLL CONTENT HERE--> <?php if (mysql_num_rows($res)) { while ($array = mysql_fetch_assoc($res)) { print "<a href='comments.php?type=news&id=" . $array['id'] . "'><b>" . $array['title'] . "</b></a><br /><b>" . T_("POSTED") . ":</b> " . gmdate("d-M-y", utc_to_tz_time($array["added"])) . "<br /><br />"; } } else { echo T_("NO_NEWS"); } ?> </div> </div> <?php end_block(); } //end newson check
function commenttable($res, $type = null) { global $site_config, $CURUSER, $THEME, $LANGUAGE; //Define globals while ($row = mysql_fetch_assoc($res)) { $postername = htmlspecialchars($row["username"]); if ($postername == "") { $postername = T_("DELUSER"); $title = T_("DELETED_ACCOUNT"); $avatar = ""; $usersignature = ""; $userdownloaded = ""; $useruploaded = ""; } else { $privacylevel = $row["privacy"]; $avatar = htmlspecialchars($row["avatar"]); $title = format_comment($row["title"]); $usersignature = stripslashes(format_comment($row["signature"])); $userdownloaded = mksize($row["downloaded"]); $useruploaded = mksize($row["uploaded"]); } if ($row["downloaded"] > 0) { $userratio = number_format($row["uploaded"] / $row["downloaded"], 2); } else { $userratio = "---"; } if (!$avatar) { $avatar = $site_config["SITEURL"] . "/images/default_avatar.png"; } $commenttext = format_comment($row["text"]); $edit = null; if ($type == "torrent" && $CURUSER["edit_torrents"] == "yes" || $type == "news" && $CURUSER["edit_news"] == "yes" || $CURUSER['id'] == $row['user']) { $edit = '[<a href="comments.php?id=' . $row["id"] . '&type=' . $type . '&edit=1">Edit</a>] '; } $delete = null; if ($type == "torrent" && $CURUSER["delete_torrents"] == "yes" || $type == "news" && $CURUSER["delete_news"] == "yes") { $delete = '[<a href="comments.php?id=' . $row["id"] . '&type=' . $type . '&delete=1">Delete</a>] '; } print '<div class="f-post f-border"><table cellspacing="0" width="100%">'; print '<tr class="p-title">'; print '<th align="center" width="150"></th>'; print '<th align="right">' . $edit . $delete . '[<a href="report.php?comment=' . $row["id"] . '">Report</a>] Posted: ' . date("d-m-Y \\a\\t H:i:s", utc_to_tz_time($row["added"])) . '<a id="comment' . $row["id"] . '"></a></th>'; print '</tr>'; print '<tr valign="top">'; if ($CURUSER['edit_users'] == 'no' && $privacylevel == 'strong') { print '<td class="f-border comment-details" align="left" width="150"><center><b>' . $postername . '</b><br /><i>' . $title . '</i><br /><img width="80" height="80" src="' . $avatar . '" alt="" /><br /><br />Uploaded: ---<br />Downloaded: ---<br />Ratio: ---<br /><br /><a href="account-details.php?id=' . $row["user"] . '"><img src="themes/' . $THEME . '/forums/icon_profile.png" border="" alt="" /></a> <a href="mailbox.php?compose&id=' . $row["user"] . '"><img src="themes/' . $THEME . '/forums/icon_pm.png" border="0" alt="" /></a></center></td>'; } else { print '<td class="f-border comment-details" align="left" width="150"><center><b>' . $postername . '</b><br /><i>' . $title . '</i><br /><img width="80" height="80" src="' . $avatar . '" alt="" /><br /><br />Uploaded: ' . $useruploaded . '<br />Downloaded: ' . $userdownloaded . '<br />Ratio: ' . $userratio . '<br /><br /><a href="account-details.php?id=' . $row["user"] . '"><img src="themes/' . $THEME . '/forums/icon_profile.png" border="0" alt="" /></a> <a href="mailbox.php?compose&id=' . $row["user"] . '"><img src="themes/' . $THEME . '/forums/icon_pm.png" border="0" alt="" /></a></center></td>'; } print '<td class="f-border comment">' . $commenttext . '<hr />' . $usersignature . '</td>'; print '</tr>'; print '</table></div>'; print '<br />'; } }
} if ($_GET['action'] == 'select' or $_GET['action'] == 'history') { /* Fetch Previous Shouts... */ $res = SQL_Query_exec('SELECT `shoutbox`.`msgid`, `shoutbox`.`userid`, `shoutbox`.`user`, `shoutbox`.`message`, `shoutbox`.`date`, users.avatar FROM shoutbox LEFT JOIN users ON shoutbox.user = users.username ORDER BY `msgid` DESC ' . ($_GET['action'] == 'history' ? null : 'LIMIT 20')); $i = 0; $data = array(); while ($row = mysql_fetch_object($res)) { if ($row->avatar == '') { $avatar = $site_config["SITEURL"] . "/images/default_avatar.gif"; } else { $avatar = htmlspecialchars($row->avatar); } if (!$avatar) { $avatar = $site_config["SITEURL"] . "/images/default_avatar.gif"; } $data[] = (object) array('date' => date('dS M H:i', utc_to_tz_time($row->date)), 'text' => format_comment($row->message), 'user' => '<a href="/account-details.php?id=' . $row->userid . '" style="text-decoration: none;" onmouseover="return overlib(\'<img src=' . $avatar . ' width=120 height=120 border=0>\', CENTER)" onmouseout="return nd()">' . class_user($row->user) . ':</a>', 'alt' => $i % 2 == 0 ? 'shoutbox_alt' : 'shoutbox_noalt', 'sid' => $row->msgid, 'uid' => $row->userid); $i++; } mysql_free_result($res); mysql_close(); /* Dynamic Content... */ header('Cache-Control: no-cache, must-revalidate'); header('Pragma: no-cache'); /* Prepare Response... */ echo '<div class="shout">'; foreach ($data as $row) { echo '<div class="shoutAlt"> <span class="shoutDate">', $row->date, '</span> <span class="shoutEdit">', ($CURUSER['edit_users'] == 'yes' or $row->uid == $CURUSER['id']) ? '<a href="" onclick="deleteMessage(' . $row->sid . '); return false;" title="Delete">[D]</a>' : null, '</span>
?> <dl> <?php while ($array = mysql_fetch_assoc($res)) { ?> <dt><a href='comments.php?type=news&id=<?php echo $array['id']; ?> '><strong><?php echo $array['title']; ?> </strong></a></dt><dd><strong><?php echo T_("POSTED"); ?> :</strong> <?php echo gmdate("d-M-y", utc_to_tz_time($array["added"])); ?> <dd> <?php } ?> </dl> <?php } else { ?> <p class="text-center"><?php echo T_("NO_NEWS"); ?> </p> <?php
} echo "<tr>"; print "<td class='table_col1' width='1%' align='center' valign='middle'>"; if (!empty($row["cat_name"])) { print "<a href=\"torrents.php?cat=" . $row["category"] . "\">"; if (!empty($row["cat_pic"]) && $row["cat_pic"] != "") { print "<img border=\"0\" src=\"" . $site_config['SITEURL'] . "/images/categories/" . $row["cat_pic"] . "\" title=\"" . $row["cat_parent"] . ": " . $row["cat_name"] . "\" />"; } else { print $row["cat_parent"] . ": " . $row["cat_name"]; } print "</a>"; } else { print "---"; } print "</td>\n"; echo "<td class='table_col2' nowrap='nowrap'>" . (count($expandrows) ? "<a href=\"javascript: klappe_torrent('t" . $row['id'] . "')\"><img border=\"0\" src=\"" . $site_config["SITEURL"] . "/images/plus.gif\" id=\"pict" . $row['id'] . "\" alt=\"Show/Hide\" class=\"showthecross\" /></a>" : "") . " <a title=\"" . $row["name"] . "\" href=\"torrents-details.php?id={$id}&hit=1\">{$dispname}</a> {$freeleech}</td>\n\t\t\t\t<td class='table_col1'>" . mksize($row["size"]) . "</td>\n\t\t\t\t<td class='table_col2' align='center'>" . date("j.M.Y<\\B\\R>H:i", utc_to_tz_time($row["added"])) . "</td>\n\t\t\t\t<td class='table_col1' align='center'><a href=\"download.php?id=" . $row["id"] . "&name=" . rawurlencode($row["filename"]) . "\"><img src='images/icon_down.png' border='0' title=\"Download Torrent\" /></a></td>\n\t\t\t\t<td class='table_col2' align='center'><a href='comments.php?type=torrent&id={$row['id']}'>" . number_format($row["comments"]) . "</a></td>\n\t\t\t\t<td class='table_col1' align='center'><font color='limegreen'>" . number_format($row["seeders"]) . "</font></td>\n\t\t\t\t<td class='table_col2' align='center'><font color='red'>" . number_format($row["leechers"]) . "</font></td>\n\t\t\t\t<td class='table_col1' align='center'><font color='darkorange'>" . number_format($row["times_completed"]) . "</font></td>\n"; if ($site_config["ALLOWEXTERNAL"]) { if ($row["external"] == 'yes') { print "<td class='table_col2' align='center'><img src='images/t_extern.png' border='0' title='External Torrent'></td>\n"; } else { print "<td class='table_col2' align='center'><img src='images/t_local.png' border='0' title='Local Torrent'></td>\n"; } } echo "<td class='table_col1' align='center'><a href=\"takedelbookmark.php?bookmarkid=" . $row[id] . "\"><img src=\"images/delete.png\" title=\"Delete\" border=\"0\"></a></td>\n"; echo "</tr>\n"; } echo "</table>"; if ($count > $perpage) { print $pagerbottom; } else { print "<br />";