<!--#include file="../prohead.asp"-->
 <!--#include file="../checkrole.asp"-->
  <%
 call checkuser("gjj")
 %>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
 
	<table width="100%" border="0" cellspacing="0" cellpadding="0" align="center">
     <tr>
      <td align="center"  height="30"   bgcolor="#C6DFFF"  style="font-size:16px "> 进行中的关键词竞价 &nbsp;&nbsp;&nbsp;<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 Websen_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 
	  %>
	   &nbsp;关键词竞价信息：
 本月关键词竞价活动开始时间<font color=blue>&nbsp;<%=rsp1("starttime")%></font>&nbsp;至&nbsp;<font color="blue">&nbsp;<%=rsp1("endtime")%></font>&nbsp;结束
 
 <%
 end if
    else
	%>
	 <tr>
      <td   height="25"   bgcolor="#F5793D" style="color:#FFFFFF">  &nbsp;关键词竞价信息：
	<%
   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="查看">&nbsp;&nbsp;&nbsp;&nbsp;<a href="inprice.asp?action=addprice">我要参加关键词竞价</a>
	</td>
 	</tr>
	<tr><td height="2" colspan="3"  bgcolor="#CAD8EA"></td></tr>	
	</form> 
	 <table   border="1" bordercolor="#F2F2F2" cellpadding="0" cellspacing="0" align="center" width="100%" >
	 <tr><td colspan="5"></td></tr><tr>
	 
	 <%
	set rs=server.CreateObject("adodb.recordset")
    sql="SELECT DISTINCT keywords  FROM Websen_temp_price  order by keywords "
    rs.open sql,conn,1,1
     	if rs.eof or rs.bof then 
		%>
		<td height="50"  colspan="5"   align="center"><font color=red>对不起 !暂无任何关键词竞价的信息！ </font></td>
		<%
		
	 else 
	msg_per_page=50 '定义每页显示记录条数
	rs.pagesize=msg_per_page '定义分页记录集每页显示记录数
	
	if not (rs.eof and rs.bof) then
		totalrec=RS.RecordCount'总记录条数
		if rs.recordcount mod msg_per_page=0 then'计算总页数,recordcount:数据的总记录数
			n=rs.recordcount\msg_per_page'n:总页数
		else
			n=rs.recordcount\msg_per_page+1                        
		end if                                                                
		currentpage=request("page")'currentpage:当前页
		If currentpage <> "" then
			currentpage =  cint(currentpage)
			if currentpage < 1 then  
				currentpage = 1
			end if  
			if err.number <> 0 then '错误处理
				err.clear
				currentpage=1
			end if
		else
			currentpage=1
		End if                                                                
		if currentpage*msg_per_page > totalrec and not((currentpage-1)*msg_per_page < totalrec)then 
			currentPage=1
		end if
		rs.absolutepage=currentpage 
		rowcount=rs.pagesize 
	end if
	i=1
 do while not rs.eof and rowcount > 0
 %>
 
     <td height="25">
 &nbsp; <A href="?page=<%=request("page")%>&keys=<%=rs("keywords")  %>"><%=rs("keywords")%> </A>
 </td>
<%
if i mod 5=0 then
response.Write("</tr><tr>")
end if
i=i+1
rowcount=rowcount-1
rs.movenext
loop
 
%>
</td></tr>
<tr><td colspan="5" align="center"><%call listPages("index.asp")%></td></tr>
<%
end if
%></table>
 





<div id="keysdiv">
 <% 
   if   Replace_Text(request("keys"))<>"" then 
    %>
   <table width="100%" border="1" bordercolor="#F5F5F5" cellspacing="0" cellpadding="0" align="center">
   <tr><td height="2" colspan="5" align="center"><b><font color="red"><%=Replace_Text(request("keys"))%></font>的当前竞价情况</b>  &nbsp;<a href="addprice.asp?goprice=gg&addkey=<%=Replace_Text(request("keys"))%>">我要竞价该词</a></td></tr>
   <%
   set rsx=server.CreateObject("adodb.recordset")
   sqlx="select top 15  * from Websen_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>&nbsp;当前暂无可用竞价情况
 </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 Websen_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 Websen_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
   %>  
  </div>
</body>
</html>
<%
rs.close
conn.close

%>

