<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../inc/config.asp"-->
<!--#include file="../inc/conn.asp"-->
<!--#include file="../inc/function.asp"-->
<!--#include file="checklogin.asp"-->
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>修改网店信息</title>
<link href="style.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
.style1 {color: #FF0000}
.width100{width:100%;}

-->
</style>
<script type="text/javascript" src="../js/http.js"></script>
<script type="text/javascript" src="/js/prototype.js"></script>
<script type="text/javascript" src="/js/industrys.js"></script>
<script type="text/javascript" src="/ckeditor/ckeditor.js"></script>
<script type="text/javascript" src="/js/areas.js"></script>
<script type="text/javascript">
function upImgs(){
	var ret=window.showModalDialog('upimg.htm','','dialogHeight:140px;dialogWidth:410px;help:no;status:no;scroll:no')+'';
	
	if(ret!='undefined'){
		document.PostForm.Photo.value=ret
		document.getElementById('p_view').src=ret;
	}
}
</script>
<LINK media=screen href="../js/dhtmlgoodies_calendar.css" rel=stylesheet></LINK>
<SCRIPT src="../js/dhtmlgoodies_calendar.js" type=text/javascript></SCRIPT>
<style type="text/css">
<!--
.pformleft {padding:3px; line-height:20px;}
-->
</style>
</head>

<body>
<!--#include file="top.asp"-->
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td valign="top">
	<%
dim act
act=request.querystring("act")
if(act="do") then
	call mod_personalinfook()
	response.write("<div align=""center"">成功修改会员信息</p>")
	response.write("<p align=""center""><a href=""main.asp"">返回</a></p>")
else
	call mod_personalinfo()
end if
%>    </td>
  </tr>
</table>
<%
sub mod_personalinfook
	dim rs,Email,UserName,IdCard,CreateDate,IsReg,Province,City,IndustryId,Education,InCome,Tel,Mobile,QQ,MSN,HomePage,Address,PostCode,ContactMan,CatalogId
	Email=request.Form("Email")
	UserName=request.Form("UserName")
	IdCard=request.Form("IdCard")
	CreateDate=Cdate(request.Form("CreateDate"))
	IsReg=tohtml2(request.Form("IsReg"))
	Province=request.Form("Province")
	'Province=getProvinceTitle(Province)
	City=tohtml2(request.Form("City"))
	IndustryId=Clng(request.Form("ParentId"))
	CatalogId=Clng(request.Form("CatalogId"))
	Education=tohtml2(request.Form("Education"))
	InCome=tohtml2(request.Form("InCome"))
	Tel=tohtml2(request.Form("Tel"))
	Mobile=tohtml2(request.Form("Mobile"))
	QQ=tohtml2(request.Form("QQ"))
	MSN=tohtml2(request.Form("MSN"))
	HomePage=tohtml2(request.Form("HomePage"))
	Address=tohtml2(request.Form("Address"))
	PostCode=tohtml2(request.Form("PostCode"))
	Demons=request.Form("Demons")
	Demons=replace(Demons,"script","")
	Photo=request.Form("Photo")
	ContactMan=request.Form("ContactMan")
	set rs=server.CreateObject("adodb.recordset")
	rs.open "select * from t_member_p where UserId='"&checkusername&"'",conn,3,3
	if not rs.eof then
		rs("Email")=Email
		rs("UserName")=UserName		
		rs("Province")=Province
		rs("City")=City
		rs("Education")=Education
		rs("InCome")=InCome
		rs("Tel")=Tel
		rs("Mobile")=Mobile
		rs("QQ")=QQ
		rs("MSN")=MSN
		rs("HomePage")=HomePage
		rs("Address")=Address
		rs("PostCode")=PostCode
		rs("Demons")=Demons
		rs("Photo")=Photo
		rs.update
	end if
	rs.close
	set rs=nothing
end sub
sub mod_personalinfo
	dim rs,userinfo,sql
	sql="select * from t_member_p where userid='"&checkusername&"'"
	set rs=server.CreateObject("adodb.recordset")
	rs.open sql,conn,3,1
	if not rs.eof then		
%>
<form id="PostForm" name="PostForm" method="post" action="?act=do">
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="1" class="border">
  <tr>
    <td height="28" colspan="2" class="th_title">修改信息</td>
  </tr>
  
  <tr>
    <td class="td_row">姓名：</td>
    <td class="td_row"><input name="UserName" type="text" value="<%=rs("UserName")%>" /></td>
  </tr>
	<tr>
    <td class="td_row">主页：</td>
    <td class="td_row"><input name="HomePage" type="text" value="<%=rs("HomePage")%>" size="55" /></td>
  </tr>
  <tr>
    <td class="td_row">省市：</td>
    <td class="td_row">
      <select name="Province" id="Province" onchange="GetChilds(this.options[this.selectedIndex].value,0,'City')">
        <option value="0">请选择</option>
        <script>document.write(GetFirst(<%=rs("Province")%>,''));</script>				
      </select>
      <select name="City" id="City">
        </select>
      <script type="text/javascript">
				GetChilds("<%=rs("Province")%>","<%=rs("City")%>",'City');	
			</script>
    </td>
  </tr>
  <tr>
    <td class="td_row">教育程度：</td>
    <td class="td_row"><span class="pformleft">
      <input name="Education" type="text" value="<%=rs("Education")%>" />      
      </span></td>
  </tr>
  <tr>
    <td class="td_row">收入：</td>
    <td class="td_row"><input name="InCome" type="text" value="<%=rs("InCome")%>" /></td>
  </tr>
	<tr>
    <td width="18%" class="td_row">邮箱：</td>
    <td width="82%" class="td_row"><input name="Email" type="text" value="<%=rs("Email")%>" /></td>
  </tr>
  <tr>
    <td class="td_row">电话：</td>
    <td class="td_row"><input name="Tel" type="text" value="<%=rs("Tel")%>" /></td>
  </tr>
  <tr>
    <td class="td_row">手机：</td>
    <td class="td_row"><input name="Mobile" type="text" value="<%=rs("Mobile")%>" /></td>
  </tr>
  <tr>
    <td class="td_row">QQ：</td>
    <td class="td_row"><input name="QQ" type="text" value="<%=rs("QQ")%>" /></td>
  </tr>
  <tr>
    <td class="td_row">传真:</td>
    <td class="td_row"><input name="MSN" type="text" value="<%=rs("MSN")%>" /></td>
  </tr>
  
  <tr>
    <td class="td_row">地址：</td>
    <td class="td_row"><input name="Address" type="text" value="<%=rs("Address")%>" /></td>
  </tr>
  <tr>
    <td class="td_row">邮编：</td>
    <td class="td_row"><input name="PostCode" type="text" value="<%=rs("PostCode")%>" /></td>
  </tr>
  <tr>
    <td class="td_row">公司简介：</td>
    <td class="td_row"><span class="pformleft">
      <textarea name="Demons" rows="5" id="Demons" style="width:98%;"><%=htmlto(rs("Demons"))%></textarea>
      <script type="text/javascript">
		//<![CDATA[

			CKEDITOR.replace( 'Demons',
				{
					skin : 'office2003'
				});

		//]]>
		</script>
    </span></td>
  </tr>
  <tr>
    <td class="td_row">公司宣传图：</td>
    <td class="td_row"><p>
      <input name="Photo" type="text" id="Photo" size="32" value="<%=rs("Photo")%>" />
      <input type="button" name="Button" value="上传-&gt;" onclick="upImgs()" />
    </p>
      <p>        <img src="<%=rs("Photo")%>" alt="上传图片" width="160" height="130" id="p_view" /><br />
      提示：系统最大允许上传100K的文件，请确定您的图片处理后小于100K。</p></td>
  </tr>
  <tr>
    <td class="td_row">&nbsp;</td>
    <td height="45" class="td_row"><input type="submit" name="Submit" value="确 定 修 改" />
      <input type="reset" name="Submit2" value="取 消" /></td>
  </tr>
</table>
</form>
<%
	end if
	rs.close
	set rs=nothing
end sub
%>
</body>
</html>
<%
call connclose()
%>