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

📄 s.asp

📁 1.地址缩短
💻 ASP
字号:
<!--#include file="boardconn.asp"-->
<!--#include file="inc/sql.asp"-->
<!--#include file="inc/inc.asp"-->
<!--#include file="inc/ip.asp"-->
<!--#include file="inc/const.asp"-->
<!--#include file="inc/postubb.asp"-->
<%
dim count
set rs=server.createobject("adodb.recordset")
sql = "select * from QiQiBoy_Class_Disp order by BoardClass asc"
rs.open sql,conn,1,1
%>
<SCRIPT language="JavaScript">
var onecount;
onecount=0;
subcat = new Array();
        <%
        count = 0
        do while not rs.eof 
        %>
subcat[<%=count%>] = new Array("<%= trim(rs("BoardClassName"))%>","<%= trim(rs("BoardNlass"))%>","<%= trim(rs("BoardClass"))%>");
        <%
        count = count + 1
        rs.movenext
        loop
        rs.close
        %>
onecount=<%=count%>;

function changelocation(locationid)
    {
    document.form.BoardClass.length = 0; 

    var locationid=locationid;
    var i;
    for (i=0;i < onecount; i++)
        {
            if (subcat[i][1] == locationid)
            { 
                document.form.BoardClass.options[document.form.BoardClass.length] = new Option(subcat[i][0], subcat[i][2]);
            }        
        }
        
    }    
</SCRIPT>
<SCRIPT language="javascript">
<!--
function CheckForm()
{
	document.form.txtcontent.value=document.form.doc_html.value;
	return true
}
//-->
</SCRIPT>
<%
Dim Action
Action=CInt(Request.QueryString("Action"))
%>
<HTML>
<HEAD>
<TITLE>创建贴吧 - <%=HOST_NAME%> - <%=HOST_LIST%></TITLE>
<META http-equiv=Content-Type content="text/html; charset=GB2312">
<link rel="shortcut icon" href="images/bbs.ico">
<link href="style/style.css" rel="stylesheet" type="text/css">
<script language="JavaScript">
<!--
function form1_onsubmit() {
if (document.form1.Key.value=="")
	{
	  alert("友情提示!\n\n请完整输入贴吧名称!")
	  document.form1.Key.focus()
	  return false
	 }
}
// -->
</script>
</HEAD>
<BODY bgColor=#ffffff leftMargin=0 topMargin=0>
<!--#include file="top.asp"-->
<TABLE cellSpacing=0 cellPadding=0 width=100% align=center border=0>
  <TBODY>
  <TR>
    <TD width=1% height=20 bgColor=<%=HOST_TITLE%>></TD><TD width=99% height=20 bgColor=<%=HOST_TITLE%> class=INDEX_VMALL><a href="Index.Asp"><font color=<%=HOST_FONT%>>首页</font></a> <font color=<%=HOST_FONT%>>&gt;</font> <font color=<%=HOST_FONT%>><u>创建贴吧</u></font></TD></TR></TBODY></TABLE>

<TABLE cellSpacing=0 cellPadding=0 width=100% align=center border=0 bgColor=#ffffff>
  <TBODY>
        <TR>
          <TD>
            <TABLE cellSpacing=0 cellPadding=0 width="100%" align=center border=0>
              <TBODY>

<%
dim Key,T,C,U
Keys=Trim(request.form("Key"))
if Keys="" then 
Keys=Trim(Request("Key"))
end if
Keys=replace(Keys,"'","")
Keys=replace(Keys,"<","&lt;")
Keys=replace(Keys,">","&gt;")
S=request.form("S")
F="F"
T="T"
C="C"
U="U"
%>
<% if S = F or S="" then %>
<% if Action <> 1 then %>
<%
Sql="Select * from QiQiBoy_Board_Disp where BoardName='"+Keys+"'"
Set Rs=Conn.execute(Sql)
if rs.eof then
%>
              <TR>
                <TD width="5%" height="50"></TD>
                <TD width="90%" height="50" colspan="2" align=center class=INDEX_XMALL><u>有情提示:非常抱歉!您要搜索的贴吧不存在或已被删除,您可以通过提交操作来创建该贴吧!!!</u></TD>
                <TD width="5%" height="50"></TD></TR>
            <form name="form" onsubmit="return form_onsubmit()" method="post" action="s.asp?Action=1">
              <TR>
                <TD width="5%" height="30"></TD>
                <TD width="20%" height="30" align="right" class=INDEX_XMALL>所属大类:</td><TD width="70%" height="30">
<SELECT name="BoardNlass" onChange="changelocation(document.form.BoardNlass.options[document.form.BoardNlass.selectedIndex].value)" size="1">
<%
set rs=server.createobject("adodb.recordset")
sql = "select * from QiQiBoy_Nlass_Disp"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "..."
response.end
else
%>
<OPTION selected value>==请选择大类==</OPTION>
<%do while not rs.eof%>
<OPTION value="<%=trim(rs("BoardNlass"))%>"><%=trim(rs("BoardNlassName"))%></OPTION>
<%
rs.movenext
loop
end if
rs.close
set rs=nothing
%></SELECT>
</TD>
                <TD width="5%" height="30"></TD></TR>
              <TR>
                <TD width="5%" height="30"></TD>
                <TD width="20%" height="30" align="right" class=INDEX_XMALL>所属小类:</td><TD width="70%" height="30"><SELECT name="BoardClass"><OPTION selected value>==请选择小类==</OPTION></SELECT></TD>
                <TD width="5%" height="30"></TD></TR>
              <TR>
                <TD width="5%" height="30"></TD>
                <TD width="20%" height="30" align="right" class=INDEX_XMALL>贴吧名称:</td><TD width="70%" height="30"><input name="BoardName" value="<%=Keys%>" maxLength="50" size="50"> *</TD>
                <TD width="5%" height="30"></TD></TR>
              <TR>
                <TD width="5%" height="30"></TD>
                <TD width="20%" height="30" align="right" class=INDEX_XMALL>贴吧简介:</td><TD width="70%" height="30"><TEXTAREA name="BoardDescription" rows="6" cols="60"></TEXTAREA> *</TD>
                <TD width="5%" height="30"></TD></TR>
              <TR>
                <TD width="5%" height="30"></TD>
                <TD width="20%" height="30"></td><TD width="70%" height="30"><INPUT type=submit name="SUBMIT" value=" 创建贴吧 "></TD>
                <TD width="5%" height="30"></TD></TR></form>
              <TR>
                <TD width="5%" height="30"></TD>
                <TD width="90%" height="10" colspan="2"></TD>
                <TD width="5%" height="30"></TD></TR>
<% else
response.redirect"t.asp?/="&Server.UrlEncode(rs("BoardName"))&""
end if %>
<% else %>
<%
server_v1=Cstr(Request.ServerVariables("HTTP_REFERER"))
server_v2=Cstr(Request.ServerVariables("SERVER_NAME"))
if mid(server_v1,8,len(server_v2))<>server_v2 then
response.write "<br><br><center><table border=1 cellpadding=20 bordercolor=black bgcolor=#EEEEEE width=450>"
response.write "<tr><td style=font:9pt Verdana>"
response.write "<center><font face=Georgia,Tahoma size=2><u>友情提示:服务器禁止非法操作...</u></font></center>"
response.write "</td></tr></table></center>"
response.end
end if
%>
<%
fqys=request.servervariables("query_string") 
dim nothis(18) 
nothis(0)="net user" 
nothis(1)="xp_cmdshell" 
nothis(2)="/add" 
nothis(3)="exec%20master.dbo.xp_cmdshell" 
nothis(4)="net localgroup administrators" 
nothis(5)="select" 
nothis(6)="count" 
nothis(7)="asc" 
nothis(8)="char" 
nothis(9)="mid" 
nothis(10)="'" 
nothis(11)=":" 
nothis(12)="""" 
nothis(13)="insert" 
nothis(14)="delete" 
nothis(15)="drop" 
nothis(16)="truncate" 
nothis(17)="from" 
nothis(18)="%" 
errc=false 
for i= 0 to ubound(nothis) 
if instr(FQYs,nothis(i))<>0 then 
errc=true 
end if 
next 
if errc then 
response.write "<br><br><center><table border=1 cellpadding=20 bordercolor=black bgcolor=#EEEEEE width=450>"
response.write "<tr><td style=font:9pt Verdana>"
response.write "<center><font face=Georgia,Tahoma size=2><u>友情提示:服务器禁止非法操作...</u></font></center>"
response.write "</td></tr></table></center>"
response.end 
end if 
%>
<%
	If HOST_NEW=1 then
		If UserGroupID<2 then
			Response.Write ("<script>alert('友情提示!\n\n非会员不能创建贴吧!');history.back();</script>")
			Response.end
		End If
	End If
	Dim BoardNlass,BoardClass,BoardChild,BoardName,BoardDescription
	BoardNlass=PostString(Request.Form("BoardNlass"))
	BoardClass=PostString(Request.Form("BoardClass"))
	BoardChild=CInt(Request.QueryString("BoardChild"))
	BoardName=Request.Form("BoardName")
	BoardName=PostString(BoardName)
	BoardDescription=PostString(Request.Form("BoardDescription"))
	If BoardNlass="" Then
		Response.Write ("<script>alert('友情提示!\n\n请选择贴吧所属大类!');history.back();</script>")
		Response.end
	End If
	If BoardClass="" Then
		Response.Write ("<script>alert('友情提示!\n\n请选择贴吧所属小类!');history.back();</script>")
		Response.end
	End If
	if Trim(BoardName)="" or Len(BoardName)>50 or Len(BoardName)<1 then
		Response.Write ("<script>alert('友情提示!\n\n贴吧名称不得小于1字数或大于50字数!');history.back();</script>")
		Response.end
	else
		BoardName=Trim(BoardName)
	end if
	if Trim(BoardDescription)="" or Len(BoardDescription)>80 or Len(BoardDescription)<3 then
		Response.Write ("<script>alert('友情提示!\n\n贴吧简介不得小于3字数或大于80字数!');history.back();</script>")
		Response.end
	else
		BoardDescription=Trim(BoardDescription)
	end if
	Sql="select BoardName from QiQiBoy_Board_Disp where BoardName='"&BoardName&"'"
	Set Rs=Conn.execute(Sql)
	if not rs.eof then
		Response.Write ("<script>alert('友情提示!\n\n提交的贴吧已被申请使用!');history.back();</script>")
		Response.end
	end if
	Sql="select Max(BoardID) from QiQiBoy_Board_Disp"
	Set Rs=Conn.execute(Sql)
	MaxBoardID=Rs(0)
	if isNull(MaxBoardID) then MaxBoardID=0
	Sql="select Max(BoardChild) from QiQiBoy_Board_Disp"
	Set Rs=Conn.execute(Sql)
	MaxBoardChild=Rs(0)
        if isNull(MaxBoardChild) then MaxBoardChild=0
	Sql="Insert into QiQiBoy_Board_Disp (BoardID,BoardNlass,BoardClass,BoardChild,BoardName,BoardDescription,BoardMaster,LastModify) values("&MaxBoardID+1&",'"&BoardNlass&"','"&BoardClass&"',"&MaxBoardChild+1&",'"&BoardName&"','"&BoardDescription&"',' ',#"&Now()&"#)"
	Conn.execute(Sql)
	Sql="Update QiQiBoy_Status_Disp set TotalBoards=TotalBoards+1"
	Set Rs=Conn.execute(Sql)
%>
<% end if %>
<script language="JavaScript" src="js/board_js.asp"></script>
<% if Action = 1 then %>
              <TR>
                <TD width="5%" height="20"></TD>
                <TD colspan="2" width="90%" height="20"></TD>
                <TD width="5%" height="20"></TD></TR>
              <TR>
                <TD colspan="4" background="IMAGES/betle_img_line.gif"></TD></TR>
              <TR>
                <TD width="5%" height="20"></TD>
                <TD class=INDEX_XMALL width="90%" height="50" align=center><img src="Images/loading.gif" border="0"></TD>
                <TD width="5%" height="20"></TD></TR>
              <TR>
                <TD width="5%" height="20"></TD>
                <TD colspan="2" width="90%" height="20"></TD>
                <TD width="5%" height="20"></TD></TR>
              <TR>
                <TD colspan="4" background="IMAGES/betle_img_line.gif"></TD></TR>
<%
Sql="select BoardName from QiQiBoy_Board_Disp where BoardNlass="&Cint(BoardNlass)&" and BoardClass="&Cint(BoardClass)&" and BoardChild="&Cint(MaxBoardChild+1)
Set Rs=Conn.execute(Sql)
BoardName=rs(0)
%>
<meta http-equiv="refresh" content="0;URL=t.asp?/=<%=Server.UrlEncode(BoardName)%>">
<% end if %>

<%else if S=T or S=C or S=U then%>
<%
response.redirect"y.asp?M="&S&"&N="&Server.UrlEncode(Keys)&""
%>
<%end if%>
<%end if%>
</TBODY></TABLE></TD></TR></TBODY></TABLE>
<!--#include file="end.asp"-->

⌨️ 快捷键说明

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