标题:[求助]这个变量传送怎么传
取消只看楼主
垃圾的沉默
Rank: 1
等 级:新手上路
威 望:2
帖 子:511
专家分:0
注 册:2007-6-25
 问题点数:0 回复次数:1 
[求助]这个变量传送怎么传

这是一个生成网站的文件
成文件
<!--#include file="inc.asp" -->
<%
ClassID=3
if ClassID=0 or ClassID="" then
response.write "ClassID Error"
response.End()
else
set rs=server.createobject("adodb.recordset")
sql="select * from GClass where ID="&ClassID&" order by ID asc"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "ClassID Search Error"
response.End()
else
ClassTitle=rs("Title")
Classurl="$site_url$/Info"&ClassID&"_1.html"
end if
rs.close
end if
BaseMB=MBinfo(11)
BaseMB = replace(BaseMB,"$头文件$",MBinfo(1))
BaseMB = replace(BaseMB,"$版权信息$",MBinfo(2))
BaseMB = replace(BaseMB,"$主分类列表$",Main_Border_List())
BaseMB = replace(BaseMB,"$单页信息$",Text_Bottom_list())
BaseMB = replace(BaseMB,"$附导航$",F_Border_List())
BaseMB = replace(BaseMB,"$友情链接$",frendlink())
'-------------k------------
BaseMB = replace(BaseMB,"$热点推荐$",K1_List_1())
'------------栏目-------------

set rs=server.createobject("adodb.recordset")
sql="select * from GInfo where ClassID=3 order by ID desc"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
else
do while not rs.eof
site_Title=rs("H1")&" - "&site_name
site_description=rs("H1")
site_keywords=rs("keyword")
set rsBorder=server.createobject("adodb.recordset")

rsBorder.open sql,conn,1,1
rsBorder.close
if rs("writer")="" then
writer="$site_name$"
else
writer=rs("writer")
end if
FileCount=getKey(rs("Content"))

filename=rs("filename")
Filebox=left(filename,instr(filename,"/"))
CheckAndCreateFolder("../../"&Filebox)
session("H1")=rs("H1")
'---------开始写文件
fileMB=BaseMB
voteincdir = server.mappath("../../"&filename)
set fs = CreateObject("Scripting.FileSystemObject")
set ts = fs.OpenTextFile(voteincdir,2, True)
'-------这里替换相关数据-----------------
fileMB = replace(fileMB,"$site_Title$",site_Title)
fileMB = replace(fileMB,"$site_description$",site_description)
fileMB = replace(fileMB,"$site_keywords$",site_keywords)

fileMB = replace(fileMB,"$文章标题H1$",rs("H1"))
fileMB = replace(fileMB,"$文章标题H2$",rs("H2"))
fileMB = replace(fileMB,"$文章标题H3$",rs("H3"))
fileMB = replace(fileMB,"$关键字$",rs("keyword"))

fileMB = replace(fileMB,"$发布时间$",rs("date"))
fileMB = replace(fileMB,"$作者$",writer)
fileMB = replace(fileMB,"$内容$",FileCount)


ads_1="<table border=0 align=left cellpadding=5 cellspacing=1 class=showword bgcolor='C6E4FE'><tr><td bgcolor='#ffffff'>$文章内部广告$</td></tr></table>"
fileMB = replace(fileMB,"$文章内部广告$",ads_1)
fileMB = replace(fileMB,"$文章内部广告$",ADinfo_file(rs("BorderID")))

fileMB = replace(fileMB,"$Google提供的广告$",ADinfo(2))
fileMB = replace(fileMB,"$百度主题推广$",ADinfo(3))
fileMB = replace(fileMB,"$栏目标题A$",TitleA(3))
fileMB = replace(fileMB,"$栏目标题B$",TitleB(3))
fileMB = replace(fileMB,"$栏目标题C$",TitleC(3))
fileMB = replace(fileMB,"$栏目标题D$",TitleD(3))
fileMB = replace(fileMB,"$栏目A$",Lei_A(3))
fileMB = replace(fileMB,"$栏目B$",Lei_B(3))
fileMB = replace(fileMB,"$栏目C$",Lei_C(3))
fileMB = replace(fileMB,"$相关报告A$","$site_url$/Report_"&BorderID&"_1.html")

fileMB = replace(fileMB,"$相关链接$",Info_list_Top(ClassID,BorderID,5,55,0))
fileMB = replace(fileMB,"$相关研究报告$",Report_list_Top(BorderID,5))
fileMB = replace(fileMB,"$Keyword$",K2_ListB())


fileMB = replace(fileMB,"$单页信息$",Text_Bottom_list())
fileMB = replace(fileMB,"$BorderTitle$",BorderTitle)
fileMB = replace(fileMB,"$Borderurl$",Borderurl)
fileMB = replace(fileMB,"$ClassTitle$",ClassTitle)
fileMB = replace(fileMB,"$Classurl$",Classurl)

fileMB = replace(fileMB,"$site_name$",site_name)
fileMB = replace(fileMB,"$site_url$",site_url)
ts.Write fileMB
ts.close
response.write FileName&"<br>"
'-----------
rs.movenext
loop
end if
rs.close
response.write "ok"

response.write "更新完成,<a href='modi.asp'>点这里返回</a>"
%>



inc.asp
<%
function Lei_A(ClassID)
H1=Session("H1")
Information =""
set rsInfo=server.createobject("adodb.recordset")
sql="select * from Lei_A where ClassID="&ClassID&" and keyword="&H1&" order by key_id desc"
rsInfo.open sql,conn,1,1
if rsInfo.eof and rsInfo.bof then
Information =Information &"-"
else
Information =Information &"<table width='100%' border=0 align=center cellpadding=0 cellspacing=0 class=word>"
K_TDcount=1
do while not rsInfo.eof
if K_TDcount>12 then
exit do
end if
K_TDcount=K_TDcount+1

Information =Information &"<tr align=left>"
for TDcount=1 to 1
if rsInfo.eof then
Information =Information &"<td>&nbsp;</td>"
else
Information =Information &"<td width='50%'>"
Information =Information &"<a href='"&rsInfo("url")&"' target=_blank>"&rsInfo("Title")&"</a>"
Information =Information &"</td>"
rsInfo.movenext
end if
next
Information =Information &"</tr>"
loop
Information =Information &"</table>"
end if
rsInfo.close
Lei_A=Information
end function
%>

想把生文件里的的Ginfo表中的H1列作为inc.asp 里的一个查询条件..怎么把这个值传送过来

搜索更多相关主题的帖子: 变量 ClassID response 
2007-08-03 14:31
垃圾的沉默
Rank: 1
等 级:新手上路
威 望:2
帖 子:511
专家分:0
注 册:2007-6-25
得分:0 
谢版主..问题解决.

人们笑我太疯癫...我笑人们太正经
2007-08-03 15:46



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-160122-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.733293 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved