📄 index.php
字号:
<?
include_once 'inc/auth.php';
echo '
<html>
<head>
<title>编辑个人资料</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
';
echo '<s';
echo 'cript 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)';
echo '
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.createElem';
echo 'ent("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);
';
echo '
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.';
echo '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";';
echo '
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 bord';
echo 'er="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">';
echo '<s';
echo 'pan 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'];
}
echo ' <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> 个人信息</b></td>
</tr>
<tr>
<td nowrap class="TableData"> 姓名:</td>
<td class="TableData">
<input type="te';
echo 'xt" name="USER_NAME" size="10" maxlength="10" class="BigStatic" value="';
echo $USER_NAME;
echo '" readonly>
</td>
</tr>
<tr>
<td nowrap class="TableData"> 性别:</td>
<td class="TableData">
';
echo '<s';
echo 'elect name="SEX" class="BigSelect">
<option value="0" ';
if (($SEX == '0'))
{
echo 'selected';
}
echo '>男</option>
<option value="1" ';
if (($SEX == '1'))
{
echo 'selected';
}
echo '>女</option>
</select>
</td>
</tr>
<tr>
<td nowrap class="TableData">生日:</td>
<td class="TableData">
<!-------------- 年 ------------>
';
echo '<s';
echo 'elect name="BIR_YEAR" class="BigSelect" onchange="CheckDate();">
';
for ($I = 1900; ($I <= 2010); ++$I)
{
echo ' <option value="';
echo $I;
echo '" ';
if (($I == $BIR_YEAR))
{
echo 'selected';
}
echo '>';
echo $I;
echo '</option>
';
}
echo ' </select>年
<!-------------- 月 ------------>
';
echo '<s';
echo 'elect name="BIR_MON" class="BigSelect" onchange="CheckDate();">
';
for ($I = 1; ($I <= 12); ++$I)
{
if (($I < 10))
{
$I = ('0'.$I);
}
echo ' <option value="';
echo $I;
echo '" ';
if (($I == $BIR_MON))
{
echo 'selected';
}
echo '>';
echo $I;
echo '</option>
';
}
echo ' </select>月
<!-------------- 日 ------------>
';
echo '<s';
echo 'elect name="BIR_DAY" class="BigSelect">
';
for ($I = 1; ($I <= 31); ++$I)
{
if (($I < 10))
{
$I = ('0'.$I);
}
echo ' <option value="';
echo $I;
echo '" ';
if (($I == $BIR_DAY))
{
echo 'selected';
}
echo '>';
echo $I;
echo '</option>
';
}
echo ' </select>日
</td>
</tr>
<tr>
<td nowrap class="TableHeader" colspan="2"><b> 联系方式(单位)</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="';
echo $TEL_NO_DEPT;
echo '">
</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="';
echo $FAX_NO_DEPT;
echo '">
</td>
</tr>
<tr>
<td nowrap class="TableHeader" colspan="2"><b> 联系方式(家庭)</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="';
echo $ADD_HOME;
echo '">
</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="';
echo $POST_NO_HOME;
echo '">
</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="';
echo $TEL_NO_HOME;
echo '">
</td>
</tr>
<tr>
<td nowrap class="TableData"> 手机:</td>
<td class="TableData">
<input type="text" name="MOBIL_NO" size="23" maxlength="23" class="BigInput" value="';
echo $MOBIL_NO;
echo '">
<input type="checkbox" name="MOBIL_NO_HIDDEN" id="MOBIL_NO_HIDDEN" ';
if (($MOBIL_NO_HIDDEN == '1'))
{
echo 'checked';
}
echo '><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="';
echo $BP_NO;
echo '">
</td>
</tr>
<tr>
<td nowrap class="TableData"> 电子邮件:</td>
<td class="TableData">
<input type="text" name="EMAIL" size="25" maxlength="50" class="BigInput" value="';
echo $EMAIL;
echo '">
</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="';
echo $OICQ_NO;
echo '">
</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="';
echo $ICQ_NO;
echo '">
</td>
</tr>
<tr>
<td nowrap class="TableData"> MSN:</td>
<td class="TableData">
<input type="text" name="MSN" size="25" maxlength="50" class="BigInput" value="';
echo $MSN;
echo '">
</td>
</tr>
<tr align="center" class="TableControl">
<td colspan="2" nowrap>
<input type="submit" value="保存修改" class="BigButton">
<input type="button" value="返回" class="BigButton" onclick="location=\'../\'">
</td>
</tr>
</table>
</form>
</body>
</html>';
?>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -