<%if Session("weight")<>5 then 
Response.Redirect "error.asp?cause=4"
 end if
%>
<LINK 
href="css/default.css" rel=stylesheet>
<object runat=server id=conn1 progid="adodb.connection"></object>
<%application.Lock
conn1.Open Application("p_jyzx")
Application.UnLock
%><SCRIPT language=JavaScript>
function checkform()
{
	
	//if(form1.public_note.value.length<1){
	//	alert("对不起留言不能为空！");
		
	//	return false;
	//}
	
	return true;
}
</SCRIPT>
<HR width="100%" SIZE=1>
<table cellSpacing="0" cellPadding="0" width="100%" align="center" border="0">
  <tbody>
  
  <tr>
    <td>
    <FORM action="add_public_note.asp" method=POST id=form1 name=form1 onsubmit="checkform()">
    <table border="0" cellspacing="0" height="45">
          <INPUT type="hidden" id=text1 name=object value=2>
          <tr>
            <td height="25"  align=center><b><font color=#FF9933 size=4>站长公告:(在首页公告)</font></b><BR><BR>每发一次公告将覆盖原有公告（支持HTML输入）</td>
           </tr>
         
          <tr>
          <td valign="top"><BR>选择操作：
          <SELECT id=select1 name=select1   class=input2 >

         <OPTION value=1 selected>不向每个用户发站内信</OPTION>
		<OPTION value=2>同时向每个用户发站内信</OPTION>
		</SELECT></td>
            </tr>
          <tr>
          <td valign="top"><BR>
            <textarea   class=input2 rows="8" name="public_note" cols="44" wrap="physical"></textarea></td>
          </tr>
         
        <tr>
            <td height="30"  valign="middle">
              <p align=center><input   class=input2 type="submit" value="提交" name="B1">&nbsp;&nbsp;<input   class=input2 type="reset" value="重写" name="B2"></td>
        </tr>
        </table>
   </FORM> 
    </td>
 <%set rs=server.CreateObject ("ADODB.recordset")
    
   sql="select * from public_note where object=2 order by time desc"
   rs.Open sql,conn1,3
  if rs.RecordCount<>0 then
	
	public_note=rs("public_note")
	
	
  end if
 %>   
    <td>
		<table cellSpacing="0" cellPadding="0" border="0" width="170" style="BORDER-BOTTOM: #FFCF5B 1px solid; BORDER-LEFT: #FFCF5B 1px solid; BORDER-RIGHT: #FFCF5B 1px solid; BORDER-TOP: #FFCF5B 1px solid;">
		   <tbody  bgcolor=#FFF8E1>
           <tr> <td align="middle" height="20px" width="100%"  height="18" bgcolor=#FFCC33><font color="#000000">..::: 站长公告 :::..</font></td></tr><tr>
                 
                    <td></td>
                </tr>
                    <tr onmouseover="this.style.backgroundColor='#F0F0F0';" onmouseout="this.style.backgroundColor='';" height="18">
                      <td align="middle" bgcolor="#ffffff">
                       <marquee direction="up" onmouseover="this.stop()" onmouseout="this.start()" scrollAmount="1" style="HEIGHT: 120px; WIDTH: 155px">   
                       <p >
							<font size=2><%=public_note%>
                      </font> </p> </marquee>     
                              
                              </td></tr> 
                    
	</table>
         
   </td>
   </tr></tbody></table>