📄 addnews2.asp
字号:
<!--#include file=conn.asp -->
<%
IF not(Session("KEY")="super" or Session("KEY")="input") THEN
response.redirect "login.asp"
response.end
END IF
BigClassName=Request.form("BigClassName")
if BigClassName="" then
%>
<script language=javascript>
history.back()
alert("请选择新闻大类,如果没有新闻大类,请添加!")
</script>
<%
Response.End
end if
set rs=server.CreateObject ("ADODB.RecordSet")
rs.Source="select * from BigClass where BigClassName='" & BigClassName & "'"
rs.Open rs.source,conn,1,1
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>添加文章</title>
<link rel="stylesheet" type="text/css" href="site.css">
</head>
<body>
<script language="JavaScript">
<!--
function CheckForm()
{
if (document.form1.SmallClassName.value.length == 0) {
alert("请选择所属小类.");
document.form1.SmallClassName.focus();
return false;
}
if (document.form1.txttitle.value.length == 0) {
alert("请输入文章标题.");
document.form1.txttitle.focus();
return false;
}
document.form1.content.value=document.form1.doc_html.value;
return true
}
//-->
</script>
<div align="center"><center>
<form method="POST" action="addnews3.asp" name="form1" onSubmit="return CheckForm()">
<table border="0" cellspacing="0" width="95%" bordercolorlight="#000000" bordercolordark="#FFFFFF" cellpadding="0" bgcolor="#000000">
<tr align="center">
<td width="100%">
<table border="0" cellspacing="1" width="100%" cellpadding="3">
<tr align="center">
<td colspan="2" height="30" class="unnamed2" valign="middle" bgcolor="#abb8d6"><b class="unnamed2">添
加 文 章</b> </td>
</tr>
<tr>
<td width="15%" align="right" class="unnamed2" valign="middle" bgcolor="#FFFFFF">所属大类:</td>
<input type=hidden name="BigClassName" value='<%=BigClassName%>'>
<td width="85%" bgcolor="#FFFFFF"> <%=BigClassName%></td>
</tr>
<tr>
<td width="15%" align="right" class="unnamed2" valign="middle" bgcolor="#FFFFFF"><font color="#FF0000">*</font> 所属小类:</td>
<td width="85%" bgcolor="#FFFFFF">
<select name="SmallClassName" size="1">
<%
set rs2=server.createobject("adodb.recordset")
rs2.Source="select * from SmallClass where BigClassName='" & BigClassName & "' order by SmallClassid"
rs2.open rs2.Source,conn,1,1
if not rs2.eof then
do while not rs2.eof%>
<option value="<%=trim(rs2("SmallClassName"))%>"><%=trim(rs2("SmallClassName"))%></option>
<%
rs2.movenext
loop
else
%>
<option value="" selected>还没有小类</option>
<%
end if
rs2.close
%>
</select>
</td>
</tr>
<tr>
<td width="15%" align="right" class="unnamed2" valign="middle" bgcolor="#FFFFFF">所属专题:</td>
<td width="85%" bgcolor="#FFFFFF">
<select name="SpecialID" size="1">
<%
set rs3=server.CreateObject ("ADODB.RecordSet")
rs3.Source="select * from Special"
rs3.Open rs3.source,conn,1,1
%>
<option value=0>不属于任何专题</option>
<%if rs3.EOF then %>
<option value=0 selected>暂无任何专题</option>
<%else
while not rs3.EOF
%>
<option value="<%=rs3("SpecialID")%>"><%=trim(rs3("SpecialName"))%></option>
<%
rs3.MoveNext
wend
end if
rs3.close
%>
</select>
</td>
</tr>
<tr>
<td width="15%" align="right" class="unnamed2" valign="middle" bgcolor="#FFFFFF"><font color="#FF0000">*</font> 文章标题:</td>
<td width="85%" bgcolor="#FFFFFF"> <span style='cursor:hand' title='缩短对话框' onClick='if (me.size>10)me.size=me.size-2'>-</span>
<input name="txttitle" id=me type="TEXT" size=60 maxlength=100 style="background-color:ffffff;color:000000;border: 1 double">
<span style='cursor:hand' title='加长对话框' onClick='if (me.size<102)me.size=me.size+2'>+</span>
</td>
</tr>
<tr>
<td width="15%" align="right" class="unnamed2" valign="middle" bgcolor="#FFFFFF">来源:</td>
<td width="85%" bgcolor="#FFFFFF"> <span style='cursor:hand' title='缩短对话框' onClick='if (message.size>10)message.size=message.size-2'>-</span>
<input name="Original" id=message type="TEXT" size=30 maxlength=100 style="background-color:ffffff;color:000000;border: 1 double">
<span style='cursor:hand' title='加长对话框' onClick='if (message.size<102)message.size=message.size+2'>+</span>
</td>
</tr>
<tr>
<td width="15%" align="right" class="unnamed2" valign="middle" bgcolor="#FFFFFF">文章作者:</td>
<td width="85%" bgcolor="#FFFFFF"><span style='cursor:hand' title='缩短对话框' onClick='if (mess.size>10)mess.size=mess.size-2'>-</span>
<input name="Author" id=mess type="TEXT" size=30 maxlength=100 style="background-color:ffffff;color:000000;border: 1 double">
<span style='cursor:hand' title='加长对话框' onClick='if (mess.size<102)mess.size=mess.size+2'>+</span>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="top" class="unnamed2" bgcolor="#FFFFFF"><font color="#FF0000">*</font> 文章内容:</td>
<td width="85%" bgcolor="menu"><object id=doc_html style="LEFT: 0px; TOP: 0px" data=editor.htm width=544
height=320 type=text/x-scriptlet VIEWASTEXT>
</object>
<input type="hidden" name="content" value="" >
</td>
</tr>
<tr>
<td width="15%" align="right" class="unnamed2" valign="middle" bgcolor="#FFFFFF">相关新闻:</td>
<td width="85%" bgcolor="#FFFFFF"><span style='cursor:hand' title='缩短对话框' onclick='if (ss.size>10)ss.size=ss.size-2'>-</span>
<INPUT NAME="about" id=ss TYPE="TEXT" SIZE=30 maxlength=100 style="background-color:ffffff;color:000000;border: 1 double">
<span style='cursor:hand' title='加长对话框' onclick='if (ss.size<102)ss.size=ss.size+2'>+</span>
填入关键字或完整标题 </td>
</tr>
<tr>
<td width="17%" align="right" bgcolor="#FFFFFF">编码方式:</td>
<td width="83%" bgcolor="#FFFFFF">
<select size="1" name="EnCode">
<option value="html">默认方式</option>
<option value="ubb">UBB方式</option>
</select>
</td>
</tr>
<tr>
<td width="15%" align="right" valign="middle" class="unnamed2" bgcolor="#FFFFFF">推荐新闻:</td>
<td width="85%" valign="middle" bgcolor="#FFFFFF">
<input type="radio" value="1" name="goodnews">
是
<input type="radio" value="0" checked name="goodnews">
否 生成推荐新闻</td>
</tr>
<tr>
<td width="17%" align="right" bgcolor="#FFFFFF">热点:</td>
<td width="83%" bgcolor="#FFFFFF">
<input type="radio" value="1" name="hot">
是
<input type="radio" value="0" name="hot" checked>
否 加入排行榜</td>
</tr>
<tr>
<td width="17%" align="right" bgcolor="#FFFFFF">首页图片:</td>
<td width="83%" bgcolor="#FFFFFF">
<input type="radio" value="1" name="sypic">
是
<input type="radio" value="0" name="sypic" checked>
否 生成首页图片JS</td>
</tr>
<tr>
<td width="17%" align="right" bgcolor="#FFFFFF">图片张数:</td>
<td width="83%" bgcolor="#FFFFFF">
<select size="1" name="image">
<option selected>0</option>
<option>1</option>
<option>2</option>
<option>3</option>
<option>4</option>
<option>5</option>
<option>6</option>
<option>7</option>
<option>8</option>
<option>9</option>
<option>10</option>
</select>
<a href="HowToInsertImage.asp" target="_blank"><font color=336699>使用说明</font></a>
例:在新闻中插入图片1
<input type="text" name="textfield" value="[[image1]]" size="20">
</td>
</tr>
<tr bgcolor="#abb8d6" align="center">
<td colspan="2" height="50">
<input type="submit" value=" 添 加 "
name="cmdok" class="unnamed5">
<input type="reset" value=" 清 除 "
name="cmdcancel" class="unnamed5">
</td>
</tr>
</table>
</td>
</tr>
</table>
</form>
</center>
</div>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -