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

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 intFavoritesId = m_request.GetInt("ID");
  7. if(intFavoritesId<1)
  8. {
  9. %>
  10. <script language="JavaScript" type="text/JavaScript">
  11. alert("请选择正确的收藏夹,修改失败!");
  12. history.back();
  13. </script>
  14. <%
  15. }
  16. else
  17. {
  18. int intUserID = m_session.GetInt("UserID");
  19. Vector vt = FavoritesManager.getRecordByID(intFavoritesId,intUserID);
  20. if(vt.size()==1)
  21. {
  22. %>
  23. <html>
  24. <head>
  25. <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
  26. <title>收藏夹管理-- GForce OA 2.0</title>
  27. <link href="../css/txt.jsp" rel="stylesheet" type="text/css">
  28. <script language="JavaScript" type="text/javascript">
  29. function checkeditfavorites()
  30. {
  31.     if(document.editfavorites.Name.value=='')
  32.     {
  33.         alert("请输入收藏夹名称!");
  34.         document.editfavorites.Name.focus();
  35.         return false;
  36.     }
  37.     if(document.editfavorites.URL.value=='')
  38.     {
  39.         alert("请输入网址!");
  40.         document.editfavorites.URL.focus();
  41.         return false;
  42.     }
  43.     if(document.editfavorites.KindsID.value=='0' || document.editfavorites.KindsID.value==0)
  44.     {
  45.         alert("请选择收藏分类!");
  46.         document.editfavorites.KindsID.focus();
  47.         return false;
  48.     }
  49. }
  50. </script>
  51. </head>
  52. <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0">
  53. <table width="100%" height="100%" border="0" align="center" cellspacing="0">
  54.     <tr>
  55.         <td align="center" valign="top"><p>&nbsp;</p>
  56.            <table width="90%" border="0" cellpadding="0" cellspacing="0">
  57.                 <tr align="center" valign="middle">
  58.                 <th nowrap colspan=2 align="center"><font color="#000000">修 改 收 藏 夹 </font></th>
  59.               </tr>
  60.                <tr><td>&nbsp;</td>
  61.                 </tr>
  62.               </table>
  63.             <form name="editfavorites" action="EditFavoritesAction.jsp" method="post" onSubmit="javascript:return checkeditfavorites();">
  64.             <table  border="1" cellpadding="1" cellspacing="1" width="90%">
  65.                 <tr>
  66.                     <td align="right" valign="middle" width="14%"><font color="#0A0A0A">收&nbsp;藏&nbsp;名&nbsp;称:&nbsp;</font></td>
  67.                     <td align="left" valign="middle" width="70%" nowrap>
  68.                         &nbsp;<input name="Name" type="text" maxlength="40" size="40" value="<%=((Vector)vt.get(0)).get(1).toString()%>">
  69.                         <input name="ID" type="Hidden" value="<%=((Vector)vt.get(0)).get(0).toString()%>" >
  70.                     </td>
  71.                 </tr>
  72.                 <tr>
  73.                     <td align="right" valign="middle" width="14%"><font color="#0A0A0A">链&nbsp;接&nbsp;网&nbsp;址:&nbsp;</font></td>
  74.                     <td align="left" valign="middle" width="70%" nowrap>
  75.                         &nbsp;<input name="URL" type="text" maxlength="40" size="70"  value="<%=((Vector)vt.get(0)).get(2).toString()%>">
  76.                         <input name="LastViewTime" type="hidden" value="<%=StringNew.GetDateString(((Vector)vt.get(0)).get(3).toString(),"yyyy-MM-dd HH:mm")%>">
  77.                     </td>
  78.                 </tr>
  79.                 <tr>
  80.                    <td align="right" valign="middle" width="14%"><font color="#0A0A0A">收&nbsp;藏&nbsp;分&nbsp;类:&nbsp;</font></td>
  81.                     <td align="left" valign="middle" width="70%" nowrap>
  82.                         &nbsp;<select name="KindsID">
  83. <option value="0">请选择收藏分类</option>
  84. <%
  85. Vector vtKinds = FavoritesKindManager.getAllRecord(intUserID);
  86. for(int i=0;i<vtKinds.size();i++)
  87. {
  88.     if(((Vector)vtKinds.get(i)).get(0).toString().equalsIgnoreCase(((Vector)vt.get(0)).get(5).toString()))
  89.         out.println("<option value="" + ((Vector)vtKinds.get(i)).get(0).toString() + "" selected>" + ((Vector)vtKinds.get(i)).get(1).toString() + "</option>");
  90.     else
  91.         out.println("<option value="" + ((Vector)vtKinds.get(i)).get(0).toString() + "">" + ((Vector)vtKinds.get(i)).get(1).toString() + "</option>");
  92. }
  93. boolean IsShare=(((Vector)vt.get(0)).get(6).toString().compareToIgnoreCase("true")==0);
  94. %>
  95.                         </select>
  96.                     </td>
  97.                 </tr>
  98.                 <tr>
  99.                     <td align="right" valign="middle" width="14%"><font color="#0A0A0A">是&nbsp;否&nbsp;共&nbsp;享:&nbsp;</font></td>
  100.                     <td align="left" valign="middle" width="70%" nowrap>
  101.                         <font color="#0A0A0A">&nbsp;<input name="IsOpen" type="radio" value="1" <%if(IsShare)out.print("checked");%>>公开共享&nbsp;&nbsp;&nbsp;&nbsp;<input name="IsOpen" type="radio" value="0" <%if(!IsShare)out.print("checked");%>>私人保密</font>
  102.                     </td>
  103.                 </tr>
  104.             </table>
  105.             <table width="90%" border="0">
  106.                 <tr>
  107.                     <td>&nbsp;</td>
  108.                </tr>
  109.                 <tr>
  110.                   <td>&nbsp;</td>
  111.                    <td align="right" valign="middle" nowrap>
  112.                         <input type="submit" value="修 改" style="background-color: #FFFFFF; border: 1 solid #000000">&nbsp;&nbsp;&nbsp;&nbsp;<input type="reset" value="重 填" style="background-color: #FFFFFF; border: 1 solid #000000">&nbsp;&nbsp;&nbsp;&nbsp;<input type="button" value="返 回" onclick="window.location='FavoritesManage.jsp?KindsID=<%=((Vector)vt.get(0)).get(5).toString()%>';" style="background-color: #FFFFFF; border: 1 solid #000000">
  113.                      </td>
  114.                 </tr>
  115.                 <tr>
  116.                     <td align="right" valign="middle">&nbsp;</td>
  117.                </tr>
  118.             </table>
  119.             </form>
  120.         </td>
  121.     </tr>
  122. </table>
  123. </body>
  124. </html>
  125. <%
  126. }
  127. else
  128. {
  129. %>
  130. <script language="JavaScript" type="text/JavaScript">
  131. alert("该记录已经被删除或者您没有权限修改此记录,修改失败!");
  132. history.back();
  133. </script>
  134. <%
  135. }
  136. }
  137. %>