function std_view() { global $READPOST_EXPIRY, $CURUSER, $forum_pic_url; $forums_res = mysql_query("SELECT * FROM forums ORDER BY sort, name") or sqlerr(__FILE__, __LINE__); stdhead("Forums"); $htmlout = "<h1>Forums</h1>\n"; $htmlout .= "<div style='width:80%'><p align=right><span class='btn'><a href='forums.php?action=search'>Search</a></span> <span class='btn'><a href='forums.php?action=viewunread'>View unread</a></span> <span class='btn'><a href='forums.php?action=catchup'>Catch up</a></span></p></div>"; $htmlout .= "<table border=1 cellspacing=0 cellpadding=5 width='80%'>\n"; $htmlout .= "<tr><td class=colhead align=left>Forum</td><td class=colhead align=right>Topics</td>" . "<td class=colhead align=right>Posts</td>" . "<td class=colhead align=left>Last post</td></tr>\n"; while ($forums_arr = mysql_fetch_assoc($forums_res)) { if (get_user_class() < $forums_arr["minclassread"]) { continue; } $forumid = $forums_arr["id"]; $forumname = htmlspecialchars($forums_arr["name"]); $forumdescription = htmlspecialchars($forums_arr["description"]); $topiccount = number_format($forums_arr["topiccount"]); $postcount = number_format($forums_arr["postcount"]); $lastpostid = get_forum_last_post($forumid); // Get last post info $post_res = mysql_query("SELECT p.added, p.topicid, p.userid, u.username, t.subject\r\n\t\t\t\t\t\t\tFROM posts p\r\n\t\t\t\t\t\t\tLEFT JOIN users u ON p.userid = u.id\r\n\t\t\t\t\t\t\tLEFT JOIN topics t ON p.topicid = t.id\r\n\t\t\t\t\t\t\tWHERE p.id = {$lastpostid}") or sqlerr(__FILE__, __LINE__); if (mysql_num_rows($post_res) == 1) { $post_arr = mysql_fetch_assoc($post_res) or die("Bad forum last_post"); $lastposterid = $post_arr["userid"]; $lastpostdate = get_date($post_arr["added"], ''); $lasttopicid = $post_arr["topicid"]; //$user_res = mysql_query("SELECT username FROM users WHERE id=$lastposterid") or sqlerr(__FILE__, __LINE__); //$user_arr = mysql_fetch_assoc($user_res); $lastposter = htmlspecialchars($post_arr['username']); //$topic_res = mysql_query("SELECT subject FROM topics WHERE id=$lasttopicid") or sqlerr(__FILE__, __LINE__); //$topic_arr = mysql_fetch_assoc($topic_res); $lasttopic = htmlspecialchars($post_arr['subject']); $lastpost = "<nobr>{$lastpostdate}<br>" . "by <a href=userdetails.php?id={$lastposterid}><b>{$lastposter}</b></a><br>" . "in <a href=?action=viewtopic&topicid={$lasttopicid}&page=p{$lastpostid}#{$lastpostid}><b>{$lasttopic}</b></a></nobr>"; $r = mysql_query("SELECT lastpostread FROM readposts WHERE userid={$CURUSER['id']} AND topicid={$lasttopicid}") or sqlerr(__FILE__, __LINE__); $a = mysql_fetch_row($r); //..rp.. $npostcheck = $post_arr['added'] > time() - $READPOST_EXPIRY ? !$a or $lastpostid > $a[0] : 0; /* if ($a && $a[0] >= $lastpostid) $img = "unlocked"; else $img = "unlockednew"; */ if ($npostcheck) { $img = "unlockednew"; } else { $img = "unlocked"; } // ..rp.. } else { $lastpost = "N/A"; $img = "unlocked"; } $htmlout .= "<tr><td align=left><table border=0 cellspacing=0 cellpadding=0><tr><td class=embedded style='padding-right: 5px'>" . "<img src=\"{$forum_pic_url}{$img}.gif\"></td>" . "<td class=embedded><a href=?action=viewforum&forumid={$forumid}><b>{$forumname}</b></a><br>\n" . "{$forumdescription}</td></tr></table></td><td align=right>{$topiccount}</td>" . "</td><td align=right>{$postcount}</td>" . "<td align=left>{$lastpost}</td></tr>\n"; } $htmlout .= "</table>\n<br />\n"; $htmlout .= "<div style='width:80%'><p align=right><span class='btn'><a href='forums.php?action=search'>Search</a></span> <span class='btn'><a href='forums.php?action=viewunread'>View unread</a></span> <span class='btn'><a href='forums.php?action=catchup'>Catch up</a></span></p></div>"; echo $htmlout; stdfoot(); exit; }
function iUsers($iname, $ipass, $imail) { global $admin_file, $CURUSER; if ($_SERVER["REQUEST_METHOD"] == "POST") { list($iclass) = mysql_fetch_row(sql_query('SELECT class FROM users WHERE username = '******'Администратор ' . $CURUSER['username'] . ' пробовал изменить учетные данные пользователя ' . $iname . ' классом выше!', 'red', 'error'); } else { $updateset = array(); if (!empty($ipass)) { $secret = mksecret(); $hash = md5($secret . $ipass . $secret); $updateset[] = "secret = " . sqlesc($secret); $updateset[] = "passhash = " . sqlesc($hash); } if (!empty($imail) && validemail($imail)) { $updateset[] = "email = " . sqlesc($imail); } if (count($updateset)) { $res = sql_query("UPDATE users SET " . implode(", ", $updateset) . " WHERE username = "******"Ошибка", "Смена пароля завершилась неудачей! Возможно указано несуществующее имя пользователя.", "error"); } else { stdmsg("Изменения пользователя прошло успешно", "Имя пользователя: " . $iname . (!empty($hash) ? "<br />Новый пароль: " . $ipass : "") . (!empty($imail) ? "<br />Новая почта: " . $imail : "")); } } } else { echo "<form method=\"post\" action=\"" . $admin_file . ".php?op=iUsers\">" . "<table border=\"0\" cellspacing=\"0\" cellpadding=\"3\">" . "<tr><td class=\"colhead\" colspan=\"2\">Смена пароля</td></tr>" . "<tr>" . "<td><b>Пользователь</b></td>" . "<td><input name=\"iname\" type=\"text\"></td>" . "</tr>" . "<tr>" . "<td><b>Новый пароль</b></td>" . "<td><input name=\"ipass\" type=\"password\"></td>" . "</tr>" . "<tr>" . "<td><b>Новая почта</b></td>" . "<td><input name=\"imail\" type=\"text\"></td>" . "</tr>" . "<tr><td colspan=\"2\" align=\"center\"><input type=\"submit\" name=\"isub\" value=\"Сделать\"></td></tr>" . "</table>" . "<input type=\"hidden\" name=\"op\" value=\"iUsers\" />" . "</form>"; } }
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 peer_list($array) { ?> <table width="100%" border="1" cellpadding="5" style="border-collapse:collapse"> <tr> <td align="center" class="colhead">User</td> <td align="center" class="colhead">Port&Ip</td> <td align="center" class="colhead">Ratio</td> <td align="center" class="colhead">Downloaded</td> <td align="center" class="colhead">Uploaded</td> <td align="center" class="colhead">Started</td> <td align="center" class="colhead">Finished</td> </tr> <?php foreach ($array as $p) { $time = max(1, time() - $p["started"] - (time() - $p["last_action"])); ?> <tr> <td align="center"><a href="userdetails.php?id=<?php echo $p["p_uid"]; ?> " ><?php echo $p["p_user"]; ?> </a></td> <td align="center"><?php echo get_user_class() >= UC_MODERATOR ? $p["ip"] . ":" . $p["port"] : "xx.xx.xx.xx:xxxx"; ?> </td> <td align="center"><?php echo $p["downloaded"] > 0 ? number_format($p["uploaded"] / $p["downloaded"], 2) : ($p["uploaded"] > 0 ? "∞" : "---"); ?> </td> <td align="center"><?php echo $p["downloaded"] > 0 ? prefixed($p["downloaded"]) . " @" . prefixed(($p["downloaded"] - $p["downloadoffset"]) / $time) . "s" : "0kb"; ?> </td> <td align="center"><?php echo $p["uploaded"] > 0 ? prefixed($p["uploaded"]) . " @" . prefixed(($p["uploaded"] - $p["uploadoffset"]) / $time) . "s" : "0kb"; ?> </td> <td align="center"><?php echo date("d-M/Y H:i", $p["started"]); ?> </td> <td align="center"><?php echo date("d-M/Y H:i", $p["finishedat"]); ?> </td> </tr> <?php } print "</table>"; }
function secureip($rank) { if (get_user_class() >= $rank) { $secureip = getip(); $staffip = ip2long($secureip); $sanity = sql_query("SELECT * FROM ipsecureip WHERE {$staffip} >= first AND {$staffip} <= last") or sqlerr(__FILE__, __LINE__); if (mysql_num_rows($sanity) == 0) { stderr('Error', 'Time shall unfold what plighted cunning hides Who cover faults, at last shame them derides.<br> Click to add your ip to allowed ip\'s - you must use vaild site email address <a class=altlink href=ipstaff.php>when you register to use this</a> page.<br><br>'); die; } } }
function ai_response($content) { # AI Module V0.1.20130409 # Test only. global $ai_library, $function_library; global $CURUSER; foreach ($ai_library as $value) { foreach ($value['keyword'] as $kw) { if (preg_match($kw, $content)) { $ret = $value['response'][array_rand($value['response'], 1)]; if (preg_match("/function/", $ret)) { if ($ret == "function:date") { // date //check user level if (get_user_class() >= UC_INSANE_USER) { $ret = $function_library['date']['success']; } else { $ret = $function_library['date']['fail']; } } if ($ret == "function:midautumn") { // mid autumn $res = sql_query("SELECT * FROM midautumn WHERE userid = " . sqlesc($CURUSER['id'])) or sqlerr(__FILE__, __LINE__); if (mysql_num_rows($res) != 0) { $ret = $function_library['midautumn']['fail']; } else { $bscom = date("Y-m-d") . " - " . " 500 Points for Mid-autumn Festival.\n " . $CURUSER['bonuscomment']; sql_query("UPDATE users SET seedbonus = seedbonus + 500, bonuscomment = " . sqlesc($bscom) . " WHERE id = " . sqlesc($CURUSER['id'])) or sqlerr(__FILE__, __LINE__); sql_query("INSERT into midautumn (userid) VALUES (" . sqlesc($CURUSER['id']) . ")") or sqlerr(__FILE__, __LINE__); $ret = $function_library['midautumn']['success']; } } if ($ret == "function:closenhdrobot") { // close NHDRobot sql_query("UPDATE users SET shownhdrobot = 'no' WHERE id = " . sqlesc($CURUSER['id'])) or sqlerr(__FILE__, __LINE__); //$ret = $function_library['closenhdrobot']; $ret = "norep"; } if ($ret == "function:opennhdrobot") { // open NHDRobot sql_query("UPDATE users SET shownhdrobot = 'yes' WHERE id = " . sqlesc($CURUSER['id'])) or sqlerr(__FILE__, __LINE__); //$ret = $function_library['opennhdrobot']; $ret = "norep"; } } return $ret; } } } return ""; }
function insert_quick_jump_menu($currentforum = 0) { print "<p align=center><form method=get action=? name=jump>\n"; print "<input type=hidden name=action value=viewforum>\n"; print "Quick jump: "; print "<select name=forumid onchange=\"if(this.options[this.selectedIndex].value != -1){ forms['jump'].submit() }\">\n"; $res = mysql_query("SELECT * FROM forums ORDER BY name") or sqlerr(__FILE__, __LINE__); while ($arr = mysql_fetch_assoc($res)) { if (get_user_class() >= $arr["minclassread"]) { print "<option value=" . $arr["id"] . ($currentforum == $arr["id"] ? " selected>" : ">") . $arr["name"] . "\n"; } } print "</select>\n"; print "<input type=submit value='Go!'>\n"; print "</form>\n</p>"; }
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(); }
function check_admins($flag = true, $usertypes = "") { //$flag=false 表示是否为论坛版主,否则为各等级管理员; global $lang_signin; global $CURUSER; if ($flag) { if (get_user_class() < 12) { stderr($lang_signin['std_sorry'], $lang_signin['std_permission_denied_only'] . get_user_class_name(12, false, true, true) . $lang_signin['std_or_above_can_view'], false, false, true, true); } } elseif ($usertypes == "admin") { if (get_user_class() < 14) { stderr($lang_signin['std_sorry'], $lang_signin['std_permission_denied_onlyadmin'] . get_user_class_name(14, false, true, true) . $lang_signin['std_or_admin_can_view'], false, false, true, true); } return true; //不是管理员 } elseif ($usertypes == "forumman") { //以下内容不在等级系统中 $mysql = "SELECT * FROM forummods WHERE forummods.userid = '" . $CURUSER['id'] . "'"; $res = mysql_query($mysql); if ("" == mysql_fetch_array($res)) { return false; //bu是论坛版主 } return true; //确实是论坛版主 } elseif ($usertypes == "picker") { $mysql = "SELECT * FROM users WHERE users.id = '" . $CURUSER['id'] . "' and users.picker = 'yes'"; $res = mysql_query($mysql); if ("" == mysql_fetch_array($res)) { return false; //不是保种员 } return true; //确实是保种员 } elseif ($usertypes == "support") { $mysql = "SELECT * FROM users WHERE users.id = '" . $CURUSER['id'] . "' and users.support = 'yes'"; $res = mysql_query($mysql); if ("" == mysql_fetch_array($res)) { return false; //不是保种员 } return true; //确实是保种员 } }
} if (empty($_REQUEST['attachmentid'])) { // return not found header httperr(); } $id = (int) $_GET['attachmentid']; $attachment_dir = ROOT_DIR . "forum_attachments"; $at = sql_query("SELECT * FROM attachments WHERE id=" . sqlesc($id)) or sqlerr(__FILE__, __LINE__); $resat = mysql_fetch_assoc($at); $filename = $attachment_dir . '/' . $resat['filename']; if (!$resat || !is_file($filename) || !is_readable($filename)) { // return not found header httperr(); } if ($_GET['action'] == 'delete') { if (get_user_class() >= UC_MODERATOR) { @unlink($filename); sql_query("DELETE FROM attachments WHERE id=" . sqlesc($id)) or sqlerr(__FILE__, __LINE__); sql_query("DELETE FROM attachmentdownloads WHERE fileid=" . sqlesc($id)) or sqlerr(__FILE__, __LINE__); die('<font color=\\"red\\">File successfull deleted...'); } else { httperr(); } } $file_extension = strtolower(substr(strrchr($filename, "."), 1)); switch ($file_extension) { case "pdf": $ctype = "application/pdf"; break; case "exe": $ctype = "application/octet-stream";
} $s .= "\n</select> <font class=small>" . $lang_usercp['text_translation_note'] . "<a href=\"aboutnexus.php#translation\"><b>" . $lang_usercp['text_translation_link'] . "</b></a></font>.</td></tr>"; tr_small($lang_usercp['row_site_language'], $s, 1); if ($showmovies['hot'] == "yes" || $showmovies['classic'] == "yes") { tr_small($lang_usercp['row_recommended_movies'], ($showmovies['hot'] == "yes" ? "<input type=checkbox name=show_hot" . ($CURUSER["showhot"] == "yes" ? " checked" : "") . " value=yes>" . $lang_usercp['checkbox_show_hot'] . " " : "") . ($showmovies['classic'] == "yes" ? "<input type=checkbox name=show_classic" . ($CURUSER["showclassic"] == "yes" ? " checked" : "") . " value=yes>" . $lang_usercp['checkbox_show_classic'] . " " : ""), 1); } tr_small($lang_usercp['row_pm_boxes'], $lang_usercp['text_show'] . "<input type=text name=pmnum size=5 value=" . $CURUSER['pmnum'] . " >" . $lang_usercp['text_pms_per_page'], 1); if ($showshoutbox_main == "yes") { //system side setting for shoutbox tr_small($lang_usercp['row_shoutbox'], $lang_usercp['text_show_last'] . "<input type=text name=sbnum size=5 value=" . $CURUSER['sbnum'] . " >" . $lang_usercp['text_messages_at_shoutbox'] . "<br />" . $lang_usercp['text_refresh_shoutbox_every'] . "<input type=text name=sbrefresh size=5 value=" . $CURUSER['sbrefresh'] . " >" . $lang_usercp['text_seconds'] . ($showhelpbox_main == 'yes' ? "<br /><input type=checkbox name=hidehb" . ($CURUSER["hidehb"] == "yes" ? " checked" : "") . " value=yes>" . $lang_usercp['text_hide_helpbox_messages'] : ""), 1); } if ($showfunbox_main == 'yes') { //siteside setting for funbox tr_small($lang_usercp['row_funbox'], "<input type=checkbox name=showfb" . ($CURUSER["showfb"] == "yes" ? " checked" : "") . " value=yes>" . $lang_usercp['text_show_funbox'], 1); } tr_small($lang_usercp['row_torrent_detail'], "<input type=checkbox name=showdescription" . ($CURUSER["showdescription"] == "yes" ? " checked" : "") . " value=yes>" . $lang_usercp['text_show_description'] . "<br />" . ($enablenfo_main == 'yes' && get_user_class() >= UC_POWER_USER ? "<input type=checkbox name=shownfo" . ($CURUSER["shownfo"] == "yes" ? " checked" : "") . " value=yes>" . $lang_usercp['text_show_nfo'] . "<br />" : "") . ($showextinfo['imdb'] == 'yes' ? "<input type=checkbox name=showimdb" . ($CURUSER["showimdb"] == "yes" ? " checked" : "") . " value=yes>" . $lang_usercp['text_show_imdb_info'] . "<br />" : "") . ($showextinfo['douban'] == 'yes' ? "<input type=checkbox name=showdouban" . ($CURUSER["showdouban"] == "yes" ? " checked" : "") . " value=yes>" . $lang_usercp['text_show_douban_info'] : ""), 1); tr_small($lang_usercp['row_discuss'], "<input type=checkbox name=showcomment" . ($CURUSER["showcomment"] == "yes" ? " checked" : "") . " value=yes>" . $lang_usercp['text_show_comments'], 1); if ($enablead_advertisement == 'yes') { tr_small($lang_usercp['row_show_advertisements'], "<input type=\"checkbox\" name=\"showad\"" . ($CURUSER["noad"] == "yes" ? "" : " checked=\"checked\"") . ($showaddisabled ? " disabled=\"disabled\"" : "") . " value=\"yes\" />" . $lang_usercp['text_show_advertisement_note'] . ($enablenoad_advertisement == 'yes' ? "<br />" . get_user_class_name($noad_advertisement, false, true, true) . $lang_usercp['text_can_turn_off_advertisement'] : "") . ($enablebonusnoad_advertisement == 'yes' ? "<br />" . get_user_class_name($bonusnoad_advertisement, false, true, true) . $lang_usercp['text_buy_no_advertisement'] . "<a href=\"mybonus.php\"><b>" . $lang_usercp['text_bonus_center'] . "</b></a>" : ""), 1); } tr_small($lang_usercp['row_time_type'], "<input type=radio name=timetype " . ($CURUSER['timetype'] == 'timeadded' ? " checked" : "") . " value=timeadded>" . $lang_usercp['text_time_added'] . " <input type=radio name=timetype " . ($CURUSER['timetype'] == 'timealive' ? " checked" : "") . " value=timealive>" . $lang_usercp['text_time_elapsed'] . "<br />", 1); //Setting for browse page tr_small($lang_usercp['row_browse_page'], $lang_usercp['text_browse_setting_warning'] . "\n\t\t<br /><b>" . $lang_usercp['row_torrent_page'] . ": </b><br />" . $lang_usercp['text_show'] . "<input type=text size=5 name=torrentsperpage value=" . $CURUSER['torrentsperpage'] . "> " . $lang_usercp['text_torrents_per_page'] . $lang_usercp['text_zero_equals_default'] . "<br />" . ($showtooltipsetting ? "<b>" . $lang_usercp['text_tooltip_type'] . "</b>: <br />" . ($showextinfo['imdb'] == 'yes' ? "<input type=radio name=tooltip " . ($CURUSER['tooltip'] == 'minorimdb' ? " checked" : "") . " value=minorimdb>" . $lang_usercp['text_minor_imdb_info'] . "<br /><input type=radio name=tooltip " . ($CURUSER['tooltip'] == 'medianimdb' ? " checked" : "") . " value=medianimdb>" . $lang_usercp['text_median_imdb_info'] . "<br />" : "") . ($showextinfo['douban'] == 'yes' ? "<input type=radio name=tooltip " . ($CURUSER['tooltip'] == 'minorimdb' ? "" : ($CURUSER['tooltip'] == 'minordouban' ? "checked" : "")) . " value=minordouban>" . $lang_usercp['text_minor_douban_info'] . "<br /><input type=radio name=tooltip " . ($CURUSER['tooltip'] == 'medianimdb' ? "" : ($CURUSER['tooltip'] == 'mediandouban' ? "checked" : "")) . " value=mediandouban>" . $lang_usercp['text_median_douban_info'] . "<br />" : "") . "<input type=radio name=tooltip " . ($CURUSER['tooltip'] == 'off' ? " checked" : "") . " value=off>" . $lang_usercp['text_off'] . "<br />" : "") . "<b>" . $lang_usercp['text_append_words_to_torrents'] . ": </b><br /><input type=checkbox name=appendsticky " . ($CURUSER['appendsticky'] == 'yes' ? " checked" : "") . " value=yes>" . $lang_usercp['text_append_sticky'] . "<br /><input type=checkbox name=appendnew " . ($CURUSER['appendnew'] == 'yes' ? " checked" : "") . " value=yes>" . $lang_usercp['text_append_new'] . "<br />" . $lang_usercp['text_torrents_on_promotion'] . "<input type=radio name=appendpromotion " . ($CURUSER['appendpromotion'] == 'highlight' ? " checked" : "") . " value='highlight'>" . $lang_usercp['text_highlight'] . "<input type=radio name=appendpromotion " . ($CURUSER['appendpromotion'] == 'word' ? " checked" : "") . " value='word'>" . $lang_usercp['text_append_words'] . "<input type=radio name=appendpromotion " . ($CURUSER['appendpromotion'] == 'icon' ? " checked" : "") . " value='icon'>" . $lang_usercp['text_append_icon'] . "<input type=radio name=appendpromotion " . ($CURUSER['appendpromotion'] == 'off' ? " checked" : "") . " value='off'>" . $lang_usercp['text_no_mark'] . "<br /><input type=checkbox name=appendpicked " . ($CURUSER['appendpicked'] == 'yes' ? " checked" : "") . " value=yes>" . $lang_usercp['text_append_picked'] . "<br />\n\t\t<b>" . $lang_usercp['text_show_title'] . ": </b><br />" . "<input type=checkbox name=smalldescr " . ($CURUSER['showsmalldescr'] == 'yes' ? " checked" : "") . " value=yes>" . $lang_usercp['text_show_small_description'] . "<br />\n\t\t<b>" . $lang_usercp['text_show_action_icons'] . ": </b><br />" . "<input type=checkbox name=dlicon " . ($CURUSER['dlicon'] == 'yes' ? " checked" : "") . " value=yes>" . $lang_usercp['text_show_download_icon'] . " <img class=\"download\" src=\"pic/trans.gif\" alt=\"Download\" /><br /><input type=checkbox name=bmicon " . ($CURUSER['bmicon'] == 'yes' ? " checked" : "") . " value=yes>" . $lang_usercp['text_show_bookmark_icon'] . " <img class=\"bookmark\" src=\"pic/trans.gif\" alt=\"Bookmark\" /><br />\n\t\t<b>" . $lang_usercp['text_comments_reviews'] . ": </b><br /><input type=checkbox name=showcomnum " . ($CURUSER['showcomnum'] == 'yes' ? " checked" : "") . " value=yes>" . $lang_usercp['text_show_comment_number'] . ($showtooltipsetting ? "<select name=\"showlastcom\" style=\"width: 70px;\"><option value=\"yes\" " . ($CURUSER['showlastcom'] != 'no' ? " selected" : "") . ">" . $lang_usercp['select_with'] . "</option><option value=\"no\" " . ($CURUSER['showlastcom'] == 'no' ? " selected" : "") . ">" . $lang_usercp['select_without'] . "</option></select>" . $lang_usercp['text_last_comment_on_tooltip'] : ""), 1); submit(); print "</table>"; stdfoot(); die; break; case "forum": if ($enabletooltip_tweak == 'yes') { $showtooltipsetting = true;
<?php require_once "include/bittorrent.php"; require_once "include/bbcode_functions.php"; require_once "include/user_functions.php"; parked(); dbconn(false); maxcoder(); getpage(); if (!logged_in()) { header("HTTP/1.0 404 Not Found"); // moddifed logginorreturn by retro//Remember to change the following line to match your server print "<html><h1>Not Found</h1><p>The requested URL /{$_SERVER['PHP_SELF']} was not found on this server.</p><hr /><address>Apache/1.1.11 " . $SITENAME . " Server at " . $_SERVER['SERVER_NAME'] . " Port 80</address></body></html>\n"; die; } if (get_user_class() < UC_POWER_USER) { stdhead(); stdmsg("Sorry...", "You must be a Power User or above to play Blackjack."); stdfoot(); exit; } if ($CURUSER["blackjackban"] == 'yes') { stdhead(); stdmsg("Sorry...", "You are Banned from playing Blackjack. (See site staff for the reason why !"); stdfoot(); exit; } // Bet size - 100 MB $mb = 100 * 1024 * 1024; $now = sqlesc(get_date_time()); // Pull the user's statisctics
$ret .= "</tr>\n"; } $ret .= "</table>\n"; return $ret; } $id = 0 + $_GET['userid']; $type = $_GET['type']; if (!in_array($type, array('uploaded', 'seeding', 'leeching', 'completed', 'incomplete'))) { die; } if (get_user_class() < $torrenthistory_class && $id != $CURUSER["id"]) { permissiondenied(); } switch ($type) { case 'uploaded': $res = sql_query("SELECT torrents.id AS torrent, torrents.name as torrentname, small_descr, seeders, leechers, anonymous, categories.name AS catname, categories.image, category, sp_state, size, snatched.seedtime, snatched.uploaded FROM torrents LEFT JOIN snatched ON torrents.id = snatched.torrentid LEFT JOIN categories ON torrents.category = categories.id WHERE torrents.owner={$id} AND snatched.userid={$id} " . ($CURUSER["id"] != $id ? get_user_class() < $viewanonymous_class ? " AND anonymous = 'no'" : "" : "") . " ORDER BY torrents.added DESC") or sqlerr(__FILE__, __LINE__); $count = mysql_num_rows($res); if ($count > 0) { $torrentlist = maketable($res, 'uploaded'); } if ($id == $CURUSER['id']) { $res = sql_query("SELECT torrents.id AS torrent, torrents.name as torrentname, small_descr, seeders, leechers, anonymous, categories.name AS catname, categories.image, category, sp_state, size FROM torrents LEFT JOIN categories ON torrents.category = categories.id WHERE torrents.owner=" . $CURUSER['id'] . " AND torrents.banned='yes' ORDER BY torrents.added DESC") or sqlerr(__FILE__, __LINE__); $newcount = mysql_num_rows($res); $count += $newconut; if ($newcount > 0) { $torrentlist .= $lang_getusertorrentlistajax['text_disable_tor'] . maketable($res, 'uploaded'); } } break; // Current Seeding // Current Seeding
<?php require_once "include/bittorrent.php"; require_once "include/user_functions.php"; require_once "include/bbcode_functions.php"; dbconn(false); maxcoder(); if (!logged_in()) { header("HTTP/1.0 404 Not Found"); // moddifed logginorreturn by retro//Remember to change the following line to match your server print "<html><h1>Not Found</h1><p>The requested URL /{$_SERVER['PHP_SELF']} was not found on this server.</p><hr /><address>Apache/1.1.11 " . $SITENAME . " Server at " . $_SERVER['SERVER_NAME'] . " Port 80</address></body></html>\n"; die; } if (get_user_class() < UC_ADMINISTRATOR) { hacker_dork("Secure Ip - Nosey C**t !"); } // in the case part add staff names exactly as they are on site //example //case 'Admin': //case 'System': // and so on switch ($_POST['staffname']) { case 'Mindless': case 'System': $name = safeChar($_POST['staffname']); $pass = safeChar($_POST['secrettop']); break; default: $naughtyboy = getip(); $name = safeChar($_POST['staffname']); $msg = "Someone is trying to login through the Staff login page with the name {$name} and ip {$naughtyboy}";
} else { $showteam = ""; } tr($lang_upload['row_content'], $team_select, 1); } //==== offer dropdown for offer mod from code by S4NE $offerres = sql_query("SELECT id, name FROM offers WHERE userid = " . sqlesc($CURUSER[id]) . " AND allowed = 'allowed' ORDER BY name ASC") or sqlerr(__FILE__, __LINE__); if (mysql_num_rows($offerres) > 0) { $offer = "<select name=\"offer\"><option value=\"0\">" . $lang_upload['select_choose_one'] . "</option>"; while ($offerrow = mysql_fetch_array($offerres)) { $offer .= "<option value=\"" . $offerrow["id"] . "\">" . htmlspecialchars($offerrow["name"]) . "</option>"; } $offer .= "</select>"; tr($lang_upload['row_your_offer'] . (!$uploadfreely && !$allowspecial ? "<font color=red>*</font>" : ""), $offer . $lang_upload['text_please_select_offer'], 1); } //===end if (get_user_class() >= $beanonymous_class) { tr($lang_upload['row_show_uploader'], "<input type=\"checkbox\" name=\"uplver\" value=\"yes\" />" . $lang_upload['checkbox_hide_uploader_note'], 1); } ?> <tr><td class="toolbox" align="center" colspan="2"><b><?php echo $lang_upload['text_read_rules']; ?> </b> <input id="qr" type="submit" class="btn" value="<?php echo $lang_upload['submit_upload']; ?> " /></td></tr> </table> </form> <?php stdfoot();
<?php require "include/bittorrent.php"; require_once "include/user_functions.php"; require_once "include/bbcode_functions.php"; dbconn(); maxcoder(); if (!logged_in()) { header("HTTP/1.0 404 Not Found"); // moddifed logginorreturn by retro//Remember to change the following line to match your server print "<html><h1>Not Found</h1><p>The requested URL /{$_SERVER['PHP_SELF']} was not found on this server.</p><hr /><address>Apache/1.1.11 " . $SITENAME . " Server at " . $_SERVER['SERVER_NAME'] . " Port 80</address></body></html>\n"; die; } if (get_user_class() < UC_USER) { stderr("Error: Permission denied", "Sorry the add poll is for Users and above."); } $action = isset($_GET["action"]) ? $_GET["action"] : ''; $pollid = 0 + $_GET["pollid"]; $topicid = 0 + $_POST["topicid"]; $returnto = $_POST["returnto"]; if ($returnto == "") { $returnto = $_GET['returnto'] . '&topicid=' . $_GET['topicid']; } if ($action == "edit") { if (!is_valid_id($pollid)) { stderr("Error", "Invalid ID {$pollid}."); } $res = sql_query("SELECT * FROM polls WHERE id = {$pollid}") or sqlerr(__FILE__, __LINE__); if (mysql_num_rows($res) == 0) { stderr("Error", "No poll found with ID {$pollid}."); }
<?php require_once "include/bittorrent.php"; hit_start(); dbconn(); loggedinorreturn(); stdhead("Endurræsa beiðni"); begin_main_frame(); $requestid = $_GET["requestid"]; $res = mysql_query("SELECT userid, filledby FROM requests WHERE id ={$requestid}") or sqlerr(); $arr = mysql_fetch_assoc($res); if ($CURUSER[id] === $arr[userid] || get_user_class() >= UC_MODERATOR || $CURUSER[id] === $arr[filledby]) { @mysql_query("UPDATE requests SET filled='', filledby=0 WHERE id ={$requestid}") or sqlerr(); print "Beiðni {$requestid} endursett."; } else { print "Fyrirgefðu, þú getur ekki endursett beiðni sem þú átt ekki"; } end_main_frame(); stdfoot();
dbconn(); function update_casino_ranking() { $res = sql_query("SELECT stake, odds, user_id FROM casino AS c, casinolog AS log WHERE c.win = log.choice AND c.id = log.id AND c.state=4") or sqlerr(__FILE__, __LINE__); $tot = 0; if (mysql_num_rows($res) > 0) { while ($arr = mysql_fetch_assoc($res)) { $tot += $arr['stake'] * $arr['odds'] - $arr['stake']; } $res = sql_query("SELECT stake, odds, user_id FROM casino AS c, casinolog AS log WHERE c.win != log.choice AND c.id = log.id AND c.state=4") or sqlerr(__FILE__, __LINE__); while ($arr = mysql_fetch_assoc($res)) { $tot -= $arr['stake']; } print "Total count: " . $tot; } } if (get_user_class() <= UC_NEXUS_MASTER) { die('forbidden'); } echo "<html><head><title>Count Casino</title></head><body>"; echo "<p>"; echo "In progress...please wait<br />"; ob_flush(); flush(); $tstart = getmicrotime(); update_casino_ranking(); $tend = getmicrotime(); $totaltime = $tend - $tstart; printf("Time consumed: %f sec<br />", $totaltime); echo "Done<br />"; echo "</body></html>";
header("Location: {$TBDEV['baseurl']}/forums.php?action=viewforum&forumid={$forumid}"); die; } //-------- Action: Move topic if ($action == "movetopic") { $forumid = (int) $_POST["forumid"]; $topicid = (int) $_POST["topicid"]; if (!is_valid_id($forumid) || !is_valid_id($topicid) || get_user_class() < UC_MODERATOR) { stderr("{$lang['forum_mod_options_user_error']}", "{$lang['forum_mod_options_incorrect']}"); } // Make sure topic and forum is valid $res = @mysql_query("SELECT minclasswrite FROM forums WHERE id={$forumid}") or sqlerr(__FILE__, __LINE__); if (mysql_num_rows($res) != 1) { stderr("{$lang['forum_mod_options_error']}", "{$lang['forum_mod_options_notfound']}"); } $arr = mysql_fetch_row($res); if (get_user_class() < $arr[0]) { stderr("{$lang['forum_mod_options_user_error']}", "{$lang['forum_mod_options_incorrect']}"); } $res = @mysql_query("SELECT subject,forumid FROM topics WHERE id={$topicid}") or sqlerr(__FILE__, __LINE__); if (mysql_num_rows($res) != 1) { stderr("{$lang['forum_mod_options_error']}", "{$lang['forum_mod_options_topic_notfound']}"); } $arr = mysql_fetch_assoc($res); if ($arr["forumid"] != $forumid) { @mysql_query("UPDATE topics SET forumid={$forumid} WHERE id={$topicid}") or sqlerr(__FILE__, __LINE__); } // Redirect to forum page header("Location: {$TBDEV['baseurl']}/forums.php?action=viewforum&forumid={$forumid}"); die; }
require_once "include/bbcode_functions.php"; dbconn(false); maxcoder(); if (!logged_in()) { header("HTTP/1.0 404 Not Found"); // moddifed logginorreturn by retro//Remember to change the following line to match your server print "<html><h1>Not Found</h1><p>The requested URL /{$_SERVER['PHP_SELF']} was not found on this server.</p><hr /><address>Apache/1.1.11 " . $SITENAME . " Server at " . $_SERVER['SERVER_NAME'] . " Port 80</address></body></html>\n"; die; } parked(); //=== comment out if you don't want to use the parked mod tongue.gif $userid = 0 + $CURUSER["id"]; if (!is_valid_id($userid)) { stderr("Error", "Invalid ID"); } if (get_user_class() < UC_USER || $CURUSER["id"] != $userid && get_user_class() < UC_MODERATOR) { stderr("Error", "Permission denied"); } // === subscribe to thread if ($_GET["subscribe"]) { $subscribe = 0 + $_GET["subscribe"]; if ($subscribe != '1') { stderr("Error", "I smell a rat!"); } if (!isset($_GET[topicid])) { stderr("Error", "No forum selected!"); } if ($_GET["topicid"]) { $topicid = 0 + safechar($_GET["topicid"]); if (ereg("^[0-9]+\$", !$topicid)) { stderr("Error", "Bad Topic Id!");
<?php require_once "include/bittorrent.php"; dbconn(); require_once get_langfile_path(); loggedinorreturn(); function bark($msg) { stdhead(); stdmsg($lang_takeflush['std_failed'], $msg); stdfoot(); exit; } $id = 0 + $_GET['id']; int_check($id, true); if (get_user_class() >= UC_MODERATOR || $CURUSER[id] == "{$id}") { $deadtime = deadtime(); //$deadtime2 = deadtime(); //$deadtime = time()-600 //sql_query("DELETE FROM peers WHERE ((last_action< FROM_UNIXTIME($deadtime) AND seeder = 'no)' or (last_action<FROM_UNIXTIME($deadtime2) AND seeder = 'yes')) and userid = " . sqlesc($id)); sql_query("DELETE FROM peers WHERE last_action < FROM_UNIXTIME({$deadtime}) AND userid=" . sqlesc($id)); $effected = mysql_affected_rows(); stderr($lang_takeflush['std_success'], "{$effected} " . $lang_takeflush['std_ghost_torrents_cleaned']); } else { bark($lang_takeflush['std_cannot_flush_others']); }
<p><table border=0 class=main cellspacing=0 cellpadding=0><tr> <td class=embedded style='padding-left: 10px'><font size=3><b>Send mass e-mail to all members</b></font></td> </tr></table></p> <table border=1 cellspacing=0 cellpadding=5> <form method=post action=massmail.php> <?php if (get_user_class() == UC_MODERATOR && $CURUSER["class"] > UC_POWER_USER) { printf("<input type=hidden name=class value={$CURUSER['class']}\n"); } else { print "<tr><td class=rowhead>Classe</td><td colspan=2 align=left><select name=or><option value='<'><<option value='>'>><option value='='>=<option value='<='><=<option value='>='>>=</select><select name=class>\n"; if (get_user_class() == UC_MODERATOR) { $maxclass = UC_POWER_USER; } else { $maxclass = get_user_class() - 1; } for ($i = 0; $i <= $maxclass; ++$i) { print "<option value={$i}" . ($CURUSER["class"] == $i ? " selected" : "") . ">{$prefix}" . get_user_class_name($i, false, true, true) . "\n"; } print "</select></td></tr>\n"; } ?> <tr><td class=rowhead>Subject</td><td><input type=text name=subject size=80></td></tr> <tr><td class=rowhead>Body</td><td><textarea name=message cols=80 rows=20></textarea></td></tr> <tr><td colspan=2 align=center><input type=submit value="Send" class=btn></td></tr> </form> </table>
$base_announce_url = $announce_urls[0]; } } else { $ssl_torrent = "http://"; $base_announce_url = $announce_urls[0]; } $res = sql_query("SELECT name, filename, save_as, size, owner,banned FROM torrents WHERE id = " . sqlesc($id)) or sqlerr(__FILE__, __LINE__); $row = mysql_fetch_assoc($res); $fn = "{$torrent_dir}/{$id}.torrent"; if ($CURUSER['downloadpos'] == "no") { permissiondenied(); } if (!$row || !is_file($fn) || !is_readable($fn)) { httperr(); } if ($row['banned'] == 'yes' && get_user_class() < $seebanned_class) { permissiondenied(); } sql_query("UPDATE torrents SET hits = hits + 1 WHERE id = " . sqlesc($id)) or sqlerr(__FILE__, __LINE__); require_once "include/benc.php"; if (strlen($CURUSER['passkey']) != 32) { $CURUSER['passkey'] = md5($CURUSER['username'] . date("Y-m-d H:i:s") . $CURUSER['passhash']); sql_query("UPDATE users SET passkey=" . sqlesc($CURUSER[passkey]) . " WHERE id=" . sqlesc($CURUSER[id])); } $dict = bdec_file($fn, $max_torrent_size); $dict['value']['announce']['value'] = $ssl_torrent . $base_announce_url . "?passkey={$CURUSER['passkey']}"; $dict['value']['announce']['string'] = strlen($dict['value']['announce']['value']) . ":" . $dict['value']['announce']['value']; $dict['value']['announce']['strlen'] = strlen($dict['value']['announce']['string']); /*if ($announce_urls[1] != "") // add multi-tracker { $dict['value']['announce-list']['type'] = "list";
die; } foreach (explode(":", "descr:type:name") as $v) { if (!isset($_POST[$v])) { bark($lang_takeupload['std_missing_form_data']); } } if (!isset($_FILES["file"])) { bark($lang_takeupload['std_missing_form_data']); } $f = $_FILES["file"]; $fname = unesc($f["name"]); if (empty($fname)) { bark($lang_takeupload['std_empty_filename']); } if (get_user_class() >= $beanonymous_class && $_POST['uplver'] == 'yes') { $anonymous = "yes"; $anon = "Anonymous"; } else { $anonymous = "no"; $anon = $CURUSER["username"]; } $url = parse_imdb_id($_POST['url']); $douban_url = $_POST['douban_url']; if (substr($douban_url, -1) != "/") { $douban_url = $douban_url . "/"; } $nfo = ''; if ($enablenfo_main == 'yes') { $nfofile = $_FILES['nfo']; if ($nfofile['name'] != '') {
// http://cyberfun.ro/ // http://xlist.ro/ require_once "include/bittorrent.php"; require_once "include/user_functions.php"; require_once "include/bbcode_functions.php"; // * Cleanup snatchlist by x0r TBDEV *//==//Clean comments created from clean snatch by x0r // == modified to clean old comments dbconn(); maxcoder(); if (!logged_in()) { header("HTTP/1.0 404 Not Found"); // moddifed logginorreturn by retro//Remember to change the following line to match your server print "<html><h1>Not Found</h1><p>The requested URL /{$_SERVER['PHP_SELF']} was not found on this server.</p><hr /><address>Apache/1.1.11 " . $SITENAME . " Server at " . $_SERVER['SERVER_NAME'] . " Port 80</address></body></html>\n"; die; } if (get_user_class() < UC_SYSOP) { hacker_dork("Clean Comments file"); } if (!function_exists('memory_get_usage')) { function memory_get_usage() { // If its Windows // Tested on Win XP Pro SP2. Should work on Win 2003 Server too // Doesn't work for 2000 // If you need it to work for 2000 look at http://us2.php.net/manual/en/function.memory-get-usage.php if (substr(PHP_OS, 0, 3) == 'WIN') { if (substr(PHP_OS, 0, 3) == 'WIN') { $output = array(); exec('tasklist /FI "PID eq ' . getmypid() . '" /FO LIST', $output); return preg_replace('/[\\D]/', '', $output[5]) * 1024; }
{ if ($a[0] > $b[0]) { return -1; } if ($a[0] < $b[0]) { return 1; } return 0; } while ($poll = mysql_fetch_assoc($polls)) { $o = array($poll["option0"], $poll["option1"], $poll["option2"], $poll["option3"], $poll["option4"], $poll["option5"], $poll["option6"], $poll["option7"], $poll["option8"], $poll["option9"], $poll["option10"], $poll["option11"], $poll["option12"], $poll["option13"], $poll["option14"], $poll["option15"], $poll["option16"], $poll["option17"], $poll["option18"], $poll["option19"]); print "<tr><td align=center>\n"; print "<p class=sub>"; $added = gettime($poll['added'], true, false); print $added; if (get_user_class() >= $pollmanage_class) { print " - [<a href=makepoll.php?action=edit&pollid={$poll['id']}><b>" . $lang_log['text_edit'] . "</b></a>]\n"; print " - [<a href=?action=poll&do=delete&pollid={$poll['id']}><b>" . $lang_log['text_delete'] . "</b></a>]\n"; } print "<a name={$poll['id']}>"; print "</p>\n"; print "<table class=main border=1 cellspacing=0 cellpadding=5><tr><td class=text>\n"; print "<p align=center><b>" . $poll["question"] . "</b></p>"; $pollanswers = sql_query("SELECT selection FROM pollanswers WHERE pollid=" . $poll["id"] . " AND selection < 20") or sqlerr(); $tvotes = mysql_num_rows($pollanswers); $vs = array(); // count for each option ([0]..[19]) $os = array(); // votes and options: array(array(123, "Option 1"), array(45, "Option 2")) // Count votes while ($pollanswer = mysql_fetch_row($pollanswers)) {
<?php require "include/bittorrent.php"; dbconn(); require_once get_langfile_path(); loggedinorreturn(); parked(); $id = $_GET["id"]; if (get_user_class() < $viewnfo_class || !is_valid_id($id) || $enablenfo_main != 'yes') { permissiondenied(); } $sql = new_mysqli(); $query = $sql->prepare("SELECT `name`, `nfo` FROM `torrents` WHERE `id` = ?"); $query->bind_param("i", $id); $query->execute(); $query->bind_result($torrent_name, $torrent_nfo); $query->fetch() or die($lang_viewnfo['std_puke']); $sql->close(); //error_reporting(E_ERROR | E_WARNING | E_PARSE | E_NOTICE); // Download nfo file if (isset($_GET['download']) && (int) $_GET['download'] == 1) { $nfoinfo = $torrent_nfo; //blob //build header header("Cache-Control: public, must-revalidate"); header("Content-Type: application/octet-stream"); //header("Content-Length: " .(string)(filesize($myFile)) ); header('Content-Disposition: attachment; filename="' . $id . '.nfo"'); echo $nfoinfo; header("Content-Transfer-Encoding: binary\n"); return;
$status = "<a href=userdetails.php?id={$arr['id']}><font color=#1f7309>" . $lang_invite['text_confirmed'] . "</font></a>"; } else { $status = "<a href=checkuser.php?id={$arr['id']}><font color=#ca0226>" . $lang_invite['text_pending'] . "</font></a>"; } print "<tr class=rowfollow>{$user}<td>{$arr['email']}</td><td class=rowfollow>" . mksize($arr[uploaded]) . "</td><td class=rowfollow>" . mksize($arr[downloaded]) . "</td><td class=rowfollow>{$ratio}</td><td class=rowfollow>{$status}</td>"; if ($CURUSER[id] == $id || get_user_class() >= UC_SYSOP) { print "<td>"; if ($arr[status] == 'pending') { print "<input type=\"checkbox\" name=\"conusr[]\" value=\"" . $arr[id] . "\" />"; } print "</td>"; } print "</tr>"; } } if ($CURUSER[id] == $id || get_user_class() >= UC_SYSOP) { $pendingcount = number_format(get_row_count("users", "WHERE status='pending' AND invited_by={$CURUSER['id']}")); if ($pendingcount) { print "<input type=hidden name=email value={$arr['email']}>"; print "<tr><td colspan=7 align=right><input type=submit style='height: 20px' value=" . $lang_invite['submit_confirm_users'] . "></td></tr>"; } print "</form>"; print "<tr><td colspan=7 align=center><form method=post action=invite.php?id=" . htmlspecialchars($id) . "&type=new><input type=submit " . ($CURUSER[invites] <= 0 ? "disabled " : "") . " value='" . $lang_invite['sumbit_invite_someone'] . "'></form></td></tr>"; } print "</table>"; $rul = sql_query("SELECT COUNT(*) FROM invites WHERE inviter =" . mysql_real_escape_string($id)) or sqlerr(); $arre = mysql_fetch_row($rul); $number1 = $arre[0]; $rer = sql_query("SELECT invitee, hash, time_invited FROM invites WHERE inviter = " . mysql_real_escape_string($id)) or sqlerr(); $num1 = mysql_num_rows($rer); print "<table border=1 width=737 cellspacing=0 cellpadding=5>" . "<h2 align=center>" . $lang_invite['text_sent_invites_status'] . " ({$number1})</h2>";
<?php require "include/bittorrent.php"; dbconn(); require_once get_langfile_path(); loggedinorreturn(); if (get_user_class() < UC_UPLOADER) { permissiondenied(); } $year = 0 + $_GET['year']; if (!$year || $year < 2000) { $year = date('Y'); } $month = 0 + $_GET['month']; if (!$month || $month <= 0 || $month > 12) { $month = date('m'); } $order = $_GET['order']; if (!in_array($order, array('username', 'torrent_size', 'torrent_count'))) { $order = 'username'; } if ($order == 'username') { $order .= ' ASC'; } else { $order .= ' DESC'; } stdhead($lang_uploaders['head_uploaders']); begin_main_frame(); ?> <div style="width: 940px"> <?php
<?php require_once "include/bittorrent.php"; dbconn(); loggedinorreturn(); if (get_user_class() != UC_SYSOP) { exit; } docleanup(); print "Done";