📄 addask.asp
字号:
<!--#include virtual="manage/include/conn.asp"-->
<%if request.ServerVariables("CONTENT_LENGTH")>0 then%>
<%
title=trim(request("title"))
title=replace(title,"'","‘")
content=trim(request("content"))
content=replace(content,"'","‘")
content=replace(content,chr(13),"<br>")
content=replace(content," "," ")
author=trim(request("author"))
author=replace(author,"'","’")
if title="" or content="" or author="" then
%>
<script language="javascript">
alert("请准确填写留言信息");
setTimeout("window.close();",10);
</script>
<%
response.End()
end if
postdate=now()
set rs=conn.execute("insert into tb_BBS (title,content,backcount,readcount,author,postdate,upid) values ('"&title&"','"&content&"',0,0,'"&author&"','"&postdate&"',0)")
response.write "<center><br><h3>留言成功</h3></center>"
%>
<script language="javascript">
opener.location.reload();
setTimeout("window.close();",800);
</script>
<%else%><title>发表新留言</title>
<style type="text/css">
<!--
.style1 {
color: #2A1FAA;
font-weight: bold;
}
-->
</style>
<body leftmargin="0" topmargin="0">
<link rel="stylesheet" href="manage/include/style.css" type="text/css">
<script language="javascript">
function chkfields(){
if(document.form1.author.value==''){
alert("请输入您的昵称!");
form1.author.focus();
return false;
}
if (document.form1.title.value==''){
alert("请输入您的问题标题!");
form1.title.focus();
return false;
}
if (document.form1.content.value==''){
alert("请输入您的内容!");
form1.content.focus();
return false;
}
return true;
}
</script>
<table border="0" width="100%">
<tr>
<td bgcolor="#D0F0FF" height="40" align="center"><span class="style1"><font size="4">发布新留言</font></span></td>
</tr>
<tr>
<td align="center">
<form action="<%=request.ServerVariables("PATH_INFO")%>" method="post" name="form1" onSubmit="return chkfields();">
<table border="0" width="98%">
<tr>
<td width="22%"><div align="right">昵称:</div></td><td width="78%"><input type="text" name="author" size="10" maxlength="10" style="border:1px solid;border-color:000000"></td>
</tr>
<tr>
<td><div align="right">标题:</div></td><td><input type="text" name="title" size="60" maxlength="50" style="border:1px solid;border-color:000000"></td>
</tr>
<tr>
<td valign="top"><div align="right">内容:</div></td><td><textarea cols="60" rows="6" name="content"></textarea></td>
</tr>
<tr>
<td colspan="2">
<input type="submit" name="b1" value="提 交" style="border:1px solid;border-color:#33CCFF;background-color:#FFFFFF"> <input type="reset" name="b2" value="取 消"
style="border:1px solid;border-color:#33CCFF;background-color:#FFFFFF" onClick="window.close();">
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
<%end if%>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -