inprice.asp

来自「实现一个用JSP、Servlet技术实现的小型物流网站系统。实现功能如下:管理员」· ASP 代码 · 共 333 行

ASP
333
字号
<!--#include file="../prohead.asp"-->
 <!--#include file="../checkrole.asp"-->
 <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
 <style type="text/css">
<!--
.STYLE1 {font-weight: bold}
-->
</style>
 <%
 call checkuser("gjj")
 %>
 
<SCRIPT language=javascript> 
<!-- Hide 
function killErrors() { 
return true; 
} 
window.onerror = killErrors; 
//需要报JS错的请删除此JS
// --> 
</SCRIPT> 
  <style type="text/css">
<!--
.STYLE1 {
	color: #FF0000;
	font-weight: bold;
}
 -->
</style>
<%
refgo=Replace_Text(request("refgo"))
refkeyword=Replace_Text(request("refkeyword"))

%><table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
     <tr>
      <td align="center"  height="30"   bgcolor="#C6DFFF"  style="font-size:16px "> 参加关键词竞价    <font style="font-size:12px"><a  href="inprice.asp?action=des">关键词竞价服务说明</a></font></td>
  </tr> 
   </table>
  <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
    
	  <%
	 set rsp1=server.CreateObject("adodb.recordset")
   sqlp1="select  * from yixiang_config_price "
   rsp1.open sqlp1,conn,1,1
   if not rsp1.eof then 
   if rsp1("isopen")=0 then 
 %> <tr>
      <td   height="25"   bgcolor="#95A3D2" style="color:#FFFFFF; font-weight:bold"> 
	  <%
     	  if month(rsp1("starttime"))=month(date()) and  rsp1("endtime")>now() then 
	  %>
	    关键词竞价信息:
 本月关键词竞价活动开始时间<font color=blue> <%=rsp1("starttime")%></font> 至 <font color="blue"> <%=rsp1("endtime")%></font> 结束
 
 <%
 end if
    else
	%>
	 <tr>
      <td   height="25"   bgcolor="#F5793D" style="color:#FFFFFF">   关键词竞价信息:
	<%
   response.Write("<font color=white>关键词竞价正在进行中........................请赶快参与,商机无限!谨请把握!</font>")   
   end if
   rsp1.close
   end if 
	  
	  %> </td>
  </tr>  
  </table>
 <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
	<form name="refform" method="post" action="inprice.asp">
    <tr bgcolor="#EFF7FF">
      <td width="14%"  height="30" align="center"  >  参考关键词  </td>
 	<td width="86%">
	<input name="refkeyword" value=""  maxlength="16" >
	<input type="submit" name="refgo" value="查看">    <a href="inprice.asp?action=addprice">我要参加关键词竞价</a>
	</td>
 	</tr>
	<tr><td height="2" colspan="3"  bgcolor="#CAD8EA"></td></tr>	
	</form>
   </table>
   
   <%
   '竞价服务说明
      if Replace_Text(request("action"))="des" then
%>
    <table width="100%" border="0"  cellspacing="0" cellpadding="0" align="center">
     <tr><td align="center" height="30"> <b>关键词竞价服务说明</b></td></tr>
	 <tr   bgcolor="#F9F9F9">

  	<td  >	    <table width="80%" border="1" bgcolor="#FFFFFF"    bordercolor="#C6CEDF" cellspacing="2" cellpadding="0" align="center">
     <tr    >

  	<td  style="word-break:break-all" > <%
	 set rss=server.CreateObject("adodb.recordset")
	 sqls="select * from yixiang_config_price "
	 rss.open sqls,conn,1,1
	 if not rss.eof then
	 %>
	 <%=rss("description")%> 
	 <%
	 
	 rss.close
	 end if
	 
	 
	 %></td></tr></table>
 	</td>
 	</tr>	
    </table>
   
  <%
    end if
   %>
   
   
   <%
   '我要竞价
   if Replace_Text(request("action"))="addprice" then
    
   %>
   
    <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
     <tr >
  	<td  height="55" align="center">
	
	<%
	set rsp=server.CreateObject("adodb.recordset")
   sqlp="select  * from yixiang_config_price "
   rsp.open sqlp,conn,1,1
   if not rsp.eof then 
   if rsp("isopen")=0 then 
   response.Write(" <font color=red>对不起!当前尚未开通关键词竞价功能!</font>")
   else
   '已开通竞价并时间未到
    if month(rsp("starttime"))=month(date()) and  rsp("endtime")>now() then 
    %>
   
      
    <table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
    <form name="addform" method="post" action="addprice.asp" > <tr >
  	<td  >
	 请输入你所要竞价的关键词:<input  name="addkey" type="text"  onblur="this.value=this.value.replace(/\s/g,'');" value="" size="20"  maxlength="16">
	 
   <input  type="submit" value="我要竞价" name="goprice"> 
	</td></tr>
	</form>
	</table>
   
   <%
   end if
    end if
   rsp.close
   end if
	%>
	
 	</td>
 	</tr>	
    </table>
   
   <%
   end if
   %>
   
   
   
   
   
   <%
   if   Replace_Text(request("keys"))<>"" then 
    %>
 <table width="100%" border="1" bordercolor="#F5F5F5" cellspacing="0" cellpadding="0" align="center">
   <%
   set rsx=server.CreateObject("adodb.recordset")
   sqlx="select top 15  * from yixiang_temp_price where keywords='"&Replace_Text(request("keys"))&"' order by price desc"
   rsx.open sqlx,conn,1,1
   if   rsx.eof then
   %>
   <tr><td  height="25">关键词:<font color="#FF0000"><%=Replace_Text(request("keys"))%></font> 当前暂无可用竞价情况</td></tr>
   <%
   else
   %>
   <tr bgcolor="#8AA3D0"  height="25" style="color:#FFFFFF" align="center"><td>关键词</td><td>竞价公司</td><td>竞价金额</td><td>竞价时间</td></tr>
   <%
   do while not rsx.eof 
   %>
   <TR><td align="center" height="25">
