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

📄 user_index.asp

📁 俄罗斯方块源码 俄罗斯方块源码 俄罗斯方块源码
💻 ASP
字号:
<!--#include file="conn.asp"-->
<!--#include file="top.asp"-->
<%
if session("username")="" then
  call mb("对不起,您还没有登陆!","login.asp",1)
end if

dim currentpage,maxperpage,totalpage,totalrecords,i,action
dim searchtype,keyword
action=request("action")

currentpage=request("page")
if not isinteger(currentpage) then
  currentpage=1
else
  currentpage=clng(currentpage)
end if
maxperpage=15
totalpage=1
totalrecords=0
i=1

set rs=server.createobject("adodb.recordset")
if action="search" then
  
  searchtype=request("searchtype")
  keyword=checkstr(trim(request("keyword")))
  if searchtype="" then
    searchtype="flashname"
  end if
  if searchtype="id" then
    if not isinteger(keyword) then
	  sql="select * from flash where flashname like '%"&keyword&"%' and username='"&session("username")&"' order by id desc"
	else
	  sql="select * from flash where id="&keyword&" and username='"&session("username")&"' order by id desc"
	end if
  else
    sql="select * from flash where username='"&session("username")&"' and flashname like '%"&keyword&"%' order by id desc"
  end if
else
 sql="select * from flash where username='"&session("username")&"' order by id desc"
end if
rs.open sql,conn,1,1

if not(rs.bof and rs.eof ) then
  rs.pagesize=maxperpage
  rs.absolutepage=currentpage
  totalpage=rs.pagecount
  totalrecords=rs.recordcount
end if
%>
<script language=javascript>
<!--
function checksearch()
 {
  if (search.keyword.value=="")
   {alert("请输入要查询的内容");
    search.keyword.focus();
    return false;
   }
 return true;
}
-->
</script>
<table width="780" height="200" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF">
  <tr> 
    <td width="190" valign="top" background="index3/flash_bg4.gif" class="regbg"> 
      <!--#include file="user_menu.asp"-->
    </td>
    <td valign="top"><TABLE align=center 
      background="images/line01.gif" 
      border=0 cellPadding=0 cellSpacing=0 height=24 width="100%">
        <TR> 
          <TD height=21 width="55%">&nbsp;<IMG height=12 
            src="images/A3.gif" width=12> 当前位置:<A 
            href="index.asp" title="联盟首页">闪闪之家</A> -&gt; 作品管理</TD>
          <TD height=21 width="45%">&nbsp;</TD>
        </TR>
      </TABLE>
      <br>
      <TABLE align=center border=0 borderColor=#000000 cellPadding=0 cellSpacing=0 width="99%">
        <TR> 
          <TD background="images/T_back.gif" width="18%"><IMG src="images/T_1.gif" width=90 height=24 border="0"></TD>
          <TD 
          background="images/T_back.gif" 
          width="78%"><strong>作 品 管 理</strong></TD>
          <TD width="4%"><IMG height=24 
            src="images/T_2.gif" 
          width=29></TD>
        </TR>
      </TABLE> 
      <table width="99%" border="0" align="center" cellpadding="3" cellspacing="1" bgcolor="#cccccc">
        <tr>
          <td bgcolor="#FFFFFF"><table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr align="center"> 
                <td height="25" colspan="5"><form action="?action=search" method="post" name="search" id="search">
                    <table width="96%" border="0" cellspacing="0" cellpadding="0">
                      <tr> 
                        <td width="16%" align="right">作品搜索:</td>
                        <td width="53%"><input name="keyword" type="text" class="input" id="keyword" value="<%=request("keyword")%>" size="20">
                            
                          <select name="searchtype" size="1" class="input" id="searchtype">
                            <option value="flashname">Flash名称</option>
                            <option value="id">ID搜索</option>
                          </select> </td>
                        <td width="31%"><input name="Submit" type="submit" class="button" value="搜索" onclick="return checksearch();"></td>
                      </tr>
                    </table>
                  </form></td>
              </tr>
              <tr align="center" bgcolor="#FFFBFF"> 
                <td width="6%" height="25">ID</td>
                <td width="31%" height="25">Flash名称</td>
                <td width="19%" height="25">性 质</td>
                <td width="24%" height="25">添加日期</td>
                <td width="20%" height="25">操 作</td>
              </tr>
              <%do until rs.eof or i>maxperpage%>
              <tr> 
                <td height="25">&nbsp;<%=rs("id")%></td>
                <td height="25">&nbsp;<a href="flash_play.asp?id=<%=rs("id")%>" title="查看作品" target="_blank"><%=rs("flashname")%></a></td>
                <td height="25" align="center"> 
                  <%if rs("ishot") then
		      response.write "热&nbsp;"
			end if
			if rs("isgood") then
			  response.write "荐&nbsp;"
			end if
			if rs("ispassed") then
			  response.write "审"
			end if
			%>
                </td>
                <td height="25">&nbsp;<%=rs("dateandtime")%></td>
                <td height="25" align="center"><a href="flash_play.asp?id=<%=rs("id")%>" target="_blank">查看</a> 
                  <a href="user_flashedit.asp?id=<%=rs("id")%>">编辑</a> <a href="user_flashdel.asp?id=<%=rs("id")%>" onclick="javascript:if(confirm('是否真的要删队作品:<%=rs("flashname")%>?\n\n系统提示:删除后不可恢复!')){return true;}else{return false;}">删除</a></td>
              </tr>
              <%rs.movenext
    i=i+1
	loop
	rs.close
	set rs=nothing
%>
              <tr> 
                <td height="25" colspan="5"  background="images/line02.gif"> 
                  <%if totalrecords>1 then call showpage("user_index.asp?action="&action&"&keyword="&keyword&"&searchtype="&searchtype,totalrecords,maxperpage,true,true,"个作品")%>
                </td>
              </tr>
            </table></td>
        </tr>
      </table>
      
      <br>
    </td>
  </tr>
</table>

<!--#include file="bottom.asp"-->
</DIV>
</BODY></HTML>

⌨️ 快捷键说明

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