<% 
	data_path="../../" 'ACC连接数据库路径，对SQL无效
	numid="141"
	dir="../err.asp"
  %>
  <!--#include file="../../conn/conn.asp"-->
<!--#include file="../../inc/filesystem.asp"-->
 <!--#include file="../../inc/safe.asp"-->
   <!--#include file="../rolecheck.asp"-->

 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<LINK href="../css/style.css" rel=stylesheet type=text/css>
 <title></title>
 <style type="text/css">
<!--
.STYLE6 {color: #0099CC}
-->
 </style>
 <script language="javascript">
  function gook()
 {
 var i=confirm("你确定要删除吗？");
 if(i)
 {
 return true ;
 }
 else
 {
 return false;
 }
 }
 function isshen()
 {
 var i=confirm("请先确定该竞价者已经支付费用！该操作只在进行竞价处理操作执行前是可逆的，一旦通过审核，将在竞价处理操作执行后生效！");
 if(i)
 {
 return true ;
 }
 else
 {
 return false;
 }
 }
 </script>
</head>

<%
 keyname=Replace_Text(request("keyname"))
 keyid=Replace_Text(request("keyid"))
 if keyid="" then 
 response.Write("<script>alert('对不起!参数传递错误!');history.back(-1);</script>")
 response.End()
 end if
 '删除操作---------------------------
 action=Replace_Text(request("action"))
 delid=Replace_Text(request("delid"))
 if action="del" then 
 if delid<>"" then 
 conn.execute "delete from yixiang_temp_price where id="&delid
 end if
 end if
 
 
 '---------------------------

%>
<body>
<table cellpadding="1" cellspacing="1" border="0" width="100%" class="tableBorder" align="center">
    <tr align="center">
      <th height="25" align="center"><span class="tableHeaderText"><strong>【 <%=keyname%> 】相关统计信息</strong></span> </th>
    </tr>
</table>
   <table cellpadding="0"   bordercolor="#EBF1FA" cellspacing="0" border="0" width="98%"  align="center">
     <tr ><td align="left"   colspan="2"  ><br />◆.<a href="index.asp"><font color="red">竞价参数设置</font></a> &nbsp;&nbsp;■.<A   href="current.asp"       target=main><font color="red">当前竞价数据管理</font></A> &nbsp;&nbsp;<a href="javascript:history.back(-1);">返回</a></td>
      </tr> 
	 <tr><td     bgcolor="#000000" height="1"></td></tr>
	 </table>
   <table cellpadding="0"   bordercolor="#EBF1FA" cellspacing="0" border="1" width="98%"  align="center">
  	<tr><td align="center"     colspan="5">
      
     <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
	 
 	 <tr><td height="30"   colspan="5" bgcolor="#F9F9F9" >
    	操作提示：<font color="red">本系统针对每个关键字的竞价最多只保留前三名的成功记录！第三名以后的将全部删除！</font><br />关键词[&nbsp<font color=red><%=keyname%></font>&nbsp;]的当前搜索率:
		<%
		vhit=1
		set rsv=server.CreateObject("adodb.recordset")
		sqlv="select * from yixiang_keyhots where  keywords ='"&keyname&"'"
		rsv.open sqlv,conn,1,1
		if not rsv.eof then
		vhit=rsv("hits")
		response.Write("<font color=red>"&rsv("hits")&"</font>")
		else
		response.Write("1")		
		end if
		rsv.close
		%>
 		 &nbsp;
		 <%
		 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("&nbsp;&nbsp;起拍价:"& rsk("lowprice")&"元&nbsp;&nbsp;每次加价幅度:"&rsk("addprice")&"元&nbsp;&nbsp;一口价:"&rsk("highprice")&"元")
		 end if
		 %>
		  
		 
		   <br />
		<span class="STYLE6">竞价情况如下</span>↓
		</td>
 	 </tr>
		 <tr height="30" bgcolor="#C6CFE7" style="color:#000000"><td width="27%"  >&nbsp; 竞价的关键词 </td>
         <td width="30%"  >竞价公司</td>
         <td width="10%"  > 竞价金额(元) </td>
         <td width="15%"  > 竞价时间</a></td>
         <td width="8%"> 性质 </td>
         <td width="10%"> 操作 </td>
     </tr>
	 <tr><td colspan="6" height="1"  bgcolor="#006699"></td></tr>
		<%
		set rs=server.CreateObject("adodb.recordset")
		sql="select * from yixiang_temp_price where keywords ='"&keyname&"' order by price  desc"
		rs.open sql,conn,1,1
		msg_per_page=25'定义每页显示记录条数
	
	if not rs.eof then 
			
	%>
	<!--#include file="../../inc/headpage.asp"-->
	<%
	j=1
 
do while not rs.eof and rowcount > 0 
%>
		<tr height="30" <%if j mod 2=0 then response.Write("bgcolor=#F7F7F7   onMouseOut=""this.style.backgroundColor='#F7F7F7'"" onMouseOver=""this.style.backgroundColor='#D7E3F3'""") else response.Write("bgcolor=#ffffff  onMouseOut=""this.style.backgroundColor='#ffffff'"" onMouseOver=""this.style.backgroundColor='#D7E3F3'""") end if%>><td>&nbsp;<%=rs("keywords")%></td>
		<td>
 <%
	set rsg=server.CreateObject("adodb.recordset")
	sqlg="select  * from yixiang_corporation  where  id="&rs("gsid")
	rsg.open sqlg,conn,1,1 
	if not rsg.eof then 
	%>
	<a href="../vipgrade/edit.asp?id=<%=rsg("id")%>"><%=rsg("qymc")%></a>
	<%
	else
	response.Write("不详")
	end if
	rsg.close
 %>
		</td><td><font color="#FF0000"><%=rs("price")%></font></td><td><font color="#666666"><%=rs("addtime")%></font></td><td><%if rs("ishigh")=1 then response.Write("<font color=red>一口价</font>") end if%></td>
		<td>
		<%
		if rs("ispay")=1 then 
		%>
		<a href="checkkey.asp?keyid=<%=rs("id")%>&action=0" onClick="return isshen();"><font color="red">已审核</font></a>
		<%
		else
		%>
	 	<a href="checkkey.asp?keyid=<%=rs("id")%>&action=1" onClick="return isshen();">未审核</a>
 		<%
		end if
		%>&nbsp;<a href="delkey.asp?action=del&delid=<%=rs("id")%>" onClick="return gook();">删除</a>
		</td>
		</tr>
		
		 <%
    j=j+1
 	rowcount=rowcount-1
	rs.movenext
 	loop
 	%>
 <tr><td align="center"  colspan="6"><%=listPages("keyword.asp?keyname="&Replace_Text(request("keyname"))&"&keyid="&Replace_Text(request("keyid"))&"")%></td></tr>
  <%
	rs.close
	end if
  %>
   	</table>
     </td>    </tr>
</table>
 </body>
</html>
<%
conn.close
set conn=nothing
%>