{template 'common/header-base'}
{php $frames = buildframes(FRAME);_calc_current_frames($frames);}
{if !empty($_W['uid'])}

{php global $top_nav} {loop $top_nav $nav} <li{if FRAME == $nav['name']} class="active"{/if}> {$nav['title']} {/loop}

- {$_W['user']['username']}
  - 我的账号
  {if $_W['isfounder']}
  - 自动更新
  - 更新缓存
  {/if}
  - 退出系统
{template 'common/header-notice'}

{else}

- 注册
- 登录

{/if}
{if !defined('IN_MESSAGE')}
{if in_array(FRAME, array('account', 'system', 'advertisement', 'wxapp', 'site', 'webapp', 'phoneapp')) && !in_array($_GPC['a'], array('news-show', 'notice-show'))}
{if !defined('IN_MODULE')}
{/if}
{if !empty($_GPC['m']) && !in_array($_GPC['m'], array('keyword', 'special', 'welcome', 'default', 'userapi', 'service')) || defined('IN_MODULE')}
{template 'common/header-module'}
{else}
{template 'common/header-' . FRAME}
{/if}
{if empty($frames['section']['platform_module_menu']['plugin_menu'])} {loop $frames['section'] $frame_section_id $frame_section} {if !isset($frame_section['is_display']) || !empty($frame_section['is_display'])}
{if $frame_section['title']}
{$frame_section['title']}
{/if}

{loop $frame_section['menu'] $menu_id $menu} {if !empty($menu['is_display'])} {if $menu_id == 'platform_module_more'}
- 更多应用
{else}
- {if $menu['icon']} {if $frame_section_id == 'platform_module'} {else} {/if} {/if} {$menu['title']}
{/if} {/if} {/loop}

{/if} {/loop} {else}

- 主应用
- 插件
{loop $frames['section']['platform_module_menu']['plugin_menu']['menu'] $plugin_name $plugin}
- {$plugin['title']}
{/loop}

{php unset($plugin_name);} {php unset($plugin);}
{loop $frames['section'] $frame_section_id $frame_section} {if !isset($frame_section['is_display']) || !empty($frame_section['is_display'])}
{if $frame_section['title']}
{$frame_section['title']}
{/if}

{loop $frame_section['menu'] $menu_id $menu} {if !empty($menu['is_display'])} {if $menu_id == 'platform_module_more'}
- 更多应用
{else}
- {$menu['title']}
{/if} {/if} {/loop}

{/if} {/loop}
{/if}
{/if} {/if}