📄 utg.asp
字号:
<!--#include file = admin_conn.asp -->
<!--#include file = admin/titleb.asp -->
<head>
<link rel="stylesheet" type="text/css" href="Css.css">
<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 { margin-top: 0; margin-bottom: 0; margin-left:0; margin-right:0; color: #000000;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}
select {FONT-SIZE: 9PT;font-family: Verdana,宋体}
option {FONT-SIZE: 9pt;font-family: Verdana,宋体}
textarea {FONT-SIZE: 9pt;font-family: Verdana,宋体}
-->
</STYLE>
</head>
<%
root_path=finddir(request.servervariables("URL"))
top=replace(config("top"),"$$网站目录$$",root_path)
down=replace(config("down"),"$$网站目录$$",root_path)
Response.Write top
adduser=chkhtm(trim(Request("adduser")))&chkhtm(trim(Request("email")))
title=chkhtm(trim(Request("title")))
content=trim(Request("content"))
lm=chkhtm(trim(request("lm")))
artYzm=trim(request("artYzm"))
addtime=now()
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" cellpadding="0" cellspacing="0" width="940" align="center">
<tr><td bgColor=#E6E6FF height=25><IMG src="images/TEAM.gif" width="16" height="16" align=absMiddle><B> 当前位置:>>>> 网友投稿</B> </td></tr>
<!--webbot BOT="GeneratedScript" PREVIEW=" " startspan -->
<script Language="JavaScript" Type="text/javascript">
<!--
function FrontPage_Form1_Validator(theForm)
{
if (theForm.adduser.value == "")
{
alert("请在 你的姓名 域中输入值。");
theForm.adduser.focus();
return (false);
}
if (theForm.adduser.value.length < 2)
{
alert("在 你的姓名 域中,请至少输入 2 个字符。");
theForm.adduser.focus();
return (false);
}
if (theForm.adduser.value.length > 10)
{
alert("在 你的姓名 域中,请最多输入 10 个字符。");
theForm.adduser.focus();
return (false);
}
if (theForm.email.value == "")
{
alert("请在 电子邮件 域中输入值。");
theForm.email.focus();
return (false);
}
if (theForm.email.value.length < 1)
{
alert("在 电子邮件 域中,请至少输入 1 个字符。");
theForm.email.focus();
return (false);
}
if (theForm.email.value.indexOf("@",0)== -1||theForm.email.value.indexOf(".",0)==-1)
{
alert("对不起,您输入的电子邮件有误!")
document.theForm.email.focus()
return false
}
if (theForm.email.value.length > 50)
{
alert("在 电子邮件 域中,请最多输入 50 个字符。");
theForm.email.focus();
return (false);
}
if (theForm.artYzm.value == "")
{
alert("请在 验证码 域中输入值。");
theForm.artYzm.focus();
return (false);
}
if (theForm.artYzm.value.length < 4)
{
alert("在 验证码 域中,请至少输入 4 个字符。");
theForm.artYzm.focus();
return (false);
}
if (theForm.artYzm.value.length > 5)
{
alert("在 验证码 域中,请最多输入 5 个字符。");
theForm.artYzm.focus();
return (false);
}
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 > 50)
{
alert("在 标题 域中,请最多输入 50 个字符。");
theForm.title.focus();
return (false);
}
if (theForm.lm.selectedIndex < 0)
{
alert("请选择“栏目分类”选项中的一项。");
theForm.lm.focus();
return (false);
}
if (theForm.lm.selectedIndex == 0)
{
alert("第一个“栏目分类”选项无效。 请选择其他选项中的一项。");
theForm.lm.focus();
return (false);
}
return (true);
}
//--></script><!--webbot BOT="GeneratedScript" endspan --><form method="POST" action="?" name="FrontPage_Form1" onsubmit="return FrontPage_Form1_Validator(this)" language="JavaScript"><tr><td align=center>
<table border="1" cellpadding="3" width="100%" style="border-collapse: collapse" bordercolor="#C0C0C0">
<tr>
<td width="96" align="center">你的姓名</td>
<td width="301">
<!--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="10"></td>
</tr>
<tr>
<td width="96" align="center">电子邮件</td>
<td width="301">
<!--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>
</tr>
<tr>
<td width="96" align="center">标 题</td>
<td width="301">
<!--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>
</tr>
<tr>
<td width="96" align="center">栏 目</td>
<td width="301">
<!--webbot bot="Validation" s-display-name="栏目分类" b-value-required="TRUE" b-disallow-first-item="TRUE" --><select size="1" name="lm">
<option>请选择</option>
<%
if config("tglm")<>"" then
User_lmid=config("tglm")&",0"
if right(User_lmid,1)="," then User_lmid=left(User_lmid,len(User_lmid)-1)
array_User_lmid=split(User_lmid,",")
For i=0 to ubound(array_User_lmid)
aaa=array_User_lmid(i)
lm_1_sql = "select * from lm where id="&aaa
Set lm_1_rs = Server.CreateObject("ADODB.RecordSet")
lm_1_rs.Open lm_1_sql,conn,1,1
while not lm_1_rs.eof
if lm_1_rs("lm")<>"" then
%>
<option value='<%=lm_1_rs("id")%>|0|0' <% if clng(lm1id)=lm_1_rs("id") then response.write " selected" %>><%=lm_1_rs("lm")%>(1级) </option>
<%
ElseIf lm_1_rs("lm2")<>"" then
%>
<option value='<%=lm_1_rs("lmid")%>|<%=lm_1_rs("id")%>|0' <% if clng(lm2id)=lm_1_rs("id") then response.write " selected" %>> ├ <%=lm_1_rs("lm2")%>(2级)</option>
<%
Elseif lm_1_rs("lm3")<>"" then
get_1_id_sql="select lmid from [lm] where id="&clng(lm_1_rs("lmid"))
set get_1_id_rs = Server.CreateObject("ADODB.RecordSet")
get_1_id_rs.Open get_1_id_sql,conn,1,1
lmid31=get_1_id_rs("lmid")
get_1_id_rs.close
set get_1_id_rs=nothing
%>
<option value='<%=lmid31%>|<%=lm_1_rs("lmid")%>|<%=lm_1_rs("id")%>' <% if clng(lm3id)=lm_1_rs("id") then response.write " selected" %>> ├ <%=lm_1_rs("lm3")%>(3级)</option>
<%
end if
lm_1_rs.movenext
wend
lm_1_rs.close
set lm_1_rs=nothing
next
end if
%>
</select></td>
</tr>
<%
if config("tghtmledit")="0" then
%>
<tr>
<td width="96" align="center">投稿内容</td>
<td align="left" > <textarea rows="20" name="content" cols="98"></textarea></td>
</tr>
<%
else
%>
<tr>
<td width="96" align="center">投稿内容</td>
<td align="center"><textarea name="content" style="display:none" cols="1" rows="1"></textarea>
<IFRAME ID="eWebEditor1" SRC="edit/ewebeditor.htm?id=content&style=Simple" FRAMEBORDER="0" SCROLLING="no" WIDTH="99%" HEIGHT="399" marginwidth="1" marginheight="1" name="wfasdg"></IFRAME></td>
</tr>
<%end if%>
<tr>
<td width="96" align="center">验 证 码</td>
<td width="301"> <INPUT maxlength="5"id=artYzm onkeyup=out_chkcode(); style="WIDTH: 60px" onFocus="on_input('chkcodemsg');" name=artYzm > <img align="absmiddle" src="Include/vCode.asp?" onClick="this.src+=Math.random()" alt="图片看不清?点击重新得到验证码" style="cursor:hand;"></td>
</tr>
<tr>
<td class="wz" colspan="2">
1、请遵守<A href="http://www.dgmsjy.com/Reg/bbs.htm" target=_blank><FONT color=red>《互联网电子公告服务管理规定》</FONT></A>及中华人民共和国其他各项有关法律法规。<br>
2、严禁发表危害国家安全、损害国家利益、破坏民族团结、破坏国家宗教政策、破坏社会稳定、侮辱、诽谤、教唆、淫秽等内容的稿件.<br>
3、用户需对自己在使用本站服务过程中的行为承担法律责任(直接或间接导致的)。<br>
4、本站管理员有权保留或删除稿件内容。<br>
</td>
</tr>
</table>
<p><input type="submit" value=" 提 交 " name="B1"> <input type="reset" value=" 重 置 " name="B2"></p>
</td></tr></form></table>
<%
elseif adduser<>"" and content<>"" and title<>"" and lm<>"" then
If CStr(artYzm) <>CStr(Session("artYzm")) then
Response.Write("<script>alert('验证码有误,重新输入!');history.back();</script>")
Response.End
End If
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 "<script language='javascript'>"
response.write "alert('保存成功,请等待管理审核!。');"
response.write "location.href='Utg.asp';"
response.write "</script>"
response.end
end if
Response.Write down
conn.close
set conn=nothing
%>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -