refactor: most of broad SELECTs updated

Closes #301
This commit is contained in:
Martin Ambrus
2017-11-05 14:35:19 +01:00
parent ee285a4ed8
commit ee017adb40
34 changed files with 95 additions and 101 deletions
+2 -3
View File
@@ -50,8 +50,8 @@ EOT;
$plusTime = 604800; // 7 days
$time = time();
$giveplus = ($time + $plustime);
$accountCheck = mysqli_query($GLOBALS['link'],"SELECT * FROM ".TB_PREFIX."users WHERE `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
if(mysqli_num_rows($accountCheck) <= 0){
$accountCheck = mysqli_fetch_array(mysqli_query($GLOBALS['link'],"SELECT Count(*) as Total FROM ".TB_PREFIX."users WHERE `id`='".$session->uid."'"), MYSQLI_ASSOC) or die(mysqli_error($database->dblink));
if($accountCheck['Total'] <= 0){
echo "<b>ERROR:</b><br />";
echo "The account name you entered does not exist.";
echo "<br /><br /><input type=\"button\" value=\"Back\" onclick=\"history.go(-1)\">";
@@ -59,7 +59,6 @@ EOT;
}
if(!$valid) break;
$valid=TRUE;
$acc = mysqli_fetch_array($accountCheck);
$plusCheck = mysqli_query($GLOBALS['link'],"SELECT * FROM ".TB_PREFIX."users WHERE `id`='".$session->uid."'") or die(mysqli_error($database->dblink));
$pluss = mysqli_fetch_array($plusCheck);