?? admin_links.asp
字號(hào):
<!-- #include file="../conn.asp" -->
<!--#include file="../inc/config.asp"-->
<!-- #include file="session.asp" -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="javaScript" src="../js/js.js"></script>
<link href="css.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
.style1 {color: #FF0000}
-->
</style>
</head>
<body>
<div id=topmomo><a href="admin_links.asp?info=add">添加鏈接</a>
| <a href="admin_links.asp?info=list&cndb=txt">
文字鏈接</a> |
<a href="admin_links.asp?info=list&cndb=logo">LOGO鏈接</a>
| <a href="admin_links.asp?info=list&cndb=all">
所有鏈接</a>
| <a href="admin_links.asp?info=classadd">
添加鏈接分類</a> | <a href="admin_links.asp?info=classaclass">
合并鏈接分類</a> | <a href="admin_links.asp?info=classlist">
鏈接分類列表</a>
</div><br>
<%
Select Case request.querystring("info")
Case "add"
Call add()
Case "list"
Call list()
Case "edit"
Call edit()
Case "classadd"
Call classadd()
Case "classlist"
Call classlist()
Case "classaclass"
Call classaclass()
end select
Sub classadd()%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tborder">
<tr>
<td class="thead" colspan="9" height="25" align="center"><b>
<font color="#FFFFFF">添加連接分類</font></b></td>
</tr>
<form action="admin_Daily.asp?info=link_class_add" method="post" name="form">
<tr>
<td class="alt3">
<div id=panx>
<table width="98%" border="0" cellspacing="1" cellpadding="1" align="center"class="panel">
<tr>
<td width="40%" height="45" align="right" class="alt2">
<b>分類名稱:</b><br>
</td>
<td width="60%" class="alt1">
<input name="link_class" type="text" size="20" class="form" maxlength="14"></td>
</tr>
<tr>
<td width="40%" height="45" align="right" class="alt2">
<b>分類介紹:</b><br>
</td>
<td width="60%" class="alt1">
<textarea name="link_info" class="form" cols="60" rows="5"></textarea></td>
</tr>
</table>
</div>
<div style="MARGIN-TOP: 6px;MARGIN-bottom: 6px" align="center">
<input type="submit" class="button" value="提 交">
<input type="reset" class="button" value="重 置"></div>
</td>
</tr>
</form>
</table>
<%end sub
sub classlist%>
<script language="JavaScript">
<!--
function del(sortname) {
return(confirm('CnEndWeb(終點(diǎn))提醒:\n\n真的要?jiǎng)h除 [ ' + sortname + ' ] 嗎?\n\n注意,僅此一次確認(rèn)!\n'));
}
//-->
</script>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tborder">
<tr>
<td class="thead" align="center" height="25" colspan="7"><b>查看所有連接分類</b></td>
</tr>
<tr height="28">
<td width="30%" align="left" class="tcat"><font color="#FFFFFF">
<b>分 類 名 稱</b></font></td>
<td width="20%" align="center" class="tcat"><font color="#FFFFFF"><b>修 改
名 稱</b></font></td>
<td width="20%" align="center" class="tcat"><font color="#FFFFFF"><b>操作</b>
</font></td>
</tr>
<%
set rs=server.createobject("adodb.recordset")
if IsSqlDataBase = 2 then
sql="select id,link_class,link_info from link_class"
else
sql="select id,link_class,link_info from [link_class]"
end if
rs.open sql,conn,1,1
if not rs.eof and rs.bof then
%>
<tr align="center">
<td colspan="6" height="22" class="alt1"><span class="style1">還沒有任何分類請(qǐng)?zhí)砑樱。?lt;/span></td>
</tr>
<%else
do while not rs.eof%>
<tr>
<td height="22" class="alt2">
<img src="images/ico.gif" width="10" height="10"> <%=rs("link_class")%></td>
<form action="admin_Daily.asp?info=link_class_edit&classid=<%=rs("id")%>" method="post" name="eform">
<td class="alt1">
<input name="link_class" type="text" size="30" class="form" value="<%=rs("link_class")%>">
<input class="button" type="submit" value="修 改" name="Submit" style="width: 45; height: 20"><br>
<textarea name="link_info" class="form" cols="39" rows="5"><%=rs("link_info")%></textarea></td>
</form>
<td align="center" class="alt2">
<a href="admin_Daily.asp?info=link_class_del&id=<%=rs("id")%>" onclick="return(del('<%=rs("link_class")%>'))">
刪除</a></a>
</td>
</tr>
<%
rs.movenext
loop
rs.close
set rs=nothing
end if%>
</table>
<%end sub
Sub classaclass()%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tborder">
<tr>
<td class="thead" align="center" height="25" colspan="9"><b>合并分類</b></td>
</tr>
<tr height="22" align="center">
<td width="45%" class="tcat"><b>原 分 類</b></td>
<td width="45%" class="tcat"><b>目標(biāo)分類</b></td>
</tr>
<form method="POST" action="admin_Daily.asp?info=aclass" name="formaclass">
<tr align="center" height="22">
<td width="45%" class="alt2" valign="center"><select name="oldclass" class="form" size="6">
<%set rs=server.createobject("adodb.recordset")
if IsSqlDataBase = 2 then
sql="select id,link_class from link_class"
else
sql="select id,link_class from [link_class]"
end if
rs.open sql,conn,1,1
if rs.eof then
else
do while not rs.eof
response.write "<option value="&rs("id")&"> "&rs("link_class")&"</option>"
rs.movenext
loop
end if
rs.close
set rs=nothing
%></select>
合并到 ==></td>
<td width="45%" class="alt1"><select name="newclass" class="form" size="6">
<%set rs=server.createobject("adodb.recordset")
if IsSqlDataBase = 2 then
sql="select id,link_class from link_class"
else
sql="select id,link_class from [link_class]"
end if
rs.open sql,conn,1,1
if rs.eof then
else
do while not rs.eof
response.write "<option value="&rs("id")&"> "&rs("link_class")&"</option>"
rs.movenext
loop
end if
rs.close
set rs=nothing
%></select>
</td>
</tr>
<tr height="22">
<td class="alt3" colspan="2" align="middle" valign="middle">
<input class="button" type="submit" value="合 并" name="Submit"></td>
</tr>
</form>
</table>
<%
set rs=nothing
set rs2=nothing
end sub
Sub list()
Const MaxPerPage=20
If Request("page")<>"" then
CurrentPage=Cint(Request("Page"))
Else
CurrentPage=1
End if
dim totalput
dim currentpage
dim totalpages
cndb=request.querystring("cndb")
set rs=server.createobject("adodb.recordset")
if IsSqlDataBase = 2 then
if cndb="all" then
sql="select id_link,class_link,name_link,logo_link,web_link,content_link,ok_link,Good_link from link order by id_link desc"
elseif cndb="logo" then
sql="select id_link,class_link,name_link,logo_link,web_link,content_link,ok_link,Good_link from link WHERE class_link=1 order by id_link desc"
elseif cndb="txt" then
sql="select id_link,class_link,name_link,logo_link,web_link,content_link,ok_link,Good_link from link WHERE class_link=2 order by id_link desc"
end if
else
if cndb="all" then
sql="select id_link,class_link,name_link,logo_link,web_link,content_link,ok_link,Good_link from [link] order by id_link desc"
elseif cndb="logo" then
sql="select id_link,class_link,name_link,logo_link,web_link,content_link,ok_link,Good_link from [link] WHERE class_link=1 order by id_link desc"
elseif cndb="txt" then
sql="select id_link,class_link,name_link,logo_link,web_link,content_link,ok_link,Good_link from [link] WHERE class_link=2 order by id_link desc"
end if
end if
'MySQL需要如下語句
conn.CursorLocation=3
rs.open sql,conn,1,1
%>
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" class="tborder">
<tr>
<td class="thead" align="center" height="25" colspan="9"><b><%
if cndb="all" then
Response.Write "查看所有連接"
elseif cndb="logo" then
Response.Write "查看LOGO連接"
elseif cndb="txt" then
Response.Write "查看TXT連接"
end if
%></b></td>
</tr>
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -