⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 contact.asp.bak

📁 商会 商会 商会 商会 商会 商会 商会 商会 商会 商会 商会 商会 商会
💻 BAK
📖 第 1 页 / 共 2 页
字号:
<%@ Language=VBScript%>
<%

Response.Buffer=true
Response.Expires=0
%>
<!-- #include file="dsn_root.asp" -->
<!-- #include file="func.inc.asp" -->



<%
dim currentMenuId, cn, rs, sql
'指示当前活动的菜单项
currentMenuId = ""

set cn = Server.CreateObject("adodb.Connection")
set rs = Server.CreateObject("adodb.Recordset")
cn.Open mycnstr

code=Request.QueryString("code")
flag=Request.QueryString("flag")

if Request.ServerVariables("REQUEST_METHOD")="POST" then
	if code = "" then
		Response.Redirect "contact.asp?flag=0"
	end if

	title = fixedReplaceStr(Request.Form("title"), 60)
	email = fixedReplaceStr(Request.Form("email"), 50)
	myname = fixedReplaceStr(Request.Form("myname"), 10)
	corpname = fixedReplaceStr(Request.Form("corpname"), 60)
	address = fixedReplaceStr(Request.Form("address"), 60)
	phone = fixedReplaceStr(Request.Form("phone"), 20)
	fax = fixedReplaceStr(Request.Form("fax"), 20)
	content = fixedReplaceStr(Request.Form("content"), "")

	'检查是否选择了部门,并查找部门的邮箱地址
	sql="select email from sys_dept where code='"+code+"'"
	rs.Open sql,cn,0,1,1
	if not rs.EOF then
		sys_email=trim(rs("email"))
	end if
	rs.Close

	'如果部门有邮箱地址,发送电子邮件
	if sys_email <> "" then

		txt="这个一封来自"+Request.ServerVariables("Http_HOST")+"的在线提交邮件!当您收到这封邮件后请不要直接回复,因为您只能直接回复到网站"
		mailstr=txt+ chr(13) + chr(10)
		mailstr=mailstr + "姓名:" + myname + chr(13) + chr(10)
		mailstr=mailstr + "单位:" + corpname + chr(13) + chr(10)
		mailstr=mailstr + "电话:" + phone + chr(13) + chr(10)
		mailstr=mailstr + "地址:" + address + chr(13) + chr(10)
		mailstr=mailstr + "传真:" + fax + chr(13) + chr(10)
		mailstr=mailstr + "Email:" + email + chr(13) + chr(10)
		mailstr=mailstr + "IP地址:" + Request.ServerVariables("Remote_HOST") + chr(13) + chr(10)
		mailstr=mailstr + "内容:" + content + chr(13) + chr(10)
		
		Set msg = Server.CreateObject("JMail.Message")
		msg.silent = true
		msg.Logging = true
		msg.Charset = "gb2312"
		msg.MailServerUserName = "public@ibw.com.cn"   '输入smtp服务器验证登陆名 
		msg.MailServerPassword = "wangxin108"          '输入smtp服务器验证密码   (用户Email帐号对应的密码)
		if email="" then
			msg.From ="public@ibw.com.cn" 
		else
			msg.From = email
		end if

		msg.FromName = myname							 '发件人姓名
		msg.AddRecipient sys_email						 '收件人Email
		'msg.AddRecipientBCC  "napoleon@ibw.com.cn"	  '密件传送'
		msg.Subject = Request.ServerVariables("Http_HOST")+"网站留言"&now()		  '信件主题
		msg.Body = "主题:"+title+chr(10)+chr(13)+mailstr  '正文
		msg.Send ("smtp.sina.net")               'smtp服务器地址(企业邮局地址)
		set msg = nothing

	end if


	sql = "insert into contact (title,email,myname,corpname,address,phone,fax,content,flag,code,creadate, sysemail) values"_
		& "('"&title&"','"&email&"','"&myname&"','"&corpname&"','"&address&"','"&phone&"','"&fax&"','"&content&"','0','"&code&"','"&now()&"', '"&sys_email&"')"
	cn.Execute sql
	set rs = nothing
	cn.Close
	set cn = nothing

	Response.Redirect "contact.asp?code="&code&"&flag=1"
end if



if code="" then
	sql="select code,deptname,address,phone,fax,email,website,linkman,zip from sys_dept order by sortnum"
else
	sql="select code,deptname,address,phone,fax,email,website,linkman,zip from sys_dept where code='"+code+"' order by sortnum"
end if
rs.Open sql,cn,0,1,1
if not rs.EOF then
	code=rs("code")
	deptname=trim(rs("deptname"))
	address=trim(rs("address"))
	phone=trim(rs("phone"))
	fax=trim(rs("fax"))
	email=trim(rs("email"))
	website=trim(rs("website"))
	linkman=trim(rs("linkman"))
	zip=trim(rs("zip"))
else
	response.end
end if
rs.Close
%>




<!-- #include file="begin.asp" -->
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="13">&nbsp;</td>
    <td valign="bottom"><a href="default.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image45','','images/bt_defautl_1.jpg',1)"><img src="images/bt_defautl_01.jpg" name="Image45" width="84" height="31" border="0"></a></td>
    <td width="1"></td>
    <td><a href="company.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image38','','images/bt_company_1.jpg',1)"><img src="images/bt_company_01.jpg" name="Image38" width="84" height="31" border="0"></a></td>
    <td width="1"></td>
    <td><a href="policy.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image39','','images/bt_policy_1.jpg',1)"><img src="images/bt_policy_01.jpg" name="Image39" width="84" height="31" border="0"></a></td>
    <td width="1"></td>
    <td><a href="news.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image40','','images/bt_news_1.jpg',1)"><img src="images/bt_news_01.jpg" name="Image40" width="84" height="31" border="0"></a></td>
    <td width="1"></td>
    <td width="1"><a href="investment.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image41','','images/bt_investment_1.jpg',1)"><img src="images/bt_investment_01.jpg" name="Image41" width="84" height="31" border="0"></a></td>
    <td width="1"></td>
    <td><a href="member.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image37','','images/bt_member_1.jpg',1)"><img src="images/bt_member_01.jpg" name="Image37" width="84" height="31" border="0"></a></td>
    <td width="1"></td>
    <td><a href="show.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image42','','images/bt_show_1.jpg',1)"><img src="images/bt_show_01.jpg" name="Image42" width="84" height="31" border="0"></a></td>
    <td width="1"></td>
    <td><a href="forum/forum.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('Image43','','images/bt_bbs_1.jpg',1)"><img src="images/bt_bbs_01.jpg" name="Image43" width="84" height="31" border="0"></a></td>
    <td width="1"></td>
    <td><a href="contact.asp" ><img src="images/bt_contact_1.jpg" name="Image44" width="84" height="31" border="0"></a></td>
  </tr>
</table>
<table width="778" height="8" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td bgcolor="#e90100"></td>
  </tr>
</table>
<table width="778" height="3" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td bgcolor="#FFFFFF"></td>
  </tr>
</table>
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td background="images/bg_ban.jpg">
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="778" height="134">
        <param name="movie" value="images/ban.swf">
        <param name="quality" value="high">
        <param name="wmode" value="transparent">
        <embed src="images/ban.swf" width="778" height="134" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" wmode="transparent"></embed></object></td>
  </tr>
</table>
<table width="778" height="8" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td bgcolor="#000000"></td>
  </tr>
</table>
<table width="778" height="4" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td bgcolor="#FFFFFF"></td>
  </tr>
</table>
<table width="778" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr> 
    <td width="180" height="50%" valign="top" bgcolor="#ffc875"> <table width="100%" height="44" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td align="center" background="images/company/bg_top_left1.jpg" class="font">联系我们</td>
		  
						<%
						sql = "select code,deptname from sys_dept order by sortnum"
						rs.open sql,cn,0,1,1
						if not rs.EOF then
						%>
        </tr>
      </table>
      <table width="100%" height="1" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr> 
		
          <td bgcolor="#ffc875"></td>
        </tr>
      </table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
	  
        <tr> 
          <td bgcolor="#e90100"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td width="8%">&nbsp;</td>
                <td width="30%" align="left"><img src="images/company/arrow1.gif" width="5" height="8"></td>
                <td><a href="contact.asp?code=<%=rs("code")%>" class="a01"><%=trim(rs("deptname"))%></a></td>
              </tr>
			  <%
			  rs.movenext
			  end if
			  
			  %>
            </table></td>
          <td width="6"><img src="images/company/point_title1_1.jpg" width="6" height="23"></td>
        </tr>
      </table>
      <table width="100%" height="1" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr> 
          <td bgcolor="#ffc875"></td>
        </tr>
      </table>
	  <%do while not rs.eof%>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr> 
          <td bgcolor="#f4a022"><table width="100%" border="0" cellspacing="0" cellpadding="0">
              <tr> 
                <td width="8%">&nbsp;</td>
                <td width="30%" align="left"><img src="images/company/arrow2.gif" width="5" height="8"></td>
                <td><a href="contact.asp?code=<%=rs("code")%>" class="a01"><%=trim(rs("deptname"))%></a></td>
              </tr>
            </table></td>
          <td width="6"><img src="images/company/point_title2_1.jpg" width="6" height="23"></td>
        </tr>
		
      </table>
	  
      <table width="100%" height="1" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr> 
          <td bgcolor="#ffc875"></td>
        </tr>
      </table>
	  		<%
			rs.MoveNext
		loop

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -