html_edit.asp
来自「很好的企业网站管理系统!可以适应各种不同的小型企业!」· ASP 代码 · 共 430 行 · 第 1/2 页
ASP
430 行
<%Admin="InfoAdd"%>
<!--#include file="check.asp"-->
<!--#include file="mdb_path_info.asp"-->
<!--#include file="config.asp"-->
<%
'#################################################################
'# 晓宇听幽网站内容管理系统(xoYu CMS)
'#
'# 版权所有: 晓宇听幽工作室
'#
'# 制作人 : xoyu(晓宇)
'#
'# 主页地址: http://www.xoYu.com 晓宇听幽工作室
'#
'#【版权声明】
'#################################################################
'# 本软体为共享软体(shareware)提供个人网站免费使用,请勿非法修改,
'# 转载,散播,或用于其他图利行为,并请勿删除版权声明。
'# 如果您的网站正式起用了这个脚本,请您通知我们,以便我们能够知晓!
'# 如果可能,请在您的网站做上我们的链接,希望能给予合作。谢谢!
'#################################################################
'# 程序名称:晓宇听幽网站内容管理系统·网站内容管理系统
'# 英文名称:xoYu News 2004 Professional For xoYu CMS
'# 程序创建时间:2003-7-10
'# 程序完成时间:2003-9-11
'# 最后修改时间:2003-11-15
'#################################################################
'# 请您尊重我们的劳动和版权,不要删除以上的版权声明部分,谢谢合作
'# 如有任何问题请到我们的论坛(http://www.xoyu.com/bbs/)告诉我们。
'#################################################################
if request("id")="" then errmsg=errmsg & ""文章类别"必选! \n"
set rs=server.CreateObject("ADODB.RecordSet")
if xoYuStudioAdminDj=2 and request("id")<>"" then
rs.open "select * from info where id="&request("id"),conn,1,1
tidx=rs("tid")
rs.close
rs.open "select * from infotype where id="&tidx,conn,1,1
TM=rs("typemaster")
if instr("|"&TM&"|","|"&xoYuStudioAdminName&"|")<1 then errmsg=errmsg & ""您没有对本栏目修改文章的权限!" \n"
rs.close
end if
if xoYuStudioAdminDj=2 or xoYuStudioAdminDj=3 then
if instr(Session("xoYuStudioAdminAdmin"),"InfoAdmin")>0 then
NotMe=" and user='"&xoYuStudioAdminName&"'"
end if
if instr(Session("xoYuStudioAdminAdmin"),"InfoAdminAll")>0 then
NotMe=""
end if
if instr(Session("xoYuStudioAdminAdmin"),"InfoAdmin")<1 and instr(Session("xoYuStudioAdminAdmin"),"InfoAdminAll")<1 then errmsg=errmsg & ""对不起,您没有修改文章的权限!" \n"
end if
if errmsg<>"" then
response.write("<script>alert('" & errmsg & "');history.go(-1)</script>")
else
savetime=Now()+webtime/24
set rs=server.CreateObject("ADODB.RecordSet")
sql="select * from info where id="&request("id")&""&NotMe&""
rs.open sql,conn,1,1
if rs.eof and rs.bof then
response.write "<b>错误:</b>此ID号的文章已被删除或不是你添加的!"
response.end
else
tid=rs("tid")
sid=rs("sid")
title=rs("title")
se=rs("se")
pic=rs("pic")
mbname=rs("mbname")
form_user=rs("form_user")
form_url=rs("form_url")
info=rs("info")
xoYuNewsDJ=rs("dj")
commend=rs("commend")
marquee=rs("marquee")
bingpai=rs("bingpai")
fileming=year(rs("date"))&month(rs("date"))&day(rs("date"))&hour(rs("date"))&minute(rs("date"))&second(rs("date"))
end if
rs.close
rs.open "select * from infotype where id="&tid,conn,1,1
if not rs.eof then
sortid=rs("id")
tname=rs("tname")
end if
rs.close
TT=TT & "<a class=xoYuStudioSort href=html_listlb.asp><font color=""#FFFFFF"">文章首页</font></a>"
if request("id")<>"" then
rs.open "select * from infotype where id="&tid,conn,1,1
if not rs.EOF then
TN=split(rs("tname"),"|")
TI=split(rs("ts"), ",")
for i = 0 to ubound(TN)-1
TT=TT & ">> <a class=xoYuStudioSort href=html_listlb.asp?id="&TI(i)&"><font color=""#FFFFFF"">"&TN(i)&"</font></a>"
next
tj=rs("tj")
end if
rs.close
end if
thistype=TT
rs.open ("select * from infotype where tj>1 order by ts"),conn,1,1
tn=""
do while not rs.eof
tname2=replace(rs("tname"),"|","->")
if rs("tj")=2 and rs("tn")<>tn then
i=i+1
if i=2 then
i=0
color="#808000"
else
color="#000000"
end if
end if
tn=rs("tn")
typelist=typelist&"<option style='COLOR:"&color&"' value='"&rs("id")&"'>"&tname2&"</option>"
rs.MoveNext
loop
rs.close
rs.open "select * from specialx where id="&sid,conn,1,1
if not rs.eof then
SPsortid=rs("id")
sname=rs("sname")
end if
rs.close
SS=SS & "<a class=xoYuStudioSort href=SpecialLB.asp>专题首页</a>"
if request("SPid")<>"" then
rs.open "select * from specialx where id="&request("spid"),conn,1,1
if not rs.EOF then
TNs=split(rs("sname"),"|")
TIs=split(rs("ts"), ",")
for i = 0 to ubound(TNs)-1
SS=SS & ">> <a class=xoYuStudioSort href=SpecialLB.asp?id="&TIs(i)&">"&TNs(i)&"</a>"
next
tjs=rs("tj")
end if
rs.close
end if
thisSPtype=SS
SPtypelist=SPtypelist&"<option style='COLOR:"&color&"' value='0'>不属于任何专题</option>"
rs.open ("select * from specialx where tj>1 order by ts"),conn,1,1
tns=""
do while not rs.eof
sname2=replace(rs("sname"),"|","->")
if rs("tj")=2 and rs("tn")<>tns then
i=i+1
if i=2 then
i=0
color="#808000"
else
color="#000000"
end if
end if
tns=rs("tn")
SPtypelist=SPtypelist&"<option style='COLOR:"&color&"' value='"&rs("id")&"'>"&sname2&"</option>"
rs.MoveNext
loop
rs.close
set rs=nothing
%>
<script language="JavaScript">
<!--
function Dofromsite(addfromsite)
{
var fromsite = document.frmAnnounce.addfromsite.value;
document.frmAnnounce.fromsite.value=fromsite;
document.frmAnnounce.fromsite.focus();
return; }
//-->
</script>
<SCRIPT LANGUAGE="JavaScript">
function AddText(NewCode) {
document.frmAnnounce.body.value+=NewCode
}
function openscriphtml()
{
if (navigator.appName!="Microsoft Internet Explorer")
alert("此功能 Netscape 用户不能使用!")
else
{newwin=window.open('html_editor.htm','','width=544,height=294');
newwin.focus();
}
}
function runEx(){
//alert('请注意,按下确定将生成页面,按下后请稍后....');
var winEx = window.open("", "winEx", "width=300,height=200,status=yes,menubar=yes,scrollbars=yes,resizable=yes"); winEx.document.open("text/html", "replace");
winEx.document.write(unescape(event.srcElement.parentElement.children[2].value));
winEx.document.close();
}
</SCRIPT>
<script language="JavaScript">
<!-- Hide from older browsers...
//Function to format text in the text box
function FormatText(command, option){
frames.message.document.execCommand(command, true, option);
frames.message.focus();
}
//Function to add image
function AddImage(){
imagePath = prompt('请输入图片地址', 'http://');
if ((imagePath != null) && (imagePath != "")){
frames.message.document.execCommand('InsertImage', false, imagePath);
frames.message.focus();
}
frames.message.focus();
}
//Function to clear form
function ResetForm(){
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?