<%lm1=int(Request("lm1"))
userPageRights="{"&lm1&"}"
%>
<!--#include file="check.asp"-->
<!--#include file="../Include/const.asp" -->
<%

titlecolor=trim(request("titlecolor"))
if request("id")<>"" then
  id=request("id")
  sql = "select * from tb_news where id="&id
  Set rs = Server.CreateObject("ADODB.RecordSet")
  rs.Open sql,conn,1,1
  title=rs("title")
  tj=trim(rs("tj"))
  
  lm1=int(rs("lm"))
  lm2=int(rs("lm2"))
  fo=trim(rs("fo"))
  ft=int(rs("ft"))
  fs=int(rs("fs"))
  pic=rs("pic") 
  zz=rs("author")
  html=rs("html")
 
  titlePic=rs("titlePic")
  content=rs("content")
  if content="" then content="无信息内容"
  url=rs("url")
  titlecolor=rs("titlecolor")
  fontsize=rs("fontsize")
  xgnews=rs("xgnews")
  times=rs("time")
  ontop=rs("ontop")
  rs.close
  set rs=nothing
else
  lm1=request("lm1")
  if lm1<>"" then
  lm1=int(lm1)
  end if
					
  lm2=request("lm2")
  if lm2<>"" then
  lm2=int(lm2)
  end if
					
  titlecolor="#00007f"
  fontsize="3"
  fo="宋体"
  ft="0"
  fs="0"
  zz="不详"
  times=now()
  kind=trim(request("types"))
  html=trim(request("html"))
