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

📄 article.asp

📁 程序介绍: 1、内嵌式投票系统
💻 ASP
📖 第 1 页 / 共 3 页
字号:
<%
''''''''''''''''''''''''''''''''''''''''''''
'
'  TXSite / 通用网站系统
'
'  版本    :v1.8.20
'
'  制作人  :milp(milp@21cn.com)
'
'  版权所有:源码之家(http://www.21tx.com)
'
'  主页地址:http://www.21tx.com
'            http://www.bestnets.net
'            http://www.soucn.com
'
'  技术支持:http://www.21tx.com/bbs
'
''''''''''''''''''''''''''''''''''''''''''''
'程序创建时间   19:58 2001-8-5
'程序完成时间   12:00 2001-8-6
'最后修改时间   23:57 2001-9-10
'注意:用户不得修改和删除文章,共有两处判断
if session("adminflag")="" then Response.Redirect "default.asp"
dim action,id,name,r,m,s,mtype,stype,addate,isUse,keywords,author,authorurl,surround,content,click
action=request("action")

const thisprog="article.asp"
dim sqlfenye,txtitle
txtitle=request("searchtxt")
if session("adminflag")<3 then
if txtitle<>"" then
  sqlfenye="select * from main where showflag=2 and name like '%"&trim(txtitle)&"%' order by id desc"
else
  sqlfenye="select * from main where showflag=2 order by id desc"
end if
else
if txtitle<>"" then
  sqlfenye="select * from main where showflag=2 and addname='"&session("name")&"' and name like '%"&trim(txtitle)&"%' order by id desc"
else
  sqlfenye="select * from main where showflag=2 and addname='"&session("name")&"' order by id desc"
end if
end if
Sub deleteid(id)
 if session("adminflag")>2 then
  rSub.open "select * from main where id="&id,conn,1,1
  if rSub("addname")<>session("name") then
   rSub.close
   PrintMsg("你没有权限删除其他人添加的文章!")
  end if
 end if
 conn.execute "delete from main where id="&cstr(id)
End sub
Sub isUseid(id)
 if session("adminflag")>2 then
  rSub.open "select * from main where id="&id,conn,1,1
  if rSub("addname")<>session("name") then
   rSub.close
   PrintMsg("你没有权限修改其他人添加的文章!")
  end if
 end if
  conn.execute "update main set isUse=True where id="&cstr(id)
End sub
Sub notisUseid(id)
 if session("adminflag")>2 then
  rSub.open "select * from main where id="&id,conn,1,1
  if rSub("addname")<>session("name") then
   rSub.close
   PrintMsg("你没有权限修改其他人添加的文章!")
  end if
 end if
  conn.execute "update main set isUse=False where id="&cstr(id)
End Sub
%>
<!--#include file="base.asp"-->
<!--#include file="char.asp"-->
<!--#include file="subs.asp"-->
<%
if action="" then action="add"
if action="fenye" then
  Call fenye
elseif action="mod" then
  Call modarticle
elseif action="saveadd" then
  Call savearticle
elseif action="savemod" then
  Call savearticle
else
  Call addarticle
end if
%>
<!--#include file="end.asp"-->

<%Sub modarticle
rSub.open "select main.*,type.rtype,type.mtype,type.stype from main,type where type.s=main.s and main.id="&request("id"),conn,1,1
if rSub.bof and rSub.eof then Call PringMsg("操作错误!")
id=rSub("id")
name=rSub("name")
s=rSub("s")
m=rSub("m")
r=rSub("r")
mtype=rSub("mtype")
stype=rSub("stype")
addate=rSub("addate")
keywords=rSub("keywords")
author=rSub("author")
authorurl=rSub("authorurl")
surround=rSub("surround")
isUse=rSub("isUse")
content=rSub("content")
click=rSub("click")
rSub.close
Call addarticle
End Sub%>

<%Sub addarticle()%>
<form method="POST" name="txForm" action="<%=thisprog%>?action=save<%=action%>&id=<%=id%>">
  <div align="center"><center><table border="1" cellspacing="0" width="95%" bordercolorlight="#000000" bordercolordark="#FFFFFF" cellpadding="0">
    <tr>
      <td width="100%" bgcolor="#D0D0D0" height="20"><div align="center"><center><p><b><%if request("msg")<>"" then%><font color=red><%=request("msg")%></font><%else%>文 章 管 理<%end if%></b>(操作前请仔细阅读页尾的说明)</td>
    </tr>
    <tr align="center">
      <td width="100%"><table border="0" cellspacing="1" width="100%">
        <tr>
          <td width="15%" align="right" height="30"><b>文章标题:</b></td>
          <td width="85%" height="30"><input type="text" name="name" size="72"
           maxlength="100" value="<%=name%>"></td>
        </tr>
        <tr>
          <td width="15%" align="right" height="30"><b>文章栏目:</b></td>
          <td width="85%" height="30">
<%Call fenlei%>
         </td>
        </tr>
        <tr>
          <td width="15%" align="right" valign=bottom height="20"><b>文章选项:</b></td>
          <td width="85%">
<%if session("adminflag")<3 then%>
点击:<input type="text" name="click" size="3" maxlength="10" value="<%=click%>">
时间:<input type="text" name="addate" size="10"  maxlength="100" value=<%=addate%>>
<%end if%>
<select name="checkbox">
  <option value=1>支持html</option>
<%if session("adminflag")<3 then response.write "<option value=2>原样输入</option>"%>
</select>
<%if name="" and session("adminflag")<4 then%>
是否有效:<input type="checkbox" name="isUse" checked>
<%elseif session("adminflag")<4 then%>
是否有效:<input type="checkbox" name="isUse" value="<%=isUse%>" <%if isUse then response.write "checked"%>>
<%end if%></td>
        </tr>
        <tr>
          <td width="15%" align="right" valign=bottom height="20"><b>关 键 字:</b></td>
          <td width="85%">
<input type="text" name="keywords" size="15"  maxlength="100" value=<%=keywords%>>
(请查看页尾的关键字索引表)</td>
        </tr>
        <tr>
          <td width="15%" align="right" valign=bottom height="20"><b>作者信息:</b></td>
          <td width="85%">作者:<input type="text" name="author" size="10"  maxlength="100" value=<%=author%>>
          作者链接:<input type="text" name="authorurl" size="16"  maxlength="100" value=<%=authorurl%>>
          来自:<input type="text" name="surround" size="18"  maxlength="50" value=<%=surround%>></td>
        </tr>
<%if content<>"" then
content=replace(content,"<BR>",chr(13),1,-1,1)
content=replace(content,"&nbsp;"," ",1,-1,1)
end if%>
        <tr>
          <td width="15%" align="right" height="30"><b>UBB 标签:</b></td>
          <td width="85%" height="30">
<SCRIPT LANGUAGE="JavaScript">

helpstat = false;
stprompt = true;
basic = false;
function thelp(swtch){
	if (swtch == 1){
		basic = false;
		stprompt = false;
		helpstat = true;
	} else if (swtch == 0) {
		helpstat = false;
		stprompt = false;
		basic = true;
	} else if (swtch == 2) {
		helpstat = false;
		basic = false;
		stprompt = true;
	}
}

function AddText(NewCode) {
document.txForm.content.value+=NewCode
}

function email() {
	if (helpstat) {
		alert("Email 标记\n插入 Email 超级链接\n用法1: [email]webmaster@aspsky.net[/email]\n用法2: [email=webmaster@aspsky.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 flash() {
 	if (helpstat){
		alert("Flash 动画\n插入 Flash 动画.\n用法: [flash]Flash 文件的地址[/flash]");
	} else if (basic) {
		AddTxt="[flash][/flash]";
		AddText(AddTxt);
	} else {                  
		txt=prompt("Flash 文件的地址","http://");
		if (txt!=null) {             
			AddTxt="[flash]"+txt;
			AddText(AddTxt);
			AddTxt="[/flash]";
			AddText(AddTxt);
		}        
	}  
}

function showsize(size) {
	if (helpstat) {
		alert("文字大小标记\n设置文字大小.\n可变范围 1 - 6.\n 1 为最小 6 为最大.\n用法: [size="+size+"]这是 "+size+" 文字[/size]");
	} else if (basic) {
		AddTxt="[size="+size+"][/size]";
		AddText(AddTxt);
	} else {                       
		txt=prompt("大小 "+size,"文字"); 
		if (txt!=null) {             
			AddTxt="[size="+size+"]"+txt;
			AddText(AddTxt);
			AddTxt="[/size]";
			AddText(AddTxt);
		}        
	}
}

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 quote() {
	if (helpstat){
		alert("引用标记\n引用一些文字.\n用法: [quote]引用内容[/quote]");
	} else if (basic) {
		AddTxt="[quote][/quote]";

⌨️ 快捷键说明

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