⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 复件 default.asp

📁 一套很早的多用户电子商务程序
💻 ASP
📖 第 1 页 / 共 4 页
字号:
      <!-- 商品清单开始-/////////////////////////////////------------------------------------------------- -->
      <table border="1" cellpadding="0" cellspacing="0" width="100%" bordercolorlight="#0099CC" bordercolordark="#FFFFFF" class=main1 height="55">
        <tr bgcolor="#CCCCCC"> 
          <td width="13%" height="23" align="center">商品编号</td>
          <td width="38%" height="23" align="center">商品名称</td>
          <td width="16%" height="23" align="center">会员价</td>
          <td width="18%" height="23" align="center">市场价</td>
          <td width="15%" height="23" align="center">购买</td>
        </tr>
        <%
dim page
page=request("page")
PageSize = 25 
set rs=server.createobject("adodb.recordset")
sqltext="select * from Product where P_shop='"&shop_name&"'"
rs.open sqltext,conn,1,1
    rs.PageSize=PageSize
	totalfilm=rs.recordcount
    pgnum=rs.Pagecount
    if page="" or clng(page)<1 then page=1
    if clng(page) > pgnum then page=pgnum
    if pgnum>0 then rs.AbsolutePage=page
	
'假如没有商品时 
If rs.eof and rs.bof then  
response.write "<tr bgcolor=#CCCCCC><td height=23 colspan=5 align=center>本商店暂时还没有商品资料</td></tr></table>" 
else
count=0 
do while not (rs.eof or rs.bof) and count<rs.PageSize 
%>
        <tr> 
          <td width="13%" align="center" height="28"><%=rs("Product_Id")%></td>
          <td width="38%" align="center" height="28" ><a href="default.asp?sb=product&Product_id=<%=rs("Product_id")%>"><%=rs("Product_Name")%></a></td>
          <td width="16%" align="center" height="28"><%=rs("P_NewPrice")%></td>
          <td width="18%" align="center" height="28"><span class="main1"><strike><%=rs("P_OldPrice")%>元</strike></span><font color="#cc0000">&nbsp;</font></td>
          <td width="15%" align="center" height="28"><a href="javascript:openbag('../check.asp?cpbm=<%=rs("Product_Id")%>&amp;shopname=<%=rs("p_shop")%>')"><img style="CURSOR: hand" height="22" src="../images/che1.gif" width="56" align="absMiddle" border="0"></a></td>
        </tr>
        <%
rs.movenext
count=count+1
loop
%>
      </table>
      <div align="center"><br>
        [<b><%=rs.pagecount%></b>/<%=page%>页] [共<%=totalfilm%>个] 
        <%if page=1 then%>
        [首 页] [上一页] 
        <% else %>
        [<a href="default.asp?sb=bill&page=1">首 页</a>] [<a href="default.asp?sb=bill&page=<%=page-1%>">上一页</a>] 
        <%end if%>
        <%if rs.pagecount-page<1 then%>
        [下一页] [尾 页] 
        <%else%>
        [<a href="default.asp?sb=bill&page=<%=page+1%>">下一页</a>] [<a href="default.asp?sb=bill&page=<%=rs.pagecount%>">尾 
        页</a>] 
        <%end if%>
        <%
		end if
		rs.close:set rs=nothing
		%>
        <!-- 最新商品结束-------------------------------------------------- -->
      </div></td>
  </tr>
  <tr> 
    <td valign="top">&nbsp;</td>
  </tr>
</table>
<%end sub%>
<%sub news%>
<!--新闻公告开始=========================================== -->
<table width="98%" border="0" cellspacing="0" cellpadding="0">
  <tr> 
    <td>首页:新闻公告</td>
  </tr>
  <tr> 
    <td height="10" > </td>
  </tr>
  <tr> 
    <td valign="top"> 
      <table width="90%" border="0" align="center" cellpadding="0" cellspacing="3">
        <%

set rs=server.createobject("adodb.recordset")
sqltext="select * from news where shop_name='"&shop_name&"'"
rs.open sqltext,conn,1,1
'假如没有新闻时 
If rs.eof and rs.bof then  
response.write "没有新闻内容" 
else
do while not (rs.eof or rs.bof)
%>
        <tr> 
          <td width="55%">&gt;&gt;&gt; <a href="default.asp?sb=news_show&id=<%=rs("id")%>"><%=rs("n_top")%></a></td>
          <td width="45%"><%=rs("n_time")%></td>
        </tr>
        <%
rs.movenext
loop
rs.close:set rs=nothing
%>
      </table>
        
      <%end if%></div>
    </td>
  </tr>
  <tr> 
    <td valign="top">&nbsp;</td>
  </tr>
</table>
<%end sub%>
<%sub mode%>
<!--配送方式======================================= -->
<table width="98%" border="0" cellspacing="0" cellpadding="0">
  <tr> 
    <td>首页:配送方式</td>
  </tr>
  <tr> 
    <td>&nbsp;</td>
  </tr>
  <tr> 
    <td> 
      <% 
set rs=server.createobject("adodb.recordset")
sqltext="select p_other from shop where shop_name1='"&shop_name&"'  "
rs.open sqltext,conn,1,1 
if not rs.eof then
response.write rs("p_other")
else
response.write "没有数据"
end if
rs.close:set rs=nothing
%>
    </td>
  </tr>
  <tr> 
    <td>&nbsp;</td>
  </tr>
</table>
<% end sub%>
<%sub help%>
<!--购物帮助======================================= -->
<table width="98%" border="0" cellspacing="0" cellpadding="0">
  <tr> 
    <td>首页:购物帮助</td>
  </tr>
  <tr> 
    <td>&nbsp;</td>
  </tr>
  <tr> 
    <td> 
      <% 
	  set rs=server.createobject("adodb.recordset")
sqltext="select Enterprises from shop where shop_name1='"&shop_name&"'  "
rs.open sqltext,conn,1,1
if not rs.eof then
response.write rs("Enterprises")
else
response.write "没有数据"
end if
rs.close:set rs=nothing
%>
    </td>
  </tr>
  <tr> 
    <td>&nbsp;</td>
  </tr>
</table>
<%end sub%>
<%sub word%>
<!--客户留言======================================= -->
<table width="98%" border="0" cellspacing="0" cellpadding="0">
  <tr> 
    <td>首页:客户留言  <a href="default.asp?sb=book"><strong><font color="#0000FF">我要留言</font></strong></a><font color="#0000FF"><strong>-&gt;</strong></font></td>
  </tr>
  <tr> 
    <td> 
<% 

dim page
page=request("page")
PageSize = 6 
set rs=server.createobject("adodb.recordset")
'sqltext="select P_about from shop where shop_name1='"&shop_name&"'  "
sqltext="select * from book where shop_name='"&shop_name&"' order by id desc"
rs.open sqltext,conn,1,1
    rs.PageSize=PageSize
	totalfilm=rs.recordcount
    pgnum=rs.Pagecount
    if page="" or clng(page)<1 then page=1
    if clng(page) > pgnum then page=pgnum
    if pgnum>0 then rs.AbsolutePage=page
if rs.eof then
response.write "<p align=center>没有留言内容 </p>"
else
count=0 
do while not (rs.eof or rs.bof) and count<rs.PageSize 
%>
      <BR> <table width="559" border="1" align="center" cellpadding="3" cellspacing="0" bordercolorlight="#3366cc" bordercolordark="#FFFFFF" bgcolor="#ECECFF">
        <tr> 
          <td width="53"> <div align="center">标 题</div></td>
          <td colspan="5"><div align="center"><strong><%=rs("bk_top")%></strong></div></td>
        </tr>
        <tr> 
          <td height="40" valign="top"> <div align="center">内 容</div></td>
          <td colspan="5" valign="top"><%=replace(replace(rs("bk_content")," ","&nbsp;&nbsp;"),chr(13)+chr(10),"<br>")%></td>
        </tr>
        <%if rs("bk_anser")<>"" then%>
        <tr> 
          <td valign="top"> <div align="center"><font color="#0000FF">回 复</font></div></td>
          <td colspan="5" valign="top"><font color="#0000FF"><%=replace(replace(rs("bk_anser")," ","&nbsp;&nbsp;"),chr(13)+chr(10),"<br>")%></font></td>
        </tr>
        <%end if%>
        <tr> 
          <td><div align="center">姓 名</div></td>
          <td width="97"><%=rs("bk_Name")%></td>
          <td width="53"> <div align="center">时 间</div></td>
          <td width="109"><%=rs("bk_time")%></td>
          <td width="37"> <div align="center">IP</div></td>
          <td width="160"><%=rs("bk_IP")%></td>
        </tr>
      </table>
      <%
rs.movenext
count=count+1
loop
%>
      <div align="center"><br>
        [<b><%=rs.pagecount%></b>/<%=page%>页] [共<%=totalfilm%>个] 
        <%if page=1 then%>
        [首 页] [上一页] 
        <% else %>
        [<a href="default.asp?sb=word&page=1">首 页</a>] [<a href="default.asp?sb=word&page=<%=page-1%>">上一页</a>] 
        <%end if%>
        <%if rs.pagecount-page<1 then%>
        [下一页] [尾 页] 
        <%else%>
        [<a href="default.asp?sb=word&page=<%=page+1%>">下一页</a>] [<a href="default.asp?sb=word&page=<%=rs.pagecount%>">尾 
        页</a>] 
        <%end if%>
        <%
		end if
		rs.close:set rs=nothing
		%>
      </div></td>
  </tr>
  <tr> 
    <td>&nbsp;</td>
  </tr>
</table>
<%end sub%>

<%sub news_show%>
<table width="98%" border="0" cellspacing="0" cellpadding="0">
  <tr> 
    <td>首页:新闻内容</td>
  </tr>
  <%
id=request("id")
set rs=server.createobject("adodb.recordset")
sqltext="select * from news where shop_name='"&shop_name&"'and id="&id
rs.open sqltext,conn,1,1
if rs.eof then
response.write "<tr><td>没有新闻内容</td></tr>"
else
%>
  <tr> 
    <td height="50"> <div align="center"><strong><%=rs("n_top")%></strong><br>
        <font color="#999999">时间:[<%=rs("n_time")%>]</font></div></td>
  </tr>
  <tr> 
    <td><%=rs("content")%></td>
  </tr>
  <%
  end if
  rs.close:set rs=nothing
  %>
  <tr> 
    <td>&nbsp;</td>
  </tr>
</table>
<%end sub%>
<%sub product%>
<table width="98%" border="0" cellspacing="0" cellpadding="0">
  <tr> 
    <td>首页:商品详细</td>
  </tr>
  <tr> 
    <td>&nbsp;</td>
  </tr>
  <tr> 
    <td> 
      <%
Product_id=Request("Product_id")
strSQL="update Product set Look_Count=Look_Count+1 where Product_id='"& Product_id&"'"
conn.Execute strSQL

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -