gusucode.com > 学校共青团组织网站源代码 > 学校共青团组织网站源代码/626/admin/admin_link_lb.asp

    <%
if Request.Cookies("admindj")<>"1" then
   Response.Write "<BR><BR><BR><BR><center>权限不足,你没有此功能的管理权限"
   Response.end
end if
%>
<!--#include file = admin_chk.asp -->
<!--#include file = admin_conn.asp -->
<!--#include file = titleb.asp -->
<html>

<head>
<!--#include file = language.asp -->
<title>友情链接</title>
<STYLE type="text/css">
<!--
a:link       {text-decoration: none; font-family: AdobeSm; color: #000000 }
a:visited    {text-decoration: none; color: #000000 }
A:hover      {COLOR: green; FONT-FAMILY: "宋体,MingLiU"; TEXT-DECORATION: underline}
body         {font-size: 9pt; font-family: 宋体,MingLiU, Arial;color: #000000}
TD           {FONT-SIZE: 9pt; FONT-FAMILY: "宋体,MingLiU, Arial";color: #000000;table-layout:fixed;word-break:break-all}
p            {FONT-SIZE: 9pt; FONT-FAMILY: "宋体,MingLiU, Arial";color: #000000}
input        {FONT-SIZE: 9pt; FONT-FAMILY: "宋体,MingLiU, Arial";color: #000000}
body         {margin-top: 0; margin-bottom: 0;margin-left:0;margin-right:0; color: #000000}
select       {FONT-SIZE: 9PT;}
option       {FONT-SIZE: 9pt;}
textarea     {FONT-SIZE: 9pt;}
-->
</STYLE>
</head>
<%
saveid=trim(request("saveid"))
editid=trim(request("editid"))
lb=trim(request("lb"))
delid=trim(request("delid"))

if editid="" and saveid="" and lb<>"" then
	conn.Execute "insert into [LINKLB] ([lb]) values('"&lb&"')"
	Response.Redirect "?"
elseif editid="" and saveid<>"" and lb<>"" then
	conn.Execute "update [LINKLB] set [lb]='"&lb&"' where id="&clng(saveid)
	Response.Redirect "?"

elseif editid<>"" and saveid="" and lb="" then
	set rs = Server.CreateObject("ADODB.RecordSet")
	rs.Open "select * from [LINKLB] where ID="&EDITID&" order by id desc",conn,1,1
	if rs.recordcount<>0 then
		elb=rs("lb")
	end if
	rs.close:set rs=nothing
end if

if delid<>"" then
	conn.Execute "delete from [LINKLB] where ID="&clng(delid)
end if
%>
<body bgcolor="#ffffff">

<div align="center">
	<table border="0" cellpadding="3" cellspacing="0" width="760">
		<tr>
			<td> </td>
		</tr>
		<tr>
			<td align=center>
			<form method="POST" action="?saveid=<%=editid%>">
				<p><input type="text" name="LB" value='<%=elb%>' size="20"><input type="submit" value="保存" name="B1"></p>
			</form>
			</td>
		</tr>
		<tr>
			<td> </td>
		</tr>
	</table>
</div>

<div align="center">
	<table border="0" cellpadding="5" cellspacing="0" width="400">
		<tr>
			<td align="center" background="../images/bj3.jpg" height="30"><b>类别</b></td>
			<td align="center" background="../images/bj3.jpg" height="30"><b>
			网址数量</b></td>
			<td align="center" background="../images/bj3.jpg" height="30"><b>操作</b></td>
		</tr>
<%
set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open "select * from [LinkLB] order by id asc",conn,1,1

if rs.recordcount<>0 then

while not rs.eof
%>
		<tr onMouseOver="this.bgColor='#B5F3FF';" onMouseOut="this.bgColor='#FFFFFF'">
			<td><font color="#808080">[ID:<%=rs("id")%>]</font><%=rs("lb")%></td>
			<td align=center>
				<%
					set rs2 = Server.CreateObject("ADODB.RecordSet")
					rs2.Open "select * from [Link] where [lb]="&rs("ID")&" order by id desc",conn,1,1
					Response.Write rs2.recordcount
					rs2.close:set rs2=nothing
				%>
			</td>
			<td align=center><a href="admin_link_code.asp?lb=<%=rs("id")%>">调用</a> <a href="?editid=<%=rs("ID")%>">修改</a>
			<a onclick='{if(confirm("您确定删除吗?此操作将不能恢复!")){return true;}return false;}' href="?delid=<%=rs("ID")%>">删除</a></td>
		</tr>
		<tr>
			<td colspan="3" height=1 bgcolor=c0c0c0></td>
		</tr>
<%
rs.movenext
wend
end if

rs.close:set rs=nothing
%>
	</table>
</div>

</body>
<%
conn.close
set conn=nothing
%></html>