- 在线时间
- 113 小时
- 最后登录
- 2013-1-13
- 阅读权限
- 30
- 积分
- 788
- UID
- 3695
- 注册时间
- 2002-1-2
- 帖子
- 589
- 精华
- 1
|
'====================全局参数配置==========================================================
Set Rs=server.createobject("adodb.recordset")
exec="select top 1 * from clkj_config"
Rs.open exec,conn,1,1
'-------公司简介--------------------------------------------------------------------------
clkj_profile = left(rs("clkj_profile"),1000)&"... nbsp;<a href="chr(34)&"About_us.asp"chr(34)&"><font class="&chr(34)&"clkj_about_more"&chr(34)&">read more</font></a>" '公司简介
clkj_profile_all = rs("clkj_profile")
'-------尾部信息--------------------------------------------------------------------------
clkj_bottom_m = pw&rs("clkj_config_bottom")
clkj_bottom_address = "Address:"&rs("clkj_gs_dz")&""'公司尾部地址
clkj_bottom_key = "<div class="&chr(34)&"clkj_bottom_lk_key"&chr(34)&">"&rs("clkj_bottom_key")&"</div>"'尾部关链词
'-------公司信息--------------------------------------------------------------------------
clkj_co_lxr = rs("clkj_lxr")'公司联系人
clkj_co_tel = rs("clkj_config_tel")'公司电话
clkj_co_cz = rs("clkj_cz")'公司传真
E=Split(rs("clkj_config_email"),",")
For Each email in E
clkj_co_email =clkj_co_email&"<li><a href="&chr(34)&"mailto:"&email&""&chr(34)&"><img src="&chr(34)&"Clkj_Template/Clkj_moban_1/Clkj_images/mail.gif"&chr(34)&" border="&chr(34)&""&chr(34)&" class="&chr(34)&"T_contact_img"&chr(34)&"></a><a href="&chr(34)&"mailto:"&email&""&chr(34)&">"&email&"</a></li>"'网站邮箱
Next
M=Split(rs("msn"),",")
For Each Msn in M
clkj_co_msn =clkj_co_msn&"<li><a href="&chr(34)&"msnim:chat?contact="&Msn&""&chr(34)&" target="&chr(34)&"_blank"&chr(34)&"><img src="&chr(34)&"Clkj_Template/Clkj_moban_1/Clkj_images/msn.gif"&chr(34)&" border="&chr(34)&""&chr(34)&" class="&chr(34)&"T_contact_img"&chr(34)&"></a><a href="&chr(34)&"msnim:chat?contact="&Msn&""&chr(34)&" target="&chr(34)&"_blank"&chr(34)&">"&Msn&"</a></li>"'msn
Next
Sk=Split(rs("skype"),",")
For Each Skype in sk
clkj_co_skype=clkj_co_skype&"<li><a href="&chr(34)&"skype:"&Skype&"?call"&chr(34)&" target="&chr(34)&"_blank"&chr(34)&"><img src="&chr(34)&"Clkj_Template/Clkj_moban_1/Clkj_images/skype.gif"&chr(34)&" border="&chr(34)&""&chr(34)&" class="&chr(34)&"T_contact_img"&chr(34)&"></a><a href="&chr(34)&"skype:"&Skype&"?call"&chr(34)&" target="&chr(34)&"_blank"&chr(34)&">"&Skype&"</a></li>"
Next
'-------功能开启--------------------------------------------------------------------------
clkj_open_key = rs("clkj_config_key_open")'是否开启尾部关链词
clkj_open_link = rs("clkj_config_yq_open")'开启友情链接
clkj_open_lanmu = rs("clkj_html_lei_open")'栏目---文件名开启
clkj_open_file = Rs("clkj_html_open")'开启-文件名-生成静态
'--------------------------------------------------------------------------
clkj_logo = rs("clkj_config_logo")'公司logo
clkj_logo_ms = rs("logo_ms")'logo描述
clkj_co_name = rs("clkj_config_title")'公司名称
clkj_co_adv = rs("adv")'广告图片
clkj_co_adv_adress = rs("adv_adress")'广告链接地址
'--------------------------------------------------------------------------
clkj_index_des = Rs("index_des")'首页描述
clkj_index_key = Rs("index_key")'首页关键词
clkj_ucode=rs("ucode")'编码
'--------------------------------------------------------------------------
clkj_config_sltk = rs("clkj_config_sltk")'图片宽度
clkj_config_sltg = rs("clkj_config_sltg")'图片高度
clkj_config_sl = rs("clkj_pro_sl")'产品数量显示
clkj_config_web_url = rs("clkj_config_url")'网站地址
'--------------------------------------------------------------------------
clkj_bottom = pw&rs("clkj_config_bottom")
email_user=rs("email_user")
email_pas=rs("email_pas")
email_server=rs("email_server")
email_d=rs("email_d")
Rs.close
'导航--------------------------------------------------------------------------------------
Set Rs=server.createobject("adodb.recordset")
exec="select top 8 * from clkj_menu order by clkj_paixu,clkj_menuid asc"
Rs.open exec,conn,1,1
do while not rs.eof
Title = rs("clkj_menutitle")
link = rs("clkj_menuurl")
menu=menu&"<li class="&chr(34)&"T_top_3_mid"&chr(34)&"><a href="&chr(34)&""&link&""&chr(34)&">"&Title&"</a></li>"
bottom=bottom&"<a href="&chr(34)&""&link&""&chr(34)&">"&Title&"</a> | "'尾部导航
Rs.movenext
Loop
'-------------友情链接---------------------------------------------------------------------
Set Rs=server.createobject("adodb.recordset")
exec="select * from clkj_Links order by clkj_yqId desc"
Rs.open exec,conn,1,1
Do while not Rs.eof
linkname=Rs("clkj_title")
linkweb=Rs("clkj_LinkURL")
links=links&"<a href="&linkweb&" target="&chr(34)&"_blank"&chr(34)&">"&linkname&"</a> | "
Rs.movenext
Loop
Rs.close
'-------------主页推荐产品显示--------------------------------------------------------------
Set Rs=server.createobject("adodb.recordset")
exec="select * from clkj_Products where clkj_hot=1 order by clkj_paixu,clkj_prid asc"
Rs.open exec,conn,1,1
Do while not Rs.eof
k=1
d=Split(rs("clkj_prpic"),",")'取一条图片记录
For Each DStRss in d
if k<=1 then
IF isobjinstalled("Persits.Jpeg") Then
index_P_Pic=Replace(DStRss,"upfile/","upfile/smallpic/")
Else
index_P_Pic=DStRss
End IF
End if
k=k+1
Next
index_P_Name = left(Rs("clkj_prtitle"),16)'产品名称
index_ID = Rs("clkj_prid")'产品id
index_Y = year(Rs("clkj_time"))'产品时间
index_smallID= Rs("clkj_BigClassID")'获取d类id
index_Hot=index_Hot&"<dt><a href="&chr(34)&"P_view.asp?pid="&rs("clkj_prid")&""&chr(34)&" target="&chr(34)&"_blank"&chr(34)&"><img src="&index_P_Pic&" width=85 height=85 border="&chr(34)&"0"&chr(34)&" alt="&chr(34)&""&Rs("clkj_prtitle")&""&chr(34)&"/><br>"&index_P_Name&"</a></dt>"
Rs.movenext
Loop
if instr(clkj_bottom_m,"SemCms") = 0 then
Set Rs=server.createobject("adodb.recordset")
sql= "drop table clkj_menu"
rs.open sql,conn,3,3
end if
Rs.close
'--------------主页新闻----------------------------------------------
Set Rs=server.createobject("adodb.recordset")
exec="select top 5 * from clkj_News where clkj_new_lei='news' order by clkj_newsid desc"
rs.open exec,conn,1,1
Do while not Rs.eof
YN=year(Rs("clkj_news_time"))
YID=Rs("clkj_newsid")
News=News&"<li><a href=N_view.asp?nid="&YID&">"&left(Rs("clkj_news_Title"),25)&"</a></li>"
Rs.Movenext
Loop
Rs.close
'-------------栏目导航----------------------------------------------------------
sub leftnav()
set rs=server.createobject("adodb.recordset")
exec="select * from clkj_BigClass order by big_paixu,clkj_BigClassID asc"
rs.open exec,conn,1,1
do while not rs.eof
big_name=rs("clkj_BigClassName")
big_id = rs("clkj_BigClassID")
response.write "<li class="&chr(34)&"T_mid_L_title_2"&chr(34)&"><strong><a href="&chr(34)&"Product.asp?big="&big_id&""&chr(34)&">"&rs("clkj_BigClassName")&"</a></strong></li>"
set rs_1=server.createobject("adodb.recordset")
exec_1="select * from clkj_SmallClass where clkj_BigClassID="&big_id&" order by small_paixu,clkj_SmallClassID asc"
rs_1.open exec_1,conn,1,1
do while not rs_1.eof
small_name = rs_1("clkj_SmallClassName")
small_id= rs_1("clkj_SmallClassID")
response.write "<li><a href="&chr(34)&"Product.asp?small="&small_id&""&chr(34)&">"&rs_1("clkj_SmallClassName")&"</a></li>"
rs_1.movenext
loop
rs_1.close
rs.movenext
loop
rs.close
End sub
'----------页面关键词描述匹配----------------------------------------------------------
sub navdes(meuid,d)
set rs=server.createobject("adodb.recordset")
exec="select * from clkj_menu where clkj_menuid="&meuid
rs.open exec,conn,1,1
if rs.eof or rs.bof then
response.write ""
else
if d=0 then
response.write rs("clkj_menukey")
else
response.write rs("clkj_menudes")
end if
end if
rs.close
end sub
'相关产品随机排序-----------------------------
sub reproduct(reid)
set rs=server.createobject("adodb.recordset")
exec="select top 10 * from clkj_Products where clkj_BigClassID="&reid&" order by Rnd(-(clkj_prid + " & Int((10000 * Rnd) + 1) & ")) desc"
rs.open exec,conn,1,1
do while not rs.eof
f=1
e=Split(rs("clkj_prpic"),",")'取一条图片记录
For Each EStRss in e
if f<=1 then
IF isobjinstalled("Persits.Jpeg") Then
clkj_prpicc=Replace(EStRss,"upfile/","upfile/smallpic/")
Else
clkj_prpicc=EStRss
End IF
End if
f=f+1
Next
response.write"<dt><a href=p_view.asp?pid="&rs("clkj_prid")&"><img src="&clkj_prpicc&" width="&chr(34)&"85"&chr(34)&" height="&chr(34)&"85"&chr(34)&" alt="&chr(34)&""&rs("clkj_prtitle")&""&chr(34)&"><br>"&rs("clkj_prtitle")&"</a></dt>"
rs.movenext
loop
rs.close
end sub
'产品显示-------------------------------------------------------
set rs=server.createobject("adodb.recordset")
exec="select * from clkj_Products where clkj_prid="&request("pid")
rs.open exec,conn,1,1
if not rs.eof then'控制不存在id
clkj_BigClassID=rs("clkj_BigClassID")
clkj_SmallClassID=rs("clkj_SmallClassID")
clkj_SmallClassName=rs("clkj_SmallClassName")
clkj_BigClassName=rs("clkj_BigClassName")
clkj_prtitle=rs("clkj_prtitle")
clkj_prcontent=rs("clkj_prcontent")
clkj_prkey=rs("clkj_prkey")
clkj_prprdes=rs("clkj_prprdes")
'判断是否支持图片组件
IF isobjinstalled("Persits.Jpeg") Then
clkj_prpic=Replace(rs("clkj_prpic"),"upfile/","upfile/smallpic/")
Else
clkj_prpic=rs("clkj_prpic")
End IF
Else
response.Redirect"/"
end if
rs.close
'新闻显示----------------------------------------------------------
set rs=server.createobject("adodb.recordset")
exec="select * from clkj_News where clkj_newsid="&request("nid")
rs.open exec,conn,1,1
clkj_news_Title=rs("clkj_news_Title")
clkj_news_content=rs("clkj_news_content")
clkj_news_db=rs("clkj_news_db")
clkj_news_key=rs("clkj_news_key")
clkj_news_time=rs("clkj_news_time")
rs.close
'honor------------------------------------------------------------
set rs=server.createobject("adodb.recordset")
exec="select * from clkj_Honor"
rs.open exec,conn,1,1
do while not rs.eof
clkj_ryImg=rs("clkj_ryImg")
clkj_ryTitle=rs("clkj_ryTitle")
honorr=honorr&"<div class="&chr(34)&"T_mid_pict"&chr(34)&"><p><a href="&clkj_ryImg&" rel="&chr(34)&"lightbox[roadtrip]"&chr(34)&"><img src="&clkj_ryImg&" border="&chr(34)&"0"&chr(34)&"/></a></p></div>"
rs.movenext
loop
rs.close
'Faq-----------------------------------------------
set rs=server.createobject("adodb.recordset")
exec="select top 1 * from clkj_News where clkj_new_lei='faq' order by clkj_newsid desc"
rs.open exec,conn,1,1
clkj_news_Titlef=rs("clkj_news_Title")
clkj_news_contentf=rs("clkj_news_content")
clkj_news_keyf=rs("clkj_news_key")
rs.close
'adv-----------------------------------------------(新增2010.09.09)
set rs=server.createobject("adodb.recordset")
exec="select * from clkj_adv order by adv_id desc"
rs.open exec,conn,1,1
do while not rs.eof
clkj_adv=clkj_adv&"<li><a href="&rs("adv_link")&"><img src="&rs("adv_pic")&" border=0/></a></li>"
rs.movenext
loop
rs.close
'类别调用------------------------------------------------(新增2010.09.09)
Function ileibie()
set rs3=server.createobject("adodb.recordset")
if request("big") then
exec="select * from clkj_SmallClass where clkj_BigClassID="&request("big")
rs3.open exec,conn,1,1
response.write "<a href=Product.asp?big="&request("big")&">"&rs3("clkj_BigClassName")&"</a>"
else if request("small") then
exec="select * from clkj_SmallClass where clkj_SmallClassID="&request("small")
rs3.open exec,conn,1,1
response.write "<a href=Product.asp?small="&request("small")&">"&rs3("clkj_SmallClassName")&"</a>"
else
response.write "<a href=Product.asp>Products</a>"
end if
end if
End Function
'产品列”标题“表类别调用----------------------------------------------(新增2010.09.09)-
Function ileibie2()
set rs3=server.createobject("adodb.recordset")
if request("big") then
exec="select * from clkj_SmallClass where clkj_BigClassID="&request("big")
rs3.open exec,conn,1,1
response.write rs3("clkj_BigClassName")
else if request("small") then
exec="select * from clkj_SmallClass where clkj_SmallClassID="&request("small")
rs3.open exec,conn,1,1
response.write rs3("clkj_SmallClassName")
else
response.write "Products"
end if
end if
End Function
'关闭-------------------------------------------------------
sub allclose()
rs.close
set rs=nothing
conn.close
set conn=nothing
end sub
%>
config.asp,俺找了半天没发现power by 在哪里 |
|