<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file = "tuzh_pri.asp"-->
<!--#include file ="../connadmin.asp"-->
<%if request.QueryString("action")="modi" and trim(request.QueryString("id"))<>"" then
	dim modi
	modi="y"
		set rsok=server.createobject("adodb.recordset")
		sqlok="select * from com where id="&cint(trim(request.QueryString("id")))
		rsok.open sqlok,conn,1,1
		doid=rsok("id")
		title= rsok("title")
		content= rsok("content")
		kind_id= rsok("yiid")
		rsok.close
		set rsok=nothing
end if%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link rel="stylesheet" type="text/css" href="../img/css.css">
<title></title>
<title>无标题文档</title>
<SCRIPT language=JavaScript>
function checklogin() {
	if (document.form1.kind.value=="") {
		alert("请选择类别!");
		form1.kind.focus();
		return false;
	}
	if (document.form1.txttitle.value=="") {
		alert("请输入标题!");
		form1.txttitle.focus();
		return false;
	}
	return true;
}
</SCRIPT>
<script type="text/javascript" src="fckeditor/fckeditor.js" ></script>
<style type=text/css>
body  {
SCROLLBAR-FACE-COLOR: #9CC5D7;
SCROLLBAR-HIGHLIGHT-COLOR: #ffffff; 
SCROLLBAR-SHADOW-COLOR: #006699; 
SCROLLBAR-3DLIGHT-COLOR: #006699; 
SCROLLBAR-ARROW-COLOR: #330000; 
SCROLLBAR-TRACK-COLOR: #E2F3F1; 
SCROLLBAR-DARKSHADOW-COLOR: #ffffff;}
</style>

</head>
<%
set rs=server.createobject("adodb.recordset")
sql="select * from com_kind"
rs.open sql,conn,1,1
dim lm1
lm1=""
do while not rs.eof
		if modi="y" and kind_id=rs("yiid") then
			lm1=lm1&"<option value='" &  rs("yiid") &  "' selected>" & rs("yiname")&"</option>"
		else
			lm1=lm1&"<option value='" &  rs("yiid") &  "'>" & rs("yiname")&"</option>"
		end if
rs.movenext
loop
rs.close%>
<body class="body_back">
<form name="form1" method="post"  onSubmit="return checklogin()" action="com_newsdo.asp?yiid=<%=trim(request.QueryString("yiid"))%>">
  <table class="border" width="95%" border="0" align="center" cellpadding="1" cellspacing="0">
    <tr> 
      <td height="49" align="center" valign="top" class="bg_low"> <table width="100%" height="25" border="0" cellpadding="0" cellspacing="0">
          <tr> 
            <td align="center" valign="middle" class="bgtop"><font class="bgtop_title">发布/修改固定信息</font> 
            </td>
          </tr>
        </table>
        <table width="100%" border="1" cellpadding="1" cellspacing="0" bordercolor="#ABCEDD">
          <tr> 
            <td width="100" align="right">公司信息大类 <font class="xing">*</font></td>
            <td valign="top"> <table border="0" cellpadding="0" cellspacing="0" style="border-collapse: collapse" bordercolor="#111111" id="AutoNumber1">
                <tr> 
                  <td align="center" height="20"> <select size="1" name="kind">
                      <option value="" selected>请选择类别</option>
                      <%=lm1%> </select> &nbsp; </td>
                </tr>
              </table></td>
          </tr>
          <tr> 
            <td width="100" align="right">标题 <font class="xing">*</font></td>
            <td><input name="txttitle" type="text" id="txttitle2" size="50" maxlength="60" value="<%if modi="y" then response.Write(title) end if%>"></td>
          </tr>
          <tr> 
            <td width="100" align="right" valign="top">内容 <font class="xing">*</font></td>
            <td><textarea name="content" id="content"  ><%if modi="y" then response.Write(content) end if%>
            </textarea>
			<script type="text/javascript">
<!--
function showFCK(){
  var FCKeditor1 = new FCKeditor('content', '100%', '460', 'Default', '') ;

  FCKeditor1.ReplaceTextarea() ;
}
showFCK();


//-->
</script>
            </td>
          </tr>
          <tr> 
            <td width="100" align="right"></td>
            <td></td>
          </tr>
          <tr> 
            <td width="100" align="right">&nbsp;</td>
            <td><input type="hidden" name="action" value="<%if modi="y" then response.Write("modi") else response.Write("addnews") end if %>"> <table width="332" border="0" cellspacing="0" cellpadding="0">
                <tr> 
                  <td><input type="hidden" name="hiddenid"  value="<%if modi="y" then response.Write(doid) end if %>"></td>
                  <td>&nbsp;</td>
                </tr>
                <tr> 
                  <td width="100">&nbsp;</td>
                  <td width="232"><input type="submit" name="Submit" value="  提 交  "> 
                    <input type="reset" name="Submit2" value=" 重  置 "></td>
                </tr>
              </table>
              <br> </td>
          </tr>
        </table></td>
    </tr>
  </table>
  </form>
<%conn.close
set conn=nothing%>
</body>
</html>
