<%
lm=trim(request("lm"))

if lm="" then lm=0
%>

<!--#include file = admin_conn.asp -->
<html>

<head>
<!--#include file = language.asp -->
<title>新建网页 1</title>
<base target="_self">
<STYLE type="text/css">
<!--
a:link       {text-decoration: none; font-family: AdobeSm; color: #000000 }
a:visited    {text-decoration: none; color: #000000 }
A:hover      {COLOR: green; FONT-FAMILY: "宋体,MingLiU"; TEXT-DECORATION: underline}
body         {font-size: 9pt; font-family: 宋体,MingLiU, Arial;color: #000000}
TD           {FONT-SIZE: 9pt; FONT-FAMILY: "宋体,MingLiU, Arial";color: #000000;table-layout:fixed;word-break:break-all}
p            {FONT-SIZE: 9pt; FONT-FAMILY: "宋体,MingLiU, Arial";color: #000000}
input        {FONT-SIZE: 9pt; FONT-FAMILY: "宋体,MingLiU, Arial";color: #000000}
body         {margin-top: 0; margin-bottom: 0;margin-left:0;margin-right:0; color: #000000}
select       {FONT-SIZE: 9PT;}
option       {FONT-SIZE: 9pt;}
textarea     {FONT-SIZE: 9pt;}
-->
</STYLE>
</head>

<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0" marginwidth="0" marginheight="0" bgcolor="#EFEFDE">
<%
titlecolor=trim(request("titlecolor"))
tgid=trim(request("tgid"))

zz=session("admin__user")

if request("id")<>"" then
  id=request("id")
  sql = "select * from news where id="&id
  Set rs = Server.CreateObject("ADODB.RecordSet")
  rs.Open sql,conn,1,1
  title=rs("title")
  htitle=rs("htitle")
  tj=trim(rs("tj"))
  lmid=rs("lm3")
    if lmid="0" then lmid=rs("lm2")
      if lmid="0" then lmid=rs("lm")
  lm2id=rs("lm2")
  html=rs("html")
  pic=trim(rs("pic"))
  content=rs("content")
  url=rs("url")
  titlecolor=rs("titlecolor")
  xgnews=rs("xgnews")
  ontop=rs("ontop")
  zz=rs("zz")
  rs.close
  set rs=nothing
else
  lmid=trim(request("lmid"))
  html=trim(request("html"))
end if

if tgid<>"" then
   Set rs = Server.CreateObject("ADODB.RecordSet")
   rs.Open "select * from [usertougao] where id="&tgid,conn,1,1
   title=rs("title")
   content=rs("content")
   zz=rs("adduser")
end if
if lmid="" then lmid=00

%>
<div align="center">
<table border="0" width="760" id="table1" cellspacing="0" cellpadding="0" >
	<tr>
		<td>
		<div align="center">
			<table border="0" cellpadding="0" cellspacing="0" width="100%" id="table3">
				<tr>
					<td>
					　</td>
					<td>　</td>
					<td >
					<p align="right">
					　</td>
				</tr>
			</table>
		</div>
		</td>
	</tr>
	<tr>
		<td  align=center>
		<!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="JavaScript" Type="text/javascript"><!--
function FrontPage_Form1_Validator(theForm)
{

  if (theForm.title.value == "")
  {
    alert("请在 新闻信息标题 域中输入值。");
    theForm.title.focus();
    return (false);
  }

  if (theForm.title.value.length < 1)
  {
    alert("在 新闻信息标题 域中，请至少输入 1 个字符。");
    theForm.title.focus();
    return (false);
  }

  if (theForm.title.value.length > 100)
  {
    alert("在 新闻信息标题 域中，请最多输入 100 个字符。");
    theForm.title.focus();
    return (false);
  }
  return (true);
}
//--></script><!--webbot BOT="GeneratedScript" endspan --><form method="POST" action="newstg-save.asp?id=<%=id%>" onsubmit="return FrontPage_Form1_Validator(this)" language="JavaScript" name="FrontPage_Form1">
			<table border="0" width="753" id="table2" cellpadding="5" style="border-collapse: collapse" bordercolor="#80ABF4">
				<tr>
					<td width="11%" align="center">新闻信息标题</td>
					<td width="51%">
					&nbsp;<!--webbot bot="Validation" s-display-name="新闻信息标题" b-value-required="TRUE" i-minimum-length="1" i-maximum-length="100" --><input type="text" name="title" size="59" maxlength="100" value='<%=title%>'></td>
					<td width="35%">
					<select size="1" name="titlecolor">
	            <option>默认颜色</option>
	            <OPTION <%if titlecolor="#000000" then response.write "selected"%> value="#000000" style="background-color:#000000"></OPTION>
                <OPTION <%if titlecolor="#FFFFFF" then response.write "selected"%> value="#FFFFFF" style="background-color:#FFFFFF"></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>
					</td>
				</tr>
				<tr>
					<td width="11%" align="center">栏目选择</td>
					<td width="51%">&nbsp;<select size="1" name="lm">
					
					  <%
							sql2 = "select * from lm where id="&lm
							Set rs2 = Server.CreateObject("ADODB.RecordSet")
							rs2.Open sql2,conn,1,1
							while not rs2.eof
							  if rs2("lm")<>"" then
							%>
							   <option value='<%=rs2("id")%>|0|0' <% if int(lmid)=rs2("id") then response.write " selected" %>><%=rs2("lm")%>(1级)</option>
							<%
							  ElseIf rs2("lm2")<>"" then
							%>
							   <option value='<%=rs2("lmid")%>|<%=rs2("id")%>|0' <% if int(lm2id)=rs2("id") then response.write " selected" %>>　├ <%=rs2("lm2")%>(2级)</option>
							<%
							  end if
							   	Set rs33 = Server.CreateObject("ADODB.RecordSet")
							   	rs33.Open "select * from [lm] where lm3<>'' and lmid='"&rs2("id")&"' order by id asc",conn,1,1
							   	while not rs33.eof
							   	  nnn=split(lmid,",")
							   	  for k=0 to ubound(nnn)
							   	  'Response.Write rs33("id")&nnn(k)
							   	    if clng(nnn(k))=clng(rs33("id")) then
							%>
								<option value='<%=rs2("lmid")%>|<%=rs2("id")%>|<%=rs33("id")%>' <% if int(lm3id)=rs33("id") then response.write " selected" %>>　　├ <%=rs33("lm3")%>(3级)</option>
							<%
							        end if
							      next
							   	rs33.movenext
							   	wend
							rs2.movenext
							wend
							rs2.close
							set rs2=nothing
						'next
				 
					%>
					
					</select>
</td>
					<td width="35%">来源：<input type="text" name="zz" size="14" maxlength="40" value="<%=zz%>"><textarea name="content" style="display:none" cols="1" rows="1"><%if content<>"" then response.write content%></textarea></td>
				</tr>
				<tr>
					<td colspan="3">
					<IFRAME ID="eWebEditor1" SRC="edit/ewebeditor.asp?id=content&style=news" FRAMEBORDER="0" SCROLLING="no" WIDTH="100%" HEIGHT="399" marginwidth="1" marginheight="1" name="wfasdg"></IFRAME></td>
				</tr>
				</table>
			<p align="center"><input type="submit" value="　保　存　" name="B1">　　　<input type="reset" value="　重　置　" name="B2"></p>
		</form>
		<p>　</td>
	</tr>
</table>

</div>

</body>

</html>
<%
conn.close
set conn=nothing
%> 
