<!--#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的新闻出来编辑
	strSQL="select * from web_popwin where m_id=" & WebUserID
	 
	 set rs=server.CreateObject ("ADODB.Recordset")
	 rs.open strSQL,conn,1,1
	 if rs.recordcount<=0 then
		'如果没有则先创建
	 	rs.close
	 	conn.execute "Insert Into web_popwin(m_id) Values(" & WebUserID & ")",0,1
		set rs=server.CreateObject("ADODB.RecordSet")
		rs.open strSQL,conn,1,1
	 end if

	 strTitle=trim(rs("pw_title"))
	 strContent=trim(rs("pw_content"))
	 strTop=trim(rs("pw_top"))
	 strLeft=trim(rs("pw_left"))
	 strWidth=trim(rs("pw_width"))
	 strHeight=trim(rs("pw_height"))
	 
	 rs.close
	 
	HtmlEditContent = strContent
	EditorHeight = "90%"
	 
%>
<script language="JavaScript" src="../../common/JS_CheckForm.js"></script>
<script language="JavaScript">

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

	//获取编辑器内容
	form.content.value=document.frames.editor.frames.edit1.textEdit.document.body.innerHTML;
		
	if(form.content.value.length<10){
		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="title" type="text" class=bginput id="title" value="<%=strTitle%>" size="30" maxlength="100">
        (必填) 
        </td>
    </tr>
    <tr bgcolor="#F9F9F9"> 
      <td height="30" align="right">窗口大小：</td>
      <td height="30"> 宽： 
        <input name="width" type="text" class=bginput id="expires23" value="<%=strWidth%>" size="5" maxlength="10">
        　高： 
        <input name="height" type="text" class=bginput id="expires222" value="<%=strHeight%>" size="5" maxlength="10">
        　左边距： 
        <input name="left" type="text" class=bginput id="expires24" value="<%=strLeft%>" size="5" maxlength="10">
        　顶边距： 
        <input name="top" type="text" class=bginput id="expires223" value="<%=strTop%>" size="5" maxlength="10">
        　</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>