<!--#include file="pysjzx_conn.asp"-->
<!--#include file="../webconfig.asp"-->
<!--#include file=cookies.asp-->
<%
action=request("action")
if action="modify" then
Public Function FilterHtml(Str)
    If Trim(Str) = "" Or IsNull(Str) Then
        FilterHtml=""
    Else
    Str = Replace(Str, ">", "&gt;")
    Str = Replace(Str, "<", "&lt;")
    Str = Replace(Str, Chr(32), "&nbsp;")
    Str = Replace(Str ,Chr(9), "&nbsp;")
    Str = Replace(Str, Chr(34), "&quot;")
    Str = Replace(Str, Chr(39), "&#39;")
    Str = Replace(Str, Chr(13), "")
    Str = Replace(Str, Chr(10) & Chr(10), "</p><p>")
    Str = Replace(Str, Chr(10), "<br> ")
    FilterHtml = Str
    End If
End Function
				set rs=server.CreateObject ("adodb.recordset")
sql="select * from pysjzx_user where username ='"&replace(request.cookies("pysjzx")("username"),"'","")&"'"
rs.open sql,conn,1,3
if  rs.eof then
response.write"<SCRIPT language=JavaScript>alert('修改会员资料失败！');"
response.write"javascript:history.go(-1)</SCRIPT>"
response.end 
else
rs("email")=trim(request("email"))'邮箱

rs("logo")=trim(request("logo"))'公司LOGO
rs("ad")=trim(request("ad"))'宣传广告
rs("info_pic")=trim(request("info_pic"))'公司简介
rs("info")=trim(request("info"))'简介
rs("news")=trim(request("news"))'最新动态标题
rs("news_info")=trim(request("news_info"))'动态标题
rs("address_pic")=trim(request("address_pic"))'联系地址地图

rs("company")=trim(request("company"))'公司名称
rs("subject")=request("subject")'服务类型
if IsNumeric(request.form("province"))=false or request.form("province")="xxx" then
rs("province") =0
else
rs("province")=int(request("province"))'市区
end if
if IsNumeric(request("city"))=False  or request("city")="xxx" then
rs("city") = 0
else
rs("city")=int(request("city"))'城区
end if
rs("linkname")=trim(request("linkname"))'联系人
rs("address")=trim(request("address"))'联系地址
rs("tel")=trim(request("tel"))'联系电话
rs("fax")=trim(request("fax"))'传真
rs("zip")=trim(request("zip"))'邮编
rs("web")=trim(request("web"))'网址
rs.update
rs.close
set rs=noting 
  response.write"<SCRIPT language=JavaScript>alert('恭喜您，您的资料修改成功！');"
   response.write"this.location.href='company.asp';</SCRIPT>" 
   response.end 
   end if
   end if
%>
<!--#include file=webhead.asp-->
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title><%=webname%>-会员中心-</title>
<meta content="<%=keyword%>" name="keywords">
<meta content="<%=description%>" name="description">
<link href="../css/style.css" rel="stylesheet" type="text/css">
<script language=JavaScript>
<%dim i_1,j_1
	set rs_s=server.createobject("adodb.recordset")
	sql="select * from province order by shengorder"
	rs_s.open sql,conn,1,1
%>
	var selects=[];
	selects['xxx']=new Array(new Option('-请选择县-','xxx'));
<%
	for i=1 to rs_s.recordcount
%>
	selects['<%=rs_s("ShengNo")%>']=new Array(

new Option('-请选择县-','xxx'),
<%
	set rs_s1=server.createobject("adodb.recordset")
	sql="select * from city where shengid="&rs_s("id")&" order by shiorder"
	rs_s1.open sql,conn,1,1
	if rs_s1.recordcount>0 then 
	%>


	<%		for j=1 to rs_s1.recordcount
		if j=rs_s1.recordcount then 
%>
		new Option('<%=trim(rs_s1("shiname"))%>','<%=trim(rs_s1("shiNo"))%>'));
<%		else
%>
		new Option('<%=trim(rs_s1("shiname"))%>','<%=trim(rs_s1("shiNo"))%>'),
<%
		end if
		rs_s1.movenext
		next
	else 
%>
		new Option('','0'));
<%
	end if
	rs_s1.close
	set rs_s1=nothing
	rs_s.movenext
	next
rs_s.close
set rs_s=nothing
%>
	function chsel(){
		with (document.form1){
			if(province.value) {
				city.options.length=0;
				for(var i=0;i<selects[province.value].length;i++){
					city.add(selects[province.value][i]);
				}
			}
		}
	}



