index.asp中句<!-- #include file="include/inc_uiconfig.asp" -->内inc_uiconfig.asp内容如下:其中句conn_dbpath="/database/web_syssource.asp"
就是网页数据库路径
<!-- #include file="inc_global.asp" -->
<!-- #include file="inc_md5.asp" -->
<!-- #include file="inc_connxml.asp" -->
<!-- #include file="inc_conndb.asp" -->
<!-- #include file="inc_public.asp" -->
<!-- #include file="inc_common.asp" -->
<!-- #include file="inc_sysfile.asp" -->
<!-- #include file="inc_uieditor.asp" -->
<!-- #include file="inc_rsdata.asp" -->
<%
''前台引用
dim edition_id,edition_name,edition_value,edition_xmlobj,edition_xmlpath
''conn_dbpath="/database/web_syssource.mdb"
conn_dbpath="/database/web_syssource.asp"
upload_path="/upload/"
webconfig_xml="/config/web_config.xml"
''edition_xmlpath="/config/serviceConfig.xml"
edition_xmlpath="/config/languageConfig.xml"
dbType=0
''等于"1"时表示引用SQL数据库,否则等于"0"时引用Access数据库
webStatus=1
set web_dbobj= new class_conndb
''网站基本信息读取
sql_cmd="select top 1 * from T_SysConfig"
if set_rsobjdata(sql_cmd)=true then
existConfig=true
dbType=rs_obj("webDbType")
webStatus=rs_obj("webStatus")
webOpenTime=rs_obj("webOpenTime")
webCookies=rs_obj("webCookies")
webAdminMail=rs_obj("webAdminMail")
stopUserName=rs_obj("stopUserName")
useForPass=rs_obj("useForPass")
retainUserName=rs_obj("retainUserName")
indexEditionVar=rs_obj("indexEditionVar")
uploadDllType=rs_obj("uploadDllType")
smtpWebServer=rs_obj("smtpWebServer")
smtpWebUserMail=rs_obj("smtpWebUserMail")
smtpWebUserPass=rs_obj("smtpWebUserPass")
end if
call set_closersobj(0)
session_for=webCookies
''if session(webCookies&"_veiwedition")<>"" then
''
edition_id=session(webCookies&"_veiwedition")
''
set session(webCookies&"_veiwedition")=nothing
''
session(webCookies&"_veiwedition")=edition_id
''else
''
session(webCookies&"_veiwedition")=1
''
edition_id=session(webCookies&"_veiwedition")
''end if
''--------版本进入判断开始-----------
set edition_xmlobj= new class_connxml
call edition_xmlobj.load_xmldoc(edition_xmlpath)
''call edition_xmlobj.load_xmltxt(edition_xmlpath)
dim editions_idlist,editions_titlist,editions_topiclist,languagekeyid,languagetopic,languagetitle
''languagekeyid=edition_xmlobj.getelem_value("languageconfig","languagekeyid")
''languagetopic=edition_xmlobj.getelem_value("languageconfig","languagetopic")
''languagetitle=edition_xmlobj.getelem_value("languageconfig","languagetitle")
languagekeyid=edition_xmlobj.getelem_value("","languagekeyid")
languagetopic=edition_xmlobj.getelem_value("","languagetopic")
languagetitle=edition_xmlobj.getelem_value("","languagetitle")
if instr(languagekeyid,"|")>0 then
editions_idlist=split(languagekeyid,"|")
editions_titlist=split(languagetitle,"|")
editions_topiclist=split(languagetopic,"|")
else
editions_idlist=languagekeyid
editions_titlist=languagetitle
editions_topiclist=languagetopic
end if
if var_null(edition_id)="" or int_true(edition_id)=false then
''默认的情况下的设置
if isarray(editions_idlist) then
edition_id=editions_idlist(0)
edition_name=editions_titlist(0)
edition_value=editions_topiclist(0)
else
edition_id=editions_idlist
edition_name=editions_titlist
edition_value=editions_topiclist
end if
else
''读取对应的版本信息数据
if isarray(editions_idlist) then
for var_i=0 to ubound(editions_idlist)
if edition_id=editions_idlist(var_i) then
edition_name=editions_titlist(var_i)
edition_value=editions_topiclist(var_i)
exit for
end if
next
if var_null(edition_name)="" then
edition_id=editions_idlist(0)
edition_name=editions_titlist(0)
edition_value=editions_topiclist(0)
end if
else
edition_id=editions_idlist
edition_name=editions_titlist
edition_value=editions_topiclist
end if
end if
''--------版本进入判断结束-----------
''开始读取所选版本的相关全局信息
sql_cmd="select * from T_SysMainInfo where editionId=" & edition_id
if set_rsobjdata(sql_cmd)=true then
webName=rs_obj("webName")
webUrl=rs_obj("webSiteUrl")
webWordKeys=rs_obj("webWordKeys")
webDescription=rs_obj("webDescription")
webAuthor=rs_obj("webAuthor")
webCopyRight=rs_obj("webCopyRight")
end if
call set_closersobj(0)
''返回对应版本信息的参数
function get_editionid()
dim the_editionvalue,thenow_pageurl,editionid_val
thenow_pageurl=request.servervariables("http_referer")
''读取对应的版本信息数据
if isarray(editions_idlist) then
for var_i=0 to ubound(editions_idlist)
the_editionvalue="/" & editions_topiclist(var_i) & "/"
if instr(thenow_pageurl,the_editionvalue)>0 then
editionid_val=editions_idlist(var_i)
edition_value=editions_topiclist(var_i)
exit for
end if
next
if var_null(editionid_val)="" then
editionid_val=editions_idlist(0)
edition_value=editions_topiclist(0)
end if
else
editionid_val=editions_idlist
edition_value=editions_topiclist
end if
''
if session(webCookies&"_veiwedition")<>"" then
''
''
else
''
set session(webCookies&"_veiwedition")=nothing
''
session(webCookies&"_veiwedition")=editionid_val
''
end if
get_editionid=editionid_val
end function
''判断进行是否将要记录点击数
function set_msortcounter(sm_indexvar,sm_dataid)
dim sm_indexv_did,all_counterid,counterid_temp
set_msortcounter=false
sm_indexv_did=sm_dataid
if int_true(sm_indexv_did)=true then
all_counterid=session(webCookies&"_"&sm_indexvar)
counterid_temp="," & all_counterid & ","
if instr(counterid_temp,"," & sm_indexv_did & ",")>0 then
set_msortcounter=false
else
if var_null(all_counterid)="" then
session(webCookies&"_"&sm_indexvar)=sm_indexv_did
else
session(webCookies&"_"&sm_indexvar)=all_counterid & "," & sm_indexv_did
end if
set_msortcounter=true
end if
end if
end function
''清空全局对象
sub release_webobj()
call edition_xmlobj.xmldom_clear()
set edition_xmlobj=nothing
if isarray(editions_idlist) then erase editions_idlist
if isarray(editions_titlist) then erase editions_titlist
if isarray(editions_topiclist) then erase editions_topiclist
call web_dbobj.conn_close()
set web_dbobj=nothing
end sub
%>