recommend.asp

来自「采用ASP。NET做的网上游戏交易平台」· ASP 代码 · 共 132 行

ASP
132
字号
<!--#include file="dbconn.asp"-->
<!--#include file="isValidUser.asp"-->
<html>
<head>
<%
if request.form("txtname")<>"" then
dim myname,myphone,mymemo,mytmpid
myname=trim(request.form("txtname"))
myphone=trim(request.form("txtphone"))
mymemo=trim(request.form("txtmemo"))
myname=replace(myname,"'","")
myphone=replace(myphone,"'","")
mymemo=replace(mymemo,"'","")
mytmpid=trim(request.form("txtid"))
sql="select * from ziliao  where ID="&cint(mytmpid)
'sql="update ziliao set recommed=recommed+'"&myname&"*"&myphone&"*"&mymemo&"#' where ID="&cint(mytmpid)
set rrrs=server.CreateObject("adodb.recordset")
rrrs.open sql,conn,3,2
tmprecommed=rrrs("recommed")
if tmprecommed="" then
tmprecommed=now()&"*"&myname&"*"&myphone&"*"&mymemo&"#"
else
tmprecommed=tmprecommed&now()&"*"&myname&"*"&myphone&"*"&mymemo&"#"
end if
rrrs("recommed")=tmprecommed
rrrs.update
rrrs.close
set rrrs=nothing
Response.Write "<script language=javascript>" &vbCrLf&_
"alert('留言成功,本窗口即将关闭!!!');" &vbCrLf&_
" window.close();" &vbCrLf&_
"</script>"
end if
dim myid,mypubid,myrealname
myid=request.querystring("idstr")
mypubid=request.querystring("pubidstr")
myrealname=request.querystring("namestr")
%>
<title><%="给 "&myrealname&" 的留言"%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href="2v.css" rel=stylesheet>
</head>
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0">

<div align="center">
	<table border="0" width="500" cellspacing="0" cellpadding="0" >
				<tr>
					<td height=5 bgcolor="#006cf0" width="770" colspan="4"></td>
				</tr>
				<tr>
					
      <td  bgcolor="#005ACA" width="355" height="25">
			 <font color="#FFFFFF"><b>给 
			<%=myrealname%> 发送留言 </b></font>
</td>
					
      <td  bgcolor="#005ACA" width="162" height="25">   </td>
					<td  bgcolor="#005ACA" width="199" height="25">
			 </td>
					<td  bgcolor="#005ACA" width="54" height="25">
			 </td>
				</tr>
			</table>
			<table border="0" width="500" cellspacing="0" cellpadding="0" bgcolor="#004293">
				<tr>
					<td height=3></td>
				</tr>
			</table>
			<table cellSpacing="0" width="500" border="0" cellpadding="0">
					<tr valign=top>
						<td align="right" width="757">
										<div align="center">
											<form action="recommend.asp" method="post" name="frmcommend" target="_self">
												<table cellSpacing="3" width="100%" border="0" bgcolor="#FFFFFF">
												<input type="hidden" name="AUTHOR">
												<input type="hidden" value="385787" name="PID">
												<tr>
													<td width="101">您的姓名:&nbsp; 
													</td>
													<td width="380">
													<input size="40" name="txtname">
                  <input name="txtid" type="hidden" value="<%=request.QueryString("idstr")%>">
                  <input name="txtflagid" type="hidden" value="<%=request.QueryString("pubidstr")%>"></td>
												</tr>
												<tr>
													<td width="101">联系方法:&nbsp; 
													</td>
													<td width="380">
													<input size="40" name="txtphone"></td>
												</tr>
												<tr>
													<td width="101">留言内容:</td>
													<td>
													<textarea name="txtmemo" rows="6" cols="40" ></textarea></td>
												</tr>
												<tr>
													<td> </td>
													<td align="middle" width="380">
													<input type="button" value="发 送 留 言" name="btncomment" style="float: left" onclick="chkform();">
                &nbsp;</td>
												</tr>
											</table></form>
										
						</td>
					</tr>
			</table>
</div>
</body>
</html>
<script language="JavaScript">
function chkform(){
if (frmcommend.txtname.value==""){
	alert("留言内容联系方式姓名不能为空!");
	frmcommend.txtname.focus();
	return false;
	}
else if(frmcommend.txtphone.value==""){
	alert("联系方式不能为空!");
	frmcommend.txtphone.focus();
	return false;
	}
else if(frmcommend.txtmemo.value==""){
	alert("留言内容不能为空!");
	frmcommend.txtmemo.focus();
	return false;
	}
else{
	frmcommend.action="recommend.asp";
	frmcommend.submit();
	}
}
</script>

⌨️ 快捷键说明

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