</script>
</head>
<div align="center">
<%
set rs7=server.CreateObject ("adodb.recordset")
sql="select * from pysjzx_user where username='"&replace(request.cookies("pysjzx")("username"),"'","")&"'"
rs7.open sql,conn,1,1
%>
	<table border="0" width="780"  cellpadding="0">
		<tr>
			<td width="200" valign="top" style="border: 1px solid #C0C0C0" ><!--#include file="memu.asp"--></td>			
			<td valign="top">
	<div align="right">
	<table cellSpacing="1" cellPadding="3" width="99%" border="1" id="table9" style="border-collapse: collapse" bordercolor="#C0C0C0">
						<form method="POST" action="company.asp?action=modify" name="form1"> <tr>
							<td colspan="2" bgcolor="#E8F1FF" >
							<p align="center">公司资料修改</td>
						</tr>
						<tr>
							<td width=90 bgcolor="#F7F7F7" align="right">
							<p align="right">用<font color="#000000"> 户 名：</font></td>
							<td bgcolor="#F7F7F7"><%=trim(rs7("username"))%><input type=hidden name=user value=<%=rs7("username")%>></td>
						</tr>
						<tr>
							<td bgcolor="#F7F7F7" align="right">
							<p align="right">电子邮箱：</td>
							<td bgcolor="#F7F7F7">
							<input class="wenbenkuang"  size="30" name="email" value="<%=rs7("email")%>"></td>
						</tr>
						<tr>
							<td bgcolor="#F7F7F7" align="right">　</td>
							<td bgcolor="#F7F7F7">
							　</td>
						</tr>
						<%if request.Cookies("pysjzx")("reglx")=2 then%>
						<tr>
							<td bgcolor="#F7F7F7" align="right">公司LOGO：</td>
							<td bgcolor="#F7F7F7"><%
					ServerName1=Cstr(Request.ServerVariables("HTTP_REFERER"))
					%><input class="wenbenkuang" id="logo"  size="30" name="logo" value="<%=rs7("logo")%>"> 
							<input  type="button" name="Submit2" value="上传图片" onClick="window.open('../Up_byshopPic2.asp?formname=form1&editname=logo&byshopuppath=upload/company&filelx=jpg&picclass=2&ServerName1=<%=ServerName1%>','','status=no,scrollbars1=no,top=20,left=110,width=420,height=165')" class="go-wenbenkuang"> 宽70 * 高40</td>
						</tr>
						<tr>
							<td bgcolor="#F7F7F7" align="right">宣传广告：</td>
							<td bgcolor="#F7F7F7">
							<input class="wenbenkuang" id="ad"  size="30" name="ad" value="<%=rs7("ad")%>">
							<input  type="button" name="Submit2" value="上传图片" onClick="window.open('../Up_byshopPic2.asp?formname=form1&editname=ad&byshopuppath=upload/company&filelx=jpg&picclass=2&ServerName1=<%=ServerName1%>','','status=no,scrollbars1=no,top=20,left=110,width=420,height=165')" class="go-wenbenkuang"> 宽70 * 高40</td>
						</tr>
						<tr>
							<td bgcolor="#F7F7F7" align="right">公司简介：</td>
							<td bgcolor="#F7F7F7">
							<input class="wenbenkuang" id="info_pic" size="30" name="info_pic" value="<%=rs7("info_pic")%>">
							<input  type="button" name="Submit2" value="上传图片" onClick="window.open('../Up_byshopPic2.asp?formname=form1&editname=info_pic&byshopuppath=upload/company&filelx=jpg&picclass=2&ServerName1=<%=ServerName1%>','','status=no,scrollbars1=no,top=20,left=110,width=420,height=165')" class="go-wenbenkuang"> 宽70 * 高40</td>
</td>
						</tr>
						<%end if%>
						<tr>
							<td bgcolor="#F7F7F7" align="right" valign="top">
							公司简介：<p>　</td>
							<td bgcolor="#F7F7F7">
		<textarea name="info" rows="10" cols="50"><%=rs7("info")%></textarea></td>
						</tr>	<%if request.Cookies("pysjzx")("reglx")=2 then%>

						<tr>
							<td bgcolor="#F7F7F7" align="right">最新动态标题：</td>
							<td bgcolor="#F7F7F7">
							<input class="wenbenkuang" maxLength="10" size="30" value="<%=rs7("news")%>" name="news"></td>
						</tr>
						<tr>
							<td bgcolor="#F7F7F7" align="right" valign="top">最新动态：</td>
							<td bgcolor="#F7F7F7">
							<textarea name="news_info" rows="10" cols="50"><%=rs7("news_info")%></textarea></td>
						</tr>
						<tr>
							<td bgcolor="#F7F7F7" align="right">地图：</td>
							<td bgcolor="#F7F7F7">
							<input class="wenbenkuang" maxLength="10" size="30" value="<%=rs7("address_pic")%>" name="address_pic">
							<input  type="button" name="Submit2" value="上传图片" onClick="window.open('../Up_byshopPic2.asp?formname=form1&editname=address_pic&byshopuppath=upload/company&filelx=jpg&picclass=2&ServerName1=<%=ServerName1%>','','status=no,scrollbars1=no,top=20,left=110,width=420,height=165')" class="go-wenbenkuang"> 宽70 * 高40</td>
							</td>
						</tr><%end if%>
						<tr>
							<td bgcolor="#F7F7F7" align="right">　</td>
							<td bgcolor="#F7F7F7">
							　</td>
						</tr>
						<tr>
							<td bgcolor="#F7F7F7" align="right">公<font color="#000000">司名称：</font></td>
							<td bgcolor="#F7F7F7">
							<input class="wenbenkuang"  size="30" value="<%=rs7("company")%>" name="company"></td>
						</tr>
						<tr>
							<td bgcolor="#F7F7F7" align="right">负责人：</td>
							<td bgcolor="#F7F7F7">
							<input class="wenbenkuang" size="30" value="<%=rs7("linkname")%>" name="linkname"></td>
						</tr>
						<tr>
							<td bgcolor="#F7F7F7" align="right">市区县区：</td>
							<td bgcolor="#F7F7F7"><select size="1" name="province" onChange=chsel()  class="wenbenkuang">
          <option value="xxx" selected>--不限省份--</option>
          <%dim tmpShengid
