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

📄 index.asp

📁 请认真阅读您的文件包然后写出其具体功能(至少要20个字)。尽量不要让站长把时间都花费在为您修正说明上。压缩包解压时不能有密码。
💻 ASP
📖 第 1 页 / 共 4 页
字号:
 <div style="float:left;width:702px;">
 <!--right-->
 <div class="tab" style="width:700px;">
  <%
  dim rs,sql,channel,channelID,page,npage,ipage
  channel="供求"
  channelID=clng(request("channelID"))
  sql="select businessID,title,addtime,preview,price,unit from as_business where username='"&username&"'"
  if channelID>0 then
  	sql=sql+anysale.IDList("channel",channelID)
	search=search+"&amp;channelID="&channelID
	channel=anysale.getValue("as_channel","channelName","channelID="&channelID)
  end if
  if request("keywords")<>"" then
	sql=sql+" and title like '%"&anysale.checkStr(trim(request("keywords")))&"%'"
	search=search+"&amp;keywords="&request("keywords")
  end if
  sql=sql+" and islock=0 order by businessID desc"
  
  page = clng(request("page"))
  if page="" or page<1 then page=1 end if
  %>
  <div class="tabList">
   <div>
    <ul class="linkN" onMouseOver="this.className='linkH'" onMouseOut="this.className='linkN'"><li class="linkL">&nbsp;</li><li class="linkM"><a href="companydetail.asp?u=<%=username%>&amp;action=business&amp;keyword=<%=trim(request("keywords"))%>&amp;channelID=3">服务</a></li><li class="linkR">&nbsp;</li></ul>
    <ul class="linkN" onMouseOver="this.className='linkH'" onMouseOut="this.className='linkN'"><li class="linkL">&nbsp;</li><li class="linkM"><a href="companydetail.asp?u=<%=username%>&amp;action=business&amp;keyword=<%=trim(request("keywords"))%>&amp;channelID=2">求购</a></li><li class="linkR">&nbsp;</li></ul>
	<ul class="linkN" onMouseOver="this.className='linkH'" onMouseOut="this.className='linkN'"><li class="linkL">&nbsp;</li><li class="linkM"><a href="companydetail.asp?u=<%=username%>&amp;action=business&amp;keyword=<%=trim(request("keywords"))%>&amp;channelID=1">供应</a></li><li class="linkR">&nbsp;</li></ul>
   </div>
   <div><ul class="tabH"><li class="tabL">&nbsp;</li><li class="tabM"><%=channel%>信息</li><li class="tabR">&nbsp;</li></ul></div>
  </div>  
  <%
  '	response.write sql
  n=0
  set rs= Server.CreateObject("ADODB.Recordset")
  rs.open sql,conn,1

  if not rs.eof then
  	response.write "<div class=""imglist"">"
	rs.pageSize = 15
	if page>rs.pageCount then page=rs.pageCount end if
	rs.absolutePage = page
	npage=rs.pageCount
	for ipage = 1 to rs.pageSize
  %>
   <ul>
    <li><a href="companydetail.asp?u=<%=username%>&amp;action=businessdetail&amp;id=<%=rs("businessID")%>"><%if rs("preview")="" then%><img src="images/noimage.gif" style="padding:25px;" class="border whitebg" alt="<%=rs("title")%>" /><%else%><img src="<%=rs("preview")%>" alt="<%=rs("title")%>" width="100" height="100" class="border" /><%end if%></a></li>
    <li><a href="companydetail.asp?u=<%=username%>&amp;action=businessdetail&amp;id=<%=rs("businessID")%>"><%=rs("title")%></a></li>
	<%if rs("price")>0 then%><li><span class="red"><%=rs("price")%></span> 元</li><%end if%>
    <li>
	 <input type="button" name="askPrice" class="button" value="点击询价" onclick="getPage('windows.asp?action=askPrice&amp;username=<%=username%>&amp;title=<%=server.urlEncode(rs("title"))%>&amp;unit=<%=server.urlEncode(rs("unit"))%>');" onmouseover="this.className='buttonH'" onmouseout="this.className='button'" />
	</li>
   </ul>
  <%
		n=n+1
		if n mod 5=0 then response.write"<div class=""line5 clear"">&nbsp;</div>" end if
		rs.moveNext
		if rs.eof then exit for end if
	next
	response.write "</div>"
  %>
  <div class="clear">
   <ul>
	<li>&nbsp;</li>
	<li><span class="right f14" style="padding:0 20px 0 0;">共有<%=rs.recordcount%>条供求&nbsp;<%=anysale.pagelink(page,npage,"companydetail.asp?","&amp;action=business&amp;"&search)%></span></li>
	<li>&nbsp;</li>
   </ul>
  </div>
	<%
	else
		response.write "<div><ul><li>&nbsp;</li></ul><ul><li>&nbsp;&nbsp;暂无相关供求信息!</li><li>&nbsp;</li></ul></div>"
	end if
	rs.close
	set rs=nothing
	%>  
 </div>
 <!--right.end-->
 </div>
 <!--content.end-->
</div>
<%
end sub

sub businessdetail
	dim ID,rs,rootID
	if request("ID")="" or not isnumeric(request("ID")) then
		call anysale.asNote("访问出错","参数不正确,请返回重新访问!")
	else
		ID=request("ID")
	end if
	set rs=conn.execute("select * from as_business where businessID="&ID)
	if rs.eof or rs.bof then
		call anysale.asNote("访问出错","参数不正确,请返回重新访问!")
	else
		conn.execute("update as_business set views=views+1 where businessID="&ID)
		rootID=anysale.getValue("as_channel","rootID","channelID="&rs("channelID"))
	
		call header("business",rs("title") &" - "& anysale.nav("channel",rootID,2,"")&"供求信息 - "&company,rs("title")&","&rs("tags"),anysale.cutStr(anysale.clearHTML(rs("detail")),100))
%>
<div class="bodyer">
 <!--content-->
 <%call lefter()%> 
 <div style="float:left;width:702px;">
 <!--right-->
 <div class="tab" style="width:700px;">
  <div class="tabList">
   <ul><li class="line30">&nbsp;&nbsp;<strong>您的位置:</strong>&nbsp;<a href="companydetail.asp?u=<%=username%>">首页</a>&raquo;<a href="companydetail.asp?u=<%=username%>&amp;action=business">供求信息</a><%=anysale.nav("channel",rootID,0,"companydetail.asp?u="&username&"&amp;action=business&amp;")%>&raquo;<%=rs("title")%></li></ul>
  </div>
  
  <div style="padding:20px;">
   <!--content-->
   <div class="left" style="width:302px;margin:0 25px 0 0;">
    <!--image-->
    <ul>
     <li><%if rs("image")="" then%><img src="images/noimage.gif" style="padding:125px;" class="border whitebg" alt="<%=rs("title")%>" /><%else%><img src="<%=rs("image")%>" class="border" width="300" alt="<%=rs("title")%>" /><%end if%></li>
    </ul>
	<!--image.end-->
   </div>
   
   <div class="left">
    <!--parameter-->
    <h1><%=rs("title")%></h1>
	<ul>
	 <li>&nbsp;</li>
	 <%if rs("price")>0 then%>
	 <li>当前价格:<span class="red"><%=rs("price")%></span> 元/<%=rs("unit")%></li>
	 <li>&nbsp;</li>
	 <%end if%>
	 <li>
	  <ul class="linkN" onmouseover="this.className='linkH'" onmouseout="this.className='linkN'"><li class="linkL">&nbsp;</li><li class="linkM"><a href="javascript:anysale();" onclick="getPage('windows.asp?action=askPrice&amp;username=<%=rs("username")%>&amp;title=<%=server.urlEncode(rs("title"))%>&amp;unit=<%=server.urlEncode(rs("unit"))%>');">点此询价</a></li><li class="linkR">&nbsp;</li></ul>
	 </li>
	 <li class="clear">&nbsp;</li>
	 <li>所在地区:<%=anysale.nav("area",rs("areaID"),3,"")%></li>
	 <li>发布时间:<%=anysale.formatDate(rs("addtime"),5)%></li>
	 <li>有效期至:<%=anysale.formatDate(rs("endtime"),5)%></li>
	 <li>&nbsp;</li>
	 <li class="f12">
	  <img src="images/iStar.gif" alt="收藏" width="13" height="12" />&nbsp;<a href="javascript:anysale();" onclick="getPage('windows.asp?action=favorite&amp;groups=1&amp;title=<%=server.urlEncode(rs("title"))%>&amp;link=<%=server.urlEncode("companydetail.asp?u="&username&"&amp;action=businessdetail&amp;ID="&ID)%>');">收藏此信息</a>&nbsp;&nbsp;&nbsp;
	  <img src="images/iMail.gif" alt="推荐" width="13" height="13" />&nbsp;<a href="javascript:anysale();" onclick="getPage('windows.asp?action=email&amp;title=<%=server.urlEncode(rs("title"))%>&amp;detail=<%=server.urlEncode("老朋友好久不见,我是“"&anysale.nickname&"”. 我在 "&anysale.asInfo(1)&" 上发现一供求,也许你会感兴趣,看一下? 详细信息请参看:"&anysale.asInfo(1)&"companydetail.asp?u="&username&"&amp;action=businessdetail&amp;ID="&ID)%>');">推荐给朋友</a>&nbsp;&nbsp;&nbsp;
	  <img src="images/iNote.gif" alt="举报" width="12" height="12" />&nbsp;<a href="javascript:anysale();" onclick="getPage('windows.asp?action=message&amp;username=admin&amp;title=<%=server.urlEncode("举报:"&rs("title"))%>&amp;detail=<%=server.urlEncode(anysale.asInfo(1)&"companydetail.asp?u="&username&"&amp;action=businessdetail&amp;ID="&ID)%>');">举报此信息</a>
	 </li>
	</ul>
	<!--parameter.end-->
   </div>

   <div class="detail" style="width:560px;overflow:hidden;word-wrap:break-word;word-break:normal;">
   <!--detail-->
    <div class="xline clear">&nbsp;</div>
    <br />
	<%=anysale.chkBadWords(rs("detail"))%>
   <!--detail.end-->
   </div>

   <!--content.end-->
  </div>
  
 </div>
 <!--right.end-->
 </div>
 <!--content.end-->
