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

📄 bbsclass.asp

📁 网络办公系统源码
💻 ASP
字号:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="936"%>
<!--#include file="../../config.asp"-->
<!--#include file="../checklogin.asp"-->
<%
	if  ChkAdmin("oa_bbsclass")=False then
  		call message("您没有管理论坛分类的权限","back")
   		call endexit()
	end if
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>无标题文档</title>
<SCRIPT language=JavaScript src="../../inc/meizzDate.js"></SCRIPT>
<link href="../img/css1.css" type=text/css rel=stylesheet>
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
.style1 {
	color: #FFFFFF;
	font-weight: bold;
}
.style2 {color: #CC0000}
-->
</style>
</head>
<%
Submit=request.form("Submit")
'-----------------------------------------------------------
classname=trim(request.Form("classname"))
sortid=trim(request.Form("sortid"))
uid=trim(request.Form("uid"))
'----------------------------------
classname1=trim(request.Form("classname1"))
sortid1=trim(request.Form("sortid1"))
uid1=trim(request.Form("uid1"))
'-----------------------------------
tid=replace(request.Form("tid"),"'","")
select case Submit
       case "修改"
          sql="update oa_bbsclass set classname='"&classname1&"',sortid="&sortid1&",uid="&uid1&" where id="&tid
          conn.execute(sql)
          response.Write("<script>alert('修改成功');window.location.href='bbsclass.asp';</script>")
          response.End()
       case "删除"
          sql="delete from oa_bbsclass where id="&tid
          conn.execute(sql)
          response.Write("<script>alert('删除成功');window.location.href='bbsclass.asp';</script>")
          response.End()
       case "添加"
          sql="insert into oa_bbsclass(classname,sortid,companyid,uid) values('"&classname&"',"&sortid&","&session("companyid")&","&uid&")"
          conn.execute(sql)
          response.Write("<script>alert('添加成功');window.location.href='bbsclass.asp';</script>")
          response.End()
end select
%>
<body>
<table width="99%"  border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#F2F2F2" class="tabel1">
  
  <tr align="left">
    <td height="25" colspan="3" bgcolor="#CC0000"><span class="style1">论坛类别分类</span></td>
  </tr>
  <tr bgcolor="#F9F9F9">
    <td width="16%" height="25" align="center"> <strong><img src="../img/item_point.gif" width="4" height="7"> 论坛类别分类</strong></td>
    <td width="62%" height="25" align="left">只有版主才可以管理自己版块的贴子</td>
    <td width="22%" align="left">&nbsp;</td>
  </tr>

<%
	sql="select a.id,a.classname,a.sortid,a.uid,b.truename from oa_bbsclass as a inner join oa_admin as b on a.uid=b.id where a.companyid="&session("companyid")
	set rs=conn.execute(sql)
	do while not rs.eof
%>
<form name="myform" method="post" action="bbsclass.asp" >
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center">分类名称</td>
    <td height="25" colspan="2" align="left">
	  <input name="classname1" type="text" class="tabel1" id="classname1" value="<%=trim(rs("classname"))%>">
	  排序号
	  <input name="sortid1" type="text" class="tabel1" id="sortid1" value="<%=trim(rs("sortid"))%>" size="4" maxlength="2">
	  版主
	  <select name="uid1" id="uid1">
	  <option value="<%=trim(rs("uid"))%>"><%=rs("truename")%></option>
        <%
	  	sql="select id, truename from oa_Admin where companyid="&session("companyid")
		set rs1=conn.execute(sql)
		do while not rs1.eof
	  %>
        <option value="<%=trim(rs1("id"))%>"><%=rs1("truename")%></option>
        <%
	  rs1.movenext
	  loop
	  rs1.close
	  set rs1=nothing
	  %>
      </select>
	  <input name="Submit" type="submit" class="tabel1" value="修改">
      <input name="tid" type="hidden" id="tid" value="<%=rs("id")%>">
&nbsp;
<input name="Submit" type="submit" class="tabel1" id="Submit" value="删除"></td>
</form>
    </tr>
  <%
  	rs.movenext
	loop
	rs.close
	set rs=nothing
  %>
  
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center"><strong><img src="../img/item_point.gif" width="4" height="7"> 增加公用品分类</strong></td>
    <td height="25" align="left">&nbsp;</td>
    <td align="left">&nbsp;</td>
  </tr>
  <form name="myform1" method="post" action="bbsclass.asp" onSubmit="return CheckForm();">
  <tr bgcolor="#F9F9F9">
    <td height="25" align="center"> 分类名称</td>
    <td height="25" align="left"><input name="classname" type="text" class="tabel1" id="classname">
      排序号
	    <input name="sortid" type="text" class="tabel1" id="sortid" value="<%=num%>" size="4" maxlength="2">
版主
	  <select name="uid" id="uid">
        <%
	  	sql="select id, truename from oa_Admin where companyid="&session("companyid")
		set rs=conn.execute(sql)
		do while not rs.eof
	  %>
        <option value="<%=trim(rs("id"))%>"><%=rs("truename")%></option>
        <%
	  rs.movenext
	  loop
	  rs.close
	  set rs=nothing
	  %>
      </select>
	  <input name="Submit" type="submit" class="tabel1" id="Submit" value="添加"> 
(排序输入数字)
</td>
    <td align="left">&nbsp;</td>
  </tr>
  </form>
</table>
</body>
</html>
<script language="javascript">
function CheckForm()
{
    var objFrm=document.myform1;
	if(objFrm.classname.value=="")
	{
		alert("请输入分类名称!");
		objFrm.classname.focus();
		return false;
	}
	return true;

}
</script>

⌨️ 快捷键说明

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