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

📄 admin_special.asp

📁 新闻发布系统
💻 ASP
📖 第 1 页 / 共 2 页
字号:
        for i=1 to rs1.pagesize
		if rs1.eof then
		exit for
		end if
		%>
        <table width="100%" height="21" border="0" cellpadding="2" cellspacing="1" bgcolor="#A4CFA0">
          <tr bgcolor="#EEFFE8"> 
            <td width="4%"> 
              <div align="center"> 
                <input name="Sps" type="checkbox" id="Sps" value="<%=rs1("NewsId")%>">
              </div></td>
            <td width="48%" bgcolor="#EEFFE8"> 
              <div align="left"><a href=http://<%=sowinpath%><%=rs1("lpath")&rs1("fileName")&".html"%> target=_blank><%=rs1("title")%></a></div></td>
            <td width="15%"> 
              <div align="center"><%=rs1("classCn")%> </div></td>
            <td width="17%"> 
              <div align="center"><%=rs1("speicalCn")%> </div></td>
          </tr>
        </table>
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="2"></td>
          </tr>
        </table>
        <%
        rs1.MoveNext
        next
       %>
        <%
	   response.write"&nbsp;共<b>"& select_pagecount &"</b>页<b>" & select_count &"</b>条记录,本页是第<b>"& strpage &"</b>页。"
		if int(strpage)>1 then
		    response.Write"&nbsp;<a href=admin_special.asp?page=1>第一页</a>&nbsp;"
		    response.Write"&nbsp;<a href=admin_special.asp?page="&cstr(cint(strpage)-1)&">上一页</a>&nbsp;"
			end if
			if int(strpage)<select_pagecount then
			response.Write"&nbsp;<a href=admin_special.asp?page="&cstr(cint(strpage)+1)&">下一页</a>"
			response.Write"&nbsp;<a href=admin_special.asp?page="& select_pagecount &">最后一页</a>&nbsp;"
			end if
			response.Write"<br>"
%>
        <table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td height="5"></td>
          </tr>
        </table>
        <table width="100%" height="29" border="0" cellpadding="0" cellspacing="0">
          <tr> 
            <td bgcolor="#76B771">&nbsp;&nbsp; <input type="checkbox" name="chkall" onclick="CheckAll(this.form)">
              选中所有  批量生成专题 
              <select name="SpeicalCn">
                <option selected>[无专题]</option>
                <%
    set rss = server.createobject("adodb.recordset")
    rss.source = "select * from Speical order by id desc "
    rss.open rss.source,conn,1,1
    while not rss.eof
%>
                <option value="<%=rss("SpeicalCn")%>"><%=rss("SpeicalCn")%></option>
                <%
    rss.movenext
    wend
    rss.close
	set rss=nothing

sub del()

SpeicalCn = Request("SpeicalCn")

set rs=server.createobject("adodb.recordset")
sql="select * from Speical where SpeicalCn='"&SpeicalCn&"'"
rs.open sql,conn,3,3
rs.delete
rs.update
rs.close

sql="select speicalcn from News where speicalcn='"&speicalcn&"'"
rs.open sql,conn,3,3
if not rs.eof then
while not rs.EOF
rs("speicalcn")="[无专题]"
rs.update
rs.MoveNext
wend
end if
rs.close
'-------------------------------------------
    set MyFile=Server.CreateObject("Scripting.FileSystemObject")
    Set CrmapS=MyFile.CreateTextFile(Server.MapPath("..")&"\Special\Special.js")
	'--------------------------
	set rs = server.createobject("adodb.recordset")
    rs.source = "select * from Speical order by id desc "
    rs.open rs.source,conn,1,1
    if rs.recordcount=0 then
    contentm1="没有专题<br>"
	CrmapS.WriteLine("document.write("""&Contentm1&""")")
    end if
	'=================生成专题JS开始=============
	while not rs.eof
    SpeicalCn=rs("SpeicalCn")
	contentm="<table width=98% height=22 border=0 cellpadding=0 cellspacing=0 background=pic/news_bg_2.gif>  <tr> <td>&nbsp;<b><font color=0033CC>"&rs("SpeicalCn")&"</font></b></td>  </tr></table><table width=98% height=4 border=0 cellpadding=0 cellspacing=0>  <tr> <td height=6></td>  </tr></table>"
	CrmapS.WriteLine("document.write("""&Contentm&""")")
	set rssp = server.createobject("adodb.recordset")
        rssp.source = "select * from news where SpeicalCn='"&SpeicalCn&"' order by NewsID desc"
        rssp.open rssp.source,conn,1,3
	'----专题调用数开始-----------------------------------
        set rssc = server.createobject("adodb.recordset")
        rssc.source = "select * from config"
        rssc.open rssc.source,conn,1,3
	for i=1 to rssc("spcount")
        if rssp.eof then exit for
        Content="·<a href=http://"&sowinpath&rssp("lpath")&rssp("FileName")&".html target=_blank>"&rssp("Title")&"</a><br>"
        CrmapS.WriteLine("document.write("""&Content&""")")

	'----专题调用数结束-----------------------------------
    rssp.movenext
    next
		Content1="<table width=98% border=0 cellpadding=0 cellspacing=0>  <tr> <td><div align=right><a href=http://"&sowinpath&"special/index_1.html target=_blank>更多专题...</a></div></td>  </tr></table>"
		CrmapS.WriteLine("document.write("""&Content1&""")")
	rs.movenext
    wend
	'====================生成专题JS结束=====================
	
	rs.close
	set rssp=nothing
	set rs=nothing
	set MyFile=nothing
	CrmapS.close

'-------------------------------------------
Response.Write "<script>alert(""成功删除"");location.href=""admin_Special.asp"";</script>"
Response.End 
end sub

sub del1()

NewsID = Request("NewsID")
speicalcn="[无专题]"

set rs=server.createobject("adodb.recordset")
sql="select * from news where NewsID="&NewsID
rs.open sql,conn,3,3
rs("speicalcn")=speicalcn
rs.update
rs.close
Response.Write "<script>alert(""成功删除专题下新闻"");location.href=""admin_Special.asp"";</script>"
Response.End 

end sub
%>
              </select> <input name="action" type="hidden" id="action" value="add1"> 
              <input type="submit" name="Submit2" value="执行" class=Anbutc> </td>
          </tr>
        </table>
      </form>
      
      <!--#include file = name.asp-->
    </td>
  </tr>
</table>
<%
sub Read()
SpeicalCn = Request("SpeicalCn")

if speicalCn="" then
Response.Write "<script>alert(""你没有选择专题栏目"");location.href=""admin_Special.asp"";</script>"
Response.End 
end if
			   
        set rs=server.createobject("adodb.recordset")
        sql="select * from news where SpeicalCn='"&SpeicalCn&"'"
        rs.open sql,conn,1,3      
        while not rs.eof
		%>
<table width="98%" height="23" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#76B771">
  <tr bgcolor="#F7FFF4"> 
    <td width="51%"> 
      <div align="left">
        <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td bgcolor="#F7FFF4"><a href=http://<%=sowinpath%><%=rs("lpath")&rs("fileName")&".html"%> target=_blank> <%=rs("title")%></a></td>
          </tr>
        </table>
      </div></td>
    <td width="49%" bgcolor="#F7FFF4"> 
      <div align="center"><a href="?NewsID=<%=rs("NewsID")%>&action=del1" onClick="return Del()">删除文件的专题?</a></div></td>
  </tr>
</table>
  
<table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td height="2"></td>
  </tr>
</table>
        <%
 rs.movenext
  wend
 rs.close

			response.end
%>

<%end sub%>
</body>
</html>


⌨️ 快捷键说明

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