人人商城

header.html 12KB

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