<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: Verdana, 宋体, MingLiU; 
TEXT-DECORATION: underline
}
body {font-size: 9pt; font-family: Verdana,宋体,MingLiU, Arial;color: #000000}
TD {FONT-SIZE: 9pt; FONT-FAMILY: Verdana, 宋体, MingLiU, Arial;
color: #000000;line-height: 120%;table-layout:fixed;word-break:break-all
}
p {FONT-SIZE: 9pt; FONT-FAMILY: Verdana, 宋体, MingLiU, Arial;
color: #000000
}
input {FONT-SIZE: 9pt; FONT-FAMILY: Verdana, 宋体, MingLiU, Arial;
color: #000000
}
body {margin-top: 0; margin-bottom: 0;margin-left:0;margin-right:0; color: #000000}
select {FONT-SIZE: 9PT;font-family: Verdana,宋体}
option {FONT-SIZE: 9pt;font-family: Verdana,宋体}
textarea {FONT-SIZE: 9pt;font-family: Verdana,宋体}
-->
</STYLE>
<!--#include file = admin_conn.asp -->
<%
Set rs = Server.CreateObject("ADODB.RecordSet")
rs.Open "select * from [config]",conn,1,1
if rs.recordcount<>0 then
  tgtop=rs("tgtop")
  tgbottom=rs("tgbottom")
  tghtmledit=rs("tghtmledit")
end if
rs.close
set rs=nothing
Response.Write tgtop
%>
<head>

<!--#include file = titleb.asp -->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="Content-Language" content="zh-cn">
</head>
<%

adduser=chkhtm(trim(Request("adduser")))&"|"&chkhtm(trim(Request("email")))
title=chkhtm(trim(Request("title")))
content=trim(Request("content"))
lm=chkhtm(trim(request("lm")))
addtime=date()
userip = Request.ServerVariables("HTTP_X_FORWARDED_FOR")
If userip = "" Then userip = Request.ServerVariables("REMOTE_ADDR")

if adduser="" or title="" or content="" then 
%>
<table border=0 width=740 align=center><!--webbot BOT="GeneratedScript" PREVIEW=" " startspan --><script Language="VBScript" Type="text/vbscript"><!--
function FrontPage_Form1_onsubmit()
  Set theForm = document.FrontPage_Form1

  If (theForm.adduser.value = "") Then
    MsgBox "请在 你的姓名 域中输入值。", 0, "有效性验证错误"
    theForm.adduser.focus()
    FrontPage_Form1_onsubmit = False
    Exit Function
  End If

  If (Len(theForm.adduser.value) < 2) Then
    MsgBox "在 你的姓名 域中，请至少输入 2 个字符。", 0, "有效性验证错误"
    theForm.adduser.focus()
    FrontPage_Form1_onsubmit = False
    Exit Function
  End If

  If (Len(theForm.adduser.value) > 5) Then
    MsgBox "在 你的姓名 域中，请最多输入 5 个字符。", 0, "有效性验证错误"
    theForm.adduser.focus()
    FrontPage_Form1_onsubmit = False
    Exit Function
  End If

  If (theForm.email.value = "") Then
    MsgBox "请在 电子邮件 域中输入值。", 0, "有效性验证错误"
    theForm.email.focus()
    FrontPage_Form1_onsubmit = False
    Exit Function
  End If

  If (Len(theForm.email.value) < 1) Then
    MsgBox "在 电子邮件 域中，请至少输入 1 个字符。", 0, "有效性验证错误"
    theForm.email.focus()
    FrontPage_Form1_onsubmit = False
    Exit Function
  End If

  If (Len(theForm.email.value) > 50) Then
    MsgBox "在 电子邮件 域中，请最多输入 50 个字符。", 0, "有效性验证错误"
    theForm.email.focus()
    FrontPage_Form1_onsubmit = False
    Exit Function
  End If

  If (theForm.title.value = "") Then
    MsgBox "请在 标题 域中输入值。", 0, "有效性验证错误"
    theForm.title.focus()
    FrontPage_Form1_onsubmit = False
    Exit Function
  End If

  If (Len(theForm.title.value) < 1) Then
    MsgBox "在 标题 域中，请至少输入 1 个字符。", 0, "有效性验证错误"
    theForm.title.focus()
    FrontPage_Form1_onsubmit = False
    Exit Function
  End If

  If (Len(theForm.title.value) > 50) Then
    MsgBox "在 标题 域中，请最多输入 50 个字符。", 0, "有效性验证错误"
    theForm.title.focus()
    FrontPage_Form1_onsubmit = False
    Exit Function
  End If

  If (theForm.lm.selectedIndex < 0) Then
    MsgBox "请选择“栏目分类”选项中的一项。", 0, "有效性验证错误"
    theForm.lm.focus()
    FrontPage_Form1_onsubmit = False
    Exit Function
  End If

  If (theForm.lm.selectedIndex = 0) Then
    MsgBox "第一个“栏目分类”选项无效。 请选择其他选项中的一项。", 0, "有效性验证错误"
    theForm.lm.focus()
    FrontPage_Form1_onsubmit = False
    Exit Function
  End If
  FrontPage_Form1_onsubmit = True 
End Function
--></script><!--webbot BOT="GeneratedScript" endspan --><form method="POST" action="?" name="FrontPage_Form1"><tr><td align=center>
	<div align="center">
		<table border="1" cellpadding="3" width="734" id="table1" style="border-collapse: collapse" bordercolor="#C0C0C0">
			<tr>
				<td width="116" align="center">你的姓名</td>
				<td width="360">
				&nbsp;<!--webbot bot="Validation" s-display-name="你的姓名" b-value-required="TRUE" i-minimum-length="2" i-maximum-length="5" --><input type="text" name="adduser" size="23" maxlength="5"></td>
				<td width="244">　</td>
			</tr>
			<tr>
				<td width="116" align="center">电子邮件</td>
				<td width="360">
				&nbsp;<!--webbot bot="Validation" s-display-name="电子邮件" b-value-required="TRUE" i-minimum-length="1" i-maximum-length="50" --><input type="text" name="email" size="36" maxlength="50"></td>
				<td width="244">　</td>
			</tr>
			<tr>
				<td width="116" align="center">标　题</td>
				<td width="360">
				&nbsp;<!--webbot bot="Validation" s-display-name="标题" b-value-required="TRUE" i-minimum-length="1" i-maximum-length="50" --><input type="text" name="title" size="46" maxlength="50"></td>
				<td width="244">　</td>
			</tr>
			<tr>
				<td width="116" align="center">栏　目</td>
				<td width="360">
				&nbsp;<!--webbot bot="Validation" s-display-name="栏目分类" b-value-required="TRUE" b-disallow-first-item="TRUE" --><select size="1" name="lm">
					<option>请选择</option>
					  <%
					  'ON ERROR RESUME NEXT
					   lmid=config("tglm")&",0"
					   nr=split(lmid,",")
					   For i=0 to ubound(nr)
					        aaa=nr(i)
					        if aaa="" then aaa=0
					        'Response.Write aaa
							sql2 = "select * from lm where id="&aaa
							Set rs2 = Server.CreateObject("ADODB.RecordSet")
							rs2.Open sql2,conn,1,1
							while not rs2.eof
							  if rs2("lm")<>"" then
							%>
							   <option value='<%=rs2("id")%>'><%=rs2("lm")%>(1级)</option>
							<%
							  ElseIf rs2("lm2")<>"" then
							%>
							   <option value='<%=rs2("id")%>'>　├ <%=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='<%=rs33("id")%>'>　　├ <%=rs33("lm3")%>(3级)</option>
							<%
							        end if
							      next
							   	rs33.movenext
							   	wend
							rs2.movenext
							wend
							rs2.close
							set rs2=nothing
						next
				 
					%>
					
					</select></td>
				<td width="244">　</td>
			</tr>

<%
if tghtmledit="0" then 
%>
			<tr>
				<td width="720" align="center" colspan="3">
				&nbsp;<textarea rows="11" name="content" cols="98"></textarea></td>
			</tr>
<%
else
%>
			<tr>
				<td width="720" align="center" colspan="3">
				<textarea name="content" style="display:none" cols="1" rows="1"></textarea>
				<IFRAME ID="eWebEditor1" SRC="edit/ewebeditor.asp?id=content&style=tg" FRAMEBORDER="0" SCROLLING="no" WIDTH="100%" HEIGHT="399" marginwidth="1" marginheight="1" name="wfasdg"></IFRAME></td>
			</tr>
<%end if%>
		</table>
	</div>
	<p><input type="submit" value="提交" name="B1">　　　　<input type="reset" value="重置" name="B2"></p>

	</td></tr></form></table>
<BR><BR><center>

<%
elseif adduser<>"" and content<>"" and title<>"" and lm<>"" then
  nr=content
  nr=replace(nr,chr(10),"<BR>")
  conn.Execute "insert into [usertougao] ([title],[adduser],[content],[ip],[addtime],[lmid]) values('"&title&"','"&adduser&"','"&nr&"','"&userip&"','"&addtime&"','"&lm&"')"
  Response.Write "<br><BR><BR><center>保存成功，请等待管理审核！</center><BR><BR><BR>"
end if
Response.Write tgbottom
conn.close
set conn=nothing
%>