EditSystemDirectory.jsp
上传用户:mingda
上传日期:2017-06-20
资源大小:27691k
文件大小:10k
源码类别:

OA系统

开发平台:

Java

  1. <%@ page contentType="text/html; charset=gb2312"%>
  2. <%@ page import="com.gforce.gfoa.*,com.gforce.currency.*,java.util.*" %>
  3. <jsp:include page="/CheckLogin.jsp" flush="true"/> <% Session m_session = new Session(session); %>
  4. <%
  5. Request m_request = new Request(request);
  6. int intSystemDirectoryID = m_request.GetInt("ID");
  7. if(intSystemDirectoryID<1)
  8. {
  9. %>
  10. <script language="JavaScript" type="text/JavaScript">
  11. alert("请选择正确的系统目录,修改失败!");
  12. history.back();
  13. </script>
  14. <%
  15. }
  16. else
  17. {
  18. Vector vt = SystemDirectoryManager.getRecordByID(intSystemDirectoryID);
  19. if(vt.size()==1)
  20. {
  21.     String sSystemDirectoryID = ((Vector)vt.get(0)).get(2).toString();
  22.     sSystemDirectoryID = sSystemDirectoryID.substring(0,sSystemDirectoryID.length()-1);
  23.     sSystemDirectoryID = sSystemDirectoryID.substring(sSystemDirectoryID.lastIndexOf("_")+1);
  24. %>
  25. <html>
  26. <head>
  27. <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
  28. <title>系统目录器管理-- GForce OA 2.0</title>
  29. <link href="../css/txt.jsp" rel="stylesheet" type="text/css">
  30. <script language="JavaScript" type="text/javascript">
  31. function checkEditSystemDirectory()
  32. {
  33.     if(document.editSystemDirectory.Name.value=="")
  34.     {
  35.         alert("请输入系统目录名称!");
  36.         document.editSystemDirectory.Name.focus();
  37.         return false;
  38.     }
  39.     if(document.editSystemDirectory.SystemDirectoryID.value=="")
  40.     {
  41.         alert("请选择上级系统目录!");
  42.         self.SelectSystemDirectory.document.SelectSystemDirectory.SystemDirectory[0].focus();
  43.         return false;
  44.     }
  45.     if(document.editSystemDirectory.SystemDirectoryID.value==document.editSystemDirectory.ID.value)
  46.     {
  47.         alert("上级系统目录不能是该系统目录自己,请选择正确的上级系统目录!");
  48.         self.SelectSystemDirectory.document.SelectSystemDirectory.SystemDirectory[0].focus();
  49.         return false;
  50.     }
  51.     document.editSystemDirectory.OrderNumber.value=<%=((Vector)vt.get(0)).get(5).toString()%>;
  52. }
  53. function uploadimage(ImageBox,ImagePic)
  54. {
  55.     var ImageSrc=window.showModalDialog("/UploadFile.jsp","","status:no; resizable: no; help:no; dialogWidth:296px; dialogHeight:150px");
  56.     if(ImageSrc!=null&&ImageSrc!="")
  57.     {
  58.         ImageBox.value=ImageSrc;
  59.         ImagePic.src=ImageSrc;
  60.     }
  61.     return false;
  62. }
  63. </script>
  64. </head>
  65. <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0">
  66. <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  67.     <tr>
  68.         <td align="center" valign="top"><p>&nbsp;</p>
  69.             <form name="editSystemDirectory" action="EditSystemDirectoryAction.jsp" method="post" onSubmit="javascript:return checkEditSystemDirectory();">
  70.             <table  border="0" cellpadding="0" cellspacing="0" width="90%">
  71.                 <tr>
  72.                     <td align="right" valign="middle"><font color="#0A0A0A">系统目录名称:</font></td>
  73.                     <td align="left" valign="middle" nowrap>
  74.                         <input name="ID" type="hidden" maxlength="5" value="<%=((Vector)vt.get(0)).get(0).toString()%>">
  75.                         <input name="Name" type="text" maxlength="50" size="37" value="<%=((Vector)vt.get(0)).get(1).toString()%>">
  76.                     </td>
  77.                 </tr>
  78.                 <tr>
  79.                     <td align="right" valign="top"><font color="#0A0A0A">上级系统目录:</font></td>
  80.                     <td align="left" valign="middle" nowrap>
  81.                         <iframe id="SelectSystemDirectory" frameborder=1 src="SelectSystemDirectory.jsp" width="100%" height="100%" scrolling="auto"></iframe>
  82.                     </td>
  83.                 </tr>
  84.                         <input name="Station" type="hidden" ID="Station" Value="<%=((Vector)vt.get(0)).get(2).toString()%>">
  85.                         <input name="LevelNumber" type="hidden" id="LevelNumber" value="<%=((Vector)vt.get(0)).get(3).toString()%>">
  86.                         <input name="ChildrenAcount" type="hidden" id="ChildrenAcount" value="<%=((Vector)vt.get(0)).get(4).toString()%>">
  87.                         <input name="OrderNumber" type="hidden" id="OrderNumber" value="<%=((Vector)vt.get(0)).get(5).toString()%>">
  88.                         <input name="SystemDirectoryID" type="hidden" id="SystemDirectoryID" value="<%=sSystemDirectoryID%>">
  89.                 <%
  90.                 String strOpenICO = ((Vector)vt.get(0)).get(6).toString();
  91.                 if(strOpenICO.trim().length()>1)
  92.                 {
  93.                 %>
  94.                 <tr>
  95.                     <td align="right" valign="middle"><font color="#0A0A0A">打开时的图标:</font></td>
  96.                     <td align="left" valign="middle" nowrap>
  97.                         <input name="OpenedICO" type="text" maxlength="50" size="20" value="<%=strOpenICO%>">
  98.                         <a href="" onclick="return uploadimage(document.editSystemDirectory.OpenedICO,document.all.OpenedICOImg);"><font color="#0A0A0A"><img src="<%=strOpenICO%>" width="19" height="19" id="OpenedICOImg" align="absbottom" border="0">上传图片</font></a>
  99.                    </td>
  100.                 </tr>
  101.                 <%
  102.                 }
  103.                 else
  104.                 {
  105.                 %>
  106.                 <tr>
  107.                     <td align="right" valign="middle"><font color="#0A0A0A">打开时的图标:</font></td>
  108.                     <td align="left" valign="middle" nowrap>
  109.                         <input name="OpenedICO" type="text" maxlength="50" size="20">
  110.                         <a href="" onclick="return uploadimage(document.editSystemDirectory.OpenedICO,document.all.OpenedICOImg);"><font color="#0A0A0A"><img src="/images/tree/folderopen.gif" width="19" height="19" id="OpenedICOImg" align="absbottom" border="0">上传图片</font></a>
  111.                    </td>
  112.                 </tr>
  113.                 <%
  114.                 }
  115.                 String strCloseICO = ((Vector)vt.get(0)).get(7).toString();
  116.                 if(strCloseICO.trim().length()>1)
  117.                 {
  118.                 %>
  119.                 <tr>
  120.                     <td align="right" valign="middle"><font color="#0A0A0A">关闭时的图标:</font></td>
  121.                     <td align="left" valign="middle" nowrap>
  122.                         <input name="CloseedICO" type="text" maxlength="50" size="20" value="<%=strCloseICO%>">
  123.                         <a href="" onclick="return uploadimage(document.editSystemDirectory.CloseedICO,document.all.CloseedICOImg);"><font color="#0A0A0A"><img src="<%=strCloseICO%>" width="19" height="19" id="CloseedICOImg" align="absbottom" border="0">上传图片</font></a>
  124.                    </td>
  125.                 </tr>
  126.                 <%
  127.                 }
  128.                 else
  129.                 {
  130.                 %>
  131.                 <tr>
  132.                     <td align="right" valign="middle"><font color="#0A0A0A">关闭时的图标:</font></td>
  133.                     <td align="left" valign="middle" nowrap>
  134.                         <input name="CloseedICO" type="text" maxlength="50" size="20">
  135.                         <a href="" onclick="return uploadimage(document.editSystemDirectory.CloseedICO,document.all.CloseedICOImg);"><font color="#0A0A0A"><img src="/images/tree/folderclosed.gif" width="19" height="19" id="CloseedICOImg" align="absbottom" border="0">上传图片</font></a>
  136.                    </td>
  137.                 </tr>
  138.                 <%
  139.                 }
  140.                 %>
  141.                 <tr>
  142.                     <td align="right" valign="middle"><font color="#0A0A0A">连接URL:</font></td>
  143.                     <td align="left" valign="middle" nowrap>
  144.                         <input name="LinkUrl" type="text" maxlength="150" size="38" value="<%=((Vector)vt.get(0)).get(8).toString()%>">
  145.                    </td>
  146.                 </tr>
  147.                 <tr>
  148.                     <td align="right" valign="middle"><font color="#0A0A0A">连接目标框架:</font></td>
  149.                     <td align="left" valign="middle" nowrap>
  150.                         <input name="Target" type="text" maxlength="50" size="38" value="<%=((Vector)vt.get(0)).get(9).toString()%>">
  151.                    </td>
  152.                 </tr>
  153.                 <tr>
  154.                     <td align="right" valign="middle"><font color="#0A0A0A">是否连接:</font></td>
  155.                     <td align="left" valign="middle" nowrap>
  156.                         <font color="#0A0A0A"><input name="IsLink" type="radio" value="1"  <%=((Vector)vt.get(0)).get(10).toString().equalsIgnoreCase("true")?"checked":""%>>是&nbsp; <input name="IsLink" type="radio" value="0" <%=((Vector)vt.get(0)).get(10).toString().equalsIgnoreCase("false")?"checked":""%>>否</font>
  157.                    </td>
  158.                 </tr>
  159.                 <tr>
  160.                     <td align="right" valign="middle"><font color="#0A0A0A">系统目录简介:</font></td>
  161.                     <td align="left" valign="middle" nowrap>
  162.                         <input name="Content" type="text" maxlength="50" size="38" value="<%=((Vector)vt.get(0)).get(11).toString()%>">
  163.                    </td>
  164.                 </tr>
  165.                 <tr>
  166.                     <td align="right" valign="middle"><font color="#0A0A0A">是否显示:</font></td>
  167.                     <td align="left" valign="middle" nowrap>
  168.                         <font color="#0A0A0A"><input name="IsShow" type="radio" value="1"  <%=((Vector)vt.get(0)).get(12).toString().equalsIgnoreCase("true")?"checked":""%>>是&nbsp; <input name="IsShow" type="radio" value="0" <%=((Vector)vt.get(0)).get(12).toString().equalsIgnoreCase("false")?"checked":""%>>否</font>
  169.                    </td>
  170.                 </tr>
  171.                 <tr>
  172.                     <td align="right" valign="middle"><font color="#0A0A0A">&nbsp;</font></td>
  173.                     <td align="left" valign="middle" nowrap>
  174.                    </td>
  175.                 </tr>
  176.                 <tr>
  177.                     <td align="right" valign="middle">&nbsp;</td>
  178.                     <td align="left" valign="middle" nowrap>
  179.                         <input type="submit" value="修改">&nbsp;&nbsp; <input type="reset" value="重填">&nbsp;&nbsp; <input type="button" value="返回" onclick="window.location='SystemDirectoryManage.jsp';">
  180.                     </td>
  181.                 </tr>
  182.             </table>
  183.             </form>
  184.         </td>
  185.     </tr>
  186. </table>
  187. </body>
  188. </html>
  189. <%
  190. }
  191. else
  192. {
  193. %>
  194. <script language="JavaScript" type="text/JavaScript">
  195. alert("该记录已经被删除或者您没有权限修改此记录,修改失败!");
  196. history.back();
  197. </script>
  198. <%
  199. }
  200. }
  201. %>