📄 freeadd.asp
字号:
<%
if session("flag")="" then
response.redirect "adminlogin.asp"
response.end
end if
%>
<!--#include file="conn.asp"-->
<!--#include file="code.asp"-->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 4.0">
<title>添 加 文 章</title>
<SCRIPT language=JavaScript>
<!-- Begin
function textCounter(field, countfield, maxlimit) {
if (field.value.length > maxlimit)
field.value = field.value.substring(0,maxlimit);
else
countfield.value = maxlimit - field.value.length;
}
// End -->
</SCRIPT>
<link rel="stylesheet" type="text/css" href="style.css">
<%
dim rs
dim sql
dim count
set rs=server.createobject("adodb.recordset")
sql = "select * from ANclass where Nclasson=0 order by Nclassid"
rs.open sql,conn,1,1
%>
<script language = "JavaScript">
var onecount;
onecount=0;
subcat = new Array();
<%
count = 0
do while not rs.eof
%>
subcat[<%=count%>] = new Array("<%= trim(rs("Nclass"))%>","<%= trim(rs("classid"))%>","<%= trim(rs("Nclassid"))%>");
<%
count = count + 1
rs.movenext
loop
rs.close
%>
onecount=<%=count%>;
function changelocation(locationid)
{
document.myform.Nclassid.length = 0;
var locationid=locationid;
var i;
for (i=0;i < onecount; i++)
{
if (subcat[i][1] == locationid)
{
document.myform.Nclassid.options[document.myform.Nclassid.length] = new Option(subcat[i][0], subcat[i][2]);
}
}
}
</script>
</head>
<body>
<form method="POST" name="myform" action="adminsave.asp?action=add">
<div align="center"><center><table cellspacing="0" width="90%" border="0" cellpadding="0" cellspacing="1" bordercolor="#999999" bgcolor="#000000">
<tr bgcolor="#E3E3E3" class="tdbg">
<td width="100%" bgcolor="#999999" height="30" align="center"><strong>添 加 文 章</strong></td>
</tr>
<tr align="center" bgcolor="#EAEAEA" class="tdbg">
<td width="100%">
<table border="0" cellspacing="1" width="100%">
<tr bgcolor="#EAEAEA" class="tdbg">
<td width="20%" align="right" valign="top" height="20"><b>文章大类:</b></td>
<td width="40%">
<%
sql = "select * from Aclass where classon=0 order by id"
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "请先添加栏目。"
response.end
else
%>
<select name="classid" onChange="changelocation(document.myform.classid.options[document.myform.classid.selectedIndex].value)" size="1">
<%
do while not rs.eof
%>
<option selected value="<%=trim(rs("id"))%>"><%=trim(rs("class"))%></option>
<%
rs.movenext
loop
end if
rs.close
set rs = nothing
conn.Close
set conn = nothing
%>
</select>
**
</td>
<td width="40%">
<b>
子类:</b><select name="Nclassid">
<option selected value="">==请选栏目==</option>
</select>
</td></tr>
<tr bgcolor="#EAEAEA" class="tdbg">
<td width="20%" align="right" height="30"><b>是否固定:</b></td>
<td width="40%" height="30"><select name="ding" size="1">
<option selected value="0">一般文章</option>
<option value="1">固定文章</option>
</select>**</td>
<td width="40%" height="30"><b>类型:</b><select name="articleon" size="1">
<option selected value="0">普通文章</option>
<option value="1">超级链接</option>
</select>**</td>
</tr>
<tr bgcolor="#EAEAEA" class="tdbg">
<td width="20%" align="right" height="30"><b>文章标题:</b></td>
<td width="80%" height="30" colspan="2"><input type="text" name="txttitle" size="60"
class="smallinput" maxlength="90"></td>
</tr>
<tr bgcolor="#EAEAEA" class="tdbg">
<td width="20%" align="right" height="30"><b>UBB标签:</b></td>
<td width="80%" height="30" colspan="2">
<img onclick=hyperlink() src="url.gif" width="22" height="22" alt="超级连接" border="0">
<img onclick=image() src="editor.gif" width="23" height="22" alt="图片" border="0"> 内容:(最多可写5000个汉字)还剩 <input readonly maxlength=3 size=3 value=5000 name=remLen >字
<tr bgcolor="#EAEAEA" class="tdbg">
<td width="20%" align="right" valign="top"><b>文章内容:</b></td>
<td width="80%" colspan="2"><textarea rows="18" name="txtcontent" cols="60" class="smallarea" onkeydown=textCounter(this.form.txtcontent,this.form.remLen,5000); onkeyup=textCounter(this.form.txtcontent,this.form.remLen,5000)></textarea></td>
</tr bgcolor="#EAEAEA" class="tdbg">
<tr bgcolor="#EAEAEA" class="tdbg">
<td width="20%" align="right" height="30"><b>换行说明:</b></td>
<td width="80%" height="30" colspan="3">在文章在要换行就用\作为换行标识,1个\为一行,以此类推!</td>
</tr>
<tr bgcolor="#EAEAEA" class="tdbg">
<td width="20%" align="right" height="30"><b>添加人:</b></td>
<td width="80%" height="30" colspan="2"><input type="text" name="writer" size="60"
class="smallinput" maxlength="90" value="<%=session("admin")%>"></td>
</tr>
</table>
</td>
</tr>
</table>
</center></div><div align="center"><center><p><input type="submit" value=" 添 加 "
name="cmdok" class="buttonface"> <input type="reset" value=" 清 除 "
name="cmdcancel" class="buttonface"></p>
</center></div>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -