📄 act.add.asp
字号:
<!--#include file="../ACT.Function.asp"-->
<!--#include file="../Mode/ACT.M.ASP"-->
<!--#include file="../include/ACT.F.ASP"-->
<!--#include file="../../act_inc/ACT.Code.asp"-->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title><%=ModeName%>内容添加 By Act</title>
<link href="../Images/css1/css.css" rel="stylesheet" type="text/css">
<script language="JavaScript" type="text/javascript" src="../../act_inc/Prototype.js"></script>
<script language="JavaScript" type="text/javascript" src="../../act_inc/ActHelp.js"></script>
<script language="JavaScript" type="text/javascript" src="../../editor/fckeditor/fckeditor.js"></script>
<script type='text/javascript' src='../../ACT_INC/WebTime/WdatePicker.js'></script>
</head>
<%
Dim FileName,ClassName,ClassID,Title,IntactTitle,Intro,Keywords,author,CopyFrom,Slide,TemplateUrl
Dim ATT,IStop,ModeID,ModeName,Action,ID,ActCMS_DIY,SavePic,MakeHtml,KeywordArr
Dim ChangesLink,ArticlePic,rev,Content,Hits,Straction,PicUrl,UpdateTime,ActCMS_DIY2
ModeID = ACTCMS.ChkNumeric(Request("ModeID"))
if ModeID=0 or ModeID="" Then ModeID=1
ActCMS_DIY=Split(AF.ActCMS_DIY_F(ModeID,1,""),"§")
ModeName= ACTCMS.ACT_C(ModeID,1)
Action=Request.QueryString("Action")
ID=Request("ID")
KeywordArr=Split(ActCMS_DIY(4), "-")
Dim TitleTypeList,i,KeywordsArr,AuthorArr,rs3,GroupID_ACT,Score_ACT
StrAction = request("Action")
IF Straction = "edit" Then Straction = "edit" Else Straction = "add"
Dim Rs,ShowErr
Set Rs=server.CreateObject("adodb.recordset")
IF Action = "edit" Then
If UBound(Split(ActCMS_DIY(2),"-"))=3 Then
ActCMS_DIY2=Split(ActCMS_DIY(2),"-")
SavePic=ActCMS_DIY2(2)
MakeHtml=ActCMS_DIY2(3)
Else
SavePic=0
MakeHtml=1
End If
Rs.OPen "Select * from "&ACTCMS.ACT_C(ModeID,2)&" where ID = "& ACTCMS.ChkNumeric(Request.QueryString("ID")) &"",Conn,1,1
IF Rs.eof Then
ShowErr = "<li>数据查询错误</li>"
Response.Redirect("../Error.asp?Errs="&Server.URLEncode(ShowErr)&"&ErrorUrl="&"&Title=1")
Response.End
Else
ChangesLink=RS("ChangesLink")
Title=RS("Title")
rev=RS("rev")
Slide = Rs("Slide")
IntactTitle=RS("IntactTitle")
If RS("Content") <> "" Then Content=Server.HTMLEncode(RS("Content"))
Intro=RS("Intro")
Keywords=RS("Keywords")
author=RS("author")
CopyFrom=RS("CopyFrom")
Hits=RS("Hits")
FileName=RS("FileName")
PicUrl=RS("PicUrl")
GroupID_ACT=RS("GroupID_ACT")
Score_ACT=RS("Score_ACT")
ATT=RS("ATT")
IStop=RS("IStop")
TemplateUrl=RS("TemplateUrl")
ClassID=RS("ClassID")
UpdateTime=RS("UpdateTime")
ArticlePic=RS("ArticlePic")
Rs.close
If Not ACTCMS.ACTCMS_QXYZ(ModeID,"3",ClassID) Then Call Actcms.Alert("对不起,你没有"&ACTCMS.ACT_C(ModeID,1)&"的修改权限","")
End IF
Else
ATT=0:IStop=0:ArticlePic=0:Slide=0:Hits=0
author=session("author")
CopyFrom=session("CopyFrom")
UpdateTime=Date()
If UBound(Split(ActCMS_DIY(2),"-"))=3 Then
ActCMS_DIY2=Split(ActCMS_DIY(2),"-")
IStop=ActCMS_DIY2(0)
rev=ActCMS_DIY2(1)
SavePic=ActCMS_DIY2(2)
MakeHtml=ActCMS_DIY2(3)
Else
IStop=0
rev=1
SavePic=0
MakeHtml=1
End If
IntactTitle=ActCMS_DIY(0)
If UBound(KeywordArr)=>0 Then Keywords=KeywordArr(0)
author=ActCMS_DIY(6)
CopyFrom=ActCMS_DIY(8)
Intro=ActCMS_DIY(10)
GroupID_ACT=Replace(ActCMS_DIY(14),"-",",")
Score_ACT=ActCMS_DIY(16)
Dim ACTCode
Set ACTCode =New ACT_Code
If Trim(ActCMS_DIY(13)) <> "" Then Content =Server.HTMLEncode(ACTCode.LoadTemplate(ActCMS_DIY(13)))
IF Request.QueryString("ClassID") <> "" Then
Rs.OPen "Select ClassName,ClassID from Class_Act where ClassID = '"& Request.QueryString("ClassID") &"' and ChangesLinkUrl =''",Conn,1,1
If Not rs.eof Then
ClassName = Rs("ClassName")
ClassID = Rs("ClassID")
Else
response.write "程序出现错误,该栏目是外部栏目,或该栏目已被删除"
response.End
End If
Else
IF Session("ClassName") <> "" And Session("ClassID") <> "" Then
ClassName = Session("ClassName")
ClassID = Session("ClassID")
End IF
End IF
End If
Function Classmake(ModeID)
Dim FolderRS,selected
Set FolderRS = actcms.actexe("Select * from Class_act where ParentID='0' And ModeID="&ModeID&" and ChangesLinkUrl='' Order by Orderid desc,ID desc")
IF FolderRS.Eof Then
Classmake=("<br><li>还没有添加任何栏目!")
Else
do while Not FolderRS.Eof
If ClassID=FolderRS("ClassID") Then selected=" selected=""selected""" Else selected=""
Classmake=Classmake&"<option value='"&FolderRS("ClassID")&"' "&selected&">"& FolderRS("ClassName") & "</option>"& vbCrLf
Classmake=Classmake&(GetChildClassList(FolderRS("ClassID"),""))
FolderRS.MoveNext
Loop
End IF
End Function
Function GetChildClassList(ClassIDs,Str)
Dim Sql,RsTempObj,TempImageStr,ImageStr,CheckStr,selected
TempImageStr = " └"
Sql = "Select * from Class_act where ParentID='" & ClassIDs & "' and ChangesLinkUrl=''"
ImageStr = Str & " └"
Set RsTempObj = Conn.Execute(Sql)
do while Not RsTempObj.Eof
If ClassID=RsTempObj("ClassID") Then selected=" selected=""selected""" Else selected=""
GetChildClassList = GetChildClassList & "<option value='"&RsTempObj("ClassID")&"' "&selected&">"& ImageStr & TempImageStr &" "& RsTempObj("ClassName")& "</option>"& vbCrLf
GetChildClassList = GetChildClassList & GetChildClassList(RsTempObj("ClassID"),ImageStr)
RsTempObj.MoveNext
loop
Set RsTempObj = Nothing
End Function
With Response
%>
<body>
<form name="tcjdxr" method="post" action="ACT.Save.asp?action=<%=Straction%>&ModeID=<%=Request("ModeID")%>&ID=<%=Request("ID")%>&actcms=<%=Request.QueryString("actcms")%>">
<table width="99%" border="0" cellpadding="2" cellspacing="1" class="table">
<tr>
<td colspan="3" align="left" class="bg_tr">您现在的位置:<%=ModeName%>管理 >> 添加<%=ModeName%></td>
</tr>
<tr>
<td height="23" align="right"><%=ModeName%>类型:</td>
<td height="23" colspan="2" align="left">
<input type="radio" <%if ArticlePic= 0 Then Response.Write "Checked "%> name="ArticlePic" value="0" id="ArticlePic1" onclick="ArticlePics(this.value)"/>
<label for="ArticlePic1">普通<%=ModeName%></label>
<input <%if ArticlePic= 1 Then Response.Write "Checked "%> type="radio" name="ArticlePic" value="1" id="ArticlePic2" onclick="ArticlePics(this.value)"/>
<label for="ArticlePic2">图片或幻灯片<%=ModeName%></label>
<input <%if ChangesLink= 1 Then Response.Write "Checked "%> name="ChangesLink" type="checkbox" id="ChangesLink" value="1" onclick="ChangesLinks()"/>
<label for="ChangesLink"><font color="#FF0000"><b>使用转向链接</b></font></label>
<span class="h" style="cursor:help;" title="点击显示帮助" onclick="Help('Article_001',this)">帮助</span>
</td>
</tr>
<tr id=ArticlePic>
<td height="23" colspan="3" align="right">
<table width="100%" border="0" cellpadding="2" cellspacing="1" class="table">
<tr ClassSetting3><td width="15%" rowspan="2" align="right" class="bg_tr"><div align="center">图片地址:</div></td><td width="86%" height="13" align="left"><input name="PicUrl" type="text" id="PicUrl" value="<%= PicUrl %>" size="40">
<input <% if Slide=1 then Response.Write "Checked"%> id="Slide" type="checkbox" value="1" name="Slide" /><label for=Slide> 是否幻灯片 </label>
<input name="slt" type="checkbox" id="slt" value="1" <% if Action<>"edit" then Response.Write "Checked"%> ><label for="slt">生成缩略图</label></td> </tr><tr ClassSetting3><td height="14"> <iframe src="../Upload_Admin.asp?Action=<%=Action%>&ModeID=<%=ModeID%>&instr=1&instrname=PicUrl&YNContent=1&instrct=content" name="image" width='75%' height="25" scrolling="No" frameborder="0" id="image"></iframe>
</td>
</tr></table> </td>
</tr>
<tr>
<td width="15%" height="23" align="right">所属栏目:</td>
<td height="23" colspan="2" align="left">
<select name="ClassID">
<option>请选择栏目</option>
<%= Classmake(ModeID)%>
</select>
自定义属性:<select name="ATT" id="ATT">
<option value="0">普通<%=ModeName%></option>
<%=ACTCMS.ACT_ATT(ATT)%></select>
<span class="h" style="cursor:help;" title="点击显示帮助" onclick="Help('Article_002',this)">帮助</span>
</td>
</tr>
<tr>
<td height="23" align="right" >简短标题:</td>
<td height="23" colspan="2" align="left">
<input name="Title" type="text" id="Title" value="<%=Server.HTMLEncode(Title)%>" size="60" maxlength="255" >
<select name="select" onChange="FormatTitle(this, tcjdxr.Title, '')">
<option selected>-- 修饰 --</option>
<option value="1">粗体</option>
<option value="3">红色</option>
<option value="4">蓝色</option>
<option value="5">倾斜</option>
<option value="2">[图文]</option>
<option value="-1">清除样式</option>
<option value="-2">清除内容</option>
</select><font color=green>支持HTML</font> <a target="_blank" title="链接到ACTCMS官方帮助页面.新窗口打开页面" href="http://www.actcms.com/help/article/htmlxg/">查看常用HTML效果</a></td>
</tr>
<%If ActCMS_DIY(1)="0" Then %>
<tr>
<td height="23" align="right">完整标题:</td>
<td height="23" colspan="2" align="left"><input name="IntactTitle" type="text" id="IntactTitle" value="<%= IntactTitle %>" size="50" /></td>
</tr>
<%
Else
response.write "<input type=""hidden"" id=""IntactTitle"" name=""IntactTitle"" value="""&IntactTitle&""">"
End If
If ActCMS_DIY(3)="0" Then
%>
<tr>
<td height="23" align="right"><%=ModeName%>属性:</td>
<td height="23" colspan="2" align="left"><table width="100%" border="0">
<tr>
<td>
<input <%if IStop= "1" Then Response.Write "Checked "%> name="IStop" type="checkbox" id="IStop" value="1">
<label for="IStop"> 置顶 </label>
<input <%if rev= "1" Then Response.Write "Checked "%> id="rev" type="checkbox" value="1" name="rev" />
<label for="rev"> 允许评论 </label>
<input <%if SavePic= "1" Then Response.Write "Checked "%> id="SavePic" type="checkbox" value="1" name="SavePic" />
<label for="savepic"> 远程存图 </font></label>
<input <%if MakeHtml= "1" Then Response.Write "Checked "%> id="MakeHtml" type="checkbox" value="1" name="MakeHtml" />
<label for="makehtml"> 立即生成 </label>
<span class="h" style="cursor:help;" title="点击显示帮助" onclick="Help('Article_003',this)">帮助</span></td>
</tr>
</table>
</td>
</tr>
<%
else
response.write "<input type=""hidden"" id=""IStop"" name=""IStop"" value="""&IStop&""">"
response.write "<input type=""hidden"" id=""rev"" name=""rev"" value="""&rev&""">"
response.write "<input type=""hidden"" id=""SavePic"" name=""SavePic"" value="""&SavePic&""">"
response.write "<input type=""hidden"" id=""MakeHtml"" name=""MakeHtml"" value="""&MakeHtml&""">"
End if%>
<tr id=ChangesUrl <%
if ChangesLink = 1 Then
.Write "style=""'DISPLAY: none'"""
else
.Write "style=""DISPLAY: none"""
End if
%> >
<td height="23" colspan="3" align="right">
<table width="98%" border="0" align="center" cellpadding="2" cellspacing="1" class="table">
<tr>
<td width="13%" align="right" class="bg_tr"><div align="center">转向链接地址:</div> </td>
<td width="87%" ><input name="ChangesLinkUrl" type="text" id="ChangesLinkUrl" value="<%=FileName%>" size="50" maxlength="255">
<font color="#ff0000">如果<%=ModeName%>是转向链接,那么以下各项填写无效,请不要填写!</font></td>
</tr></table> </td>
</tr>
<%
If ActCMS_DIY(5)="0" Then
%>
<tr>
<td height="23" align="right">关键字:</td>
<td height="23" colspan="2" align="left">
<input name="Keywords" type="text" size="50" maxlength="255" id="Keywords" value="<%= Keywords %>">
<span class="h" style="cursor:help;" title="点击显示帮助" onclick="Help('Article_005',this)">帮助</span>
<input id=Tags type="checkbox" name="Tags" value="1"><label for=Tags>写入Tags</label>
<%
For I = 0 To UBound(KeywordArr)
.Write "<a href=""javascript:SetValue('add','Keywords','"&","&KeywordArr(I) &"')"">【<font color=""blue"">" & KeywordArr(I) & "</font>】</a>"
Next
%>
</td>
</tr>
<%Else
response.write "<input type=""hidden"" id=""Keywords"" name=""Keywords"" value="""&Keywords&""">"
End If
If ActCMS_DIY(7)="0" Then
%>
<tr>
<td height="23" align="right"><%=ModeName%>作者:</td>
<td height="23" colspan="2" align="left">
<input name="author" type="text" value="<%=author %>">
<select name="" onchange="document.tcjdxr.author.value=this.value">
<option>常用作者列表</option>
<% set rs3=ACTCMS.ActExe("Select Field1,Field2 from AC_ACT where Types=1")
if Not rs3.eof Then
Do While Not rs3.eof
.Write "<option value="&rs3("Field1") &">" & rs3("Field1") & "</option>"
rs3.movenext
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -