<%@ Page Language="VB" AutoEventWireup="false" ContentType="text/html" ResponseEncoding="gb2312" Inherits="b2bNet.Admin_Admin_adv_keyword" %>

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<link href="inc/admin_style.css" rel="stylesheet" type="text/css" /><link href="inc/style.css" rel="stylesheet" type="text/css" /><script language="javascript" src="inc/title.js" type="Text/JavaScript"></script>
<title><%=AppConst.SiteName%></title>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>
<script language="javascript" type="Text/JavaScript">
function selectall(){
	for(i=0;i!=document.news.elements.length;i++){
		document.news.elements[i].checked=!document.news.elements[i].checked;
	}
}
function checkform2(){
	if (document.form2.datatimed.value==""){
	alert("请选择广告投放有效期!");
	document.form2.datatimed.focus();
	return false;
	}
		if (document.form2.keyword.value==""){
	alert("请填写行业关键词!");
	document.form2.keyword.focus();
	return false;
	}
		if (document.form2.pic.value==""){
	alert("请上传图片!");
	document.form2.pic.focus();
	return false;
	}
	}
</script>

</head>

<body>
<table style="width:100%"  border="0" cellspacing="0" cellpadding="0">
  <tr>
    <td style="height:20"><table style="height:22; width:100%" border="0" cellpadding="0" cellspacing="1">
      <tr class="topbg">
        <td style="height:22" align="center" class="topbg"><strong><%=menuname%><%=adsortname%>广告列表 </strong></td>
      </tr>
    </table></td>
  </tr>
  <tr>
    <td><table style="width:100%"  border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td style="width:25"><div align="center"><img src="<%=AppConst.SiteUrl%>/<%=AppConst.Skinpath%>/gojump01.gif" width="16" height="16" /></div></td>
          <td><a href="Admin_adv_keyword.aspx?menuid=1&typeid=2">商机擎天柱</a>  | <a href="Admin_adv_keyword.aspx?menuid=1&typeid=1">商机横幅</a> | <a href="Admin_adv_keyword.aspx?menuid=2&typeid=2">产品擎天柱</a> | <a href="Admin_adv_keyword.aspx?menuid=2&typeid=1">商机横幅</a> | <a href="Admin_adv_keyword.aspx?menuid=3&typeid=2">企业擎天柱</a> | <a href="Admin_adv_keyword.aspx?menuid=3&typeid=1">企业横幅</a></td>
          <td style="width:220"><table style="width:220"  border="0" align="right" cellpadding="2" cellspacing="0">
		  <form name="form1" method="get">
            <tr>
              <td style="height:25; width:55%"><div align="right">搜索广告：</div></td>
              <td style="width:32%"><div align="center">
                <input name="keyword" type="text" id="keyword" size="10" />
              </div></td>
              <td style="width:13%"><input type="submit" name="Submit" value="  搜索 " /></td>
            </tr></form>
          </table></td>
        </tr>
      </table><table style="width:100%"  border="0" cellpadding="2" cellspacing="1" class="border">
      <tr class="Title">
        <td style="height:22; width:40"><div align="center"><strong>ID</strong></div></td>
        <td><div align="center"><strong>关键词</strong></div></td>
        <td style="width:140"><div align="center"><strong>投放人</strong></div></td>
        <td style="width:100"><div align="center"><strong>投放时间</strong></div></td>
        <td style="width:100"><div align="center"><strong>到期时间</strong></div></td>
        <td style="width:100"><div align="center"><strong>图 片</strong></div></td>
        <td style="width:120"><div align="center"><strong>操 作</strong></div></td>
      </tr>
	  <form method="get" name="news">
	  <%Dim num = 0 : Do While Not rs.eof AndAlso num < rs.pagesize%>
      <tr class='tdbg' onmouseout="this.className='tdbg'" onmouseover="this.className='tdbgmouseover'">
        <td style="height:22; width:40"><div align="center"><%=rs("ID").Value%></div></td>
        <td>
		  <%If rs("datatimeD").Value <= Now() Then%>
          <font color="#ff0000"><b><%=rs("keyword").Value%></b></font>
          <%else%>
          <%=rs("keyword").Value%>
          <%End If%>
          <%If rs("unit").Value = 1 Then%> | <font color="#ff0000">已审</font><%End If%>
        </td>
        <td style="width:140"><div align="center"><%If AppConst.SiteDnsTwo Then%><a href="http://www.<%=rs("userid").Value%><%=AppConst.SiteDns%>" target="_blank" title="查看该会员的企业网站"><%=rs("userid").Value%></a><%else%><a href="../<%=AppConst.Memberpath%>/<%=rs("userid").Value%><%=AppConst.SiteDns%>" target="_blank" title="查看该会员的企业网站"><%=rs("userid").Value%></a><%end if%> [<a href="Member_jifeng.aspx?page=0&Adduser=<%=rs("userid").Value%>" title="为该会员充积分值">充值</a>]</div></td>
        <td style="width:100"><div align="center"><%=FormatDateTime(rs("datatimeT").Value, 2)%></div></td>
        <td style="width:100"><div align="center">
          <%If rs("datatimeD").Value <= Now() Then%>
         <font color="#FF0000"><%=rs("datatimeD").Value%></font>
          <%Else%>
          <%=FormatDateTime(rs("datatimeD").Value, 2)%> 
          <%End If%>
        </div></td>
        <td style="width:100"><div align="center"><a href="../Ad/Info/<%=rs("pic").Value%>" target="_blank"><img src="../Ad/Info/<%=rs("pic").Value%>" alt="" width="80" height="30" border="0" onmouseover="width=100;height=40" onmouseout="width=80;height=30" /></a></div></td>
        <td style="width:120"><table style="width:120"  border="0" align="center" cellpadding="0" cellspacing="0">
          <tr align="center">
            <td style="width:30"><a href="<%=rs("weburl").Value%>" target="_blank" title="查看该广告位的链接">查看</a></td>
            <td style="width:30"><a href="?id=<%=rs("id").Value%>&action=ok&menuid=<%=menuid%>&typeid=<%=typeid%>" title="审核此广告，需要该会员有积分方能审核">审核</a></td>
            <td style="width:30"><a href="Admin_adv_keywordedit.aspx?id=<%=rs("id").Value%>&menuid=<%=menuid%>&typeid=<%=typeid%>" title="修改此广告">修改</a></td>
            <td style="width:30"><a href="?id=<%=rs("id").Value%>&action=del&menuid=<%=menuid%>&typeid=<%=typeid%>" title="删除此广告，注意，删除后不能恢复">删除</a></td>
          </tr>
		 
        </table></td>
      </tr>
	  <%num = num + 1 : rs.movenext() : Loop%> 
      </form>
    </table>
      <table style="width:100%"  border="0" cellspacing="0" cellpadding="4">
        <tr>
          <td style="height:22"><%=Pagination(rs.pagecount, LngPage, rs.recordcount, rs.pagesize, "&menuid=" & menuid & "&typeid=" & typeid)%></td>
        </tr>
      </table></td>
 </tr>
</table>
<table style="width:100%"  border="0" cellpadding="3" cellspacing="1" class="border">
  <form name="form2" method="post" action="?action=add" onsubmit="return checkform2();">
  <tr class="tdbg">
       <td style="height:22" colspan="2" align="center" class="Title"><strong>添加<%=menuname & adsortname%>广告</strong></td>
    </tr>
  <tr class="tdbg">
    <td style="height:22" align="right">会员名:</td>
    <td><input name="userid" type="text" id="userid" maxlength="20" /></td>
  </tr>
    <tr class="tdbg">
      <td style="height:10"><div align="right">投放有效时间:</div></td>
      <td><select name="datatimed" id="datatimed">
        <option value="" selected="selected">请选择</option>
        <option value="7">一周</option>
        <option value="15">半个月</option>
        <option value="30">一个月</option>
        <option value="60">二个月</option>
        <option value="90">三个月</option>
        <option value="180">半年</option>
        <option value="365">一年</option>
        <option value="730">二年</option>
      </select></td>
    </tr>
    <tr class="tdbg">
      <td style="height:11"><div align="right">投放类别:</div></td>
      <td><input type="radio" name="L_tw" value="0" onclick="javascript:document.form2.keyword1.disabled=true" /> 
                              大类
                             <input name="L_tw" type="radio" onclick="javascript:document.form2.keyword1.disabled=false" value="1" checked="checked" /> 
      小类</td>
    </tr>
    <tr class="tdbg">
      <td style="height:11; width:27%"><div align="right">行业关键词：</div></td>
      <td>
            <select name="keyword" onchange="changeselect(this.value)">
              <option value="">--请选择行业大类--</option>
              <%=GetBigClassOptions()%>
            </select>
            <select name="keyword1" id="keyword"  maxlength="80">
              <option value="" selected="selected">--请选择行业子类--</option>
			  <%=GetSmallClassOptions("PSC_name")%>
        </select>
      <span class="style1">*</span> </td>
    </tr>
    <tr class="tdbg">
      <td style="height:22"><div align="right">上传图片:</div></td>
      <td><input name="pic" type="text" id="pic" size="25" />
      <input type="button" name="Submit2" value="上传图片" onclick="window.open('../Include/load.aspx?formname=form2&editname=pic&uppath=/Ad/Info/&filelx=jpg','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')" />
      (

 
      <a href="Admin_adv_keyword.aspx?menuid=3&typeid=2">行业词擎天柱广告宽度为215，banner</a>横幅广告长宽比为760:80)</td>
    </tr>
    <tr class="tdbg">
      <td style="height:22"><div align="right">图片链接地址:</div></td>
      <td><input name="weburl" type="text" id="weburl" value="http://" />
      *不要删除网址前的&quot;http://&quot;</td>
    </tr>
    <tr class="tdbg">
      <td style="height:22"><div align="right"></div></td>
      <td><input name="typeid" type="hidden" id="typeid" value="<%=typeid%>" />
	  <input name="menuid" type="hidden" id="menuid" value="<%=menuid%>" />
	  <input type="submit" name="Submit" value=" 添 加 " /></td>
    </tr>
  </form>
</table>
<br>
<table style="width:100%"  border="0" cellpadding="1" cellspacing="1" class="border">
  <tr>
    <td style="height:22" colspan="2" class="Title"><div align="center"><strong>调用举例</strong></div></td>
  </tr>
  <tr class="tdbg">
    <td><div align="right"><%=adsortname%> 大类调用：</div></td>
    <td><textarea name="code" cols="60" rows="3" onfocus="this.select()" onmouseover="this.focus()"><script type="Text/JavaScript" src="/ad/Adv_<%=IIf(typeid = 1, "banner", "keyword")%>.aspx?menuid=<%=menuid%>&keyword=&lt;%=BigClassName%&gt;"></script></textarea>
      </td>
  </tr>
  <tr class="tdbg">
    <td><div align="right"><%=adsortname%> 小类调用：</div></td>
    <td><textarea name="code" cols="60" rows="3" onfocus="this.select()" onmouseover="this.focus()"><script type="Text/JavaScript" src="/ad/Adv_<%=IIf(typeid = 1, "banner", "keyword")%>.aspx?menuid=<%=menuid%>&keyword=&lt;%=SmallClassName%&gt;"></script></textarea>
      </td>
  </tr>
  <tr>
    <td colspan="2"></td>
  </tr>
</table>
</body><%Page_Loaded()%>
</html>