manage.jsp
上传用户:jhtang88
上传日期:2014-01-27
资源大小:28528k
文件大小:4k
源码类别:

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html;charset=utf-8"%>
  2. <%@ page import="cn.js.fan.util.*"%>
  3. <%@ page import="cn.js.fan.web.*"%>
  4. <%@ page import="cn.js.fan.db.*"%>
  5. <HTML>
  6. <HEAD>
  7. <META NAME="GENERATOR" Content="Microsoft FrontPage 4.0">
  8. <TITLE>讨论室管理</TITLE>
  9. <link href="../../common.css" rel="stylesheet" type="text/css">
  10. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  11. <BODY leftmargin="0" topmargin="5">
  12. <jsp:useBean id="fchar" scope="page" class="cn.js.fan.util.StrUtil"/>
  13. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  14. <%
  15. if (!privilege.isUserPrivValid(request, "admin.chat")) {
  16.     out.print(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
  17. return;
  18. }
  19. %>
  20. <%
  21. String sql = "Select * from sq_chatroom";
  22. RMConn rmconn = new RMConn(Global.defaultDB);
  23. ResultIterator ri = rmconn.executeQuery(sql);
  24. ResultRecord rr = null;
  25. %>
  26. <TABLE cellSpacing=0 cellPadding=0 width="100%">
  27.   <TBODY>
  28.   <TR>
  29.     <TD class=right-title>讨论管理</TD>
  30.   </TR></TBODY></TABLE>
  31. <br>
  32. <table align="center" border="0" cellPadding="2" cellSpacing="0" class="p9" height="54" width="61%">
  33.   <tr class="right-title"> 
  34.     <td width="22%" height="28" align="center">讨论室名称</td>
  35.     <td width="36%" height="28" align="center">主&nbsp;&nbsp;&nbsp;&nbsp;题</td>
  36.     <td width="17%" height="28" align="center">满座人数</td>
  37.     <td width="25%" height="28" align="center"> 
  38.       更改 </td>
  39.   </tr>
  40.   <%
  41. int i = 0;
  42. while (ri.hasNext()) {
  43.   rr = (ResultRecord)ri.next();%>
  44.   <tr align="middle" bgColor="#eeeeee" vAlign="center"> 
  45.     <form method="post" action="manage_do.jsp" id="formadd<%=i%>" name="formadd<%=i%>" LANGUAGE="javascript">
  46.       <td width="22%" height="24"> 
  47.         <input id="id" name="id" type=hidden value=<%=rr.getInt("id")%>>
  48.         <input id="name" name="name" type=hidden value=<%=rr.getString("name")%>>
  49.       <%=rr.getString("name")%> </td>
  50.       <td width="36%" height="24" align="center"> 
  51.       <INPUT class=stedit id=topic name=topic style="HEIGHT: 22px; WIDTH: 90%" value='<%=fchar.getNullStr(rr.getString("topic"))%>'>      </td>
  52.       <td width="17%" height="24" align="center"> 
  53.       <INPUT class=stedit id=peopleNum name=peopleNum style="HEIGHT: 22px; WIDTH: 40px" value='<%=rr.getInt("peopleNum")%>'>      </td>
  54.       <td width="25%" height="24" align="left"> 
  55.         <% 
  56.   String checkm = "";
  57.   if (rr.getInt("playMusic")==1) 
  58.    checkm = "checked";
  59.   %>
  60.         <input id=playMusic name=playMusic value='1' type="hidden" <%=checkm%>>
  61.         <input name="submit1" type="submit" id="submit1" value="确定">
  62.         &nbsp;
  63. <%if (!rr.getString("name").equals("办公室")) {%>
  64.         <a target="_blank" href="room_del.jsp?id=<%=rr.getInt("id")%>&room=<%=StrUtil.UrlEncode(rr.getString("name"))%>">删除</a> 
  65. <%}%>
  66.       <a href="emcee.jsp?room=<%=StrUtil.UrlEncode(rr.getString("name"))%>">主持</a></td>
  67.     </form>
  68.   </tr>
  69.   <%
  70. i = i+1;
  71. }
  72. %>
  73. </table>
  74. <form target="" method="post" action="room_add.jsp" LANGUAGE="javascript">
  75.   <table align="center" border="0" cellPadding="2" cellSpacing="0" class="p9" width="61%">
  76.     <tr class="right-title" align="center"> 
  77.       <td height="27" colspan="2">添加讨论室</td>
  78.     </tr>
  79.     <tr bgColor="#eeeeee"> 
  80.       <td width="17%" align="middle">房间名称</td>
  81.       <td width="83%" align="left"> 
  82.       <INPUT type="text"  id="name" name="name" style="width:80">      </td>
  83.     </tr>
  84.     <tr bgColor="#eeeeee"> 
  85.       <td width="17%" align="middle">主 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;题</td>
  86.       <td width="83%" align="left"> 
  87.       <INPUT type="text" id=topic name=topic style="width:200">      </td>
  88.     </tr>
  89.     <tr bgColor="#eeeeee"> 
  90.       <td width="17%" align="middle">满座人数</td>
  91.       <td width="83%" align="left"> 
  92.         <INPUT type="text" id=peopleNum name=peopleNum style="width:50" value="100">
  93.       <input type="hidden" id=playMusic2 name=playMusic2 value="1">      </td>
  94.     </tr>
  95.     
  96.     <tr bgColor="#eeeeee"> 
  97.       <td height="33" colspan="2" align="center"> 
  98.         <INPUT type="submit" value="添加" id=submit2 name=submit2> 
  99.       &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  100.       <INPUT type="reset" value="重写" id=reset1 name=reset1></td>
  101.     </tr>
  102.   </table>
  103. </form>
  104. </BODY>
  105. <SCRIPT LANGUAGE=javascript>
  106. <!--
  107. function dodelete(roomname)
  108. {
  109. window.open("deleteroom.asp?name="+roomname)
  110. }
  111. //-->
  112. </SCRIPT>
  113. </HTML>