📄 admin_news.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 AJAXDelnews(tid){
if(!confirm("确认删除?")){
return false;
}
AJAXshowWoking("正在删除,请稍后...");
var a=AJAXcreateXMLHttp();
a.open("post","admin_newsDel.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="650" 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="102" height="25" bgcolor="#DEDBEF"><strong>id</strong></td>
<td width="302" height="25" bgcolor="#DEDBEF"><strong>产品名称</strong></td>
<td width="302" height="25" bgcolor="#DEDBEF"><strong>模板引用此产品用的标签</strong></td>
<td width="143" 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
strFileName="admin_news.asp"
maxperpage=15
openconn()
set rs=server.CreateObject("adodb.recordset")
rs.open"select * from sys_data_xxprod order by id 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("id")%></td>
<td height="25"><%=rs("title")%></td>
<td height="25">
{$$show_a_product(<%=rs("id")%>,500)}
</td>
<td width=200>
<%
set rs2=server.CreateObject("adodb.recordset")
rs2.open "select * from sys_data_xxprod_class where id="&rs("class"),conn,1,1
%>
<%
if rs("di2_class")<>"no" then
set rs22=server.CreateObject("adodb.recordset")
rs22.open "select * from sys_data_xxprod_di2cen_class where id="&rs("di2_class"),conn,1,1
b2="/"&rs22("class_name")
else
b2=""
end if
%>
<%
if rs("di3_class")<>"no" then
set rs222=server.CreateObject("adodb.recordset")
rs222.open "select * from sys_data_xxprod_di3cen_class where id="&rs("di3_class"),conn,1,1
b3="/"&rs222("class_name")
else
b3=""
end if
%>
<%=rs2("news_type_name")%><%=b2%><%=b3%>
</td>
<td><a href="admin_newsEdit.asp?id=<%=rs("id")%>">修改</a> <a href="#" onClick="AJAXDelnews(<%=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 + -