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

📄 index.php

📁 极限网络智能办公系统 Office Automation V3.0官方100%源代码.
💻 PHP
字号:
<?
include_once("inc/auth.php");
?>

<html>
<head>
<title>编辑个人资料</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">

<script Language="JavaScript">
function CheckForm()
{
   if(document.form1.USER_NAME.value=="")
   { alert("姓名不能为空!");
     return (false);
   }
   return (true);
}

function CheckDate(op)
{
   mon=document.form1.BIR_MON.value;
   year=document.form1.BIR_YEAR.value;

   if(mon=="04" || mon=="06" || mon=="09" || mon=="11")
   {
     if(document.form1.BIR_DAY.options.length>30)
         document.form1.BIR_DAY.remove(30);
     else if(document.form1.BIR_DAY.options.length<30)
     {
       if(document.form1.BIR_DAY.options.length==28)
       {
         var my_option = document.createElement("OPTION");
         my_option.text="29";
         my_option.value="29";
         document.form1.BIR_DAY.add(my_option);
       }

       var my_option = document.createElement("OPTION");
       my_option.text="30";
       my_option.value="30";
       document.form1.BIR_DAY.add(my_option);
     }
   }

   else if(mon=="02")
   {
     document.form1.BIR_DAY.remove(30);
     document.form1.BIR_DAY.remove(29);

     if(document.form1.BIR_DAY.options.length>28)
     if (!(year%400==0 || (year%4==0 && year%100!=0)))
       document.form1.BIR_DAY.remove(28);

     if(document.form1.BIR_DAY.options.length<29)
     if ((year%400==0 || (year%4==0 && year%100!=0)))
     {
       var my_option = document.createElement("OPTION");
       my_option.text="29";
       my_option.value="29";
       document.form1.BIR_DAY.add(my_option);
     }
   }
   else
   {
     if(document.form1.BIR_DAY.options.length<31)
     {
       if(document.form1.BIR_DAY.options.length==28)
       {
         var my_option = document.createElement("OPTION");
         my_option.text="29";
         my_option.value="29";
         document.form1.BIR_DAY.add(my_option);
       }

       if(document.form1.BIR_DAY.options.length==29)
       {
         var my_option = document.createElement("OPTION");
         my_option.text="30";
         my_option.value="30";
         document.form1.BIR_DAY.add(my_option);
       }

       var my_option = document.createElement("OPTION");
       my_option.text="31";
       my_option.value="31";
       document.form1.BIR_DAY.add(my_option);
     }
   }
   
   if(op==1)
      document.form1.USER_NAME.focus();
}

</script>
</head>

<body class="bodycolor" topmargin="5" onload="CheckDate(1);">

<table border="0" width="90%" cellspacing="0" cellpadding="3" class="small">
  <tr>
    <td class="Big"><img src="/images/node_user.gif" WIDTH="16" HEIGHT="16" align="absmiddle"><span class="big3"> 个人资料</span><br>
    </td>
  </tr>
</table>

<?

 //============================ 个人资料 =======================================
 $query = "SELECT * from USER where USER_ID='$LOGIN_USER_ID'";
 $cursor= exequery($connection,$query);

 if($ROW=mysql_fetch_array($cursor))
 {
    $USER_NAME=$ROW["USER_NAME"];
    $SEX=$ROW["SEX"];
    $BIRTHDAY=$ROW["BIRTHDAY"];
    $STR=strtok($BIRTHDAY,"-");
    $BIR_YEAR=$STR;
    $STR=strtok("-");
    $BIR_MON=$STR;
    $STR=strtok(" ");
    $BIR_DAY=$STR;

    $TEL_NO_DEPT=$ROW["TEL_NO_DEPT"];
    $FAX_NO_DEPT=$ROW["FAX_NO_DEPT"];

    $ADD_HOME=$ROW["ADD_HOME"];
    $POST_NO_HOME=$ROW["POST_NO_HOME"];
    $TEL_NO_HOME=$ROW["TEL_NO_HOME"];

    $MOBIL_NO=$ROW["MOBIL_NO"];
    $BP_NO=$ROW["BP_NO"];
    $EMAIL=$ROW["EMAIL"];
    $OICQ_NO=$ROW["OICQ_NO"];
    $ICQ_NO=$ROW["ICQ_NO"];
    $MSN=$ROW["MSN"];
    $MOBIL_NO_HIDDEN=$ROW["MOBIL_NO_HIDDEN"];

 }
?>
 <table border="0" width="450" cellpadding="2" cellspacing="1" align="center" bgcolor="#000000" class="small">
  <form action="update.php"  method="post" name="form1" onsubmit="return CheckForm();">
    <tr>
      <td nowrap class="TableHeader" colspan="2"><b>&nbsp;个人信息</b></td>
    </tr>

    <tr>
      <td nowrap class="TableData"> 姓名:</td>
      <td class="TableData">
        <input type="text" name="USER_NAME" size="10" maxlength="10" class="BigStatic" value="<?=$USER_NAME?>" readonly>
      </td>
    </tr>
    <tr>
      <td nowrap class="TableData"> 性别:</td>
      <td class="TableData">
        <select name="SEX" class="BigSelect">
          <option value="0" <? if($SEX=="0") echo "selected";?>>男</option>
          <option value="1" <? if($SEX=="1") echo "selected";?>>女</option>
        </select>
      </td>
    </tr>
    <tr>
      <td nowrap class="TableData">生日:</td>
      <td class="TableData">

<!-------------- 年 ------------>
        <select name="BIR_YEAR" class="BigSelect" onchange="CheckDate();">
<?
        for($I=1900;$I<=2010;$I++)
        {
?>
          <option value="<?=$I?>" <? if($I==$BIR_YEAR) echo "selected";?>><?=$I?></option>
<?
        }
?>
        </select>年

<!-------------- 月 ------------>
        <select name="BIR_MON" class="BigSelect" onchange="CheckDate();">
<?
        for($I=1;$I<=12;$I++)
        {
          if($I<10)
             $I="0".$I;
?>
          <option value="<?=$I?>" <? if($I==$BIR_MON) echo "selected";?>><?=$I?></option>
<?
        }
?>
        </select>月

<!-------------- 日 ------------>
        <select name="BIR_DAY" class="BigSelect">
<?
        for($I=1;$I<=31;$I++)
        {
          if($I<10)
             $I="0".$I;
?>
          <option value="<?=$I?>" <? if($I==$BIR_DAY) echo "selected";?>><?=$I?></option>
<?
        }
?>
        </select>日
      </td>
    </tr>
    <tr>
      <td nowrap class="TableHeader" colspan="2"><b>&nbsp;联系方式(单位)</b></td>
    </tr>
    <tr>
      <td nowrap class="TableData"> 单位电话:</td>
      <td class="TableData">
        <input type="text" name="TEL_NO_DEPT" size="25" maxlength="25" class="BigInput" value="<?=$TEL_NO_DEPT?>">
      </td>
    </tr>

    <tr>
      <td nowrap class="TableData"> 单位传真:</td>
      <td class="TableData">
        <input type="text" name="FAX_NO_DEPT" size="25" maxlength="25" class="BigInput" value="<?=$FAX_NO_DEPT?>">
      </td>
    </tr>

    <tr>
      <td nowrap class="TableHeader" colspan="2"><b>&nbsp;联系方式(家庭)</b></td>
    </tr>

    <tr>
      <td nowrap class="TableData"> 家庭住址:</td>
      <td class="TableData">
        <input type="text" name="ADD_HOME" size="40" maxlength="100" class="BigInput" value="<?=$ADD_HOME?>">
      </td>
    </tr>

    <tr>
      <td nowrap class="TableData"> 家庭邮编:</td>
      <td class="TableData">
        <input type="text" name="POST_NO_HOME" size="25" maxlength="25" class="BigInput" value="<?=$POST_NO_HOME?>">
      </td>
    </tr>

    <tr>
      <td nowrap class="TableData"> 家庭电话:</td>
      <td class="TableData">
        <input type="text" name="TEL_NO_HOME" size="25" maxlength="25" class="BigInput" value="<?=$TEL_NO_HOME?>">
      </td>
    </tr>

    <tr>
      <td nowrap class="TableData"> 手机:</td>
      <td class="TableData">
        <input type="text" name="MOBIL_NO" size="23" maxlength="23" class="BigInput" value="<?=$MOBIL_NO?>">
        <input type="checkbox" name="MOBIL_NO_HIDDEN" id="MOBIL_NO_HIDDEN" <?if($MOBIL_NO_HIDDEN=="1") echo "checked";?>><label for="MOBIL_NO_HIDDEN">手机号码不公开</label><br>
        填写后可接收OA系统发送的手机短信<br>
        手机号码不公开仍可接收短信<br>
        小灵通请加106及区号,如 106010xxxxxxxx
      </td>
    </tr>

    <tr>
      <td nowrap class="TableData"> 小灵通:</td>
      <td class="TableData">
        <input type="text" name="BP_NO" size="25" maxlength="25" class="BigInput" value="<?=$BP_NO?>">
      </td>
    </tr>

    <tr>
      <td nowrap class="TableData"> 电子邮件:</td>
      <td class="TableData">
        <input type="text" name="EMAIL" size="25" maxlength="50" class="BigInput" value="<?=$EMAIL?>">
      </td>
    </tr>

    <tr>
      <td nowrap class="TableData"> QQ号码:</td>
      <td class="TableData">
        <input type="text" name="OICQ_NO" size="25" maxlength="25" class="BigInput" value="<?=$OICQ_NO?>">
      </td>
    </tr>

    <tr>
      <td nowrap class="TableData"> ICQ号码:</td>
      <td class="TableData">
        <input type="text" name="ICQ_NO" size="25" maxlength="25" class="BigInput" value="<?=$ICQ_NO?>">
      </td>
    </tr>
    <tr>
      <td nowrap class="TableData"> MSN:</td>
      <td class="TableData">
        <input type="text" name="MSN" size="25" maxlength="50" class="BigInput" value="<?=$MSN?>">
      </td>
    </tr>
    <tr align="center" class="TableControl">
      <td colspan="2" nowrap>
        <input type="submit" value="保存修改" class="BigButton">&nbsp;&nbsp;
        <input type="button" value="返回" class="BigButton" onclick="location='../'">
      </td>
    </tr>
  </table>
</form>

</body>
</html>

⌨️ 快捷键说明

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