📄 qiugouadd.asp
字号:
<!-- #include file="inc/char.asp" -->
<!-- #include file="conn.asp" -->
<!-- #include file="inc/adovbs.inc" -->
<!-- #include file="head2.asp" -->
<!-- #include file="chksession.asp" -->
<%
dim rs,sql
if rst("title")="" then
%>
<html>
<head>
<TITLE><%=webname%>--会员管理中心---联系QQ:6439358,联系邮箱vqqq59r@163.com,网站www.vqqq.com,谢谢大家对我们系统的支持</title>
<META http-equiv=Content-Type content="text/html; charset="<%=charset%>">
<META name="keywords" content="<%=keywords%>">
<META name="description" content="<%=description%>">
<link href="images/main_style.css" rel="stylesheet" type="text/css">
<script language="javascript">
function check()
{
if(document.form1.title.value=="" || (!check_err(document.form1.title.value)))
{
alert("求购信息标题不能为空,且不能包含非法字符");
return false;
}
if(document.form1.author.value=="" || (!check_err(document.form1.author.value)) )
{
alert("发布人名称不能为空,且不能包含非法字符");
return false;
}
if(document.form1.content.value=="" || (!check_err(document.form1.content.value)))
{
alert("求购信息内容不能为空,且不能包含非法字符");
return false;
}
}
function check_err(char) {
if (!(char.indexOf ('script') == -1))
return false;
return true;
}
</script>
</HEAD>
<BODY bgColor=#ffffff leftMargin=0 onmouseover=exitpop=false text=#000000 topMargin=0 marginheight="0" marginwidth="0">
<%
response.buffer=true
dim user
user=session("user")
sql="select * from users where regUsername='"&user&"'"
set rs=conn.execute(sql)
%>
<TABLE border=0 cellPadding=0 cellSpacing=0 width="760" align=center>
<TBODY>
<TR>
<TD align=left vAlign=top width=150>
<!--#include file="vqqqleft.asp" -->
</TD>
<TD width=5> </TD>
<td align=center valign="top">
<table width='100%' border=0 cellPadding=4 cellSpacing=0 id='b1'>
<tr><td height='10' colspan='2'></td></tr><tr>
<td height='25' >您的位置:信息管理 〉添加求购信息</td><td height='25'><a href="qiugouedit.asp">修改求购信息</a></td>
</tr></table><br>
<table cellpading=0 cellspacing=0 border=0 width=560 align=center>
<tr>
<td width=1 class=titletd> </td>
<td width=100%>
<table cellpading=0 cellspacing=1 border=0 width=100% height=206 align=center class=tablebg>
<form action="qiugouadd.asp" method="post" name="form1" onsubmit="javascript:return check();"
<tr>
<td width=30% align=center class=titletd colspan=2 height=20>------->添 加 求 购 信 息<-------</td>
</tr>
<tr>
<td width=30% align=right class=td>信息标题:</td><td align=left class=td><input name=title type=text size=50 maxlength=30></td>
</tr>
<tr>
<td width=30% align=right class=td>发 布 人:</td><td align=left class=td><input name=author type=text size=50 value="<%=session("user")%>" maxlength=20 readonly></td>
</tr>
<tr>
<td width=30% align=right class=td>信息类别:</td><td align=left class=td>
<select name=type>
<option value="求购">求购</option>
<option value="求租">求租</option>
<option value="合作">合作</option>
</select>
</td>
</tr>
<tr>
<td width=30% align=right class=td>信息颜色:</td><td align=left class=td>
<select name=color>
<option value="red">红色</option>
<option value="blue">蓝色</option>
<option value="black">黑色</option>
</select>
</td>
</tr>
<tr>
<td width=30% align=right class=td>信息内容:</td><td align=left class=td>
<textarea name="content" cols="50" rows="7" wrap="hard"></textarea></td>
</tr>
<tr>
<td width=30% align=center colspan=2 class=td><input name=submit type=submit value=添加求购信息> <input name=reset type=reset value=重写></td>
</tr>
</form>
</table>
</td>
<td width=1 class=titletd> </td>
</tr>
</table>
</td>
</tr>
</table>
</body>
<%
else
if rst("submit")="添加求购信息" then
call chk2(rst("title"))
call chk2(rst("author"))
call chk2(rst("content"))
set rsuser=conn.execute("select regid from users where regusername='"&rst("author")&"'")
set rs_new=Server.CreateObject("ADODB.Recordset")
sql_news="select * from qiugou where qgid is null"
rs_new.open sql_news,conn,3,3
rs_new.addnew
rs_new("qgtitle")=rst("title")
rs_new("qgownerid")=rsuser("regid")
rs_new("qginfo")=rst("content")
rs_new("qgtype")=rst("type")
rs_new("qgcolor")=rst("color")
rs_new("qgupdatetime")=now()
rs_new.update
session("add")="success"
rs_new.close
set rs_new=nothing
response.write"<SCRIPT language=JavaScript>alert('求购信息发布成功!');"
response.write"this.location.href='qiugouadd.asp';</SCRIPT>"
response.end
else
response.write"<SCRIPT language=JavaScript>alert('错误的提交方式!');"
response.write"this.location.href='qiugouadd.asp';</SCRIPT>"
response.end
end if
end if
%>
<!--#include file="bottom.asp"-->
</body>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -