<%
  data_path="../" 'ACC连接数据库路径，对SQL无效 %>
<!--#include file="../conn/conn.asp"-->
<!--#include file="../inc/head.asp"-->
<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>关键字竞价--易想商务网</title>
<base target="_blank">
<link href="css/jj.css" rel="stylesheet" type="text/css" />
<script src="../prototype.js"></script>
<script>
function showall()
{
	if(document.getElementById("keyname").value=="")
  	{
		alert("请输入关键字");
		return false;
	}
	else
	{
		document.search.submit();
	}
}
</script> 
<style>
<!--
body{text-align:center;}
#page1,#page2,#page3{display:none;}
.overbtn{background:url('images/bu1.gif') no-repeat; width:123px;height:37px;font-size:12px;color:#ffffff;cursor:hand;}
.outbtn{background:url('images/bu2.gif') no-repeat; width:123px;height:37px;font-size:12px;color:#000000;cursor:hand;}
#dhtmltooltip {
	BORDER-RIGHT: #ffda8c 1px solid; PADDING-RIGHT: 4px; BORDER-TOP: #ffda8c 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 11px; Z-INDEX: 50; VISIBILITY: hidden; PADDING-BOTTOM: 4px; BORDER-LEFT: #ffda8c 1px solid; WIDTH: 260px; COLOR: #993300; PADDING-TOP: 4px; BORDER-BOTTOM: #ffda8c 1px solid; FONT-FAMILY: Verdana; POSITION: absolute; BACKGROUND-COLOR: #ffffdd
}

#nav { margin:5px 0 0 12px; text-align:center;}
#nav li { float:left; list-style-type:none;}
#search_result ul{margin:10px 0 10px 0; list-style:none;  border-top:1px dashed #CCCCCC;}
#search_result ul li{text-align:center; height:25px; padding:5px 0 0 0;}
.search2 { 
		margin:0 0 0 6px; 
		padding-top:4px;
		width:113px; 
		color:#fff;
		text-align:center; 
		cursor:pointer; 
		display:block; 
		line-height:24px;
		font-weight:bold;
		font-size:14px;
		background-image:url(images/s_bg_a.jpg)
		 }
		
.search1 { 
		margin:0 0 0 6px; 
		padding-top:4px;
		width:113px; 
		color:#000;
		text-align:center; 
		cursor:pointer; 
		display:block; 
		line-height:24px;
		background-image:url(images/s_bg.jpg)
		}	
-->
</style>

</head>

<body>
<table width="<%=HOPE_PageWidth%>" border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td width="517"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="4" background="images/bg6.gif"></td>
        <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td height="18" bgcolor="F6F6F6"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="207" background="images/bg8.gif">&nbsp;</td>
                    <td width="81"><img src="images/a_t.jpg" width="81" height="18"></td>
                    <td background="images/bg8.gif">&nbsp;</td>
                  </tr>
              </table></td>
            </tr>
            <tr>
              <td class="td1"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td width="207">&nbsp;</td>
                    <td width="81"><img src="images/a_b.jpg" width="81" height="26"></td>
                    <td>&nbsp;</td>
                  </tr>
                </table>
                  <table width="100%" height="37" border="0" cellpadding="0" cellspacing="0">
                    <tr align="center">
                      <td width="54"></td>
                      <td width="123" class="overbtn" id="changebox1" onClick="javascript:tag(1);">体验搜索</td>
                      <td width="123" class="outbtn" id="changebox2" onClick="javascript:tag(2);" >排名购买查询</td>
                      <td width="123" class="outbtn" id="changebox3" onClick="javascript:tag(3);">关键字查询</td>
                      <td></td>
                    </tr>
                  </table>
                  <table width="424" height="33" border="0" align="center" cellpadding="0" cellspacing="0" style="padding-top:8px;">
                  <form name="search" action="index.asp?action=shows" method="post">
                    <tr>
                      <td width="1"><img src="images/c1.gif" width="1" height="33"></td>
                      <td width="55">　</td>
                      <td><input name="keyname" type="text" class="input2"></td>
                      <td><input name="Input2" type="image" src="images/sub_4.gif" onClick="showall();">
                      <input name="querytype" type="hidden" value="0">
                      <input name="indir" type="hidden" value="<%=HOPE_InstallDir%>">
                      </td>
                      <td width="31"></td>
                      <td width="1"><img src="images/c1.gif" width="1" height="33"></td>
                    </tr>
                    </form>
                    <tr>
                      <td colspan="5" height="10">
                      </td>
                    </tr>
                </table>
                 <div id="search_result">
	<%
	
		Function NoHtml(str)
			Dim re
			Set re=New RegExp
			re.IgnoreCase =True
			re.Global=True
			re.Pattern="(\<.*?\>)"
			str=re.Replace(str,"")
			re.Pattern="(\<\/.*?\>)"
			str=re.Replace(str,"")
			NoHtml=str
		End Function
		
		'过滤SQL非法字符并格式化html代码
		Function Replace_Text(fString)
			If IsNull(fString) Then
			Replace_Text=""
			Exit Function
			Else
			fString=Trim(fString)
			fString=Replace(fString,">","")
			fString=Replace(fString,"<","")
			fString=Replace(fString,"'","")
			fString=Replace(fString,";","；")
			fString=Replace(fString,"--","—")
			fString=Server.HtmlEncode(fString)
			Replace_Text=fString
			End If	
		End function
		
        action=NoHtml(Replace_Text(Request("action")))
		keywords=NoHtml(Replace_Text(Request("keyname")))
		if action="shows" and keywords<>"" then			
			call showth(keywords)
		end if				
		sub showth(keywords)			 
			Set rsSearch=Server.CreateObject("ADODB.RecordSet")
			sqlSearch="select top 5 * from yixiang_history_price where keywords='"& keywords &"' order by price desc"
			rsSearch.Open sqlSearch,conn,1,1
			
			if rsSearch.bof and rsSearch.eof then
				response.Write"<ul>"
				response.Write"<li style='text-algin:center;'>你查询的关键字是:[<font color=red>"& keywords &"</font>]您选择的关键字还无人参与竞价.<br><a href='"& HOPE_InstallDir &"member/index.asp?tourl=price/inprice.asp?sidekey="& keywords &"'><font color=red>马上申请此关键字</font></a></li>"	
				response.Write"</ul>"
			else
				response.Write"<ul>"
				do while not rsSearch.eof
					response.Write"<li>你搜索的关键字是：&nbsp;[<font color=red>"& keywords &"</font>]&nbsp;&nbsp;&nbsp;该关键字起拍价格为：[<font color=red>"& rsSearch("price") &"</font>]&nbsp;&nbsp;<a href='"& HOPE_InstallDir &"member/index.asp?tourl=price/inprice.asp?sidekey="& keywords &"'>马上竞价</a></li>"
				rssearch.movenext
				loop
				response.Write"</ul>"
			end if
		end sub
	%>                 
                 </div>
                </td>
            </tr>
            <tr>
              <td height="12" background="images/bg7.gif"></td>
            </tr>
        </table></td>
        <td width="8"><img src="images/c_r.gif" width="8" height="150"></td>
      </tr>
    </table></td>
    <td width="11"></td>
    <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td height="150" align="center" class="table2"><img src="images/7.jpg" width="230" height="45" border="0"><br>
		  <a href="pm.html" target="_blank"><img src="images/cpzc.gif" width="232" height="66" border="0"></a><br><img src="images/icon.gif" width="12" height="12" border="0"> <span class="f5"><a href="<%=HOPE_InstallDir%>login/register.asp">立即申请</a></span></td>
      </tr>
      
      
    </table></td>
  </tr>
</table>
<table>
  <tr>
    <td></td>
  </tr>
</table>
<table>
  <tr>
    <td></td>
  </tr>
</table>
<table width="<%=HOPE_PageWidth%>" border="0" cellspacing="0" cellpadding="0">
<tr>
<td> <div id="search_result"> </div></td>
</tr>
  <tr>
    <td width="517">
    
    <table width="100%" border="0" cellspacing="0" cellpadding="0">
      <tr>
        <td width="4" background="images/bg6.gif"></td>
        <td valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
            <tr>
              <td height="18" bgcolor="F6F6F6"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  <tr>
                    <td background="images/bg8.gif">
                    </tr>
              </table></td>
            </tr>
            <tr>
              <td class="td1"><table width="100%" border="0" cellspacing="0" cellpadding="0">
                  
                </table>
                  <table width="100%" height="37" border="0" cellpadding="0" cellspacing="0">
                    <tr align="left">
                      <td>
                                 <%
            set rsf=server.CreateObject("adodb.recordset")
            sqlf="select * from yixiang_config_price "
            rsf.open sqlf,conn,1,1
            if not rsf.eof then
            %>
          <%=rsf("description")%>
          <%
            rsf.close
            end if	
        %>
                      </td>
                    </tr>
                  </table>                </td>
            </tr>
            <tr>
              <td height="12" background="images/bg7.gif"></td>
            </tr>
        </table>
</td>
        <td width="8"><img src="images/c_r.gif" width="8" height="500"></td>
      </tr>
    </table>
    </td>
    <td width="11"></td>
    <td align="center" valign="top"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          </table>
	  <table width="100%" border="0" cellspacing="1" cellpadding="0">
      <tr>
        <td height="28" valign="bottom" bgcolor="#E1E1E1"><table width="100%" border="0" cellspacing="0" cellpadding="0">
          <tr>
            <td width="16">&nbsp;</td>
            <td width="80" height="22" align="center" bgcolor="ffffff" class="f5">常见问题</td>
            <td>&nbsp;</td>
          </tr>
        </table></td>
      </tr>
      <tr>
        <td valign="top" bgcolor="F7F7F7" class="table2" style="padding:10px 0 0 0; line-height:180%;">
        <%
			response.Write(Hope_HtmlResult("#HOPE_Help(0,12,20,0)#"))
		%>
        </td>
      </tr>
    </table></td>
  </tr>
</table>
<%
	response.Write(Hope_HtmlResult("#YX_gdbotten#"))
%>

<script language="javascript" type="text/javascript">
function getObj(objName){return(document.getElementById(objName));}
function tag(id){
	for(var i=1;i<=3;i++){
		if(i==id) {
			getObj("changebox"+i).className="overbtn";
		}
		else{
			getObj("changebox"+i).className="outbtn";
		}
	}
	document.getElementsByName("querytype")[0].value = id;
}
</script>        