end if
Session("lm")=lm2
if lmid="" then lmid=00
y=Year(times)
m=Month(times)
d=day(times)
h=Hour(times)
f=Minute(times)
s=Second(times)
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="Images/Style.css" rel="stylesheet" type="text/css">
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.STYLE4 {color: #FF0000; font-weight: bold; }
-->
</style>
<script language="javascript">
<!--
function insertPic(obj){
	var file = showModalDialog("../include/filesr.asp?lm=<%=lm2%>-&path="+obj.name+"/",null,"dialogHeight:600px;dialogWidth:730px;scroll:yes;help:no;status:no;")
		if(typeof(file) != "undefined"){
		obj.value = file;
	}
}
-->
</script>
</head>
<body>
<table class=tableBorder width="100%" border=0 align="center" cellpadding=5 cellspacing=1>
  <tbody>
    <tr align="left">
      <th height=21 sytle="line-height:150%">【添加信息】</th>
    </tr>
    <tr>
      <td  class=forumRow><form name="form" method="post" action="news_add_save.asp<%if id<>"" then response.write "?edit=1&id="&id%>">
        <table width="100%"  border="0" align="center" cellpadding="0" cellspacing="0">
          <tr>
            <td height="30">信息标题：
              <input name="title" type="text" id="title" value="<%= title%>" size="45" maxlength="100"> <select size="1" name="titlecolor">
	            <option value="#00007f">颜色</option>
	            <OPTION <%if titlecolor="#00007f" then response.write "selected"%> value="#00007f" style="background-color:#00007f"></OPTION>
                <OPTION <%if titlecolor="#008000" then response.write "selected"%> value="#008000" style="background-color:#008000"></OPTION>
                <OPTION <%if titlecolor="#800000" then response.write "selected"%> value="#800000" style="background-color:#800000"></OPTION>
                <OPTION <%if titlecolor="#808000" then response.write "selected"%> value="#808000" style="background-color:#808000"></OPTION>
                <OPTION <%if titlecolor="#000080" then response.write "selected"%> value="#000080" style="background-color:#000080"></OPTION>
                <OPTION <%if titlecolor="#800080" then response.write "selected"%> value="#800080" style="background-color:#800080"></OPTION>
                <OPTION <%if titlecolor="#808080" then response.write "selected"%> value="#808080" style="background-color:#808080"></OPTION>
                <OPTION <%if titlecolor="#FFFF00" then response.write "selected"%> value="#FFFF00" style="background-color:#FFFF00"></OPTION>
                <OPTION <%if titlecolor="#00FF00" then response.write "selected"%> value="#00FF00" style="background-color:#00FF00"></OPTION>
                <OPTION <%if titlecolor="#00FFFF" then response.write "selected"%> value="#00FFFF" style="background-color:#00FFFF"></OPTION>
                <OPTION <%if titlecolor="#FF00FF" then response.write "selected"%> value="#FF00FF" style="background-color:#FF00FF"></OPTION>
                <OPTION <%if titlecolor="#FF0000" then response.write "selected"%> value="#FF0000" style="background-color:#FF0000"></OPTION>
                <OPTION <%if titlecolor="#0000FF" then response.write "selected"%> value="#0000FF" style="background-color:#0000FF"></OPTION>
                <OPTION <%if titlecolor="#008080" then response.write "selected"%> value="#008080" style="background-color:#008080"></OPTION>
				  </select>
              <select name="fontsize" id="fontsize">
			    <option value="5" <%if fontsize="5" then response.write "selected"%>>字号</option>
                <option value="3" <%if fontsize="3" then response.write "selected"%>>小</option>
				<option value="5" <%if fontsize="5" then response.write "selected"%>>中</option>
				<option value="7" <%if fontsize="7" then response.write "selected"%>>大</option>
              </select>
              <select name="fo" id="fo">
                <option value="宋体" <%if fo="宋体" then response.write "selected"%>>字体</option>
				<option value="宋体" <%if fo="宋体" then response.write "selected"%>>宋体</option>
                <option value="黑体" <%if fo="黑体" then response.write "selected"%>>黑体</option>
				<option value="楷体" <%if fo="楷体" then response.write "selected"%>>楷体</option>
				<option value="幼圆" <%if fo="幼圆" then response.write "selected"%>>幼圆</option>
				<option value="隶书" <%if fo="隶书" then response.write "selected"%>>隶书</option>
              </select>
               <input name="ft" type="checkbox" id="ft" value="1" <%if ft=1 then response.write "checked"%>>
               粗体 
              <input name="fs" type="checkbox" id="fs" value="1" <%if fs=1 then response.write "checked"%>> 
              倾斜</td>
          </tr>
          <tr>
            <td height="30">新闻栏目：
              <select name="lm1" id="lm1">
                <% set rss=conn.execute("select * from tb_news_menu where id="&lm1&" order by n_num")
                do while not rss.eof %>
                <option value="<%=rss("id")%>" <%if rss("id")=lm1 then%>selected<%end if%>><%=rss("n_name")%></option>
                <%rss.movenext
				  loop
				  rss.close%>
              </select>
              <select name="lm2" id="lm2">
                <%set rss=conn.execute("select * from tb_news_menu where n_kind="&lm1&" order by n_num")
                do while not rss.eof
					%>
                <option value="<%=rss("id")%>" <%if rss("id")=lm2 then%>selected<%end if%>><%=rss("n_name")%></option>
                <%rss.movenext
				  loop
				  rss.close%>
              </select>
             </td>
          </tr>
          <tr>
            <td height="30">标题图片：
              <input name="titlePic" type="text" id="titlePic" value="<%
	if titlePic = "none" then
	  	response.Write("")
		else
		response.Write titlePic
	end if
	  %>" size="45" maxlength="255">
                <input type="button" name="Submit" value="选择&gt;" onClick="javascript:insertPic(this.form.titlePic);">
              (<a href="#" title="尺寸为:150px*110px">图片新闻用</a>) &nbsp;
              <input type="checkbox" <% if pic<>"" then Response.Write " checked "%> name="tuwen" value="1" id=tu>
              <label for=tu>图文</label>
　
<input type="checkbox" <%if tj="推荐" then response.write " checked "%> name="tj"  value="推荐" id=tj>
<label for=tj>推荐新闻</label>
　
<input type="checkbox" name="ontop" <%if ontop=5 then response.write " checked "%> value="5" id=ontop>
<label for=ontop>固顶</label></td>
          </tr>
          <tr>
            <td><textarea name="content" style="display:none" cols="1" rows="1"><%if content<>"" then response.write content%></textarea>
					<IFRAME ID="content" SRC="eEditor/ewebeditor.asp?id=content&style=news" FRAMEBORDER="0" SCROLLING="no" WIDTH="100%" HEIGHT="300" marginwidth="1" marginheight="1" name="wfasdg"></IFRAME></td>
          </tr>
         <%if lm1="13" then%> <tr align="center">
            <td height="25" align="left"><span class="STYLE4">注意:您所添加的为图片频道信息,该栏目只充许一张图片为一页,且不允许添加文字说明.</span></td>
          </tr><%end if%>
          <tr align="center">
            <td height="25" align="left">来　源：
              <input name="zz" type="text" id="zz" value="<%=zz%>" size="20">←<a href="javascript:" onClick="document.form.zz.value='黄冈信息港'">本站</a></td>
          </tr>
          <tr align="center">
            <td height="25" align="left">关键字：
              <input type="text" name="xgnews" size="20" value="<%=xgnews%>"></td>
          </tr>
          <tr align="center">
            <td height="25" align="left">发布时间:
					  <select name="y" id="y"><%for i=1999 to 2100%>
						<option value="<%=i%>" <%if y=i then%>selected<%end if%>><%=i%>年</option><%next%>
				       </select>-
				      <select name="m" id="m"><%for o=1 to 12%>
				        <option value="<%=o%>" <%if m=o then%>selected<%end if%>><%=o%>月</option><%next%>
			              </select>-
			          <select name="d" id="d"><%for p=1 to 31%>
			            <option value="<%=p%>" <%if d=p then%>selected<%end if%>><%=p%>日</option><%next%>
		                  </select> 
						  <select name="h" id="h"><%for j=1 to 24%>
			            <option value="<%=j%>" <%if h=j then%>selected<%end if%>><%=j%>点</option><%next%>
		                  </select>:
						  <select name="f" id="f"><%for k=1 to 60%>
			            <option value="<%=k%>" <%if f=k then%>selected<%end if%>><%=k%>分</option><%next%>
		                  </select>:
						  <select name="s" id="s"><%for l=1 to 60%>
			            <option value="<%=l%>" <%if s=l then%>selected<%end if%>><%=l%>秒</option><%next%>
		                  </select></td>
          </tr>
          <tr align="center">
            <td height="25"><input type="submit" name="Submit" value="保存信息"></td>
          </tr>
        </table>
      </form></td>
    </tr>
  </tbody>
</table>
<!--#include file="CopyRight.asp"-->
</body>
</html>