body_header.jsp 3.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  1. <%@ taglib prefix="shiro" uri="http://shiro.apache.org/tags" %>
  2. <%@ page language="java" pageEncoding="UTF-8" contentType="text/html; charset=UTF-8"%>
  3. <%
  4. String basePath = request.getContextPath();
  5. String resourcePath = basePath + "/resource";
  6. %>
  7. <div class="top">
  8. <div class="top-main">
  9. <div class="top1">
  10. <img src="<%=resourcePath%>/images/share/logo.png" alt="">&nbsp;衡水大数据中心资源共享平台
  11. </div>
  12. <div class="top2">
  13. <span><a href="<%=basePath%>/" class="top2-a">首页</a></span>
  14. <span><a href="<%=basePath%>/share/data/index.htm" class="top2-a">共享目录</a></span>
  15. <span><a href="<%=basePath%>/share/dataRequirement/index.htm" class="top2-a">部门需求</a></span>
  16. <shiro:guest>
  17. <%--<a href="<%=basePath%>/share/account/login.htm" class="tx1">--%>
  18. <span><a href="javascript:void(0);"onclick="window.location.href='<%=basePath%>/share/account/login.htm'" class="top2-a">用户中心</a></span>
  19. <%--</a>--%>
  20. </shiro:guest>
  21. <shiro:authenticated>
  22. <%--<a id="hiddenS" class="tx">--%>
  23. <span><a href="javascript:void(0);" onclick="window.location.href='<%=basePath%>/share/mydata/index.htm/1'" class="top2-a">用户中心</a></span>
  24. <%--</a>--%>
  25. </shiro:authenticated>
  26. <span class="sousuo">
  27. <input type="text" id="searchName" name="searchName" placeholder="请输入要查找的内容">
  28. <img onclick="searchName()" src="<%=resourcePath%>/images/share/icon_sousuo.png" alt="" class="top2-img">
  29. </span>
  30. <shiro:guest>
  31. <%--<a href="<%=basePath%>/share/account/login.htm" class="tx1">--%>
  32. <img class="tx1" onclick="window.location.href='<%=basePath%>/share/account/login.htm'" src="<%=resourcePath%>/images/share/icon_denglu.png" alt="">
  33. <%--</a>--%>
  34. </shiro:guest>
  35. <shiro:authenticated>
  36. <%--<a id="hiddenS" class="tx">--%>
  37. <img class="tx" onclick="showYonghu()" src="<%=resourcePath%>/images/share/touxiang.png" alt="">
  38. <%--</a>--%>
  39. </shiro:authenticated>
  40. </div>
  41. <div class="tuichutanchuang" hidden id="yonghuzhongxin">
  42. <div class="yonghuzhongxin">
  43. <a href="<%=basePath%>/share/mydata/index.htm/1" class="yonghuzx-font">
  44. <span class="icon1"></span>
  45. 用户中心
  46. </a>
  47. </div>
  48. <div class="yonghuzhongxin">
  49. <a href="<%=basePath%>/share/account/logout.action" class="tuichu-font">
  50. <span class="icon20"></span>
  51. 退出
  52. </a>
  53. </div>
  54. </div>
  55. </div>
  56. </div>
  57. <script type="text/javascript">
  58. function searchName() {
  59. var searchName = "" ;
  60. if(true/*$("#searchName").val()!=null&&$("#searchName").val()!=undefined*//*&&$("#searchName").val()!=""*/){
  61. searchName = "?searchName="+$("#searchName").val() ;
  62. window.location.href="<%=basePath%>/share/"+searchName ;
  63. }
  64. }
  65. function showYonghu() {
  66. $("#yonghuzhongxin").toggle() ;
  67. }
  68. function showSearchName() {
  69. var url = window.location.search;
  70. if (url.indexOf('?') < 0) { return false; }
  71. var name=url.substring(url.indexOf("=")+1)
  72. $('#searchName').val(decodeURI(name))
  73. }
  74. showSearchName()
  75. </script>