?? edit_self.php
字號:
<?
require "inc/check.php";
require "inc/func.php";
require "inc/func_s.php";
require "inc/error.php";
?>
<html>
<head>
<script language="JavaScript">
function checkblank()
{
if(form1.login_password.value==""){
alert("密碼不可為空!")
form1.login_password.focus()
return false
}
if(form1.login_password2.value==""){
alert("確認密碼不可為空!")
form1.login_password2.focus()
return false
}
if(form1.login_password.value!=form1.login_password2.value){
alert("確認密碼不一致!")
form1.login_password.focus()
return false
}
if(form1.real_name.value==""){
alert("真實姓名不可為空!")
form1.real_name.focus()
return false
}
}
</script>
<title>"追風"--晨風創意</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<STYLE type=text/css>BODY {
FONT-FAMILY: "宋體"; FONT-SIZE: 12px; scrollbar-face-color: ffffff; scrollbar-shadow-color: C1C1BB; scrollbar-highlight-color: C1C1BB; scrollbar-3dlight-color: EBEBE4; scrollbar-darkshadow-color: EBEBE4; scrollbar-track-color: F4F4F0; scrollbar-arrow-color: CACAB7
}
P {
FONT-FAMILY: "宋體"; FONT-SIZE: 12px
}
INPUT {
FONT-FAMILY: "宋體"; FONT-SIZE: 12px
}
FONT {
FONT-FAMILY: "宋體"; FONT-SIZE: 12px
}
SELECT {
FONT-FAMILY: "宋體"; FONT-SIZE: 12px
}
OPTION {
FONT-FAMILY: "宋體"; FONT-SIZE: 12px
}
TEXTAREA {
FONT-FAMILY: "宋體"; FONT-SIZE: 12px
}
FORM {
FONT-FAMILY: "宋體"; FONT-SIZE: 12px
}
TD {
FONT-FAMILY: "宋體"; FONT-SIZE: 12px; TABLE-LAYOUT: fixed; WORD-BREAK: break-all
}
A:link {
TEXT-DECORATION: none
}
A:visited {
TEXT-DECORATION: none
}
A:hover {
TEXT-DECORATION: underline
}
A:active {
FONT-SIZE: 12px; TEXT-DECORATION: none
}
.border {
BACKGROUND-COLOR: #efefef; BORDER-BOTTOM: 1px dotted; BORDER-COLLAPSE: collapse; BORDER-LEFT: 1px dotted; BORDER-RIGHT: 1px dotted; BORDER-TOP: 1px dotted; COLOR: #000000
}
.shadow1 {
COLOR: #ffffff; FILTER: dropshadow(color=#000000,offx=1,offy=1); FONT-SIZE: 12px
}
.shadow2 {
COLOR: #000000; FILTER: dropshadow(color=#d5d5d5,offx=1,offy=1); FONT-SIZE: 12px
}
.p1 {
COLOR: #ffffff; FONT-SIZE: 12px; TEXT-DECORATION: none
}
.p2 {
COLOR: #000000; FONT-SIZE: 12px; TEXT-DECORATION: none
}
.p3 {
COLOR: #004080; FONT-SIZE: 14px; TEXT-DECORATION: none
}
</STYLE>
<script language="JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
// -->
</script>
<body bgcolor="#FFFFFF">
<?
if($submit1<>""){
$edit_userid=$ses_uid;
if(($user_email<>"")and(!eregi("^[_\.0-9a-z-]+@([0-9a-z][0-9a-z-]+\.)+[a-z]{2,3}$",$user_email))){
show_msg("郵箱錯誤!"); exit;
}
$login_password=md5($login_password);
$sqldo="update users set login_password='$login_password',real_name='$real_name',email='$user_email',user_description='$user_description' where user_id='$edit_userid'";
if($cla->db_update($sqldo))
{
$cla->db_commit();
show_msg("資料修改成功!"); exit;
}
}
?>
<center>
<table width="102%" border="0" height="488">
<tr>
<td width="1000" height="541" valign="top">
<? $edit_userid=$ses_uid;
$sqldo="select user_id,real_name,login_name,login_password,email,right_level,group_id,class_right,operate_right,user_description from users where user_id='$edit_userid'";
$user_edit=$cla->db_query($sqldo);
?>
<form name="form1" method="post" action="?edit_userid=<?echo $uid;?>" onsubmit="return checkblank()">
<table width="100%" border="1" bordercolor="#111111" cellpadding="3" cellspacing="0" class=border>
<tr>
<td colspan="2" bgcolor="#f7f7f7">
<div align="center">
<p> </p>
<b><font size="4">個人資料修改</font></b>
<p> </p>
</div>
</td>
</tr>
<tr bgcolor="#f7f7f7">
<td width="46%">
<div align="right">密 碼:</div>
</td>
<td width="54%">
<input type="password" name="login_password" class="border" size="20">
(*) </td>
</tr>
<tr>
<td width="46%">
<div align="right">確認密碼:</div>
</td>
<td width="54%">
<input type="password" name="login_password2" class="border" size="20">
(*)</td>
</tr>
<tr>
<td width="46%" bgcolor="#f7f7f7" height="39">
<div align="right">真實姓名:</div>
</td>
<td bgcolor="#f7f7f7" height="39" width="54%">
<input type="text" name="real_name" class="border" size="20" value="<?echo trim($user_edit[0]['REAL_NAME']);?>">
(*) </td>
</tr>
<tr>
<td width="46%">
<div align="right">郵 箱:</div>
</td>
<td width="54%">
<input type="text" name="user_email" class="border" size="20" value="<?echo trim($user_edit[0]['EMAIL']);?>">
</td>
</tr>
<?// if($action=="gedit"){?>
<tr>
<td width="46%">
<div align="right">備 注:</div>
</td>
<td width="54%">
<input type="text" name="user_description" class="border" size="60" value="<?echo $user_edit[0]['USER_DESCRIPTION'];?>">
</td>
</tr>
</table>
<p align="center">
<input type="submit" name="submit1" value="確定" >
<input type="reset" name="Submit2" value="重置">
</p>
</form>
</table>
</center>
<div align="center"> <br>
<p> </p>
</div>
<? $cla->db_logoff();
?>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -