www.gusucode.com > 艺帆全站DIV+CSS体育用品公司网站源码 1.7.5源码程序 > config.asp
<% set config=server.createobject("adodb.recordset") exec="select * from config" config.open exec,conn,1,1 if config("on") = 1 then response.write (""&config("off_sm")&"") response.End else end if Function DelHtml(Str1) Dim regEx Set regEx = New RegExp regEx.Pattern = "(<[^>]*?>)" regEx.Global = True regEx.IgnoreCase = True DelHtml = replace(regEx.Replace(""&str1,"")," ","") End Function Function InterceptString(txt,length) txt=trim(txt) x = len(txt) y = 0 if x >= 1 then for ii = 1 to x if asc(mid(txt,ii,1)) < 0 or asc(mid(txt,ii,1)) >255 then y = y + 2 else y = y + 1 end if if y >= length then txt = left(trim(txt),ii) exit for end if next InterceptString = txt else InterceptString = "" end if End Function %> <% Function i5808(ByVal Str,ByVal StrLen) Dim l,t,c,i,r '过滤全部HTML标记 Set r=New RegExp r.Global=True r.MultiLine=True r.Pattern="(</?[A-Za-z][A-Za-z0-9]*[^>]*>)" str=r.Replace(str," ") Set r=Nothing l=Len(str) t=0 For i=1 To l c=AscW(Mid(str,i,1)) If c<0 Or c>255 Then t=t+2 Else t=t+1 IF t>=StrLen Then i5808=Left(Str,i)&"..." Exit For Else i5808=Str End If Next End Function %> <%function TD_login()'会员登陆调用参数%> <%if session("username")<>"" then%> <table width="80%" border="0" cellpadding="3" cellspacing="0"> <tr> <td width="52%" colspan="2"><% set rs=server.createobject("adodb.recordset") exec="select * from user where id="&session("username")&" " rs.open exec,conn,1,1 response.write("<a href=""/member/index.asp"">"&rs("useradmin")&"</a> 欢迎您!") %></td> </tr> <tr> <td width="52%"><a href="/member/index.asp">我的资料</a></td> <td width="48%"><a href="/member/my_orders.asp">我的订单</a></td> </tr> <tr> <td><a href="/member/xiugai_password.asp">修改密码</a></td> <td><a href="/member/loginOUT.asp">退出登陆</a></td> </tr> </table> <%else%> <table width="80%" border="0" cellpadding="3" cellspacing="0"> <form action="member/login_pass.asp" method="post" name="add"> <tr> <td width="37%">帐号</td> <td width="63%" colspan="2"> <input name="useradmin" type="text" size="15" /></td> </tr> <tr> <td>密码</td> <td colspan="2"><input name="password" type="password" size="15" /></td> </tr> <tr> <td> </td> <td> <input align=middle border=0 cache height=20 src="images/login.gif" type=image width=48 name="image"></td> <td><a href="member/Register.asp"><img src="images/Register.gif" width="48" height="20" /></a></td> </tr></form> </table><%end if%> <%end function%> <% function TD_home() TD_home=""&config("title")&"" end function function TD_keywords() TD_keywords=""&config("keywords")&"" end function function TD_description() TD_description=""&config("description")&"" end function function TD_url() TD_url=""&config("url")&"" end function function TD_logo() TD_logo=""&config("logo")&"" end function function TD_logoiwidth() TD_logoiwidth=""&config("logoiwidth")&"" end function function TD_logoheight() TD_logoheight=""&config("logoheight")&"" end function function TD_name() TD_name=""&config("name")&"" end function function TD_mail() TD_mail=""&config("mail")&"" end function function TD_tel() TD_tel=""&config("tel")&"" end function function TD_fax() TD_fax=""&config("fax")&"" end function function TD_dz() TD_dz=""&config("dz")&"" end function function TD_copyright() TD_copyright=""&config("copyright")&"" end function function TD_beian() TD_beian="<a href=""http://www.miibeian.gov.cn"" target=""_blank"">"&config("beian")&"</a>" end function function TD_qq1() TD_qq1=""&config("qq1")&"" end function function TD_qq2() TD_qq2=""&config("qq2")&"" end function function TD_qqkg() TD_qqkg=""&config("qqkg")&"" end function function TD_syabout() TD_syabout=""&config("syabout")&"" end function function TD_newsclass() TD_newsclass=""&config("newsclass")&"" end function function TD_productsclass() TD_productsclass=""&config("productsclass")&"" end function function TD_downclass() TD_downclass=""&config("downclass")&"" end function function TD_jobclass() TD_jobclass=""&config("jobclass")&"" end function function TD_lyclass() TD_lyclass=""&config("lyclass")&"" end function %> <% function TD_about_list(m,n)'单页列表调用参数 set aboutlist=server.CreateObject("adodb.recordset") aboutlist.open "select * from about where clas="&n&" order by px_id asc",conn,1,1 if aboutlist.eof and aboutlist.bof then response.Write(" 暂无记录 !") end if while not aboutlist.eof response.Write("<li><a href=""/about/?" & aboutlist("id") & "-"&n&".html"" title=""" & aboutlist("title") &""">" & aboutlist("title") & "</a></li>") aboutlist.movenext wend aboutlist.close set aboutlist=nothing end function %> <% function TD_News_fl_list()'新闻分类调用参数 set newsfl=server.CreateObject("adodb.recordset") newsfl.open "select * from news_fl order by px_id asc",conn,1,1 if newsfl.eof and newsfl.bof then response.Write(" 暂无记录 !") end if while not newsfl.eof response.Write("<li><a href=""/news/?" & newsfl("id") & "-1.html"" title=""" & newsfl("title") &""">" & newsfl("title") & "</a></li>") newsfl.movenext wend newsfl.close set newsfl=nothing end function %> <% function TD_Navigation()'菜单导航调用参数 if pathcfg=0 then dim Navigation set Navigation=server.CreateObject("adodb.recordset") Navigation.open "select * from menu where yc=1 order by px_id asc",conn,1,1 while not Navigation.eof response.Write("<li><span><a href="""&Navigation("url")&""" target="""&Navigation("openfs")&""">"&Navigation("title")&"</a></span></li>") Navigation.movenext wend Navigation.close set Navigation=nothing else dim Navigationq set Navigationq=server.CreateObject("adodb.recordset") Navigationq.open "select * from menu where yc=1 order by px_id desc",conn,1,1 while not Navigationq.eof if Readsyspath="\" then response.Write("<li><a href="""&replace(Navigationq("url"),"/","")&""" target="""&Navigationq("openfs")&""">"&Navigationq("title")&"</a></li>") else response.Write("<li><a href="""&webpath&"/"&replace(Navigationq("url"),"/","")&""" target="""&Navigationq("openfs")&""">"&Navigationq("title")&"</a></li>") end if response.write ("<li class=""li_link""></li>") Navigationq.movenext wend Navigationq.close set Navigationq=nothing end if end function %> <% function TD_Flash()'首页Flash调用参数 set Flash=server.CreateObject("adodb.recordset") Flash.open "select * from flash order by px_id asc",conn,1,1 if Flash.eof and Flash.bof then response.Write(" ") end if while not Flash.eof response.Write("<li><a href="""&Flash("link")&""" target=""_blank""><img src="""&Flash("img")&""" alt="""&Flash("title")&""" /></a></li>") Flash.movenext wend Flash.close set Flash=nothing end function %> <% Function GetUrl(action)'加入收藏获取Url地址调用参数 GetUrl=request.servervariables("script_name")'赋目录及文件名 if action="div" then exit Function GetUrl=Mid(Request.ServerVariables("script_name"),InstrRev(Replace(Request.ServerVariables("script_name"),"\","/"),"/")+1)'赋文件名 if action="page" then exit Function GetUrl=request.servervariables("QUERY_STRING") if action="action" then exit Function GetUrl="http://" GetUrl=GetUrl&request.servervariables("HTTP_HOST")' if action="http" then exit Function GetUrl=GetUrl&request.servervariables("script_name")' if action="alldiv" then exit Function if request.servervariables("QUERY_STRING")<>"" then GetUrl=GetUrl&"?"&request.servervariables("QUERY_STRING")' End Function %> <% function TD_link_text(m,n)'文字友情链接调用参数 set link=server.createobject("adodb.recordset") exec="select top "&n&" * from [link] where lx="&m&" order by px_id desc " link.open exec,conn,1,1 if link.eof and link.bof then response.Write(" 友情链接 !") end if while not link.eof response.Write("<li><a href=""" & link("url") & """ target=""_blank"" title=""" & link("title") & """>" & link("title") & "</a></li> ") link.movenext wend link.close set link=nothing end function %> <% function TD_link_img()'图片友情链接调用参数 set link2=server.CreateObject("adodb.recordset") link2.open "select * from link where lx=2 order by px_id asc",conn,1,1 if link2.eof and link2.bof then response.Write(" ") end if while not link2.eof response.Write("<li><a href="""&link2("url")&""" title="""&link2("title")&""" target=""_blank""><img src="""&link2("logo")&""" width=""88"" height=""31""/></a></li>") link2.movenext wend link2.close set link2=nothing end function %> <% function TD_download_fl()'下载分类调用参数 set downloadclas=server.CreateObject("adodb.recordset") downloadclas.open "select * from download_fl order by px_id asc",conn,1,1 if downloadclas.eof and downloadclas.bof then response.Write(" 暂无记录 !") end if while not downloadclas.eof response.Write("<li><a href=""/Download/?" & downloadclas("id") & "-1.html"" title=""" & downloadclas("title") &""">" & downloadclas("title") & "</a></li>") downloadclas.movenext wend downloadclas.close set downloadclas=nothing end function %> <% function TD_products_class()'产品栏目调用参数 set rs1=server.CreateObject("adodb.recordset") rs1.open "select * from [bigClass] order by px_id asc",conn,1,1 if rs1.eof and rs1.bof then response.Write(" 暂无记录 !") end if if not rs1.eof then for i=1 to rs1.recordcount set rs2=server.createobject("adodb.recordset") exec="select * from [smallclass] where BigClassID="&rs1("BigClassID")&" order by px_id asc " rs2.open exec,conn,1,1 response.Write("<li><a href=""/Products/?" & rs1("BigClassID") & "-1.html"" title=""" & rs1("BigClassName") &""" class='in_nav_t'><b>" & rs1("BigClassName") & "</b></a></li>") do while not rs2.eof response.Write("<li ><a href=""/ProductsS/?" & rs2("SmallClassID") & "-1.html"" title=""" & rs2("SmallClassName") &""" class='a_orange'>"&rs2("SmallClassName")&"</a></li>") rs2.movenext loop rs2.close set rs2=nothing rs1.movenext next end if rs1.close set rs1=nothing end function %> <% function TD_about_content(m,n)'单页内容调用 set rsabout=server.createobject("adodb.recordset") exec="select * from about where id="&m&" order by id desc " 'ID=8为单页分类ID rsabout.open exec,conn,1,1 if rsabout.eof and rsabout.bof then response.Write(" 暂无记录 !") end if response.Write(""&i5808(rsabout("body"),n)&"<a href=""/About/?"&m&"-1.html"" >[查看全部]</a>") rsabout.close set rsabout=nothing end function %>