📄 usercreate.php
字号:
echo " <tr><td class=left_rows height=18 align=left valign=middle><img src='../images/icons/application.png' alt='Status Summary' /> <a class=admin_headings href='statusadmin.php'>Status Summary</a></td></tr>\n";echo " <tr><td class=left_rows height=18 align=left valign=middle><img src='../images/icons/application_add.png' alt='Create Status' /> <a class=admin_headings href='statuscreate.php'>Create Status</a></td></tr>\n";echo " <tr><td class=left_rows height=33></td></tr>\n";echo " <tr><td class=left_rows_headings height=18 valign=middle colspan=2>Miscellaneous</td></tr>\n";echo " <tr><td class=left_rows height=18 align=left valign=middle><img src='../images/icons/clock.png' alt='Add/Edit/Delete Time' /> <a class=admin_headings href='timeadmin.php'>Add/Edit/Delete Time</a></td></tr>\n";echo " <tr><td class=left_rows height=18 align=left valign=middle><img src='../images/icons/application_edit.png' alt='Edit System Settings' /> <a class=admin_headings href='sysedit.php'>Edit System Settings</a></td></tr>\n";echo " <tr><td class=left_rows height=18 align=left valign=middle><img src='../images/icons/database_go.png' alt='Upgrade Database' /> <a class=admin_headings href='dbupgrade.php'>Upgrade Database</a></td></tr>\n";echo " </table></td>\n";echo " <td align=left class=right_main scope=col>\n";echo " <table width=100% height=100% border=0 cellpadding=10 cellspacing=1>\n";echo " <tr class=right_main_text>\n";echo " <td valign=top>\n";echo " <br />\n";// begin post validation //if (empty($post_username)) {echo " <table align=center class=table_border width=60% border=0 cellpadding=0 cellspacing=3>\n";echo " <tr>\n";echo " <td class=table_rows width=20 align=center><img src='../images/icons/cancel.png' /></td><td class=table_rows_red> A Username is required.</td></tr>\n";echo " </table>\n";}elseif (empty($display_name)) {echo " <table align=center class=table_border width=60% border=0 cellpadding=0 cellspacing=3>\n";echo " <tr>\n";echo " <td class=table_rows width=20 align=center><img src='../images/icons/cancel.png' /></td><td class=table_rows_red> A Display Name is required.</td></tr>\n";echo " </table>\n";}elseif (!empty($string)) {echo " <table align=center class=table_border width=60% border=0 cellpadding=0 cellspacing=3>\n";echo " <tr>\n";echo " <td class=table_rows width=20 align=center><img src='../images/icons/cancel.png' /></td><td class=table_rows_red> Double Quotes are not allowed when creating an Username.</td></tr>\n";echo " </table>\n";}elseif (!empty($string2)) {echo " <table align=center class=table_border width=60% border=0 cellpadding=0 cellspacing=3>\n";echo " <tr>\n";echo " <td class=table_rows width=20 align=center><img src='../images/icons/cancel.png' /></td><td class=table_rows_red> Double Quotes are not allowed when creating an Display Name.</td></tr>\n";echo " </table>\n";}elseif (empty($email_addy)) {echo " <table align=center class=table_border width=60% border=0 cellpadding=0 cellspacing=3>\n";echo " <tr>\n";echo " <td class=table_rows width=20 align=center><img src='../images/icons/cancel.png' /></td><td class=table_rows_red> An Email Address is required.</td></tr>\n";echo " </table>\n";}elseif (empty($office_name)) {echo " <table align=center class=table_border width=60% border=0 cellpadding=0 cellspacing=3>\n";echo " <tr>\n";echo " <td class=table_rows width=20 align=center><img src='../images/icons/cancel.png' /></td><td class=table_rows_red> An Office is required.</td></tr>\n";echo " </table>\n";}elseif (empty($group_name)) {echo " <table align=center class=table_border width=60% border=0 cellpadding=0 cellspacing=3>\n";echo " <tr>\n";echo " <td class=table_rows width=20 align=center><img src='../images/icons/cancel.png' /></td><td class=table_rows_red> A Group is required.</td></tr>\n";echo " </table>\n";}elseif (@$tmp_username == $post_username) {echo " <table align=center class=table_border width=60% border=0 cellpadding=0 cellspacing=3>\n";echo " <tr>\n";echo " <td class=table_rows width=20 align=center><img src='../images/icons/cancel.png' /></td><td class=table_rows_red> User already exists. Create another username.</td></tr>\n";echo " </table>\n";}elseif (!eregi ("^([[:alnum:]]| |-|'|,)+$", $post_username)) {echo " <table align=center class=table_border width=60% border=0 cellpadding=0 cellspacing=3>\n";echo " <tr>\n";echo " <td class=table_rows width=20 align=center><img src='../images/icons/cancel.png' /></td><td class=table_rows_red> Alphanumeric characters, hyphens, apostrophes, commas, and spaces are allowed when creating a Username.</td></tr>\n";echo " </table>\n";}elseif (!eregi ("^([[:alnum:]]| |-|'|,)+$", $display_name)) {echo " <table align=center class=table_border width=60% border=0 cellpadding=0 cellspacing=3>\n";echo " <tr>\n";echo " <td class=table_rows width=20 align=center><img src='../images/icons/cancel.png' /></td><td class=table_rows_red> Alphanumeric characters, hyphens, apostrophes, commas, and spaces are allowed when creating a Display Name.</td></tr>\n";echo " </table>\n";}//elseif (!eregi ("^([[:alnum:]]|~|\!|@|#|\$|%|\^|&|\*|\(|\)|-|\+|`|_|\=|\{|\}|\[|\]|\||\:|\<|\>|\.|,|\?)+$", $password)) {elseif (!eregi ("^([[:alnum:]]|~|\!|@|#|\$|%|\^|&|\*|\(|\)|-|\+|`|_|\=|[{]|[}]|\[|\]|\||\:|\<|\>|\.|,|\?)+$", $password)) {echo " <table align=center class=table_border width=60% border=0 cellpadding=0 cellspacing=3>\n";echo " <tr>\n";echo " <td class=table_rows width=20 align=center><img src='../images/icons/cancel.png' /></td><td class=table_rows_red> Single and double quotes, backward and forward slashes, semicolons, and spaces are not allowed when creating a Password.</td></tr>\n";echo " </table>\n";}elseif ($password != $confirm_password) {echo " <table align=center class=table_border width=60% border=0 cellpadding=0 cellspacing=3>\n";echo " <tr>\n";echo " <td class=table_rows width=20 align=center><img src='../images/icons/cancel.png' /></td><td class=table_rows_red> Passwords do not match.</td></tr>\n";echo " </table>\n";}elseif (!eregi ("^([[:alnum:]]|_|\.|-)+@([[:alnum:]]|\.|-)+(\.)([a-z]{2,4})$", $email_addy)) {echo " <table align=center class=table_border width=60% border=0 cellpadding=0 cellspacing=3>\n";echo " <tr>\n";echo " <td class=table_rows width=20 align=center><img src='../images/icons/cancel.png' /></td><td class=table_rows_red> Alphanumeric characters, underscores, periods, and hyphens are allowed when creating an Email Address.</td></tr>\n";echo " </table>\n";}elseif (($admin_perms != '1') && (!empty($admin_perms))) {echo " <table align=center class=table_border width=60% border=0 cellpadding=0 cellspacing=3>\n";echo " <tr>\n";echo " <td class=table_rows width=20 align=center><img src='../images/icons/cancel.png' /></td><td class=table_rows_red> Choose \"yes\" or \"no\" for Sys Admin Perms.</td></tr>\n";echo " </table>\n";}elseif (($reports_perms != '1') && (!empty($reports_perms))) {echo " <table align=center class=table_border width=60% border=0 cellpadding=0 cellspacing=3>\n";echo " <tr>\n";echo " <td class=table_rows width=20 align=center><img src='../images/icons/cancel.png' /></td><td class=table_rows_red> Choose \"yes\" or \"no\" for Reports Perms.</td></tr>\n";echo " </table>\n";}elseif (($time_admin_perms != '1') && (!empty($time_admin_perms))) {echo " <table align=center class=table_border width=60% border=0 cellpadding=0 cellspacing=3>\n";echo " <tr>\n";echo " <td class=table_rows width=20 align=center><img src='../images/icons/cancel.png' /></td><td class=table_rows_red> Choose \"yes\" or \"no\" for Time Admin Perms.</td></tr>\n";echo " </table>\n";}elseif (($post_disabled != '1') && (!empty($post_disabled))) {echo " <table align=center class=table_border width=60% border=0 cellpadding=0 cellspacing=3>\n";echo " <tr>\n";echo " <td class=table_rows width=20 align=center><img src='../images/icons/cancel.png' /></td><td class=table_rows_red> Choose \"yes\" or \"no\" for User Account Disabled.</td></tr>\n";echo " </table>\n";}if (!empty($office_name)) {$query = "select * from ".$db_prefix."offices where officename = '".$office_name."'";$result = mysql_query($query);while ($row=mysql_fetch_array($result)) {$tmp_officename = "".$row['officename']."";}mysql_free_result($result);if (!isset($tmp_officename)) {echo "Office is not defined.\n"; exit;}}if (!empty($group_name)) {$query = "select * from ".$db_prefix."groups where groupname = '".$group_name."'";$result = mysql_query($query);while ($row=mysql_fetch_array($result)) {$tmp_groupname = "".$row['groupname']."";}mysql_free_result($result);if (!isset($tmp_officename)) {echo "Group is not defined.\n"; exit;}}// end post validation //if (!empty($string)) {$post_username = stripslashes($post_username);}if (!empty($string2)) {$display_name = stripslashes($display_name);}$password = crypt($password, 'xy');$confirm_password = crypt($confirm_password, 'xy');echo " <br />\n";echo " <form name='form' action='$self' method='post'>\n";echo " <table align=center class=table_border width=60% border=0 cellpadding=3 cellspacing=0>\n";echo " <tr>\n";echo " <th class=rightside_heading nowrap halign=left colspan=3><img src='../images/icons/user_add.png' /> Create User </th></tr>\n";echo " <tr><td height=15></td></tr>\n";echo " <tr><td class=table_rows height=25 width=20% style='padding-left:32px;' nowrap>Username:</td><td colspan=2 width=80% style='color:red;font-family:Tahoma;font-size:11px;padding-left:20px;'> <input type='text' size='25' maxlength='50' name='post_username' value=\"$post_username\"> *</td></tr>\n";echo " <tr><td class=table_rows height=25 width=20% style='padding-left:32px;' nowrap>Display Name:</td><td colspan=2 width=80% style='color:red;font-family:Tahoma;font-size:11px;padding-left:20px;'> <input type='text' size='25' maxlength='50' name='display_name' value=\"$display_name\"> *</td></tr>\n";if (!empty($string)) {$post_username = addslashes($post_username);}if (!empty($string2)) {$displayname = addslashes($display_name);}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -