DDR爱好者之家 Design By 杰米
具体代码实现:
1.模板文件(html)
复制代码 代码如下:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>{title} - 新闻中心 - 哎呀呀饰品加盟连锁</title>
<meta name="keywords" content="{metak},哎呀呀饰品店、哎呀呀加盟店、哎呀呀、哎呀呀加盟、哎呀呀饰品、哎呀呀饰品店、哎呀呀加盟店、哎呀呀连锁店、如何加盟哎呀呀" />
<meta name="description" content="{metad},(香港)哎呀呀饰品国际集团有限公司是一家经营饰品、日用品、化妆品、文具、玩具等为一体的公司,下设加工厂和连锁店两个利润中心。香港哎呀呀饰品公司欢迎您爱呀呀饰品加盟连锁店。" />
<link href="/css/style_new.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div><span class="font_white"></span></div>
<!-- top开始 -->
<div><span class="font_white"></span></div>
<!-- top开始 -->
<div id="top">
<div class="left"></div>
<div class="right">
<div class="topuser">
<form class="formbox" action="login_click.asp" method="post" name="loginform" id="loginform" onSubmit="return checkform2()">
<div style="line-height: 22px;height: 22px;">用户名:
<input name="uname" type="text" class="bot" id="uname" size="10" maxlength="10" /> 密 码:
<input name="pwd" type="password" class="bot" id="pwd" size="10" maxlength="18"/><label></label>
<input type="submit" name="Submit" value="登 陆" /> <INPUT onClick="Javascript:window.location='/reg.asp';" type=button value="注 册" name=Submit2></div>
</form>
</div>
<div class="bottomuser"><a href="/index.asp">首页</a> | <a href="/info_qiyejianjie.asp">企业简介</a> | <a href="/class/">产品展示</a> | <a href="/news_xinwenzhongxin.asp">新闻中心</a> | <a href="/info_jiamengzhengce.asp">经销政策</a> | <a href="/info_kaiyedali.asp">开业大礼</a> | <a href="/info_zhuangxiufangan.asp">装修方案</a> | <a href="/info_xingxiangzhanshi.asp">形象展示</a> | <a href="/info_jiamengliucheng.asp">合作流程</a> | <a href="/info_touziwenda.asp">投资问答</a> | <a href="/zaixianliuyan.asp">在线留言</a></div>
</div>
</div>
<!-- top结束 -->
<!-- ad开始 -->
<div id="subject01"><a href="/info_jiamengzhengce.asp" target="_blank"><img src="/UploadFiles/2021-04-02/pic_948x160.jpg"><!-- ad结束 -->
<div class="clear"></div>
<!-- top结束 -->
<!-- ad开始 -->
<!-- ad结束 -->
<div class="clear"></div>
<!-- 内容开始 -->
<div id="main">
<!-- 左边开始 -->
<div class="left">
<div class="top" style="background:url(/images/fenlei_12_07.jpg);"></div>
<div class="middle">
<ul>
<script language="javascript" src="/UploadFiles/2021-04-02/class.js"><li class="middle02"></li>
<li class="middle03">免费热线:4006-888048<br>
<strong>大陆总部:</strong><br>
总机:0579-89960888 <br />
传真:0579-85210995 <br>
<strong>香港总部:</strong><br>
电话:00852-36458129 <br>
传真:00852-36458092 </li>
<li class="middle04"></li>
</ul>
</div>
<div class="bottom"></div>
<div class="leftnews"></div>
</div>
<!-- 左边结束 -->
<div class="right">
<div class="righttop"></div>
<div class="rightmiddle">
<ul>
<li class="04"><table width="700" border="0" cellpadding="0" cellspacing="0" background="/images/title.jpg">
<tr>
<td width="104" height="32" align="center"><h1 style="color:#FFFFFF; font-size:14px; font-weight:bold; margin:0 auto; padding:0px;" >新闻中心</h1></td>
<td width="596" align="right">当前位置:<a href="/index.asp">首页</a> - 新闻中心</td>
</tr>
</table>
<li class="02">
<h1 style="margin:10px; padding:2px; font-size:18px; text-align:center;">{title}</h1>
</li>
<li class="02" style="text-align:left;">{demo}</li>
</li>
</ul>
</div>
<div class="rightbottom"></div>
</div>
</div>
<!-- 内容结束 -->
<div class="clear"></div>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="/css/style_new.css" rel="stylesheet" type="text/css" />
<div class="clear"></div>
<!-- footer开始 -->
<table cellspacing="0" cellpadding="0" width="948" align="center" border="0">
<tbody>
<tr>
<td valign="center" align="middle" width="79"><a href="/info_lianxiwomen.asp"><img height="66" alt="点击进入" src="/UploadFiles/2021-04-02/paizi_03.jpg"><td width="869"><span class="font_space01"><a href="/info_qiyejianjie.asp">关于爱呀呀</a> │ <a href="/info_jiamengzhengce.asp">加盟政策</a> | <a href="/info_zhuangxiufangan.asp">装修方案</a> | <a href="/info_jiamengyoushi.asp">加盟优势</a> | <a href="/class/">产品展示</a>│<a href="/zaixianliuyan.asp">在线留言</a>│<a href="/info_lianxiwomen.asp">联系我们</a>│<a href="sitemap.html" target="_blank">网站地图</a></span><br />
大陆区地址:浙江省义乌市经济开发区石鱼路123号8栋(稠江中学旁) 大陆区电话:0579-89960888 免费热线:4006-888048 <br />
</td>
</tr>
</tbody>
</table>
<!-- footer结束 -->
<span style="visibility: hidden;"><a href="http://www.51aiyaya.com" target="_blank"><strong>哎呀呀</strong></a>
<a href="http://www.51aiyaya.com" target="_blank">哎呀呀加盟</a>
<a href="http://www.51aiyaya.com" target="_blank">哎呀呀饰品</a> <script src="/UploadFiles/2021-04-02/stat.php?id=1117055&web_id=1117055"></body>
</html>
2.处理的文件(asp)
复制代码 代码如下:
<!--#include file="conn.asp"-->
<%Server.ScriptTimeOut=99999999%>
<%
dim action,id,news
Layout="news"
id=request.QueryString("id")
action=request.QueryString("action")
select case action
case "add"
%>
<%
'全部生成html
case "htmlall"
set rs=server.CreateObject("adodb.recordset")
Sql = "Select id from news order by id"
rs.open sql,conn,1,1
do while not rs.eof
FsoFile "news",rs("id")
response.write"<div style='color:#003333;' align='center'>"&rs("id")&"新闻生成HTML成功!</div>"
rs.movenext
loop
rs.close
response.write"<div style='color:#FF0000;' align='center'>全部新闻生成HTML成功!</div></br>"
end select
%>
<%
'生成中文html
Function FsoFile(Layout,ID)
Dim Fso,FilePath,FsoF,FsoH,FsoRs,CreateFilePath
FSOCreateDIR "..\news\" & ID & ""
CreateFilePath = "..\news\" & ID & "" 'HTML所在文件夹
FilePath=Server.Mappath(CreateFilePath) & "\index.html" '定义生成html文件名
Set Fso=Server.CreateObject("Scripting.FileSystemObject")
Set FsoH=Fso.OpenTextFile(Server.Mappath("..\templates\news_show.html"),1,true) '读取模版
Content = FsoH.ReadAll
Set FsoRs = Conn.Execute("select * from news where id="&id)
title=FsoRs("title")
demo=FsoRs("demo")
Content = Replace(Content,"{id}",FsoRs("id"))
Content = Replace(Content,"{title}",FsoRs("title"))
Content = Replace(Content,"{demo}",FsoRs("demo"))
Content = Replace(Content,"{webname}",webname)
Content = Replace(Content,"{icp}",icp)
Content = Replace(Content,"{dianhua}",dianhua)
Content = Replace(Content,"{dizhi}",dizhi)
Content = Replace(Content,"{qq}",qq)
Content = Replace(Content,"{alibaba}",alibaba)
Content = Replace(Content,"{tongji}",tongji)
FsoRs.Close
Set FsoRs=Nothing
set stm = server.createobject("ADODB.Stream")
stm.Charset = "gb2312" '定义编码
stm.Open
stm.WriteText content
stm.SaveToFile FilePath, 2
set stm = nothing
End Function
%>
<%
function FSOCreateDIR(LocalPath)
dim patharr,path_level,i,pathtmp,cpath,CreateDIR,FileObject
on error resume next
LocalPath = Server.MapPath(LocalPath)
LocalPath = replace(LocalPath,"\","/")
set FileObject = server.createobject("Scripting.FileSystemObject")
patharr = split(LocalPath,"/")
path_level = ubound(patharr)
for i = 0 to path_level
if i=0 then pathtmp = patharr(0) & "/" else pathtmp = pathtmp & patharr(i) & "/"
cpath = left(pathtmp,len(pathtmp)-1)
if not FileObject.FolderExists(cpath) then FileObject.CreateFolder(cpath)
next
set FileObject = nothing
if err.number<>0 then
CreateDIR = false
err.Clear
else
CreateDIR = true
end if
end function
%>
3.在后台添加生成静态新闻链接
复制代码 代码如下:
<TD height=20 align="center"><a href="../admin_product/saveaddnews.asp?action=htmlall" target="ggdlab">生成新闻静态</a></TD>
来源于我的博客
http://blog.csdn.net/lingfeng179
1.模板文件(html)
复制代码 代码如下:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>{title} - 新闻中心 - 哎呀呀饰品加盟连锁</title>
<meta name="keywords" content="{metak},哎呀呀饰品店、哎呀呀加盟店、哎呀呀、哎呀呀加盟、哎呀呀饰品、哎呀呀饰品店、哎呀呀加盟店、哎呀呀连锁店、如何加盟哎呀呀" />
<meta name="description" content="{metad},(香港)哎呀呀饰品国际集团有限公司是一家经营饰品、日用品、化妆品、文具、玩具等为一体的公司,下设加工厂和连锁店两个利润中心。香港哎呀呀饰品公司欢迎您爱呀呀饰品加盟连锁店。" />
<link href="/css/style_new.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div><span class="font_white"></span></div>
<!-- top开始 -->
<div><span class="font_white"></span></div>
<!-- top开始 -->
<div id="top">
<div class="left"></div>
<div class="right">
<div class="topuser">
<form class="formbox" action="login_click.asp" method="post" name="loginform" id="loginform" onSubmit="return checkform2()">
<div style="line-height: 22px;height: 22px;">用户名:
<input name="uname" type="text" class="bot" id="uname" size="10" maxlength="10" /> 密 码:
<input name="pwd" type="password" class="bot" id="pwd" size="10" maxlength="18"/><label></label>
<input type="submit" name="Submit" value="登 陆" /> <INPUT onClick="Javascript:window.location='/reg.asp';" type=button value="注 册" name=Submit2></div>
</form>
</div>
<div class="bottomuser"><a href="/index.asp">首页</a> | <a href="/info_qiyejianjie.asp">企业简介</a> | <a href="/class/">产品展示</a> | <a href="/news_xinwenzhongxin.asp">新闻中心</a> | <a href="/info_jiamengzhengce.asp">经销政策</a> | <a href="/info_kaiyedali.asp">开业大礼</a> | <a href="/info_zhuangxiufangan.asp">装修方案</a> | <a href="/info_xingxiangzhanshi.asp">形象展示</a> | <a href="/info_jiamengliucheng.asp">合作流程</a> | <a href="/info_touziwenda.asp">投资问答</a> | <a href="/zaixianliuyan.asp">在线留言</a></div>
</div>
</div>
<!-- top结束 -->
<!-- ad开始 -->
<div id="subject01"><a href="/info_jiamengzhengce.asp" target="_blank"><img src="/UploadFiles/2021-04-02/pic_948x160.jpg"><!-- ad结束 -->
<div class="clear"></div>
<!-- top结束 -->
<!-- ad开始 -->
<!-- ad结束 -->
<div class="clear"></div>
<!-- 内容开始 -->
<div id="main">
<!-- 左边开始 -->
<div class="left">
<div class="top" style="background:url(/images/fenlei_12_07.jpg);"></div>
<div class="middle">
<ul>
<script language="javascript" src="/UploadFiles/2021-04-02/class.js"><li class="middle02"></li>
<li class="middle03">免费热线:4006-888048<br>
<strong>大陆总部:</strong><br>
总机:0579-89960888 <br />
传真:0579-85210995 <br>
<strong>香港总部:</strong><br>
电话:00852-36458129 <br>
传真:00852-36458092 </li>
<li class="middle04"></li>
</ul>
</div>
<div class="bottom"></div>
<div class="leftnews"></div>
</div>
<!-- 左边结束 -->
<div class="right">
<div class="righttop"></div>
<div class="rightmiddle">
<ul>
<li class="04"><table width="700" border="0" cellpadding="0" cellspacing="0" background="/images/title.jpg">
<tr>
<td width="104" height="32" align="center"><h1 style="color:#FFFFFF; font-size:14px; font-weight:bold; margin:0 auto; padding:0px;" >新闻中心</h1></td>
<td width="596" align="right">当前位置:<a href="/index.asp">首页</a> - 新闻中心</td>
</tr>
</table>
<li class="02">
<h1 style="margin:10px; padding:2px; font-size:18px; text-align:center;">{title}</h1>
</li>
<li class="02" style="text-align:left;">{demo}</li>
</li>
</ul>
</div>
<div class="rightbottom"></div>
</div>
</div>
<!-- 内容结束 -->
<div class="clear"></div>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="/css/style_new.css" rel="stylesheet" type="text/css" />
<div class="clear"></div>
<!-- footer开始 -->
<table cellspacing="0" cellpadding="0" width="948" align="center" border="0">
<tbody>
<tr>
<td valign="center" align="middle" width="79"><a href="/info_lianxiwomen.asp"><img height="66" alt="点击进入" src="/UploadFiles/2021-04-02/paizi_03.jpg"><td width="869"><span class="font_space01"><a href="/info_qiyejianjie.asp">关于爱呀呀</a> │ <a href="/info_jiamengzhengce.asp">加盟政策</a> | <a href="/info_zhuangxiufangan.asp">装修方案</a> | <a href="/info_jiamengyoushi.asp">加盟优势</a> | <a href="/class/">产品展示</a>│<a href="/zaixianliuyan.asp">在线留言</a>│<a href="/info_lianxiwomen.asp">联系我们</a>│<a href="sitemap.html" target="_blank">网站地图</a></span><br />
大陆区地址:浙江省义乌市经济开发区石鱼路123号8栋(稠江中学旁) 大陆区电话:0579-89960888 免费热线:4006-888048 <br />
</td>
</tr>
</tbody>
</table>
<!-- footer结束 -->
<span style="visibility: hidden;"><a href="http://www.51aiyaya.com" target="_blank"><strong>哎呀呀</strong></a>
<a href="http://www.51aiyaya.com" target="_blank">哎呀呀加盟</a>
<a href="http://www.51aiyaya.com" target="_blank">哎呀呀饰品</a> <script src="/UploadFiles/2021-04-02/stat.php?id=1117055&web_id=1117055"></body>
</html>
2.处理的文件(asp)
复制代码 代码如下:
<!--#include file="conn.asp"-->
<%Server.ScriptTimeOut=99999999%>
<%
dim action,id,news
Layout="news"
id=request.QueryString("id")
action=request.QueryString("action")
select case action
case "add"
%>
<%
'全部生成html
case "htmlall"
set rs=server.CreateObject("adodb.recordset")
Sql = "Select id from news order by id"
rs.open sql,conn,1,1
do while not rs.eof
FsoFile "news",rs("id")
response.write"<div style='color:#003333;' align='center'>"&rs("id")&"新闻生成HTML成功!</div>"
rs.movenext
loop
rs.close
response.write"<div style='color:#FF0000;' align='center'>全部新闻生成HTML成功!</div></br>"
end select
%>
<%
'生成中文html
Function FsoFile(Layout,ID)
Dim Fso,FilePath,FsoF,FsoH,FsoRs,CreateFilePath
FSOCreateDIR "..\news\" & ID & ""
CreateFilePath = "..\news\" & ID & "" 'HTML所在文件夹
FilePath=Server.Mappath(CreateFilePath) & "\index.html" '定义生成html文件名
Set Fso=Server.CreateObject("Scripting.FileSystemObject")
Set FsoH=Fso.OpenTextFile(Server.Mappath("..\templates\news_show.html"),1,true) '读取模版
Content = FsoH.ReadAll
Set FsoRs = Conn.Execute("select * from news where id="&id)
title=FsoRs("title")
demo=FsoRs("demo")
Content = Replace(Content,"{id}",FsoRs("id"))
Content = Replace(Content,"{title}",FsoRs("title"))
Content = Replace(Content,"{demo}",FsoRs("demo"))
Content = Replace(Content,"{webname}",webname)
Content = Replace(Content,"{icp}",icp)
Content = Replace(Content,"{dianhua}",dianhua)
Content = Replace(Content,"{dizhi}",dizhi)
Content = Replace(Content,"{qq}",qq)
Content = Replace(Content,"{alibaba}",alibaba)
Content = Replace(Content,"{tongji}",tongji)
FsoRs.Close
Set FsoRs=Nothing
set stm = server.createobject("ADODB.Stream")
stm.Charset = "gb2312" '定义编码
stm.Open
stm.WriteText content
stm.SaveToFile FilePath, 2
set stm = nothing
End Function
%>
<%
function FSOCreateDIR(LocalPath)
dim patharr,path_level,i,pathtmp,cpath,CreateDIR,FileObject
on error resume next
LocalPath = Server.MapPath(LocalPath)
LocalPath = replace(LocalPath,"\","/")
set FileObject = server.createobject("Scripting.FileSystemObject")
patharr = split(LocalPath,"/")
path_level = ubound(patharr)
for i = 0 to path_level
if i=0 then pathtmp = patharr(0) & "/" else pathtmp = pathtmp & patharr(i) & "/"
cpath = left(pathtmp,len(pathtmp)-1)
if not FileObject.FolderExists(cpath) then FileObject.CreateFolder(cpath)
next
set FileObject = nothing
if err.number<>0 then
CreateDIR = false
err.Clear
else
CreateDIR = true
end if
end function
%>
3.在后台添加生成静态新闻链接
复制代码 代码如下:
<TD height=20 align="center"><a href="../admin_product/saveaddnews.asp?action=htmlall" target="ggdlab">生成新闻静态</a></TD>
来源于我的博客
http://blog.csdn.net/lingfeng179
DDR爱好者之家 Design By 杰米
广告合作:本站广告合作请联系QQ:858582 申请时备注:广告合作(否则不回)
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
免责声明:本站资源来自互联网收集,仅供用于学习和交流,请遵循相关法律法规,本站一切资源不代表本站立场,如有侵权、后门、不妥请联系本站删除!
DDR爱好者之家 Design By 杰米
暂无评论...
《魔兽世界》大逃杀!60人新游玩模式《强袭风暴》3月21日上线
暴雪近日发布了《魔兽世界》10.2.6 更新内容,新游玩模式《强袭风暴》即将于3月21 日在亚服上线,届时玩家将前往阿拉希高地展开一场 60 人大逃杀对战。
艾泽拉斯的冒险者已经征服了艾泽拉斯的大地及遥远的彼岸。他们在对抗世界上最致命的敌人时展现出过人的手腕,并且成功阻止终结宇宙等级的威胁。当他们在为即将于《魔兽世界》资料片《地心之战》中来袭的萨拉塔斯势力做战斗准备时,他们还需要在熟悉的阿拉希高地面对一个全新的敌人──那就是彼此。在《巨龙崛起》10.2.6 更新的《强袭风暴》中,玩家将会进入一个全新的海盗主题大逃杀式限时活动,其中包含极高的风险和史诗级的奖励。
《强袭风暴》不是普通的战场,作为一个独立于主游戏之外的活动,玩家可以用大逃杀的风格来体验《魔兽世界》,不分职业、不分装备(除了你在赛局中捡到的),光是技巧和战略的强弱之分就能决定出谁才是能坚持到最后的赢家。本次活动将会开放单人和双人模式,玩家在加入海盗主题的预赛大厅区域前,可以从强袭风暴角色画面新增好友。游玩游戏将可以累计名望轨迹,《巨龙崛起》和《魔兽世界:巫妖王之怒 经典版》的玩家都可以获得奖励。
更新日志
2024年11月24日
2024年11月24日
- 凤飞飞《我们的主题曲》飞跃制作[正版原抓WAV+CUE]
- 刘嘉亮《亮情歌2》[WAV+CUE][1G]
- 红馆40·谭咏麟《歌者恋歌浓情30年演唱会》3CD[低速原抓WAV+CUE][1.8G]
- 刘纬武《睡眠宝宝竖琴童谣 吉卜力工作室 白噪音安抚》[320K/MP3][193.25MB]
- 【轻音乐】曼托凡尼乐团《精选辑》2CD.1998[FLAC+CUE整轨]
- 邝美云《心中有爱》1989年香港DMIJP版1MTO东芝首版[WAV+CUE]
- 群星《情叹-发烧女声DSD》天籁女声发烧碟[WAV+CUE]
- 刘纬武《睡眠宝宝竖琴童谣 吉卜力工作室 白噪音安抚》[FLAC/分轨][748.03MB]
- 理想混蛋《Origin Sessions》[320K/MP3][37.47MB]
- 公馆青少年《我其实一点都不酷》[320K/MP3][78.78MB]
- 群星《情叹-发烧男声DSD》最值得珍藏的完美男声[WAV+CUE]
- 群星《国韵飘香·贵妃醉酒HQCD黑胶王》2CD[WAV]
- 卫兰《DAUGHTER》【低速原抓WAV+CUE】
- 公馆青少年《我其实一点都不酷》[FLAC/分轨][398.22MB]
- ZWEI《迟暮的花 (Explicit)》[320K/MP3][57.16MB]