Index_index.html 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133
  1. {__NOLAYOUT__}<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  5. <meta http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
  6. <script type="text/javascript" src="./Public/Js/jquery.min.js"></script>
  7. <script type="text/javascript" src="./Public/Js/jquery.artDialog.js?skin=default"></script>
  8. <script type="text/javascript" src="./Public/Js/iframeTools.js"></script>
  9. <link rel='stylesheet' type='text/css' href='./Public/Css/style.css'>
  10. <link rel='stylesheet' type='text/css' href='./Public/fonts/iconfont.css'>
  11. <title>{:L('welcome')}{:L('system_name')}</title>
  12. </head>
  13. <body>
  14. <div id="header" class="header">
  15. <div class="logo"><span class="logo_cn">网站管理系统</span><span class="logo_en">Manage System</span></div>
  16. <div class="nav">&nbsp;&nbsp;&nbsp;&nbsp;{:L('welcome_user')}{$Think.session.username} <i>|</i> [{$usergroup}] <i>|</i> [<a href="{:U('Login/logout')}" target="_top">{:L('logout')}</a>] <i>|</i> <a href="{$site_url}" target="_blank">{:L('home_index')}</a> <i>|</i> <a href="javascript:void(0);" onclick="gocacheurl();" >{:L('UPDATE_CACHE')}</a></div>
  17. </div>
  18. <div id="Main_content">
  19. <div id="MainBox" >
  20. <div class="main_box">
  21. <div id="main_loading"><img src="./Public/Images/loading.gif" width="28" height="28" alt=""> {:L('load_page')}</div>
  22. <iframe name="main" id="Main" src='{:U("Index/main")}' frameborder="false" scrolling="auto" width="100%" height="auto" allowtransparency="true"></iframe>
  23. </div>
  24. </div>
  25. <div id="leftMenuBox">
  26. <div id="leftMenu">
  27. <volist name="menu" id="r" key="n">
  28. <dl id="nav_{$r['bnav']['id']}" {if $n==1}class="on"{/if}>
  29. <dt><a href="javascript:void(0);"><span class="iconfont icon-{$n}"></span>{$r['bnav']['name']}<i></i></a></dt>
  30. <dd {if $n==1}style="display:block;"{/if}>
  31. <ul>
  32. <volist name="r[nav]" id="item">
  33. <li id="li_{$item['id']}"><span onclick="javascript:gourl('{$item['id']}','{:U($item['model'].'/'.$item['action'],$item['data'])}')"><a href="{:U($item['model'].'/'.$item['action'],$item['data'])}" class="name" target="main"><i></i>{$item['name']}</a>{if $r[bnav]['model']=='Category'}<a href="{:U($item['model'].'/add',$item['data'])}" id="{$i}" class="add" target="main">{:L(add)}</a>{/if}</span></li>
  34. </volist>
  35. </ul>
  36. </dd>
  37. </dl>
  38. </volist>
  39. </div>
  40. </div>
  41. </div>
  42. <script language="JavaScript">
  43. if(!Array.prototype.map)
  44. Array.prototype.map = function(fn,scope) {
  45. var result = [],ri = 0;
  46. for (var i = 0,n = this.length; i < n; i++){
  47. if(i in this){
  48. result[ri++] = fn.call(scope ,this[i],i,this);
  49. }
  50. }
  51. return result;
  52. };
  53. var getWindowWH = function(){
  54. return ["Height","Width"].map(function(name){
  55. return window["inner"+name] ||
  56. document.compatMode === "CSS1Compat" && document.documentElement[ "client" + name ] || document.body[ "client" + name ]
  57. });
  58. }
  59. window.onload = function (){
  60. if(!+"\v1" && !document.querySelector) { //IE6 IE7
  61. document.body.onresize = resize;
  62. } else {
  63. window.onresize = resize;
  64. }
  65. function resize() {
  66. wSize();
  67. return false;
  68. }
  69. }
  70. function wSize(){
  71. var str=getWindowWH();
  72. var strs= new Array();
  73. strs=str.toString().split(","); //字符串分割
  74. var h = strs[0] - 46;
  75. $('#Main').height(h);
  76. }
  77. wSize();
  78. function gourl(n,url){
  79. $('#leftMenu ul li').removeClass('on');
  80. $('#li_'+n).addClass('on');
  81. window.main.location.href=url;
  82. var main = $('#Main');
  83. main.hide();
  84. $("#main_loading").show();
  85. var isOnLoad = true;
  86. main.attr("src", url);
  87. main.load(function() {
  88. isOnLoad = false;
  89. main.show();
  90. });
  91. }
  92. function leftMenu(){
  93. $("#leftMenu>dl>dt").click(function(){
  94. var taht = $(this);
  95. var parentObj = taht.parent("dl");
  96. if(parentObj.hasClass("on")){
  97. taht.siblings("dd").slideUp(300);
  98. parentObj.removeClass("on");
  99. }else{
  100. taht.siblings("dd").slideDown(300);
  101. parentObj.addClass("on").siblings().removeClass("on").find("dd").slideUp(300)
  102. }
  103. })
  104. }
  105. leftMenu();
  106. function gocacheurl(){
  107. mainurl = window.main.location.href;
  108. window.main.location.href= "{:U('Admin/Index/cache')}&forward="+encodeURIComponent(mainurl);
  109. }
  110. //
  111. //function toggleMenu(doit){
  112. // if(doit==1){
  113. // $('#Main_drop a.on').hide();
  114. // $('#Main_drop a.off').show();
  115. // $('#MainBox .main_box').css('margin-left','24px');
  116. // $('#leftMenu').hide();
  117. // }else{
  118. // $('#Main_drop a.off').hide();
  119. // $('#Main_drop a.on').show();
  120. // $('#leftMenu').show();
  121. // $('#MainBox .main_box').css('margin-left','224px');
  122. // }
  123. //}
  124. </script>
  125. </body>
  126. </html>