📄 admin_news_class_di3.asp
字号:
<!--#include file=inc/conn.asp-->
<!--#include file=../../inc/checkadmin.asp-->
<!--#include file=../../../ajaxLIB/ajaxLIB.asp-->
<SCRIPT LANGUAGE="JavaScript">
<!--
function alertreadme(str,url){
{if(confirm(str)){
location.href=url;
return true;
}return false;}
}
//-->
</SCRIPT>
<link rel="stylesheet" href="../../css/mycss1.css" type="text/css">
<%
AJAXshowLoader()
AJAXshowSweetTitles2()
%>
<script language=javascript>
function AJAXDelclass(tid){
if(!confirm("该分类下的所有新闻都会被删除,你确认删除吗?")){
return false;
}
AJAXshowWoking("正在删除,请稍后...");
var a=AJAXcreateXMLHttp();
a.open("post","admin_newsclassdi3Del.asp?tid="+tid,true)
a.onreadystatechange=function(){
if (a.readyState==4)
{
AJAXcloseWoking();
if(a.responseText=="xmlok")
{
alert("删除成功");
window.location.reload();
}
}
}
a.send();
}
</SCRIPT>
<div id="list" style="filter:blendTrans(duration=1); position:absolute;visibility:hidden; width:774px; z-index:-1; left: 3px; top: 120px; height: 121px;">
<table width="620" border="0" align="center" cellpadding="0" cellspacing="1" class="TABLEBORDER" style="word-break:break-all" >
<tr align="center">
<th colspan="3">分类管理</th>
</tr>
<tr align="center" bgcolor="#DEDBEF">
<td width="302" height="25" bgcolor="#DEDBEF"><strong>分类名称</strong></td>
<td width="302" height="25" bgcolor="#DEDBEF"><strong>属于哪个第一级分类</strong></td>
<td width="302" height="25" bgcolor="#DEDBEF"><strong>属于哪个第二级分类</strong></td>
<td width="302" height="25" bgcolor="#DEDBEF"><strong>模板引用此类新闻列表用的标签</strong></td>
<td width="288"><strong>操作</strong></td>
</tr>
<%
CurrentPage=replacebadchar(request("page"))
if CurrentPage="" then
CurrentPage=1
else if not IsNumeric(CurrentPage) then
CurrentPage=1
else if int(CurrentPage)<=0 then
CurrentPage=1
else
CurrentPage=replacebadchar(request("page"))
end if
end if
end if
maxperpage=15
openconn()
strFileName="admin_news_class_di3.asp"
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from sys_data_aboutus_di3cen_class order by parent_id_of_di1 desc,parent_id_of_di2 desc",conn,1,1
if not rs.eof then
rs.pagesize=MaxPerpage
totalnumber=rs.recordcount
if totalnumber mod maxperpage=0 then
MaxPage= totalnumber \ MaxPerpage
else
MaxPage= totalnumber \ MaxPerpage+1
end if
if int(CurrentPage)>int(MaxPage) then
CurrentPage=MaxPage
else
CurrentPage=CurrentPage
end if
Rs.absolutepage=CurrentPage
for ni=1 to MaxPerpage
if rs.eof then exit for
%>
<tr onmouseover="this.style.backgroundColor='#F3F3FA';this.style.color='red'" onmouseout="this.style.backgroundColor='';this.style.color=''" align="center">
<td height="25"><%=rs("class_name")%></td>
<% set rs3=server.CreateObject("adodb.recordset")
rs3.open "select * from sys_data_aboutus_class where id="&rs("parent_id_of_di1"),conn,1,1
%>
<% set rs33=server.CreateObject("adodb.recordset")
rs33.open "select * from sys_data_aboutus_di2cen_class where id="&rs("parent_id_of_di2"),conn,1,1
%>
<td height="25"><%=rs3("news_type_name")%></td>
<td height="25"><%=rs33("class_name")%></td>
<td height="25">{$$show_news_class_cen3(<%=rs("id")%>,1,10)}</td>
<td><a href="edit_class_di3.asp?cid=<%=rs("id")%>">修改</a> <a href="#" onClick="AJAXDelclass(<%=rs("id")%>);">删除</a></td>
</tr>
<%
rs.movenext
next
else%>
<tr>
<td colspan="3" height="25" align="center">还没有</td>
</tr>
<%end if%>
<tr>
<td colspan="3" align="center" class="showPage"><%call showpage(strFileName,totalnumber,MaxPerPage,flase,true,"个",CurrentPage)%></td>
</tr>
</table>
</div>
<script language=javascript>
AJAXfade(1,'list')
</script>
<%
AJAXcloseLoader()
%>
<%
rs.close
set rs=nothing
'============================
sub newsClass(str)
select case str
case 0 response.Write("公司新闻")
case 1 response.Write("媒体报道")
case 2 response.Write("行业新闻")
case 2 response.Write("产品知识")
case else response.Write("公司新闻")
end select
end sub
'=====================================
call closeconn()%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -