人人商城

header.tpl.php 15KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273
  1. <?php defined('IN_IA') or exit('Access Denied');?><?php (!empty($this) && $this instanceof WeModuleSite || 0) ? (include $this->template('common/header-base', TEMPLATE_INCLUDEPATH)) : (include template('common/header-base', TEMPLATE_INCLUDEPATH));?>
  2. <div data-skin="default" class="skin-default <?php if($_GPC['main-lg']) { ?> main-lg-body <?php } ?>">
  3. <?php $frames = buildframes(FRAME);_calc_current_frames($frames);?>
  4. <div class="head mixMenu-head">
  5. <nav class="navbar navbar-default" role="navigation">
  6. <div class="container <?php if(!empty($frames['section']['platform_module_menu']['plugin_menu'])) { ?>plugin-head<?php } ?>">
  7. <div class="navbar-header">
  8. <a class="navbar-brand" href="<?php if($_W['role'] == ACCOUNT_MANAGE_NAME_CLERK) { ?><?php echo url('module/display');?><?php } else { ?><?php echo url('account/display');?><?php } ?>">
  9. <img src="<?php if(!empty($_W['setting']['copyright']['blogo'])) { ?><?php echo to_global_media($_W['setting']['copyright']['blogo'])?><?php } else { ?>./resource/images/logo/logo.png<?php } ?>" class="pull-left" width="110px" height="35px">
  10. <span class="version hidden"><?php echo IMS_VERSION;?></span>
  11. </a>
  12. </div>
  13. <?php if(!empty($_W['uid'])) { ?>
  14. <div class="collapse navbar-collapse">
  15. <style>
  16. .nav > li:hover .dropdown-menu {display: block;}
  17. </style>
  18. <?php global $top_nav?>
  19. <?php $nav_top_fold=array()?>
  20. <?php $nav_top_tiled=array()?>
  21. <?php $nav_custom=array()?>
  22. <?php $platform_url=url('account/display')?>
  23. <?php $nav_top_fold[] = array('name' => 'all', 'title'=>'全部', 'type' => 'all', 'url' => $platform_url)?>
  24. <?php if(is_array($top_nav)) { foreach($top_nav as $nav) { ?>
  25. <?php if(in_array($nav['name'], array(ACCOUNT_TYPE_SIGN, WXAPP_TYPE_SIGN, WEBAPP_TYPE_SIGN, PHONEAPP_TYPE_SIGN, XZAPP_TYPE_SIGN, ALIAPP_TYPE_SIGN))) { ?>
  26. <?php $nav_top_fold[]=$nav?>
  27. <?php } else if(in_array($nav['name'], array('platform', 'module', 'system', 'site'))) { ?>
  28. <?php $nav_top_tiled_system[]=$nav?>
  29. <?php } else if(in_array($nav['name'], array('appmarket', 'store', 'help', 'advertisement'))) { ?>
  30. <?php $nav_top_tiled_other[]=$nav?>
  31. <?php } else if($nav['name']=='custom_help') { ?>
  32. <?php $nav_top_help=$nav?>
  33. <?php } else { ?>
  34. <?php $nav_top_tiled_other[]=$nav?>
  35. <?php } ?>
  36. <?php } } ?>
  37. <ul class="nav navbar-nav navbar-left">
  38. <?php if(is_array($nav_top_tiled_system)) { foreach($nav_top_tiled_system as $nav) { ?>
  39. <li <?php if(FRAME == $nav['name'] && !defined('IN_MODULE')) { ?> class="active" <?php } ?>>
  40. <a href="<?php if(empty($nav['url'])) { ?><?php echo url('home/welcome/' . $nav['name']);?><?php } else { ?><?php echo $nav['url'];?><?php } ?>" <?php if(!empty($nav['blank'])) { ?>target="_blank"<?php } ?>><?php echo $nav['title'];?></a>
  41. </li>
  42. <?php } } ?>
  43. <ul class="other nav navbar-nav navbar-left">
  44. <?php if(is_array($nav_top_tiled_other)) { foreach($nav_top_tiled_other as $nav) { ?>
  45. <li <?php if(FRAME == $nav['name'] && !defined('IN_MODULE')) { ?> class="active" <?php } ?>>
  46. <a href="<?php if(empty($nav['url'])) { ?><?php echo url('home/welcome/' . $nav['name']);?><?php } else { ?><?php echo $nav['url'];?><?php } ?>" <?php if(!empty($nav['blank'])) { ?>target="_blank"<?php } ?>> <?php echo $nav['title'];?> </a>
  47. </li>
  48. <?php } } ?>
  49. </ul>
  50. </ul>
  51. <ul class="nav navbar-nav navbar-left hidden">
  52. <?php global $top_nav?>
  53. <?php if(is_array($top_nav)) { foreach($top_nav as $nav) { ?>
  54. <li <?php if(FRAME == $nav['name'] && !defined('IN_MODULE')) { ?> class="active"<?php } ?>><a href="<?php if(empty($nav['url'])) { ?><?php echo url('home/welcome/' . $nav['name']);?><?php } else { ?><?php echo $nav['url'];?><?php } ?>" <?php if(!empty($nav['blank'])) { ?>target="_blank"<?php } ?>><?php echo $nav['title'];?></a></li>
  55. <?php } } ?>
  56. </ul>
  57. <ul class="nav navbar-nav navbar-right ">
  58. <?php if(!empty($nav_top_help)) { ?>
  59. <li>
  60. <a href="<?php if(empty($nav_top_help['url'])) { ?><?php echo url('home/welcome/' . $nav_top_help['name']);?><?php } else { ?><?php echo $nav_top_help['url'];?><?php } ?>" data-toggle="tooltip" data-placement="bottom" title="帮助" <?php if(!empty($nav_top_help['blank'])) { ?>target="_blank"<?php } ?>>
  61. <i class="wi wi-explain-sign color-gray" ></i>
  62. </a>
  63. </li>
  64. <?php } ?>
  65. <?php $frames_site = buildframes('site')?>
  66. <?php $workorder_nav=$frames_site['section']['workorder']['menu']['system_workorder']?>
  67. <?php if($workorder_nav['is_display']) { ?>
  68. <?php if(permission_check_account_user('see_workorder')) { ?>
  69. <li>
  70. <a href="<?php echo url('system/workorder/display')?>" data-toggle="tooltip" data-placement="bottom" title="工单">
  71. <i class="wi wi-system-work color-gray" ></i>
  72. </a>
  73. </li>
  74. <?php } ?>
  75. <?php } ?>
  76. <?php (!empty($this) && $this instanceof WeModuleSite || 0) ? (include $this->template('common/header-notice', TEMPLATE_INCLUDEPATH)) : (include template('common/header-notice', TEMPLATE_INCLUDEPATH));?>
  77. <li class="dropdown">
  78. <a href="javascript:;" class="dropdown-toggle" data-toggle="dropdown"><i class="wi wi-user color-gray"></i><?php echo $_W['user']['username'];?> <span class="caret"></span></a>
  79. <ul class="dropdown-menu color-gray" role="menu">
  80. <li>
  81. <a href="<?php echo url('user/profile');?>" target="_blank"><i class="wi wi-account color-gray"></i> 我的账号</a>
  82. </li>
  83. <li class="divider"></li>
  84. <?php if(permission_check_account_user('see_system_upgrade')) { ?>
  85. <li><a href="<?php echo url('cloud/upgrade');?>" target="_blank"><i class="wi wi-update color-gray"></i> 自动更新</a></li>
  86. <?php } ?>
  87. <?php if(permission_check_account_user('see_system_updatecache')) { ?>
  88. <li><a href="<?php echo url('system/updatecache');?>" target="_blank"><i class="wi wi-cache color-gray"></i> 更新缓存</a></li>
  89. <li class="divider"></li>
  90. <?php } ?>
  91. <li>
  92. <a href="<?php echo url('user/logout');?>"><i class="fa fa-sign-out color-gray"></i> 退出系统</a>
  93. </li>
  94. </ul>
  95. </li>
  96. </ul>
  97. </div>
  98. <?php } else { ?>
  99. <div class="collapse navbar-collapse">
  100. <ul class="nav navbar-nav navbar-right">
  101. <li class="dropdown"><a href="<?php echo url('user/register');?>">注册</a></li>
  102. <li class="dropdown"><a href="<?php echo url('user/login');?>">登录</a></li>
  103. </ul>
  104. </div>
  105. <?php } ?>
  106. </div>
  107. </nav>
  108. </div>
  109. <?php if(empty($_COOKIE['check_setmeal']) && !empty($_W['account']['endtime']) && ($_W['account']['endtime'] - TIMESTAMP < (6*86400))) { ?>
  110. <div class="system-tips we7-body-alert" id="setmeal-tips">
  111. <div class="container text-right">
  112. <div class="alert-info">
  113. <a href="<?php if($_W['isfounder']) { ?><?php echo url('user/edit', array('uid' => $_W['account']['uid']));?><?php } else { ?>javascript:void(0);<?php } ?>">
  114. 该公众号管理员服务有效期:<?php echo date('Y-m-d', $_W['account']['starttime']);?> ~ <?php echo date('Y-m-d', $_W['account']['endtime']);?>.
  115. <?php if($_W['account']['endtime'] < TIMESTAMP) { ?>
  116. 目前已到期,请联系管理员续费
  117. <?php } else { ?>
  118. 将在<?php echo floor(($_W['account']['endtime'] - strtotime(date('Y-m-d')))/86400);?>天后到期,请及时付费
  119. <?php } ?>
  120. </a>
  121. <span class="tips-close" onclick="check_setmeal_hide();"><i class="wi wi-error-sign"></i></span>
  122. </div>
  123. </div>
  124. </div>
  125. <script>
  126. function check_setmeal_hide() {
  127. util.cookie.set('check_setmeal', 1, 1800);
  128. $('#setmeal-tips').hide();
  129. return false;
  130. }
  131. </script>
  132. <?php } ?>
  133. <div class="main">
  134. <?php if(!defined('IN_MESSAGE')) { ?>
  135. <div class="container">
  136. <a href="javascript:;" class="js-big-main button-to-big color-gray" title="加宽"><?php if($_GPC['main-lg']) { ?>正常<?php } else { ?>宽屏<?php } ?></a>
  137. <?php if(defined('FRAME') && in_array(FRAME, array('account', 'system', 'advertisement', 'wxapp', 'site', 'store', 'webapp', 'phoneapp', 'xzapp')) && !in_array($_GPC['a'], array('news-show', 'notice-show'))) { ?>
  138. <div class="panel panel-content main-panel-content <?php if(!empty($frames['section']['platform_module_menu']['plugin_menu'])) { ?>panel-content-plugin<?php } ?>">
  139. <div class="content-head panel-heading main-panel-heading">
  140. <?php if(($_GPC['c'] != 'cloud' && !empty($_GPC['m']) && !in_array($_GPC['m'], array('keyword', 'special', 'welcome', 'default', 'userapi', 'service'))) || defined('IN_MODULE')) { ?>
  141. <?php (!empty($this) && $this instanceof WeModuleSite || 0) ? (include $this->template('common/header-module', TEMPLATE_INCLUDEPATH)) : (include template('common/header-module', TEMPLATE_INCLUDEPATH));?>
  142. <?php } else { ?>
  143. <?php (!empty($this) && $this instanceof WeModuleSite || 0) ? (include $this->template('common/header-' . FRAME, TEMPLATE_INCLUDEPATH)) : (include template('common/header-' . FRAME, TEMPLATE_INCLUDEPATH));?>
  144. <?php } ?>
  145. </div>
  146. <div class="panel-body clearfix main-panel-body <?php if(!empty($_W['setting']['copyright']['leftmenufixed'])) { ?>menu-fixed<?php } ?>">
  147. <div class="left-menu">
  148. <?php if(empty($frames['section']['platform_module_menu']['plugin_menu'])) { ?>
  149. <div class="left-menu-content">
  150. <?php if(is_array($frames['section'])) { foreach($frames['section'] as $frame_section_id => $frame_section) { ?>
  151. <?php if(FRAME == 'store' && !($_W['isfounder'] && !user_is_vice_founder()) && !empty($frame_section['founder'])) { ?>
  152. <?php continue;?>
  153. <?php } ?>
  154. <?php if(!isset($frame_section['is_display']) || !empty($frame_section['is_display'])) { ?>
  155. <div class="panel panel-menu">
  156. <?php if($frame_section['title']) { ?>
  157. <div class="panel-heading">
  158. <span class="no-collapse" data-toggle="collapse" data-target="#frame-<?php echo $frame_section_id;?>" onclick="util.cookie.set('menu_fold_tag:<?php echo $frame_section_id;?>', util.cookie.get('menu_fold_tag:<?php echo $frame_section_id;?>') == 1 ? 0 : 1)"><?php echo $frame_section['title'];?><i class="wi wi-down-sign-s pull-right setting"></i></span>
  159. </div>
  160. <?php } ?>
  161. <ul class="list-group collapse <?php if($_GPC['menu_fold_tag:'.$frame_section_id] == 0) { ?>in<?php } ?>" id="frame-<?php echo $frame_section_id;?>">
  162. <?php if(is_array($frame_section['menu'])) { foreach($frame_section['menu'] as $menu_id => $menu) { ?>
  163. <?php if(!empty($menu['is_display'])) { ?>
  164. <?php if($menu_id == 'platform_module_more') { ?>
  165. <li class="list-group-item list-group-more">
  166. <a href="<?php echo $menu['url']?>"><span class="label label-more">更多应用</span></a>
  167. </li>
  168. <?php } else { ?>
  169. <?php if($menu['active']) { ?><?php $active_sub_permission = $menu['sub_permission']?><?php } ?>
  170. <?php if((in_array($_W['role'], array(ACCOUNT_MANAGE_NAME_OWNER, ACCOUNT_MANAGE_NAME_FOUNDER, ACCOUNT_MANAGE_NAME_VICE_FOUNDER)) && $menu_id == 'front_download' || $menu_id != 'front_download') && !($menu_id == 'platform_menu' && $_W['account']['level'] == ACCOUNT_SUBSCRIPTION) || $_W['account']['type'] == ACCOUNT_TYPE_XZAPP_NORMAL) { ?>
  171. <li class="list-group-item <?php if($menu['active']) { ?>active<?php } ?>">
  172. <a href="<?php echo $menu['url'];?>" class="text-over" <?php if($frame_section_id == 'platform_module') { ?>target="_blank"<?php } ?>>
  173. <?php if($menu['icon']) { ?>
  174. <?php if($frame_section_id == 'platform_module') { ?>
  175. <img src="<?php echo $menu['icon'];?>"/>
  176. <?php } else { ?>
  177. <i class="<?php echo $menu['icon'];?>"></i>
  178. <?php } ?>
  179. <?php } ?>
  180. <?php echo $menu['title'];?>
  181. <?php if(!empty($menu['need_upload']) && $action != 'front-download') { ?><i class="wi wi-info-sign color-red" style="font-size:14px;position:relative;bottom:4px"></i><?php } ?>
  182. </a>
  183. </li>
  184. <?php } ?>
  185. <?php } ?>
  186. <?php } ?>
  187. <?php } } ?>
  188. </ul>
  189. </div>
  190. <?php } ?>
  191. <?php } } ?>
  192. </div>
  193. <?php } else { ?>
  194. <div class="plugin-menu clearfix">
  195. <div class="plugin-menu-main pull-left">
  196. <ul class="list-group">
  197. <li class="list-group-item<?php if($_W['current_module']['name'] == $frames['section']['platform_module_menu']['plugin_menu']['main_module']) { ?> active<?php } ?>">
  198. <a href="<?php echo url('home/welcome/ext', array('m' => $frames['section']['platform_module_menu']['plugin_menu']['main_module'], 'version_id' => intval($_GPC['version_id'])))?>">
  199. <i class="wi wi-main-apply"></i>
  200. <div>主应用</div>
  201. </a>
  202. </li>
  203. <li class="list-group-item">
  204. <div>插件</div>
  205. </li>
  206. <?php if(is_array($frames['section']['platform_module_menu']['plugin_menu']['menu'])) { foreach($frames['section']['platform_module_menu']['plugin_menu']['menu'] as $plugin_name => $plugin) { ?>
  207. <li class="list-group-item<?php if($_W['current_module']['name'] == $plugin_name) { ?> active<?php } ?>">
  208. <a href="<?php echo url('home/welcome/ext', array('m' => $plugin_name, 'version_id' => intval($_GPC['version_id'])))?>">
  209. <img src="<?php echo $plugin['icon'];?>" alt="" class="img-icon" />
  210. <div><?php echo $plugin['title'];?></div>
  211. </a>
  212. </li>
  213. <?php } } ?>
  214. </ul>
  215. <?php unset($plugin_name);?>
  216. <?php unset($plugin);?>
  217. </div>
  218. <div class="plugin-menu-sub pull-left">
  219. <?php if(is_array($frames['section'])) { foreach($frames['section'] as $frame_section_id => $frame_section) { ?>
  220. <?php if(!isset($frame_section['is_display']) || !empty($frame_section['is_display'])) { ?>
  221. <div class="panel panel-menu">
  222. <?php if($frame_section['title']) { ?>
  223. <div class="panel-heading">
  224. <span class="no-collapse"><?php echo $frame_section['title'];?><i class="wi wi-appsetting pull-right setting"></i></span>
  225. </div>
  226. <?php } ?>
  227. <ul class="list-group panel-collapse">
  228. <?php if(is_array($frame_section['menu'])) { foreach($frame_section['menu'] as $menu_id => $menu) { ?>
  229. <?php if(!empty($menu['is_display'])) { ?>
  230. <?php if($menu_id == 'platform_module_more') { ?>
  231. <li class="list-group-item list-group-more">
  232. <a href="<?php echo url('module/manage-account');?>"><span class="label label-more">更多应用</span></a>
  233. </li>
  234. <?php } else { ?>
  235. <li class="list-group-item <?php if($menu['active']) { ?>active<?php } ?>">
  236. <a href="<?php echo $menu['url'];?>" class="text-over" <?php if($frame_section_id == 'platform_module') { ?>target="_blank"<?php } ?>>
  237. <?php if($menu['icon']) { ?>
  238. <?php if($frame_section_id == 'platform_module') { ?>
  239. <img src="<?php echo $menu['icon'];?>"/>
  240. <?php } else { ?>
  241. <i class="<?php echo $menu['icon'];?>"></i>
  242. <?php } ?>
  243. <?php } ?>
  244. <?php echo $menu['title'];?>
  245. </a>
  246. </li>
  247. <?php } ?>
  248. <?php } ?>
  249. <?php } } ?>
  250. </ul>
  251. </div>
  252. <?php } ?>
  253. <?php } } ?>
  254. </div>
  255. </div>
  256. <?php } ?>
  257. </div>
  258. <div class="right-content">
  259. <?php } ?>
  260. <?php } ?>