<%@ Page Language="VB" ContentType="text/html" ResponseEncoding="gb2312" Inherits="b2bNet.Admin_Admin_adv_edit" %>
<%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.sortid.length = 0;
	document.form.sortid.options[0] = new Option('--请选择行业子类--',"");
	for (i=0; i<selectclass.length; i++)
	{
		if (selectclass[i][0] == locationid)
		{document.form.sortid.options[document.form.sortid.length] = new Option(selectclass[i][1], selectclass[i][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="width:100%"  border="0" cellspacing="1" cellpadding="0">
  <tr>
    <td style="height:133" valign="top"><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" cellpadding="3" cellspacing="1">
        <tr style="background-color:#F4FCFF">
          <td style="height:26" colspan="3"><img src="../images/icon_point.gif" width="18" height="19" /> 首页广告服务添加：</td>
        </tr><form name="form" method="post" action="?action=add" onsubmit="return tank()">
        <tr style="background-color:#F6F6F6">
          <td style="height:26; width:21%">
            <div align="right">栏目名称：</div></td>
          <td style="height:26" colspan="2"><span class="lh15">
                  <select name="typeid" onchange="changeselect(this.value)">
                    <option value="">--请选择行业大类--</option>
                    <%=GetAdTypeOptions()%>
                  </select>
                  <select name="sortid"></select>
                </span></td>
                <script type="text/javascript">
                    var selectclass= new Array();
                    <%=GetAdClassArray("selectclass")%>

                    document.all.typeid.value='<%=eRs("A_typeid").value%>';
                    changeselect(document.all.typeid.value);
                    document.all.sortid.value="<%=eRs("A_sortid").value%>";
                </script>
          </tr>
        <tr style="background-color:#F4FCFF">
          <td style="height:26"><div align="right">所需积分：</div></td>
          <td style="height:26" colspan="2"><input name="A_jifen" type="text" id="A_jifen" value="<%=ers("A_jifen").Value%>" size="10" /></td>
          </tr>
        <tr style="background-color:#F6F6F6">
          <td style="height:26"><div align="right">折扣：</div></td>
          <td style="height:26" colspan="2"><input name="A_rebate" type="text" id="A_rebate" value="<%=ers("A_rebate").Value%>" size="5" /></td>
          </tr>
        <tr style="background-color:#F4FCFF">
          <td style="height:26"><div align="right">会员名：</div></td>
          <td style="height:26" colspan="2"><input name="A_userid" type="text" id="A_userid" value="<%=ers("A_userid").Value%>" /></td>
          </tr>
        <tr style="background-color:#F6F6F6">
          <td style="height:26"><div align="right">投放时间：</div></td>
          <td style="height:26" colspan="2"><input name="A_starttime" type="text" id="A_starttime" onfocus="setday(this)" value="<%=String.Format("{0:yyyy-M-d}", ers("A_starttime").Value)%>" /></td>
          </tr>
        <tr style="background-color:#F4FCFF">
          <td style="height:26"><div align="right">到期时间：</div></td>
          <td style="height:26" colspan="2"><input name="A_endtime" type="text" id="A_endtime" onfocus="setday(this)" value="<%=String.Format("{0:yyyy-M-d}", ers("A_endtime").Value)%>" /></td>
        </tr>
        <tr style="background-color:#F6F6F6">
          <td style="height:26"><div align="right">网站名称：</div></td>
          <td style="height:26" colspan="2"><input name="A_webname" type="text" id="A_webname" value="<%=ers("A_webname").Value%>" maxlength="40" /></td>
        </tr>
        <tr style="background-color:#F6F6F6">
          <td style="height:26"><div align="right">图片：</div></td>
          <td style="height:26; width:33%"><input name="A_pic" type="text" id="A_pic" value="<%=ers("A_pic").Value%>" size="30" />
                    <input type="button" name="Submit2" value="上传图片" onclick="window.open('../Include/load.aspx?formname=form&editname=A_pic&uppath=/Ad/Systemad/&imagename=Img_name&filelx=all','','status=no,scrollbars=no,top=20,left=110,width=420,height=165')" /></td>
          <td style="width:46%"><a href="../Ad/Systemad/<%=ers("A_pic").Value%>" target="_blank"><img src="../Ad/Systemad/<%=ers("A_pic").Value%>" name="Img_name" width="50" height="25" border="0" onmouseover="this.width=150;this.height=50;" onmouseout="this.width=50;this.height=25;" /></a></td>
        </tr>
        <tr style="background-color:#F4FCFF">
          <td style="height:26"><div align="right">网址：</div></td>
          <td style="height:26" colspan="2"><input name="A_website" type="text" id="A_website" value="<%=ers("A_website").Value%>" size="30" />
&nbsp;</td>
        </tr>
        <tr style="background-color:#F6F6F6">
          <td style="height:12"><div align="right">说明：</div></td>
          <td style="height:12" colspan="2"><input name="A_explain" type="text" id="A_explain" value="<%=ers("A_explain").Value%>" size="30" maxlength="50" /></td>
        </tr>
        <tr style="background-color:#F6F6F6">
          <td style="height:13"><div align="right">通过审核：</div></td>
          <td style="height:13" colspan="2"><input name="A_unit" type="checkbox" id="A_unit" value="1"<%If (ers("A_unit").Value=1) Then%>checked<%End If%> />
直接通过审核</td>
        </tr>
        <tr style="background-color:#F6F6F6">
          <td style="height:12">&nbsp;</td>
          <td style="height:12" colspan="2"><input name="unit" type="hidden" value="<%=Request("unit")%>" />
		  <input type="submit" name="Submit" value="修改" />
            <input type="reset" name="Submit" value="重置" />
            <input name="id" type="hidden" value="<%=ers("id").Value%>" /></td>
        </tr>
         </form>
      </table>
      <table style="width:95%"  border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td style="height:40">&nbsp;</td>
        </tr>
    </table></td>
  </tr>
</table>
</body>
<%Page_Loaded()%>
</html>
