📄 adminlink.asp
字号:
<!--#include file="conn.asp"-->
<style type="text/css">
<!--
body,td,th {
color: #000000;
font-size: 12px;
}
body {
margin-left: 0px;
margin-top: 0px;
}
a {
font-size: 12px;
color: #000000;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #000000;
}
a:hover {
text-decoration: underline;
}
a:active {
text-decoration: none;
}
-->
</style>
<table width="778" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> <%dim username,sql,type2,ad
ad=request.querystring("ad")
type2=request.queryString("type2")
use=request.querystring("use")
if Session("chong")<>4 then
Response.Write("兄弟,你的权力不够啊!快来给我送点礼吧")
Response.Write("<br>")
Response.Write("<a href='javascript:history.go(-1)'><font color=red size=2>哎,回去吧</font></a>")
else
Select Case type2
Case "add":
Call add
Case "del":
Call del
Case Else:
call show
End Select
end if
sub show
%>
<table width="100%" cellspacing="0">
<tr>
<td><table width="100%" cellspacing="0">
<tr>
<td><table width="100%" border="1" cellpadding="1" cellspacing="1" bordercolor="#3399FF">
<form name="form3" method="post" action="?type2=add"><tr>
<td width="15%">网站名:</td>
<td width="85%">
<input name="song" type="text" id="song"> </td>
</tr>
<tr>
<td>网址:</td>
<td><input name="songhttp" type="text" id="songhttp" value="http://" size="50">
必须以http://开头</td>
</tr> <tr>
<td>LOGO地址:</td>
<td><input name="sitelogo" type="text" id="sitelogo" value="http://" size="50">
必须以http://开头</td>
</tr><tr>
<td> </td>
<td><input type="submit" name="Submit" value="提交">
<input type="reset" name="Submit" value="重置">
</td>
</tr></form>
</table></td>
</tr>
<%Dim cur,rowcount,i,clas
clas=Session("clas")
set rs=Server.CreateObject("Adodb.Recordset")
sql="select * from link order by id desc"
rs.open sql,conn,1,3
if rs.eof then
%>
<tr>
<td>没有链接!</td>
</tr>
<%else%>
<tr>
<td><table width="100%" border="1" cellpadding="1" cellspacing="1" bordercolor="#3399FF">
<tr> <td colspan="4"><div align="center" class="style2">请节省每一分空间,将无用的音乐删除,谢谢合作</div></td></tr>
<tr><td width="21%"><div align="center">网站名</div></td>
<td width="35%"><div align="center">网址</div></td>
<td width="30%"><div align="center">LOGO</div></td>
<td width="14%"><div align="center">删除</div></td>
</tr>
<%
cur=request.form("cur")
if cur="" then
cur=1
end if
rs.pagesize=30
rs.absolutepage=cint(cur)
rowcount=0
do while not rs.eof and rowcount<rs.pagesize%>
<tr>
<td width="21%"><div align="center"><%=rs("sitename")%></div></td>
<td width="35%"><div align="center"><%=rs("sitehttp")%></div></td>
<td width="30%"><img src="<%=rs("sitelogo")%>" border=0></td>
<td width="14%"><div align="center"><a href="?type2=del&ad=<%=rs("id")%>" onClick="return confirm('真的要删除?')">删除</a></div></td>
</tr>
<%rowcount=rowcount+1
rs.movenext
loop%>
</table></td>
</tr><tr>
<td><table width="100%" border="0">
<tr><form name="form2" method="post" action=""><TD align=left bgcolor="#99CCFF"><span class="style2">共<%=rs.recordcount%>条 分<%=rs.pagecount%>页 每页10条 当前页次:<%=cur%>/<%=rs.pagecount%>
转到:
<select name="cur" size="1" onchange="javascript:submit()">
<%for i = 1 to rs.pagecount%>
<option value="<%=i%>" <%if i=cint(cur) then%> selected <%end if%>>第<%=i%>页 </option>
<%next%>
</select>
<%
rs.close
set rs=nothing%>
</span></td>
</form>
</tr>
</table></td>
</tr>
<%end if%></table>
<%
end sub
sub add
dim songhttp,song
songhttp=request.form("songhttp")
song=request.form("song")
set rs=Server.CreateObject("Adodb.Recordset")
rs.open "select * from link where 1=2",conn,1,3
rs.addnew()
rs("sitename")=song
rs("sitehttp")=songhttp
rs("sitelogo")=request("sitelogo")
rs.update
rs.close
set rs=nothing
response.redirect "adminlink.asp"
end sub
sub del
Set rs = Server.CreateObject("ADODB.Recordset")
sql="delete from link where id="&ad&""
rs.open sql,conn,1,3
Response.Redirect "adminlink.asp"
end sub%></td>
</tr>
</table></BODY></HTML>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -