<!--#include file="conn.asp"-->
<!--#include file="check.asp"-->
<!--#include file="../inc/setup.asp"-->
<!--#include file="../inc/sql.asp"-->
<%
	end if
	useflag=4
%>
<!--#include file="flag.asp"-->
<%
	if Trim(Request.QueryString("action"))="edit" then
		id=int(Trim(Request.QueryString("id")))
		set rs=server.CreateObject("adodb.recordset")
		rs.open "select * from [notice] where id="&id&"",conn,1,3
		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
%>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<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>
<style type="text/css">
<!--
body {
	background-color: #FFFFFF;
}
-->
</style>
</head>
<body topmargin="80">
<%
	set rs=createobject("adodb.recordset")
	sql12="select * from notice where id="&request("id")
	rs.open sql12,Conn
	if not rs.eof then
		title=rs("puser")
		word=rs("content")
		ttype=rs("ttype")
	end if
	rs.close
%>
<table cellspacing=1 cellpadding=4 border="1" bordercolor="#0099CC" align="center">
  <tr>
    <td class=td colspan=2>更新文字广告</td>
  </tr>
  <form name=add_frm action='?action=edit&id=<%=request("id")%>' method=post>
    <tr>
      <td>更新标题：</td>
      <td><input type=text name=title size=65 maxlength=50 value="<%=title%>"></td>
    </tr>
    <tr>
      <td>公告类型：</td>
      <td><label>
        <select name="ttype">
          <option value="0" <% If ttype=0 Then Response.Write("selected")%>>网站顶部公告</option>
          <option value="1" <% If ttype=1 Then Response.Write("selected")%>>个人会员中心</option>
          <option value="2" <% If ttype=2 Then Response.Write("selected")%>>企业会员中心</option>
          <option value="3" <% If ttype=3 Then Response.Write("selected")%>>院校会员中心</option>
          <option value="4" <% If ttype=4 Then Response.Write("selected")%>>培训会员中心</option>
        </select>
      </label></td>
    </tr>
    <tr>
      <td>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><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>更新内容：</td>
      <td><table border=0>
        <tr>
          <td><textarea name=word rows=6 cols=65><%=word%></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"><input name="submit" type=submit value='提交添加'>
        　　
        <input name="reset" type=reset value='重新填写'>
        　　
        <input type=button name=go_back value='返回上一页' onClick="javascript:history.back(1);"></td>
    </tr>
  </form>
</table>
</body>
</html>