$arr["username"] = "******" . get_user_class_color($arr['class']) . "'> " . SafeChar($arr['username']) . "</font>"; break; case UC_MODERATOR: $arr["username"] = "******" . get_user_class_color($arr['class']) . "'> " . SafeChar($arr['username']) . "</font>"; break; case UC_UPLOADER: $arr["username"] = "******" . get_user_class_color($arr['class']) . "'> " . SafeChar($arr['username']) . "</font>"; break; case UC_VIP: $arr["username"] = "******" . get_user_class_color($arr['class']) . "'> " . SafeChar($arr['username']) . "</font>"; break; case UC_POWER_USER: $arr["username"] = "******" . get_user_class_color($arr['class']) . "'> " . SafeChar($arr['username']) . "</font>"; break; case UC_USER: $arr["username"] = "******" . get_user_class_color($arr['class']) . "'> " . SafeChar($arr['username']) . "</font>"; break; } $donator = $arr["donor"] === "yes"; $warned = $arr["warned"] === "yes"; if ($CURUSER) { $birthdayusers .= "<a href=userdetails.php?id={$arr["id"]}><b>{$arr["username"]}</b></a>"; } else { $birthdayusers .= "<b>{$arr["username"]}</b>"; } if ($donator) { $birthdayusers .= "<img src={$pic_base_url}star.gif alt='Donated' />"; } if ($warned) { $birthdayusers .= "<img src={$pic_base_url}warned.gif alt='Warned' />"; }
if ($row["countstats"] == "yes") { $mess3 = " yes - this is a normal torrent!"; } else { $mess3 = " no - this is a FREE torrent!"; } ?> <tr><td align="right"><font color="red">*</font><b><?php echo $language['free']; ?> </b></td> <td><select name="countstats"> <option value="<?php echo SafeChar($row[countstats]); ?> "><?php echo SafeChar($row[countstats]); ?> </option> <option value="yes"> yes </option><option value="no"> no </option></select> <?php echo $mess3; ?> </td></tr> <?php } //===end free upload / staff stuff if (get_user_class() >= UC_UPLOADER) { tr("" . $language['vip'] . "", "<input type='checkbox' name='vip'" . ($row["vip"] == "yes" ? " checked='checked'" : "") . " value='1' /> If this one is checked, only VIPs can download this torrent", 1); } if (get_user_class() > UC_MODERATOR) { tr("" . $language['sticky'] . "", "<input type='checkbox' name='sticky'" . ($row["sticky"] == "yes" ? " checked='checked'" : "") . " value='yes' />Set sticky this torrent!", 1); }
$update = mysql_query($sql) or die('Error!...'); } } } if (isset($_POST['countstats'])) { foreach ($_POST['countstats'] as $item) { if ($item !== null) { $sql = "UPDATE torrents SET countstats = 'yes' WHERE id='{$item}'"; $update = mysql_query($sql) or die('Error!...'); } } } } $count1 = number_format(get_row_count("torrents")); print "<h2 align=center>Full Torrent List</h2>"; print "<center><font class=small>We currently have " . SafeChar($count1) . " Torrents</font></center>"; begin_main_frame("Full site torrent list", true, 5); $res1 = mysql_query("SELECT COUNT(*) FROM torrents {$limit}") or sqlerr(); $row1 = mysql_fetch_array($res1); $count = $row1[0]; $torrentsperpage = 30; list($pagertop, $pagerbottom, $limit) = pager($torrentsperpage, $count, "massfree.php?"); print "{$pagertop}"; $sql = "SELECT countstats, name FROM torrents {$limit}"; $result = mysql_query($sql) or die('Nothing found..'); if (mysql_num_rows($result) != 0) { ?> <center> <?php print '<form action="?update" method=post>'; print '<table width=600 border=1 cellspacing=0 cellpadding=5 align=center>';
if ($row["allow_comments"] == "yes") { $messc = " Comments are allowed for everyone on this torrent!"; } else { $messc = " Only staff members are able to comment on this torrent!"; } ?> <tr><td align="right"><font color="red">*</font><b><?php echo $language['comm']; ?> </b></td> <td><select name="allow_comments"> <option value="<?php echo SafeChar($row["allow_comments"]); ?> "><?php echo SafeChar($row["allow_comments"]); ?> </option> <option value="yes"> Yes </option><option value="no"> No </option></select> <?php echo $messc; ?> </td></tr> <?php } // ===end if (get_user_class() > UC_VIP) { if ($row["countstats"] == "yes") { $mess = " yes - this is a normal torrent!"; } else { $mess = " no - this is a FREE torrent!"; }
function forum_stats() { global $pic_base_url, $forum_width, $DEFAULTBASEURL, $CURUSER; $forumusers = ''; $res = sql_query("SELECT id, username, donor, warned, class, avatar FROM users WHERE forum_access >= " . sqlesc(get_date_time(gmtime() - 180)) . " ORDER BY forum_access DESC") or sqlerr(__FILE__, __LINE__); while ($arr = mysql_fetch_assoc($res)) { // ///////////////view online users as avatars in forum//////////// if ($CURUSER["forumview"] == 'yes') { if ($arr["avatar"]) { $forumusers .= "<a href=\"" . safeChar($arr["avatar"]) . "\" class='MagicZoom' title=\"" . safeChar($arr["username"]) . "\" class=\"borderimage\" onMouseover=\"borderit(this,'black')\" onMouseout=\"borderit(this,'silver')\"><img src=\"" . safeChar($arr["avatar"]) . "\" width=\"78\" height=\"130\" title=\"{$arr["username"]}\"" . safeChar($arr["username"]) . "\"></a>"; } else { $forumusers .= "<a href=\"userdetails.php?id={$arr["id"]}\" target=\"_blank\"> <img src=\"/pic/default_avatar.png\" width=\"78\" height=\"130\" alt=\"{$arr["username"]}\" title=\"{$arr["username"]}\"/> </a>"; } } else { if (!empty($forumusers)) { $forumusers .= ",\n"; } } if (!function_exists('get_user_class_color')) { switch ($arr["class"]) { case UC_CODER: $arr["username"] = "******" . get_user_class_color($arr['class']) . "'> " . safeChar($arr['username']) . "</font>"; break; case UC_DESIGNER: $arr["username"] = "******" . get_user_class_color($arr['class']) . "'> " . safeChar($arr['username']) . "</font>"; break; case UC_SYSOP: $arr["username"] = "******" . get_user_class_color($arr['class']) . "'> " . safeChar($arr['username']) . "</font>"; break; case UC_ADMINISTRATOR: $arr["username"] = "******" . get_user_class_color($arr['class']) . "'> " . SafeChar($arr['username']) . "</font>"; break; case UC_MODERATOR: $arr["username"] = "******" . get_user_class_color($arr['class']) . "'> " . SafeChar($arr['username']) . "</font>"; break; case UC_UPLOADER: $arr["username"] = "******" . get_user_class_color($arr['class']) . "'> " . SafeChar($arr['username']) . "</font>"; break; case UC_VIP: $arr["username"] = "******" . get_user_class_color($arr['class']) . "'> " . SafeChar($arr['username']) . "</font>"; break; case UC_POWER_USER: $arr["username"] = "******" . get_user_class_color($arr['class']) . "'> " . SafeChar($arr['username']) . "</font>"; break; case UC_USER: $arr["username"] = "******" . get_user_class_color($arr['class']) . "'> " . SafeChar($arr['username']) . "</font>"; break; } } else { if ($CURUSER["forumview"] == 'no') { $username = "******" . get_user_class_color($arr["class"]) . ">" . $arr["username"] . "</font>"; } } $donator = $arr["donor"] === "yes"; $warned = $arr["warned"] === "yes"; if ($donator || $warned) { $forumusers .= "<span style=\"white-space:nowrap\">"; } // $username = ''; $forumusers .= "<a href='{$DEFAULTBASEURL}/userdetails.php?id={$arr['id']}'><b>{$username}</b></a>"; if ($donator) { $forumusers .= "<img src='{$pic_base_url}star.gif' alt='Donated {$arr['donor']}' />"; } if ($warned) { $forumusers .= "<img src='{$pic_base_url}warned.gif' alt='Warned {$arr['warned']}' />"; } if ($donator || $warned) { $forumusers .= "</span>"; } } if (empty($forumusers)) { $forumusers = "No users on-line"; } $topic_post_res = sql_query("SELECT SUM(topiccount) AS topics, SUM(postcount) AS posts FROM forums"); $topic_post_arr = mysql_fetch_assoc($topic_post_res); ?> <br /> <table width='<?php echo $forum_width; ?> ' border=0 cellspacing=0 cellpadding=5> <tr> <td class="colhead" align="center">Now active in Forums:</td> </tr> <tr> <td class='text'><?php echo $forumusers; ?> </td> </tr> <tr> <td class='colhead' align='center'><h2>Our members wrote <b><?php echo number_format($topic_post_arr['posts']); ?> </b> Posts in <b><?php echo number_format($topic_post_arr['topics']); ?> </b> Threads</h2></td> </tr> </table><?php }