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

📄 default.asp

📁 本源代码为大学生购物网的源代码,欢迎大家的下载,学习与交流
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<%@language=vbscript codepage=936 %>
<!--#INCLUDE FILE="config.asp"-->
<!--#INCLUDE FILE="background.asp"-->
<%session("list")=0%>
<%
Set rs=server.createobject("ADODB.RECORDSET")
session("useridname")=Request.cookies("ly")("useridname")
session("useridpassword")=Request.cookies("ly")("useridpassword")
if session("useridname")<>"" then
	rs.open "select level1 from register where username='"&session("useridname")&"'",conn,1,1
	if not rs.eof then
		if rs("level1")="管理员" then session("admin")=1
		if rs("level1")="版主" then session("admin")=2
		if rs("level1")<>"版主" and rs("level1")<>"管理员" then session("admin")=0
	else
		session("admin")=0
	end if
	rs.close
end if
if session("showmodal")="" then
	rs.open "Select modal From option1",Conn,3,3
	if rs("modal")=2 then response.Redirect("default1.asp")
	if rs("modal")=2 then response.Redirect("default1.asp")
	session("showmodal")="1"
	rs.close
end if
%>
<%
del=no
type1=no
del=request("del")
type1=request("type1")
if del="ok" and session("admin")=true then
if type1="ok" then
	rs.open "Select * From reply where id1="&request("id"),Conn,2,3
else
	rs.open "Select * From guest where id="&request("id"),Conn,2,3
end if
rs.delete
rs.update
rs.close
set rs=nothing
response.Redirect "default.asp"
end if

   text=request("text")
   option1=request("option")
   if option1="" then option1=0
if session("admin")="" then session("admin")=false
webname=rs11("webname")
homepage=rs11("weblink")
if request("jinghua")="1" then jinghua=" and jinghua=true" else jinghua=""
if rs11("show") and ((session("admin")<>1) and (session("admin")<>2)) then mark="(mark=true) and "
select case option1
case 1
SQL="Select * From guest where "&mark&"subject like '%"&text&"%'"&jinghua&" order by top1,lastdate desc"
case 2
SQL="Select * From guest where "&mark&"content like '%"&text&"%'"&jinghua&" order by top1,lastdate desc"
case 3
SQL="Select distinct (guest.id),guest.lastname,guest.fontcolor,guest.subject,guest.top1,guest.lastdate,guest.username,guest.face,guest.hf,guest.yd,guest.pic,guest.secret,guest.lock,guest.mark,guest.jinghua From guest,reply where "&mark&"(guest.id=reply.id) and (reply.replycontent like '%"&text&"%'"&")"&jinghua&" order by top1,guest.lastdate desc"
case 4
SQL="Select id,lastname,fontcolor,subject,top1,lastdate,username,face,hf,yd,pic,secret,lock,mark,jinghua From guest where username like '%"&text&"%' order by top1,lastdate UNION Select distinct (guest.id),guest.lastname,guest.fontcolor,guest.subject,guest.top1,guest.lastdate,guest.username,guest.face,guest.hf,guest.yd,guest.pic,guest.secret,guest.lock,guest.mark,guest.jinghua From guest,reply where "&mark&"(guest.id=reply.id) and (reply.replyname like '%"&text&"%'"&" or guest.username like '%"&text&"%')"&jinghua&" order by top1,guest.lastdate desc"
case 5
SQL="Select distinct (guest.id),guest.lastname,guest.fontcolor,guest.subject,guest.top1,guest.lastdate,guest.username,guest.face,guest.hf,guest.yd,guest.pic,guest.secret,guest.lock,guest.mark,guest.jinghua From guest,reply where (guest.mark=false or reply.mark=false) and (guest.id=reply.id) order by top1,guest.lastdate desc UNION Select id,lastname,fontcolor,subject,top1,lastdate,username,face,hf,yd,pic,secret,lock,mark,jinghua From guest where mark=false order by top1,lastdate desc"
case else
sql="SELECT * FROM guest where "&mark&"1=1"&jinghua&" order by top1,lastdate desc"
end select
   rs.open sql,conn,3,3
if not rs.eof then 
	 dim maxperpage,url,PageNo
	 url="default.asp?text="&text&"&option="&option1&"&jinghua="&request("jinghua")
	 rs.pagesize=rs11("row2")
	 PageNo=REQUEST("PageNo")
	 if PageNo="" or PageNo=0 then PageNo=1
	 RS.AbsolutePage=PageNo
	 TSum=rs.pagecount
	 maxperpage=rs.pagesize
	 RowCount=rs.PageSize
	   PageNo=PageNo+1
	   PageNo=PageNo-1
	 if CINT(PageNo)>1 then
	    if CINT(PageNo)>CINT(TSum) then
		  response.Write("对不起没有您想要的页数")
          Response.End
	    end if
	 end if		    
     if PageNo<0 then
	    response.Write("没有这一页!")
		Response.End
	 End if
end if
%>
<link href="1.css" rel="stylesheet" type="text/css">
<%if rs11("lytitle")="" then%><title>校园电子商务记者会</title><%else%><title><%=rs11("lytitle")%></title><%end if%>


<TABLE class=page cellSpacing=0 cellPadding=0 width=760 align=center border=0>
  <TBODY>
	  <TR>
    <TD>
<div align="center">
<!--#INCLUDE FILE="top.asp"-->
</div>


<table border=0 cellspacing=0 align=center width="760"> 
<tbody>

  <tr> 
    <td> <table width=100% border=0 align=center>
        <td width="183" align=left> <font color=#000000>讨论数:</font><font color=#000000><%=rs.RECORDCOUNT%></font> 
          总页数:<font color=#000000><%=TSum%></font>&nbsp; 第 <%=PageNo%> <font color=#000000>页</font>        </td>
        <td align=right> 
          <!--#INCLUDE FILE="link.asp"-->        </td>
      </table>    </td></tr>
  <tr>
    <td><HR SIZE=1 WIDTH=100% NOSHADE COLOR=#C0C0C0></td>
  </tr>
  <tr> 
    <td align=left><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr> 
          <td width="59%" height="20" valign="middle"> <img src="images/home.gif" width="16" height="16"><a href="<%=homepage%>"><%=webname%>首页</a> 
            <img src="images/style.gif" align=absmiddle><a href="default1.asp">讨论板方式查看 
          </a>配色:
          <select name="skin" id="skin" onChange="javascript:location.href='default.asp?skin='+document.all.skin.value">
              <option value="1" selected>蓝天白云</option>
              <option value="2" <%if skin=2 then response.write("selected")%>>水晶紫色</option>
              <option value="3" <%if skin=3 then response.write("selected")%>>秋意盎然</option>
              <option value="4" <%if skin=4 then response.write("selected")%>>绿野仙踪</option>
              <option value="5" <%if skin=5 then response.write("selected")%>>浓浓绿意</option>
              <option value="6" <%if skin=6 then response.write("selected")%>>橘子红了</option>
            </select></td>
          <td width="19%" valign="middle"><MARQUEE height=16 scrollAmount=2 scrollDelay=10 align="middle">
      <%=rs11("lygg")%>
    </MARQUEE></td>
          <td width="22%"> <div align="right"> 
              <% 
if TSum>1 Then
 If PageNo=TSum or PageNo<>1 Then 
   PrwePage=PageNo-1
   Response.Write "<A HREF=default.asp?Pageno=1"&"&text="&text&"&option="&option1&"&jinghua="&jinghua
   Response.Write ">第一页</A>  "         
   Response.Write "<A HREF=default.asp?Pageno="&PrwePage&"&text="&text&"&option="&option1&"&jinghua="&jinghua
   Response.Write ">上一页</A>  "              
 End If        
 If pageno=1 or TSum>PageNo Then 
   NextPage=PageNo+1             
   Response.Write "<A HREF=default.asp?PageNo="&NextPage&"&text="&text&"&option="&option1&"&jinghua="&jinghua
   Response.Write ">下一页</A>  "
   Response.Write "<A HREF=default.asp?Pageno="&rs.PageCount&"&text="&text&"&option="&option1&"&jinghua="&jinghua
   Response.Write ">末一页</A>  "          
 End If                    
End If          
%>
          </div></td>
        </tr>
      </table>
      <td></tr>
  <tr> 
    <%
	if PageNo=1 then i=rs.RECORDCOUNT else i=rs.RECORDCOUNT-(30*(PageNo-1))
	  %>
<tbody>
  <tr>	  
    <form action="progress.asp" method="post" name="form" id="form">
      <table width="760" align="center" cellpadding="5" cellspacing="1" class="tablebg<%=skin%>b">
        <tr class="tablebg<%=skin%>a"> 
          <td width="40" class="tablebg<%=skin%>d"> <p align="center"><strong>状态</strong> 
          </td>
          <td width="40" class="tablebg<%=skin%>d"><div align="center"><strong>心情</strong></div></td>
          <td class="tablebg<%=skin%>c"><div align="center"><b>发 
          言 主 题</b></div></td>
          <td width="100" class="tablebg<%=skin%>d"> 
          <p align="center"><b>作&nbsp; 者</b> </td>
          <td width="40" align="center" class="tablebg<%=skin%>c"><b>回复</b></td>
          <td width="40" align="center" class="tablebg<%=skin%>c"><b>阅读</b></td>
          <td width="200" align=center class="tablebg<%=skin%>d"> 
            <b>最后回复</b> </td>
          <%if (session("admin")=1) or (session("admin")=2) then%>
          <td width="39" align=center class="tablebg<%=skin%>d"><strong>操作</strong></td>
          <%end if%>

⌨️ 快捷键说明

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