in thory it should, i personally like the old style once its changed to pickup more pages hehe
function where ($where, $userid, $update=1){
if (!is_valid_id($userid))
die;
if(empty($where))
$where = "Unknown Location...";
if ($update)
SQL_Query_exec("UPDATE users SET last_access='" . get_date_time() . "', ip=".sqlesc($ip).", page=".sqlesc($where)." WHERE id=" . $userid);
if (!$update){
return $where;
}else{
return;
}
}"mostvotedplaya, post: 86905":ihave the where functionupdate the where function in backend/functions.php
function where ($scriptname = "index", $userid, $update=1){
if (!is_valid_id($userid))
die;
if (preg_match("/torrents-details/i", $scriptname))
$where = "Browsing Torrents Details (ID: $_GET[id])...";
elseif (preg_match("/torrents.php/i", $scriptname))
$where = "Browsing Torrents...";
elseif (preg_match("/account-details/i", $scriptname))
$where = "Browsing Account Details (ID: $_GET[id])...";
elseif (preg_match("/torrents-upload/i", $scriptname))
$where = "Uploading Torrent..";
elseif (preg_match("/account/i", $scriptname))
$where = "Browsing User Control Panel...";
elseif (preg_match("/torrents-search/i", $scriptname))
$where = "Searching Torrents...";
elseif (preg_match("/forums/i", $scriptname))
$where = "Browsing Forums...";
elseif (preg_match("/index/i", $scriptname))
$where = "Browsing Homepage...";
else
$where = "Unknown Location...";
if ($update) {
$query = sprintf("UPDATE users SET page=".sqlesc($where)." WHERE id ='%s'", mysql_real_escape_string($userid));
$result = SQL_Query_exec($query);
}
return $where;
}
elseif (preg_match("/faq/i", $scriptname))
$where = "Browsing FAQ...";
function where ($scriptname = "index", $userid, $update=1){
if (!is_valid_id($userid))
die;
$where = str_replace($_SERVER["DOCUMENT_ROOT"], null, $_SERVER["SCRIPT_FILENAME"]);
if (preg_match("/account-details/i", $scriptname))
$where = "Browsing Account Details...";
elseif (preg_match("/account/i", $scriptname))
$where = "Browsing User Control Panel...";
elseif (preg_match("/forums/i", $scriptname))
$where = "Browsing Forums...";
elseif (preg_match("/index/i", $scriptname))
$where = "Browsing Homepage...";
else
$where = "Unknown Location...";
if ($update) {
$query = sprintf("UPDATE users SET page=".sqlesc($where)." WHERE id ='%s'", mysql_real_escape_string($userid));
$result = SQL_Query_exec($query);
}
return $where;
}
function where22($scriptname = "index", $userid, $update = 1, $title)
{
if (!is_valid_id($userid))
die;
if (preg_match("/torrents-details/i", $scriptname)) {
if (is_valid_id($_GET['id'])) {
$res = SQL_Query_exec("SELECT `name` FROM `torrents` WHERE `id` = '" . $_GET['id'] . "'");
$row = mysql_fetch_assoc($res);
}
$where = "Browsing Torrents Details (" . ($row ? $row['name'] : "ID: $_GET[id]") . ")...";
} elseif (preg_match("/torrents.php/i", $scriptname)) {
$where = "Browsing Torrents";
} elseif (preg_match("/staff.php/i", $scriptname)) {
$where = "Staff Page";
} elseif (preg_match("/download.php/i", $scriptname)) {
if (is_valid_id($_GET['id'])) {
$res = SQL_Query_exec("SELECT `name` FROM `torrents` WHERE `id` = '" . $_GET['id'] . "'");
$row = mysql_fetch_assoc($res);
}
$where = "Downloading Torrent (" . ($row ? $row['name'] : "ID: $_GET[id]") . ")...";
} elseif (preg_match("/download_rss.php/i", $scriptname)) {
if (is_valid_id($_GET['id'])) {
$res = SQL_Query_exec("SELECT `name` FROM `torrents` WHERE `id` = '" . $_GET['id'] . "'");
$row = mysql_fetch_assoc($res);
}
$where = "Rss Downloading (" . ($row ? $row['name'] : "ID: $_GET[id]") . ")...";
} elseif (preg_match("/account-details/i", $scriptname)) {
if (is_valid_id($_GET['id'])) {
$res = SQL_Query_exec("SELECT `username` FROM `users` WHERE `id` = '" . $_GET['id'] . "'");
$row = mysql_fetch_assoc($res);
}
$where = "Browsing Account Details (" . ($row ? $row['username'] : "ID: $_GET[id]") . ")...";
} elseif (preg_match("/torrents-upload/i", $scriptname)) {
$where = "Uploading Torrent..";
} elseif (preg_match("/account/i", $scriptname)) {
$where = "Browsing User Control Panel";
} elseif (preg_match("/torrents-edit.php/i", $scriptname)) {
if (is_valid_id($_GET['id'])) {
$res = SQL_Query_exec("SELECT `name` FROM `torrents` WHERE `id` = '" . $_GET['id'] . "'");
$row = mysql_fetch_assoc($res);
}
$where = "Edited An Torrent (" . ($row ? $row['name'] : "ID: $_GET[id]") . ")...";
} elseif (preg_match("/torrents-search/i", $scriptname)) {
$where = "Searching Torrents";
} elseif (preg_match("/forums/i", $scriptname)) {
$forumid = $_GET[topicid];
if ($forumid > 0) {
$res_forumid = SQL_Query_exec("SELECT subject FROM forum_topics WHERE id=$forumid");
$row_forumid = mysql_fetch_row($res_forumid);
$forumname = $row_forumid[0];
$smallname3 = substr(htmlspecialchars($forumname), 0, 40);
$where = "Browsing Forums (Topic: $smallname3)";
} else {
$where = "Browsing Forums";
}
} elseif (preg_match("/index/i", $scriptname)) {
$where = "Browsing Homepage";
} else {
if ($title)
$where = $title;
else
$where = str_replace($_SERVER["DOCUMENT_ROOT"], null, $_SERVER["SCRIPT_FILENAME"]);
}
if ($update) {
$ip = getip();
$query = sprintf("UPDATE users SET last_access=" . sqlesc(get_date_time()) . ", ip=" . sqlesc($ip) . ", page=" . sqlesc($where) . " WHERE id ='%s'", mysql_real_escape_string($userid));
$result = SQL_Query_exec($query);
}
return $where;
}
No users online
Torrents
Members
Online