<%
dim dns
dns="../"
%><!--#Include file="../Common/Inc_DatConn.asp"-->
<!--#Include file="Common/Inc_Config.asp"-->
<!--#Include file="Common/Inc_Function.asp"-->
<%if fla25<>1 and Session("intUserLevel") < 2 then
response.write "<script>alert('操作权限出错，您没有权限操作些功能');history.go(-);</Script>"
Response.End 
end if%>
<%if IsTimeOut(Session("strAccount"),Session("strPassWord")) then Response.Redirect "index.asp"%>
<html>
<head>
<title><% = strSiteName%> - 网站后台管理系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" href="Common/Site.css" type="text/css">
</head>

<body leftMargin="0" topMargin="2">
<!--#Include file="Common/inc_Top.asp"-->
<table width="750" border="0" cellspacing="0" cellpadding="0" align="center">
  <tr> 
    <td width="105" valign="top" style="border-left: 1px solid rgb(0,0,0); border-right: 1px solid rgb(0,0,0)" class="bottom"><br>
	<!--#Include file="Common/Inc_Button.asp"-->
    </td>
    <td valign="top" style="border-right: 1px solid rgb(0,0,0)" align="center" class="banma2">
        <table width="96%" border="0" cellspacing="0" cellpadding="0" align="center">
          <tr> 
            <td height="50">当前位置：<a href="Main.asp">管理首页</a> -&gt; 联系方式</td>
          </tr>
        </table>
<%
if UCase(Request.Form("Oper")) = "CONTACT" then
	Dim rdsUpdateContact
	
	set rdsUpdateContact = Server.CreateObject("ADODB.Recordset")
	rdsUpdateContact.Open "Dat_Company",Conn,3,3
	
	rdsUpdateContact("CompanyName") = Request.Form("CompanyName")
	rdsUpdateContact("ContactMan") = Request.Form("ContactMan")
	rdsUpdateContact("Tel") = Request.Form("Tel")
	rdsUpdateContact("Fax") = Request.Form("Fax")
	rdsUpdateContact("Email")	= Request.Form("Email")
	rdsUpdateContact("QQ")	= Request.Form("QQ")
	rdsUpdateContact("MSN")	= Request.Form("MSN")
	rdsUpdateContact("Mobile")	= Request.Form("Mobile")
	rdsUpdateContact("Add") = Request.Form("Add")
	rdsUpdateContact("Postalcode") = Request.Form("Postalcode")
	rdsUpdateContact("Homepage") = Request.Form("Homepage")
	rdsUpdateContact("UpdateTime") = now()
	rdsUpdateContact.Update
	rdsUpdateContact.Close
	set rdsUpdateContact = nothing
	
	strMsgTitle = "公司联系方式更新"
	strError = False
	strMsg	= "公司联系方式更新成功..."
	strGoFile = "Contact.asp"
	Call ShowMessage()	
else
	Dim rdsContact
	Dim sqlCompany

	set rdsContact = Server.CreateObject("ADODB.Recordset")
	sqlCompany = "Select * From Dat_Company"
	rdsContact.Open sqlCompany,Conn,1,1
	if not rdsContact.EOF then
%>        
	    <table border="0" width="96%" cellspacing="0" cellpadding="0" align="center">
	      <tr>
	        <td width="100%" class="booktable">
			<table border="0" width="100%" cellspacing="1" cellpadding="2">
			  <form method="post" action="" name="ContactForm">
			  <input type="hidden" name="Oper" value="Contact">
			  <tr>
			    <td width="100%" height="30" class="bottom" colspan="2" align="center">联 系 方 式</td>
			  </tr>
			  <tr>
			    <td width="20%" height="25" class="banma1" align="right">公司名称：</td>
			    <td width="80%" height="25" class="banma2">&nbsp;<input type="text" name="CompanyName" size="40" class="face" value="<% = rdsContact("CompanyName")%>"></td>
			  </tr>
			  <tr>
			    <td width="20%" height="25" class="banma1" align="right">联系人：</td>
			    <td width="80%" height="25" class="banma2">&nbsp;<input type="text" name="ContactMan" size="40" class="face" value="<% = rdsContact("ContactMan")%>"></td>
			  </tr>
			  <tr>
			    <td width="20%" height="25" class="banma1" align="right">电话：</td>
			    <td width="80%" height="25" class="banma2">&nbsp;<input type="text" name="Tel" size="40" class="face" value="<% = rdsContact("Tel")%>"></td>
			  </tr>
			  <tr>
			    <td width="20%" height="25" class="banma1" align="right">传真：</td>
			    <td width="80%" height="25" class="banma2">&nbsp;<input type="text" name="Fax" size="40" class="face" value="<% = rdsContact("Fax")%>"></td>
			  </tr>
			  <tr>
			    <td width="20%" height="25" class="banma1" align="right">E-Mail：</td>
			    <td width="80%" height="25" class="banma2">&nbsp;<input type="text" name="Email" size="40" class="face" value="<% = rdsContact("Email")%>"></td>
			  </tr>
			  <tr>
			    <td width="20%" height="25" class="banma1" align="right">QQ：</td>
			    <td width="80%" height="25" class="banma2">&nbsp;<input type="text" name="QQ" size="40" class="face" value="<% = rdsContact("QQ")%>"></td>
			  </tr>
			  <tr>
			    <td width="20%" height="25" class="banma1" align="right">MSN：</td>
			    <td width="80%" height="25" class="banma2">&nbsp;<input type="text" name="MSN" size="40" class="face" value="<% = rdsContact("MSN")%>"></td>
			  </tr>
			  <tr>
			    <td width="20%" height="25" class="banma1" align="right">Mobile：</td>
			    <td width="80%" height="25" class="banma2">&nbsp;<input type="text" name="Mobile" size="40" class="face" value="<% = rdsContact("Mobile")%>"></td>
			  </tr>
			  <tr>
			    <td width="20%" height="25" class="banma1" align="right">地址：</td>
			    <td width="80%" height="25" class="banma2">&nbsp;<input type="text" name="Add" size="40" class="face" value="<% = rdsContact("Add")%>"></td>
			  </tr>
			  <tr>
			    <td width="20%" height="25" class="banma1" align="right">邮编：</td>
			    <td width="80%" height="25" class="banma2">&nbsp;<input type="text" name="Postalcode" size="40" class="face" value="<% = rdsContact("Postalcode")%>"></td>
			  </tr>
			  <tr>
			    <td width="20%" height="25" class="banma1" align="right">网站：</td>
			    <td width="80%" height="25" class="banma2">&nbsp;<input type="text" name="Homepage" size="40" class="face" value="<% = rdsContact("Homepage")%>"></td>
			  </tr>
			  <tr>
			    <td width="20%" height="25" class="banma1" align="right">更新时间：</td>
			    <td width="80%" height="25" class="banma2">&nbsp;<input type="text" name="UpdateTime" size="40" class="face" value="<% = rdsContact("UpdateTime")%>" readonly="ture"> （上次系统更新时间）</td>
			  </tr>
			  <tr>
			    <td width="20%" height="25" class="banma1" align="right"></td>
			    <td width="80%" height="25" class="banma2">&nbsp;<input type="submit" value="更 新" name="submit" class="button">&nbsp;&nbsp;&nbsp;<input type="reset" value="重 置" name="reset" class="button"></td>
			  </tr>
			  </form>
			</table>			
	      </td>
		</tr>
	  </table>
<%
	end if
	rdsContact.Close
	set rdsContact  = nothing
end if
%>	  
      <br>
    </td>
  </tr>
</table>
<!--#Include file="Common/Inc_Bottom.asp"-->
</body>
</html>