</div>
<%
	end if
	rs.close
	set rs=nothing
end sub

'products
sub products()
	call header("products","产品展示 - "&company,business(6),anysale.asInfo(4))
%>
<div class="bodyer">
 <!--content-->
 <%call lefter()%> 
 <div style="float:left;width:702px;">
 <!--right-->
 <div class="tab" style="width:700px;">
  <%
  dim rs,sql,channel,sortID,rootID,page,npage,ipage
  channel="产品展示"
  sortID=clng(request("sortID"))
  sql="select productsID,title,addtime,preview,price,unit from as_products where username='"&username&"'"
  if sortID>0 then
  	sql=sql+anysale.IDList("sort",sortID)
	search=search+"&amp;sortID="&sortID
	channel=anysale.getValue("as_sort","sortName","sortID="&sortID)
  end if
  if request("keywords")<>"" then
	sql=sql+" and title like '%"&anysale.checkStr(trim(request("keywords")))&"%'"
	search=search+"&amp;keywords="&request("keywords")
  end if
  sql=sql+" and islock=0 order by productsID desc"
  %>
  <div class="tabList">
   <div><ul class="tabH"><li class="tabL">&nbsp;</li><li class="tabM"><%=channel%></li><li class="tabR">&nbsp;</li></ul></div>
  </div>  
  <%
  page = clng(request("page"))
  if page="" or page<1 then page=1 end if
  '	response.write sql
  n=0
  set rs= Server.CreateObject("ADODB.Recordset")
  rs.open sql,conn,1

  if not rs.eof then
  	response.write "<div class=""imglist"">"
	rs.pageSize = 15
	if page>rs.pageCount then page=rs.pageCount end if
	rs.absolutePage = page
	npage=rs.pageCount
	for ipage = 1 to rs.pageSize
  %>
   <ul>
    <li><a href="companydetail.asp?u=<%=username%>&amp;action=productsdetail&amp;id=<%=rs("productsID")%>"><%if rs("preview")="" then%><img src="images/noimage.gif" style="padding:25px;" class="border whitebg" alt="<%=rs("title")%>" /><%else%><img src="<%=rs("preview")%>" alt="<%=rs("title")%>" width="100" height="100" class="border" /><%end if%></a></li>
    <li><a href="companydetail.asp?u=<%=username%>&amp;action=productsdetail&amp;id=<%=rs("productsID")%>"><%=rs("title")%></a></li>
	<%if rs("price")>0 then%><li><span class="red"><%=rs("price")%></span> 元</li><%end if%>
    <li>
	 <input type="button" name="askPrice" class="button" value="点击询价" onclick="getPage('windows.asp?action=askPrice&amp;username=<%=username%>&amp;title=<%=server.urlEncode(rs("title"))%>&amp;unit=<%=server.urlEncode(rs("unit"))%>');" onmouseover="this.className='buttonH'" onmouseout="this.className='button'" />
	</li>
   </ul>
  <%
		n=n+1
		if n mod 5=0 then response.write"<div class=""line5 clear"">&nbsp;</div>" end if
		rs.moveNext
		if rs.eof then exit for end if
	next
	response.write "</div>"
  %>
  <div class="clear">
   <ul>
	<li>&nbsp;</li>
	<li><span class="right f14" style="padding:0 20px 0 0;">共有<%=rs.recordcount%>件产品&nbsp;<%=anysale.pagelink(page,npage,"companydetail.asp?","&amp;action=products&amp;"&search)%></span></li>
	<li>&nbsp;</li>
   </ul>
  </div>
	<%
	else
		response.write "<div><ul><li>&nbsp;</li></ul><ul><li>&nbsp;&nbsp;暂无相关产品信息!</li><li>&nbsp;</li></ul></div>"
	end if
	rs.close
	set rs=nothing
	%>  
 </div>
 <!--right.end-->
 </div>
 <!--content.end-->
</div>
<%
end sub

sub productsdetail()
	dim ID,rs,rootID
	if request("ID")="" or not isnumeric(request("ID")) then
		call anysale.asNote("访问出错","参数不正确,请返回重新访问!")
	else
		ID=request("ID")
	end if
	set rs=conn.execute("select * from as_products where productsID="&ID)
	if rs.eof or rs.bof then
		call anysale.asNote("访问出错","参数不正确,请返回重新访问!")
	else
		conn.execute("update as_products set views=views+1 where productsID="&ID)
	
		call header("products",rs("title") &" - "& anysale.nav("sort",rs("sortID"),2,"")&"产品展示 - "&company,rs("title")&","&rs("tags"),anysale.cutStr(anysale.clearHTML(rs("detail")),100))
%>
<div class="bodyer">
 <!--bodyer-->
 <%call lefter()%> 
 <div style="float:left;width:702px;">
 <!--right-->
 <div class="tab" style="width:700px;">
  <div class="tabList">
   <ul><li class="line30">&nbsp;&nbsp;<strong>您的位置:</strong>&nbsp;<a href="companydetail.asp?u=<%=username%>">首页</a>&raquo;<a href="companydetail.asp?u=<%=username%>&amp;action=products">产品展示</a><%=anysale.nav("sort",rs("sortID"),0,"companydetail.asp?u="&username&"&amp;action=products&amp;")%>&raquo;<%=rs("title")%></li></ul>
  </div>
  
  <div style="padding:20px;">
   <!--content-->
   <div class="left" style="width:302px;margin:0 25px 0 0;">
    <!--image-->
    <ul>
     <li><%if rs("image")="" then%><img src="images/noimage.gif" style="padding:125px;" class="border whitebg" alt="<%=rs("title")%>" /><%else%><img src="<%=rs("image")%>" class="border" width="300" alt="<%=rs("title")%>" /><%end if%></li>
    </ul>
	<!--image.end-->
   </div>
   
   <div class="left">
    <!--parameter-->
    <h1><%=rs("title")%></h1>
	<ul>
	 <li>&nbsp;</li>
	 <%if rs("price")>0 then%><li>当前价格:<span class="red"><%=rs("price")%></span> 元/<%=rs("unit")%></li><%end if%>
	 <li>最小起订:<span class="red"><%=rs("number")%></span> <%=rs("unit")%></li>
	 <li>供货总量:<span class="red"><%=rs("storage")%></span> <%=rs("unit")%></li>

⌨️ 快捷键说明

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