<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="gb2312" Inherits="b2bNet.Admin_Admin_adv_add" %>
<%On Error Resume Next%>
<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" />
<title><%=AppConst.SiteName%></title>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.style1 {color: #FF0000}
.lh15 {LINE-HEIGHT: 150%
}
-->
</style>
<script type="Text/JavaScript" language="javascript">
function check(){
	if(document.form.file.value==""){
		alert("选点击浏览选择您要上传的图片！");
	}else{
		document.form.Submit.disabled=true;
		form.submit();
	}
}
function del(strurl){
	if(confirm('确定要删除这条记录吗？')){
	window.location=URL;
	}
}
			//大类与子栏目相关联
function changeselect(locationid)
{
	document.form.J_sortid.length = 0;
	document.form.J_sortid.options[0] = new Option('--请选择行业子类--',"");
	for (i=0; i<selectclass.length; i++){
		if (selectclass[i][0] == locationid){
		document.form.J_sortid.options[document.form.J_sortid.length] = new Option(selectclass[i][1],selectclass[i][2]);
		//document.form.A_jifen.value=selectclass[i][3]
		}
	}
}
function changeselect1(){
	var jifen=document.form.J_sortid.value
	var jifenayy=jifen.split(",")
	document.form.sortid.value=jifenayy[0];
	document.form.A_jifen.value=jifenayy[1];
	document.form.A_rebate.value=jifenayy[2];
}
function tank(){
	if (document.form.typeid.value==""){
		alert("栏目名称不能为空");
		document.form.typeid.focus();
		return false;
	}
	if (document.form.sortid.value==""){
		alert("广告名称不能为空");
		document.form.sortid.focus();
		return false;
	}
	if (document.form.A_jifen.value==""){
		alert("所需积分不能为空");
		document.form.A_jifen.focus();
		return false;
	}
	
	if (document.form.A_userid.value==""){
		alert("会员名不能为空");
		document.form.A_userid.focus();
		return false;
	}
	if (document.form.A_endtime.value==""){
		alert("到期时间不能为空");
		document.form.A_endtime.focus();
		return false;
	}
}
</script>
<script type="Text/JavaScript" src="inc/getdate.js"></script>
</head>

<body>
<table style="background-color:#A6D7FF; width:100%" border="0" cellpadding="0" cellspacing="1">
      <tr>
        <td style="height:24" class="topbg"><div align="center"><strong>==投放新广告==</strong></div></td>
      </tr>
</table>
      <table style="width:100%"  border="0" align="center" cellpadding="1" cellspacing="1" class="border">
        <tr class="Title">
          <td style="height:27; width:70" align="center"><strong>管理功能：</strong></td>
          <td> | <a href="Admin_Adv_site.aspx"><font color="#ffffff">广告位查看</font></a> | <a href="Admin_adv_siteadd.aspx"><font color="#ffffff">添加广告位</font> </a> | <a href="Admin_adv_config.aspx"><font color="#ffffff">行业关键词广告设置</font></a> | <a href="Admin_adv_add.aspx"><font color="#ffffff">投放新广告</font></a> | <a href="Member_jifeng.aspx"><font color="#ffffff">充积分点</font></a> | <a href="Member_sendadv.aspx"><font color="#ffffff">广告提交管理</font></a></td>
        </tr>
      </table>
      <br>
      <table style="width:100%"  border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td style="height:27; width:30" align="center"><img src="images/12.gif" width="6" height="10" /></td>
          <td>您现在的位置：<%=AppConst.SiteName%> > 广告服务 > 投放新广告</td>
        </tr>
      </table>      <br>      <table style="width:100%"  border="0" cellpadding="3" cellspacing="1" class="border">
        <form name="form" method="post" action="?action=add" onsubmit="return tank()">
        <tr>
          <td style="height:12" colspan="2" class="Title"><div align="center"><strong>==投放新广告==</strong></div></td>
          </tr>
        <tr class="tdbg">
          <td style="height:13; width:21%"><div align="right">栏目名称：</div></td>
          <td style="height:13; width:79%"><span class="lh15">
                  <select name="typeid" onchange="changeselect(this.value)">
                    <option value="">--请选择广告大类--</option>
                    <%=GetAdTypeOptions()%>
                  </select>
                  <script type="Text/JavaScript" lanuage="javascript">
                    var selectclass= new Array();
                    <%=GetAdClassArray("selectclass")%>
                  </script>
                  <select name="J_sortid"  maxlength="80" onchange="changeselect1()">
                    <option value="" selected="selected">--请选择广告子类--</option>
                  </select>
                </span></td>
        </tr>
        <tr style="background-color:#F4FCFF" class="tdbg">
          <td style="height:26"><div align="right">所需积分：</div></td>
          <td style="height:26"><input name="A_jifen" type="text" id="A_jifen" size="10" readonly="readonly" />
            <input name="sortid" type="hidden" id="sortid" /></td>
          </tr>
        <tr class="tdbg">
          <td style="height:26"><div align="right">折扣：</div></td>
          <td style="height:26"><input name="A_rebate" type="text" id="A_rebate" size="5" readonly="readonly" />            </td>
          </tr>
        <tr style="background-color:#F4FCFF" class="tdbg">
          <td style="height:26"><div align="right">会员名：</div></td>
          <td style="height:26"><input name="A_userid" type="text" id="A_userid" /></td>
          </tr>
        <tr class="tdbg">
          <td style="height:26"><div align="right">投放时间：</div></td>
          <td style="height:26"><input name="A_starttime" type="text" id="A_starttime" value="<%=Date.Today%>" /></td>
          </tr>
        <tr style="background-color:#F4FCFF" class="tdbg">
          <td style="height:26"><div align="right">到期时间：</div></td>
          <td style="height:26"><input name="A_endtime" type="text" id="A_endtime" onfocus="setday(this)" /></td>
        </tr>
        <tr class="tdbg">
          <td style="height:26"><div align="right">网站名称：</div></td>
          <td style="height:26"><input name="A_webname" type="text" id="A_webname" maxlength="40" />
            如：思若科技</td>
        </tr>
        <tr style="background-color:#F4FCFF" class="tdbg">
          <td style="height:26"><div align="right">图片：</div></td>
          <td style="height:26"><input name="A_pic" type="text" id="A_pic" size="30" />
                    <input type="button" name="Submit2" value="上传广告图片" onclick="window.open('../Include/load.aspx?formname=form&editname=A_pic&uppath=/Ad/Systemad/&filelx=all','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')" /></td>
        </tr>
        <tr class="tdbg">
          <td style="height:26"><div align="right">网址：</div></td>
          <td style="height:26"><input name="A_website" type="text" id="A_website" value="Http://" size="30" />
            &nbsp;</td>
        </tr>
        <tr style="background-color:#F4FCFF" class="tdbg">
          <td style="height:12"><div align="right">说明：</div></td>
          <td style="height:12"><input name="A_explain" type="text" id="A_explain" size="30" maxlength="50" /></td>
        </tr>
        <tr style="background-color:#F4FCFF" class="tdbg">
          <td style="height:13"><div align="right">审核通过：</div></td>
          <td style="height:13"><label>
            <input name="A_unit" type="checkbox" id="A_unit" value="1" checked="checked" />
          直接通过审核</label></td>
        </tr>
        <tr class="tdbg">
          <td style="height:26">&nbsp;</td>
          <td style="height:26"><input type="submit" name="Submit" value="提交" />
            <input type="reset" name="Submit" value="重置" /></td>
        </tr>
        </form>
      </table>
</body>
<%Page_Loaded()%>
</html>
