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

Jsp/Servlet

开发平台:

Java

  1. <%@ page contentType="text/html;charset=utf-8"%>
  2. <%@ page import = "java.net.URLEncoder"%>
  3. <%@ page import = "java.util.*"%>
  4. <%@ page import = "cn.js.fan.util.*"%>
  5. <%@ page import = "cn.js.fan.web.*"%>
  6. <%@ page import = "com.redmoon.oa.vehicle.*"%>
  7. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  8. <html>
  9. <head>
  10. <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  11. <title>添加车辆类型</title>
  12. <link href="../common.css" rel="stylesheet" type="text/css">
  13. <%@ include file="../inc/nocache.jsp"%>
  14. <script language="JavaScript" type="text/JavaScript">
  15. <!--
  16. function openWin(url,width,height)
  17. {
  18.   var newwin=window.open(url,"_blank","toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,top=150,left=220,width="+width+",height="+height);
  19. }
  20. //-->
  21. </script>
  22. <style type="text/css">
  23. <!--
  24. .style2 {font-size: 14px}
  25. .STYLE3 {color: #FFFFFF}
  26. .STYLE4 {
  27. color: #000000;
  28. font-weight: bold;
  29. }
  30. .STYLE5 {color: #FF0000}
  31. .STYLE6 {color: #000000}
  32. -->
  33. </style>
  34. </head>
  35. <body background="" leftmargin="0" topmargin="5" marginwidth="0" marginheight="0">
  36. <jsp:useBean id="privilege" scope="page" class="com.redmoon.oa.pvg.Privilege"/>
  37. <%
  38. String op = ParamUtil.get(request, "op");
  39. if (op.equals("add")) {
  40. if (!privilege.isUserPrivValid(request, "vehicle")) {
  41. out.println(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
  42. return;
  43. }
  44. VehicleDriverMgr vdm = new VehicleDriverMgr();
  45. boolean re = false;
  46. try {
  47.   re = vdm.create(request);
  48. }
  49. catch (ErrMsgException e) {
  50. out.print(StrUtil.Alert(e.getMessage()));
  51. }
  52. if (re)
  53. out.print(StrUtil.Alert(SkinUtil.LoadString(request,"res.module.vehicledriver", "success_add_vehicledriver")));
  54. }
  55. if (op.equals("del")) {
  56. if (!privilege.isUserPrivValid(request, "vehicle")) {
  57. out.println(cn.js.fan.web.SkinUtil.makeErrMsg(request, cn.js.fan.web.SkinUtil.LoadString(request, "pvg_invalid")));
  58. return;
  59. }
  60. VehicleDriverMgr vdm = new VehicleDriverMgr();
  61. boolean re = false;
  62. try {
  63. re = vdm.del(request);
  64. }
  65. catch (ErrMsgException e) {
  66. out.print(StrUtil.Alert(e.getMessage()));
  67. }
  68. if (re)
  69. out.print(StrUtil.Alert(SkinUtil.LoadString(request,"res.module.vehicledriver", "success_del_vehicledriver")));
  70. }
  71. %>
  72. <form id="form1" name="form1" action="?op=add" method="post">
  73. <table width="541" height="89" border="0" align="center" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" class="tableframe">
  74. <tr>
  75.   <td height="23" colspan="2" background="../images/top-right.gif" class="right-title"><span> &nbsp;车辆驾驶员管理</span></td>
  76. </tr>
  77.     <tr>
  78.       <td colspan="2" align="center"><table width="88%" height="57"  border="0" cellpadding="0" cellspacing="0" class=" STYLE3 STYLE3">
  79.           <tr>
  80.             <td height="57" class="p14"><%
  81.   VehicleDriverDb vtd = new VehicleDriverDb();
  82.   String sql = "select id from vehicle_driver";
  83.   Iterator ir = vtd.list(sql).iterator();
  84.   while (ir.hasNext()) {
  85.    vtd = (VehicleDriverDb)ir.next();
  86.   %>
  87.                 <table width="98%" border="0" align="center" cellpadding="0" cellspacing="0">
  88.                   <tr>
  89.     <td width="59%"><%=vtd.getUserName()%></td>
  90.                     <td width="16%"><a href="vehicle_driver_edit.jsp?id=<%=vtd.getId()%>">编辑</a></td>
  91.                     <td width="11%"><a href="#" onClick="if (confirm('您确定要删除<%=vtd.getUserName()%>吗?')) window.location.href='?op=del&id=<%=vtd.getId()%>'">删除</a></td>
  92.                   </tr>
  93.                 </table>
  94.             <%}%>  </td>
  95.           </tr>
  96.         </table></td>
  97.     </tr>
  98.     <tr>
  99.        <td width="369" align="right"><span class="STYLE6">驾驶员姓名(<span class="STYLE5">*</span>)</span><span class="STYLE4">:</span>
  100.           <input name="userName" width="200">
  101.         &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
  102.        <td width="170" align="left"><input name="submit" type=submit class="button1" value="添  加"></td>
  103.     </tr>
  104. </table>
  105. </form>
  106. <br>
  107. <br>
  108. </body>
  109. </html>