<html xmlns="http://www.w3.org/1999/xhtml">
<!--#include file="../Inc/Conn.asp" -->
<!--#include file="../Inc/SK.Session.asp" -->
<!--#include file="../Inc/SK.Funtion.asp" -->
<!--#include file="../Inc/SK.Md5.asp"-->
<%if Not (Session("Manager")="1" OR JudgePopedomTF(Session("UserName"),"SK000000001")) then Call ReturnError1()%>
<%
set rs=server.createobject("adodb.recordset")
sql="SELECT * from SK_SystemUsers where UsersID="&Session("UID")&""
rs.Open sql,conn,1,3
if rs.eof and rs.bof then Call ReturnError4()

If F("Action")="Save" and F("MyPass1")<>"" Then
set rs=server.createobject("adodb.recordset")
sql="select * from SK_SystemUsers where UsersID="&Session("UID")&" and SK_Pass='"&md5(F("OPassword"),16)&"'"
rs.open sql,conn,1,3
if rs.eof then
Response.Write("<script>alert(""对不起,旧密码错误,密码修改失败!"");history.back(-1);</script>")
Response.end
end if
rs("SK_Pass")=md5(F("MyPass1"),16)
rs("SK_Address")=NoCSSHackInput(F("S_Address"))
rs("SK_Hobby")=NoCSSHackInput(F("S_Hobby"))
rs("SK_Photo")=NoCSSHackInput(F("fj1"))
rs("SK_Maxim")=NoCSSHackInput(F("S_Maxim"))
rs("SK_Smtp")=NoCSSHackInput(F("S_Smtp"))
rs("SK_Pop3")=NoCSSHackInput(F("S_Pop3"))
rs("SK_MailName")=NoCSSHackInput(F("S_MailName"))
rs("SK_MailPass")=NoCSSHackInput(F("S_MailPass"))
rs.Update
rs.Close
set rs=Nothing
Call Returnokback()
end if
%>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=GB2312" />
<title>修改个人资料</title>
<META http-equiv=Page-Enter content=SKCRM>
<META http-equiv=Page-Exit content=SKCRM>
<META content="MSHTML 6.00.3790.2858" name=GENERATOR>
<LINK href="../images/style.css" type=text/css rel=stylesheet>
<script language="javascript" src="../Inc/Check.js"></script>
<script language="javascript" src="../Inc/Calendar.js"></script>
<script language="javascript">
<!--  
  if (window == top)top.location.href = "index.asp";
// -->
</script>
<style type="text/css">
<!--
body {
margin: 5px 0px 5px 0px;
overflow-x: hidden;
}
-->
</style>
<script Language="JavaScript">
<!--
function Form1_Validator(theForm)
{
if (document.form1.OPassword.value=="")
{
alert("对不起,旧密码不能为空！");
document.form1.OPassword.focus();
return false;
}

if (document.form1.MyPass1.value=="")
{
alert("请输入新密码！");
document.form1.MyPass1.focus();
return false;
}
if (document.form1.MyPass1.value!=document.form1.MyPass2.value)
{
alert("两次新密码输入不一致！");
return false;
}

 return (true);
}
function showUploadDialog(s_Type, s_Link, s_Thumbnail){
var arr = showModalDialog("<%=getconfig("SK_EditorPath")%>/dialog/i_upload.htm?style=mini&type="+s_Type+"&link="+s_Link+"&thumbnail="+s_Thumbnail, window, "dialogWidth:0px;dialogHeight:0px;help:no;scroll:no;status:no");
}
//-->
</script>
</head>
<body>
<table width="99%" border="0" align="center" cellpadding="0" cellspacing="0">
<TBODY>
<tr>
<td class="SK_Td_Top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="12" height="25"><img src="../images/tab_03.gif" width="12" height="25" /></td>
<td><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="46%" valign="middle">修改个人资料</td>
<td width="54%"></td>
</tr>
</table></td>
<td width="16"><img src="../images/tab_07.gif" width="16" height="25" /></td>
</tr>
</table></td>
</tr>
<tr>
<td>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="8" background="../images/tab_12.gif"></td>
<td>

<form name="thisForm" id="form1" method="post" action="?Action=Save" onSubmit="return Form1_Validator(this)"> 
<table width="100%" border="0" cellpadding="0" cellspacing="1" bgcolor="b5d6e6">

<tr>
<td width="14%" class="SK_Text2">旧密码</td>
<td width="33%" class="SK_Text1"><input type="password" class="input" name="OPassword"> <font color=red>*</font></td>
<td width="11%" rowspan="5" class="SK_Text">照片上传(W100px*H100px)</td>
<td width="42%" rowspan="4" class="SK_Text"><%if Rs("SK_Photo")<>"" then%><img src="../UpFiles/<%=Rs("SK_Photo")%>" width="100"><%else%><img src="../images/nopic.jpg" width="100" title="没有上传照片"><%end if%></td>
</tr>

<tr>
<td width="14%" class="SK_Text2">新密码</td>
<td width="33%" class="SK_Text1"><input type="password" class="input" name="MyPass1"> <font color=red>*</font></td>
</tr>

<tr>
<td width="14%" class="SK_Text2">确认密码</td>
<td width="33%" class="SK_Text1"><input type="password" class="input" name="MyPass2"> <font color=red>*</font></td>
</tr>
<tr>
  <td class="SK_Text2">现居地址</td>
  <td class="SK_Text1"><input name="S_Address" type="text" size="35" value="<%=Rs("SK_Address")%>" /></td>
  </tr>
<tr>
  <td class="SK_Text2">个人爱好</td>
  <td class="SK_Text1"><input name="S_Hobby" type="text" size="35" value="<%=Rs("SK_Hobby")%>" /></td>
  <td width="42%" class="SK_Text"><input type="text" name="fj1" size="28" value="<%=Rs("SK_Photo")%>" /> <input type="button" value="上传" class="button1" onClick="showUploadDialog('image', 'thisForm.fj1', '')" /></td>
</tr>
<tr>
  <td class="SK_Text2">座右铭</td>
  <td colspan="3" class="SK_Text1"><textarea name="S_Maxim" cols="80" rows="8"><%=Rs("SK_Maxim")%></textarea></td>
  </tr>
<tr>
  <td class="SK_Text2">SMTP服务器</td>
  <td class="SK_Text1"><input type="text" class="input" name="S_Smtp" value="<%=Rs("SK_Smtp")%>"></td>
  <td class="SK_Text2">POP3服务器</td>
  <td class="SK_Text1"><input type="text" class="input" name="S_Pop3" value="<%=Rs("SK_Pop3")%>"></td>
</tr>
<tr>
  <td class="SK_Text2">邮箱名称</td>
  <td class="SK_Text1"><input type="text" class="input" name="S_MailName" value="<%=Rs("SK_MailName")%>"></td>
  <td class="SK_Text2">邮箱密码</td>
  <td class="SK_Text1"><input type="password" class="input" name="S_MailPass" value="<%=Rs("SK_MailPass")%>"></td>
</tr>

<tr>
<td colspan="4" class="SK_Text">
<INPUT class="button1" type="submit" value=" 保存 ">
</td>
</tr>

<tr>
<td colspan="4" class="SK_Text">
<script type='text/javascript' src='http://adv.waps.cn/ad/AdGet?c=AB52IMf9ljROPtyp4eUq6MH3ZyYSAK98d5FI13cp6yYEbS9Ut1bLySjygBtHaEKDaKRrWaefpikQdtR2GABd8IWDts61spNQS-CkF8zxY1o.'></script>
</td>
</tr>
</table>
</form>

</td>
<td width="8" background="../images/tab_15.gif"></td>
</tr>
</table></td>
</tr>
<tr>
<td class="SK_Td_Foot">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="1%" height="20"><img src="../images/tab_18.gif" width="12" height="20" /></td>
<td width="98%" class="SK_Td_Page"></td>
<td width="1%"><img src="../images/tab_20.gif" width="16" height="20" /></td>
</tr>
</table>
	
</td>
</tr>
</TBODY>
</table>
</body>
<%Call CloseDB()%>
</html>