<!--#include file=conn.asp-->
<!--#include file=cookies.asp-->
<!--#include file=../inc/ipt.asp-->
<%
dim email,name,idcard,dianhua,qq,dizhi
if request("cnmai")="edit" then
id=trim(request("id"))
if not isnumeric(id) or id="" then
response.write "<li>参数错误！"
response.end
end if
name=trim(request("name"))
email=trim(request("email"))
idcard=trim(request("idcard"))
dianhua=trim(request("dianhua"))
qq=trim(request("qq"))
dizhi=trim(request("dizhi"))

set rs=server.createobject("adodb.recordset")
sql="select * from [jle_user] where id="&id
rs.open sql,conn,1,3
rs("name")=name
rs("email")=email
rs("idcard")=idcard
rs("dianhua")=dianhua
rs("qq")=qq
rs("dizhi")=dizhi
rs.update
rs.close
set rs=nothing
closedb
response.write "修改成功！！"
call cl()
%>
<%sub cl()%>
<body onLoad="setTimeout(window.close, 2000)">
<%end sub%>
<%else%>
<%
dim rs,sql,id
id=trim(request("id"))
if not isnumeric(id) or id="" then
response.write "<li>参数错误！"
response.end
end if
set rs = Server.CreateObject("ADODB.RecordSet")
sql="select * from [jle_user] where id="&cstr(id) 
rs.open sql,conn,1,1
%>
<SCRIPT language=javascript>
<!--
function CheckForm()
{
if(document.thisForm.username.value.length<1)
	{
	    alert("参数错误!");
	    return false;
	}
if(document.thisForm.email.value.length<1)
	{
	    alert("参数错误!");
	    return false;
	}
if(document.thisForm.name.value.length<1)
	{
	    alert("真实姓名没有填写!");
	    return false;
	}
if(document.thisForm.idcard.value.length<1)
	{
	    alert("身份证号码没有填写!");
	    return false;
	}
if(document.thisForm.dianhua.value.length<1)
	{
	    alert("联系电话没有填写!");
	    return false;
	}
if(document.thisForm.dizhi.value.length<1)
	{
	    alert("通信地址没有填写!");
	    return false;
	}
}

//-->
</SCRIPT>
<meta http-equiv="Content-Language" content="zh-cn">
<title>修改资料</title>
<link href="inc_style.css" rel="stylesheet" type="text/css">
<body topmargin="0" leftmargin="0">
<div align="center">
<form method="POST" name="thisForm" action="user_editzj.asp?cnmai=edit&id=<%=id%>">
<tr> 
<td width="456" bgcolor="#EEEEEE">
<table width="454" border="0" cellspacing="0" cellpadding="0" height="283" style="border: 3px double #CCCCCC">
<tr>
<td height="22" bgcolor="#FEEEBC" width="454" colspan="4">
<p align="center"><b>修改用户资料</b></td>
</tr>
<tr>
<td height="30" width="194" colspan="2" align="right">
登陆帐号：</td>
<td height="30" width="260" colspan="2"> &nbsp;<b><%=rs("username")%></b>
　</td>
</tr>
<tr>
<td height="30" width="194" colspan="2">
<p align="right">真实姓名：</td>
<td height="30" width="260" colspan="2">
&nbsp;<input type="text" maxlength="12" name="name" size="24" value="<%=rs("name")%>"></td>
</tr>
<tr> 
<td height="30" width="194" colspan="2">
<p align="right">邮件地址：</td>
<td height="30" width="260" colspan="2">
&nbsp;<input type="text" maxlength="50" name="email" size="24" value="<%=rs("email")%>"></td>
</tr>
<tr> 
<td height="30" width="194" colspan="2">
<p align="right">&nbsp; 身份证：</td>
<td height="30" width="260" colspan="2">
&nbsp;<input type="text" maxlength="20" name="idcard" size="24" value="<%=rs("idcard")%>" ></td>
</tr>
<tr> 
<td height="30" width="194" colspan="2" align="right">
联系电话：</td>
<td height="30" width="260" colspan="2">
&nbsp;<input type="text" maxlength="30" name="dianhua" size="24" value="<%=rs("dianhua")%>" ></td>
</tr>
<tr> 
<td height="30" width="194" colspan="2" align="right">
QQ：</td>
<td height="30" width="260" colspan="2">
&nbsp;<input type="text" maxlength="10" name="qq" size="24" value="<%=rs("qq")%>" >
</td>
</tr>
<tr> 
<td height="30" width="194" colspan="2" align="right">
通信地址：</td>
<td height="30" width="260" colspan="2">
&nbsp;<input type="text" maxlength="50" name="dizhi" size="37" value="<%=rs("dizhi")%>" ></td>
</tr>
<tr> 
<td height="45" width="64">
<p align="center">　</td>
<td height="45" width="324" colspan="2">
<p align="right">
　</td>
<td height="45" width="303">
<p align="left">
<input type="submit" onclick="javascript:return CheckForm();" value="提交修改" name="B3"></td>
</tr>
                                        
</table></form>
</div>
<%
rs.close
set rs=nothing
closedb
end if
%>