<!--#include file="../inc/config.asp"-->
<!--#include file="../inc/conn.asp"-->
<!-- #include file="inc/Session.asp" -->
<!-- #include file="inc/checkrole.asp" -->
<%
'''''''''''''''''''''''''''''''''''''''''''''''
call checkPrevilege(Session("Name"),"p20")
'''''''''''''''''''''''''''''''''''''''''''''''
dim id
id=trim(request.QueryString("id"))
%>
<html>
<head>
<title>会员管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
	background-color: #FFFFFF;
	font-size:12px;
}
.style1 {
	color: #FFFFFF;
	font-weight: bold;
}
.td_row{ padding:2px 5px; line-height:20px;}
form{margin:0;}
-->
</style>
<link href="style/global.css" rel="stylesheet" type="text/css">
<script src="/js/industrys.js" type="text/javascript"></script>
<script src="/js/areas.js" type="text/javascript"></script>
<LINK media=screen href="../js/dhtmlgoodies_calendar.css" rel=stylesheet></LINK>
<SCRIPT src="../js/dhtmlgoodies_calendar.js" type=text/javascript></SCRIPT>
</head>
<body>
<table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td><iframe src="right_top.htm" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" height="30" width="100%"></iframe></td>
  </tr>
</table>

<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=""javascript:history.go(-2);"">返回</a></p>")
else
	call mod_personalinfo()
end if
%>    </td>
  </tr>
</table>
<%
sub mod_personalinfook
	dim ComType,ComName,ParentId,IndustryId,CreateDate,ContactMan,Province,City,BusinessScope,Tel,Fax,Address,PostCode,HomePage,Demons,Photo
	ComType=trim(request.Form("ComType"))
	ComName=trim(request.Form("ComName"))
	ParentId=request.Form("ParentId")
	if(ParentId<>"") then
		ParentId=Cint(ParentId)
	else
		ParentId=0
	end if
	IndustryId=request.Form("IndustryId")
	if(IndustryId<>"") then
		IndustryId=Cint(IndustryId)
	else
		IndustryId=0
	end if	
	CreateDate=trim(request.Form("CreateDate"))
	ContactMan=trim(request.Form("ContactMan"))
	Province=request.Form("Province")
	if(Province<>"") then
		Province=Clng(Province)
	else
		Province=0
	end if	
	City=request.Form("City")
	if(City<>"") then
		City=Clng(City)
	else
		City=0
	end if	
	BusinessScope=trim(request.Form("BusinessScope"))
	BusinessScope=left(BusinessScope,120)
	Tel=trim(request.Form("Tel"))
	Fax=trim(request.Form("Fax"))
	Address=trim(request.Form("Address"))
	PostCode=trim(request.Form("PostCode"))
	HomePage=trim(request.Form("HomePage"))
	Demons=trim(request.Form("Demons"))
	Photo=request.Form("Photo")
	Email=request.Form("Email")
	set rs=server.CreateObject("adodb.recordset")
	rs.open "select * from t_member_e where UserId='"&id&"'",conn,3,3
	if not rs.eof then
		rs("Email")=Email
		rs("UserName")=ComName
		rs("ParentId")=ParentId
		rs("IndustryId")=IndustryId
		rs("ComType")=ComType
		rs("CreateDate")=CreateDate
		rs("ContactMan")=ContactMan
		rs("Province")=Province
		rs("City")=City
		rs("BusinessScope")=BusinessScope
		rs("Tel")=Tel
		rs("Fax")=Fax
		rs("Mobile")=""
		rs("QQ")=""
		rs("HomePage")=HomePage
		rs("Address")=Address
		rs("PostCode")=PostCode
		rs("Photo")=Photo
		rs("Demons")=Demons
		rs.update
	end if
	rs.close
	set rs=nothing
end sub
sub mod_personalinfo
	dim rs,userinfo,sql
	sql="select * from t_member_e where UserId='"&id&"'"
	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&id=<%=id%>">
<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 width="17%" height="32" bgcolor="#FFFFFF" class="pad_5"><strong>企业名称：</strong></td>
      <td width="83%" bgcolor="#FFFFFF" class="pformleft"><input name="ComName" type="text" id="ComName" value="<%=rs("UserName")%>" size="30" maxlength="50" /></td>
    </tr>
    <tr>
      <td height="32" bgcolor="#FFFFFF" class="pad_5"><strong>头像：</strong></td>
      <td bgcolor="#FFFFFF" class="pformleft"><input name="Photo" type="text" id="Photo" size="50" value="<%=rs("Photo")%>">
      <input type="button" name="Button" value="上传->" onClick="javascript:document.PostForm.Photo.value=window.showModalDialog('upimg.htm','','dialogHeight:130px;dialogWidth:410px;help:no;status:no;scroll:no')"></td>
    </tr>
    <tr>
      <td height="32" bgcolor="#FFFFFF" class="pad_5"><strong>企业性质：</strong></td>
    <td bgcolor="#FFFFFF" class="pformleft"><select name="ComType" id="ComType">
      <option value="个体经营" <%if(rs("ComType")="个体经营") then response.Write("selected=""selected""") end if%>>个体经营</option>
      <option value="企业单位" <%if(rs("ComType")="企业单位") then response.Write("selected=""selected""") end if%>>企业单位</option>
      <option value="事业单位或社会团体" <%if(rs("ComType")="事业单位或社会团体") then response.Write("selected=""selected""") end if%>>事业单位或社会团体</option>
          </select></td>
    </tr>   
	  <tr>
	    <td height="32" bgcolor="#FFFFFF" class="pad_5"><strong>选择行业：</strong></td>
	    <td bgcolor="#FFFFFF" class="pformleft">
      <select name="ParentId" id="ParentId" onChange="GetIndustryChilds(this.options[this.selectedIndex].value,0,'IndustryId')">
        <option value="0">一级行业分类</option>
        <script>document.write(GetIndustryFirst(<%=rs("ParentId")%>,''));</script>
      </select>
      <select name="IndustryId" id="IndustryId">
        <option value="0">二级行业分类</option>
      </select>
      <script type="text/javascript">
			GetIndustryChilds(<%=rs("ParentId")%>,<%=rs("IndustryId")%>,'IndustryId');
			</script>
      </td>
    </tr>
	  <tr>
	    <td bgcolor="#FFFFFF" class="pad_5"><strong>成立日期：</strong></td>
	    <td bgcolor="#FFFFFF" class="pformleft"><input name="CreateDate" type="text" id="CreateDate" value="<%=rs("CreateDate")%>" /></td>
    </tr>
	  <tr>
	    <td bgcolor="#FFFFFF" class="pad_5"><strong>联系人：</strong></td>
	    <td bgcolor="#FFFFFF" class="pformleft"><input name="ContactMan" type="text" id="ContactMan" value="<%=rs("ContactMan")%>" /></td>
    </tr>
	  <tr>
	    <td bgcolor="#FFFFFF" class="pad_5"><strong>地区：</strong></td>
	    <td bgcolor="#FFFFFF" class="pformleft">
      <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">
        <option value="0">选择地区</option>
      </select>	
      <script type="text/javascript">
			GetChilds(<%=rs("Province")%>,<%=rs("City")%>,'City');
			</script>
      </td>
    </tr>
	  <tr>
	    <td bgcolor="#FFFFFF" class="pad_5"><strong>经营范围：</strong></td>
	    <td bgcolor="#FFFFFF" class="pformleft"><textarea name="BusinessScope" id="BusinessScope" cols="45" rows="5"><%=rs("BusinessScope")%></textarea></td>
    </tr>
	  <tr>
	    <td bgcolor="#FFFFFF" class="pad_5"><strong>电话：</strong></td>
	    <td bgcolor="#FFFFFF" class="pformleft"><input name="Tel" type="text" id="Tel" value="<%=rs("Tel")%>" /></td>
    </tr>
	  <tr>
	    <td bgcolor="#FFFFFF" class="pad_5"><strong>传真：</strong></td>
	    <td bgcolor="#FFFFFF" class="pformleft"><input name="Fax" type="text" id="Fax" value="<%=rs("Fax")%>" /></td>
    </tr>
	  <tr>
	    <td bgcolor="#FFFFFF" class="pad_5"><strong>地址：</strong></td>
	    <td bgcolor="#FFFFFF" class="pformleft"><input name="Address" type="text" id="Address" value="<%=rs("Address")%>" /></td>
    </tr>
    <tr>
	    <td bgcolor="#FFFFFF" class="pad_5"><strong>邮编：</strong></td>
	    <td bgcolor="#FFFFFF" class="pformleft"><input name="PostCode" type="text" id="PostCode" value="<%=rs("PostCode")%>" /></td>
    </tr>
	  <tr>
	    <td bgcolor="#FFFFFF" class="pad_5"><strong>Email：</strong></td>
	    <td bgcolor="#FFFFFF" class="pformleft"><input name="Email" type="text" id="Email" value="<%=rs("Email")%>" /></td>
    </tr>
	  <tr>
	    <td bgcolor="#FFFFFF" class="pad_5"><strong>网址：</strong></td>
	    <td bgcolor="#FFFFFF" class="pformleft"><input name="HomePage" type="text" id="HomePage" value="<%=rs("HomePage")%>" size="50" /></td>
    </tr>
	  <tr>
	    <td bgcolor="#FFFFFF" class="pad_5"><strong>公司简介：</strong></td>
	    <td bgcolor="#FFFFFF" class="pformleft"><textarea name="Demons" id="Demons" style="width:100%;" rows="5"><%=rs("Demons")%></textarea></td>
  </tr>
  <tr>
    <td class="td_row">&nbsp;</td>
    <td 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
function getProvinceOptions(province)
	dim ifselect,rs,sql
	sql="select ZID,ZName from t_province order by ZID asc"
	Set rs = conn.Execute(sql)
	if rs.eof then
		getProvinceOptions="<option value=""0"">暂时没有记录</option>"&Chr(13)
	else
		'getSpecialSelect="<option value=""0"">不属任何专题</option>"&Chr(13)
		while not rs.eof
			if(rs(1)=province) then
				ifselect=" selected"
			else
				ifselect=""
			end if
			getProvinceOptions=getProvinceOptions&"<option value="""&rs(1)&""" "&ifselect&">"&rs(1)&"</option>"&Chr(13)
			rs.movenext
		wend
	end if
	rs.close
	set rs=nothing
end function
%>
</body>
</html>
<%
call connclose()
%>