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

📄 newsmanage.asp

📁 东滕网站源码
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<% option explicit %>
<!--#include file="../function1/DBOpen.asp"-->
<%
  if session("purview")="" then
      response.write "错误!!您没有权限或者连接超时,请重新登陆." %>
<a href="../login.asp" target="_top"><b>登陆</b></a> 
<% response.end 
  end if
  dim isedit  '是否在修改状态
  dim color  '表格颜色
  dim sql,rs,rsc
  dim border
  dim borderid,bordername
  dim number  '每页显示的文章数目
  dim auditer  '审核员是否有编辑文章的权限
  dim articlefrom '文章来源
  dim status '新文章添加时的状态
  dim curpage, i,page
  border=""
  color=1

  function invert(str) 
    invert=replace(replace(replace(replace(str,"&lt;","<"),"&gt;",">"),"<br>",chr(13)),"&nbsp;"," ")
end function

  if session("purview")<"99998" then           '检查录入员是否有操作该版面的权限
	  if not cstr(request("typeid"))=cstr(session("purview")) then
	      response.write "错误!!您没有权限或者连接超时,请重新登陆." %>
<a href="../login.asp" target="_top"><b>登陆</b></a> 
<% response.end 
	  end if
  end if

  set rs=server.createobject("adodb.recordset")         '查找每页显示文章数目,审核员权限,文章来源,新文章添加时的状态
  rs.open "select * from news_parameter where parameterid=1",conn,1,1
  if not rs.bof and not rs.eof then
      number=rs("newsnumber")
	  articlefrom=rs("articlefrom")
	  status=rs("newsstatus")
	  if rs("auditer")=1 then
	      auditer=1
	  else
	      auditer=0
	  end if
  else 
      number=5  '默认值
	  auditer=0
	  articlefrom=""
	  status=0
  end if
  rs.close
  set rs=nothing

  isedit=false
  if request("action")="edit" then
      isedit=true
  end if

  if request("bordername")="无专栏文章"  and request("typeid")<>"" then         '查找无专栏文章所属的type
      set rs=server.createobject("adodb.recordset")
      rs.open "select * from border where bordername='无专栏文章' and typeid=" & cstr(request("typeid")),conn,1,1
	  if not rs.bof and not rs.eof then
	      borderid=cstr(rs("borderid"))
	  end if
	  rs.close
	  set rs=nothing
  else
      borderid=cstr(request("borderid"))
  end if

  if request("isaudit")="ok" then '*******通过审核**********
     sql="update news set audit=1" & ",auditer='" & cstr(session("name")) & "'  where newsid=" & cstr(request("newsid"))
	 conn.execute sql
  end if
  if request("isaudit")="cancel" then '*******取消审核**********
     sql="update news set audit=0" & ",auditer='" & cstr(session("name")) & "'  where newsid=" & cstr(request("newsid"))
	 conn.execute sql
  end if

  if request("action")="del" then  '*****************删除文章******************
     sql="delete from news where newsid=" & cstr(request("newsid"))
	 conn.execute sql
     sql="delete from review where newsid=" & cstr(request("newsid"))
	 conn.execute sql %>
<script language=vbscript>
	     msgbox "操作成功!!该内容及相关评论已删除!" 
     </script>
<% end if
%><html>
<head> 
<script src="../function/openwin.js"></script>
<title>文章管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<STYLE>TABLE {FONT-SIZE: 12px;COLOR: #000000; FONT-FAMILY: 宋体;LINE-HEIGHT: 180%}
.Shadow_white {FONT-SIZE: 14pt; FILTER: dropshadow(color:black, offx=1, offy=1, positive=1); WIDTH: 100%; COLOR: #000000; FONT-FAMILY: 宋体; POSITION: relative}
.Shadow_white2 {FONT-SIZE: 10pt; FILTER: dropshadow(color:black, offx=1, offy=1, positive=1); WIDTH: 100%; COLOR: #000000; FONT-FAMILY: 宋体; POSITION: relative}
A:link {COLOR: #000000; TEXT-DECORATION: none}
A:active {COLOR: #000000; TEXT-DECORATION: none}
A:visited {COLOR: #000000; TEXT-DECORATION: none}
A:hover {COLOR: #ff0000; TEXT-DECORATION: underline}
</STYLE></head>
<body> 
<script language=javascript>
helpstat = false;
stprompt = true;
basic = false;
function AddText(NewCode) {
document.frm1.content.value+=NewCode
}
function bold() {
	if (helpstat) {
		alert("加粗标记\n使文本加粗.\n用法: [b]这是加粗的文字[/b]");
	} else if (basic) {
		AddTxt="[b][/b]";
		AddText(AddTxt);
	} else {  
		txt=prompt("文字将被变粗.","文字");     
		if (txt!=null) {           
			AddTxt="[b]"+txt;
			AddText(AddTxt);
			AddTxt="[/b]";
			AddText(AddTxt);
		}       
	}
}
function italicize() {
	if (helpstat) {
		alert("斜体标记\n使文本字体变为斜体.\n用法: [i]这是斜体字[/i]");
	} else if (basic) {
		AddTxt="[i][/i]";
		AddText(AddTxt);
	} else {   
		txt=prompt("文字将变斜体","文字");     
		if (txt!=null) {           
			AddTxt="[i]"+txt;
			AddText(AddTxt);
			AddTxt="[/i]";
			AddText(AddTxt);
		}	        
	}
}
function underline() {
  	if (helpstat) {
		alert("下划线标记\n给文字加下划线.\n用法: [u]要加下划线的文字[/u]");
	} else if (basic) {
		AddTxt="[u][/u]";
		AddText(AddTxt);
	} else {  
		txt=prompt("下划线文字.","文字");     
		if (txt!=null) {           
			AddTxt="[u]"+txt;
			AddText(AddTxt);
			AddTxt="[/u]";
			AddText(AddTxt);
		}	        
	}
}
function center() {
 	if (helpstat) {
		alert("对齐标记\n使用这个标记, 可以使文本左对齐、居中、右对齐.\n用法: [align=center|left|right]要对齐的文本[/align]");
	} else if (basic) {
		AddTxt="[align=center|left|right][/align]";
		AddText(AddTxt);
	} else {  
		txt2=prompt("对齐样式\n输入 'center' 表示居中, 'left' 表示左对齐, 'right' 表示右对齐.","center");               
		while ((txt2!="") && (txt2!="center") && (txt2!="left") && (txt2!="right") && (txt2!=null)) {
			txt2=prompt("错误!\n类型只能输入 'center' 、 'left' 或者 'right'.","");               
		}
		txt=prompt("要对齐的文本","文本");     
		if (txt!=null) {          
			AddTxt="\r[align="+txt2+"]"+txt;
			AddText(AddTxt);
			AddTxt="[/align]";
			AddText(AddTxt);
		}	       
	}
}
function hyperlink() {
	if (helpstat) {
		alert("超级链接标记\n插入一个超级链接标记\n使用方法: [url]http://www.mycoolest.net[/url]\nUSE: [url=http://www.mycoolest.net]链接文字[/url]");
	} else if (basic) {
		AddTxt="[url][/url]";
		AddText(AddTxt);
	} else { 
		txt2=prompt("链接文本显示.\n如果不想使用, 可以为空, 将只显示超级链接地址. ",""); 
		if (txt2!=null) {
			txt=prompt("超级链接.","http://");      
			if (txt!=null) {
				if (txt2=="") {
					AddTxt="[url]"+txt;
					AddText(AddTxt);
					AddTxt="[/url]";
					AddText(AddTxt);
				} else {
					AddTxt="[url="+txt+"]"+txt2;
					AddText(AddTxt);
					AddTxt="[/url]";
					AddText(AddTxt);
				}         
			} 
		}
	}
}
function mail() {
	if (helpstat) {
		alert("Email 标记\n插入 Email 超级链接\n用法1: [email]webmaster@mycoolest.net[/email]\n用法2: [email=webmaster@mycoolest.net]涅槃[/email]");
	} else if (basic) {
		AddTxt="[email][/email]";
		AddText(AddTxt);
	} else { 
		txt2=prompt("链接显示的文字.\n如果为空,那么将只显示你的 Email 地址",""); 
		if (txt2!=null) {
			txt=prompt("Email 地址.","name@domain.com");      
			if (txt!=null) {
				if (txt2=="") {
					AddTxt="[email]"+txt+"[/email]";
				} else {
					AddTxt="[email="+txt+"]"+txt2;
					AddText(AddTxt);
					AddTxt="[/email]";
				} 
				AddText(AddTxt);	        
			}
		}
	}
}
function image() {
	if (helpstat){
		alert("图片标记\n插入图片\n用法: [img]http://www.mycoolest.net/iamge/logo.gif[/img]");
	} else if (basic) {
		AddTxt="[img][/img]";
		AddText(AddTxt);
	} else {  
		txt=prompt("图片的 URL","http://");    
		if(txt!=null) {            
			AddTxt="\r[img]"+txt;
			AddText(AddTxt);
			AddTxt="[/img]";
			AddText(AddTxt);
		}	
	}
}
function Cdir() {
 	if (helpstat){
		alert("Shockwave 动画\n插入 Shockwave 动画.\n用法: [dir=500,350]Shockwave 文件的地址[/dir]");
	} else if (basic) {
		AddTxt="[dir][/dir]";
		AddText(AddTxt);
	} else {                  
		txt=prompt("Shockwave 文件的地址","");
		if (txt!=null) {             
			AddTxt="[dir=500,350]"+txt;
			AddText(AddTxt);
			AddTxt="[/dir]";
			AddText(AddTxt);
		}        
	}  
}
function Crm() {
 	if (helpstat){
		alert("real player 文件\n插入 real player 文件.\n用法: [rm=500,350]real player 文件的地址[/rm]");
	} else if (basic) {
		AddTxt="[rm][/rm]";
		AddText(AddTxt);
	} else {                  
		txt=prompt("real player 文件的地址","");
		if (txt!=null) {             
			AddTxt="[rm=500,350]"+txt;
			AddText(AddTxt);
			AddTxt="[/rm]";
			AddText(AddTxt);
		}        
	}  
}
function Cwmv() {
 	if (helpstat){
		alert("media player 文件\n插入 wmv 文件.\n用法: [mp=500,350]media player 文件的地址[/mp]");
	} else if (basic) {
		AddTxt="[mp][/mp]";
		AddText(AddTxt);
	} else {                  
		txt=prompt("media player 文件的地址","");
		if (txt!=null) {             
			AddTxt="[mp=500,350]"+txt;
			AddText(AddTxt);
			AddTxt="[/mp]";
			AddText(AddTxt);
		}        
	}  
}
function setfly() {
 	if (helpstat){
		alert("飞翔标记\n使文字飞行.\n用法: [fly]文字为这样文字[/fly]");
	} else if (basic) {
		AddTxt="[fly][/fly]";
		AddText(AddTxt);
	} else {                  
		txt=prompt("飞翔文字","文字");
		if (txt!=null) {             
			AddTxt="[fly]"+txt;
			AddText(AddTxt);
			AddTxt="[/fly]";
			AddText(AddTxt);
		}        
	}  
}
function move() {
	if (helpstat) {
		alert("移动标记\n使文字产生移动效果.\n用法: [move]要产生移动效果的文字[/move]");
	} else if (basic) {
		AddTxt="[move][/move]";
		AddText(AddTxt);
	} else {  
		txt=prompt("要产生移动效果的文字","文字");     
		if (txt!=null) {           
			AddTxt="[move]"+txt;
			AddText(AddTxt);
			AddTxt="[/move]";
			AddText(AddTxt);
		}       
	}
}
function glow() {
	if (helpstat) {
		alert("光晕标记\n使文字产生光晕效果.\n用法: [GLOW=宽度, 颜色, 边界]要产生光晕效果的文字[/GLOW]");
	} else if (basic) {
		AddTxt="[glow=255,#003399,2][/glow]";
		AddText(AddTxt);
	} else { 
		txt2=prompt("文字的长度、颜色和边界大小","255,red,2"); 
		if (txt2!=null) {
			txt=prompt("要产生光晕效果的文字.","文字");      
			if (txt!=null) {
				if (txt2=="") {
					AddTxt="[glow=255,blue,2]"+txt;
					AddText(AddTxt);
					AddTxt="[/glow]";
					AddText(AddTxt);
				} else {
					AddTxt="[glow="+txt2+"]"+txt;
					AddText(AddTxt);
					AddTxt="[/glow]";
					AddText(AddTxt);
				}         
			} 
		}

⌨️ 快捷键说明

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