Bravo List

Bravo List (http://www.bvlist.com/index.php)
-   Project U-232 (http://www.bvlist.com/forumdisplay.php?f=80)
-   -   Where Function (http://www.bvlist.com/showthread.php?t=12599)

hax0r 19th September 2022 10:44

Where Function
 
$where = where ($_SERVER["SCRIPT_FILENAME"], $row["id"], 0);
SQL_Query_exec("UPDATE users SET last_access='" . get_date_time() . "', ip=".sqlesc($ip).", page=".sqlesc($where)." WHERE id=" . $row["id"]);


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'", mysqli_real_escape_string($GLOBALS["DBconnector"],$userid));
$result = SQL_Query_exec($query);
}
return $where;
}

szaby 6th October 2022 16:32

I think this is a useless function. Why burden SQL with this?

BamBam0077 13th October 2022 13:26

because I use a private PHP VPN code developers code it maybe posted somewhere around here anyway so we could monitor our staffing team's
edit::!?/
SQL_Query_exec("UPDATE
update
sql_query("UPDATE
0R
mysqli_query("UPDATE

choice's I do tell you people is intended solely to assist and entertain PHP developers ;)
PHP.NET


All times are GMT +2. The time now is 13:16.

Powered by vBulletin® Version 3.8.11 Beta 3
Copyright ©2000 - 2024, vBulletin Solutions Inc.