📄 user_infoadd.asp
字号:
<%@language=vbscript codepage=936 %>
<%
option explicit
response.buffer=true
%>
<!--#include file="inc/conn.asp"-->
<!--#include file="inc/Conn_User.asp"-->
<!--#include file="inc/config.asp"-->
<!--#include file="inc/func.asp"-->
<!--#include file="inc/ad_code_info.asp"-->
<%
if CheckUserLogined()=False then
response.Redirect "User_Login.asp"
end if
dim ClassID,SpecialID
dim SkinID,LayoutID,SkinCount,LayoutCount,ClassMaster,BrowsePurview,AddPurview
ClassID=session("ClassID")
SpecialID=session("SpecialID")
if ClassID="" then
ClassID=0
else
ClassID=Clng(ClassID)
end if
if SpecialID="" then
SpecialID=0
else
SpecialID=Clng(SpecialID)
end if
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="GENERATOR" content="Microsoft FrontPage 3.0">
<title>发表文章</title>
<link rel="stylesheet" type="text/css" href="Ad_style.css">
<script language = "JavaScript">
function AddItem(strFileName){
document.myform.IncludePic.checked=true;
document.myform.DefaultPicUrl.value=strFileName;
document.myform.DefaultPicList.options[document.myform.DefaultPicList.length]=new Option(strFileName,strFileName);
document.myform.DefaultPicList.selectedIndex+=1;
if(document.myform.UploadFiles.value==''){
document.myform.UploadFiles.value=strFileName;
}
else{
document.myform.UploadFiles.value=document.myform.UploadFiles.value+"|"+strFileName;
}
}
function CheckForm()
{
if (editor.EditMode.checked==true)
document.myform.Content.value=editor.HtmlEdit.document.body.innerText;
else
document.myform.Content.value=editor.HtmlEdit.document.body.innerHTML;
if (document.myform.ClassID.value=="")
{
alert("文章所属栏目不能指定为含有子栏目的栏目!");
document.myform.ClassID.focus();
return false;
}
if (document.myform.ClassID.value=="0")
{
alert("文章所属栏目不能指定为外部栏目!");
document.myform.ClassID.focus();
return false;
}
if (document.myform.ClassID.value=="-1")
{
alert("你没有在此栏目发表文章的权限,请选择其他栏目!");
document.myform.ClassID.focus();
return false;
}
if (document.myform.Title.value=="")
{
alert("文章标题不能为空!");
document.myform.Title.focus();
return false;
}
if (document.myform.Key.value=="")
{
alert("关键字不能为空!");
document.myform.Key.focus();
return false;
}
if (document.myform.Content.value=="")
{
alert("文章内容不能为空!");
editor.HtmlEdit.focus();
return false;
}
if (document.myform.Content.value.length>6553600)
{
alert("文章内容太长,超出了ACCESS数据库的限制(6400K)!建议将文章分成几部分录入。");
editor.HtmlEdit.focus();
return false;
}
return true;
}
</script>
</head>
<body leftmargin="5" topmargin="10">
<form method="POST" name="myform" onSubmit="return CheckForm();" action="User_infoSave.asp" target="_self">
<table width="760" border="0" align="center" cellpadding="0" cellspacing="0" class="border">
<tr>
<td height="22" align="center" class="title"><b>发 表 文 章</b></td>
</tr>
<tr align="center">
<td class="tdbg">
<table width="100%" border="0" cellpadding="2" cellspacing="0">
<tr class="tdbg">
<td width="100" align="right"><strong>所属栏目:</strong></td>
<td><select name='ClassID'>
<%call Admin_ShowClass_Option(4,ClassID)%>
</select> </td>
<td><font color='#0000FF'>不能指定为含有子栏目的栏目,或者外部栏目,或者带“<font color="#FF0000">*</font>”的栏目<br>
带“<font color="#FF0000">*</font>”的栏目表示你没有在此栏目发表文章的权限</font></td>
</tr>
<tr class="tdbg">
<td width="100" align="right"><strong>所属专题:</strong></td>
<td colspan="2"><%call Admin_ShowSpecial_Option(2,SpecialID)%></td>
</tr>
<tr class="tdbg">
<td width="100" align="right"><strong>文章标题:</strong></td>
<td colspan="2"><input name="Title" type="text" id="Title" value="" size="50" maxlength="255">
<select name="TitleFontColor" id="TitleFontColor">
<option value="" selected>颜色</option>
<OPTION value="">默认</OPTION>
<OPTION value="#000000" style="background-color:#000000"></OPTION>
<OPTION value="#FFFFFF" style="background-color:#FFFFFF"></OPTION>
<OPTION value="#008000" style="background-color:#008000"></OPTION>
<OPTION value="#800000" style="background-color:#800000"></OPTION>
<OPTION value="#808000" style="background-color:#808000"></OPTION>
<OPTION value="#000080" style="background-color:#000080"></OPTION>
<OPTION value="#800080" style="background-color:#800080"></OPTION>
<OPTION value="#808080" style="background-color:#808080"></OPTION>
<OPTION value="#FFFF00" style="background-color:#FFFF00"></OPTION>
<OPTION value="#00FF00" style="background-color:#00FF00"></OPTION>
<OPTION value="#00FFFF" style="background-color:#00FFFF"></OPTION>
<OPTION value="#FF00FF" style="background-color:#FF00FF"></OPTION>
<OPTION value="#FF0000" style="background-color:#FF0000"></OPTION>
<OPTION value="#0000FF" style="background-color:#0000FF"></OPTION>
<OPTION value="#008080" style="background-color:#008080"></OPTION>
</select> <select name="TitleFontType" id="TitleFontType">
<option value="0" selected>字形</option>
<option value="1">粗体</option>
<option value="2">斜体</option>
<option value="3">粗+斜</option>
<option value="0">规则</option>
</select> </td>
</tr>
<tr class="tdbg">
<td width="100" align="right"><strong>关键字:</strong></td>
<td colspan="2"><input name="Key" type="text"
id="Key" value="<%=session("Key")%>" size="50" maxlength="255"> <br>
<font color="#0000FF">用来查找相关文章,可输入多个关键字,中间用<font color="#FF0000">“|”</font>隔开。不能出现""'*?,.()等字符。</font></td>
</tr>
<tr class="tdbg">
<td width="100" align="right"><strong>作者:</strong></td>
<td colspan="2"> 姓名:
<input name="AuthorName" type="text"
id="AuthorName" value="<%=session("AuthorName")%>" size="20" maxlength="30">
Email:
<input name="AuthorEmail" type="text" id="AuthorEmail" value="<%=session("AuthorEmail")%>" size="40" maxlength="100">
</td>
</tr>
<tr class="tdbg">
<td width="100" align="right"><strong>转贴自:</strong></td>
<td colspan="2">名称:
<input name="CopyFromName" type="text"
id="CopyFromName" value="<%=session("CopyFromName")%>" size="20" maxlength="50">
地 址:
<input name="CopyFromUrl" type="text" id="CopyFromUrl2" value="<%=session("CopyFromUrl")%>" size="40" maxlength="200">
</td>
</tr>
<tr class="tdbg">
<td width="100" align="right" valign="middle"><p><strong>文章内容:</strong></p>
<p align="left"><font color="#006600">· 用户发表文章时不保存远程的图片。<br>
· 换行请按Shift+Enter</font><br>
<font color="#006600">· 另起一段请按Enter</font></p></td>
<td colspan="2"><textarea name="Content" style="display:none"></textarea>
<iframe ID="editor" src="editor.asp?UserType=User" frameborder=1 scrolling=no width="600" height="405"></iframe>
</td>
</tr>
<tr class="tdbg">
<td width="100" align="right"><strong>内容分页方式:</strong></td>
<td colspan="2"><select name="PaginationType" id="PaginationType">
<option value="0" <%if session("PaginationType")=0 then response.write " selected"%>>不分页</option>
<option value="1" <%if session("PaginationType")=1 then response.write " selected"%>>自动分页</option>
<option value="2" <%if session("PaginationType")=2 then response.write " selected"%>>手动分页</option>
</select> <strong><font color="#0000FF">注:</font></strong><font color="#0000FF">手动分页符标记为“</font><font color="#FF0000">[NextPage]</font><font color="#0000FF">”,注意大小写</font></td>
</tr>
<tr class="tdbg">
<td align="right"> </td>
<td colspan="2">自动分页时的每页大约字符数(包含HTML标记):<strong>
<input name="MaxCharPerPage" type="text" id="MaxCharPerPage" value="10000" size="8" maxlength="8">
</strong></td>
</tr>
<tr>
<td width="100" align="right"><strong>包含图片:</strong></td>
<td colspan="4"><input name="IncludePic" type="checkbox" id="IncludePic" value="yes">
是<font color="#0000FF">(如果选中的话会在标题前面显示[图文])</font></td>
</tr>
<tr>
<td width="100" align="right"><strong>首页图片:</strong></td>
<td colspan="4"><input name="DefaultPicUrl" type="text" id="DefaultPicUrl" size="56" maxlength="200">
用于在首页的图片文章处显示 <br>
直接从上传图片中选择:
<select name="DefaultPicList" id="DefaultPicList" onChange="DefaultPicUrl.value=this.value;">
<option selected>不指定首页图片</option>
</select> <input name="UploadFiles" type="hidden" id="UploadFiles">
</td>
</tr>
</table>
</td>
</tr>
</table>
<div align="center">
<p>
<%dim trs
set trs=conn.execute("select SkinID from Skin where IsDefault=True")
%>
<input name="SkinID" type="hidden" id="SkinID" value="<%=trs(0)%>">
<%
set trs=conn.execute("select LayoutID from Layout where IsDefault=True and LayoutType=3")
%>
<input name="LayoutID" type="hidden" id="LayoutID" value="<%=trs(0)%>">
<input name="Action" type="hidden" id="Action" value="Add">
<input name="Add" type="submit" id="Add" value=" 添 加 " onClick="document.myform.action='User_infoSave.asp';document.myform.target='_self';">
<input
name="Preview" type="submit" id="Preview" value=" 预 览 " onClick="document.myform.action='Ad_infoPreview.asp';document.myform.target='_blank';">
</p>
</div>
</form>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -