<!--#include file="../common/conn.asp"-->
<%
'检查用户权限
call checkuser("广告管理")
%>
<html>
<head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<STYLE>
BODY {
	FONT-SIZE: 9pt
}
TABLE {
	FONT-SIZE: 9pt
}
TH {
	FONT-WEIGHT: 500; FONT-SIZE: 9pt
}
A:link {
	COLOR: #dd006f; TEXT-DECORATION: none
}
A:visited {
	TEXT-DECORATION: none
}
A:active {
	TEXT-DECORATION: none
}
A:hover {
	COLOR: #9933ff; TEXT-DECORATION: underline
}

</STYLE>
 <%

 	'取指定ID的新闻出来编辑
	if request.QueryString("id")<>"" then
		strSQL="select * From web_ad where id=" & Cint(request.QueryString("id"))
		 
		 set rs=server.CreateObject ("ADODB.Recordset")
		 rs.open strSQL,conn,1,1
	
		 strTitle=trim(rs("a_name"))
		 strContent=Server.HTMLEncode(trim(rs("a_content")))
		 
		 rs.close
	else
		 strTitle=""
		 strContent="在此填写广告内容"
	end if
	
	HtmlEditContent = strContent
	EditorHeight = "90%"
	 
%>
<script language="JavaScript" src="../../common/JS_CheckForm.js"></script>
<script language="JavaScript">

function CheckForm(form){
	if(form.txtTitle.value==""){
		alert("请填写标题！　")
		return false;
	}

	//获取编辑器内容
	form.content.value=document.frames.editor.frames.edit1.textEdit.document.body.innerHTML;
		
	if(form.content.value.length<5){
		alert("请填写内容！　")
		return false;
	}
	
}

</script>

<title>广告编辑</title></head>
<body bgcolor="#FFFFFF" topmargin="0" leftmargin="0">
<form action="save.asp" method="post" name="newform" target="BackFrame" id="newform" onSubmit="return CheckForm(this)">
  <table width="100%" height="100%" border="0" cellpadding="2" cellspacing="1" bgcolor="#336600">
    <tr> 
      <td height="26" colspan="2" bgcolor="#669900"> <font color="#FFFFFF"><strong>::广告编辑</strong></font></td>
    </tr>
    <tr bgcolor="#eeeeee"> 
      <td width="16%" height="30" align="right">广告标题：</td>
      <td width="84%" height="30"> <input name="txtTitle" type="text" class=bginput id="txtTitle" value="<%=strTitle%>" size="30" maxlength="100">
        (必填) 
        <input name="id" type="hidden" id="id" value="<%=request.QueryString("id")%>"></td>
    </tr>
    <tr align="center" bgcolor="#D4D0C8"> 
      <td height="100%" colspan="2" valign="middle"> <table width="100%" height="100%" border=1 cellpadding="0" cellspacing="0"  bordercolor=gray >
          <tr> 
            <td align=center> <textarea name="content" style="display:none"><%=HtmlEditContent%></textarea><input type="hidden" name="content1">
                    <iframe ID="eWebEditor1" src="../editor/ewebeditor.asp?id=content&style=standard" frameborder="0" scrolling="no" width="100%" HEIGHT="100%">
                    </iframe> </td>
          </tr>
        </table></td>
    </tr>
    <tr align="center" bgcolor="#eeeeee"> 
      <td height="40" colspan="2"> <table width="100%" border="0" cellspacing="0" cellpadding="5">
          <tr> 
            <td align="center"> <input name="submit" type=submit class=button value="　保　存　" >
              　 
              <input name="YL" type=reset class=button value="　取　消　"></td>
          </tr>
        </table></td>
    </tr>
  </table>
</form>
<iframe name="BackFrame" width="0" height="0" src="about:blank"></iframe>
</body>
</html>