mirror of
https://github.com/lkddi/nexusphp.git
synced 2026-04-05 07:20:58 +08:00
fix compatibility with php8
This commit is contained in:
@@ -23,11 +23,11 @@ begin_frame("<span id=\"authorization\">".$lang_aboutnexus['text_authorization']
|
||||
print ($lang_aboutnexus['text_authorization_note']);
|
||||
print ("<br /><br />");
|
||||
end_frame();
|
||||
unset($ppl);
|
||||
$ppl = '';
|
||||
$res = sql_query("SELECT * FROM language ORDER BY trans_state") or sqlerr();
|
||||
while ($arr = mysql_fetch_assoc($res))
|
||||
{
|
||||
$ppl .= "<tr><td class=\"rowfollow\"><img width=\"24\" height=\"15\" src=\"pic/flag/".$arr[flagpic]."\" alt=\"".$arr[lang_name]."\" title=\"".$arr[lang_name]."\" style=\"padding-bottom:1px;\" /></td>
|
||||
$ppl .= "<tr><td class=\"rowfollow\"><img width=\"24\" height=\"15\" src=\"pic/flag/".$arr['flagpic']."\" alt=\"".$arr['lang_name']."\" title=\"".$arr['lang_name']."\" style=\"padding-bottom:1px;\" /></td>
|
||||
<td class=\"rowfollow\">".$arr['lang_name']."</td>".
|
||||
"<td class=\"rowfollow\">".$arr['trans_state']."</td></tr>\n";
|
||||
}
|
||||
@@ -38,7 +38,7 @@ print ($ppl);
|
||||
print ("</table>");
|
||||
print ("<br /><br />");
|
||||
end_frame();
|
||||
unset($ppl);
|
||||
$ppl = '';
|
||||
$res = sql_query("SELECT * FROM stylesheets ORDER BY id") or sqlerr();
|
||||
while ($arr = mysql_fetch_assoc($res))
|
||||
{
|
||||
|
||||
@@ -15,7 +15,7 @@ foreach (array("passkey","info_hash","peer_id","event") as $x)
|
||||
// get integer type port, downloaded, uploaded, left from client
|
||||
foreach (array("port","downloaded","uploaded","left","compact","no_peer_id") as $x)
|
||||
{
|
||||
$GLOBALS[$x] = 0 + $_GET[$x];
|
||||
$GLOBALS[$x] = $_GET[$x] ?? 0;
|
||||
}
|
||||
//check info_hash, peer_id and passkey
|
||||
foreach (array("passkey","info_hash","peer_id","port","downloaded","uploaded","left") as $x)
|
||||
@@ -42,7 +42,7 @@ foreach(array("numwant", "num want", "num_want") as $k)
|
||||
{
|
||||
if (isset($_GET[$k]))
|
||||
{
|
||||
$rsize = 0 + $_GET[$k];
|
||||
$rsize = $_GET[$k] ?? 0;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -28,7 +28,7 @@ $db = preg_replace($pattern, "\\36", $_SERVER['REQUEST_URI']);
|
||||
$ds = preg_replace($pattern, "\\38", $_SERVER['REQUEST_URI']);
|
||||
$dx = preg_replace($pattern, "\\40", $_SERVER['REQUEST_URI']);
|
||||
$dy = preg_replace($pattern, "\\42", $_SERVER['REQUEST_URI']);
|
||||
$bg = 0 + preg_replace($pattern, "\\44", $_SERVER['REQUEST_URI']);
|
||||
$bg = (int)preg_replace($pattern, "\\44", $_SERVER['REQUEST_URI']);
|
||||
$id = preg_replace($pattern, "\\45", $_SERVER['REQUEST_URI']);
|
||||
|
||||
$res = sql_query("SELECT username, uploaded, downloaded, class, privacy FROM users WHERE id=".sqlesc($id)." LIMIT 1");
|
||||
|
||||
12
comment.php
12
comment.php
@@ -34,7 +34,7 @@ if ($action == "add")
|
||||
}
|
||||
}
|
||||
|
||||
$parent_id = 0 + $_POST["pid"];
|
||||
$parent_id = $_POST["pid"] ?? 0;
|
||||
int_check($parent_id,true);
|
||||
|
||||
if($type == "torrent")
|
||||
@@ -105,12 +105,12 @@ if ($action == "add")
|
||||
die;
|
||||
}
|
||||
|
||||
$parent_id = 0 + $_GET["pid"];
|
||||
$parent_id = $_GET["pid"] ?? 0;
|
||||
int_check($parent_id,true);
|
||||
|
||||
if($sub == "quote")
|
||||
{
|
||||
$commentid = 0 + $_GET["cid"];
|
||||
$commentid = $_GET["cid"] ?? 0;
|
||||
int_check($commentid,true);
|
||||
|
||||
$res2 = sql_query("SELECT comments.text, users.username FROM comments JOIN users ON comments.user = users.id WHERE comments.id=$commentid") or sqlerr(__FILE__, __LINE__);
|
||||
@@ -151,7 +151,7 @@ if ($action == "add")
|
||||
}
|
||||
elseif ($action == "edit")
|
||||
{
|
||||
$commentid = 0 + $_GET["cid"];
|
||||
$commentid = $_GET["cid"] ?? 0;
|
||||
int_check($commentid,true);
|
||||
|
||||
if($type == "torrent")
|
||||
@@ -211,7 +211,7 @@ elseif ($action == "delete")
|
||||
if (get_user_class() < $commanage_class)
|
||||
stderr($lang_comment['std_error'], $lang_comment['std_permission_denied']);
|
||||
|
||||
$commentid = 0 + $_GET["cid"];
|
||||
$commentid = $_GET["cid"] ?? 0;
|
||||
$sure = $_GET["sure"];
|
||||
int_check($commentid,true);
|
||||
|
||||
@@ -268,7 +268,7 @@ elseif ($action == "vieworiginal")
|
||||
if (get_user_class() < $commanage_class)
|
||||
stderr($lang_comment['std_error'], $lang_comment['std_permission_denied']);
|
||||
|
||||
$commentid = 0 + $_GET["cid"];
|
||||
$commentid = $_GET["cid"] ?? 0;
|
||||
int_check($commentid,true);
|
||||
|
||||
if($type == "torrent")
|
||||
|
||||
@@ -3,7 +3,7 @@ require "include/bittorrent.php";
|
||||
dbconn();
|
||||
failedloginscheck ("Re-send",true);
|
||||
|
||||
$langid = 0 + $_GET['sitelanguage'];
|
||||
$langid = $_GET['sitelanguage'] ?? 0;
|
||||
if ($langid)
|
||||
{
|
||||
$lang_folder = validlang($langid);
|
||||
|
||||
@@ -4,7 +4,7 @@ require_once("include/bittorrent.php");
|
||||
if (!preg_match(':^/(\d{1,10})/([\w]{32})/(.+)$:', $_SERVER["PATH_INFO"], $matches))
|
||||
httperr();
|
||||
|
||||
$id = 0 + $matches[1];
|
||||
$id = $matches[1] ?? 0;
|
||||
$md5 = $matches[2];
|
||||
$email = urldecode($matches[3]);
|
||||
//print($email);
|
||||
|
||||
@@ -7,8 +7,8 @@ loggedinorreturn();
|
||||
stdhead($lang_contactstaff['head_contact_staff'], false);
|
||||
begin_main_frame();
|
||||
print("<form id=compose method=post name=\"compose\" action=takecontact.php>");
|
||||
if ($_GET["returnto"] || $_SERVER["HTTP_REFERER"])
|
||||
print("<input type=hidden name=returnto value=\"".(htmlspecialchars($_GET["returnto"]) ? htmlspecialchars($_GET["returnto"]) : htmlspecialchars($_SERVER["HTTP_REFERER"]))."\">");
|
||||
if (isset($_GET["returnto"]) && $_GET["returnto"] || $_SERVER["HTTP_REFERER"])
|
||||
print("<input type=hidden name=returnto value=\"".(htmlspecialchars($_GET["returnto"] ?? '') ? htmlspecialchars($_GET["returnto"] ?? '') : htmlspecialchars($_SERVER["HTTP_REFERER"] ?? ''))."\">");
|
||||
begin_compose($lang_contactstaff['text_message_to_staff'], "new");
|
||||
end_compose();
|
||||
print("</form>");
|
||||
|
||||
@@ -7,7 +7,7 @@ if ($showextinfo['imdb'] == 'yes')
|
||||
require_once("imdb/imdb.class.php");
|
||||
loggedinorreturn();
|
||||
|
||||
$id = 0 + $_GET["id"];
|
||||
$id = $_GET["id"] ?? 0;
|
||||
|
||||
int_check($id);
|
||||
if (!isset($id) || !$id)
|
||||
|
||||
@@ -15,7 +15,7 @@ function bark($msg) {
|
||||
if (!mkglobal("id"))
|
||||
bark($lang_fastdelete['std_missing_form_data']);
|
||||
|
||||
$id = 0 + $id;
|
||||
$id = $id ?? 0;
|
||||
int_check($id);
|
||||
$sure = $_GET["sure"];
|
||||
|
||||
|
||||
@@ -3,13 +3,17 @@ require "include/bittorrent.php";
|
||||
dbconn();
|
||||
require_once(get_langfile_path());
|
||||
loggedinorreturn();
|
||||
//lots of place use this variable
|
||||
$prefix = '';
|
||||
$user = $CURUSER;
|
||||
$PHP_SELF = $_SERVER['PHP_SELF'];
|
||||
|
||||
if (get_user_class() < $forummanage_class)
|
||||
permissiondenied();
|
||||
|
||||
// DELETE FORUM ACTION
|
||||
if ($_GET['action'] == "del") {
|
||||
$id = 0 + $_GET['id'];
|
||||
if (isset($_GET['action']) && $_GET['action'] == "del") {
|
||||
$id = $_GET['id'] ?? 0;
|
||||
if (!$id) {
|
||||
header("Location: forummanage.php");
|
||||
die();
|
||||
@@ -30,7 +34,7 @@ if ($_GET['action'] == "del") {
|
||||
}
|
||||
|
||||
//EDIT FORUM ACTION
|
||||
elseif ($_POST['action'] == "editforum") {
|
||||
elseif (isset($_POST['action']) && $_POST['action'] == "editforum") {
|
||||
$name = $_POST['name'];
|
||||
$desc = $_POST['desc'];
|
||||
$id = $_POST['id'];
|
||||
@@ -38,7 +42,7 @@ elseif ($_POST['action'] == "editforum") {
|
||||
header("Location: " . get_protocol_prefix() . "$BASEURL/forummanage.php");
|
||||
die();
|
||||
}
|
||||
if ($_POST["moderator"]){
|
||||
if (!empty($_POST["moderator"])) {
|
||||
$moderator = $_POST["moderator"];
|
||||
set_forum_moderators($moderator,$id);
|
||||
}
|
||||
@@ -53,7 +57,7 @@ elseif ($_POST['action'] == "editforum") {
|
||||
}
|
||||
|
||||
//ADD FORUM ACTION
|
||||
elseif ($_POST['action'] == "addforum") {
|
||||
elseif (isset($_POST['action']) && $_POST['action'] == "addforum") {
|
||||
$name = ($_POST['name']);
|
||||
$desc = ($_POST['desc']);
|
||||
if (!$name && !$desc) {
|
||||
@@ -74,9 +78,9 @@ elseif ($_POST['action'] == "addforum") {
|
||||
// SHOW FORUMS WITH FORUM MANAGMENT TOOLS
|
||||
stdhead($lang_forummanage['head_forum_management']);
|
||||
begin_main_frame();
|
||||
if ($_GET['action'] == "editforum") {
|
||||
if (isset($_GET['action']) && $_GET['action'] == "editforum") {
|
||||
//EDIT PAGE FOR THE FORUMS
|
||||
$id = 0 + ($_GET["id"]);
|
||||
$id = ($_GET["id"] ?? 0);
|
||||
$result = sql_query ("SELECT * FROM forums where id = ".sqlesc($id));
|
||||
if ($row = mysql_fetch_array($result)) {
|
||||
do {
|
||||
@@ -183,7 +187,7 @@ $nr = mysql_num_rows($res);
|
||||
}
|
||||
}
|
||||
//
|
||||
elseif ($_GET['action'] == "newforum"){
|
||||
elseif (isset($_GET['action']) && $_GET['action'] == "newforum"){
|
||||
?>
|
||||
<h2 class=transparentbg align=center><a class=faqlink href=forummanage.php><?php echo $lang_forummanage['text_forum_management']?></a><b>--></b><?php echo $lang_forummanage['text_add_forum']?></h2>
|
||||
<br />
|
||||
|
||||
50
forums.php
50
forums.php
@@ -164,7 +164,7 @@ function get_last_read_post_id($topicid) {
|
||||
}
|
||||
else $Cache->cache_value('user_'.$CURUSER['id'].'_last_read_post_list', 'no record', 900);
|
||||
}
|
||||
if ($ret != "no record" && $ret[$topicid] && $CURUSER['last_catchup'] < $ret[$topicid]){
|
||||
if ($ret != "no record" && isset($ret[$topicid]) && $CURUSER['last_catchup'] < $ret[$topicid]){
|
||||
return $ret[$topicid];
|
||||
}
|
||||
elseif ($CURUSER['last_catchup'])
|
||||
@@ -329,7 +329,7 @@ if ($action == "post")
|
||||
}
|
||||
$id = $_POST["id"];
|
||||
$type = $_POST["type"];
|
||||
$subject = $_POST["subject"];
|
||||
$subject = $_POST["subject"] ?? '';
|
||||
$body = trim($_POST["body"]);
|
||||
$hassubject = false;
|
||||
switch ($type){
|
||||
@@ -403,7 +403,7 @@ if ($action == "post")
|
||||
if ($forum_last_replied_topic_row && $forum_last_replied_topic_row['id'] == $topicid)
|
||||
$Cache->delete_value('forum_'.$forumid.'_last_replied_topic_content');
|
||||
}
|
||||
sql_query("UPDATE posts SET body=".sqlesc($body).", editdate=".sqlesc($date).", editedby=".sqlesc($CURUSER[id])." WHERE id=".sqlesc($id)) or sqlerr(__FILE__, __LINE__);
|
||||
sql_query("UPDATE posts SET body=".sqlesc($body).", editdate=".sqlesc($date).", editedby=".sqlesc($CURUSER['id'])." WHERE id=".sqlesc($id)) or sqlerr(__FILE__, __LINE__);
|
||||
$postid = $id;
|
||||
$Cache->delete_value('post_'.$postid.'_content');
|
||||
}
|
||||
@@ -470,12 +470,12 @@ if ($action == "post")
|
||||
|
||||
if ($action == "viewtopic")
|
||||
{
|
||||
$highlight = htmlspecialchars(trim($_GET["highlight"]));
|
||||
$highlight = htmlspecialchars(trim($_GET["highlight"] ?? ''));
|
||||
|
||||
$topicid = 0+$_GET["topicid"];
|
||||
$topicid = $_GET["topicid"] ?? 0;
|
||||
int_check($topicid,true);
|
||||
$page = $_GET["page"];
|
||||
$authorid = 0+$_GET["authorid"];
|
||||
$page = $_GET["page"] ?? '';
|
||||
$authorid = $_GET["authorid"] ?? 0;
|
||||
if ($authorid)
|
||||
{
|
||||
$where = "WHERE topicid=".sqlesc($topicid)." AND userid=".sqlesc($authorid);
|
||||
@@ -532,7 +532,7 @@ if ($action == "viewtopic")
|
||||
|
||||
$pages = ceil($postcount / $perpage);
|
||||
|
||||
if ($page[0] == "p")
|
||||
if (isset($page[0]) && $page[0] == "p")
|
||||
{
|
||||
$findpost = substr($page, 1);
|
||||
$res = sql_query("SELECT id FROM posts $where ORDER BY added") or sqlerr(__FILE__, __LINE__);
|
||||
@@ -635,7 +635,7 @@ if ($action == "viewtopic")
|
||||
if ($pn>=1)
|
||||
{
|
||||
if ($Advertisement->enable_ad()){
|
||||
if ($forumpostad[$pn-1])
|
||||
if (!empty($forumpostad[$pn-1]))
|
||||
echo "<div align=\"center\" style=\"margin-top: 10px\" id=\"ad_forumpost_".$pn."\">".$forumpostad[$pn-1]."</div>";
|
||||
}
|
||||
}
|
||||
@@ -735,11 +735,11 @@ if ($action == "viewtopic")
|
||||
print("<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" align=\"left\">\n");
|
||||
print("<tr><td class=\"embedded\"><form method=\"post\" action=\"?action=setsticky\">\n");
|
||||
print("<input type=\"hidden\" name=\"topicid\" value=\"".$topicid."\" />\n");
|
||||
print("<input type=\"hidden\" name=\"returnto\" value=\"".htmlspecialchars($_SERVER[REQUEST_URI])."\" />\n");
|
||||
print("<input type=\"hidden\" name=\"returnto\" value=\"".htmlspecialchars($_SERVER['REQUEST_URI'])."\" />\n");
|
||||
print("<input type=\"hidden\" name=\"sticky\" value=\"".($sticky ? 'no' : 'yes')."\" /><input type=\"submit\" class=\"medium\" value=\"".($sticky ? $lang_forums['submit_unsticky'] : $lang_forums['submit_sticky'])."\" /></form></td>\n");
|
||||
print("<td class=\"embedded\"><form method=\"post\" action=\"?action=setlocked\">\n");
|
||||
print("<input type=\"hidden\" name=\"topicid\" value=\"".$topicid."\" />\n");
|
||||
print("<input type=\"hidden\" name=\"returnto\" value=\"".htmlspecialchars($_SERVER[REQUEST_URI])."\" />\n");
|
||||
print("<input type=\"hidden\" name=\"returnto\" value=\"".htmlspecialchars($_SERVER['REQUEST_URI'])."\" />\n");
|
||||
print("<input type=\"hidden\" name=\"locked\" value=\"".($locked ? 'no' : 'yes')."\" /><input type=\"submit\" class=\"medium\" value=\"".($locked ? $lang_forums['submit_unlock'] : $lang_forums['submit_lock'])."\" /></form></td>\n");
|
||||
print("<td class=\"embedded\"><form method=\"get\" action=\"?\">\n");
|
||||
print("<input type=\"hidden\" name=\"action\" value=\"deletetopic\" />\n");
|
||||
@@ -796,7 +796,7 @@ if ($action == "viewtopic")
|
||||
<option style='background-color: plum' value=\"39\">Plum</option>
|
||||
<option style='background-color: white' value=\"40\">White</option>");
|
||||
print("</select>");
|
||||
print("<input type=\"hidden\" name=\"returnto\" value=\"".htmlspecialchars($_SERVER[REQUEST_URI])."\" />\n");
|
||||
print("<input type=\"hidden\" name=\"returnto\" value=\"".htmlspecialchars($_SERVER['REQUEST_URI'])."\" />\n");
|
||||
print("<input type=\"submit\" class=\"medium\" value=\"".$lang_forums['submit_change']."\" /></form></td>");
|
||||
print("</tr>\n");
|
||||
print("</table>\n");
|
||||
@@ -988,7 +988,7 @@ if ($action == "deletepost")
|
||||
|
||||
if ($action == "setlocked")
|
||||
{
|
||||
$topicid = 0 + $_POST["topicid"];
|
||||
$topicid = $_POST["topicid"] ?? 0;
|
||||
$ismod = is_forum_moderator($topicid,'topic');
|
||||
if (!$topicid || (get_user_class() < $postmanage_class && !$ismod))
|
||||
permissiondenied();
|
||||
@@ -1002,7 +1002,7 @@ if ($action == "setlocked")
|
||||
|
||||
if ($action == 'hltopic')
|
||||
{
|
||||
$topicid = 0 + $_GET["topicid"];
|
||||
$topicid = $_GET["topicid"] ?? 0;
|
||||
$ismod = is_forum_moderator($topicid,'topic');
|
||||
if (!$topicid || (get_user_class() < $postmanage_class && !$ismod))
|
||||
permissiondenied();
|
||||
@@ -1022,9 +1022,9 @@ if ($action == 'hltopic')
|
||||
|
||||
if ($action == "setsticky")
|
||||
{
|
||||
$topicid = 0 + $_POST["topicid"];
|
||||
$topicid = $_POST["topicid"] ?? 0;
|
||||
$ismod = is_forum_moderator($topicid,'topic');
|
||||
if (!topicid || (get_user_class() < $postmanage_class && !$ismod))
|
||||
if (!$topicid || (get_user_class() < $postmanage_class && !$ismod))
|
||||
permissiondenied();
|
||||
|
||||
$sticky = sqlesc($_POST["sticky"]);
|
||||
@@ -1052,7 +1052,7 @@ if ($action == "viewforum")
|
||||
|
||||
$forumname = $row['name'];
|
||||
$forummoderators = get_forum_moderators($forumid,false);
|
||||
$search = mysql_real_escape_string(trim($_GET["search"]));
|
||||
$search = mysql_real_escape_string(trim($_GET["search"] ?? ''));
|
||||
if ($search){
|
||||
$wherea = " AND subject LIKE '%$search%'";
|
||||
$addparam .= "&search=".rawurlencode($search);
|
||||
@@ -1064,7 +1064,7 @@ if ($action == "viewforum")
|
||||
$num = get_row_count("topics","WHERE forumid=".sqlesc($forumid).$wherea);
|
||||
|
||||
list($pagertop, $pagerbottom, $limit) = pager($topicsperpage, $num, "?"."action=viewforum&forumid=".$forumid.$addparam."&");
|
||||
if ($_GET["sort"]){
|
||||
if (isset($_GET["sort"])){
|
||||
switch ($_GET["sort"]){
|
||||
case 'firstpostasc':
|
||||
{
|
||||
@@ -1121,7 +1121,7 @@ if ($action == "viewforum")
|
||||
{
|
||||
print("<table border=\"1\" cellspacing=\"0\" cellpadding=\"5\" width=\"940\">");
|
||||
|
||||
print("<tr><td class=\"colhead\" align=\"center\" width=\"99%\">".$lang_forums['col_topic']."</td><td class=\"colhead\" align=\"center\"><a href=\"".htmlspecialchars("?action=viewforum&forumid=".$forumid.$addparam."&sort=".($_GET["sort"] == 'firstpostdesc' ? "firstpostasc" : "firstpostdesc"))."\" title=\"".($_GET["sort"] == 'firstpostdesc' ? $lang_forums['title_order_topic_asc'] : $lang_forums['title_order_topic_desc'])."\">".$lang_forums['col_author']."</a></td><td class=\"colhead\" align=\"center\">".$lang_forums['col_replies']."/".$lang_forums['col_views']."</td><td class=\"colhead\" align=\"center\"><a href=\"".htmlspecialchars("?action=viewforum&forumid=".$forumid.$addparam."&sort=".($_GET["sort"] == 'lastpostasc' ? "lastpostdesc" : "lastpostasc"))."\" title=\"".($_GET["sort"] == 'lastpostasc' ? $lang_forums['title_order_post_desc'] : $lang_forums['title_order_post_asc'])."\">".$lang_forums['col_last_post']."</a></td>\n");
|
||||
print("<tr><td class=\"colhead\" align=\"center\" width=\"99%\">".$lang_forums['col_topic']."</td><td class=\"colhead\" align=\"center\"><a href=\"".htmlspecialchars("?action=viewforum&forumid=".$forumid.$addparam."&sort=".(isset($_GET["sort"]) && $_GET["sort"] == 'firstpostdesc' ? "firstpostasc" : "firstpostdesc"))."\" title=\"".(isset($_GET["sort"]) && $_GET["sort"] == 'firstpostdesc' ? $lang_forums['title_order_topic_asc'] : $lang_forums['title_order_topic_desc'])."\">".$lang_forums['col_author']."</a></td><td class=\"colhead\" align=\"center\">".$lang_forums['col_replies']."/".$lang_forums['col_views']."</td><td class=\"colhead\" align=\"center\"><a href=\"".htmlspecialchars("?action=viewforum&forumid=".$forumid.$addparam."&sort=".(isset($_GET["sort"]) && $_GET["sort"] == 'lastpostasc' ? "lastpostdesc" : "lastpostasc"))."\" title=\"".(isset($_GET["sort"]) && $_GET["sort"] == 'lastpostasc' ? $lang_forums['title_order_post_desc'] : $lang_forums['title_order_post_asc'])."\">".$lang_forums['col_last_post']."</a></td>\n");
|
||||
|
||||
print("</tr>\n");
|
||||
$counter = 0;
|
||||
@@ -1179,8 +1179,8 @@ if ($action == "viewforum")
|
||||
//---- Get userID and date of last post
|
||||
|
||||
$arr = get_post_row($topicarr['lastpost']);
|
||||
$lppostid = 0 + $arr["id"];
|
||||
$lpuserid = 0 + $arr["userid"];
|
||||
$lppostid = $arr["id"] ?? 0;
|
||||
$lpuserid = $arr["userid"] ?? 0;
|
||||
$lpusername = get_username($lpuserid);
|
||||
$lpadded = gettime($arr["added"],true,false);
|
||||
$onmouseover = "";
|
||||
@@ -1196,7 +1196,7 @@ if ($action == "viewforum")
|
||||
}
|
||||
|
||||
$arr = get_post_row($topicarr['firstpost']);
|
||||
$fpuserid = 0 + $arr["userid"];
|
||||
$fpuserid = $arr["userid"] ?? 0;
|
||||
$fpauthor = get_username($arr["userid"]);
|
||||
|
||||
$subject = ($sticky ? "<img class=\"sticky\" src=\"pic/trans.gif\" alt=\"Sticky\" title=\"".$lang_forums['title_sticky']."\" /> " : "") . "<a href=\"".htmlspecialchars("?action=viewtopic&forumid=".$forumid."&topicid=".$topicid)."\" ".$onmouseover.">" .highlight_topic(highlight($search,htmlspecialchars($topicarr["subject"])), $hlcolor) . "</a>".$topicpages;
|
||||
@@ -1263,7 +1263,7 @@ if ($action == "viewunread")
|
||||
{
|
||||
$userid = $CURUSER['id'];
|
||||
|
||||
$beforepostid = 0+$_GET['beforepostid'];
|
||||
$beforepostid = $_GET['beforepostid'] ?? 0;
|
||||
$maxresults = 25;
|
||||
$res = sql_query("SELECT id, forumid, subject, lastpost, hlcolor FROM topics WHERE lastpost > ".$CURUSER['last_catchup'].($beforepostid ? " AND lastpost < ".sqlesc($beforepostid) : "")." ORDER BY lastpost DESC LIMIT 100") or sqlerr(__FILE__, __LINE__);
|
||||
|
||||
@@ -1332,7 +1332,7 @@ if ($action == "search")
|
||||
|
||||
$res = sql_query("SELECT COUNT(posts.id) FROM posts LEFT JOIN topics ON posts.topicid = topics.id LEFT JOIN forums ON topics.forumid = forums.id WHERE forums.minclassread <= ".sqlesc(get_user_class())." AND ((topics.subject $extraSql AND posts.id=topics.firstpost) OR posts.body $extraSql)") or sqlerr(__FILE__, __LINE__);
|
||||
$arr = mysql_fetch_row($res);
|
||||
$hits = 0 + $arr[0];
|
||||
$hits = $arr[0] ?? 0;
|
||||
if ($hits){
|
||||
$error = false;
|
||||
$found = "[<b><font class=\"striking\"> ".$lang_forums['text_found'].$hits.$lang_forums['text_num_posts']." </font></b>]";
|
||||
@@ -1445,7 +1445,7 @@ foreach ($overforums as $a)
|
||||
continue;
|
||||
if ($count>=1)
|
||||
if ($Advertisement->enable_ad()){
|
||||
if ($interoverforumsad[$count-1])
|
||||
if (!empty($interoverforumsad[$count-1]))
|
||||
echo "<tr><td colspan=\"5\" align=\"center\" id=\"ad_interoverforums_".($count-1)."\">".$interoverforumsad[$count-1]."</td></tr>";
|
||||
}
|
||||
$forid = $a["id"];
|
||||
|
||||
@@ -9,6 +9,7 @@ if($action == "regimage")
|
||||
$sql = sql_query($query);
|
||||
$regimage = mysql_fetch_array($sql);
|
||||
$imagestring = $regimage['imagestring'];
|
||||
$space = $newstring = '';
|
||||
for($i=0;$i<strlen($imagestring);$i++)
|
||||
{
|
||||
$newstring .= $space.$imagestring[$i];
|
||||
@@ -32,6 +33,7 @@ if($action == "regimage")
|
||||
$textposv = ($imgheight-$textheight)/2;
|
||||
|
||||
$dots = $imgheight*$imgwidth/35;
|
||||
$textcolor = null;
|
||||
for($i=1;$i<=$dots;$i++)
|
||||
{
|
||||
imagesetpixel($im, rand(0, $imgwidth), rand(0, $imgheight), $textcolor);
|
||||
|
||||
@@ -247,8 +247,10 @@ function formatFlv($src, $width, $height) {
|
||||
return addTempCode("<object width=\"$width\" height=\"$height\"><param name=\"movie\" value=\"flvplayer.swf?file=$src\" /><param name=\"allowFullScreen\" value=\"true\" /><embed src=\"flvplayer.swf?file=$src\" type=\"application/x-shockwave-flash\" allowfullscreen=\"true\" width=\"$width\" height=\"$height\"></embed></object>");
|
||||
}
|
||||
function format_urls($text, $newWindow = false) {
|
||||
return preg_replace("/((https?|ftp|gopher|news|telnet|mms|rtsp):\/\/[^()\[\]<>\s]+)/ei",
|
||||
"formatUrl('\\1', ".($newWindow==true ? 1 : 0).", '', 'faqlink')", $text);
|
||||
// return preg_replace("/((https?|ftp|gopher|news|telnet|mms|rtsp):\/\/[^()\[\]<>\s]+)/ei", "formatUrl('\\1', ".($newWindow==true ? 1 : 0).", '', 'faqlink')", $text);
|
||||
return preg_replace_callback("/((https?|ftp|gopher|news|telnet|mms|rtsp):\/\/[^()\[\]<>\s]+)/i", function ($matches) use ($newWindow) {
|
||||
return formatUrl($matches[1], ".($newWindow==true ? 1 : 0).", '', 'faqlink');
|
||||
}, $text);
|
||||
}
|
||||
function format_comment($text, $strip_html = true, $xssclean = false, $newtab = false, $imageresizer = true, $image_max_width = 700, $enableimage = true, $enableflash = true , $imagenum = -1, $image_max_height = 0, $adid = 0)
|
||||
{
|
||||
@@ -267,7 +269,10 @@ function format_comment($text, $strip_html = true, $xssclean = false, $newtab =
|
||||
$s = nl2br($s);
|
||||
|
||||
if (strpos($s,"[code]") !== false && strpos($s,"[/code]") !== false) {
|
||||
$s = preg_replace("/\[code\](.+?)\[\/code\]/eis","formatCode('\\1')", $s);
|
||||
// $s = preg_replace("/\[code\](.+?)\[\/code\]/eis","formatCode('\\1')", $s);
|
||||
$s = preg_replace_callback("/\[code\](.+?)\[\/code\]/is",function ($matches) {
|
||||
return formatCode($matches[1]);
|
||||
}, $s);
|
||||
}
|
||||
|
||||
$originalBbTagArray = array('[siteurl]', '[site]','[*]', '[b]', '[/b]', '[i]', '[/i]', '[u]', '[/u]', '[pre]', '[/pre]', '[/color]', '[/font]', '[/size]', " ");
|
||||
@@ -304,7 +309,10 @@ function format_comment($text, $strip_html = true, $xssclean = false, $newtab =
|
||||
// [flash,500,400]http://www/image.swf[/flash]
|
||||
if (strpos($s,"[flash") !== false) { //flash is not often used. Better check if it exist before hand
|
||||
if ($enableflash) {
|
||||
$s = preg_replace("/\[flash(\,([1-9][0-9]*)\,([1-9][0-9]*))?\]((http|ftp):\/\/[^\s'\"<>]+(\.(swf)))\[\/flash\]/ei", "formatFlash('\\4', '\\2', '\\3')", $s);
|
||||
// $s = preg_replace("/\[flash(\,([1-9][0-9]*)\,([1-9][0-9]*))?\]((http|ftp):\/\/[^\s'\"<>]+(\.(swf)))\[\/flash\]/ei", "formatFlash('\\4', '\\2', '\\3')", $s);
|
||||
$s = preg_replace_callback("/\[flash(\,([1-9][0-9]*)\,([1-9][0-9]*))?\]((http|ftp):\/\/[^\s'\"<>]+(\.(swf)))\[\/flash\]/i", function ($matches) {
|
||||
return formatFlash($matches[4], $matches[2], $matches[3]);
|
||||
}, $s);
|
||||
} else {
|
||||
$s = preg_replace("/\[flash(\,([1-9][0-9]*)\,([1-9][0-9]*))?\]((http|ftp):\/\/[^\s'\"<>]+(\.(swf)))\[\/flash\]/i", '', $s);
|
||||
}
|
||||
@@ -312,7 +320,10 @@ function format_comment($text, $strip_html = true, $xssclean = false, $newtab =
|
||||
//[flv,320,240]http://www/a.flv[/flv]
|
||||
if (strpos($s,"[flv") !== false) { //flv is not often used. Better check if it exist before hand
|
||||
if ($enableflash) {
|
||||
$s = preg_replace("/\[flv(\,([1-9][0-9]*)\,([1-9][0-9]*))?\]((http|ftp):\/\/[^\s'\"<>]+(\.(flv)))\[\/flv\]/ei", "formatFlv('\\4', '\\2', '\\3')", $s);
|
||||
// $s = preg_replace("/\[flv(\,([1-9][0-9]*)\,([1-9][0-9]*))?\]((http|ftp):\/\/[^\s'\"<>]+(\.(flv)))\[\/flv\]/ei", "formatFlv('\\4', '\\2', '\\3')", $s);
|
||||
$s = preg_replace_callback("/\[flv(\,([1-9][0-9]*)\,([1-9][0-9]*))?\]((http|ftp):\/\/[^\s'\"<>]+(\.(flv)))\[\/flv\]/i", function ($matches) {
|
||||
return formatFlv($matches[4], $matches[2], $matches[3]);
|
||||
}, $s);
|
||||
} else {
|
||||
$s = preg_replace("/\[flv(\,([1-9][0-9]*)\,([1-9][0-9]*))?\]((http|ftp):\/\/[^\s'\"<>]+(\.(flv)))\[\/flv\]/i", '', $s);
|
||||
}
|
||||
@@ -320,14 +331,22 @@ function format_comment($text, $strip_html = true, $xssclean = false, $newtab =
|
||||
|
||||
// [url=http://www.example.com]Text[/url]
|
||||
if ($adid) {
|
||||
$s = preg_replace("/\[url=([^\[\s]+?)\](.+?)\[\/url\]/ei", "formatAdUrl(".$adid." ,'\\1', '\\2', ".($newtab==true ? 1 : 0).", 'faqlink')", $s);
|
||||
// $s = preg_replace("/\[url=([^\[\s]+?)\](.+?)\[\/url\]/ei", "formatAdUrl(".$adid." ,'\\1', '\\2', ".($newtab==true ? 1 : 0).", 'faqlink')", $s);
|
||||
$s = preg_replace_callback("/\[url=([^\[\s]+?)\](.+?)\[\/url\]/i", function ($matches) use ($adid, $newtab) {
|
||||
return formatAdUrl(".$adid." ,$matches[1], $matches[2], ".($newtab==true ? 1 : 0).", 'faqlink');
|
||||
}, $s);
|
||||
} else {
|
||||
$s = preg_replace("/\[url=([^\[\s]+?)\](.+?)\[\/url\]/ei", "formatUrl('\\1', ".($newtab==true ? 1 : 0).", '\\2', 'faqlink')", $s);
|
||||
// $s = preg_replace("/\[url=([^\[\s]+?)\](.+?)\[\/url\]/ei", "formatUrl('\\1', ".($newtab==true ? 1 : 0).", '\\2', 'faqlink')", $s);
|
||||
$s = preg_replace_callback("/\[url=([^\[\s]+?)\](.+?)\[\/url\]/i", function ($matches) use ($newtab) {
|
||||
return formatUrl($matches[1], ".($newtab==true ? 1 : 0).", $matches[2], 'faqlink');
|
||||
}, $s);
|
||||
}
|
||||
|
||||
// [url]http://www.example.com[/url]
|
||||
$s = preg_replace("/\[url\]([^\[\s]+?)\[\/url\]/ei",
|
||||
"formatUrl('\\1', ".($newtab==true ? 1 : 0).", '', 'faqlink')", $s);
|
||||
// $s = preg_replace("/\[url\]([^\[\s]+?)\[\/url\]/ei", "formatUrl('\\1', ".($newtab==true ? 1 : 0).", '', 'faqlink')", $s);
|
||||
$s = preg_replace_callback("/\[url\]([^\[\s]+?)\[\/url\]/i", function ($matches) use ($newtab) {
|
||||
return formatUrl($matches[1], ".($newtab==true ? 1 : 0).", '', 'faqlink');
|
||||
}, $s);
|
||||
|
||||
$s = format_urls($s, $newtab);
|
||||
// Quotes
|
||||
@@ -335,9 +354,12 @@ function format_comment($text, $strip_html = true, $xssclean = false, $newtab =
|
||||
$s = format_quotes($s);
|
||||
}
|
||||
|
||||
$s = preg_replace("/\[em([1-9][0-9]*)\]/ie", "(\\1 < 192 ? '<img src=\"pic/smilies/\\1.gif\" alt=\"[em\\1]\" />' : '[em\\1]')", $s);
|
||||
// $s = preg_replace("/\[em([1-9][0-9]*)\]/ie", "(\\1 < 192 ? '<img src=\"pic/smilies/\\1.gif\" alt=\"[em\\1]\" />' : '[em\\1]')", $s);
|
||||
$s = preg_replace_callback("/\[em([1-9][0-9]*)\]/i", function ($matches) {
|
||||
return $matches[1] < 192 ? '<img src="pic/smilies/' . $matches[1] . '.gif" alt="[em' . $matches[1] . ']" />' : '[em' . $matches[1] . ']';
|
||||
}, $s);
|
||||
reset($tempCode);
|
||||
$j = 0;
|
||||
$j = $i = 0;
|
||||
while(count($tempCode) || $j > 5) {
|
||||
foreach($tempCode as $key=>$code) {
|
||||
$s = str_replace("<tempCode_$key>", $code, $s, $count);
|
||||
@@ -1506,7 +1528,7 @@ function registration_check($type = "invitesystem", $maxuserscheck = true, $ipch
|
||||
function random_str($length="6")
|
||||
{
|
||||
$set = array("A","B","C","D","E","F","G","H","P","R","M","N","1","2","3","4","5","6","7","8","9");
|
||||
$str;
|
||||
$str = '';
|
||||
for($i=1;$i<=$length;$i++)
|
||||
{
|
||||
$ch = rand(0, count($set)-1);
|
||||
@@ -4049,7 +4071,7 @@ function get_ratio($userid, $html = true){
|
||||
function add_s($num, $es = false)
|
||||
{
|
||||
global $lang_functions;
|
||||
return ($num > 1 ? ($es ? $lang_functions['text_es'] : $lang_functions['text_s']) : "");
|
||||
return ($num > 1 ? ($es ? ($lang_functions['text_es'] ?? '') : $lang_functions['text_s']) : "");
|
||||
}
|
||||
|
||||
function is_or_are($num)
|
||||
@@ -4182,7 +4204,7 @@ function get_forum_moderators($forumid, $plaintext = true)
|
||||
}
|
||||
$Cache->cache_value('forum_moderator_array', $moderatorsArray, 86200);
|
||||
}
|
||||
$ret = (array)$moderatorsArray[$forumid];
|
||||
$ret = $moderatorsArray[$forumid] ?? [];
|
||||
|
||||
$moderators = "";
|
||||
foreach($ret as $userid) {
|
||||
|
||||
@@ -4,7 +4,7 @@ dbconn();
|
||||
require_once(get_langfile_path());
|
||||
loggedinorreturn();
|
||||
parked();
|
||||
$id = 0 + $_GET["id"];
|
||||
$id = $_GET["id"] ?? 0;
|
||||
$type = unesc($_GET["type"] ?? '');
|
||||
|
||||
registration_check('invitesystem',true,false);
|
||||
|
||||
@@ -23,7 +23,7 @@ $perpage = 20;
|
||||
$ipcountres = sql_query("SELECT COUNT(DISTINCT(access)) FROM iplog WHERE userid = $userid");
|
||||
$ipcountres = mysql_fetch_row($ipcountres);
|
||||
$countrows = $ipcountres[0]+1;
|
||||
$order = $_GET['order'];
|
||||
$order = $_GET['order'] ?? '';
|
||||
|
||||
list($pagertop, $pagerbottom, $limit) = pager($perpage, $countrows, "iphistory.php?id=$userid&order=$order&");
|
||||
|
||||
|
||||
@@ -18,7 +18,7 @@ else
|
||||
}
|
||||
}
|
||||
|
||||
$mask = trim($_GET['mask']);
|
||||
$mask = trim($_GET['mask'] ?? '');
|
||||
if ($mask == "" || $mask == "255.255.255.255")
|
||||
{
|
||||
$where1 = "u.ip = '$ip'";
|
||||
@@ -54,7 +54,7 @@ else
|
||||
begin_main_frame();
|
||||
|
||||
print("<h1 align=\"center\">".$lang_ipsearch['text_search_ip_history']."</h1>\n");
|
||||
print("<form method=\"get\" action=\"".$_SERVER[PHP_SELF]."\">");
|
||||
print("<form method=\"get\" action=\"".$_SERVER['PHP_SELF']."\">");
|
||||
print("<table align=center border=1 cellspacing=0 width=115 cellpadding=5>\n");
|
||||
tr($lang_ipsearch['row_ip']."<font color=red>*</font>", "<input type=\"text\" name=\"ip\" size=\"40\" value=\"".htmlspecialchars($ip)."\" />", 1);
|
||||
tr("<nobr>".$lang_ipsearch['row_subnet_mask']."</nobr>", "<input type=\"text\" name=\"mask\" size=\"40\" value=\"" . htmlspecialchars($mask) . "\" />", 1);
|
||||
@@ -81,8 +81,8 @@ GROUP BY u.id
|
||||
die;
|
||||
}
|
||||
|
||||
$order = $_GET['order'];
|
||||
$page = 0 + $_GET["page"];
|
||||
$order = $_GET['order'] ?? '';
|
||||
$page = $_GET["page"] ?? 0;
|
||||
$perpage = 20;
|
||||
|
||||
list($pagertop, $pagerbottom, $limit) = pager($perpage, $count, "$_SERVER[PHP_SELF]?ip=$ip&mask=$mask&order=$order&");
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
require_once("include/bittorrent.php");
|
||||
dbconn();
|
||||
|
||||
$langid = 0 + $_GET['sitelanguage'];
|
||||
$langid = $_GET['sitelanguage'] ?? 0;
|
||||
if ($langid)
|
||||
{
|
||||
$lang_folder = validlang($langid);
|
||||
|
||||
@@ -26,12 +26,12 @@ if ($action == "confirmuser")
|
||||
if ($action == "edituser")
|
||||
{
|
||||
$userid = $_POST["userid"];
|
||||
$class = 0 + $_POST["class"];
|
||||
$class = $_POST["class"] ?? 0;
|
||||
$vip_added = ($_POST["vip_added"] == 'yes' ? 'yes' : 'no');
|
||||
$vip_until = ($_POST["vip_until"] ? $_POST["vip_until"] : '0000-00-00 00:00:00');
|
||||
|
||||
$warned = $_POST["warned"];
|
||||
$warnlength = 0 + $_POST["warnlength"];
|
||||
$warnlength = $_POST["warnlength"] ?? 0;
|
||||
$warnpm = $_POST["warnpm"];
|
||||
$title = $_POST["title"];
|
||||
$avatar = $_POST["avatar"];
|
||||
|
||||
13
moforums.php
13
moforums.php
@@ -7,8 +7,11 @@ if (get_user_class() < $forummanage_class)
|
||||
permissiondenied();
|
||||
|
||||
//Presets
|
||||
$act = $_GET['action'];
|
||||
$id = 0 + $_GET['id'];
|
||||
$act = $_GET['action'] ?? '';
|
||||
$id = $_GET['id'] ?? 0;
|
||||
$PHP_SELF = $_SERVER['PHP_SELF'];
|
||||
$user = $CURUSER;
|
||||
$prefix = '';
|
||||
|
||||
if (!$act) {
|
||||
$act = "forum";
|
||||
@@ -28,7 +31,7 @@ die();
|
||||
}
|
||||
|
||||
//EDIT FORUM ACTION
|
||||
if ($_POST['action'] == "editforum") {
|
||||
if (isset($_POST['action']) && $_POST['action'] == "editforum") {
|
||||
if (get_user_class() < $forummanage_class)
|
||||
permissiondenied();
|
||||
|
||||
@@ -44,7 +47,7 @@ die();
|
||||
}
|
||||
|
||||
//ADD FORUM ACTION
|
||||
if ($_POST['action'] == "addforum") {
|
||||
if (isset($_POST['action']) && $_POST['action'] == "addforum") {
|
||||
if (get_user_class() < $forummanage_class)
|
||||
permissiondenied();
|
||||
|
||||
@@ -133,7 +136,7 @@ $nr = mysql_num_rows($res);
|
||||
print("<option value=$i>$i \n");
|
||||
?>
|
||||
</select>
|
||||
<?php echo $lang_forummanage['text_overforum_order_note']?></td>
|
||||
<?php echo $lang_moforums['text_overforum_order_note']?></td>
|
||||
</tr>
|
||||
|
||||
<tr align="center">
|
||||
|
||||
40
mybar.php
40
mybar.php
@@ -1,8 +1,8 @@
|
||||
<?php
|
||||
require "include/bittorrent.php";
|
||||
dbconn();
|
||||
$userid = 0 + $_GET["userid"];
|
||||
$bgpic = 0 + $_GET["bgpic"];
|
||||
$userid = $_GET["userid"] ?? 0;
|
||||
$bgpic = $_GET["bgpic"] ?? 0;
|
||||
if (!$userid)
|
||||
die;
|
||||
if (!preg_match("/.*userid=([0-9]+)\.png$/i", $_SERVER['REQUEST_URI']))
|
||||
@@ -27,22 +27,22 @@ imagealphablending($my_img, false);
|
||||
if (!$_GET['noname'])
|
||||
{
|
||||
if (isset($_GET['namered']) && $_GET['namered']>=0 && $_GET['namered']<=255)
|
||||
$namered = 0 + $_GET['namered'];
|
||||
$namered = $_GET['namered'] ?? 0;
|
||||
else $namered=255;
|
||||
if (isset($_GET['namegreen']) && $_GET['namegreen']>=0 && $_GET['namegreen']<=255)
|
||||
$namegreen = 0 + $_GET['namegreen'];
|
||||
$namegreen = $_GET['namegreen'] ?? 0;
|
||||
else $namegreen=255;
|
||||
if (isset($_GET['nameblue']) && $_GET['nameblue']>=0 && $_GET['nameblue']<=255)
|
||||
$nameblue = 0 + $_GET['nameblue'];
|
||||
$nameblue = $_GET['nameblue'] ?? 0;
|
||||
else $nameblue=255;
|
||||
if (isset($_GET['namesize']) && $_GET['namesize']>=1 && $_GET['namesize']<=5)
|
||||
$namesize = 0 + $_GET['namesize'];
|
||||
$namesize = $_GET['namesize'] ?? 0;
|
||||
else $namesize=3;
|
||||
if (isset($_GET['namex']) && $_GET['namex']>=0 && $_GET['namex']<=350)
|
||||
$namex = 0 + $_GET['namex'];
|
||||
$namex = $_GET['namex'] ?? 0;
|
||||
else $namex=10;
|
||||
if (isset($_GET['namey']) && $_GET['namey']>=0 && $_GET['namey']<=19)
|
||||
$namey = 0 + $_GET['namey'];
|
||||
$namey = $_GET['namey'] ?? 0;
|
||||
else $namey=3;
|
||||
$name_colour = imagecolorallocate($my_img, $namered, $namegreen, $nameblue);
|
||||
imagestring($my_img, $namesize, $namex, $namey, $username, $name_colour);
|
||||
@@ -51,22 +51,22 @@ if (!$_GET['noname'])
|
||||
if (!$_GET['noup'])
|
||||
{
|
||||
if (isset($_GET['upred']) && $_GET['upred']>=0 && $_GET['upred']<=255)
|
||||
$upred = 0 + $_GET['upred'];
|
||||
$upred = $_GET['upred'] ?? 0;
|
||||
else $upred=0;
|
||||
if (isset($_GET['upgreen']) && $_GET['upgreen']>=0 && $_GET['upgreen']<=255)
|
||||
$upgreen = 0 + $_GET['upgreen'];
|
||||
$upgreen = $_GET['upgreen'] ?? 0;
|
||||
else $upgreen=255;
|
||||
if (isset($_GET['upblue']) && $_GET['upblue']>=0 && $_GET['upblue']<=255)
|
||||
$upblue = 0 + $_GET['upblue'];
|
||||
$upblue = $_GET['upblue'] ?? 0;
|
||||
else $upblue=0;
|
||||
if (isset($_GET['upsize']) && $_GET['upsize']>=1 && $_GET['upsize']<=5)
|
||||
$upsize = 0 + $_GET['upsize'];
|
||||
$upsize = $_GET['upsize'] ?? 0;
|
||||
else $upsize=3;
|
||||
if (isset($_GET['upx']) && $_GET['upx']>=0 && $_GET['upx']<=350)
|
||||
$upx = 0 + $_GET['upx'];
|
||||
$upx = $_GET['upx'] ?? 0;
|
||||
else $upx=100;
|
||||
if (isset($_GET['upy']) && $_GET['upy']>=0 && $_GET['upy']<=19)
|
||||
$upy = 0 + $_GET['upy'];
|
||||
$upy = $_GET['upy'] ?? 0;
|
||||
else $upy=3;
|
||||
$up_colour = imagecolorallocate($my_img, $upred, $upgreen, $upblue);
|
||||
imagestring($my_img, $upsize, $upx, $upy, $uploaded, $up_colour);
|
||||
@@ -75,22 +75,22 @@ if (!$_GET['noup'])
|
||||
if (!$_GET['nodown'])
|
||||
{
|
||||
if (isset($_GET['downred']) && $_GET['downred']>=0 && $_GET['downred']<=255)
|
||||
$downred = 0 + $_GET['downred'];
|
||||
$downred = $_GET['downred'] ?? 0;
|
||||
else $downred=255;
|
||||
if (isset($_GET['downgreen']) && $_GET['downgreen']>=0 && $_GET['downgreen']<=255)
|
||||
$downgreen = 0 + $_GET['downgreen'];
|
||||
$downgreen = $_GET['downgreen'] ?? 0;
|
||||
else $downgreen=0;
|
||||
if (isset($_GET['downblue']) && $_GET['downblue']>=0 && $_GET['downblue']<=255)
|
||||
$downblue = 0 + $_GET['downblue'];
|
||||
$downblue = $_GET['downblue'] ?? 0;
|
||||
else $downblue=0;
|
||||
if (isset($_GET['downsize']) && $_GET['downsize']>=1 && $_GET['downsize']<=5)
|
||||
$downsize = 0 + $_GET['downsize'];
|
||||
$downsize = $_GET['downsize'] ?? 0;
|
||||
else $downsize=3;
|
||||
if (isset($_GET['downx']) && $_GET['downx']>=0 && $_GET['downx']<=350)
|
||||
$downx = 0 + $_GET['downx'];
|
||||
$downx = $_GET['downx'] ?? 0;
|
||||
else $downx=180;
|
||||
if (isset($_GET['downy']) && $_GET['downy']>=0 && $_GET['downy']<=19)
|
||||
$downy = 0 + $_GET['downy'];
|
||||
$downy = $_GET['downy'];
|
||||
else $downy=3;
|
||||
$down_colour = imagecolorallocate($my_img, $downred, $downgreen, $downblue);
|
||||
imagestring($my_img, $downsize, $downx, $downy, $downloaded, $down_colour);
|
||||
|
||||
48
offers.php
48
offers.php
@@ -22,7 +22,7 @@ if (isset($_GET['category']) && $_GET["category"]){
|
||||
}
|
||||
|
||||
if (isset($_GET['id']) && $_GET["id"]){
|
||||
$id = 0 + htmlspecialchars($_GET["id"]);
|
||||
$id = htmlspecialchars($_GET["id"] ?? 0);
|
||||
if (preg_match('/^[0-9]+$/', !$id))
|
||||
stderr($lang_offers['std_error'], $lang_offers['std_smell_rat']);
|
||||
}
|
||||
@@ -31,7 +31,7 @@ if (isset($_GET['id']) && $_GET["id"]){
|
||||
if (isset($_GET['add_offer']) && $_GET["add_offer"]){
|
||||
if (get_user_class() < $addoffer_class)
|
||||
permissiondenied();
|
||||
$add_offer = 0 + $_GET["add_offer"];
|
||||
$add_offer = $_GET["add_offer"] ?? 0;
|
||||
if($add_offer != '1')
|
||||
stderr($lang_offers['std_error'], $lang_offers['std_smell_rat']);
|
||||
|
||||
@@ -63,11 +63,11 @@ if (isset($_GET['add_offer']) && $_GET["add_offer"]){
|
||||
if (isset($_GET['new_offer']) && $_GET["new_offer"]){
|
||||
if (get_user_class() < $addoffer_class)
|
||||
permissiondenied();
|
||||
$new_offer = 0 + $_GET["new_offer"];
|
||||
$new_offer = $_GET["new_offer"] ?? 0;
|
||||
if($new_offer != '1')
|
||||
stderr($lang_offers['std_error'], $lang_offers['std_smell_rat']);
|
||||
|
||||
$userid = 0 + $CURUSER["id"];
|
||||
$userid = $CURUSER["id"] ?? 0;
|
||||
if (preg_match("/^[0-9]+$/", !$userid))
|
||||
stderr($lang_offers['std_error'], $lang_offers['std_smell_rat']);
|
||||
|
||||
@@ -75,7 +75,7 @@ if (isset($_GET['new_offer']) && $_GET["new_offer"]){
|
||||
if ($name == "")
|
||||
bark($lang_offers['std_must_enter_name']);
|
||||
|
||||
$cat = (0 + $_POST["type"]);
|
||||
$cat = ($_POST["type"] ?? 0);
|
||||
if (!is_valid_id($cat))
|
||||
bark($lang_offers['std_must_select_category']);
|
||||
|
||||
@@ -101,7 +101,7 @@ if (isset($_GET['new_offer']) && $_GET["new_offer"]){
|
||||
//===end
|
||||
|
||||
$ret = sql_query("INSERT INTO offers (userid, name, descr, category, added) VALUES (" .
|
||||
implode(",", array_map("sqlesc", array($CURUSER["id"], $name, $descr, 0 + $_POST["type"]))) .
|
||||
implode(",", array_map("sqlesc", array($CURUSER["id"], $name, $descr, $_POST["type"] ?? 0))) .
|
||||
", '" . date("Y-m-d H:i:s") . "')");
|
||||
if (!$ret) {
|
||||
if (mysql_errno() == 1062)
|
||||
@@ -127,7 +127,7 @@ if (isset($_GET['new_offer']) && $_GET["new_offer"]){
|
||||
//=== offer details
|
||||
if (isset($_GET['off_details']) && $_GET["off_details"]){
|
||||
|
||||
$off_details = 0 + $_GET["off_details"];
|
||||
$off_details = $_GET["off_details"] ?? 0;
|
||||
if($off_details != '1')
|
||||
stderr($lang_offers['std_error'], $lang_offers['std_smell_rat']);
|
||||
|
||||
@@ -238,13 +238,13 @@ if (isset($_GET["allow_offer"]) && $_GET["allow_offer"]) {
|
||||
if (get_user_class() < $offermanage_class)
|
||||
stderr($lang_offers['std_access_denied'], $lang_offers['std_mans_job']);
|
||||
|
||||
$allow_offer = 0 + $_GET["allow_offer"];
|
||||
$allow_offer = $_GET["allow_offer"] ?? 0;
|
||||
if($allow_offer != '1')
|
||||
stderr($lang_offers['std_error'], $lang_offers['std_smell_rat']);
|
||||
|
||||
//=== to allow the offer credit to S4NE for this next bit :)
|
||||
//if ($_POST["offerid"]){
|
||||
$offid = 0 + $_POST["offerid"];
|
||||
$offid = $_POST["offerid"] ?? 0;
|
||||
if(!is_valid_id($offid))
|
||||
stderr($lang_offers['std_error'], $lang_offers['std_smell_rat']);
|
||||
|
||||
@@ -273,11 +273,11 @@ if (isset($_GET["finish_offer"]) && $_GET["finish_offer"]) {
|
||||
if (get_user_class() < $offermanage_class)
|
||||
stderr($lang_offers['std_access_denied'], $lang_offers['std_have_no_permission']);
|
||||
|
||||
$finish_offer = 0 + $_GET["finish_offer"];
|
||||
$finish_offer = $_GET["finish_offer"] ?? 0;
|
||||
if($finish_offer != '1')
|
||||
stderr($lang_offers['std_error'], $lang_offers['std_smell_rat']);
|
||||
|
||||
$offid = 0 + $_POST["finish"];
|
||||
$offid = $_POST["finish"] ?? 0;
|
||||
if(!is_valid_id($offid))
|
||||
stderr($lang_offers['std_error'], $lang_offers['std_smell_rat']);
|
||||
|
||||
@@ -323,11 +323,11 @@ if (isset($_GET["finish_offer"]) && $_GET["finish_offer"]) {
|
||||
|
||||
if (isset($_GET["edit_offer"]) && $_GET["edit_offer"]) {
|
||||
|
||||
$edit_offer = 0 + $_GET["edit_offer"];
|
||||
$edit_offer = $_GET["edit_offer"] ?? 0;
|
||||
if($edit_offer != '1')
|
||||
stderr($lang_offers['std_error'], $lang_offers['std_smell_rat']);
|
||||
|
||||
$id = 0 + $_GET["id"];
|
||||
$id = $_GET["id"] ?? 0;
|
||||
|
||||
$res = sql_query("SELECT * FROM offers WHERE id = $id") or sqlerr(__FILE__, __LINE__);
|
||||
$num = mysql_fetch_array($res);
|
||||
@@ -369,11 +369,11 @@ if (isset($_GET["edit_offer"]) && $_GET["edit_offer"]) {
|
||||
//==== take offer edit
|
||||
if (isset($_GET["take_off_edit"]) && $_GET["take_off_edit"]){
|
||||
|
||||
$take_off_edit = 0 + $_GET["take_off_edit"];
|
||||
$take_off_edit = $_GET["take_off_edit"] ?? 0;
|
||||
if($take_off_edit != '1')
|
||||
stderr($lang_offers['std_error'], $lang_offers['std_smell_rat']);
|
||||
|
||||
$id = 0 + $_GET["id"];
|
||||
$id = $_GET["id"] ?? 0;
|
||||
|
||||
$res = sql_query("SELECT userid FROM offers WHERE id = $id") or sqlerr(__FILE__, __LINE__);
|
||||
$num = mysql_fetch_array($res);
|
||||
@@ -395,7 +395,7 @@ if (isset($_GET["take_off_edit"]) && $_GET["take_off_edit"]){
|
||||
bark($lang_offers['std_must_enter_name']);
|
||||
if (!$descr)
|
||||
bark($lang_offers['std_must_enter_description']);
|
||||
$cat = (0 + $_POST["category"]);
|
||||
$cat = ($_POST["category"] ?? 0);
|
||||
if (!is_valid_id($cat))
|
||||
bark($lang_offers['std_must_select_category']);
|
||||
|
||||
@@ -412,11 +412,11 @@ if (isset($_GET["take_off_edit"]) && $_GET["take_off_edit"]){
|
||||
//=== offer votes list
|
||||
if (isset($_GET["offer_vote"]) && $_GET["offer_vote"]){
|
||||
|
||||
$offer_vote = 0 + $_GET["offer_vote"];
|
||||
$offer_vote = $_GET["offer_vote"] ?? 0;
|
||||
if($offer_vote != '1')
|
||||
stderr($lang_offers['std_error'], $lang_offers['std_smell_rat']);
|
||||
|
||||
$offerid = 0 + htmlspecialchars($_GET[id]);
|
||||
$offerid = htmlspecialchars($_GET['id'] ?? 0);
|
||||
|
||||
$res2 = sql_query("SELECT COUNT(*) FROM offervotes WHERE offerid = ".sqlesc($offerid)) or sqlerr(__FILE__, __LINE__);
|
||||
$row = mysql_fetch_array($res2);
|
||||
@@ -459,7 +459,7 @@ if (isset($_GET["offer_vote"]) && $_GET["offer_vote"]){
|
||||
|
||||
//=== offer votes
|
||||
if (isset($_GET["vote"]) && $_GET["vote"]){
|
||||
$offerid = 0 + htmlspecialchars($_GET["id"]);
|
||||
$offerid = htmlspecialchars($_GET["id"] ?? 0);
|
||||
$vote = htmlspecialchars($_GET["vote"]);
|
||||
if ($vote == 'against' && get_user_class() < $againstoffer_class)
|
||||
stderr($lang_offers['std_error'], $lang_offers['std_smell_rat']);
|
||||
@@ -532,13 +532,13 @@ if (isset($_GET["vote"]) && $_GET["vote"]){
|
||||
//=== delete offer
|
||||
if (isset($_GET["del_offer"]) && $_GET["del_offer"]){
|
||||
|
||||
$del_offer = 0 + $_GET["del_offer"];
|
||||
$del_offer = $_GET["del_offer"] ?? 0;
|
||||
if($del_offer != '1')
|
||||
stderr($lang_offers['std_error'], $lang_offers['std_smell_rat']);
|
||||
|
||||
$offer = 0 + $_GET["id"];
|
||||
$offer = $_GET["id"] ?? 0;
|
||||
|
||||
$userid = 0 + $CURUSER["id"];
|
||||
$userid = $CURUSER["id"] ?? 0;
|
||||
if (!is_valid_id($userid))
|
||||
stderr($lang_offers['std_error'], $lang_offers['std_smell_rat']);
|
||||
|
||||
@@ -554,7 +554,7 @@ if (isset($_GET["del_offer"]) && $_GET["del_offer"]){
|
||||
{
|
||||
$sure = $_GET["sure"];
|
||||
if($sure == '0' || $sure == '1')
|
||||
$sure = 0 + $_GET["sure"];
|
||||
$sure = $_GET["sure"] ?? 0;
|
||||
else
|
||||
stderr($lang_offers['std_error'], $lang_offers['std_smell_rat']);
|
||||
}
|
||||
@@ -604,7 +604,7 @@ if (isset($_GET["sort"]) && $_GET["sort"])
|
||||
$categ = $_GET["category"] ?? 0;
|
||||
$offerorid = 0;
|
||||
if (isset($_GET["offerorid"]) && $_GET["offerorid"]){
|
||||
$offerorid = 0 + htmlspecialchars($_GET["offerorid"]);
|
||||
$offerorid = htmlspecialchars($_GET["offerorid"] ?? 0);
|
||||
if (preg_match("/^[0-9]+$/", !$offerorid))
|
||||
stderr($lang_offers['std_error'], $lang_offers['std_smell_rat']);
|
||||
}
|
||||
|
||||
@@ -4,7 +4,7 @@ dbconn();
|
||||
failedloginscheck ("Recover",true);
|
||||
|
||||
$take_recover = !isset($_GET['sitelanguage']);
|
||||
$langid = 0 + $_GET['sitelanguage'];
|
||||
$langid = $_GET['sitelanguage'] ?? 0;
|
||||
if ($langid)
|
||||
{
|
||||
$lang_folder = validlang($langid);
|
||||
@@ -60,7 +60,7 @@ EOD;
|
||||
}
|
||||
elseif($_SERVER["REQUEST_METHOD"] == "GET" && $take_recover && isset($_GET["id"]) && isset($_GET["secret"]))
|
||||
{
|
||||
$id = 0 + $_GET["id"];
|
||||
$id = $_GET["id"] ?? 0;
|
||||
$md5 = $_GET["secret"];
|
||||
|
||||
if (!$id)
|
||||
|
||||
@@ -6,9 +6,9 @@ loggedinorreturn();
|
||||
if (get_user_class() < $updateextinfo_class) {
|
||||
permissiondenied();
|
||||
}
|
||||
$id = 0 + $_GET["id"];
|
||||
$type = 0 + $_GET["type"];
|
||||
$siteid = 0 + $_GET["siteid"]; // 1 for IMDb
|
||||
$id = $_GET["id"] ?? 0;
|
||||
$type = $_GET["type"] ?? 0;
|
||||
$siteid = $_GET["siteid"] ?? 0; // 1 for IMDb
|
||||
|
||||
if (!isset($id) || !$id || !is_numeric($id) || !isset($type) || !$type || !is_numeric($type) || !isset($siteid) || !$siteid || !is_numeric($siteid))
|
||||
die();
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
require_once("include/bittorrent.php");
|
||||
dbconn();
|
||||
|
||||
$langid = 0 + $_GET['sitelanguage'];
|
||||
$langid = $_GET['sitelanguage'] ?? 0;
|
||||
if ($langid)
|
||||
{
|
||||
$lang_folder = validlang($langid);
|
||||
|
||||
2
tags.php
2
tags.php
@@ -21,7 +21,7 @@ function insert_tag($name, $description, $syntax, $example, $remarks)
|
||||
stdhead($lang_tags['head_tags']);
|
||||
begin_main_frame();
|
||||
begin_frame($lang_tags['text_tags']);
|
||||
$test = $_POST["test"];
|
||||
$test = $_POST["test"] ?? '';
|
||||
?>
|
||||
<p><?php echo $lang_tags['text_bb_tags_note'] ?></p>
|
||||
|
||||
|
||||
42
takeedit.php
42
takeedit.php
@@ -14,7 +14,7 @@ if (!mkglobal("id:name:descr:type")){
|
||||
bark($lang_takeedit['std_missing_form_data']);
|
||||
}
|
||||
|
||||
$id = 0 + $id;
|
||||
$id = $id ?? 0;
|
||||
if (!$id)
|
||||
die();
|
||||
|
||||
@@ -57,7 +57,7 @@ elseif ($nfoaction == "remove"){
|
||||
}
|
||||
}
|
||||
|
||||
$catid = (0 + $type);
|
||||
$catid = ($type ?? 0);
|
||||
if (!is_valid_id($catid))
|
||||
bark($lang_takeedit['std_missing_form_data']);
|
||||
if (!$name || !$descr)
|
||||
@@ -75,13 +75,13 @@ $updateset[] = "url = " . sqlesc($url);
|
||||
$updateset[] = "small_descr = " . sqlesc($_POST["small_descr"]);
|
||||
//$updateset[] = "ori_descr = " . sqlesc($descr);
|
||||
$updateset[] = "category = " . sqlesc($catid);
|
||||
$updateset[] = "source = " . sqlesc(0 + $_POST["source_sel"]);
|
||||
$updateset[] = "medium = " . sqlesc(0 + $_POST["medium_sel"]);
|
||||
$updateset[] = "codec = " . sqlesc(0 + $_POST["codec_sel"]);
|
||||
$updateset[] = "standard = " . sqlesc(0 + $_POST["standard_sel"]);
|
||||
$updateset[] = "processing = " . sqlesc(0 + $_POST["processing_sel"]);
|
||||
$updateset[] = "team = " . sqlesc(0 + $_POST["team_sel"]);
|
||||
$updateset[] = "audiocodec = " . sqlesc(0 + $_POST["audiocodec_sel"]);
|
||||
$updateset[] = "source = " . sqlesc($_POST["source_sel"] ?? 0);
|
||||
$updateset[] = "medium = " . sqlesc($_POST["medium_sel"] ?? 0);
|
||||
$updateset[] = "codec = " . sqlesc($_POST["codec_sel"] ?? 0);
|
||||
$updateset[] = "standard = " . sqlesc($_POST["standard_sel"] ?? 0);
|
||||
$updateset[] = "processing = " . sqlesc($_POST["processing_sel"] ?? 0);
|
||||
$updateset[] = "team = " . sqlesc($_POST["team_sel"] ?? 0);
|
||||
$updateset[] = "audiocodec = " . sqlesc($_POST["audiocodec_sel"] ?? 0);
|
||||
|
||||
if (get_user_class() >= $torrentmanage_class) {
|
||||
if ($_POST["banned"]) {
|
||||
@@ -96,17 +96,17 @@ if(get_user_class()>=$torrentonpromotion_class)
|
||||
{
|
||||
if(!isset($_POST["sel_spstate"]) || $_POST["sel_spstate"] == 1)
|
||||
$updateset[] = "sp_state = 1";
|
||||
elseif((0 + $_POST["sel_spstate"]) == 2)
|
||||
elseif(($_POST["sel_spstate"] ?? 0) == 2)
|
||||
$updateset[] = "sp_state = 2";
|
||||
elseif((0 + $_POST["sel_spstate"]) == 3)
|
||||
elseif(($_POST["sel_spstate"] ?? 0) == 3)
|
||||
$updateset[] = "sp_state = 3";
|
||||
elseif((0 + $_POST["sel_spstate"]) == 4)
|
||||
elseif(($_POST["sel_spstate"] ?? 0) == 4)
|
||||
$updateset[] = "sp_state = 4";
|
||||
elseif((0 + $_POST["sel_spstate"]) == 5)
|
||||
elseif(($_POST["sel_spstate"] ?? 0) == 5)
|
||||
$updateset[] = "sp_state = 5";
|
||||
elseif((0 + $_POST["sel_spstate"]) == 6)
|
||||
elseif(($_POST["sel_spstate"] ?? 0) == 6)
|
||||
$updateset[] = "sp_state = 6";
|
||||
elseif((0 + $_POST["sel_spstate"]) == 7)
|
||||
elseif(($_POST["sel_spstate"] ?? 0) == 7)
|
||||
$updateset[] = "sp_state = 7";
|
||||
|
||||
//promotion expiration type
|
||||
@@ -128,37 +128,37 @@ if(get_user_class()>=$torrentonpromotion_class)
|
||||
}
|
||||
if(get_user_class()>=$torrentsticky_class)
|
||||
{
|
||||
if((0 + $_POST["sel_posstate"]) == 0)
|
||||
if(($_POST["sel_posstate"] ?? 0) == 0)
|
||||
$updateset[] = "pos_state = 'normal'";
|
||||
elseif((0 + $_POST["sel_posstate"]) == 1)
|
||||
elseif(($_POST["sel_posstate"] ?? 0) == 1)
|
||||
$updateset[] = "pos_state = 'sticky'";
|
||||
}
|
||||
|
||||
$pick_info = "";
|
||||
if(get_user_class()>=$torrentmanage_class && $CURUSER['picker'] == 'yes')
|
||||
{
|
||||
if((0 + $_POST["sel_recmovie"]) == 0)
|
||||
if(($_POST["sel_recmovie"] ?? 0) == 0)
|
||||
{
|
||||
if($row["picktype"] != 'normal')
|
||||
$pick_info = ", recomendation canceled!";
|
||||
$updateset[] = "picktype = 'normal'";
|
||||
$updateset[] = "picktime = '0000-00-00 00:00:00'";
|
||||
}
|
||||
elseif((0 + $_POST["sel_recmovie"]) == 1)
|
||||
elseif(($_POST["sel_recmovie"] ?? 0) == 1)
|
||||
{
|
||||
if($row["picktype"] != 'hot')
|
||||
$pick_info = ", recommend as hot movie";
|
||||
$updateset[] = "picktype = 'hot'";
|
||||
$updateset[] = "picktime = ". sqlesc(date("Y-m-d H:i:s"));
|
||||
}
|
||||
elseif((0 + $_POST["sel_recmovie"]) == 2)
|
||||
elseif(($_POST["sel_recmovie"] ?? 0) == 2)
|
||||
{
|
||||
if($row["picktype"] != 'classic')
|
||||
$pick_info = ", recommend as classic movie";
|
||||
$updateset[] = "picktype = 'classic'";
|
||||
$updateset[] = "picktime = ". sqlesc(date("Y-m-d H:i:s"));
|
||||
}
|
||||
elseif((0 + $_POST["sel_recmovie"]) == 3)
|
||||
elseif(($_POST["sel_recmovie"] ?? 0) == 3)
|
||||
{
|
||||
if($row["picktype"] != 'recommended')
|
||||
$pick_info = ", recommend as recommended movie";
|
||||
|
||||
@@ -11,7 +11,7 @@ function bark($msg)
|
||||
exit;
|
||||
}
|
||||
|
||||
$id = 0 + $_GET['id'];
|
||||
$id = $_GET['id'] ?? 0;
|
||||
int_check($id,true);
|
||||
|
||||
if (get_user_class() >= UC_MODERATOR || $CURUSER[id] == "$id")
|
||||
|
||||
@@ -7,7 +7,7 @@ loggedinorreturn();
|
||||
if (get_user_class() < $askreseed_class)
|
||||
permissiondenied();
|
||||
|
||||
$reseedid = 0 + $_GET["reseedid"];
|
||||
$reseedid = $_GET["reseedid"] ?? 0;
|
||||
$res = sql_query("SELECT seeders, last_reseed FROM torrents WHERE id=".sqlesc($reseedid)." LIMIT 1") or sqlerr(__FILE__, __LINE__);
|
||||
$row = mysql_fetch_array($res);
|
||||
if ($row['seeders'] > 0)
|
||||
|
||||
@@ -451,10 +451,10 @@ function languagetable($res, $frame_caption)
|
||||
|
||||
stdhead($lang_topten['head_top_ten']);
|
||||
begin_main_frame();
|
||||
$type = isset($_GET["type"]) ? 0 + $_GET["type"] : 0;
|
||||
$type = isset($_GET["type"]) ? (int)$_GET["type"] : 0;
|
||||
if (!in_array($type,array(1,2,3,4,5,6,7)))
|
||||
$type = 1;
|
||||
$limit = isset($_GET["lim"]) ? 0 + $_GET["lim"] : false;
|
||||
$limit = isset($_GET["lim"]) ? (int)$_GET["lim"] : false;
|
||||
$subtype = isset($_GET["subtype"]) ? $_GET["subtype"] : false;
|
||||
|
||||
print("<p align=\"center\">" .
|
||||
@@ -473,6 +473,9 @@ $cachename = "topten_type_".$type."_limit_".$limit."_subtype_".$subtype;
|
||||
$cachetime = 60 * 60; // 60 minutes
|
||||
// START CACHE
|
||||
$Cache->new_page($cachename, $cachetime, true);
|
||||
//no this option
|
||||
$reviewenabled = 'no';
|
||||
|
||||
if (!$Cache->get_page())
|
||||
{
|
||||
$Cache->add_whole_row();
|
||||
|
||||
@@ -30,7 +30,7 @@ $searchstr = mysql_real_escape_string(trim($_GET["search"]));
|
||||
if (empty($searchstr))
|
||||
unset($searchstr);
|
||||
if (isset($searchstr)){
|
||||
$search_mode = 0 + $_GET["search_mode"];
|
||||
$search_mode = $_GET["search_mode"] ?? 0;
|
||||
if (!in_array($search_mode,array(0,1,2)))
|
||||
{
|
||||
$search_mode = 0;
|
||||
|
||||
@@ -92,7 +92,7 @@ if ($showsubcat){
|
||||
}
|
||||
//----------------- start whether show torrents from all sections---------------------//
|
||||
if ($_GET)
|
||||
$allsec = 0 + $_GET["allsec"];
|
||||
$allsec = $_GET["allsec"] ?? 0;
|
||||
else $allsec = 0;
|
||||
if ($allsec == 1) //show torrents from all sections
|
||||
{
|
||||
@@ -101,7 +101,7 @@ if ($allsec == 1) //show torrents from all sections
|
||||
// ----------------- end whether ignoring section ---------------------//
|
||||
// ----------------- start bookmarked ---------------------//
|
||||
if ($_GET)
|
||||
$inclbookmarked = 0 + $_GET["inclbookmarked"];
|
||||
$inclbookmarked = $_GET["inclbookmarked"] ?? 0;
|
||||
elseif ($CURUSER['notifs']){
|
||||
if (strpos($CURUSER['notifs'], "[inclbookmarked=0]") !== false)
|
||||
$inclbookmarked = 0;
|
||||
@@ -139,7 +139,7 @@ if (!isset($CURUSER) || get_user_class() < $seebanned_class)
|
||||
$wherea[] = "banned != 'yes'";
|
||||
// ----------------- start include dead ---------------------//
|
||||
if (isset($_GET["incldead"]))
|
||||
$include_dead = 0 + $_GET["incldead"];
|
||||
$include_dead = $_GET["incldead"] ?? 0;
|
||||
elseif ($CURUSER['notifs']){
|
||||
if (strpos($CURUSER['notifs'], "[incldead=0]") !== false)
|
||||
$include_dead = 0;
|
||||
@@ -675,7 +675,7 @@ if (isset($searchstr))
|
||||
else{
|
||||
$notnewword="notnewword=1&";
|
||||
}
|
||||
$search_mode = 0 + $_GET["search_mode"];
|
||||
$search_mode = $_GET["search_mode"] ?? 0;
|
||||
if (!in_array($search_mode,array(0,1,2)))
|
||||
{
|
||||
$search_mode = 0;
|
||||
|
||||
105
userdetails.php
105
userdetails.php
@@ -14,7 +14,7 @@ function bark($msg)
|
||||
exit;
|
||||
}
|
||||
|
||||
$id = 0 + $_GET["id"];
|
||||
$id = $_GET["id"] ?? 0;
|
||||
int_check($id,true);
|
||||
|
||||
if ($id != $CURUSER['id']){
|
||||
@@ -28,10 +28,10 @@ else
|
||||
if ($user["status"] == "pending")
|
||||
stderr($lang_userdetails['std_sorry'], $lang_userdetails['std_user_not_confirmed']);
|
||||
|
||||
if ($user[added] == "0000-00-00 00:00:00")
|
||||
if ($user['added'] == "0000-00-00 00:00:00")
|
||||
$joindate = $lang_userdetails['text_not_available'];
|
||||
else
|
||||
$joindate = $user[added]." (" . gettime($user["added"], true, false, true).")";
|
||||
$joindate = $user['added']." (" . gettime($user["added"], true, false, true).")";
|
||||
$lastseen = $user["last_access"];
|
||||
if ($lastseen == "0000-00-00 00:00:00")
|
||||
$lastseen = $lang_userdetails['text_not_available'];
|
||||
@@ -39,24 +39,27 @@ else
|
||||
{
|
||||
$lastseen .= " (" . gettime($lastseen, true, false, true).")";
|
||||
}
|
||||
$res = sql_query("SELECT COUNT(*) FROM comments WHERE user=" . $user[id]) or sqlerr();
|
||||
$res = sql_query("SELECT COUNT(*) FROM comments WHERE user=" . $user['id']) or sqlerr();
|
||||
$arr3 = mysql_fetch_row($res);
|
||||
$torrentcomments = $arr3[0];
|
||||
$res = sql_query("SELECT COUNT(*) FROM posts WHERE userid=" . $user[id]) or sqlerr();
|
||||
$res = sql_query("SELECT COUNT(*) FROM posts WHERE userid=" . $user['id']) or sqlerr();
|
||||
$arr3 = mysql_fetch_row($res);
|
||||
$forumposts = $arr3[0];
|
||||
|
||||
$arr = get_country_row($user[country]);
|
||||
$country = "<img src=\"pic/flag/".$arr[flagpic]."\" alt=\"".$arr[name]."\" style='margin-left: 8pt' />";
|
||||
$arr = get_country_row($user['country']);
|
||||
$country = "<img src=\"pic/flag/".$arr['flagpic']."\" alt=\"".$arr['name']."\" style='margin-left: 8pt' />";
|
||||
|
||||
$arr = get_downloadspeed_row($user[download]);
|
||||
$download = "<img class=\"speed_down\" src=\"pic/trans.gif\" alt=\"Downstream Rate\" title=\"".$lang_userdetails['title_download'].$arr[name]."\" /> ".$arr[name];
|
||||
$arr = (array)get_downloadspeed_row($user['download']);
|
||||
$name = $arr['name'] ?? '';
|
||||
$download = "<img class=\"speed_down\" src=\"pic/trans.gif\" alt=\"Downstream Rate\" title=\"".$lang_userdetails['title_download'].$name."\" /> ".$name;
|
||||
|
||||
$arr = get_uploadspeed_row($user[upload]);
|
||||
$upload = "<img class=\"speed_up\" src=\"pic/trans.gif\" alt=\"Upstream Rate\" title=\"".$lang_userdetails['title_upload'].$arr[name]."\" /> ".$arr[name];
|
||||
$arr = (array)get_uploadspeed_row($user['upload']);
|
||||
$name = $arr['name'] ?? '';
|
||||
$upload = "<img class=\"speed_up\" src=\"pic/trans.gif\" alt=\"Upstream Rate\" title=\"".$lang_userdetails['title_upload'].$name."\" /> ".$name;
|
||||
|
||||
$arr = get_isp_row($user[isp]);
|
||||
$isp = $arr[name];
|
||||
$arr = get_isp_row($user['isp']);
|
||||
$name = $arr['name'] ?? '';
|
||||
$isp = $name;
|
||||
|
||||
if ($user["gender"] == "Male")
|
||||
$gender = "<img class='male' src='pic/trans.gif' alt='Male' title='".$lang_userdetails['title_male']."' style='margin-left: 4pt' />";
|
||||
@@ -69,15 +72,15 @@ stdhead($lang_userdetails['head_details_for']. $user["username"]);
|
||||
$enabled = $user["enabled"] == 'yes';
|
||||
$moviepicker = $user["picker"] == 'yes';
|
||||
|
||||
print("<h1 style='margin:0px'>" . get_username($user[id], true,false) . $country."</h1>");
|
||||
print("<h1 style='margin:0px'>" . get_username($user['id'], true,false) . $country."</h1>");
|
||||
|
||||
if (!$enabled)
|
||||
print("<p><b>".$lang_userdetails['text_account_disabled_note']."</b></p>");
|
||||
elseif ($CURUSER["id"] <> $user["id"])
|
||||
{
|
||||
$r = sql_query("SELECT id FROM friends WHERE userid=$CURUSER[id] AND friendid=$id") or sqlerr(__FILE__, __LINE__);
|
||||
$r = sql_query("SELECT id FROM friends WHERE userid={$CURUSER['id']} AND friendid=$id") or sqlerr(__FILE__, __LINE__);
|
||||
$friend = mysql_num_rows($r);
|
||||
$r = sql_query("SELECT id FROM blocks WHERE userid=$CURUSER[id] AND blockid=$id") or sqlerr(__FILE__, __LINE__);
|
||||
$r = sql_query("SELECT id FROM blocks WHERE userid={$CURUSER['id']} AND blockid=$id") or sqlerr(__FILE__, __LINE__);
|
||||
$block = mysql_num_rows($r);
|
||||
|
||||
if ($friend)
|
||||
@@ -91,17 +94,17 @@ elseif ($CURUSER["id"] <> $user["id"])
|
||||
}
|
||||
}
|
||||
begin_main_frame();
|
||||
if ($CURUSER[id] == $user[id] || get_user_class() >= $cruprfmanage_class)
|
||||
if ($CURUSER['id'] == $user['id'] || get_user_class() >= $cruprfmanage_class)
|
||||
print("<h2>".$lang_userdetails['text_flush_ghost_torrents']."<a class=\"altlink\" href=\"takeflush.php?id=".$id."\">".$lang_userdetails['text_here']."</a></h2>\n");
|
||||
?>
|
||||
<table width="100%" border="1" cellspacing="0" cellpadding="5">
|
||||
<?php
|
||||
if (($user["privacy"] != "strong") OR (get_user_class() >= $prfmanage_class) || $CURUSER[id] == $user[id]){
|
||||
if (($user["privacy"] != "strong") OR (get_user_class() >= $prfmanage_class) || $CURUSER['id'] == $user['id']){
|
||||
//Xia Zuojie: Taste compatibility is extremely slow. It can takes thounsands of datebase queries. It is disabled until someone makes it fast.
|
||||
/*
|
||||
if (isset($CURUSER) && $CURUSER[id] != $user[id])
|
||||
if (isset($CURUSER) && $CURUSER['id'] != $user['id'])
|
||||
{
|
||||
$user_snatched = sql_query("SELECT * FROM snatched WHERE userid = $CURUSER[id]") or sqlerr(__FILE__, __LINE__);
|
||||
$user_snatched = sql_query("SELECT * FROM snatched WHERE userid = $CURUSER['id']") or sqlerr(__FILE__, __LINE__);
|
||||
if(mysql_num_rows($user_snatched) == 0)
|
||||
$compatibility_info = $lang_userdetails['text_unknown'];
|
||||
else
|
||||
@@ -110,7 +113,7 @@ if (($user["privacy"] != "strong") OR (get_user_class() >= $prfmanage_class) ||
|
||||
{
|
||||
$torrent_2_user_value = get_torrent_2_user_value($user_snatched_arr);
|
||||
|
||||
$user_snatched_res_target = sql_query("SELECT * FROM snatched WHERE torrentid = " . $user_snatched_arr['torrentid'] . " AND userid = " . $user[id]) or sqlerr(__FILE__, __LINE__); //
|
||||
$user_snatched_res_target = sql_query("SELECT * FROM snatched WHERE torrentid = " . $user_snatched_arr['torrentid'] . " AND userid = " . $user['id']) or sqlerr(__FILE__, __LINE__); //
|
||||
if(mysql_num_rows($user_snatched_res_target) == 1) // have other peole snatched this torrent
|
||||
{
|
||||
$user_snatched_arr_target = mysql_fetch_array($user_snatched_res_target) or sqlerr(__FILE__, __LINE__); // find target user's current analyzing torrent's snatch info
|
||||
@@ -123,7 +126,7 @@ if (($user["privacy"] != "strong") OR (get_user_class() >= $prfmanage_class) ||
|
||||
}
|
||||
}
|
||||
|
||||
$val = $other_user_2_curuser_value[$user[id]];
|
||||
$val = $other_user_2_curuser_value[$user['id']];
|
||||
if ($val > 1)
|
||||
{
|
||||
$val = 1;
|
||||
@@ -165,17 +168,17 @@ if (($user["privacy"] != "strong") OR (get_user_class() >= $prfmanage_class) ||
|
||||
}
|
||||
*/
|
||||
|
||||
if ($CURUSER[id] == $user[id] || get_user_class() >= $viewinvite_class){
|
||||
if ($CURUSER['id'] == $user['id'] || get_user_class() >= $viewinvite_class){
|
||||
if ($user["invites"] <= 0)
|
||||
tr_small($lang_userdetails['row_invitation'], $lang_userdetails['text_no_invitation'], 1);
|
||||
else
|
||||
tr_small($lang_userdetails['row_invitation'], "<a href=\"invite.php?id=".$user[id]."\" title=\"".$lang_userdetails['link_send_invitation']."\">".$user[invites]."</a>", 1);}
|
||||
tr_small($lang_userdetails['row_invitation'], "<a href=\"invite.php?id=".$user['id']."\" title=\"".$lang_userdetails['link_send_invitation']."\">".$user['invites']."</a>", 1);}
|
||||
else{
|
||||
if ($CURUSER[id] != $user[id] || get_user_class() != $viewinvite_class){
|
||||
if ($CURUSER['id'] != $user['id'] || get_user_class() != $viewinvite_class){
|
||||
if ($user["invites"] <= 0)
|
||||
tr_small($lang_userdetails['row_invitation'], $lang_userdetails['text_no_invitation'], 1);
|
||||
else
|
||||
tr($lang_userdetails['row_invitation'], $user[invites], 1);}
|
||||
tr($lang_userdetails['row_invitation'], $user['invites'], 1);}
|
||||
}
|
||||
if ($user["invited_by"] > 0) {
|
||||
tr_small($lang_userdetails['row_invited_by'], get_username($user['invited_by']), 1);
|
||||
@@ -186,7 +189,7 @@ if ($where_tweak == "yes") {
|
||||
tr_small($lang_userdetails['row_last_seen_location'], $user[page], 1);
|
||||
}
|
||||
if (get_user_class() >= $userprofile_class OR $user["privacy"] == "low") {
|
||||
tr_small($lang_userdetails['row_email'], "<a href=\"mailto:".$user[email]."\">".$user[email]."</a>", 1);
|
||||
tr_small($lang_userdetails['row_email'], "<a href=\"mailto:".$user['email']."\">".$user['email']."</a>", 1);
|
||||
}
|
||||
if (get_user_class() >= $userprofile_class) {
|
||||
$resip = sql_query("SELECT ip FROM iplog WHERE userid =$id GROUP BY ip") or sqlerr(__FILE__, __LINE__);
|
||||
@@ -199,18 +202,18 @@ if (get_user_class() >= $userprofile_class) {
|
||||
if (get_user_class() >= $userprofile_class || $user["id"] == $CURUSER["id"])
|
||||
{
|
||||
if ($enablelocation_tweak == 'yes'){
|
||||
list($loc_pub, $loc_mod) = get_ip_location($user[ip]);
|
||||
list($loc_pub, $loc_mod) = get_ip_location($user['ip']);
|
||||
$locationinfo = "<span title=\"" . $loc_mod . "\">[" . $loc_pub . "]</span>";
|
||||
}
|
||||
else $locationinfo = "";
|
||||
tr_small($lang_userdetails['row_ip_address'], $user[ip].$locationinfo, 1);
|
||||
tr_small($lang_userdetails['row_ip_address'], $user['ip'].$locationinfo, 1);
|
||||
}
|
||||
|
||||
$res = sql_query("SELECT agent, peer_id, ip, port FROM peers WHERE userid = $user[id] GROUP BY agent") or sqlerr();
|
||||
$res = sql_query("SELECT agent, peer_id, ip, port FROM peers WHERE userid = {$user['id']} GROUP BY agent") or sqlerr();
|
||||
$clientselect = "";
|
||||
if (mysql_num_rows($res) > 0)
|
||||
{
|
||||
$first = true;
|
||||
$clientselect = "";
|
||||
while($arr = mysql_fetch_assoc($res))
|
||||
{
|
||||
$clientselect .= ($first == true ? "" : " ; ") . get_agent($arr["peer_id"], $arr["agent"]);
|
||||
@@ -232,7 +235,7 @@ if ($user["downloaded"] > 0)
|
||||
|
||||
$xfer = "<tr><td class=\"embedded\"><strong>" . $lang_userdetails['row_uploaded'] . "</strong>: ". mksize($user["uploaded"]) . "</td><td class=\"embedded\"> <strong>" . $lang_userdetails['row_downloaded'] . "</strong>: " . mksize($user["downloaded"]) . "</td></tr>";
|
||||
|
||||
tr_small($lang_userdetails['row_transfer'], "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">" . $sr . $xfer . "</table>", 1);
|
||||
tr_small($lang_userdetails['row_transfer'], "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">" . ($sr ?? '') . $xfer . "</table>", 1);
|
||||
|
||||
|
||||
if ($user["leechtime"] > 0)
|
||||
@@ -243,26 +246,26 @@ if ($user["leechtime"] > 0)
|
||||
|
||||
$slt = "<tr><td class=\"embedded\"><strong>" . $lang_userdetails['text_seeding_time'] . "</strong>: ". mkprettytime($user["seedtime"]) . "</td><td class=\"embedded\"> <strong>" . $lang_userdetails['text_leeching_time'] . "</strong>: " . mkprettytime($user["leechtime"]) . "</td></tr>";
|
||||
|
||||
tr_small($lang_userdetails['row_sltime'], "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">" . $slr . $slt . "</table>", 1);
|
||||
tr_small($lang_userdetails['row_sltime'], "<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\">" . ($slr ?? '') . $slt . "</table>", 1);
|
||||
|
||||
if ($user["download"] && $user["upload"])
|
||||
tr_small($lang_userdetails['row_internet_speed'], $download." ".$upload." ".$isp, 1);
|
||||
tr_small($lang_userdetails['row_gender'], $gender, 1);
|
||||
|
||||
if (($user['donated'] > 0 || $user['donated_cny'] > 0 )&& (get_user_class() >= $userprofile_class || $CURUSER["id"] == $user["id"]))
|
||||
tr_small($lang_userdetails['row_donated'], "$".htmlspecialchars($user[donated])." ".htmlspecialchars($user[donated_cny]), 1);
|
||||
tr_small($lang_userdetails['row_donated'], "$".htmlspecialchars($user['donated'])." ".htmlspecialchars($user[donated_cny]), 1);
|
||||
|
||||
if ($user["avatar"])
|
||||
tr_small($lang_userdetails['row_avatar'], return_avatar_image(htmlspecialchars(trim($user["avatar"]))), 1);
|
||||
$uclass = get_user_class_image($user["class"]);
|
||||
tr_small($lang_userdetails['row_class'], "<img alt=\"".get_user_class_name($user["class"],false,false,true)."\" title=\"".get_user_class_name($user["class"],false,false,true)."\" src=\"".$uclass."\" /> ".($user[title]!=="" ? " ".htmlspecialchars(trim($user["title"]))."" : ""), 1);
|
||||
tr_small($lang_userdetails['row_class'], "<img alt=\"".get_user_class_name($user["class"],false,false,true)."\" title=\"".get_user_class_name($user["class"],false,false,true)."\" src=\"".$uclass."\" /> ".($user['title']!=="" ? " ".htmlspecialchars(trim($user["title"]))."" : ""), 1);
|
||||
|
||||
tr_small($lang_userdetails['row_torrent_comment'], ($torrentcomments && ($user["id"] == $CURUSER["id"] || get_user_class() >= $viewhistory_class) ? "<a href=\"userhistory.php?action=viewcomments&id=".$id."\" title=\"".$lang_userdetails['link_view_comments']."\">".$torrentcomments."</a>" : $torrentcomments), 1);
|
||||
|
||||
tr_small($lang_userdetails['row_forum_posts'], ($forumposts && ($user["id"] == $CURUSER["id"] || get_user_class() >= $viewhistory_class) ? "<a href=\"userhistory.php?action=viewposts&id=".$id."\" title=\"".$lang_userdetails['link_view_posts']."\">".$forumposts."</a>" : $forumposts), 1);
|
||||
|
||||
if ($user["id"] == $CURUSER["id"] || get_user_class() >= $viewhistory_class)
|
||||
tr_small($lang_userdetails['row_karma_points'], htmlspecialchars($user[seedbonus]), 1);
|
||||
tr_small($lang_userdetails['row_karma_points'], htmlspecialchars($user['seedbonus']), 1);
|
||||
|
||||
if ($user["ip"] && (get_user_class() >= $torrenthistory_class || $user["id"] == $CURUSER["id"])){
|
||||
|
||||
@@ -285,27 +288,27 @@ if ($user["info"])
|
||||
}
|
||||
else
|
||||
{
|
||||
print("<tr><td align=\"left\" colspan=\"2\" class=\"text\"><font color=\"blue\">".$lang_userdetails['text_public_access_denied'].$user[username].$lang_userdetails['text_user_wants_privacy']."</font></td></tr>\n");
|
||||
print("<tr><td align=\"left\" colspan=\"2\" class=\"text\"><font color=\"blue\">".$lang_userdetails['text_public_access_denied'].$user['username'].$lang_userdetails['text_user_wants_privacy']."</font></td></tr>\n");
|
||||
}
|
||||
if ($CURUSER["id"] != $user["id"])
|
||||
if (get_user_class() >= $staffmem_class)
|
||||
$showpmbutton = 1;
|
||||
elseif ($user["acceptpms"] == "yes")
|
||||
{
|
||||
$r = sql_query("SELECT id FROM blocks WHERE userid=$user[id] AND blockid=$CURUSER[id]") or sqlerr(__FILE__,__LINE__);
|
||||
$r = sql_query("SELECT id FROM blocks WHERE userid={$user['id']} AND blockid={$CURUSER['id']}") or sqlerr(__FILE__,__LINE__);
|
||||
$showpmbutton = (mysql_num_rows($r) == 1 ? 0 : 1);
|
||||
}
|
||||
elseif ($user["acceptpms"] == "friends")
|
||||
{
|
||||
$r = sql_query("SELECT id FROM friends WHERE userid=$user[id] AND friendid=$CURUSER[id]") or sqlerr(__FILE__,__LINE__);
|
||||
$r = sql_query("SELECT id FROM friends WHERE userid={$user['id']} AND friendid={$CURUSER['id']}") or sqlerr(__FILE__,__LINE__);
|
||||
$showpmbutton = (mysql_num_rows($r) == 1 ? 1 : 0);
|
||||
}
|
||||
if ($CURUSER["id"] != $user["id"]){
|
||||
print("<tr><td colspan=\"2\" align=\"center\">");
|
||||
if ($showpmbutton)
|
||||
print("<a href=\"sendmessage.php?receiver=".htmlspecialchars($user[id])."\"><img class=\"f_pm\" src=\"pic/trans.gif\" alt=\"PM\" title=\"".$lang_userdetails['title_send_pm']."\" /></a>");
|
||||
print("<a href=\"sendmessage.php?receiver=".htmlspecialchars($user['id'])."\"><img class=\"f_pm\" src=\"pic/trans.gif\" alt=\"PM\" title=\"".$lang_userdetails['title_send_pm']."\" /></a>");
|
||||
|
||||
print("<a href=\"report.php?user=".htmlspecialchars($user[id])."\"><img class=\"f_report\" src=\"pic/trans.gif\" alt=\"Report\" title=\"".$lang_userdetails['title_report_user']."\" /></a>");
|
||||
print("<a href=\"report.php?user=".htmlspecialchars($user['id'])."\"><img class=\"f_report\" src=\"pic/trans.gif\" alt=\"Report\" title=\"".$lang_userdetails['title_report_user']."\" /></a>");
|
||||
print("</td></tr>");
|
||||
}
|
||||
print("</table>\n");
|
||||
@@ -318,7 +321,7 @@ if (get_user_class() >= $prfmanage_class && $user["class"] < get_user_class())
|
||||
print("<input type=\"hidden\" name=\"userid\" value=\"".$id."\" />");
|
||||
print("<input type=\"hidden\" name=\"returnto\" value=\"".htmlspecialchars("userdetails.php?id=$id")."\" />");
|
||||
print("<table width=\"100%\" class=\"main\" border=\"1\" cellspacing=\"0\" cellpadding=\"5\">\n");
|
||||
tr($lang_userdetails['row_title'], "<input type=\"text\" size=\"60\" name=\"title\" value=\"" . htmlspecialchars(trim($user[title])) . "\" />", 1);
|
||||
tr($lang_userdetails['row_title'], "<input type=\"text\" size=\"60\" name=\"title\" value=\"" . htmlspecialchars(trim($user['title'])) . "\" />", 1);
|
||||
$avatar = htmlspecialchars(trim($user["avatar"]));
|
||||
|
||||
tr($lang_userdetails['row_privacy_level'], "<input type=\"radio\" name=\"privacy\" value=\"low\"".($user["privacy"] == "low" ? " checked=\"checked\"" : "")." />".$lang_userdetails['radio_low']."<input type=\"radio\" name=\"privacy\" value=\"normal\"".($user["privacy"] == "normal" ? " checked=\"checked\"" : "")." />".$lang_userdetails['radio_normal']."<input type=\"radio\" name=\"privacy\" value=\"strong\"".($user["privacy"] == "strong" ? " checked=\"checked\"" : "")." />".$lang_userdetails['radio_strong'], 1);
|
||||
@@ -329,7 +332,7 @@ if (get_user_class() >= $prfmanage_class && $user["class"] < get_user_class())
|
||||
if (get_user_class() == UC_STAFFLEADER)
|
||||
{
|
||||
tr($lang_userdetails['row_donor_status'], "<input type=\"radio\" name=\"donor\" value=\"yes\"" .($user["donor"] == "yes" ? " checked=\"checked\"" : "")." />".$lang_userdetails['radio_yes']." <input type=\"radio\" name=\"donor\" value=\"no\"" .($user["donor"] == "no" ? " checked=\"checked\"" : "").">".$lang_userdetails['radio_no'], 1);
|
||||
tr($lang_userdetails['row_donated'], "USD: <input type=\"text\" size=\"5\" name=\"donated\" value=\"" . htmlspecialchars($user[donated]) . "\" /> CNY: <input type=\"text\" size=\"5\" name=\"donated_cny\" value=\"" . htmlspecialchars($user[donated_cny]) . "\" />" . $lang_userdetails['text_transaction_memo'] . "<input type=\"text\" size=\"50\" name=\"donation_memo\" />", 1);
|
||||
tr($lang_userdetails['row_donated'], "USD: <input type=\"text\" size=\"5\" name=\"donated\" value=\"" . htmlspecialchars($user['donated']) . "\" /> CNY: <input type=\"text\" size=\"5\" name=\"donated_cny\" value=\"" . htmlspecialchars($user[donated_cny]) . "\" />" . $lang_userdetails['text_transaction_memo'] . "<input type=\"text\" size=\"50\" name=\"donation_memo\" />", 1);
|
||||
}
|
||||
if (get_user_class() == $prfmanage_class)
|
||||
$maxclass = UC_VIP;
|
||||
@@ -390,7 +393,7 @@ if (get_user_class() >= $prfmanage_class && $user["class"] < get_user_class())
|
||||
|
||||
|
||||
$elapsedlw = get_elapsed_time(strtotime($user["lastwarned"]));
|
||||
print("<tr><td align=\"left\" class=\"rowfollow\">".$lang_userdetails['text_times_warned']."</td><td align=\"left\" class=\"rowfollow\">".$user[timeswarned]."</td></tr>\n");
|
||||
print("<tr><td align=\"left\" class=\"rowfollow\">".$lang_userdetails['text_times_warned']."</td><td align=\"left\" class=\"rowfollow\">".$user['timeswarned']."</td></tr>\n");
|
||||
|
||||
if ($user["timeswarned"] == 0)
|
||||
{
|
||||
@@ -398,7 +401,7 @@ if (get_user_class() >= $prfmanage_class && $user["class"] < get_user_class())
|
||||
}else{
|
||||
if ($user["warnedby"] != "System")
|
||||
{
|
||||
$res = sql_query("SELECT id, username, warnedby FROM users WHERE id = " . $user['warnedby'] . "") or sqlerr(__FILE__,__LINE__);
|
||||
$res = sql_query("SELECT id, username, warnedby FROM users WHERE id = " . $user['warnedby']) or sqlerr(__FILE__,__LINE__);
|
||||
$arr = mysql_fetch_assoc($res);
|
||||
$warnedby = "<br />[".$lang_userdetails['text_by']."<u>" . get_username($arr['id']) . "</u></a>]";
|
||||
}else{
|
||||
@@ -435,9 +438,9 @@ if (get_user_class() >= $prfmanage_class && $user["class"] < get_user_class())
|
||||
tr($lang_userdetails['row_no_ad_until'], "<input type=\"text\" name=\"noaduntil\" value=\"".htmlspecialchars($user["noaduntil"])."\" /> ".$lang_userdetails['text_no_ad_until_note'], 1);
|
||||
if (get_user_class() >= $cruprfmanage_class)
|
||||
{
|
||||
tr($lang_userdetails['row_change_username'], "<input type=\"text\" size=\"25\" name=\"username\" value=\"" . htmlspecialchars($user[username]) . "\" />", 1);
|
||||
tr($lang_userdetails['row_change_username'], "<input type=\"text\" size=\"25\" name=\"username\" value=\"" . htmlspecialchars($user['username']) . "\" />", 1);
|
||||
|
||||
tr($lang_userdetails['row_change_email'], "<input type=\"text\" size=\"80\" name=\"email\" value=\"" . htmlspecialchars($user[email]) . "\" />", 1);
|
||||
tr($lang_userdetails['row_change_email'], "<input type=\"text\" size=\"80\" name=\"email\" value=\"" . htmlspecialchars($user['email']) . "\" />", 1);
|
||||
}
|
||||
|
||||
tr($lang_userdetails['row_change_password'], "<input type=\"password\" name=\"chpassword\" size=\"50\" />", 1);
|
||||
@@ -445,10 +448,10 @@ if (get_user_class() >= $prfmanage_class && $user["class"] < get_user_class())
|
||||
|
||||
if (get_user_class() >= $cruprfmanage_class)
|
||||
{
|
||||
tr($lang_userdetails['row_amount_uploaded'], "<input type=\"text\" size=\"60\" name=\"uploaded\" value=\"" . htmlspecialchars($user[uploaded]) . "\" /><input type=\"hidden\" name=\"ori_uploaded\" value=\"" . htmlspecialchars($user[uploaded]) . "\" />", 1);
|
||||
tr($lang_userdetails['row_amount_downloaded'], "<input type=\"text\" size=\"60\" name=\"downloaded\" value=\"" .htmlspecialchars($user[downloaded]) . "\" /><input type=\"hidden\" name=\"ori_downloaded\" value=\"" .htmlspecialchars($user[downloaded]) . "\" />", 1);
|
||||
tr($lang_userdetails['row_seeding_karma'], "<input type=\"text\" size=\"60\" name=\"bonus\" value=\"" .htmlspecialchars($user[seedbonus]) . "\" /><input type=\"hidden\" name=\"ori_bonus\" value=\"" .htmlspecialchars($user[seedbonus]) . "\" />", 1);
|
||||
tr($lang_userdetails['row_invites'], "<input type=\"text\" size=\"60\" name=\"invites\" value=\"" .htmlspecialchars($user[invites]) . "\" />", 1);
|
||||
tr($lang_userdetails['row_amount_uploaded'], "<input type=\"text\" size=\"60\" name=\"uploaded\" value=\"" . htmlspecialchars($user['uploaded']) . "\" /><input type=\"hidden\" name=\"ori_uploaded\" value=\"" . htmlspecialchars($user['uploaded']) . "\" />", 1);
|
||||
tr($lang_userdetails['row_amount_downloaded'], "<input type=\"text\" size=\"60\" name=\"downloaded\" value=\"" .htmlspecialchars($user['downloaded']) . "\" /><input type=\"hidden\" name=\"ori_downloaded\" value=\"" .htmlspecialchars($user['downloaded']) . "\" />", 1);
|
||||
tr($lang_userdetails['row_seeding_karma'], "<input type=\"text\" size=\"60\" name=\"bonus\" value=\"" .htmlspecialchars($user['seedbonus']) . "\" /><input type=\"hidden\" name=\"ori_bonus\" value=\"" .htmlspecialchars($user['seedbonus']) . "\" />", 1);
|
||||
tr($lang_userdetails['row_invites'], "<input type=\"text\" size=\"60\" name=\"invites\" value=\"" .htmlspecialchars($user['invites']) . "\" />", 1);
|
||||
}
|
||||
tr($lang_userdetails['row_passkey'], "<input name=\"resetkey\" value=\"yes\" type=\"checkbox\" />".$lang_userdetails['checkbox_reset_passkey'], 1);
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ header("Cache-Control: no-cache, must-revalidate" );
|
||||
header("Pragma: no-cache" );
|
||||
header("Content-Type: text/xml; charset=utf-8");
|
||||
|
||||
$id = 0 + $_GET['id'];
|
||||
$id = $_GET['id'] ?? 0;
|
||||
if(isset($CURUSER))
|
||||
{
|
||||
$s = "<table class=\"main\" border=\"1\" cellspacing=0 cellpadding=\"5\">\n";
|
||||
|
||||
Reference in New Issue
Block a user