<!--#include file="../prohead.asp"-->
 <!--#include file="../checkrole.asp"-->
  <%
 call checkuser("gjj")
 if issession=0 then
gsid=Replace_Text(request.Cookies("Yxmemberid"))
else
gsid=session("id")
end if
 %>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
 
<%
dim price,sqlp2
price = request("price")
price=cint(price) 
 
  %>
	<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="#8CA2D6" cellpadding="0" cellspacing="0" align="center" width="99%" >
	 <tr><td>
 	 <table   border="0" bordercolor="#F2F2F2" cellpadding="0" cellspacing="0" align="center" width="100%" >
	 <tr bgcolor="#8CA2D6" height="25" style="color:#FFFFFF"><td >&nbsp;关键字</td><td>出价金额</td><td>竞价时间</td> </tr>
	 <tr><td  colspan="3"  bgcolor="#000000" height="1"></td></tr>
	 
	 <%
set rs=server.CreateObject("adodb.recordset")
        sql="SELECT    Websen_history_price.*,Websen_corporation.id FROM Websen_corporation,Websen_history_price   WHERE    Websen_corporation.id=Websen_history_price.gsid and    Websen_corporation.ID = "&gsid&"  order by Websen_history_price.addtime desc,Websen_history_price.keywords"
       rs.open sql,conn,1,1
     	if rs.eof or rs.bof then 
		%>
		<tr><td height="50"  colspan="3"   align="center"><font color=red>对不起 !暂无任何关键词竞价的信息！ </font></td></tr>	
		<%
		
	 else 
	msg_per_page=20 '定义每页显示记录条数
	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
 %>
 <tr <%if i mod 2=0 then response.Write("bgcolor=#EEF0F2   onMouseOut=""this.style.backgroundColor='#EEF0F2'"" onMouseOver=""this.style.backgroundColor='#D7E3F3'""") else response.Write("bgcolor=#ffffff  onMouseOut=""this.style.backgroundColor='#ffffff'"" onMouseOver=""this.style.backgroundColor='#D7E3F3'""") end if%>>
     <td height="25">
 &nbsp;   <A href="inprice.asp?refgo=gg&refkeyword=<%=rs("keywords")  %>"> <%=rs("keywords")%></A>
 </td><td><font color="#999999"><%=rs("price")%></font>元</td>
 <td><font color="#999999"><%=rs("addtime")%></font></td> 
 </tr>
 <tr><td colspan="3"   bgcolor="#F7F7F7" height="1"></td></tr>
<%
 
i=i+1
rowcount=rowcount-1
rs.movenext
loop
 
%>
 
<tr><td colspan="3" align="center"><%call listPages("history.asp")%></td></tr>
<%
end if
%></table>
 
</td></tr></table>
 
</body>
</html>
<%
rs.close
conn.close

%>

