?? art_class_list.asp
字號(hào):
<!--#include file="head.asp" -->
<%
Select case Request("action")
case "Adel"
id = Request("id")
conn.execute("Delete * from Aclass where classid = " & id)
conn.execute("Delete * from ANclass where classid = " & id)
conn.execute("Delete * from article where classid = " & id)
Response.write "<script>alert(""刪除成功"");location.href=""art_class_list.asp"";</script>"
Response.End
case "Ndel"
id = Request("id")
conn.execute("Delete * from ANclass where nclassid = " & id)
conn.execute("Delete * from article where nclassid = " & id)
Response.write "<script>alert(""刪除成功"");location.href=""art_class_list.asp"";</script>"
Response.End
End Select
%>
<div align="center"><font color="#FF0000">欄目管理</font><br>
<br>
</div>
<div align="center"><a href="#" OnClick="Javascript:window.open('AddClass.asp?action=Add','','width=350,height=100,top=10,left=180')">新增大欄目</a><br>
<br>
<%
set rs_1 = server.CreateObject ("adodb.recordset")
set rs_2 = server.CreateObject ("adodb.recordset")
sql_2 = "select * from aclass order by classid"
rs_2.Open sql_2,conn,1,1
do while not rs_2.Eof
%>
</div>
<table width="100%" border="0" cellspacing="3" cellpadding="0" bgcolor="#f0f0f0">
<tr>
<td height="18" width="60%"> <%=rs_2("class")%>(<%=rs_2("classid")%>)
</td>
<td height="18" width="40%">
<div align="right"><a href="#" OnClick="Javascript:window.open('EditClass.asp?action=Aedit&id=<%=rs_2("classid")%>','','width=350,height=100,top=10,left=180')">編輯</a>
| <a href="javascript:ConfirmDele(<%=rs_2("classid")%>)">刪除</a> |
<a href="#" OnClick="Javascript:window.open('AddClass.asp?action=Ndd&id=<%=rs_2("classid")%>','','width=350,height=100,top=10,left=180')">新增小欄目</a>
| </div>
</td>
</tr>
</table>
<%
sql_1 = "select * from anclass where classid="&rs_2("classid")&" order by nclassid"
rs_1.Open sql_1,conn,1,1
do while not rs_1.EOF
%>
<table width="100%" border="0" cellspacing="3" cellpadding="0">
<tr>
<td height="18" width="7%"> </td>
<td height="18" bgcolor="#f7f7f7" width="60%"><%=rs_1("nclass")%>(<%=rs_1("nclassid")%>)</td>
<td height="18" bgcolor="#f7f7f7" width="40%">
<div align="right"><a href="#" OnClick="Javascript:window.open('EditClass.asp?action=Nedit&id=<%=rs_1("nclassid")%>','','width=350,height=100,top=10,left=180')">編輯</a>
| <a href="javascript:ConfirmDele1(<%=rs_1("nclassid")%>)">刪除</a> |
</div>
</td>
</tr>
</table>
<%
rs_1.MoveNext
loop
rs_1.Close
%>
<br>
<%
rs_2.MoveNext
Loop
rs_2.Close%>
<script language="JavaScript">
function ConfirmDele(unid)
{
if(confirm("\n你確認(rèn)刪除嗎?將同時(shí)刪除該欄目下的所有內(nèi)容"))
{
location.href="?action=Adel&id="+unid;
}
}
function ConfirmDele1(unid)
{
if(confirm("\n你確認(rèn)刪除嗎?將同時(shí)刪除該欄目下的所有內(nèi)容"))
{
location.href="?action=Ndel&id="+unid;
}
}
</script>
<!--#include file="copy.asp" -->
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -