\n";
}
} elseif ($act == "off") {
$result = dbquery("UPDATE ".$db_prefix."users SET user_status='0' WHERE user_id='$user_id'");
echo "
".$locale['421']."
\n";
}
} elseif ($step == "activate") {
$result = dbquery("SELECT user_name,user_email FROM ".$db_prefix."users WHERE user_id='$user_id'");
if (dbrows($result) != 0) {
$udata = dbarray($result);
$result = dbquery("UPDATE ".$db_prefix."users SET user_status='0' WHERE user_id='$user_id'");
if ($settings['email_verification'] == "1") {
require_once INCLUDES."sendmail_include.php";
sendemail($udata['user_name'],$udata['user_email'],$settings['siteusername'],$settings['siteemail'],$locale['425'].$settings['sitename'],str_replace("[USER_NAME]", $udata['user_name'], $locale['426']));
}
echo "
".$locale['424']."
\n";
}
} elseif ($step == "delete") {
if ($user_id != 1) {
$result = dbquery("DELETE FROM ".$db_prefix."users WHERE user_id='$user_id'");
$result = dbquery("DELETE FROM ".$db_prefix."articles WHERE article_name='$user_id'");
$result = dbquery("DELETE FROM ".$db_prefix."comments WHERE comment_name='$user_id'");
$result = dbquery("DELETE FROM ".$db_prefix."messages WHERE message_to='$user_id'");
$result = dbquery("DELETE FROM ".$db_prefix."messages WHERE message_from='$user_id'");
$result = dbquery("DELETE FROM ".$db_prefix."news WHERE news_name='$user_id'");
$result = dbquery("DELETE FROM ".$db_prefix."poll_votes WHERE vote_user='$user_id'");
$result = dbquery("DELETE FROM ".$db_prefix."ratings WHERE rating_user='$user_id'");
$result = dbquery("DELETE FROM ".$db_prefix."shoutbox WHERE shout_name='$user_id'");
$result = dbquery("DELETE FROM ".$db_prefix."threads WHERE thread_author='$user_id'");
$result = dbquery("DELETE FROM ".$db_prefix."posts WHERE post_author='$user_id'");
$result = dbquery("DELETE FROM ".$db_prefix."thread_notify WHERE notify_user='$user_id'");
echo "
".$locale['422']."
\n";
}
}
if (!isset($sortby) || !preg_match("/^[0-9A-Z]$/", $sortby)) $sortby = "all";
$orderby = ($sortby == "all" ? "" : " WHERE user_name LIKE '".stripinput($sortby)."%'");
$result = dbquery("SELECT * FROM ".$db_prefix."users".$orderby."");
$rows = dbrows($result);
if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0;
$result = dbquery("SELECT * FROM ".$db_prefix."users".$orderby." ORDER BY user_status DESC, user_level DESC, user_name LIMIT $rowstart,20");
if ($rows != 0) {
$i = 0;
echo "