\n"; if (!preg_match("/^[-0-9A-Z_@\s]+$/i", $username)) $error .= $locale['452']."
\n"; if (preg_match("/^[0-9A-Z@]{6,20}$/i", $_POST['password1'])) { if ($_POST['password1'] != $_POST['password2']) $error .= $locale['456']."
\n"; } else { $error .= $locale['457']."
\n"; } if (!preg_match("/^[-0-9A-Z_\.]{1,50}@([-0-9A-Z_\.]+\.){1,50}([0-9A-Z]){2,4}$/i", $_POST['email'])) { $error .= $locale['454']."
\n"; } $result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_name='$username'"); if (dbrows($result) != 0) $error = $locale['453']."
\n"; $result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_email='".$_POST['email']."'"); if (dbrows($result) != 0) $error = $locale['455']."
\n"; if ($error == "") { $result = dbquery("INSERT INTO ".$db_prefix."users (user_name, user_password, user_email, user_hide_email, user_location, user_birthdate, user_aim, user_icq, user_msn, user_yahoo, user_web, user_theme, user_offset, user_avatar, user_sig, user_posts, user_joined, user_lastvisit, user_ip, user_rights, user_groups, user_level, user_status) VALUES ('$username', md5('$password1'), '$email', '$hide_email', '', '0000-00-00', '', '', '', '', '', 'Default', '0', '', '', '0', '".time()."', '0', '".USER_IP."', '', '', '101', '0')"); opentable($locale['480']); echo "

".$locale['481']."

".$locale['432']."

".$locale['433']."

\n"; closetable(); } else { opentable($locale['480']); echo "

".$locale['482']."

$error
".$locale['432']."

".$locale['433']."

\n"; closetable(); } } else { opentable($locale['480']); echo "
".$locale['u001']."*
".$locale['u002']."*
".$locale['u004']."*
".$locale['u005']."*
".$locale['u006']." ".$locale['u007']."".$locale['u008']."

\n"; closetable(); } } elseif ($step == "view") { $result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_id='$user_id'"); if (dbrows($result)) { $data = dbarray($result); } else { fallback(FUSION_SELF.$aidlink); } opentable($locale['470']); echo "
".$data['user_name']." ".getuserlevel($data['user_level'])."
\n"; echo ($data['user_avatar'] ? "".$locale[" : $locale['u046'])." ".$locale['u009']." ".($data['user_location'] ? $data['user_location'] : $locale['u048'])."
".$locale['u010']." "; if ($data['user_birthdate'] != "0000-00-00") { $months = explode("|", $locale['months']); $user_birthdate = explode("-", $data['user_birthdate']); echo $months[number_format($user_birthdate['1'])]." ".number_format($user_birthdate['2'])." ".$user_birthdate['0']; } else { echo $locale['u048']; } echo "
".$locale['u021']." ".($data['user_aim'] ? $data['user_aim'] : $locale['u048'])."
".$locale['u011']." ".($data['user_icq'] ? $data['user_icq'] : $locale['u048'])."
".$locale['u012']." ".($data['user_msn'] ? $data['user_msn'] : $locale['u048'])."
\n"; if ($data['user_hide_email'] != "1" || iADMIN) { echo "[ ".$locale['u051']." ]\n"; } if ($data['user_web']) { $urlprefix = !strstr($data['user_web'], "http://") ? "http://" : ""; echo "[ ".$locale['u052']." ]\n"; } if ($data['user_id'] != $userdata['user_id']) { echo "[ ".$locale['u053']." ]\n"; } echo " ".$locale['u013']." ".($data['user_yahoo'] ? $data['user_yahoo'] : $locale['u048'])."
\n"; tablebreak(); echo "
".$locale['472']."
".$locale['u040']." ".showdate("longdate", $data['user_joined'])."
".$locale['u044']." ".($data['user_lastvisit'] != 0 ? showdate("longdate", $data['user_lastvisit']) : $locale['u049'])."
".$locale['u050']." ".$data['user_ip']."
".$locale['u041']." ".number_format(dbcount("(shout_id)", "shoutbox", "shout_name='".$data['user_id']."'"))."
".$locale['u042']." ".number_format(dbcount("(comment_id)", "comments", "comment_name='".$data['user_id']."'"))."
".$locale['u043']." ".number_format($data['user_posts'])."
\n"; if ($data['user_groups']) { tablebreak(); echo "\n"; echo "\n\n\n\n\n\n\n
".$locale['473']."
\n"; $user_groups = (strpos($data['user_groups'], ".") == 0 ? explode(".", substr($data['user_groups'], 1)) : explode(".", $data['user_groups'])); for ($i = 0;$i < count($user_groups);$i++) { echo getgroupname($user_groups[$i]); if ($i != (count($user_groups)-1)) echo ", "; } echo "
\n"; } closetable(); } elseif ($step == "edit") { if (isset($_POST['savechanges'])) { require_once "updateuser.php"; if ($error == "") { opentable($locale['430']); echo "

