EditFavorites.jsp
资源名称:OA.rar [点击查看]
上传用户:mingda
上传日期:2017-06-20
资源大小:27691k
文件大小:6k
源码类别:
OA系统
开发平台:
Java
- <%@ page contentType="text/html; charset=gb2312"%>
- <%@ page import="com.gforce.gfoa.*,com.gforce.currency.*,java.util.*" %>
- <jsp:include page="/CheckLogin.jsp" flush="true"/> <% Session m_session = new Session(session); %>
- <%
- Request m_request = new Request(request);
- int intFavoritesId = m_request.GetInt("ID");
- if(intFavoritesId<1)
- {
- %>
- <script language="JavaScript" type="text/JavaScript">
- alert("请选择正确的收藏夹,修改失败!");
- history.back();
- </script>
- <%
- }
- else
- {
- int intUserID = m_session.GetInt("UserID");
- Vector vt = FavoritesManager.getRecordByID(intFavoritesId,intUserID);
- if(vt.size()==1)
- {
- %>
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312"><meta http-equiv="pragma" content="no-cache">
- <title>收藏夹管理-- GForce OA 2.0</title>
- <link href="../css/txt.jsp" rel="stylesheet" type="text/css">
- <script language="JavaScript" type="text/javascript">
- function checkeditfavorites()
- {
- if(document.editfavorites.Name.value=='')
- {
- alert("请输入收藏夹名称!");
- document.editfavorites.Name.focus();
- return false;
- }
- if(document.editfavorites.URL.value=='')
- {
- alert("请输入网址!");
- document.editfavorites.URL.focus();
- return false;
- }
- if(document.editfavorites.KindsID.value=='0' || document.editfavorites.KindsID.value==0)
- {
- alert("请选择收藏分类!");
- document.editfavorites.KindsID.focus();
- return false;
- }
- }
- </script>
- </head>
- <body bgcolor="<%=m_session.GetString("BackColor")%>" leftmargin="0" topmargin="0">
- <table width="100%" height="100%" border="0" align="center" cellspacing="0">
- <tr>
- <td align="center" valign="top"><p> </p>
- <table width="90%" border="0" cellpadding="0" cellspacing="0">
- <tr align="center" valign="middle">
- <th nowrap colspan=2 align="center"><font color="#000000">修 改 收 藏 夹 </font></th>
- </tr>
- <tr><td> </td>
- </tr>
- </table>
- <form name="editfavorites" action="EditFavoritesAction.jsp" method="post" onSubmit="javascript:return checkeditfavorites();">
- <table border="1" cellpadding="1" cellspacing="1" width="90%">
- <tr>
- <td align="right" valign="middle" width="14%"><font color="#0A0A0A">收 藏 名 称: </font></td>
- <td align="left" valign="middle" width="70%" nowrap>
- <input name="Name" type="text" maxlength="40" size="40" value="<%=((Vector)vt.get(0)).get(1).toString()%>">
- <input name="ID" type="Hidden" value="<%=((Vector)vt.get(0)).get(0).toString()%>" >
- </td>
- </tr>
- <tr>
- <td align="right" valign="middle" width="14%"><font color="#0A0A0A">链 接 网 址: </font></td>
- <td align="left" valign="middle" width="70%" nowrap>
- <input name="URL" type="text" maxlength="40" size="70" value="<%=((Vector)vt.get(0)).get(2).toString()%>">
- <input name="LastViewTime" type="hidden" value="<%=StringNew.GetDateString(((Vector)vt.get(0)).get(3).toString(),"yyyy-MM-dd HH:mm")%>">
- </td>
- </tr>
- <tr>
- <td align="right" valign="middle" width="14%"><font color="#0A0A0A">收 藏 分 类: </font></td>
- <td align="left" valign="middle" width="70%" nowrap>
- <select name="KindsID">
- <option value="0">请选择收藏分类</option>
- <%
- Vector vtKinds = FavoritesKindManager.getAllRecord(intUserID);
- for(int i=0;i<vtKinds.size();i++)
- {
- if(((Vector)vtKinds.get(i)).get(0).toString().equalsIgnoreCase(((Vector)vt.get(0)).get(5).toString()))
- out.println("<option value="" + ((Vector)vtKinds.get(i)).get(0).toString() + "" selected>" + ((Vector)vtKinds.get(i)).get(1).toString() + "</option>");
- else
- out.println("<option value="" + ((Vector)vtKinds.get(i)).get(0).toString() + "">" + ((Vector)vtKinds.get(i)).get(1).toString() + "</option>");
- }
- boolean IsShare=(((Vector)vt.get(0)).get(6).toString().compareToIgnoreCase("true")==0);
- %>
- </select>
- </td>
- </tr>
- <tr>
- <td align="right" valign="middle" width="14%"><font color="#0A0A0A">是 否 共 享: </font></td>
- <td align="left" valign="middle" width="70%" nowrap>
- <font color="#0A0A0A"> <input name="IsOpen" type="radio" value="1" <%if(IsShare)out.print("checked");%>>公开共享 <input name="IsOpen" type="radio" value="0" <%if(!IsShare)out.print("checked");%>>私人保密</font>
- </td>
- </tr>
- </table>
- <table width="90%" border="0">
- <tr>
- <td> </td>
- </tr>
- <tr>
- <td> </td>
- <td align="right" valign="middle" nowrap>
- <input type="submit" value="修 改" style="background-color: #FFFFFF; border: 1 solid #000000"> <input type="reset" value="重 填" style="background-color: #FFFFFF; border: 1 solid #000000"> <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">
- </td>
- </tr>
- <tr>
- <td align="right" valign="middle"> </td>
- </tr>
- </table>
- </form>
- </td>
- </tr>
- </table>
- </body>
- </html>
- <%
- }
- else
- {
- %>
- <script language="JavaScript" type="text/JavaScript">
- alert("该记录已经被删除或者您没有权限修改此记录,修改失败!");
- history.back();
- </script>
- <%
- }
- }
- %>