📄 showordersong.asp
字号:
<!--#include file=../INC/txlconst.asp-->
<!--#include file=../INC/txlfun.asp-->
<!--#include file=nav.asp-->
<!--
<pre>
┌─ 自由领域ASP+WAP同学录系统 ─────────────────┐
│ │
│ 感谢你使用 自由领域ASP+WAP同学录系统(测试版) │
│ 使用本免费源码您必须遵守以下规定 │
│ 不得公开发表代码 不得用做商业用途,不得向其他使用者收费。 │
│ │
│ 使用时,请保留此段信息,谢谢配合 │
│ │
│ 2004/12/19 │
│ │
└──────────────── http://99167.jahee.com ───┘
</per>
-->
<%
dim const_txl_HomeUrl,errstr,i,page
errstr=""
const_txl_HomeUrl="../"
OpenDatabase
txl_SiteHead const_txlname&"-点歌送祝福"
call online
if Request("action") = "delordersong" Then
Call Del
Else
call main
End If
CloseDatabase
SiteBottom
sub main
Call showordersong
End Sub
%>
<%sub showordersong
Dim rs,sql
sql="select ordersong.*,ec.sname from ordersong,ec where ec.studentid=ordersong.username order by ordersong.id desc "
if Request.QueryString("action")="myorder" and Session("username")<>"" then
sql="select ordersong.*,ec.sname from ordersong,ec where ec.studentid=ordersong.username and ordersong.username='"&Session("username")&"' order by ordersong.id desc "
end if
set rs=Server.CreateObject("Adodb.Recordset")
rs.open sql,conn,1
dim RecordCount2,LinkFile,displaypagenum,PageSize2,k,PageCount2,page
page=Request.QueryString("page")
if page="" or (not isnumeric(page)) Then
page=1
end if
page=Cint(page)
RecordCount2=rs.recordcount
LinkFile="?"
displaypagenum=8
pagesize2=8
rs.pagesize=PageSize2
PageCount2=rs.pagecount
If not rs.eof then
rs.absolutepage=page
end if
i=0
%>
<table width="779" border="0" align="center" cellpadding="0" cellspacing="8">
<tr>
<td><b>当前位置:<a href="<%=const_homepageurl%>">首页</a> >> <a href="<%=const_txl_HomeUrl&const_txlurl%>"><%=const_txlname%></a> >>娱乐前沿>> </b></td>
<td align="right"><font color="#FF0000">娱乐导航: </font>
<%Call shownav()%> </td>
</tr>
</table>
<table width="779" align="center" border="0" cellspacing="8" cellpadding="0">
<tr>
<td> <a href="ordersong.asp" title="点歌">我也点一首(Order a song) </a></td>
</tr>
</table>
<table width="772" border="1" align="center" cellpadding="1" cellspacing="0" bordercolor="#BFBFBF" bgcolor="#FFFFFF" class="liu">
<tr>
<td class="blu" width="4%">ID</td>
<td class="blu" align="center">点歌台</td>
<td class="blu" align="center">删</td>
</tr>
<%while not rs.eof and i<PageSize2
i=i+1%>
<tr>
<td align="center" class="fortit"><b><%=i%></b></td>
<td class="content"><font color="#008000"><%=rs("sname")%></font>于<font color="#008000"><%=rs("adddate")%></font>为<font color="#008000"><%=rs("orderto")%></font>点歌【<a href=javacript:; onclick="javascript:winsteps_open_window('displaysong.asp?musicurl=<%=rs("musicurl")%>&musicname=<%=rs("musicname")%>',520,300,'music');return false" title="点击听歌"><font color="#ff0000"><%=Trim(rs("musicname"))%></font></a>】,并送上祝福:<br>
<%=rs("content")%> </td>
<td align="center" class="content"><a href="?action=delordersong&id=<%=rs("id")%>" onClick="return confirm('This operation will delete the order song!\n Are you sure?')">删</a></td>
</tr>
<%rs.movenext
wend%>
<tr>
<td colspan="3" style="padding:8px;"><%=ShowPage(PageCount2,RecordCount2,page,PageSize2,LinkFile,displaypagenum) %>
</td>
</tr>
</table>
</form>
<%End Sub%>
<%
Sub Del
Dim ID,Rs
ID = Trim(Request("id"))
If ID = "" OR (Not Isnumeric(ID)) Then
Call printerror ("删除出错","<li>ID传递错误!</li>",779)
Exit Sub
End IF
ID = Clng(ID)
If Session("username") = "" and Session("adminname") = "" Then
Call printerror ("删除出错","<li>无法鉴别您的身份,如果不是管理员,请先<a href='../user/login.asp'>登录</a>!</li>",779)
Exit Sub
End IF
Set Rs = conn.execute("select * from ordersong where ID = "&ID)
If Rs.Eof Then
Call printerror ("删除出错","<li>记录不存在!</li>",779)
Rs.Close
Set Rs = Nothing
Exit Sub
End If
If Trim(Rs("username")) <> Trim(Session("username")) and Session("adminname") = "" Then
Call printerror ("删除出错","<li>你无权删除!</li>",779)
Exit Sub
End IF
Rs.Close
Set Rs = Nothing
conn.execute ("delete from ordersong where ID = "&ID)
Call printsuc("删除点歌成功!","<li>删除成功!</li><li><a href='"&Request.ServerVariables("HTTP_REFERER")&"'>回刚删除页面</a></li>",779)
End Sub
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -