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

📄 edit.asp

📁 这是ASP的OA
💻 ASP
📖 第 1 页 / 共 2 页
字号:
<!-- #include file="const.asp" -->
<!-- #include file="power_func.asp" -->
<%
dim id,sql,rs,topic,author,content,FID,canedit,html,filepath,viewsign,face,uploadfile,forumtitle,authent,authentlist
authent=0
html=0
canedit=0
viewsign=1
face="00"
id=nrequest("id")
if id="" then
	response.Redirect("error.asp?id=3")
	response.End()
else
	call opendb()
	checkuser()
	sql="select topic,content,FID,html,name,filepath,uploadfile,viewsign,face from m3_bbs where id="&id&""
	set rs=server.CreateObject("adodb.recordset")
	rs.open sql,conn,1,1
	if rs.eof and rs.bof then
		rs.close
		set rs=nothing
		call closedb()
		response.Redirect("error.asp?id=2")
		response.End()
	else
		author=rs("name")
		topic=rs("topic")
		content=rs("content")
		FID=rs("FID")
		html=cint(rs("html"))
		face=trim(rs("face"))
		filepath=trim(rs("filepath"))
		uploadfile=trim(rs("uploadfile"))
		viewsign=rs("viewsign")
	end if
	rs.close
	set rs=nothing
	if isadmin()=1 then
		canedit=1
	else
		if author=request.Cookies("matrix3")("matrix3_name") then
			canedit=1
		else
			if havepower(FID)=1 then
				canedit=1
			end if
		end if
	end if
	if fid<>"" then
		fid=cint(fid)
		sql="select FTitle,authent,authentlist from m3_forum where FID="&fid&""
		set rs=server.CreateObject("adodb.recordset")
		rs.open sql,conn,1,1
		if rs.eof and rs.bof then
			fid=""
		else
			forumtitle=rs("FTitle")
			authent=cint(rs("authent"))
			authentlist=rs("authentlist")
		end if
		rs.close
		set rs=nothing
	end if
	position "编辑帖子:"&topic,0
	call closedb()
	if authent=1 then
		if inlist(authentlist)=0 then
			response.Redirect("error.asp?id=11")
			response.End()
		end if
	end if
end if
if canedit=0 then
	response.Redirect("error.asp?id=1")
	response.End()
end if
if isnull(viewsign) then
	viewsign=0
else
	viewsign=cint(viewsign)
end if
%>
<html>
<head>
<title><%=sitename%></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<link href="images/skin.css" rel="stylesheet" type="text/css">
<script language="JavaScript">
function chkTopicField()
{
	if(document.topicform.topic.value==""){
		alert("请填写帖子的主题");
		document.topicform.topic.focus();
		return false;
	}
	if(document.topicform.content.value==""){
		alert("请填写帖子内容");
		document.topicform.content.focus();
		return false;
	}<%if trim1(request.Cookies("matrix3")("matrix3_admin"))<>"matrix3" then response.Write("else if(strLength(document.topicform.content.value)>16240) {alert('发言内容不得大于16240bytes。');return false;}")%>
	document.topicform.submit();
	document.topicform.Submit1.disabled=true;
}
function strLength(str) {
	var WINNT_CHINESE;
	WINNT_CHINESE = (("论坛").length==2)
	if(WINNT_CHINESE) {
		var l,t,c;
		var i;
		l=str.length;
		t=l;
		for(i=0;i<l;i++) {
			c=str.charCodeAt(i);
			if(c<0 || c>255) t=t+1;
		}
		return t;
	} else  {
		return str.length;
	}
}
function ow(src,win_width,win_height)
{
	window.open(src,'','width='+win_width+',height='+win_height+',resizable=no,scrollbars=auto,status=no,toolbar=no,menubar=no,location=no');
	return false;
}
</script>
<script language="JavaScript" src="images/ubbcode.js"></script>
</head>
<body leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
  <tr> 
    <td height="10" align="center" valign="top"> 
      <!-- #include file="topbar.asp" -->
    </td>
  </tr>
  <tr> 
    <td align="center" valign="top"> <table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
        <tr> 
          <td width="12" bgcolor="#ECE9D9">&nbsp;</td>
          <td width="1" bgcolor="#E8BC3C"></td>
          <td width="10">&nbsp;</td>
          <td valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="3">
              <tr> 
                <td width="100%" height="26"><span class="v8">
					<img src="images/btn_face.gif" width="10" height="7"> 
                  <a href="index.asp"><%=sitename%></a><%if forumtitle<>"" then %>
                  <FONT face=Webdings color="#660000">8</FONT> <a href="list.asp?forumid=<%=fid%>"><%=forumtitle%></a> 
                  <%end if%>
				  <FONT face=Webdings color="#660000">8</FONT>
                  <font color="#990000">帖子:&nbsp;</font><a href="javascript:history.back();"><%=topic%></a>
				  <FONT face=Webdings color="#660000">8</FONT> 
                  编辑帖子</span></td>
              </tr>
              <tr> 
                <td height="1" bgcolor="#ECE9D9"></td>
              </tr>
            </table>
            <br> <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
              <tr> 
                <td height="12"><table width="100%" border="0" cellpadding="0" cellspacing="0">
                    <tr> 
                      <td width="120" height="12" bgcolor="#990000">&nbsp;<span class="v8b">&nbsp;<img src="images/fang-1.gif" align="absmiddle"> 
                        </span><span class="v7b"><font color="#FFFFFF">编辑帖子</font></span></td>
                      <td height="12" nowrap bgcolor="#CCCCCC" class="v8b">&nbsp;</td>
                    </tr>
                  </table>
                  <TABLE cellSpacing=1 cellPadding=3 width=100% align=center bgColor=#eeeeee 
      border=0>
                    <FORM name="topicform" id="topicform" onsubmit="javascript:chkTopicField();return false;" action="edit_save.asp" method=post>
                      <TBODY>
                        <TR bgColor=#ffffff> 

⌨️ 快捷键说明

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