tmpShengid=0
    response.write  rs("province")
set rs1_s=server.createobject("adodb.recordset")
sql2="select * from province  order by shengorder"
rs1_s.open sql2,conn,1,1
while not rs1_s.eof%>

    <%

           if rs7("province")=rs1_s("ShengNo") then
          tmpShengid=rs1_s("id")
%>
          <option value="<%=rs1_s("ShengNo")%>" selected ><%=trim(rs1_s("ShengName"))%></option>
          <%
     else
%>
          <option value="<%=rs1_s("ShengNo")%>" ><%=trim(rs1_s("ShengName"))%></option>
            <%
     end if        
 
    rs1_s.movenext
wend
rs1_s.close
set rs1_s=nothing
%>
        </select><select size="1" size="18" name="city"  class="wenbenkuang"  >
                        <option value="" >--不限城市--</option>

            

 <%
set rs1_s=server.createobject("adodb.recordset")
sql2="select * from city where shengid="&tmpShengid&" order by shiorder"
rs1_s.open sql2,conn,1,1
while not rs1_s.eof

%>
  <option value="<%=rs1_s("ShiNo")%>" <%if rs7("city")=rs1_s("ShiNo") then%>selected<%end if%>><%=trim(rs1_s("ShiName"))%></option>

      
          <%
    rs1_s.movenext
wend
rs1_s.close
set rs1_s=nothing
%>
					 </select> <font color="#FF0000">*   
		　
							　</td>
						</tr>
						<tr>
							<td bgcolor="#F7F7F7" align="right">联系地址：</td>
							<td bgcolor="#F7F7F7">
							<input class="wenbenkuang" maxLength="10" size="30" value="<%=rs7("address")%>" name="address"></td>
						</tr>
						<tr>
							<td bgcolor="#F7F7F7" align="right">
		联系电话：</td>
							<td bgcolor="#F7F7F7">
		<input name=tel type=text value="<%=trim(rs7("tel"))%>" size=30></td>
						</tr>
						<tr>
							<td bgcolor="#F7F7F7" align="right">
		传真：</td>
							<td bgcolor="#F7F7F7">
		<font face="宋体"><input id="name4"  size=30 name="fax" value="<%=trim(rs7("fax"))%>"></font></td>
						</tr>
						<tr>
							<td bgcolor="#F7F7F7" align="right">
		邮编：</td>
							<td bgcolor="#F7F7F7">
		<font face="宋体"><input id="name5"  size=30 name="zip" value="<%=trim(rs7("zip"))%>"></font></td>
						</tr>
						<tr>
							<td bgcolor="#F7F7F7" align="right">
		网址：</td>
							<td bgcolor="#F7F7F7">
		<font face="宋体"><input id="name6"  size=30 name="web" value="<%=trim(rs7("web"))%>"></font></td>
						</tr>
						<tr>
							<td bgcolor="#F7F7F7" align="right" valign="top">
		　</td>
							<td bgcolor="#F7F7F7">
		　</td>
						</tr>
						<tr>
							<td bgcolor="#F7F7F7" align="right">
		会员类型：</td>
							<td bgcolor="#F7F7F7">
		企业公司</td>
						</tr>
						<tr>
							<td bgcolor="#F7F7F7" align="right">
		会员级别：</td><td bgcolor="#F7F7F7"><%if rs7("reglx")=1 then 
		response.write "普通会员"%> <a href="../about.asp?action=upgrade" target=_blank>升级为<font color="#FF0000">高级会员</font></a><%end if%><%if rs7("reglx")=2 then response.write "<font color=#FF0000>高级会员</font>"end if%></td>
						</tr>
						<tr>
							<td bgcolor="#F7F7F7" align="right">
		登录次数：</td>
							<td bgcolor="#F7F7F7"><%=rs7("logins")%>次</td>
						</tr>
						<tr>
							<td bgcolor="#F7F7F7" align="right">
		最后登录IP：</td>
							<td bgcolor="#F7F7F7"><%=rs7("userlastip")%></td>
						</tr>
						<tr>
							<td align="middle" colSpan="2" height="20" bgcolor="#F7F7F7">
							<input class="go-wenbenkuang" type="submit" value=" 修改 " name="button">
							<input class="go-wenbenkuang" type="reset" value=" 重填 " name="Reset"></td>
						</tr>
					</table>
			</div>
			</td>
		</tr>
	</table>
</div>
<%rs7.close
set rs7=nothing%><!--#include file=webfoot.asp-->