".$locale['431']."

".$locale['432']."

".$locale['433']."

\n"; closetable(); } else { opentable($locale['430']); echo "

".$locale['434']."

$error
".$locale['432']."

".$locale['433']."

\n"; closetable(); } } else { $result = dbquery("SELECT * FROM ".$db_prefix."users WHERE user_id='$user_id'"); if (dbrows($result)) { $data = dbarray($result); } else { fallback(FUSION_SELF.$aidlink); } if ($data['user_birthdate']!="0000-00-00") { $user_birthdate = explode("-", $data['user_birthdate']); $user_month = number_format($user_birthdate['1']); $user_day = number_format($user_birthdate['2']); $user_year = $user_birthdate['0']; } else { $user_month = 0; $user_day = 0; $user_year = 0; } $theme_files = makefilelist(THEMES, ".|..", true, "folders"); array_unshift($theme_files, "Default"); $offset_list = ""; for ($i=-13;$i<17;$i++) { if ($i > 0) { $offset = "+".$i; } else { $offset = $i; } $offset_list .= "$offset\n"; } opentable($locale['430']); echo "
\n"; if (!$data['user_avatar']) { echo "\n"; } echo "
".$locale['u001']."
".$locale['u003']."
".$locale['u004']."
".$locale['u005']."
".$locale['u006']." ".$locale['u007']." ".$locale['u008']."
".$locale['u009']."
".$locale['u010']." (mm/dd/yyyy)
".$locale['u021']."
".$locale['u011']."
".$locale['u012']."
".$locale['u013']."
".$locale['u014']."
".$locale['u015']."
".$locale['u016']."
".$locale['u017']."
".$locale['u018']."
".sprintf($locale['u022'], parsebytesize(30720), 100, 100)."
".$locale['u020']."

\n"; if ($data['user_avatar']) { echo $locale['u017']."
\n".$locale[
".$locale['u019']."

\n"; } echo "
\n"; closetable(); } } else { opentable($locale['400']); if ($step == "ban") { if ($act == "on") { if ($user_id != 1) { $result = dbquery("UPDATE ".$db_prefix."users SET user_status='1' WHERE user_id='$user_id'"); echo "
".$locale['420']."

\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 "\n"; while ($data = dbarray($result)) { $cell_color = ($i % 2 == 0 ? "tbl1" : "tbl2"); echo "\n\n\n"; $i++; } echo "
".$locale['401']." [".$locale['402']."] ".$locale['403']." ".$locale['404']."
".$data['user_name']." ".getuserlevel($data['user_level'])." "; if (iUSER >= $data['user_level'] && $data['user_id'] != 1) { echo "".$locale['406']."\n"; if ($data['user_status'] == "2") { echo "- ".$locale['412']."\n"; } elseif ($data['user_status'] == "1") { echo "- ".$locale['407']."\n"; } else { echo "- ".$locale['408']."\n"; } echo "- ".$locale['409'].""; } echo "
\n"; } else { echo "

\n".$locale['410']."$sortby

\n
\n"; } $search = array( "A","B","C","D","E","F","G","H","I","J","K","L","M","N","O","P","Q","R", "S","T","U","V","W","X","Y","Z","0","1","2","3","4","5","6","7","8","9" ); echo "
\n\n\n"; echo ""; for ($i=0;$i < 36;$i++) { echo ""; echo ($i==17 ? "\n\n\n" : "\n"); } echo "\n
".$locale['411']."".$locale['411']."
\n"; closetable(); if ($rows > 20) echo "
\n".makePageNav($rowstart,20,$rows,3,FUSION_SELF.$aidlink."&sortby=$sortby&")."\n
\n"; echo "\n"; } echo "\n"; require_once BASEDIR."footer.php"; ?>