index.asp
来自「生成html的ASP企业站点,可以进行二次开发的」· ASP 代码 · 共 412 行
ASP
412 行
<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="../Include/Const.asp" -->
<!--#include file="../Include/NoHackSql.Asp" -->
<!--#include file="../Include/ConnSiteData.asp" -->
<%
Call SiteInfo
If ISHTML = 1 Then
Response.expires = 0
Response.expiresabsolute = Now() - 1
Response.addHeader "pragma", "no-cache"
Response.addHeader "cache-control", "private"
Response.CacheControl = "no-cache"
End If
headid=0
Seotitle="网站首页"
%>
<!--#include file="Headi.asp"-->
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_jumpMenu(targ,selObj,restore){ //v3.0
//本窗口打开
//eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+" ' ");
//alert(selObj.options[selObj.selectedIndex].value)
//新窗口打开
window.open(selObj.options[selObj.selectedIndex].value);
if (restore) selObj.selectedIndex=0
}
//-->
</script>
<DIV class=mian>
<DIV class=mianright>
<DL>
<DT>
<UL>
<LI id=down1 class=thits_down
onclick="javascript:doClick_down(this,'down','d_con','shits_down','thits_down')">新品上市
<LI id=down2 class=shits_down
onclick="javascript:doClick_down(this,'down','d_con','shits_down','thits_down')">强烈推荐
<LI id=down3 class=shits_down
onclick="javascript:doClick_down(this,'down','d_con','shits_down','thits_down')">热卖产品
<LI id=down4 class=shits_down
onclick="javascript:doClick_down(this,'down','d_con','shits_down','thits_down')">新品推广
</LI></UL>
<DIV class=clearbox></DIV>
<DD>
<DIV id=d_con1 class=prodlist>
<UL>
<%=Products("0,",1,6,1)%></LI></UL></DIV>
<DIV style="DISPLAY: none" id=d_con2 class=prodlist>
<%=Products("0,",1,6,2)%></LI></DIV>
<DIV style="DISPLAY: none" id=d_con3 class=prodlist>
<%=Products("0,",1,6,4)%></LI></DIV>
<DIV style="DISPLAY: none" id=d_con4 class=prodlist>
<%=Products("0,",1,6,3)%></LI></DIV>
<DIV class=clearbox></DIV></DD></DL></DIV>
<DIV class=mianleft>
<DL>
<DT><A title=# href="#">快速链接</A>
<DD>
<DIV class=box1>
<UL>
<LI><A title=# href="MessageList.asp">留言薄</A>
<LI><A title=# href="ProductBuy.asp">购物车</A>
<LI><A title=# href="MemberCenter.asp">会员中心</A> </LI></UL></DIV>
<DIV class=box2>
<DL>
<DT><A title=# href="Productlist.asp">产品速查</A>
<DD><A title=# href="Productlist.asp">---点击进入产品分类列表---</A>
</DD></DL></DIV>
<DIV class=box3>
<DL>
<FORM id=form name=form><select name="sheng" style="width:142px" onChange="MM_jumpMenu('parent',this,1)">
<option selected="selected">友情链接</option>
<%
set rs = server.createobject("adodb.recordset")
sql="select * from LiangJingCMS_FriendLink where ViewFlag"&Language&" order by ID desc"
rs.open sql,conn,1,1
if rs.eof then
response.write "暂无相关信息"
else
do while not rs.eof%>
<option value="<%=rs("LinkUrl")%>"><%=rs("LinkFace"&Language)%></option>
<%rs.movenext
loop
end if
rs.close%>
</select>
</FORM></DL></DIV></DD></DL></DIV></DIV><!--页尾-->
<!--#include file="Foot.Asp"--><!-- end buttom#-->
<%
'调用显示节点------------------------------
Function CallFolderView()
%>
<% Folder(0) %>
<%
End Function
'列出所有节点------------------------------
Function Folder(id)
Dim rs,sql,i,ChildCount,FolderType,FolderName,onMouseUp,ListType,ViewFlag
Set rs=server.CreateObject("adodb.recordset")
sql="Select * From LiangJingCMS_ProductSort where ViewFlag"&Language&" and ParentID="&id&" order by id"
rs.open sql,conn,1,1
if id=0 and rs.recordcount=0 then
response.write ("No Information!")
response.end
end if
i=1
response.write("<table border='0' cellspacing='0' cellpadding='0' style='margin-left:16px;line-height:25px'>")
while not rs.eof
ChildCount=conn.execute("select count(*) from LiangJingCMS_ProductSort where ParentID="&rs("id"))(0)
if ChildCount=0 then
if i=rs.recordcount then
FolderType="SortFileEnd"
else
FolderType="SortFile"
end if
FolderName=rs("SortNameCh")&" "&ViewFlag
onMouseUp=""
else
if i=rs.recordcount then
FolderType="SortEndFolderOpen"
ListType="SortEndListline"
onMouseUp="EndSortChange('a"&rs("id")&"','b"&rs("id")&"');"
else
FolderType="SortFolderOpen"
ListType="SortListline"
onMouseUp="SortChange('a"&rs("id")&"','b"&rs("id")&"');"
end if
FolderName=rs("SortNameCh")&" "&ViewFlag
end if
response.write("<tr>")
response.write("<td nowrap id='b"&rs("id")&"' class='"&FolderType&"' onMouseUp="&onMouseUp&"></td><td nowrap><a href=""ProductList.asp?SortID="&rs("ID")&""">"&FolderName&"</a> ")
response.write("</td></tr>")
if ChildCount>0 then
%>
<tr id="a<%= rs("id")%>" style="display:none"><td class="<%= ListType%>" nowrap></td><td ><% Folder(rs("id")) %></td></tr>
<%
end if
rs.movenext
i=i+1
wend
response.write("</table>")
rs.close
set rs=nothing
end function
function ViewSiteInfo()
dim rs,sql
set rs = server.createobject("adodb.recordset")
sql="select top 1 * from LiangJingCMS_Site"
rs.open sql,conn,1,1
if rs.bof and rs.eof then
response.write ("<br><br><div align=""center""><font style=""color:red; font-size:9pt; "")>数据库记录读取错误!</font></div>")
response.end
else
ssp=rs("ssp")
rs.close
set rs=nothing
end if
End Function
function videos(SortPath)
dim rs,sql
set rs = server.createobject("adodb.recordset")
sql="select top 9 * from LiangJingCMS_Others where ViewFlag"&Language&" and Instr(SortPath,'"&SortPath&"')>0 order by id desc"
rs.open sql,conn,1,1
if rs.eof then
Response.Write " <tr>"&VbCrLf
Response.Write " <td align=""center"" height=""28"">暂无相关信息</td>"&VbCrLf
Response.Write " </tr>"&VbCrLf
else
do while not rs.eof
If ISHTML = 1 Then
AutoLink = ""&OtherName&""&Separated&""&rs("ID")&"."&HTMLName&""
Else
AutoLink = "OtherView.asp?ID="&rs("ID")&""
End If
Response.Write " <Li><img src=""images/arr4.gif"" width=""9"" height=""9"" align=""absmiddle"" /> <a href="""&AutoLink&""">"&StrLeft(rs("OthersName"&Language),42)&"</a></li>"&VbCrLf
rs.movenext
loop
end if
rs.close
set rs=nothing
end Function
function News(SortPath)
dim rs,sql,NewsName,NewFlag
set rs = server.createobject("adodb.recordset")
sql="select top 8 * from LiangJingCMS_News where ViewFlag"&Language&" and Instr(SortPath,'"&SortPath&"')>0 order by id desc"
rs.open sql,conn,1,1
if rs.eof then
Response.Write " <tr>"&VbCrLf
Response.Write " <td align=""center"" height=""28"">暂无相关信息</td>"&VbCrLf
Response.Write " </tr>"&VbCrLf
else
do while not rs.eof
if now()-rs("AddTime")<=2 then
NewsName=StrLeft(rs("NewsName"&Language),42)
NewFlag=" <img src=""Images/new.gif"" align=""absmiddle"">"
else
NewsName=StrLeft(rs("NewsName"&Language),46)
NewFlag=""
end If
If ISHTML = 1 Then
AutoLink = ""&NewName&""&Separated&""&rs("ID")&"."&HTMLName&""
Else
AutoLink = "NewsView.asp?ID="&rs("id")&""
End If
Response.Write " <tr>"&VbCrLf
Response.Write " <td height=""25""><table width=""486"" border=""0"" cellspacing=""0"" cellpadding=""0"">"&VbCrLf
Response.Write " <tr>"&VbCrLf
Response.Write " <td width=""388"" style=""background:url(images/bg5.gif) repeat-x left bottom;""><img src=""images/arr2.gif"" width=""3"" height=""5"" align=""absmiddle"" /> <a href="""&AutoLink&""">"&NewsName&"</a>"&NewFlag&"</td>"&VbCrLf
Response.Write " <td width=""98"" align=""right"" style=""font-size:11px; color:#999999; background:url(images/bg5.gif) repeat-x left bottom;""><img src=""images/clock.gif"" width=""7"" height=""7"" align=""absmiddle"" /> "&FormatDate(rs("Addtime"),14)&"</td>"&VbCrLf
Response.Write " </tr>"&VbCrLf
Response.Write " </table></td>"&VbCrLf
Response.Write " </tr>"&VbCrLf
rs.movenext
loop
end if
rs.close
set rs=nothing
end Function
Function Products(SortPath,trs,tds,ttpe)
dim rs,sql,tr,td,ProductName,SmallPicPath
set rs = server.createobject("adodb.recordset")
if ttpe=1 then
sql="select top "&trs*tds&" * from LiangJingCMS_Products where ViewFlag"&Language&" and CommendFlag and NewFlag order by id desc"
end if
if ttpe=2 then
sql="select top "&trs*tds&" * from LiangJingCMS_Products where ViewFlag"&Language&" and CommendFlag and Instr(SortPath,'"&SortPath&"')>0 order by id desc"
end if
if ttpe=3 then
sql="select top "&trs*tds&" * from LiangJingCMS_Products where ViewFlag"&Language&" order by id desc"
end if
if ttpe=4 then
sql="select top "&trs*tds&" * from LiangJingCMS_Products where ViewFlag"&Language&" order by ClickNumber desc"
end if
rs.open sql,conn,1,1
if rs.eof then
response.write "暂无相关信息"
else
for tr=1 to trs
Response.Write " <tr>"&VbCrLf
for td=1 to tds
if StrLen(rs("ProductName"&Language))<=18 then
ProductName=rs("ProductName"&Language)
else
ProductName=StrLeft(rs("ProductName"&Language),16)
end If
If ISHTML = 1 Then
AutoLink = ""&ProName&""&Separated&""&rs("ID")&"."&HTMLName&""
Else
AutoLink = "ProductView.asp?ID="&rs("id")&""
End If
SmallPicPath=HtmlSmallPic(rs("GroupID"),rs("SmallPic"),rs("Exclusive"))
Response.Write "<LI>"
Response.Write " <DIV class=p_list_pic><a href="""&AutoLink&"""><img src="""&SmallPicPath&""" alt="""&rs("ProductName"&Language)&""" width=""115"" height=""110"" border=""0"" /></A></DIV>"
Response.Write "<DIV class=p_list_name><a href="""&AutoLink&""" title="""&rs("ProductName"&Language)&""">"&ProductName&"</a></DIV>"
Response.Write " <DIV class=clearbox></DIV>"
rs.movenext
if rs.eof then exit for
next
if rs.eof then exit for
next
end if
rs.close
set rs=nothing
End Function
function WebMenu(ParentID,i,level)
dim rs,sql
set rs = server.createobject("adodb.recordset")
sql="select * from LiangJingCMS_NewsSort where ViewFlag"&Language&" and ParentID="&ParentID&" order by ID asc"
rs.open sql,conn,1,1
if conn.execute("select ID from LiangJingCMS_NewsSort Where ViewFlag"&Language&" and ParentID=0").eof then
response.write "暂无相关信息"
end if
do while not rs.eof
If ISHTML = 1 Then
AutoLink = ""&NewSortName&""&Separated&""&rs("ID")&""&Separated&"1."&HTMLName&""
Else
AutoLink = "NewsList.asp?SortID="&rs("ID")&""
End If
if ParentID=0 then
response.write "<Li><a href="""&AutoLink&""" target=""_blank"" style=""margin-left:5px;"">"&rs("SortName"&Language)&"</a>"
else
response.write string(i," ")&"<Li><a href="""&AutoLink&""" target=""_blank"" style=""margin-left:5px;"">"&rs("SortName"&Language)&"</a>"
end if
i=i+1
if i<level then call WebMenu(rs("ID"),i,level)
i=i-1
rs.movenext
loop
rs.close
set rs=nothing
end function
function WebMenup(ParentID,i,level)
dim rs,sql
set rs = server.createobject("adodb.recordset")
sql="select * from LiangJingCMS_ProductSort where ViewFlag"&Language&" and ParentID="&ParentID&" order by ID asc"
rs.open sql,conn,1,1
if conn.execute("select ID from LiangJingCMS_ProductSort Where ViewFlag"&Language&" and ParentID=0").eof then
response.write "暂无相关信息"
end if
do while not rs.eof
If ISHTML = 1 Then
AutoLink = ""&ProSortName&""&Separated&""&rs("ID")&""&Separated&"1."&HTMLName&""
Else
AutoLink = "ProductList.asp?SortID="&rs("ID")&""
End If
if ParentID=0 then
response.write "<Li> <img src=""images/Tx_Ar3.gif"" style=""margin-left:5px;"" /> <a href="""&AutoLink&""" target=""_blank"" style=""margin-left:5px;"">"&rs("SortName"&Language)&"</a></li>"
else
response.write string(i," ")&"<Li> <img src=""images/Tx_Ar3.gif"" style=""margin-left:5px;"" /> <a href="""&AutoLink&""" target=""_blank"" style=""margin-left:5px;"">"&rs("SortName"&Language)&"</a></li>"
end if
i=i+1
if i<level then call WebMenup(rs("ID"),i,level)
i=i-1
rs.movenext
loop
rs.close
set rs=nothing
end function
function WebMenuL(i)
dim rs,sql
set rs = server.createobject("adodb.recordset")
sql="select top "&i&" * from LiangJingCMS_FriendLink where ViewFlag"&Language&" order by ID asc"
rs.open sql,conn,1,1
do while not rs.eof
response.write "<Li> <img src=""images/Tx_Ar3.gif"" style=""margin-left:5px;"" /> <a href="""&rs("linkurl")&""" target=""_blank"" style=""margin-left:5px;"">"&rs("LinkName"&Language)&"</a></li>"
rs.movenext
loop
rs.close
set rs=nothing
end function
function WebMenua()
dim rs,sql
set rs = server.createobject("adodb.recordset")
sql="select * from LiangJingCMS_About where ViewFlag"&Language&" and not ChildFlag order by Sequence asc"
rs.open sql,conn,1,1
if rs.eof then
response.write "暂无相关信息"
else
do
If ISHTML = 1 Then
AutoLink = ""&AboutNameDiy&""&Separated&""&rs("ID")&"."&HTMLName&""
Else
AutoLink = "About.asp?ID="&rs("ID")&""
End If
response.write "<Li><a href="""&AutoLink&""" target=""_blank"" style=""margin-left:5px;"">"&rs("AboutName"&Language)&"</a></li>"
rs.movenext
loop until rs.eof
end if
rs.close
set rs=nothing
end function
function qqa()
Dim connQQstr,connQQ,rssetupQQ,qqonline,adm_qq,adm_qq_name,whereqq,kefuskin,qqskin,qqmsg_on,qqmsg_off,QQ_NAME,QQ,MyQQ,N,sitename
connQQstr = "Provider=MICROSOFT.JET.OLEDB.4.0;DATA SOURCE="&SERVER.MAPPATH("../QQ/QQ.mdb")
Set connQQ=server.CreateObject("adodb.connection")
connQQ.Open connQQstr
Set rssetupQQ=connQQ.execute("select * from QQsetup")
qqonline=rssetupQQ("qqonline")
adm_qq= rssetupQQ("adm_qq")
adm_qq_name= rssetupQQ("adm_qq_name")
whereqq=rssetupQQ("whereqq")
kefuskin=rssetupQQ("kefuskin")
qqskin=rssetupQQ("qqskin")
qqmsg_on=rssetupQQ("qqmsg_on")
qqmsg_off=rssetupQQ("qqmsg_off")
msn= rssetupQQ("msn")
msn_name= rssetupQQ("msn_name")
set rssetupQQ=Nothing
QQ_NAME=split(adm_qq_name,",")
QQ=split(adm_qq,",")
for N=0 to UBound(QQ)
Response.write "<li><a target=blank href=tencent://message/?uin="&QQ(n)&"&Site=QQ:"& QQ(n)&"&Menu=yes><img border=""0"" SRC=""Image/QQon4.gif"" alt="&QQ(n) &">QQ:"& QQ_NAME(n)&"</a></li>"
next
Response.write "<li><a target=blank href=""msnim:chat?contact="&msn&"&Site="&msn&"""><img border=""0"" SRC=""Image/msn.gif"" alt="&msn&" >"&msn&"</a></li>"
if adm_qq<>"" and qqonline=1 then
adm_qq=replace(adm_qq,",",",")
if isnull(adm_qq_name) or adm_qq_name="" then adm_qq_name=adm_qq
adm_qq_name=replace(adm_qq_name,",",",")
QQ_NAME=split(adm_qq_name,",")
QQ=split(adm_qq,",")
for N=0 to UBound(QQ)
next
End if
end function
%>
<!--#include file="FocusLoad.asp" -->
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?