📄 add.asp
字号:
<!--#include file=conn.asp-->
<%
action=request("action")
memo=request("memo")
title=request("title")
email=request("email")
url=request("url")
classname=request("classname")
leibie=request("leibie")
if action="add_wz" then
if title="" or memo="" or url="" or email="" or leibie="" then
Response.Write "表单填写不完整!"
Response.End
end if
if Session("lastaddedwz")<>title then
set rss=server.createobject("adodb.recordset")
rss.open "select * from detail",conn,1,3
rss.addnew
rss("title")=title
rss("url")=url
rss("classid")=leibie
rss("email")=email
rss("memo")=memo
rss("verity")=0
rss.update
rss.close
set rss=nothing
Session("lastaddedwz")=title
Response.Write "<table width=100% height=100%\><tr><td width=100% height=100% align=center>"
Response.Write "你的网站已成功提交!我们会在48小时内审核是否收录,因提交的网站过多难免有所丢失,如一周后您的网站还未被收录进来,您可以发邮件给我们djundi@126.com或直接给本站留言http://www.Soigo.com"
Response.Write "</td></tr></table>"
Response.End
end if
end if
if action="add_leibie" then
if classname="" or leibie="" then
Response.Write "表单填写不完整!"
Response.End
end if
if Session("lastaddedleibie")<>classname then
set rss=server.createobject("adodb.recordset")
rss.open "select * from feilei",conn,1,3
rss.addnew
rss("classname")=classname
rss("topclass")=leibie
set r=server.createobject("adodb.recordset")
r.open "select * from feilei where classid="&leibie,conn,1,3
if not r.eof then
level=r("level")+1
else
level=1
end if
r.close
set r=nothing
rss("level")=level
if memo="" then memo=" "
rss("memo")=memo
rss("verity")=0
rss.update
rss.close
set rss=nothing
Session("lastaddedleibie")=classname
Response.Write "<table width=100% height=100%\><tr><td width=100% height=100% align=center>"
Response.Write "新网站分类信息已经成功提交!我们会在72小时内审核(未审核通过的分类不在前台显示)!"
Response.Write "</td></tr></table>"
Response.End
end if
end if
%>
<html>
<head>
<title>新站登录</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<style type="text/css">
<!--
td { font-size: 12px}
.style2 {color: #0066CC}
-->
</style>
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" link="#000000" vlink="#000066" background="images/bg_test.gif">
<script id=clientEventHandlersJS language=javascript>
<!--
function CheckForm()
{
if (document.form.title.value==""){
alert("网站标题不能为空!");
document.form.Name.focus();
return false;
}
if (document.form.leibie.value=="0"){
alert("请选择网站类别!");
document.form.From.focus();
return false;
}
if (document.form.url.value==""){
alert("网站地址不能为空!");
document.form.HomePage.focus();
return false;
}
if (document.form.memo.value==""){
alert("网站介绍不能为空!");
document.form.message.focus();
return false;
}
if (document.form.memo.value.length>=100){
alert("网站介绍请控制在50个字符以内!");
document.form.message.focus();
return false;
}
if (document.form.Email.value==""){
alert("Email不能为空!");
document.form.Email.focus();
return false;
}
Email=form.Email.value
if (Email!=null) {
if (Email.charAt(0)=="@") {
alert("请填入有效的Email地址!")
return false
}
var j=0,k=0
for (i=0;i<Email.length;i++) {
var oneChar=Email.charAt(i)
if (oneChar=="@") j=i
if (oneChar==".") k=i
}
if (k<j || k==0 || j==0 || k==j+1) {
alert("请填入有效的Email地址!")
return false;
}
}
return true;
}
-->
</script>
<table width="760" border="1" cellspacing="2" cellpadding="4" align="center" bgcolor="#FFFFFF" bordercolor="#BCBCBC">
<tr>
<td bgcolor="#F0F0F0" height="20"><font color="#000000">您的位置:<b><a href="./" class="title">首页</a></b>->
网站登录</font></td>
</tr>
</table>
<table width="760" border="0" cellspacing="0" cellpadding="0" align="center">
<!--DWLayoutTable-->
<form action="add.asp" method=POST name=form onSubmit="return CheckForm()">
<tr>
<td> <table width="100%" border="0" cellspacing="0" cellpadding="0" bgcolor="#FFFFFF">
<!--DWLayoutTable-->
<tr>
<td width="760" height="378" valign="top"> <table border="1" cellspacing="2" bordercolorlight="#C0C0C0" bgcolor="#FFFFFF" width="100%" align="center" cellpadding="5" bordercolor="#BCBCBC" height="378">
<tr bgcolor="#F0F0F0">
<td colspan="2"> 填写贵站相关资料</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="125" align="center">网站名称:</td>
<td width="407"> <input size="20" name="title" type="text" class="TDBorder">
</td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="125" bgcolor="#F0F0F0"> <div align="center">网站分类:</div></td>
<td width="407" bgcolor="#F0F0F0"> <select name="leibie">
<option selected value='0'>请选择软件分类</option>
<%
dim rs(5)
function listunder(i)
set rs(i)=server.createobject("adodb.recordset")
rs(i).open "select classid,classname,verity from feilei where topclass="&rs(i-1)("classid"),conn,1,3
while not rs(i).eof
dim topclassname
topclassname=""
for x=1 to i
topclassname=topclassname&rs(x-1)("classname")&">"
next
fujia=""
if rs(i)("verity")<>1 then fujia="(未审核)"
response.write "<option value='"&rs(i)("classid")&"'>"&topclassname&rs(i)("classname")&fujia&"</option>"&vbCrLf
if i<Ubound(rs) then
call listunder(i+1)
end if
rs(i).movenext
wend
end function
set rs(0)=server.createobject("adodb.recordset")
rs(0).open "select classid,classname,verity from feilei where topclass=0",conn,1,3
while not rs(0).eof
fujia=""
if rs(0)("verity")<>1 then fujia="(未审核)"
response.write "<option value='"&rs(0)("classid")&"'>"&rs(0)("classname")&fujia&"</option>"&vbCrLf
call listunder(1)
rs(0).movenext
wend
%>
</select> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="125"> <div align="center">E-mail:</div></td>
<td width="407"> <input
size="20" name="Email" type="text" class="TDBorder"> </td>
</tr>
<tr bgcolor="#F0F0F0">
<td width="125"> <div align="center">网站地址:</div></td>
<td width="407"> <input
size="27" name="url" type="text" value="http://" class="TDBorder"> </td>
</tr>
<tr bgcolor="#FFFFFF">
<td width="125"> <div align="center">网站简介:</div></td>
<td width="407"> <textarea cols="30" id="MsgForm" name="memo" rows="5" ></textarea>
<br>
100字以内,超过将出现错!</td>
</tr>
<tr bgcolor="#F0F0F0">
<td align="center" colspan=2 height="33"> <input type="hidden" name="action" value="add_wz">
<input type="submit" value="提交" style="FONT-SIZE: 9pt"> </td>
</tr>
</table></td>
</tr>
<tr>
<td height="57" align="center"><p><font color="#FF0000"><b>重要提示:</b></font><a href="link/" target="_blank">先别急着提交,先在这里申请个连接,<br>
并做好本站的连接;否则你提交N次也不会被通过!!!</a></p></td>
</tr>
</table></td>
</tr>
</form>
<tr width='100%'>
<td width="100%" align="center"> <table width="75%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table>
<table cellspacing="2" cellpadding="5" bgcolor="#FFFFFF" border="1" bordercolor="#BCBCBC">
<tr>
<td bgcolor="#F5F5F5"> <br>
如果你觉得没有适合的分类,你可以在此添加一个分类:<br> <form action="add.asp" method="post">
类别名称:
<input name="classname" size="15">
上级类别:
<select name="leibie">
<option selected value="0">没有上级类别</option>
<%
set rs(0)=server.createobject("adodb.recordset")
rs(0).open "select classid,classname,verity from feilei where topclass=0",conn,1,3
while not rs(0).eof
fujia=""
if rs(0)("verity")<>1 then fujia="(未审核)"
response.write "<option value='"&rs(0)("classid")&"'>"&rs(0)("classname")&fujia&"</option>"&vbCrLf
call listunder(1)
rs(0).movenext
wend
%>
</select>
<br>
其他信息:
<input name="memo" size="50">
<br>
<input type="hidden" name="action" value="add_leibie">
<input type="submit" value="添加新类别">
</form></td>
</tr>
</table>
<br> <table width="100%" border="0" align="center" cellspacing="0" cellpadding="0">
<tr>
<td> </td>
</tr>
</table></td>
</tr>
<tr>
<td bgcolor="#F0F0F0" height="25"> <div align="center">*未通过审核的类别不在前台显示(包括其下属分类及网站)</div></td>
</tr>
</table>
<br>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -