<!--#include file="conn.asp"-->
<!--#include file="check.asp"-->
<!--#include file="../inc/setup.asp"-->
<!--#include file="../inc/sql.asp"-->
<%
	end if
	useflag=1
%>
<!--#include file="flag.asp"-->
<%
	if Trim(Request.QueryString("action"))="add" then
		set rs=server.CreateObject("adodb.recordset")
		rs.open "select * from [notice]",conn,1,3
		rs.addnew
		rs("puser")=trim(request("title"))
		rs("content")=trim(request("word"))
		rs("ttype")=trim(request("ttype"))
		rs("putime")=date()
		rs.update
		rs.close
		set rs=nothing
		response.write"<script language=JavaScript>alert('您的操作已完成，现在为您返回');"    
		response.write"this.location.href='notice_all.asp';</script>"
		response.End
	end if
%>
<link href='Include/Admin_Style.CSS' rel='stylesheet' type='text/css'>
<script language=javascript src='images/ubb/admin.js'></script>
<script language=javascript src='images/ubb/ubb_help.js'></script>
<title>网站公告管理</title>
<table width="100%" border="0" cellpadding="0" cellspacing="0" bgcolor="#E7EFFF" class="sortbutton">
<tr>    
<td height="23" align="center" valign="middle" bgcolor="#E7EFFF">增加网站公告</td>
</tr>
<tr>    
<td height="250" align="center" valign="middle" bgcolor="#FFFFFF">
<table width="100%" border="0" align="center" cellpadding=4 cellspacing=1 bgcolor="#E7EFFF">
  <form name=add_frm action='?action=add' method=post>
    <tr>
      <td bgcolor="#E7EFFF">更新标题：</td>
      <td bgcolor="#FFFFFF"><input type=text name=title size=65 maxlength=50></td>
    </tr>
    <tr>
      <td bgcolor="#E7EFFF">公告类型：</td>
      <td bgcolor="#FFFFFF"><label>
        <select name="ttype">
          <option value="0">网站顶部公告</option>
          <option value="1">个人会员中心</option>
          <option value="2">企业会员中心</option>
          <option value="3">院校会员中心</option>
          <option value="4">培训会员中心</option>
        </select>
      </label></td>
    </tr>
    <tr>
      <td bgcolor="#E7EFFF">UBB辅助：<br>
          <input onClick="javascript:jk_ubb_mode('2');" type=radio checked value=2 name=mode >
        提示插入<br>
        <input onClick="javascript:jk_ubb_mode('0');" type=radio value=0 name=mode >
        直接插入<br>
        <input onClick="javascript:jk_ubb_mode('1');" type=radio value=1 name=mode >
        帮助信息</td>
      <td bgcolor="#FFFFFF"><script language=javascript>
<!--
function AddText(NewCode)
{
  if(document.all)
  { insertAtCaret(document.add_frm.word, NewCode); setfocus(); } 
  else
  { document.add_frm.word.value += NewCode; setfocus(); }
}

function storeCaret (textEl)
{ if(textEl.createTextRange){ textEl.caretPos = document.selection.createRange().duplicate();} }

function insertAtCaret (textEl, text)
{
  if (textEl.createTextRange && textEl.caretPos)
  {
    var caretPos = textEl.caretPos;
    caretPos.text += caretPos.text.charAt(caretPos.text.length - 2) == ' ' ? text + ' ' : text;
  }
  else if(textEl)
  { textEl.value += text; }
  else
  { textEl.value = text; }
}

function jk_ubb_dz(dz)
{
   //if (advmode)
   AddTxt=""+dz+""; AddText(AddTxt); 
 }

