<%lm1=int(Request("lm1"))
userPageRights="{"&lm1&"}"
%>
<!--#include file="check.asp"-->
<%
Randomize
dtt= int((999-100+1) * RND +100)
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>ÐÂ½¨ÍøÒ³ 1</title>
</head>
<%
if request("lm1")<>"" or request("title")="" or request("content")="" then

  lm1=trim(request("lm1"))
  lm2=trim(request("lm2"))
  title=trim(request("title"))
  content=request("content")
  titlePic=request("titlePic")
  tj=trim(request("tj"))
  html=trim(request("html"))
  zz=trim(request("zz"))
  tuwen=trim(request("tuwen"))
  n_sms=trim(request("n_sms"))
  url=trim(request("url"))
  titlecolor=trim(request("titlecolor"))
  fontsize=trim(request("fontsize"))
  times=Trim(Request("y"))&"-"&Trim(Request("m"))&"-"&Trim(Request("d"))&" "&Trim(Request("h"))&":"&Trim(Request("f"))&":"&Trim(Request("s"))
  if times="" then times=now()
  fo=trim(request("fo"))
  ft=trim(request("ft"))
  if ft="" then ft=0
  fs=trim(request("fs"))
  if fs="" then fs=0
  xgnews=trim(request("xgnews"))
  ontop=trim(request("ontop"))
  if ontop<>"5" then ontop=3
  ontop=int(ontop)
  if zz="" then zz=" "
  if url="" then url=" "
  if tj="" then tj="²»ÍÆ¼ö"
  nr=LCase(content)
  if instr(nr,"<img")<>0 and instr(nr,"src=")<>0 then
     nr=replace(nr,"""","")
     aa=Split(nr,"<img")
     bb=aa(1)
     cc=split(bb,">")
     dd=cc(0)
     ee=split(dd,"src=")
     ff=ee(1)
     gg=split(ff," ")
     if tuwen="1" then
       pic=gg(0)
     end if
  end if
  
 if request("edit")="" then
 
  sql = "select top 1 * from tb_news"
  Set rs = Server.CreateObject("ADODB.RecordSet")
  rs.Open sql,conn,1,2
  
  rs.addnew
  rs("time")=now()
  else
  
  sql = "select * from tb_news where id="&request("id")
  Set rs = Server.CreateObject("ADODB.RecordSet")
  rs.Open sql,conn,1,2
  
 end if
  rs("time")=times
  rs("lm")=lm1
  rs("lm2")=lm2
  rs("fo")=fo
  rs("ft")=ft
  rs("fs")=fs
  rs("html")=filename
  rs("title")=title
  rs("titlecolor")=titlecolor
  rs("fontsize")=fontsize
  rs("content")=content
  rs("author")=zz
  rs("titlePic")=titlePic
  rs("tj")=tj
  rs("pic")=tuwen
  rs("url")=url
  rs("adduser")=session("w_fullname")
  rs("xgnews")=xgnews
  rs("ontop")=ontop
  rs.update
  rs.close
  set rs=nothing

%>
<script language=javascript>
window.location.replace('news_list.asp?id=<%=id%>&lm1=<%=lm1%>&lm2=<%=lm2%>');
</script>
<%
  Response.End()
end if
%>
<body>
</body>
</html>
