⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 newsedit.asp

📁 zheng fu wang zhan gong neng qi quan
💻 ASP
📖 第 1 页 / 共 5 页
字号:
<!--#include file="conn.asp"-->
<!--#include file="ConnUser.asp"-->
<!--#include file="config.asp"-->
<!--#include file="char.inc"-->
<!--#include file="chkuser.asp" -->
<!--#include file="ChkURL.asp"-->
<%
if not(request.cookies(eChuang)("KEY")="super" or request.cookies(eChuang)("KEY")="typemaster" or request.cookies(eChuang)("KEY")="bigmaster" or request.cookies(eChuang)("key")="smallmaster" or request.cookies(eChuang)("key")="selfreg" or (request.cookies(eChuang)("KEY")="check" and checkmod="1"))  then
	Show_Err("对不起,您的后台管理权限不够操作!")
	response.end
else
	dim jingyong,NewsID

	set rs=server.createobject("adodb.recordset")
	sql="select * from "& db_User_Table &" where username='"&request.cookies(eChuang)("username")&"'"
	rs.open sql,ConnUser,1,3
	jingyong=rs("jingyong")
	rs.close
	set rs=nothing
	
	set rs8=server.createobject("adodb.recordset")
	sql8="select * from "& db_System_Table
	rs8.open sql8,conn,1,3
	name=rs8("name")
	
	NewsID=ChkRequest(request("NewsID"),1)	'防注入
	if NewsID="" then
		Show_Err("对不起,要修改的文章ID不能为空!")
		response.end
	end if
	
	set rs=server.CreateObject ("ADODB.RecordSet")
	rs.Source="select * from "& db_News_Table &" where NewsID=" & NewsID
	rs.Open rs.source,conn,3,1
	if rs.EOF then
		Show_Err("对不起,文章ID超出范围!!")
		response.end
	end if

	if rs("editor")<>request.cookies(eChuang)("username") and request.cookies(eChuang)("KEY")<>"super" And(request.cookies(eChuang)("KEY")<>"check" and checkmod="1" ) then
		Show_Err("对不起,文章所有权ID超出范围!!")
		response.end
	end if

	newsrelated=rs("newsrelated")
	typeid=rs("typeid")
	bigclassid=rs("bigclassid")
	If (isnull(bigclassid) or isempty(bigclassid) or bigclassid="") Then
		bigclassid = 0
	End if

	smallclassid=rs("smallclassid")
	if smallclassid<>"" then
	set rs3=server.createobject("adodb.recordset")
	sql3="select * from "& db_SmallClass_Table &" where smallclassid="&smallclassid
	rs3.open sql3,conn,1,3
	master6=rs3("smallclassma")
	if master6<>"" then
	smallmaster6=split(master6,"|")
	 for i=0 to ubound(smallmaster6)
		if request.cookies(eChuang)("username")=trim(smallmaster6(i)) then
		smallclassmaster6=true
		exit for
		else
		smallclassmaster6=false
		end if
	 next
	end if
	 rs3.close
	set rs3=nothing
	end if
	set rs1=server.createobject("adodb.recordset")
	sql1="select * from "& db_BigClass_Table &" where bigclassid="& bigclassid
	rs1.open sql1,conn,1,3
	If (rs1.eof or rs1.bof) Then
		master5= ""
	else
		master5=rs1("bigclassmaster")
	End if
	
	if master5<>"" then
	bigmaster5=split(master5,"|")
	 for i=0 to ubound(bigmaster5)
		if request.cookies(eChuang)("username")=trim(bigmaster5(i)) then
		bigclassmaster5=true
		exit for
		else
		bigclassmaster5=false
		end if
	 next
	end if
	set rs2=server.createobject("adodb.recordset")
	sql2="select * from "& db_Type_Table &" where typeid="&typeid
	rs2.open sql2,conn,1,3
	master4=rs2("typemaster")
	if master4<>"" then
	tmaster4=split(master4,"|")
	 for i=0 to ubound(tmaster4)
		if request.cookies(eChuang)("username")=trim(tmaster4(i)) then
		typemaster4=true
		exit for
		else
		typemaster4=false
		end if
	 next
	end if
	rs2.close
	set rs2=nothing
	rs1.close
	set rs1=nothing
	set rs2=server.CreateObject("ADODB.RecordSet")
	rs2.Source="select * From "& db_BigClass_Table &" Where BigClassid=" &BigClassid
	rs2.Open rs2.Source,conn,1,1
	if rs("smallclassid")<>"" then
	set rs3=server.CreateObject("ADODB.RecordSet")
	rs3.Source="select * From "& db_SmallClass_Table &" Where SmallClassid=" &SmallClassid
	rs3.Open rs3.Source,conn,1,1
	end if
	if rs("checkked")="0" or request.cookies(eChuang)("key")="super" or (request.cookies(eChuang)("key")="bigmaster" and bigclassmaster5=true) or (request.cookies(eChuang)("key")="typemaster" and typemaster4=true) or (request.cookies(eChuang)("key")="check" and checkmod="1") or (modnewsable="1" and request.cookies(eChuang)("key")="smallmaster" and smallclassmaster6=true) or (request.cookies(eChuang)("key")="smallmaster" and rs("checkked")="1" and modnewsable="1" and smallclassmaster6=true) or (request.cookies(eChuang)("key")="selfreg" and jingyong=0 and fabiaomod="1") then
	%>
<html><head>
<meta http-equiv="Content-Language" content="zh-cn">
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<LINK href=site.css rel=stylesheet>
<title><%=copyright%><%=version%>&nbsp;<%=ver%> - 修改文章_建站铺修正版_bbs.jzpu.com</title>
<script language="JavaScript">
<!--
function na_select_form (fname, type_name) 
{
  document.forms[fname].elements[type_name].select()
  document.forms[fname].elements[type_name].focus()
}
function onTable(num) {

	
	
	if(	document.all.frame1.style.visibility == "visible" ) {
		cancelTable();
		return;
	}
	
	var str = "<div id=\"tblsel\" style=\"background-color:#000066;position:absolute;";
	str = str + "width:0;height:0;z-index:-1;\"></div>";
	str = str + makeTable(4, 5);
	str = str + "<div style=\"text-align:center;background-color:menu;font-size: 12px\" id=\"tblstat\">插入表格</div>";
	
	var ifrm = document.frames("frame1");
	var obj=eval("document.all.ae_tbtn"+1);
	var x=0;
	var y=0;

	ifrm.document.body.innerHTML=str;
	

	while(obj.tagName!="BODY") {

		x+=obj.offsetLeft;
		y+=obj.offsetTop;
		obj=obj.offsetParent;

	}	
	
	document.all.frame1.style.pixelTop = y + 24;
	document.all.frame1.style.pixelLeft = x;
	document.all.frame1.style.pixelWidth = 0;
	document.all.frame1.style.pixelHeight = 0;
	document.all.frame1.style.visibility = "visible";
	ae_hot=num;
	document.frames("frame1").document.body.onmouseover = paintTable;	
	document.frames("frame1").document.body.onclick = insertTable;
	if(typeof(document.onmousedown)=="function")
		ae_olddocmd = document.onmousedown;
	else ae_olddoccmd=null;
	
	document.onmousedown = cancelTable;
	DHTMLSafe.onmousedown = cancelTable;
	event.cancelBubble = true;

	ifrm.document.body.onselectstart=new Function("return false;");
	

	document.all.frame1.style.pixelWidth = ifrm.document.all.oTable.offsetWidth + 3
	document.all.frame1.style.pixelHeight = ifrm.document.all.oTable.offsetHeight + 3 +
		ifrm.document.all.tblstat.offsetHeight;

}
function makeTable(rows, cols) {
	var a, b, str, n;
	str = "<table style=\"table-layout:fixed;border-style:solid; cursor:default;\" "; 
	str = str + "id=\"oTable\" cellpadding=\"0\" ";
	str = str + "cellspacing=\"0\" cols=" + cols;
	str = str + " border=6>\n";

	for (a=0;a<rows;a++) {
		str = str + "<tr>\n";
		for(b=0;b<cols;b++) {			
			str = str + "<td width=\"20\">" 
			str = str + "&nbsp;</td>\n";	
		}	
		str = str + "</tr>\n";
	}
	str = str + "</table>"
	return str;
}

function cancelTable() {
	document.onmousedown=null;
	document.all.frame1.style.visibility = "hidden";
	document.all.frame1.style.pixelWidth = 0;
	document.all.frame1.style.pixelHeight = 0;

	if(a==false) return;

	if(typeof(ae_olddocmd)=="function") {
		ae_olddocmd(false);
		document.onmousedown = ae_olddocmd;
	}
	ae_olddocmd = null;

	document.all.frame1.style.pixelWidth = 10;
	document.all.frame1.style.pixelHeight = 10;
	
}

// -->
</script><script language="JavaScript" type="text/JavaScript">
//菜单列表
var menu_table="<table width='100%' cellspacing='0' cellpadding='2'>";
menu_table+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='Images/table_cr.gif' width='16' height='16' align='absmiddle'></td><td><a href='#' onclick='InsertTable()'>插入表格</a></td></tr>";
menu_table+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='Images/table_sx.gif' width='16' height='16' align='absmiddle'></td><td><a href='#' onclick='tableProp()'>表格属性</a></td></tr>";
menu_table+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='Images/table_sx2.gif' width='16' height='16' align='absmiddle'></td><td><a href='#' onclick='cellProp()'>单元格属性</a></td></tr>";
menu_table+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='Images/table_tr.gif' width='16' height='16' align='absmiddle'></td><td><a href='#' onclick='tablecommand(1)'>插入一行</a></td></tr>";
menu_table+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='Images/table_trdel.gif' width='16' height='16' align='absmiddle'></td><td><a href='#' onclick='tablecommand(2)'>删除一行</a></td></tr>";
menu_table+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='Images/table_td.gif' width='16' height='16' align='absmiddle'></td><td><a href='#' onclick='tablecommand(3)'>插入一列</a></td></tr>";
menu_table+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='Images/table_tddel.gif' width='16' height='16' align='absmiddle'></td><td><a href='#' onclick='tablecommand(4)'>删除一列</a></td></tr>";
menu_table+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='Images/table_hby.gif' width='16' height='16' align='absmiddle'></td><td><a href='#' onclick='tablecommand(5)'>向右合并</a></td></tr>";
menu_table+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='Images/table_hbx.gif' width='16' height='16' align='absmiddle'></td><td><a href='#' onclick='tablecommand(6)'>向下合并</a></td></tr>";
menu_table+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='Images/table_cf.gif' width='16' height='16' align='absmiddle'></td><td><a href='#' onclick='tablecommand(7)'>拆分单元格</a></td></tr>";
menu_table+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><a>---</a></td></tr>";
menu_table+="</table>";
var menu_chars="<table width='100%' cellspacing='0' cellpadding='2'>";
menu_chars+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='Images/chars1.gif' width='16' height='16' align='absmiddle'></td><td><a href='#' onclick='InsertChars(0)'>换行符</a></td></tr>";
menu_chars+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='Images/chars2.gif' width='16' height='16' align='absmiddle'></td><td><a href='#' onclick='InsertChars(1)'>版权符号</a></td></tr>";
menu_chars+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='Images/chars3.gif' width='16' height='16' align='absmiddle'></td><td><a href='#' onclick='InsertChars(2)'>注册商标</a></td></tr>";
menu_chars+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='Images/chars4.gif' width='16' height='16' align='absmiddle'></td><td><a href='#' onclick='InsertChars(3)'>商标符号</a></td></tr>";
menu_chars+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='Images/chars5.gif' width='16' height='16' align='absmiddle'></td><td><a href='#' onclick='InsertChars(4)'>圆点</a></td></tr>";
menu_chars+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><a>---</a></td></tr>";
menu_chars+="</table>";

var menu_chars1="<table width='100%' cellspacing='0' cellpadding='2'>";
menu_chars1+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='images/newsface/1.gif' width='13' height='12' align='absmiddle'></td><td><a href='#' onclick='Insertface(0)'>微笑</a></td></tr>";
menu_chars1+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='images/newsface/2.gif' width='13' height='12' align='absmiddle'></td><td><a href='#' onclick='Insertface(1)'>痛哭</a></td></tr>";
menu_chars1+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='images/newsface/3.gif' width='17' height='12' align='absmiddle'></td><td><a href='#' onclick='Insertface(2)'>高兴</a></td></tr>";
menu_chars1+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='images/newsface/4.gif' width='13' height='12' align='absmiddle'></td><td><a href='#' onclick='Insertface(3)'>傻笑</a></td></tr>";
menu_chars1+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='images/newsface/5.gif' width='13' height='12' align='absmiddle'></td><td><a href='#' onclick='Insertface(4)'>酷 !</a></td></tr>";
menu_chars1+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='images/newsface/6.gif' width='13' height='12' align='absmiddle'></td><td><a href='#' onclick='Insertface(5)'>伤心</a></td></tr>";
menu_chars1+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='images/newsface/7.gif' width='13' height='12' align='absmiddle'></td><td><a href='#' onclick='Insertface(6)'>汗 !</a></td></tr>";
menu_chars1+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='images/newsface/8.gif' width='13' height='12' align='absmiddle'></td><td><a href='#' onclick='Insertface(7)'>动心</a></td></tr>";
menu_chars1+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='images/newsface/9.gif' width='13' height='12' align='absmiddle'></td><td><a href='#' onclick='Insertface(8)'>嚷嚷</a></td></tr>";
menu_chars1+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='images/newsface/10.gif' width='13' height='12' align='absmiddle'></td><td><a href='#' onclick='Insertface(9)'>害羞</a></td></tr>";
menu_chars1+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><a>---</a></td></tr>";
menu_chars1+="</table>";

var menu_eq="<table width='100%' cellspacing='0' cellpadding='2'>";
menu_eq+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='Images/eq1.gif' width='16' height='16' align='absmiddle'></td><td><a href='#' onclick='InsertEQ()'>插入公式</a></td></tr>";
menu_eq+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><img src='Images/eq2.gif' width='16' height='16' align='absmiddle'></td><td><a href='#' onclick='InstallEQ()'>安装公式编辑器插件</a></td></tr>";
menu_eq+="<tr onmouseout='scolor(this)' onmouseover='rcolor(this)'><td><a>-</a></td></tr>";
menu_eq+="</table>";

//下拉菜单相关代码
 var h;
 var w;
 var l;
 var t;
 var topMar = 1;
 var leftMar = -2;
 var space = 1;
 var isvisible;
 var MENU_SHADOW_COLOR='#E1F4EE';//定义下拉菜单阴影色
 var global = window.document
 global.fo_currentMenu = null
 global.fo_shadows = new Array

function HideMenu() 
{
 var mX;
 var mY;
 var vDiv;
 var mDiv;
	if (isvisible == true)
{
		vDiv = document.all("menuDiv");
		mX = window.event.clientX + document.body.scrollLeft;
		mY = window.event.clientY + document.body.scrollTop;
		if ((mX < parseInt(vDiv.style.left)) || (mX > parseInt(vDiv.style.left)+vDiv.offsetWidth) || (mY < parseInt(vDiv.style.top)-h) || (mY > parseInt(vDiv.style.top)+vDiv.offsetHeight)){
			vDiv.style.visibility = "hidden";
			isvisible = false;
		}
}
}

function ShowMenu(vMnuCode,tWidth) {
	vSrc = window.event.srcElement;
	vMnuCode = "<table id='submenu' cellspacing=1 cellpadding=3 style='width:"+tWidth+"' class=menu onmouseout='HideMenu()'><tr height=23><td nowrap align=left class=MenuBody>" + vMnuCode + "</td></tr></table>";

	h = vSrc.offsetHeight;
	w = vSrc.offsetWidth;
	l = vSrc.offsetLeft + leftMar+2   ;
	t = vSrc.offsetTop + topMar + h + space-32;
	vParent = vSrc.offsetParent;
	while (vParent.tagName.toUpperCase() != "BODY")
	{
		l += vParent.offsetLeft;
		t += vParent.offsetTop;
		vParent = vParent.offsetParent;
	}

	menuDiv.innerHTML = vMnuCode;
	menuDiv.style.top = t;
	menuDiv.style.left = l;
	menuDiv.style.visibility = "visible";
	isvisible = true;
    makeRectangularDropShadow(submenu, MENU_SHADOW_COLOR, 4)
}

⌨️ 快捷键说明

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