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

📄 enhtml_makenews.asp

📁 破解版的企业网站源码!! 绝对好用 适合各种企业应用 其中包包含产品展示 企业介绍等等内容 可供二次开发
💻 ASP
字号:
<!--#include file="INC/HTMLenPRODUCT.ASP"--><!--#include file="admin.ASP"-->

<%

dim title
set rs_news=server.createobject("adodb.recordset")
sqltext4="select top 1 * from Bs_Sysdata"
rs_news.open sqltext4,conn,1,1	
title=rs_news("BsenCompanyName")	
rs_news=nothing
rs_news.close	
	

Response.Write "<Html>"
Response.Write "<Head>"
Response.Write "<Title>管理中心</title>"
Response.Write "<Meta Http-Equiv=""Content-Type"" Content=""Text/Html; CharSet=Gb2312"">"
Response.Write "<Link Type=""Text/Css"" Rel=""StyleSheet"" Href=""Images/style.css"">"
Response.Write "</Head>"

FileID=request("ID")
Dim Rs1,Sql1,Moban

Set Rs1=Server.CreateObject("ADODB.RecordSet")
Sql1 ="Select Mb From Moban where ID=19 "
Set Rs1=Conn.Execute (Sql1)
Moban=Rs1("Mb")
Moban1=Moban

strsmallclass="<TABLE cellSpacing=0 cellPadding=0 width=99% border=0>"


set rsbig = server.CreateObject ("adodb.recordset")
		sql="select * from enBigClass_New"
		rsbig.open sql,conn,1,1
if rsbig.eof and rsbig.bof then
	Response.Write "No Data……"
else
	i=1
	do while not rsbig.eof

strsmallclass=strsmallclass&"<TR><TD language=javascript onmouseup=""opencat(cat10"&i&"000,&#13;&#10; img10"&i&"000);"" id=item$pval[catID]) style=""CURSOR: hand"" width=34 height=24 align=center><IMG id=img10"&i&"000 src=img/class1.gif width=20 height=20></TD><TD width=662><a href='NSlist_"&rsbig("BigClassid")&"_1.html'>"&rsbig("BigClassName")&"</a></TD></TR><TR>"
strsmallclass=strsmallclass&"<TD id=cat10"&i&"000 "
if rsbig("BigClassName")=BigClassName then 
		     strsmallclass=strsmallclass&"style='DISPLAY' "   
		    else  
		     strsmallclass=strsmallclass&"style='DISPLAY: none' "
		    end if 
strsmallclass=strsmallclass&"colspan=2>"


set rsSmall = server.CreateObject ("adodb.recordset")
sqls="select * from enSmallClass_new where BigClassName='" & rsbig("BigClassName") & "' order by SmallClassID"
rsSmall.open sqls,conn,1,1
if rsSmall.eof and rsSmall.bof then
strsmallclass=strsmallclass&"No SmallClass"
else
	j=1
	do while not rsSmall.eof

strsmallclass=strsmallclass&"&nbsp;<IMG height=20 src=img/class3.gif width=26 align=absMiddle border=0><a href=NSSLIST_"&rsSmall("smallClassid")&"_1.html>"&rsSmall("SmallClassName")&"</a><BR>"

	rsSmall.movenext
	j=j+1
	loop
end if
rsSmall.close
set rsSmall=nothing

strsmallclass=strsmallclass&"</TD></TR>"

	rsbig.movenext
	i=i+1
	loop
	rsbig.close
    set rsbig=nothing
end if

strsmallclass=strsmallclass&"</TABLE>"


set rsRoot=server.createobject("adodb.recordset")
sql="select * From EnMenuClass where Depth=0 and ShowOnTop=True order by RootID"
rsRoot.open sql,conn,1,1
strtitle=""
do while not rsRoot.eof
ParentID=rsroot("classID")
		
strtitle=strtitle&"<li><a href="& rsroot("linkurl") &">"& rsroot("Classname") &"</a>"
strtitle=strtitle&"</strong><ul>"
set rsRoot1=server.createobject("adodb.recordset")
sql1="select * From EnMenuClass where Depth=1 and ShowOnTop=True and ParentID="& ParentID &" order by RootID"
rsRoot1.open sql1,conn,1,1
do while not rsRoot1.eof
strtitle=strtitle&"<li><a href="& rsroot1("linkurl")&">"& rsroot1("Classname")&"</a></li>"
RSROOT1.MOVENEXT
LOOP
RSROOT1=NOTHING
RSROOT1.CLOSE
strtitle=strtitle&"</ul>"
strtitle=strtitle&"</li>"
RSROOT.MOVENEXT
LOOP
RSROOT=NOTHING
RSROOT.CLOSE


id=cstr(request("id"))
Set rsnews=Server.CreateObject("ADODB.RecordSet") 
sql="update news set hits=hits+1 where id in("&FileID&")"
conn.execute sql
sql="select * from ennews where id in("&FileID&")"

rsnews.Open sql,conn,1,1
Do while not Rsnews.eof
title=rsnews("title")

strnews="<table width=649 border=0 align=center cellpadding=0 cellspacing=0>"
strnews=strnews&"<tr><td height=50 colspan=2 align=center class=tit>"&rsnews("title")&"</td></tr><tr>" 
strnews=strnews&"<td width=20% height=30 class=tit style=border-top: 1 solid #666666;border-bottom: 1 solid #666666></td><td width=80% align=center style=border-top: 1 solid #666666;border-bottom: 1 solid #666666>Add:"&rsnews("user")&"AddTime:"& rsnews("AddDate")&" Read:<font color=#FF0000>"&rsnews("hits")&"</font>Times </td></tr><tr><td class=black id=fontzoom colspan=2><br>"&rsnews("content")&"</td></tr><tr align=right><td colspan=2>&nbsp;</td></tr><tr align=right><td colspan=2>&nbsp;</td></tr>"
                    

strnews=strnews&"</table> "
				  

strnews=strnews&"<br><table width=95% border=0 align=center cellpadding=0 cellspacing=0><tr><td align=right><a href=javascript:window.print()>Print</a> || <a href=javascript:window.close()>Close</a></td></tr></table></td></tr></table>"


Moban=Replace(Moban,"<!-strsmallclass->",strsmallclass)
Moban=Replace(Moban,"<!-strnews->",strnews)
Moban=Replace(Moban,"<!-strClassname->",strClassname)
Moban=Replace(Moban,"<!-strLogin->",strLogin)
Moban=Replace(Moban,"<!-strTitle->",strTitle)
Moban=Replace(Moban,"<!-Title->",Title)
Moban=Replace(Moban,"<!-body->",body)
Moban=Replace(Moban,"<!-plist_bottom->",plist_bottom)

Set Fso=Server.CreateObject("Scripting.FileSystemObject")  '创建fso对象
Set Fout=Fso.CreateTextFile(server.mappath("EnHtml/News_"&id&".html"))
Fout.WriteLine Moban
Moban=Moban1
RsNews.Movenext
Loop
Fout.Close
Response.Write "<body>"
Response.Write "·<font color=""#FF0000""><b>成功:生成Html新闻页面文件成功,ID为["&Request("ID")&"]!</font></b>"
Response.Write "<script LANGUAGE=""JavaScript"">"
Response.Write "<!--"
Response.Write "setTimeout('window.close();', 600);"
Response.Write "// -->"
Response.Write "</script>"
Response.Write "</body>"

Rs1.Close 
Set Rs1=nothing 
Rs.Close
Set Rs=nothing
Conn.Close
Set Conn=nothing
Response.Write "</html>"
 %>

⌨️ 快捷键说明

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