<font color="#0099CC"><%=Replace_Text(request("keys"))%></font>
   </td>
   <td>
   <%
   set rsg=server.CreateObject("adodb.recordset")
   sqlg="select * from wygkcn_corporation where id="&rsx("gsid")
   rsg.open sqlg,conn,1,1
   if not rsg.eof then
    '---------------------------------------------------
	   set rsmp1=server.CreateObject("adodb.recordset")
	   sqlmp1="select * from yixiang_vipgrade where roleid="&rsg("gradeid")
	   rsmp1.open sqlmp1,conn,1,1
	   if not rsmp1.eof  then 
	    if rsg("flag")=1 then
 	   if instr(rsmp1("rolelist"),"qw")>0 then					
 		 if is2weburl=1 then
   %>
       <a href="http://<%=rsg("user")%>.<%=weburl1%>/"   target="_blank"> <%=rsg("qymc")%></a>  
       <%else%>
        <a href="<%=HOPE_InstallDir%>vipcom/<%=rsg("user")%>/"  target="_blank"><%=rsg("qymc")%></a> 
  <%
	  end if 
	  else
  %>
	     <a href="<%=HOPE_InstallDir%>ptcom/<%=rsg("user")%>.html"  target="_blank"><%=rsg("qymc")%></a> 
  <%
	  end if
	  end if
	  rsmp1.close
	  end if  
	  '----------------------------------------------------------
	   
    rsg.close
   end if
   %>
   </td>
   <td align="center"><font color="red"><%=rsx("price")%></font>元</td>
   <td align="center"><%=rsx("addtime")%></td>
   </TR>
    <%
    rsx.movenext
   loop
   rsx.close
   end if
   %>   
   
 </table>
   <%
   end if
   %>  <table width="100%" border="1" bordercolor="#F5F5F5" cellspacing="0" cellpadding="0" align="center">
    	<tr><td  colspan="3"></td></tr>
		<%
		if  refgo<>"" and  refkeyword<>"" then 
		 total=1
		 set rst=server.CreateObject("adodb.recordset")
		 sqlt="select  sum(hits) as totalnum from yixiang_keyhots "
		 rst.open sqlt,conn,1,1
		 if not rst.eof then
		 total=rst("totalnum")
		 rst.close
		 end if
		 '
         set rsref=server.CreateObject("adodb.recordset")
		 sqlref="select  top 15 * from yixiang_keyhots  where keywords like '%"&refkeyword&"%' order by hits  desc"
		 rsref.open sqlref,conn,1,1
		 if   rsref.eof then
		 %>
		 <tr><td width="9%" height="25"><%=refkeyword%></td><td width="40%" >
		 <table width="400" border="0" cellspacing="0" cellpadding="0" align="left">
	<tr><td height="5" width="1%" bgcolor="red"><td  bgcolor="#DFE3F0" width="99%"></td> </tr>	</table>
		  </td>
		  <td width="51%"><font  color="#999999">暂无竞价情况</font></td>
     </tr>
		 <%
		 
		 else 
		 %>
		 <tr bgcolor="#6583C7" height="30" style="color:#FFFFFF" align="center"><td>关键词</td>
		 <td>搜索量</td> 
		 <td>竞价情况</td><td>ksdjfds</td>
           <%
		 do while not rsref.eof 
		 %>
 		<tr>
	<td height="25"  > 
	<%
		 Set re = New RegExp
        re.Pattern ="("&refkeyword&")"
         re.IgnoreCase = True
        re.Global=True
         result = re.Replace(rsref("keywords"), "<font color=red>$1</font>")
 		 %>
	<a href="inprice.asp?refgo=<%=refgo%>&refkeyword=<%=refkeyword%>&keys=<%=rsref("keywords")%>"   style="text-decoration:none"><%=result%></a></td><td>
	   <table width="340" border="0" cellspacing="0" cellpadding="0" align="left">
	<tr><td height="5" width="<%if (rsref("hits")/total)*100<1  then response.Write("1") else response.Write((rsref("hits")/total)*100)  end if%>%" bgcolor="red"><td  bgcolor="#DFE3F0" width="<%=100-(rsref("hits")/total)*100%>%"></td> </tr>	</table>
 	</td><td>
	<%
	set rsm=server.CreateObject("adodb.recordset")
	sqlm="select max(price) as maxprice from yixiang_temp_price where keywords='"&rsref("keywords")&"'"
	rsm.open sqlm,conn,1,1
    if not rsm.eof then 
	if rsm("maxprice")<>"" then
	response.Write("<font color=#666666>当前最高出价</font>:<font color=red>"&rsm("maxprice")&"</font>元<br>")
	end if
	rsm.close
 	end if
	
	%>
	
	
	<%
		vhit=1
		set rsv=server.CreateObject("adodb.recordset")
		sqlv="select * from yixiang_keyhots where  keywords ='"&rsref("keywords")&"'"
		rsv.open sqlv,conn,1,1
		if not rsv.eof then
		vhit=rsv("hits")
  		end if
		rsv.close
 		 set rsk=server.CreateObject("adodb.recordset")
		 sqlk="select  * from yixiang_rate_price  where   minrates<="&vhit&"  and maxrates>"&vhit&"" 
  		 rsk.open sqlk,conn,1,1
		 if not rsk.eof then
		response.Write("<font color=#666666>起拍价:"& rsk("lowprice")&"元 每次加价幅度:"&rsk("addprice")&"元 一口价:"&rsk("highprice")&"元</font>")
		rsk.close
		 end if
		 %>
		  
	</td><td><a href='addprice.asp?goprice=gg&addkey=<%=rsref("keywords")%>'>我要竞价</a></td>
	
	</tr>
 <%
		 rsref.movenext
		 loop
		 rsref.close		
		 end if
 
	end if
	%> 

  </table>

<%
 conn.close
set conn=nothing
%>

⌨️ 快捷键说明

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