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

📄 admin_newstojssave.asp

📁 新闻发布系统
💻 ASP
📖 第 1 页 / 共 2 页
字号:
  End Sub

  Sub CSS1()
    set rs=Server.CreateObject("adodb.recordset")
    sql="select * from JSFile where JSType='图片新闻' and JSName='"&request.form("PhotoNewsName")&"' order by ID desc"
    rs.open sql,conn,1,1
    set rs3=Server.CreateObject("adodb.recordset")
    sql3="Select IndexCount,JSNameEN,PicWi,PicHi from JS where Type='图片新闻' and JSNameCN='"&request.form("PhotoNewsName")&"'"
    rs3.open sql3,conn,1,1
    Set MyFile=Server.CreateObject("Scripting.FileSystemObject")
    set CrHNJS=MyFile.CreateTextFile(Server.MapPath("..")&"\Otherjs\"&rs3("JSNameEN")&".js")
    set CrHNHt=MyFile.CreateTextFile(Server.MapPath("..")&"\Otherjs\"&rs3("JSNameEN")&".htm")
    CrHNHt.WriteLine("<script src="&rs3("JSNameEN")&".js></script>")
    Table="<table whidth=100% align=center><tr>"
    CrHNJS.WriteLine("document.write("""&Table&""")")
    for i=1 to rs3("IndexCount")
      if rs.eof then exit for
	  Content="<td><div align=center><a href="&sowinpath&rs("lpath")&rs("FileName")&".html target=_blank><img src="&rs("PhotoPath")&" border=0 width="&rs3("PicWi")&" height="&rs3("PicHi")&"></a></div></td>"
      CrHNJS.WriteLine("document.write("""&Content&""")")
      rs.movenext
    next
    Table="</tr><tr>"
    CrHNJS.WriteLine("document.write("""&Table&""")")
    rs.movefirst
    for i=1 to rs3("IndexCount")
      if rs.eof then exit for
	  if len(rs("title"))>12 then
	  title=left(rs("title"),12)
	  else
	  title=rs("title")
	  end if
      Content="<td><div align=center><a href="&sowinpath&rs("lpath")&rs("FileName")&".html target=_blank>"&Title&"</a><div></td>"
      CrHNJS.WriteLine("document.write("""&Content&""")")
      rs.movenext
    next
    Table="</tr></table>"
    CrHNJS.WriteLine("document.write("""&Table&""")")
    rs.close
    set rs=nothing
  End Sub

  Sub CSS2()
    set rs=Server.CreateObject("adodb.recordset")
    sql="select * from JSFile where JSType='图片新闻' and JSName='"&request.form("PhotoNewsName")&"' order by ID desc"
    rs.open sql,conn,1,1
    set rs3=Server.CreateObject("adodb.recordset")
    sql3="Select Depict,IndexCount,JSNameEN,PicWi,PicHi from JS where Type='图片新闻' and JSNameCN='"&request.form("PhotoNewsName")&"'"
    rs3.open sql3,conn,1,1
    Set MyFile=Server.CreateObject("Scripting.FileSystemObject")
    set CrHNJS=MyFile.CreateTextFile(Server.MapPath("..")&"\Otherjs\"&rs3("JSNameEN")&".js")
    set CrHNHt=MyFile.CreateTextFile(Server.MapPath("..")&"\Otherjs\"&rs3("JSNameEN")&".html")
    CrHNHt.WriteLine("<script src="&rs3("JSNameEN")&".js></script>")
    Table="<table whidth=100% >"
    CrHNJS.WriteLine("document.write("""&Table&""")")
    for i=1 to rs3("IndexCount")
      if rs.eof then exit for
      set rs4=Server.CreateObject("adodb.recordset")
      sql4="Select Content from News Where FileName='"&rs("FileName")&"'"
      rs4.open sql4,conn,1,1
      depict=left(replace(rs4("Content"),"'","''"),rs3("Depict"))
      if instr(depict,chr(13))>0 then depict=replace(depict,chr(13),"")'去回车
      if instr(depict,chr(10))>0 then depict=replace(depict,chr(10),"")'去满行
      depict=replace(depict,chr(34),"″")
      Content="<tr><td><a href="&sowinpath&rs("lpath")&"/"&rs("FileName")&".html target=_blank><img src="&rs("PhotoPath")&" border=0 width="&rs3("PicWi")&" height="&rs3("PicHi")&"></a></td><td width=90% >·<a href="&sowinpath&rs("lpath")&rs("FileName")&".html target=_blank>"&CovtTitle(rs("Title"))&"</a><br>&nbsp;&nbsp;"&depict&"..<a href="&sowinpath&rs("lpath")&rs("FileName")&".html target=_blank>详细内容</a></td></tr>"
      CrHNJS.WriteLine("document.write("""&Content&""")")
      rs.movenext
    next
    Table="</table>"
    CrHNJS.WriteLine("document.write("""&Table&""")")
    rs.close
    set rs=nothing
  End Sub

  Sub CSS3()
    set rs=Server.CreateObject("adodb.recordset")
    sql="select * from JSFile where JSType='图片新闻' and JSName='"&request.form("PhotoNewsName")&"' order by ID desc"
    rs.open sql,conn,1,1
    set rs3=Server.CreateObject("adodb.recordset")
    sql3="Select IndexCount,JSNameEN,PicWi,PicHi from JS where Type='图片新闻' and JSNameCN='"&request.form("PhotoNewsName")&"'"
    rs3.open sql3,conn,1,1
    Set MyFile=Server.CreateObject("Scripting.FileSystemObject")
    set CrHNJS=MyFile.CreateTextFile(Server.MapPath("..")&"\Otherjs\"&rs3("JSNameEN")&".js")
    set CrHNHt=MyFile.CreateTextFile(Server.MapPath("..")&"\Otherjs\"&rs3("JSNameEN")&".html")
    CrHNHt.WriteLine("<script src="&rs3("JSNameEN")&".js></script>")
    for i=1 to rs3("IndexCount")
      if rs.eof then exit for
      Content="<a href="&sowinpath&rs("lpath")&rs("FileName")&".html target=_blank><img src="&rs("PhotoPath")&" border=0 width="&rs3("PicWi")&" height="&rs3("PicHi")&"><br>"&CovtTitle(rs("Title"))&"</a><br><br>"
      CrHNJS.WriteLine("document.write("""&Content&""")")
      rs.movenext
    next
    rs.close
    set rs=nothing
  End Sub
  
   Sub CSS4()
    set rs=Server.CreateObject("adodb.recordset")
    sql="select * from JSFile where JSType='图片新闻' and JSName='"&request.form("PhotoNewsName")&"' order by ID desc"
    rs.open sql,conn,1,1
    set rs3=Server.CreateObject("adodb.recordset")
    sql3="Select IndexCount,JSNameEN,PicWi,PicHi from JS where Type='图片新闻' and JSNameCN='"&request.form("PhotoNewsName")&"'"
    rs3.open sql3,conn,1,1
    Set MyFile=Server.CreateObject("Scripting.FileSystemObject")
    set CrHNJS=MyFile.CreateTextFile(Server.MapPath("..")&"\Otherjs\"&rs3("JSNameEN")&".js")
    set CrHNHt=MyFile.CreateTextFile(Server.MapPath("..")&"\Otherjs\"&rs3("JSNameEN")&".html")
    CrHNHt.WriteLine("<script src="&rs3("JSNameEN")&".js></script>")
    for i=1 to rs3("IndexCount")
      if rs.eof then exit for
      Content="<a href="&sowinpath&rs("lpath")&rs("FileName")&".html target=_blank><img src="&rs("PhotoPath")&" border=0 width="&rs3("PicWi")&" height="&rs3("PicHi")&">"
      CrHNJS.WriteLine("document.write("""&Content&""")")
      rs.movenext
    next
    rs.close
    set rs=nothing
  End Sub
  
  Sub result()
%>
<p> </p>
<p> </p>
<p> </p>
<body>
<form method=post action=admin_NewsModify_f1.asp?ClassCN=<%=ClassCN%>><TABLE class=body cellSpacing=0 cellPadding=0 width=400 align=center background=pic/err_bg1.gif border=0>
    <TBODY>
      <TR> 
        <TD width=10 height=23><IMG height=23 src="pic/err1.gif" width=24 border=0></TD>
        <TD width=348 height=23>&nbsp;<b> 
          <% if session("errorMsg")<>"" then %>
          操作错误 
          <% else %>
          添加到JS列表成功 
          <% end if%>
          </b></TD>
        <TD vAlign=baseline width=37 height=23 align=right><A onmouseover="MM_swapImage('close','','pic/err_close2.gif',1)" onmouseout=MM_swapImgRestore() href="javascript:window.close()"><IMG height=18 src="pic/err_close2.gif" width=15 border=0 name=close></A></TD>
        <TD width=5 height=23><IMG height=23 src="pic/err2.gif" width=5 border=0 name=errr1_c4></TD>
      </TR>
    </TBODY>
  </TABLE>
  <TABLE class=body cellSpacing=0 cellPadding=0 width=400 align=center border=0>
    <TBODY>
      <TR vAlign=bottom> 
        <TD background=pic/err_bg.gif height=120> <BLOCKQUOTE> 
            <DIV id=base> <br>
              <br>
              <br>
              <font color=red><%=session("errormsg")%></font> 
              <% if session("errorMsg")<>"" then %>
              <br>
              <br>
              <br>
               <A onmouseover="MM_swapImage('back','','pic/err_but2.gif',1)" onmouseout=MM_swapImgRestore() href="javascript:history.go(-1)">
              <input name="imageField" type="image" src="pic/err_but2.gif" border="0">
              </A>
              <% else  %>
              <br>
              按确定键返回"新闻管理"<br>
              <br>
              <A onmouseover="MM_swapImage('back','','pic/err_but2.gif',1)" onmouseout=MM_swapImgRestore() href="javascript:history.go(-1)"> 
              </A> 
              <input name="submit" type="submit" value=" 确 定 ">
              <% end if:session("errorMsg")="" %>
            </DIV>
          </BLOCKQUOTE>
          <P align=center><A onmouseover="MM_swapImage('back','','pic/err_but2.gif',1)" onmouseout=MM_swapImgRestore() href="javascript:history.go(-1)"> 
            </A> </TD>
      </TR>
      <TR> 
        <TD height=2><IMG height=5 src="pic/err_bot.gif" width=400></TD>
      </TR>
    </TBODY>
  </TABLE>
 </form>
<% end Sub%>

⌨️ 快捷键说明

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