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

📄 admin_bbsmod.asp

📁 大榕树网络文章管理系统
💻 ASP
字号:
<%
Option Explicit
Response.buffer=true
const purviewlevel=4
%>
<!--#include file="admin_PurviewChe.asp" -->
<!-- #include file="conn.asp" -->
<!--#include file="admin_Function.asp" -->
<!--#include file="../inf/ubbcode.asp" -->
<%dim bookid,title,usid,usphoto,datetime,bbsclass,tellself,content,locknews,passed,face,BBSMod,SuccessMsg
  dim ors
  bookid=trim(request.querystring("bookid"))
  BBSMod=request.form("BBSMod")
  set ors=Server.CreateObject("ADODB.Recordset")
  if BBSMod="BBSMod" then
  ors.open "SELECT * FROM userbook where bookid="&bookid&"",conn,1,3  
  ors("title")=request.form("title")
  ors("usid")=request.form("usid")
  ors("bbsclass")=request.form("bbsclass")
  orsnews("faceimg")=request.form("usphoto")
  ors("face")=request.form("face")
  ors("content")=dvHtmlEncode(request.form("content"))
  tellself=request.form("tellself")
  if tellself="yes" then
  ors("tellself")=true
  else
  ors("tellself")=false
  end if
  locknews=request.form("locknews")
  if locknews="yes" then
  ors("locknews")=true
  else
  ors("locknews")=false
  end if
  passed=request.form("passed")
  if passed="yes" then
  ors("passed")=true
  else
  ors("passed")=false
  end if
  ors.Update
  ors.close
  set ors=nothing
  dim books,rsc
	 set rsc=conn.execute("select books from bbsclass where bbsclass='"&request.form("bbsclass")&"'")
	 books=rsc("books")+1
	 conn.execute("update bbsclass set books="&books&" where bbsclass='"&request.form("bbsclass")&"'")
	 rsc.close
	 set rsc=nothing
  call closeconn()
  SuccessMsg=SuccessMsg + "<br><br><li>主题更改成功!</li>"
  SuccessMsg=SuccessMsg + "<br><br><li>你可以:[<a href='admin_BbsManage.asp'>返回BBS管理面板</a>]</li>"
  call ShowSuccessMsg()
  else
  ors.open "SELECT * FROM userbook where bookid="&bookid&"",conn,1,1
  end if  
%>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>主题修改</title>
<link href="../style.css" rel="stylesheet" type="text/css">
<script language=javascript>
function OpenWindow(url)
{
window.open(url,"_blank","height=200,width=300,top=180,left=200,titlebar=no,directories=no,status=no,toolbar=no,menubar=no,location=no,scrollbars=no");
}
function checknews()
{
if (window.document.form1.title.value=="")
{
alert("主题名称不能为空!");
return false;
}
if(window.document.form1.usid.value=="")
{
alert("主题作者不能为空!");
return false;
}
if(window.document.form1.bbsclass.value=="")
{
alert("主题所属栏目不能为空!");
return false;
}
if(window.document.form1.content.value=="")
{
alert("主题内容不能为空!");
return false;
}
}
function contenlen()
{
var len=window.document.form1.content.value.length;
if(len<10)
{
alert("你写得太少了,有灌水之嫌!");
return false;
}
}
function BBSDel()
{
if(confirm("你是否确定删除,如果删除了主题,回复也一同删除,将不能恢复!"))
return true;
else
return false;
}
</script>
<link href="Style.css" rel="stylesheet" type="text/css">
</head>

<body>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td><form name="form1" method="post" action="" onsubmit="return checknews();">
      <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
        <tr>
          <td align="center" class="txt">主题修改</td>
        </tr>
        <tr>
          <td align="center" class="txt05">[<a href="javascript:onclick=history.go(-1)">返回BBS管理首页</a>]</td>
        </tr>
        <tr>
          <td class="txt05">主题名称:
              <input name="title" type="text" class="but" id="title" value="<%=ors("title")%>" maxlength="50">
&nbsp; 发表时间:<%=ors("datetime")%></td>
        </tr>
		<tr>
          <td class="txt05">作者头像:<select name="usphoto" class="but" id="usphoto">
				<%dim xx
				for xx=1 to 18
				%>
                  <option value="usphoto<%=xx%>.gif" selected="selected">photo<%=xx%></option>
				<%next%>
                </select>
                [<a href="#" onclick="OpenWindow('../BbsPhotoShow.asp');">浏览</a>]</td>
        </tr>
        <tr>
          <td class="txt05">主题作者:
              <input name="usid" type="text" class="but" id="usid" value="<%=ors("usid")%>" maxlength="20">
&nbsp; 所属栏目:
      <select name="bbsclass" class="but" id="bbsclass">
        <option>请选择所属栏目</option>
        <%dim rsclass
			  set rsclass=server.createobject("ADODB.Recordset")
			  rsclass.open "select * from bbsclass order by bbsid desc",conn,1,1
			  if rsclass.eof or rsclass.bof then
			  %>
        <option>还没有任何栏目</option>
        <%else%>
        <%do while not rsclass.eof %>
        <option value="<%=rsclass("bbsclass")%>"><%=rsclass("bbsclass")%></option>
        <%rsclass.movenext
			  loop
			  end if%>
    </select></td>
        </tr>
        <tr>
          <td valign="top" class="txt1"><table width="100%"  border="0" cellspacing="0" cellpadding="0">
              <tr>
                <td width="13%" rowspan="2" class="txt05">当前心情:</td>
                <td width="87%" class="txt02"><input <%If (CStr(ors("face")) = CStr("images/face1.gif")) Then Response.Write("CHECKED") : Response.Write("")%> name="face" type="radio" value="images/face1.gif" checked>
                    <img src="../images/face1.gif" width="22" height="22">
                    <input <%If (CStr(ors("face")) = CStr("images/face2.gif")) Then Response.Write("CHECKED") : Response.Write("")%> type="radio" name="face" value="images/face2.gif">
                    <img src="../images/face2.gif" width="22" height="22">
                    <input <%If (CStr(ors("face")) = CStr("images/face3.gif")) Then Response.Write("CHECKED") : Response.Write("")%> type="radio" name="face" value="images/face3.gif">
                    <img src="../images/face3.gif" width="22" height="22">
                    <input <%If (CStr(ors("face")) = CStr("images/face4.gif")) Then Response.Write("CHECKED") : Response.Write("")%> type="radio" name="face" value="images/face4.gif">
                    <img src="../images/face4.gif" width="22" height="22">
                    <input <%If (CStr(ors("face")) = CStr("images/face5.gif")) Then Response.Write("CHECKED") : Response.Write("")%> type="radio" name="face" value="images/face5.gif">
                    <img src="../images/face5.gif" width="22" height="22">
                    <input <%If (CStr(ors("face")) = CStr("images/face6.gif")) Then Response.Write("CHECKED") : Response.Write("")%> type="radio" name="face" value="images/face6.gif">
                    <img src="../images/face6.gif" width="22" height="22">
                    <input <%If (CStr(ors("face")) = CStr("images/face7.gif")) Then Response.Write("CHECKED") : Response.Write("")%> type="radio" name="face" value="images/face7.gif">
                    <img src="../images/face7.gif" width="22" height="22">
                    <input <%If (CStr(ors("face")) = CStr("images/face8.gif")) Then Response.Write("CHECKED") : Response.Write("")%> type="radio" name="face" value="images/face8.gif">
                    <img src="../images/face8.gif" width="22" height="22">
                    <input <%If (CStr(ors("face")) = CStr("images/face17.gif")) Then Response.Write("CHECKED") : Response.Write("")%> type="radio" name="face" value="images/face17.gif">
                    <img src="../images/face17.gif" width="22" height="22"></td>
              </tr>
              <tr>
                <td class="txt02"><input <%If (CStr(ors("face")) = CStr("images/face9.gif")) Then Response.Write("CHECKED") : Response.Write("")%> type="radio" name="face" value="images/face9.gif">
                    <img src="../images/face9.gif" width="22" height="22">
                    <input <%If (CStr(ors("face")) = CStr("images/face10.gif")) Then Response.Write("CHECKED") : Response.Write("")%> type="radio" name="face" value="images/face10.gif">
                    <img src="../images/face10.gif" width="22" height="22">
                    <input <%If (CStr(ors("face")) = CStr("images/face11.gif")) Then Response.Write("CHECKED") : Response.Write("")%> type="radio" name="face" value="images/face11.gif">
                    <img src="../images/face11.gif" width="22" height="22">
                    <input <%If (CStr(ors("face")) = CStr("images/face12.gif")) Then Response.Write("CHECKED") : Response.Write("")%> type="radio" name="face" value="images/face12.gif">
                    <img src="../images/face12.gif" width="22" height="22">
                    <input <%If (CStr(ors("face")) = CStr("images/face13.gif")) Then Response.Write("CHECKED") : Response.Write("")%> type="radio" name="face" value="images/face13.gif">
                    <img src="../images/face13.gif" width="22" height="22">
                    <input <%If (CStr(ors("face")) = CStr("images/face14.gif")) Then Response.Write("CHECKED") : Response.Write("")%> type="radio" name="face" value="images/face14.gif">
                    <img src="../images/face14.gif" width="22" height="22">
                    <input <%If (CStr(ors("face")) = CStr("images/face15.gif")) Then Response.Write("CHECKED") : Response.Write("")%> type="radio" name="face" value="images/face15.gif">
                    <img src="../images/face15.gif" width="22" height="22">
                    <input <%If (CStr(ors("face")) = CStr("images/face16.gif")) Then Response.Write("CHECKED") : Response.Write("")%> type="radio" name="face" value="images/face16.gif">
                    <img src="../images/face16.gif" width="22" height="22">
                    <input <%If (CStr(ors("face")) = CStr("images/face18.gif")) Then Response.Write("CHECKED") : Response.Write("")%> type="radio" name="face" value="images/face18.gif">
                    <img src="../images/face18.gif" width="22" height="22"></td>
              </tr>
          </table></td>
        </tr>
        <tr>
          <td align="center" valign="middle"><table width="98%"  border="0" align="center" cellpadding="0" cellspacing="0">
              <tr>
                <td class="txt05">主题内容:</td>
                <td align="center" class="txt02"><textarea name="content" cols="60" rows="10" class="but" id="textarea" onblur="contenlen()"><%=ors("content")%></textarea></td>
              </tr>
            </table>
        </tr>
        <tr>
          <td align="center" valign="middle" class="txt05">是否保密:
              <input name="tellself" type="checkbox" id="tellself2" value="yes">
      选中后仅管理员可见</td>
        </tr>
        <tr>
          <td align="center" valign="middle" class="txt05">是否通过审核
              <input name="passed" type="checkbox" id="passed" value="yes" checked>
      是否锁定
      <input name="locknews" type="checkbox" id="locknews" value="yes"></td>
        </tr>
        <tr>
          <td align="center" valign="middle" class="txt03">[<a href="admin_BBSDel.asp?bookid=<%=ors("bookid")%>" onClick="return BBSDel();">删除</a>]</td>
        </tr>
        <tr>
          <td align="center" valign="middle" class="txt1"><input name="Submit" type="submit" class="but" value="修改">
&nbsp;&nbsp;
      <input name="BBSMod" type="hidden" id="BBSMod" value="BBSMod">
          </td>
        </tr>        
      </table>
      </form></td>
  </tr>
</table>

</body>
</html>

⌨️ 快捷键说明

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