$changes["useAvatarHeight"] = 0; $changes["useAvatarExt"] = "---"; $changes["useAvatarDate"] = 0; addModeratorLog($useData["useid"], "[b]Deleted user avatar[/b]"); } if (isset($_POST["deleteID"])) { $filename = findNewestFile(applyIdToPath("files/ids/", $useData["useid"]) . "-*", ""); if ($filename != "") { unlink($filename); } addModeratorLog($useData["useid"], "[b]Deleted user ID[/b]"); } if (isset($_POST["deleteTheme"])) { include_once INCLUDES . "customthemes.php"; removeCustomTheme($useData["useid"], false); addModeratorLog($useData["useid"], "[b]Removed custom theme[/b]"); } //Only admin can change user class if (isAdmin()) { $changesExt["useIsRetired"] = isset($_POST["useIsRetired"]) ? 1 : 0; $changesExt["useIsHelpdesk"] = isset($_POST["useIsHelpdesk"]) ? 1 : 0; $changesExt["useIsModerator"] = isset($_POST["useIsModerator"]) ? 1 : 0; $changesExt["useIsSModerator"] = isset($_POST["useIsSModerator"]) ? 1 : 0; $changesExt["useIsDeveloper"] = isset($_POST["useIsDeveloper"]) ? 1 : 0; } if (count($changes) > 0) { sql_query("UPDATE `users`" . dbSet($changes) . dbWhere(array("useid" => $useData["useid"]))); } if (count($changesExt) > 0) { sql_query("UPDATE `useExtData`" . dbSet($changesExt) . dbWhere(array("useEid" => $useData["useid"]))); }
function abuseViolation($objid, $useid, $abuid) { global $_objects, $_objExtData, $isExtras, $rule; sql_query("UPDATE {$_objects} SET `objDeleted` = '0', `objPending` = '0' " . "WHERE `objid` = '{$objid}' LIMIT 1"); sql_query("UPDATE {$_objExtData} SET `objNoAbuse` = '1' " . "WHERE `objEid` = '{$objid}' LIMIT 1"); // Send the violation notice to the user's updates. addUpdate(updTypeMessageDeleted, $useid, $objid, $isExtras); // Put this submission back to users updates. if ($isExtras) { $result = sql_query("SELECT DISTINCT `useid` FROM `updates`,`users` " . "WHERE `useid` = `updCreator` AND `updObj` = '{$objid}' " . "AND `updType` = '" . updTypeArtExtra . "'"); while ($rowData = mysql_fetch_assoc($result)) { // recountUpdates( updTypeArtExtra, $rowData[ "useid" ]); sql_query("UPDATE `useExtData` SET `useUpdExt` = `useUpdExt` + 1 " . "WHERE `useEid` = '" . intval($rowData["useid"]) . "' LIMIT 1"); } } else { $result = sql_query("SELECT DISTINCT `useid` FROM `updatesArt`,`users` " . "WHERE `useid` = `updCreator` AND `updObj` = '{$objid}'"); while ($rowData = mysql_fetch_assoc($result)) { // recountUpdates( updTypeArt, $rowData[ "useid" ]); sql_query("UPDATE `useExtData` SET `useUpdObj` = `useUpdObj` + 1 " . "WHERE `useEid` = '" . intval($rowData["useid"]) . "' LIMIT 1"); } } // Update object count. include_once INCLUDES . "submission.php"; updateObjCount($useid); // Set the abuse case to the "resolved" state. sql_query("UPDATE `abuses` SET `abuResolved` = '1', `abuFinal`='-', `abuCloseDate`=NOW()" . "WHERE `abuid` = '{$abuid}' LIMIT 1"); // Add message to moderator's log at the submitter's page. addModeratorLog($useid, "Fixed and restored after moderation: " . "[url=" . url("abuse/" . $abuid, array(), "&") . "]" . "Abuse Case #" . $abuid . "[/url]. {$rule}"); }