editinformation.asp

来自「top-cms内容管理系统」· ASP 代码 · 共 257 行

ASP
257
字号
<%
'###########################################################################################
'*  程序名称: Top-CMS
'*---------------------------------------------------------------------------------------
'*  系统版本: 1.0 0215
'*  版权所有: www.Net-Develop.com
'*  程序设计: 江南行客
'*  联系方式:
'*            OICQ:2503086
'*            EMAIL:net-oa@sohu.com
'*  网站地址: 
'*            http://www.net-develop.com  
'*            http://www.top-cms.com   
'*---------------------------------------------------------------------------------------
'*  Copyright 2004 www.net-develop.com - All Rights Reserved.
'###########################################################################################
%>
<!--#include file="../common/common.asp" -->
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script language="JavaScript" id="clientEventHandlersJS" src="../editor/inc/editjs.js"></script>
<link rel="stylesheet" href="../css/style.css">
<link rel="stylesheet" href="../editor/inc/editor.css" type="text/css">
<style type="text/css">
<!--
.active {  font-weight: bold;cursor:default;color:#F5F5F5;}
.unactive {  color: #dddddd; text-decoration: underline;cursor:hand;}
.uuu{position:relative; width:100%; height:expression(body.offsetHeight-t1.offsetHeight-2); z-index:1; left: 0px; top: 0px; overflow-x:hidden;overflow-y:scroll;}
.uuuu{position:relative; width:100%; height:expression(body.offsetHeight-t1.offsetHeight-2); z-index:1; left: 0px; top: 0px; scroll:no}
-->
</style>
<script>
function MM_Change(selObj){
	if (selObj==1){
		ChangeDisplay(a,c2);
		a1.className="active";
		b1.className="unactive";
	}else{
		ChangeDisplay(c2,a);
		a1.className="unactive";
		b1.className="active";
	}
}
function ChangeDisplay(V,H){
	var aChildren = eval(H);
	for(i=0; i < aChildren.length; i++) {
		aChildren[i].className = "hidden"
	}
	var aChildren1 = eval(V);
	for(i=0; i < aChildren1.length; i++) {
		aChildren1[i].className = "";
	}
}

 function MM_TempValue(from,to) {
 	var tempValue;
	tempValue="";
	for (var i=0; i<from.options.length; i++) {
		var o = from.options[i];
		if (o.selected) {
			tempValue=tempValue + o.value + ",";
		}
	}
	to.value=tempValue;
}


</script>
</head>
<body bgcolor="#FFFFFF" text="#000000">
<%

Set objCMS = Server.CreateObject("TopCMS.EditInformation")
X=objCMS.ChkString(request("X"),"U")
if objCMS.ChkAdminPower then

	cID=objCMS.ChkString(replace(Request("cID")," ",""),"U")
	nT=objCMS.ChkString(Request("nT"),"U")
	P=objCMS.ChkString(Request("P"),"U")
	t=objCMS.ChkString(Request("t"),"U")
	X=objCMS.ChkString(Request("X"),"U")
	SystemI_Init
	objCMS.InfoCensor=InfoCensor 
	objCMS.OpenDB()
	
	If Request.ServerVariables("REQUEST_METHOD")="POST" and X<>"T" Then
		objCMS.SaveInformation()
else
	sID=objCMS.ChkString(Request("sID"),"U")
	iID=objCMS.ChkString(Request("iID"),"U")
	nT=objCMS.ChkString(Request("nT"),"U")
	P=objCMS.ChkString(Request("P"),"U")

	if UCase(nT)="EDIT" and iID<>"" then
		objCMS.EditInformation sID, iID
	else
		objCMS.EditInformation sID, 0
	end if
	if objCMS.iStartDate="" then objCMS.iStartDate=date
	if objCMS.iEndDate="" then objCMS.iEndDate=Date+30
	%>
<form name="form1" method="post" action="editinformation.asp" enctype="multipart/form-data">
  <table width="100%" border="1" bordercolor="#999999" cellspacing="0" cellpadding="2" align="center">
    <tr> 
      <td colspan="2" background="../Images/default_nav.gif"><span onclick="MM_Change(1);" id="a1" class="active">信息属性</span> 
        | <span onclick="MM_Change(2);" id="b1" class="unactive">信息内容</span></td>
    </tr>
  </table>
  <%objCMS.EditMenu%>
  <table width="100%" border="1" bordercolor="#999999" cellspacing="0" cellpadding="2" align="center">
    <tr id="a"> 
      <td colspan="2" bgcolor="#EEEEEE">信息管理 -&gt; <%= objCMS.Nav%> </td>
    </tr>
    <tr bgcolor="#EEEEEE" id="a"> 
      <td width="200" align="right">所属类别:</td>
      <td> 
        <%
		objCMS.BelongCat(sID)
		
		%>
      </td>
    </tr>
   
    <tr id="a"> 
      <td width="200" align="right">套用模板:</td>
      <td> 
        <%
		
		objCMS.InfoTemplate()
		%>
      </td>
    </tr>
    <tr id="a"> 
      <td width="200" align="right" bgcolor="#EEEEEE">信息标题:</td>
      <td bgcolor="#EEEEEE"> 
        <input type="text" name="iTitle" size="45" maxlength="255" value="<%=objCMS.iTitle%>">
      </td>
    </tr>
    <tr id="a"> 
      <td align="right">信息摘要:</td>
      <td> 
        <textarea name="iCompendium" cols="45" rows="3"><%=objCMS.iCompendium%></textarea>
      </td>
    </tr>
    <tr id="a"> 
      <td align="right" bgcolor="#EEEEEE">信息来源:</td>
      <td bgcolor="#EEEEEE"> 
        <input type="text" name="iFrom" size="24" maxlength="50" value="<%= objCMS.iFrom %>">
      </td>
    </tr>
    <tr id="a"> 
      <td width="200" align="right">信息关键字:</td>
      <td> 
        <input type="text" name="iKey" size="15" maxlength="100" value="<%= objCMS.iKey %>">
      </td>
    </tr>
    <tr id="a"> 
      <td width="200" align="right" bgcolor="#EEEEEE">所属专题:</td>
      <td bgcolor="#EEEEEE"> 
        <%
		objCMS.BelongClass()
		%>
      </td>
    </tr>
    <tr id="a"> 
      <td align="right">信息作者:</td>
      <td> 
        <input type="text" name="iAuthor" size="15" maxlength="100" value="<%= objCMS.iAuthor %>">
      </td>
    </tr>
    <tr id="a"> 
      <td align="right" bgcolor="#EEEEEE">信息编辑:</td>
      <td bgcolor="#EEEEEE"> 
        <input type="text" name="iEditer" size="15" maxlength="100" value="<%= objCMS.iEditer %>">
      </td>
    </tr>
    <tr id="a"> 
      <td align="right">生效日期:</td>
      <td> 
        <input type="text" name="iStartDate" size="15" maxlength="100" value="<%= objCMS.iStartDate %>">
      </td>
    </tr>
    <tr id="a"> 
      <td align="right" bgcolor="#EEEEEE">过期日期:</td>
      <td bgcolor="#EEEEEE"> 
        <input type="text" name="iEndDate" size="15" maxlength="100" value="<%= objCMS.iEndDate %>">
      </td>
    </tr>
    <tr id="a"> 
      <td align="right">信息属性:</td>
      <td> 
        <input type="checkbox" name="iTop" value="1" <%if objCMS.iTop then response.write " checked"%>>
        固顶信息<br>
        <input type="checkbox" name="iSetup1" value="0" <%if instr(objCMS.iSetup,"0")>0 then response.write " checked"%>>
        推荐信息<br>
        <input type="checkbox" name="iSetup2" value="2" <%if instr(objCMS.iSetup,"2")>0 then response.write " checked"%>>
        显示相关信息 
        <%if InfoCensor<>1 then %>
	<br>
        <input type="checkbox" name="iSetup3" value="1" <%if instr(objCMS.iSetup,"1")>0 then response.write " checked"%>>
        <font color="#0000FF"> 需要审核 </font> 
	<%end if%>
	<br>
        <input type="checkbox" name="Create" value="1" <%if InfoCensor=1 and objCMS.iCreate<>"1" then response.write " disabled" else response.write " checked"%>>
        <font color="#0000FF"> 直接生成页面</font>
	<br>
     <input type="checkbox" name="InfoUrl" value="1">
        <font color="#FF0000"> 直接获取外网信息图片 </font> <font color="#999999">(信息直接从别的网站拷贝且含有图片)</font></td>
    </tr>
    <tr id="a"> 
      <td align="right" bgcolor="#EEEEEE">信息图片:</td>
      <td bgcolor="#EEEEEE"> 
        <%if UCase(nT)="EDIT" and objCMS.iImg<>"" then
	  text="重新"%>
        <img src="<%response.write AbsWebPath & objCMS.iImg%>"> 
        <br>
		<%end if%>
	  <input type="checkbox" name="ReUP" value="1" onclick="if (this.checked==true){iImg.className='';}else{iImg.className='hidden';}"><%=text%>上传
        <input type="file" name="iImg" id="iImg" class="hidden">
	  
      </td>
    </tr>
	<%=objCMS.ListExpand%>
    <tr> 
      <td colspan="2" id="c2" class="hidden"> 
        <%
		objCMS.Editor
		%>
        
      </td>
    </tr>
    <tr> 
      <td align="center" colspan="2" bgcolor="#CCCCCC"> 
        <input type="hidden" name="iID" value="<%= iID %>">
        <input type="hidden" name="nT" value="<%= nT %>">
        <input type="hidden" name="P" value="<%= P %>">
        <input type="hidden" name="iDate" value="<%= objCMS.iDate %>">
        <input type="hidden" name="iPage" value="<%= objCMS.iPage %>">
        <input type="hidden" name="oldsID" value="<%= sID %>">
        <input type="submit" name="S1" value=" 提交 ">
        <input type="button" name="S2" value=" 取消 " onclick="history.back();">
      </td>
    </tr>
  </table>
</form>
<%
	end if
	objCMS.CloseDB	
else
	objCMS.OutInfo "对不起,您还没有登录,请先登录","Login"
end if
set objCMS=nothing
%>
</body>
</html>

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?