FavoritesManage.jsp
资源名称:OA.rar [点击查看]
上传用户:mingda
上传日期:2017-06-20
资源大小:27691k
文件大小:10k
源码类别:
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); %>
- <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" src="/js/changestyle.js">
- </script>
- <script language="JavaScript" type="text/javascript">
- function checkaddFavorites()
- {
- if(document.addFavorites.Name.value=='')
- {
- alert("请输入收藏夹信息名称!");
- document.addFavorites.Name.focus();
- return false;
- }
- if(document.addFavorites.URL.value=='')
- {
- alert("请输入网址!");
- document.addFavorites.URL.focus();
- return false;
- }
- if(document.addFavorites.KindsID.value=='0' || document.addFavorites.KindsID.value==0)
- {
- alert("请选择收藏分类!");
- document.addFavorites.KindsID.focus();
- return false;
- }
- var now = new Date();
- document.addFavorites.LastViewTime.value= now.getYear() + "-" + (now.getMonth()+1) + "-" + now.getDate() + " " + now.getHours() + ":" + now.getMinutes();
- }
- </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>
- <%
- Request t_request = new Request(request);
- int intUserID = m_session.GetInt("UserID");
- int intKindsID = t_request.GetInt("KindsID");
- String strKindsIDs = "";
- if(intKindsID<1)
- {
- Vector vtKinds = FavoritesKindManager.getAllRecord(intUserID);
- if(vtKinds.size()>0)
- {
- out.println("<table width="90%" border="1" cellpadding="3" cellspacing="1" style="">");
- out.println("<tr align="center" valign="middle" bgcolor="" + m_session.GetString("TitleColor") + ""><th colspan="5">收藏夹分类</th></tr>");
- int i=0;
- for(;i < vtKinds.size() ; i++)
- {
- if((i + 1) % 5 == 1) out.println("<tr class="DataRowsSingle" align="center" valign="middle">");
- out.println("<td border="0" class="DataCols" onmouseover="mouseontd(this);" onmouseout="mouseouttd(this,'DataCols');" width="20%" title="" + ((Vector)vtKinds.get(i)).get(1).toString() + "" onclick="window.open('FavoritesManage.jsp?KindsID=" + ((Vector)vtKinds.get(i)).get(0).toString() + "','_self');"><a>" + ((Vector)vtKinds.get(i)).get(1).toString() + "</a></td>");
- if((i + 1) % 5 == 0) out.println("</tr>");
- strKindsIDs += "," + ((Vector)vtKinds.get(i)).get(0).toString();
- }
- if((i) % 5 != 0)
- {
- i= (i) % 5;
- for(;i<5;i++) out.println("<td border="0" class="DataCols" onmouseover="mouseontd(this);" onmouseout="mouseouttd(this,'DataCols');" width="20%"> </td>");
- out.println("</tr>");
- }
- out.println("</table><br>");
- strKindsIDs = strKindsIDs.substring(1);
- }
- }
- else
- {
- strKindsIDs = intKindsID + "";
- out.println("<table width="90%" border="1" cellpadding="1" cellspacing="1" bordercolordark="#ffffff" bordercolorlight="#0A0A0A" style="">");
- out.println("<tr align="center" valign="middle" bgcolor="" + m_session.GetString("TitleColor") + ""><th colspan="5">收藏夹分类:"+FavoritesKindManager.getKindNameByID(intKindsID)+"</th></tr>");
- out.println("<tr class="DataRowsDouble" align="left" valign="middle"><td colspan="5"><a href="FavoritesManage.jsp">返回收藏夹根目录</a></td></tr>");
- }
- if(strKindsIDs.length()>0)
- {
- Vector vt = FavoritesManager.getAllRecord(intKindsID);
- %>
- <table width="90%" border="1" cellpadding="3" cellspacing="0" bordercolordark="#ffffff" bordercolorlight="#0a0a0a" style="">
- <tr align="center" valign="middle" bgcolor="<%=m_session.GetString("TitleColor")%>">
- <th width="3%" height="24" nowrap><img src="/images/white.gif" width="12"></th>
- <th width="5%" nowrap><font color="#000000">序号</font></th>
- <th width="40%" nowrap><font color="#000000">收藏名称</font></th>
- <th width="10%" nowrap><font color="#000000">最后浏览时间</font></th>
- <th width="5%" nowrap><font color="#000000">浏览次数</font></th>
- <th width="11%" nowrap><font color="#000000">修改</font></th>
- <th width="11%" nowrap><font color="#000000">删除</font></th>
- </tr>
- <%
- for(int i=0;i<vt.size();i++)
- {
- String strID = ((Vector)vt.get(i)).get(0).toString();
- if(i % 2 == 0)
- out.println("<tr id="Row"+ i+ "" class="DataRowsSingle" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsSingle');">");
- else
- out.println("<tr id="Row"+ i+ "" class="DataRowsDouble" onmouseover="mouseon(this,'image" + i + "');" onmouseout="mouseout(this,'image" + i + "','DataRowsDouble');">");
- out.println("<td align="right" valign="middle"><img id="image" + i + "" src="../images/lastpost1.gif" style="display:none;"> </td>");
- out.println("<td align="center" valign="middle">" + (i+1) + "</td>");
- out.println("<td align="center" valign="middle" nowrap title="" + ((Vector)vt.get(i)).get(2).toString() + "" onclick="window.open('FavoritesLink.jsp?ID=" + strID + "','_blank')">" + ((Vector)vt.get(i)).get(1).toString() + "</td>");
- out.println("<td align="center" valign="middle" nowrap>" + StringNew.GetDateString(((Vector)vt.get(i)).get(3).toString(),"MM月dd日HH:mm") + "</td>");
- out.println("<td align="center" valign="middle" nowrap>" + ((Vector)vt.get(i)).get(4).toString()+ "</td>");
- if(intKindsID>0)
- {
- out.println("<td align="center" valign="middle" nowrap><a href="EditFavorites.jsp?ID=" + strID + "">修改</a></td>");
- out.println("<td align="center" valign="middle" nowrap><a href="DelFavorites.jsp?ID=" + strID + "&KindsID=" + intKindsID + "" onclick="return confirm('您确实要删除该收藏信息吗?');">删除</a></td>");
- }
- else
- {
- out.println("<td align="center" valign="middle" nowrap> </td>");
- out.println("<td align="center" valign="middle" nowrap> </td>");
- }
- out.println("</tr>");
- }
- %>
- </table>
- <form name="addFavorites" action="AddFavoritesAction.jsp" method="post" onSubmit="javascript:return checkaddFavorites();">
- <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="70">
- </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">
- <input name="LastViewTime" type="hidden" value="<%=StringNew.GetDateString(new Date(),"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" <%if(intKindsID==0)out.print("selected");%>>请选择收藏分类</option>
- <%
- Vector vtKinds = FavoritesKindManager.getAllRecord(intUserID);
- for(int i=0;i<vtKinds.size();i++)
- {
- if(((Vector)vtKinds.get(i)).get(0).toString().equalsIgnoreCase("" + intKindsID))
- 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>");
- }
- %>
- </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">公开共享 <input name="IsOpen" type="radio" value="0" 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">
- </td>
- </tr>
- <tr>
- <td align="right" valign="middle"> </td>
- </tr>
- </table>
- </form>
- <%
- }
- else
- {
- out.println("<script language="javascript">alert("您还没有建立收藏夹分类,请先建立收藏夹分类!");window.location="FavoritesKindManage.jsp";</script>");
- }
- %>
- </td>
- </tr>
- </table>
- </body>
- </html>