function setfocus() { document.add_frm.word.focus(); }
-->
</script>
          <table border=0 cellspacing=0 cellpadding=0>
            <tr>
              <td height=30>&nbsp;&nbsp;
                  <select onChange="javascript:jk_ubb_font(this.options[this.selectedIndex].value);" size=1 name=font>
                    <option value=宋体>宋体</option>
                    <option value=黑体>黑体</option>
                    <option value=arial>arial</option>
                    <option value="Book antiqua">Book antiqua</option>
                    <option value="Century Gothic">Century Gothic</option>
                    <option value="Courier New" selected>Courier New</option>
                    <option value=Georgia>Georgia</option>
                    <option value=Impact>Impact</option>
                    <option value=Tahoma>Tahoma</option>
                    <option value="Times New Roman">Times New Roman</option>
                    <option value=Verdana>Verdana</option>
                </select></td>
              <td>&nbsp;&nbsp;
                  <select onChange="javascript:jk_ubb_size(this.options[this.selectedIndex].value);" size=1 name=size>
                    <option value=-2>-2</option>
                    <option value=-1>-1</option>
                    <option value=1>1</option>
                    <option value=2>2</option>
                    <option value=3 selected>3</option>
                    <option value=4>4</option>
                    <option value=5>5</option>
                    <option value=6>6</option>
                    <option value=7>7</option>
                </select></td>
              <td>&nbsp;&nbsp;
                  <select onChange="javascript:jk_ubb_color(this.options[this.selectedIndex].value);" size=1 name=color>
                    <option style="COLOR: white" value=White>White</option>
                    <option style="COLOR: black" value=Black selected>Black</option>
                    <option style="COLOR: red" value=Red>Red</option>
                    <option style="COLOR: yellow" value=Yellow>Yellow</option>
                    <option style="COLOR: pink" value=Pink>Pink</option>
                    <option style="COLOR: green" value=Green>Green</option>
                    <option style="COLOR: orange" value=Orange>Orange</option>
                    <option style="COLOR: purple" value=Purple>Purple</option>
                    <option style="COLOR: blue" value=Blue>Blue</option>
                    <option style="COLOR: beige" value=Beige>Beige</option>
                    <option style="COLOR: brown" value=Brown>Brown</option>
                    <option style="COLOR: teal" value=Teal>Teal</option>
                    <option style="COLOR: navy" value=Navy>Navy</option>
                    <option style="COLOR: maroon" value=Maroon>Maroon</option>
                    <option style="COLOR: limegreen" value=LimeGreen>LimeGreen</option>
                </select></td>
            </tr>
          </table>
        <table border=0 cellspacing=0 cellpadding=0>
            <tr>
              <td height=30>&nbsp;&nbsp;<a href="javascript:jk_ubb_bold();"><img alt='插入粗体文本' src='images/ubb/bold.gif' border=0></a>&nbsp; <a href="javascript:jk_ubb_italicize();"><img alt='插入斜体文本' src='images/ubb/italicize.gif' border=0></a>&nbsp; <a href="javascript:jk_ubb_underline();"><img alt='插入下划线' src='images/ubb/underline.gif' border=0></a>&nbsp; <a href="javascript:jk_ubb_center();"><img alt='居中对齐' src='images/ubb/center.gif' border=0></a>&nbsp; <a href="javascript:jk_ubb_link();"><img alt='插入超级链接' src='images/ubb/url.gif' border=0></a>&nbsp; <a href="javascript:jk_ubb_email();"><img alt='插入邮件地址' src='images/ubb/email.gif' border=0></a>&nbsp;</td>
            </tr>
        </table></td>
    </tr>
    <tr>
      <td valign=top bgcolor="#E7EFFF">更新内容：</td>
      <td bgcolor="#FFFFFF">
	  <table border=0>
        <tr>
          <td><textarea name=word rows=6 cols=65></textarea></td>
          <td width=5></td>
          <td valign=bottom><p> <a href="javascript:textarea_resize('word','-');"><img src='images/ubb/resize_minus.gif' border=0></a> <br>
                <a href='javascript:;' onClick="javascript:textarea_resize('word','+');"><img src='images/ubb/resize_plus.gif' border=0></a></p></td>
        </tr>
      </table>
	  </td>
    </tr>
    <tr>
      <td height=30 colspan=3 align="center" bgcolor="#E7EFFF"><input name="submit" type=submit value='提交添加'>
        　　
        <input name="reset" type=reset value='重新填写'>
        </td>
    </tr>
  </form>
</table>
</td>
</tr>
</table>
