📄 index.asp
字号:
<!--#include file="conn.asp"-->
<!--#include file="webconfig.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>唐网多用户商城系统-网上购物 网上开店 免费开店 商品拍卖 用户团购 二手市场 购物论坛</title>
<link href="images/css.css" rel="stylesheet" type="text/css">
<meta name="keywords" content="手机,鲜花,网上订购,购物,游戏卡销售,电话卡,电脑,笔记本,软件,代码,原码,Q币,QQ号码">
<style type="text/css">
<!--
.style3 {
color: #FF0000;
font-size: 10pt;
font-weight: bold;
}
-->
</style>
</head>
<body topmargin="0">
<div align="center">
<%dim da,daurl,xiao1,xiao2,xiao3,xiao4,xiao5,xiao6,xiao7,xiao8,xiao9,xiao1url,xiao2url,xiao3url,xiao4url,xiao5url,xiao6url,xiao7url,xiao8url,xiao9url,piao1,piao2,piao3,piao1url,piao2url,piao3url
set rs=server.CreateObject("adodb.recordset")
rs.open "select * from shop_gg",conn,1,1
da=trim(rs("458"))
daurl=trim(rs("458url"))
xiao1=trim(rs("2541"))
xiao1url=trim(rs("2541url"))
xiao2=trim(rs("2542"))
xiao2url=trim(rs("2542url"))
xiao3=trim(rs("2543"))
xiao3url=trim(rs("2543url"))
xiao4=trim(rs("1441"))
xiao4url=trim(rs("1441url"))
xiao5=trim(rs("1442"))
xiao5url=trim(rs("1442url"))
xiao6=trim(rs("1443"))
xiao6url=trim(rs("1443url"))
xiao7=trim(rs("1601"))
xiao7url=trim(rs("1601url"))
xiao8=trim(rs("1602"))
xiao8url=trim(rs("1602url"))
xiao9=trim(rs("16030"))
xiao9url=trim(rs("16030url"))
piao1=trim(rs("1603"))
piao1url=trim(rs("1603url"))
piao2=trim(rs("1604"))
piao2url=trim(rs("1604url"))
piao3=trim(rs("1605"))
piao3url=trim(rs("1605url"))
rs.close
set rs=nothing
%>
<!--#include file="webtop1.asp" -->
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" class="table-zuoyou">
<tr>
<td colSpan="2"><table width=100% align=center class=table-shang border=0 cellpadding=0 cellspacing=0 bgcolor=#f1f1f1>
<TR>
<TD height=1 colSpan=3 bgColor=#ffffff></TD>
<tr>
<td width=37% height=30 align=center>商品专题</td>
<td width=29% align=center><a href="pay.asp" class="style3">商城在线支付平台</a></td>
<td width=34% align=center>商城新闻</td>
</tr>
<tr>
<TD height=1 colSpan=3 bgColor=#cccccc></TD>
</tr>
<tr>
<TD height=3 colSpan=3 bgColor=#f1f1f1></TD>
</TR>
</table></td>
</tr>
<tr>
<td width="50%" valign="top" class="table-you" bordercolor="#FFFFFF" bgcolor="#FFFFFF"><%set rs=server.createobject("adodb.recordset")
rs.open "select * from zhuanti order by newsid desc",conn,1,1
if rs.recordcount=0 then
%>
<table width="100%" border="0" cellspacing="0" cellpadding="5" align="center">
<tr>
<td align=center>暂无专题</td>
</tr>
</table>
<%
else
rs.PageSize =10 '每页记录条数
iCount=rs.RecordCount '记录总数
iPageSize=rs.PageSize
maxpage=rs.PageCount
page=request("page")
if Not IsNumeric(page) or page="" then
page=1
else
page=cint(page)
end if
if page<1 then
page=1
elseif page>maxpage then
page=maxpage
end if
rs.AbsolutePage=Page
if page=maxpage then
x=iCount-(maxpage-1)*iPageSize
else
x=iPageSize
end if
%>
<table width="100%" border="0" cellspacing="0" cellpadding="5" align="center">
<%
For i=1 To x
%>
<tr>
<td align=center height=24 width="10%" class="table-xia"><img src="images/ring01.gif"></td>
<td height=24 width="80%" class="table-xia"><a href=listzt.asp?id=<%=rs("newsid")%> target=_blank> <%=replace(trim(rs("title")),"<br>","")%></a></td>
<td align=center height=24 width="20%" class="table-xia"><%=year(rs("updatetime"))&"."&month(rs("updatetime"))&"."&day(rs("updatetime"))%></td>
</tr>
<%
rs.movenext
next
%>
</table>
<%
call PageControl(iCount,maxpage,page,"border=0 align=center","<p align=center>")
end if
rs.close
set rs=nothing
Sub PageControl(iCount,pagecount,page,table_style,font_style)
'生成上一页下一页链接
Dim query, a, x, temp
action = "http://" & Request.ServerVariables("HTTP_HOST") & Request.ServerVariables("SCRIPT_NAME")
query = Split(Request.ServerVariables("QUERY_STRING"), "&")
For Each x In query
a = Split(x, "=")
If StrComp(a(0), "page", vbTextCompare) <> 0 Then
temp = temp & a(0) & "=" & a(1) & "&"
End If
Next
Response.Write("<table width=100% border=0 cellpadding=0 cellspacing=0 bgcolor=#f1f1f1>" & vbCrLf )
Response.Write("<form method=get onsubmit=""document.location = '" & action & "?" & temp & "Page='+ this.page.value;return false;""><TR>" & vbCrLf )
Response.Write("<TD align=center height=35>" & vbCrLf )
Response.Write(font_style & vbCrLf )
if page<=1 then
Response.Write ("首页 " & vbCrLf)
Response.Write ("上页 " & vbCrLf)
else
Response.Write("<A HREF=" & action & "?" & temp & "Page=1>首页</A> " & vbCrLf)
Response.Write("<A HREF=" & action & "?" & temp & "Page=" & (Page-1) & ">上页</A> " & vbCrLf)
end if
if page>=pagecount then
Response.Write ("下页 " & vbCrLf)
Response.Write ("尾页 " & vbCrLf)
else
Response.Write("<A HREF=" & action & "?" & temp & "Page=" & (Page+1) & ">下页</A> " & vbCrLf)
Response.Write("<A HREF=" & action & "?" & temp & "Page=" & pagecount & ">尾页</A> " & vbCrLf)
end if
Response.Write(" 页次:" & page & "/" & pageCount & "页" & vbCrLf)
Response.Write(" 共有" & iCount & "条专题" & vbCrLf)
Response.Write(" 转到" & "<INPUT TYEP=TEXT CLASS=wenbenkuang NAME=page SIZE=2 Maxlength=5 VALUE=" & page & ">" & "页" & vbCrLf & "<INPUT CLASS=go-wenbenkuang type=submit value=GO>")
Response.Write("</TD>" & vbCrLf )
Response.Write("</TR></form>" & vbCrLf )
Response.Write("</table>" & vbCrLf )
End Sub
%>
</td>
<td width="50%" valign="top" bordercolor="#FFFFFF" bgcolor="#FFFFFF"><%set rs=server.createobject("adodb.recordset")
rs.open "select * from shop_News order by adddate desc",conn,1,1
if rs.recordcount=0 then
%>
<table width="100%" border="0" cellspacing="0" cellpadding="5" align="center">
<tr>
<td align=center>暂无新闻</td>
</tr>
</table>
<%
else
rs.PageSize =10 '每页记录条数
iCount=rs.RecordCount '记录总数
iPageSize=rs.PageSize
maxpage=rs.PageCount
page=request("page")
if Not IsNumeric(page) or page="" then
page=1
else
page=cint(page)
end if
if page<1 then
page=1
elseif page>maxpage then
page=maxpage
end if
rs.AbsolutePage=Page
if page=maxpage then
x=iCount-(maxpage-1)*iPageSize
else
x=iPageSize
end if
%>
<table width="100%" border="0" cellspacing="0" cellpadding="5" align="center">
<%
For i=1 To x
%>
<tr>
<td align=center height=24 width="10%" class="table-xia"><img src="images/ring01.gif"></td>
<td height=24 width="80%" class="table-xia"><a href="javascript:;" onClick="javascript:window.open('news.asp?id=<%=rs("newsid")%>','','width=800,height=600,toolbar=no, status=no, menubar=no, resizable=yes, scrollbars=yes');return false;"><%=replace(trim(rs("newsname")),"<br>","")%></a> (<font color=red><%=rs("viewcount")%></font>)</td>
<td align=center height=24 width="20%" class="table-xia"><%=year(rs("adddate"))&"."&month(rs("adddate"))&"."&day(rs("adddate"))%></td>
</tr>
<%
rs.movenext
next
%>
</table>
<%
call PageControl(iCount,maxpage,page,"border=0 align=center","<p align=center>")
end if
rs.close
set rs=nothing
Sub PageControl(iCount,pagecount,page,table_style,font_style)
'生成上一页下一页链接
Dim query, a, x, temp
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -