?? contredit.asp
字號:
<% Option Explicit %>
<!--#include file="../../FS_Inc/Const.asp" -->
<!--#include file="../../FS_InterFace/MF_Function.asp" -->
<!--#include file="../../FS_Inc/Function.asp" -->
<!--#include file="../../FS_Inc/Func_page.asp" -->
<!--#include file="../lib/strlib.asp" -->
<!--#include file="../lib/UserCheck.asp" -->
<!--#include file="lib/cls_contr.asp"-->
<%'Copyright (c) 2006 Foosun Inc. Code by Einstein.liu
Dim str_CurrPath,action,id,contrObj
Dim GetSysRs,EditTF
Set contrObj=New cls_Contr
action=trim(request.QueryString("action"))
id=NoSqlHack(trim(request.QueryString("id")))
if id<>"" then contrObj.getContrInfo(id)
Set GetSysRs = Conn.ExeCute("Select top 1 IsEditFileTF From FS_NS_SysParam Where SysID > 0 Order By SysID")
If GetSysRs.Eof Then
EditTF = 1
Else
EditTF = Cint(GetSysRs(0))
End If
GetSysRs.Close : set GetSysRs = Nothing
If EditTF = 0 Then
If contrObj.AuditTF = 1 Then
Response.Redirect("../lib/error.asp?ErrCodes=<li><font color=red>已經審核的投稿不允許再編輯</font></li>&ErrorUrl=")
End If
End if
if action="" then
action="add"
End if
str_CurrPath = Replace("/"&G_VIRTUAL_ROOT_DIR &"/"&G_USERFILES_DIR&"/"&Session("FS_UserNumber"),"//","/")
%>
<html xmlns="http://www.w3.org/1999/xhtml">
<title><%=GetUserSystemTitle%></title>
<meta name="keywords" content="風訊cms,cms,FoosunCMS,FoosunOA,FoosunVif,vif,風訊網站內容管理系統">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<meta content="MSHTML 6.00.3790.2491" name="GENERATOR" />
<link href="../images/skin/Css_<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>/<%=Request.Cookies("FoosunUserCookies")("UserLogin_Style_Num")%>.css" rel="stylesheet" type="text/css">
<head>
<script language="javascript" src="../../FS_Inc/CheckJs.js"></script>
<script language="javascript" src="../../FS_Inc/prototype.js"></script>
<script language="javascript" src="../../FS_Inc/PublicJS.js"></script>
<script language="JavaScript" type="text/javascript" src="../../Editor/FS_scripts/editor.js"></script>
</head>
<body>
<table width="98%" border="0" align="center" cellpadding="1" cellspacing="1" class="table">
<tr>
<td>
<!--#include file="../top.asp" -->
</td>
</tr>
</table>
<table width="98%" height="135" border="0" align="center" cellpadding="1" cellspacing="1" class="table">
<tr class="back">
<td colspan="2" class="xingmu" height="26">
<!--#include file="../Top_navi.asp" -->
</td>
</tr>
<tr class="back">
<td width="18%" valign="top" class="hback">
<div align="left">
<!--#include file="../menu.asp" -->
</div>
</td>
<td width="82%" valign="top" class="hback">
<table width="100%" border="0" align="center" cellpadding="5" cellspacing="1" class="table">
<tr>
<td class="hback_1"><a href="contrManage.asp">稿件管理</a> | <font color="#FF0000">編輯稿件</font></td>
</tr>
<tr>
<td>
<form name="contrForm" action="contrAction.asp?action=<%=action%>&id=<%=id%>" method="post">
<table width="100%" border="0" align="center" cellpadding="1" cellspacing="1" class="table">
<tr>
<td align="right" class="hback" width="15%">標題:</td>
<td class="hback">
<input type="text" name="txt_ContTitle" id="txt_ContTitle" value="<%=contrObj.ContTitle%>" style="width:60%"
onfocus="Do.these('txt_ContTitle',function(){ return isEmpty('txt_ContTitle','span_title')})"
onKeyUp="Do.these('txt_ContTitle',function(){ return isEmpty('txt_ContTitle','span_title')})"
/>
<span id="span_title"></span></td>
</tr>
<tr>
<td align="right" class="hback">副標題:</td>
<td align="left" class="hback">
<input type="text" name="txt_subTitle" style="width:60%" value="<%=contrObj.subTitle%>" onFocus="this.className='RightInput'">
</td>
</tr>
<tr class="hback">
<td align="right">正文:</td>
<td aling="left">
<!--編輯器開始-->
<pre id="idTemporary" name="idTemporary" style="display:none"><%=Server.HTMLEncode(contrObj.ContContent)%></pre>
<script language="JavaScript">
<!--
var FS_Edit1 = new InnovaEditor("FS_Edit1");
FS_Edit1.cmdAssetManager="modalDialogShow('../../<% = G_USER_DIR %>/CommPages/SelectPic.asp?CurrPath=<% = str_CurrPath %>&f_UserNumber=<%=FS_User.UserNumber%>',670,450)";
FS_Edit1.width="100%";
FS_Edit1.height="400";
FS_Edit1.btnFlash=true;
FS_Edit1.btnMedia=true;
FS_Edit1.RENDER($("idTemporary").innerHTML);
//-->
</script>
<textarea name="txt_content" style="display:none" ></textarea>
<!--編輯器結束-->
<span id="span_content"></span></td>
</tr>
<tr>
<td align="right" class="hback">備注:</td>
<td align="left" class="hback">
<textarea name="txt_OtherContent" rows="5" style="width:80%" onFocus="this.className='RightInput'"><%=contrObj.OtherContent%></textarea>
</td>
</tr>
<tr>
<%
Dim classRs,ClassCName,MainClassName
if contrObj.ClassID<>"" then
Set ClassRs=User_Conn.execute("select ClassCName from FS_ME_InfoClass where classid="&contrObj.ClassID)
if not ClassRs.eof then
ClassCName=ClassRs("ClassCName")
Else
ClassCName=""
End if
Else
ClassCName=""
End if
if contrObj.MainID<>"" then
Set ClassRs=Conn.execute("select ClassName from FS_NS_NewsClass where id="&contrObj.MainID&" and isConstr=1")
if not ClassRs.eof then
MainClassName=ClassRs("ClassName")
Else
MainClassName=""
End if
Else
MainClassName=""
End if
if isNull(classRs) then classRs.close:set classRs=nothing
%>
<td align="right" class="hback">信息分類:</td>
<td align="left" class="hback">
<input type="text" name="txt_Class" style="width:60%" readonly value="<%=ClassCName%>"/>
<input type="hidden" name="txt_ClassID" style="width:60%" value="<%=contrObj.ClassID%>">
<button onClick="SelectClass()">選擇分類</button>
<span id="span_class"><font color="#FF0000">*</font></span></td>
</tr>
<tr>
<td align="right" class="hback">主站分類:</td>
<td align="left" class="hback">
<input type="text" name="txt_mainClass" style="width:60%" readonly value="<%=MainClassName%>" />
<%
Dim tmpRs,Str_MainID
if contrObj.MainID<>"" then
Set tmpRs=Conn.execute("select Classid from FS_NS_NewsClass where id="&contrObj.MainID&" and isConstr=1")
if not tmpRs.eof then
Str_MainID=tmpRs(0)
End if
tmpRs.close
else
Str_MainID=""
end if
Set tmpRs=nothing
%>
<input type="hidden" name="txt_mainClassID" style="width:60%" value="<%=Str_MainID%>">
<button onClick="SelectMainClass()">選擇分類</button>
<span id="span_Mainclass"><font color="#FF0000">*</font></span></td>
</tr>
<tr>
<td align="right" class="hback">關鍵字:</td>
<td align="left" class="hback">
<textarea name="txt_KeyWords" id="txt_KeyWords" rows="5" style="width:80%" onFocus="this.className='RightInput'" onKeyUp="ReplaceDot('txt_KeyWords')"><%=contrObj.KeyWords%></textarea>
</td>
</tr>
<tr>
<td align="right" class="hback">發布到總站:</td>
<td align="left" class="hback">
<p>
<label>
<input type="radio" name="rad_IsPublic" value="1" <%if contrObj.IsPublic="1" then Response.Write("checked")%>>
是</label>
<label>
<input type="radio" name="rad_IsPublic" value="0" <%if contrObj.IsPublic<>"1" then Response.Write("checked")%>>
否</label>
</p>
</td>
</tr>
<tr>
<td align="right" class="hback">信息級:</td>
<td align="left" class="hback">
<select name="sel_InfoType">
<option value="0" <%if contrObj.InfoType="0" then Response.Write("selected")%>>普通</option>
<option value="1" <%if contrObj.InfoType="1" then Response.Write("selected")%>>優先</option>
<option value="2" <%if contrObj.InfoType="2" then Response.Write("selected")%>>加急</option>
</select>
</td>
</tr>
<tr>
<td align="right" class="hback">類型:</td>
<td align="left" class="hback">
<select name="sel_ContSytle" id="sel_ContSytle">
<option value="0" <%if contrObj.ContSytle="0" then Response.Write("selected")%>>原創</option>
<option value="1" <%if contrObj.ContSytle="1" then Response.Write("selected")%>>轉載</option>
<option value="3" <%if contrObj.ContSytle="3" then Response.Write("selected")%>>代理</option>
</select>
</td>
</tr>
<tr>
<td align="right" class="hback">鎖定:</td>
<td align="left" class="hback">
<p>
<label>
<input type="radio" name="rad_IsLock" value="1" <%if contrObj.IsLock="1" then Response.Write("checked")%>>
是</label>
<label>
<input type="radio" name="rad_IsLock" value="0" <%if contrObj.IsLock<>"1" then Response.Write("checked")%>>
否</label>
</p>
</td>
</tr>
<tr>
<td align="right" class="hback">推薦:</td>
<td align="left" class="hback">
<label>
<input type="radio" name="rad_isTF" value="1" <%if contrObj.isTF="1" then Response.Write("checked")%>>
是</label>
<label>
<input type="radio" name="rad_isTF" value="0" <%if contrObj.isTF<>"1" then Response.Write("checked")%>>
否</label>
</td>
</tr>
<tr>
<td align="right" class="hback">圖片:</td>
<td align="left" class="hback">
<input type="text" name="txt_img" id="txt_img" value="<%=contrObj.PicFile%>" style="width:60%">
<button onClick="javascript:OpenWindowAndSetValue('../CommPages/SelectPic.asp?CurrPath=<% = str_CurrPath %>&f_UserNumber=<% = session("FS_UserNumber")%>',500,320,window,$('txt_img'));">選擇圖片</button>
</td>
</tr>
<tr>
<td align="right" class="hback"> </td>
<td align="left" class="hback">
<input type="Button" name="contr_Submit" value="提交" onClick="mySubmit(this.form)">
<input type="Button" name="contr_reset" value="重置" onClick="javascript:if(confirm('是否重設表單?'))$('contrForm').reset()">
</td>
</tr>
</table>
</form>
</td>
</tr>
</table>
</td>
</tr>
<tr class="back">
<td height="20" colspan="2" class="xingmu">
<div align="left">
<!--#include file="../Copyright.asp" -->
</div>
</td>
</tr>
</table>
</body>
</html>
<%
Set Fs_User = Nothing
Set User_Conn=nothing
Set Conn=nothing
%>
<script language="javascript">
<!--
//獲得主站分類
function SelectMainClass()
{
var ReturnValue='',TempArray=new Array();
ReturnValue = OpenWindow('lib/SelectClassFrame.asp?rad'+Math.random(),400,300,window);
if (ReturnValue.indexOf('***')!=-1)
{
TempArray = ReturnValue.split('***');
$('txt_mainClassID').value=TempArray[0]
$('txt_mainClass').value=TempArray[1]
}
}
//獲得分類
function SelectClass()
{
var ReturnValue='',TempArray=new Array();
ReturnValue = OpenWindow('lib/SelectMyClassFrame.asp?rad'+Math.random(),400,300,window);
if (ReturnValue.indexOf('***')!=-1)
{
TempArray = ReturnValue.split('***');
$('txt_ClassID').value=TempArray[0]
$('txt_Class').value=TempArray[1]
}
}
//提交表單
function mySubmit(FormObj)
{
FormObj.txt_content.value=FS_Edit1.getXHTMLBody();
var flag1=isEmpty('txt_ContTitle','span_title');
var flag2=isEmpty('txt_Content','span_content');
var flag3=isEmpty('txt_Class','span_class');
var flag4=isEmpty('txt_mainClass','span_Mainclass');
if(flag1&&flag2&&flag3&&flag4)
{
FormObj.submit();
}
}
-->
</script>
<!-- Powered by: FoosunCMS4.0系列,Company:Foosun Inc. -->
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -