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

📄 admin_newsbingpai.asp

📁 新闻发布系统
💻 ASP
字号:
<!--#include file = "include.asp"-->
<!--#include file = "admin_CheckMana.asp"-->
<!--#include file = "inc/function.asp"-->
<%
'=========================================================
'产品目录:风讯产品N系列
'软件名称:风讯站点管理系统
'当前版本:2004.I.0225
'最新更新:2004.2.10
'=========================================================
'Copyright (C) 2002-2004 cooin.com. All rights reserved.
'网站: http://www.cooin.com  Foosun.net
'程序制作:轻风云(QQ:655071)
'Email:skeen@cooin.com,skeen@Foosun.net
'论坛支持:风讯在线论坛(http://bbs.cooin.com   http://bbs.foosun.net)
'=========================================================
%>
<%
if EnoughPopedom("makehtml")=1 then
Response.write"<script>alert(""[操作失败]\n\n你的权限不足!\n\n请与系统管理员联系获得足够的权限!"");location.href=""javascript:history.back()"";</script>"
Response.end
end if

  Domain=Request.ServerVariables("SERVER_NAME")
  soFilePath=Request.ServerVariables("PATH_INFO")
  soFilePath=lcase(left(soFilePath,instrRev(soFilePath,"/")))
  totoln=len(soFilePath)
  soFilePath=lcase(left(soFilePath,totoln-1))
  soFilePath=lcase(left(soFilePath,instrRev(soFilePath,"/")))
  sowinpath=Domain&soFilePath
  
    function CovtTitle(content)
  if content<>"" then
        CovtTitle=content
	CovtTitle=replace(CovtTitle,"[粗]","<b>")
	if instr(1,CovtTitle,"<b>",1)<>0 then CovtTitle=CovtTitle+"</b>"
	CovtTitle=replace(CovtTitle,"[红]","<font color=ff0000>")
	if instr(1,CovtTitle,"<font",1)<>0 then CovtTitle=CovtTitle+"</font>"
	CovtTitle=replace(CovtTitle,"[蓝]","<font color=blue>")
	if instr(1,CovtTitle,"<font",1)<>0 then CovtTitle=CovtTitle+"</font>"
	CovtTitle=replace(CovtTitle,"[绿]","<font color=green>")
	if instr(1,CovtTitle,"<font",1)<>0 then CovtTitle=CovtTitle+"</font>"
	CovtTitle=replace(CovtTitle,"[紫]","<font color=990099>")
	if instr(1,CovtTitle,"<font",1)<>0 then CovtTitle=CovtTitle+"</font>"
	CovtTitle=replace(CovtTitle,"[酱]","<font color=790000>")
	if instr(1,CovtTitle,"<font",1)<>0 then CovtTitle=CovtTitle+"</font>"
	CovtTitle=replace(CovtTitle,"[橙]","<font color=FF6600>")
	if instr(1,CovtTitle,"<font",1)<>0 then CovtTitle=CovtTitle+"</font>"
	CovtTitle=replace(CovtTitle,"[建议]","<font color=red>[建议]</font>")
	CovtTitle=replace(CovtTitle,"[注意]","<font color=red>[注意]</font>")
	CovtTitle=replace(CovtTitle,"[下载]","<font color=red>[下载]</font>")
	CovtTitle=replace(CovtTitle,"[公告]","<font color=red>[公告]</font>")
	CovtTitle=replace(CovtTitle,"[转载]","<font color=red>[转载]</font>")
	CovtTitle=replace(CovtTitle,"[焦点]","<font color=red>[焦点]</font>")
	CovtTitle=replace(CovtTitle,"[社会]","<font color=red>[社会]</font>")
	CovtTitle=replace(CovtTitle,"[推荐]","<font color=red>[推荐]</font>")
	CovtTitle=replace(CovtTitle,"[原创]","<font color=red>[原创]</font>")
  end if
  End function
  function BTitle(content)
  if content<>"" then
    BTitle=content
    BTitle=replace(BTitle,"[粗]","")
    BTitle=replace(BTitle,"[红]","")
    BTitle=replace(BTitle,"[蓝]","")
    BTitle=replace(BTitle,"[绿]","")
    BTitle=replace(BTitle,"[紫]","")
    BTitle=replace(BTitle,"[酱]","")
    BTitle=replace(BTitle,"[橙]","")
  end if
  End function
  
 if request.Form("action")="cr" then
   set MyFile=Server.CreateObject("Scripting.FileSystemObject")
   Set Crbpjs=MyFile.CreateTextFile(Server.MapPath("..")&"\otherjs\BPjs\Bp_news.js")
   str="document.write('" 
   set rs= server.createobject("adodb.recordset")
   sql="select top "&CInt(request.Form("ibingpai"))&" * from news where bingpai=true order by newsid asc"
   rs.open sql,conn,1,1
   i_temp=0
   for i=1 to CInt(request.form("ibingpai"))
      if rs.eof then exit for
        str = str & "<a href=http://"&sowinpath&rs("lpath")&rs("filename")&".html target=_blank>"&CovtTitle(gotTopic(rs("title"),CInt(request.form("ibiaoti"))))&"</a>&nbsp;&nbsp;"
        rs.movenext
		i_temp=i_temp+1
		if i_temp mod CInt(request.form("itbingpai")) = 0  then
	    str = str & "<br>"
		end if
   next
   str=str & "')"
   Crbpjs.Write str
   rs.close 
   Response.write"<script>alert(""成功: \n\n已经按照你的要求生成成功!\n\n代码:http://"&sowinpath&"otherJS/BPjs/Bp_news.js"");location.href=""admin_Newsbingpai.asp""</script>"
   response.Write("<p></p><p></p>成功生成并排新闻!前台调用代码:http://"&sowinpath&"otherJS/BPjs/Bp_news.js")
   response.end
 end if
  %>
 <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<body bgcolor="#FFFFFF" topmargin="30">
<form name="form1" method="post" action="?action=cr">
  <table width="631" height="115" border="0" align="center" cellpadding="2" cellspacing="1" bgcolor="#7ED3A7">
    <tr bgcolor="#F7FFF4"> 
      <td height="24" colspan="4"> 
        <table width="100%" border="0" cellpadding="0" cellspacing="0" background="images/bg1.gif">
          <tr> 
            <td height="26"> <div align="center"><b> <strong><font color="#000000">并排新闻生成</font></strong><font color="#000000">(需要操作这项,必须是你添加新闻时开启&quot;添加并排新闻&quot;开关)</font></b></div></td>
          </tr>
        </table>
      </td>
    </tr>
    <tr bgcolor="#F7FFF4"> 
      <td height="31" colspan="4">总新闻并排</td>
    </tr>
    <tr bgcolor="#F7FFF4"> 
      <td height="31"> 
        <div align="right">需要生成的条数:</div></td>
      <td> 
        <select name="ibingpai" id="select3">
          <option>1</option>
          <option>2</option>
          <option>3</option>
          <option>4</option>
          <option>5</option>
          <option>6</option>
          <option>7</option>
          <option>8</option>
          <option>9</option>
          <option>10</option>
          <option>11</option>
          <option>12</option>
          <option>13</option>
          <option>14</option>
          <option>15</option>
          <option>16</option>
          <option>17</option>
          <option>18</option>
          <option>19</option>
          <option selected>20</option>
          <option>21</option>
          <option>22</option>
          <option>23</option>
          <option>24</option>
          <option>25</option>
          <option>26</option>
          <option>27</option>
          <option>28</option>
          <option>29</option>
          <option>30</option>
          <option>31</option>
          <option>32</option>
          <option>33</option>
          <option>34</option>
          <option>35</option>
          <option>36</option>
          <option>37</option>
          <option>38</option>
          <option>39</option>
          <option>40</option>
        </select></td>
      <td> 
        <div align="right">每行放置标题数:</div></td>
      <td> 
        <select name="itbingpai" id="select2">
          <option>1</option>
          <option selected>2</option>
          <option>3</option>
          <option>4</option>
          <option>5</option>
          <option>6</option>
          <option>7</option>
          <option>8</option>
          <option>9</option>
          <option>10</option>
        </select></td>
    </tr>
    <tr bgcolor="#F7FFF4"> 
      <td height="31"> 
        <div align="right"> 标题显示字数:<br>
        </div></td>
      <td> 
        <input name="ibiaoti" type="text" id="ibiaoti" value="10" size="5"></td>
      <td> 
        <div align="right">是否需要显示大类标题:</div></td>
      <td> 
        <input type="radio" name="biaoti" value="true">
        <input name="biaoti" type="radio" value="false" checked>
        否</td>
    </tr>
    <tr bgcolor="#F7FFF4"> 
      <td height="28"> 
        <div align="right"></div></td>
      <td colspan="3">调用代码为:</td>
    </tr>
    <tr bgcolor="#F7FFF4"> 
      <td colspan="4"> 
        <div align="center"> 
          <input type="hidden" name="action" value="cr">
          <input type="submit" name="Submit" value="生成">
        </div></td>
    </tr>
  </table>
  </form>

⌨️ 快捷键说明

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