⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gklist.asp

📁 21世纪人才www.51zy.net 网站源码
💻 ASP
字号:
<!--#include virtual = "/Include/DBClass.inc.asp"-->
<!--#include virtual = "/Include/SysLoginCheck.inc.asp" -->

<%
Response.Expires = 0 
Response.Expiresabsolute = Now() - 1 
Response.AddHeader "pragma","no-cache" 
Response.AddHeader "cache-control","private" 
Response.CacheControl = "no-cache" 
%> 

<%
Call Header("新闻列表")
Call Content()
Call Footer()

' 开始写入内容
Sub Content()

Dim s_keyword, s_cataid
s_keyword = GetSafeStr(Trim(Request("keyword")))
s_cataid = GetSafeStr(Trim(Request("cataid")))

Dim Pmcount,Pageno
'//设置新闻显示数量
Pmcount = News_Back_Count

%>
<!--#include virtual ="/Include/Top.asp" -->
<br>

<script language="JavaScript">
<!--
function CheckSelect()
{
	var count=0;
	for(i=0;i<document.delnews.elements.length;i++)
	{
		if(document.delnews.elements[i].name=="NewsID")
		{		
			if(document.delnews.elements[i].checked==true)
			{
				count++;					
			}				
		}			
	}
		
	if(count<=0)
	{
		alert("请选择一条要操作的信息!");
		return false;
	}

	return true;
}

function cdel()
{
	if(CheckSelect()==false)
	{
		return false;
	}
	
	if (confirm("你确定要删除这些新闻吗?不可恢复!")){
		document.delnews.action.value = "del";
		document.delnews.submit();
	}
}

function ccheck()
{
	if(CheckSelect()==false)
	{
		return false;
	}
	
	if (confirm("你确定要审核这些信息吗?")){
		document.delnews.action.value = "check";
		document.delnews.submit();
	}
}

function cuncheck()
{
	if(CheckSelect()==false)
	{
		return false;
	}
	
	if (confirm("你确定要撤销这些信息吗?浏览者将看不到这些信息!")){
		document.delnews.action.value = "uncheck";
		document.delnews.submit();
	}
}

function view(newsfile) {
	var gt = unescape('%3e');
	var popup = null;
	var over = "Launch Pop-up Navigator";
	popup = window.open('', 'popupnav', 'width=300,height=160,left=200,top=200,,resizable=no,scrollbars=no');
	if (popup != null) {
		if (popup.opener == null) {
		popup.opener = self;
		}
	popup.location.href = newsfile;
	}
}
function SelectCheckBox()
{
	for(i=0;i<document.delnews.elements.length;i++)
	{
		if(document.all("selectCheck").checked == true)
		{
			document.delnews.elements[i].checked = true;					
		}
		else
		{
			document.delnews.elements[i].checked = false;
		}
	}
}
//-->
</script>
<link href="/style/admin.css" rel="stylesheet" type="text/css">
<table width="98%"  border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="25"><b><%=Homepage_title%> - <font color="#FF0000">集团公司概况内容管理列表</font></b></td>
  </tr>
  <tr>
    <td>
    <br>
    <table width="100%" border="1" cellspacing="0" cellpadding="0" bordercolordark="#FFFFFF" bordercolorlight="#CCCCCC">
      <tr bgcolor="#799AE1">
        <td height="20" bgcolor="#799AE1"><div align="center"><font color="#FFFFFF">标 题</font></div></td>
        <td width="22%" height="20"><div align="center"><font color="#FFFFFF">发布时间</font></div></td>
		<%If News_Check = 1 Then%>
        <td width="7%"><div align="center"><font color="#FFFFFF">状态</font></div></td>
		<%End If%>
        <td width="7%"><div align="center"><font color="#FFFFFF">修改</font></div></td>
      </tr>
      <form name="delnews" action="NewsDelete.asp" method=post>
	  <input name="action" type="hidden" value="" id="action">
        <%
If s_cataid = "" Then
	If s_keyword <> "" Then
		sSql = "SELECT * FROM NewsData WHERE D_Title LIKE '%"&s_keyword&"%' ORDER BY D_SortID DESC"
    Else
		sSql = "SELECT * FROM NewsData ORDER BY D_SortID DESC"
	End If
Else
	If s_keyword <> "" Then
		sSql = "SELECT * FROM NewsData WHERE D_CataID LIKE '"&s_cataid&"%' and D_Title LIKE '%"&s_keyword&"%' ORDER BY D_SortID DESC"
    Else
		sSql = "SELECT * FROM NewsData WHERE D_CataID LIKE '"&s_cataid&"%' ORDER BY D_SortID DESC"
	End If
End if

oRs.Open sSql, oConn, 1, 1

Dim Rcount, Loopno, Mpage, i
Rcount = oRs.Recordcount

If Pmcount="" or isempty(Pmcount) or Pmcount<1 then
        Pmcount=20
End If
	oRs.Pagesize = pmcount   	'设置每页数
	Mpage = oRs.Pagecount    	'得到总页数
	Pageno = GetSafeInt(Clng(Request("Pageno")),1)
	
If Cint(Pageno) < 1  Then Pageno = 1
If Cint(Pageno) > Mpage Then Pageno = Mpage

If oRs.Bof and oRs.Eof then
	Response.write "<tr><td colspan='6'>&nbsp;&nbsp;暂时没有任何新闻!</td></tr>"
Else
	oRs.Absolutepage = Pageno	'将指针移至指定页的第一条记录
	Loopno = Pmcount
	i=1
	Do While Not oRs.Eof and Loopno > 0
%>
        <tr>
          <td height="22" style="word-break:break-all;">
            <% If oRs("D_Special") = 1 Then 
				Response.write "●"
			Else
				Response.Write "○"
			End if
			If Len(oRs("D_Title"))>30 Then
				Response.Write Left(oRs("D_Title"),30)&"....</a>"
            Else
				Response.Write oRs("D_Title")&"</a>"
            End if

			If oRs("D_SavePathFileName") <> "" Then
				Response.Write " <img src='../Images/news.gif' border=0>"
			End if
			%>
          </a></td>
          <td width="22%" height="22"> <div align="center"><%=oRs("D_AddTime")%></div></td>
		 <%If News_Check = 1 Then%>
          <td width="7%" height="22">
		  <%
		  	If oRs("D_Num") = 1 Then
		  		Response.Write"<div align='center'>已审</div>"
			Else
				Response.Write"<div align='center'><font color='#FF0000'>待审</font></div>"
			End If
		  %>
		  </td>
		  <%End If%>
          <td width="7%"><div align='center'><a href="gkModify.asp?id=<%=oRs("D_ID")%>" class="tt2">修改</a></div></td>
        </tr>
        <%
		oRs.Movenext						
		Loopno=Loopno-1
		i=i+1
		Loop		
		
		oRs.Close
		Set oRs=Nothing
End if
%>
      </form>
    </table>
    </td>
  </tr>
</table>
<p>&nbsp;</p>
<%
End Sub
%>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -