⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 officecreate.php

📁 网页打卡钟系统,源码提供给大家学习一下啦!希望给大家带来帮助
💻 PHP
📖 第 1 页 / 共 3 页
字号:
$string2 = strstr($post_officename, "\"");if ((@$tmp_officename == $post_officename) || (empty($post_officename)) || (!eregi ("^([[:alnum:]]| |-|_|\.)+$", $post_officename)) || ((!eregi ("^([0-9])$", @$how_many)) && (isset($how_many))) || (@$how_many == '0') || (($create_groups != '1') && (!empty($create_groups))) ||(!empty($string)) || (!empty($string2))) {if (empty($post_officename)) {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 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>                    Apostrohpes are not allowed when creating an Office Name.</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 Office Name.</td></tr>\n";echo "            </table>\n";}elseif (@$tmp_officename == $post_officename) {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>                    Office already exists. Create another office.</td></tr>\n";echo "            </table>\n";}elseif (!eregi ("^([[:alnum:]]| |-|_|\.)+$", $post_officename)) {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, underscores, spaces, and periods are allowed when creating an Office Name.</td></tr>\n";echo "            </table>\n";}elseif (($create_groups == '1') && (empty($how_many))) {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>                    Please input the number of groups you wish to create within this new office.</td></tr>\n";echo "            </table>\n";}elseif (($create_groups == '1') && ($how_many == '0')) {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>                    You have chosen to create groups within this new office. Please input a number other than '0' for 'How Many?'.</td></tr>\n";echo "            </table>\n";}elseif (!eregi ("^([0-9])$", $how_many)) {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>                    Only numeric characters are allowed for an office count.</td></tr>\n";echo "            </table>\n";}elseif (($create_groups != '1') && (!empty($create_groups))) {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\" to the <i>Create Groups Within This Office</i> question.</td></tr>\n";echo "            </table>\n";}echo "            <br />\n";if (!empty($string)) {$post_officename = stripslashes($post_officename);}if (!empty($string2)) {$post_officename = stripslashes($post_officename);}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/brick_add.png' />&nbsp;&nbsp;&nbsp;Create Office                </th>\n";echo "              </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>Office Name:</td><td colspan=2 width=80%                      style='color:red;font-family:Tahoma;font-size:10px;padding-left:20px;'>                      <input type='text' size='25' maxlength='50' name='post_officename' value=\"$post_officename\">&nbsp;*</td></tr>\n";if (!empty($string)) {$post_officename = addslashes($post_officename);}if (!empty($string2)) {$post_officename = addslashes($post_officename);}echo "              <tr><td class=table_rows height=25 width=20% style='padding-left:32px;' nowrap>Create Groups Within This Office?</td>\n";if ($create_groups == '1') {echo "                  <td class=table_rows align=left width=80% style='padding-left:20px;'><input type='radio' name='create_groups' value='1' checked                      onFocus=\"javascript:form.how_many.disabled=false;form.how_many.style.background='#ffffff';\">Yes                      <input type='radio' name='create_groups' value='0'                      onFocus=\"javascript:form.how_many.disabled=true;form.how_many.style.background='#eeeeee';\">No</td></tr>\n";} else {echo "                  <td class=table_rows align=left width=80% style='padding-left:20px;'><input type='radio' name='create_groups' value='1'                       onFocus=\"javascript:form.how_many.disabled=false;form.how_many.style.background='#ffffff';\">Yes                      <input checked type='radio' name='create_groups' value='0'                      onFocus=\"javascript:form.how_many.disabled=true;form.how_many.style.background='#eeeeee';\">No</td></tr>\n";}echo "              <tr><td class=table_rows height=25 width=20% style='padding-left:32px;' nowrap>How Many?</td><td colspan=2 width=80%                       style='padding-left:20px;'>\n";if ($create_groups == '1') {echo "                      <input type='text' size='2' maxlength='1' name='how_many' value='$how_many'></td></tr>\n";} else {echo "                      <input disabled type='text' size='2' maxlength='1' name='how_many' style='background:#eeeeee;' value='$how_many'></td></tr>\n";}echo "              <tr><td class=table_rows align=right colspan=3 style='color:red;font-family:Tahoma;font-size:10px;'>*&nbsp;required&nbsp;</td></tr>\n";echo "            </table>\n";echo "            <table align=center width=60% border=0 cellpadding=0 cellspacing=3>\n";echo "              <tr><td height=40>&nbsp;</td></tr>\n";echo "              <tr><td width=30><input type='image' name='submit' value='Create Office' align='middle'                       src='../images/buttons/next_button.png'></td><td><a href='officeadmin.php'><img src='../images/buttons/cancel_button.png'                       border='0'></td></tr></table></form></td></tr>\n";include '../footer.php'; exit;}// end post validation //if (isset($input_group_name)) {for ($x=0;$x<$how_many;$x++) {$z = $x+1;// begin post validation // if (empty($input_group_name[$z])) {$empty_groupname = '1';}if (!eregi ("^([[:alnum:]]| |-|_|\.)+$", $input_group_name[$z])) {$evil_groupname = '1';}}@$groupname_array_cnt = count($input_group_name);@$unique_groupname_array = array_unique($input_group_name);@$unique_groupname_array_cnt = count($unique_groupname_array);if ((@$empty_groupname != '1') && (@$evil_groupname != '1') && (@$groupname_array_cnt == @$unique_groupname_array_cnt)) {$query = "insert into ".$db_prefix."offices (officename) values ('".$post_officename."')";$result = mysql_query($query);$query2 = "select * from ".$db_prefix."offices where officename = '".$post_officename."'";$result2 = mysql_query($query2);while ($row=mysql_fetch_array($result2)) {  $tmp_officeid = "".$row['officeid']."";}mysql_free_result($result2);for ($x=0;$x<$how_many;$x++) {$y = $x+1;$query3 = "insert into ".$db_prefix."groups (groupname, officeid) values ('".$input_group_name[$y]."', '".$tmp_officeid."')";$result3 = mysql_query($query3);}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/accept.png' /></td><td class=table_rows_green>                  &nbsp;Office created successfully.</td></tr>\n";echo "            </table>\n";echo "            <br />\n";

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -