【discuzx2】header.htm模板文件深入分析

[php] view plain copy
 
 print?
  1. <!--{subtemplate common/header_common}-->  
  2.         <!-- 站点标题 -->  
  3.     <meta name="application-name" content="$_G['setting']['bbname']" />  
  4.         <!-- 站点标题 -->  
  5.     <meta name="msapplication-tooltip" content="$_G['setting']['bbname']" />  
  6.         <!-- 门户 -->  
  7.     <!--{if $_G['setting']['portalstatus']}--><meta name="msapplication-task" content="name=$_G['setting']['navs'][1]['navname'];action-uri={echo !empty($_G['setting']['domain']['app']['portal']) ? 'http://'.$_G['setting']['domain']['app']['portal'] : $_G[siteurl].'portal.php'};icon-uri={$_G[siteurl]}{IMGDIR}/portal.ico" /><!--{/if}-->  
  8.     <!-- 论坛 -->  
  9.         <meta name="msapplication-task" content="name=$_G['setting']['navs'][2]['navname'];action-uri={echo !empty($_G['setting']['domain']['app']['forum']) ? 'http://'.$_G['setting']['domain']['app']['forum'] : $_G[siteurl].'forum.php'};icon-uri={$_G[siteurl]}{IMGDIR}/bbs.ico" />  
  10.     <!-- 群组 -->  
  11.         <!--{if $_G['setting']['groupstatus']}--><meta name="msapplication-task" content="name=$_G['setting']['navs'][3]['navname'];action-uri={echo !empty($_G['setting']['domain']['app']['group']) ? 'http://'.$_G['setting']['domain']['app']['group'] : $_G[siteurl].'group.php'};icon-uri={$_G[siteurl]}{IMGDIR}/group.ico" /><!--{/if}-->  
  12.     <!-- 家园 -->  
  13.         <!--{if helper_access::check_module('feed')}--><meta name="msapplication-task" content="name=$_G['setting']['navs'][4]['navname'];action-uri={echo !empty($_G['setting']['domain']['app']['home']) ? 'http://'.$_G['setting']['domain']['app']['home'] : $_G[siteurl].'home.php'};icon-uri={$_G[siteurl]}{IMGDIR}/home.ico" /><!--{/if}-->  
  14.     <!--{if $_G['basescript'] == 'forum' && $_G['setting']['archiver']}-->  
  15.                 <!-- 站点地图 --><!--站点地图-->  
  16.         <link rel="archives" title="$_G['setting']['bbname']" href="{$_G[siteurl]}archiver/" />  
  17.     <!--{/if}-->  
  18.     <!--{if !empty($rsshead)}-->$rsshead<!--{/if}-->  
  19.     <!--{if widthauto()}-->  
  20.         <link rel="stylesheet" id="css_widthauto" type="text/css" href="data/cache/style_{STYLEID}_widthauto.css?{VERHASH}" />  
  21.         <script type="text/javascript">HTMLNODE.className += ' widthauto'</script>  
  22.     <!--{/if}-->  
  23.         <!-- 选择加载js文件 -->  
  24.     <!--{if $_G['basescript'] == 'forum' || $_G['basescript'] == 'group'}-->  
  25.         <script type="text/javascript" src="{$_G[setting][jspath]}forum.js?{VERHASH}"></script>  
  26.     <!--{elseif $_G['basescript'] == 'home' || $_G['basescript'] == 'userapp'}-->  
  27.         <script type="text/javascript" src="{$_G[setting][jspath]}home.js?{VERHASH}"></script>  
  28.     <!--{elseif $_G['basescript'] == 'portal'}-->  
  29.         <script type="text/javascript" src="{$_G[setting][jspath]}portal.js?{VERHASH}"></script>  
  30.     <!--{/if}-->  
  31.         <!-- 当diy时,会加载此js文件 -->  
  32.     <!--{if $_G['basescript'] != 'portal' && $_GET['diy'] == 'yes' && check_diy_perm($topic)}-->  
  33.         <script type="text/javascript" src="{$_G[setting][jspath]}portal.js?{VERHASH}"></script>  
  34.     <!--{/if}-->  
  35.         <!-- 当diy时,会加载此公共的css样式文件 -->  
  36.     <!--{if $_GET['diy'] == 'yes' && check_diy_perm($topic)}-->  
  37.     <link rel="stylesheet" type="text/css" id="diy_common" href="data/cache/style_{STYLEID}_css_diy.css?{VERHASH}" />  
  38.     <!--{/if}-->  
  39. </head>  
  40.   
  41. <!-- id="nv_forum" class="pg_index" -->  
  42. <body id="nv_{$_G[basescript]}" class="pg_{CURMODULE}{if $_G['basescript'] === 'portal' && CURMODULE === 'list' && !empty($cat)} {$cat['bodycss']}{/if}" onkeydown="if(event.keyCode==27) return false;">  
  43.     <div id="append_parent"></div><div id="ajaxwaitid"></div>  
  44.     <!--{if $_GET['diy'] == 'yes' && check_diy_perm($topic)}-->  
  45.         <!--{template common/header_diy}--><!-- diy面板模板 -->  
  46.     <!--{/if}-->  
  47.     <!--{if check_diy_perm($topic)}-->  
  48.         <!--{block diynav}-->  
  49.             <a id="diy-tg" href="javascript:openDiy();" title="{lang open_diy}" class="xi1 xw1" onmouseover="showMenu(this.id)"><img src="{STATICURL}image/diy/panel-toggle.png" alt="DIY" /></a>  
  50.             <div id="diy-tg_menu" style="display: none;">  
  51.                 <ul>  
  52.                     <li><a href="javascript:saveUserdata('diy_advance_mode', '');openDiy();" class="xi2">{lang header_diy_mode_simple}</a></li>  
  53.                     <li><a href="javascript:saveUserdata('diy_advance_mode', '1');openDiy();" class="xi2">{lang header_diy_mode_adv}</a></li>  
  54.                 </ul>  
  55.             </div>  
  56.         <!--{/block}-->  
  57.     <!--{/if}-->  
  58.     <!--{if CURMODULE == 'topic' && $topic && empty($topic['useheader']) && check_diy_perm($topic)}-->  
  59.         $diynav  
  60.     <!--{/if}-->  
  61.     <!--{if empty($topic) || $topic['useheader']}-->  
  62.         <!--{if $_G['setting']['mobile']['allowmobile'] && (!$_G['setting']['cacheindexlife'] && !$_G['setting']['cachethreadon'] || $_G['uid']) && ($_GET['diy'] != 'yes' || !$_GET['inajax']) && ($_G['mobile'] != '' && $_G['cookie']['mobile'] == '' && $_GET['mobile'] != 'no')}-->  
  63.             <div class="xi1 bm bm_c">  
  64.                 {lang your_mobile_browser}<a href="{$_G['siteurl']}forum.php?mobile=yes">{lang go_to_mobile}</a> <span class="xg1">|</span> <a href="$_G['setting']['mobile']['nomobileurl']">{lang to_be_continue}</a>  
  65.             </div>  
  66.         <!--{/if}-->  
  67.   
  68.         <div id="toptb" class="cl">  
  69.             <!--{hook/global_cpnav_top}-->  
  70.             <div class="wp">  
  71.                 <div class="z">  
  72.                                         <!-- 顶部导航-居左 -->  
  73.                     <!--{loop $_G['setting']['topnavs'][0] $nav}-->  
  74.                         <!--{if $nav['available'] && (!$nav['level'] || ($nav['level'] == 1 && $_G['uid']) || ($nav['level'] == 2 && $_G['adminid'] > 0) || ($nav['level'] == 3 && $_G['adminid'] == 1))}-->$nav[code]<!--{/if}-->  
  75.                     <!--{/loop}-->  
  76.                                         <!-- 没起作用 -->  
  77.                     <!--{hook/global_cpnav_extra1}-->  
  78.                 </div>  
  79.                 <div class="y">  
  80.                     <a id="switchblind" href="javascript:;" onclick="toggleBlind(this)" title="{lang switch_blind}" class="switchblind">{lang switch_blind}</a>  
  81.                     <!--{hook/global_cpnav_extra2}-->  
  82.                                         <!-- 顶部导航-居右 -->  
  83.                     <!--{loop $_G['setting']['topnavs'][1] $nav}-->  
  84.                         <!--{if $nav['available'] && (!$nav['level'] || ($nav['level'] == 1 && $_G['uid']) || ($nav['level'] == 2 && $_G['adminid'] > 0) || ($nav['level'] == 3 && $_G['adminid'] == 1))}-->$nav[code]<!--{/if}-->  
  85.                     <!--{/loop}-->  
  86.                                         <!-- 切换到宽版 -->  
  87.                     <!--{if empty($_G['disabledwidthauto']) && $_G['setting']['switchwidthauto']}-->  
  88.                         <a href="javascript:;" onclick="widthauto(this)"><!--{if widthauto()}-->{lang switch_narrow}<!--{else}-->{lang switch_wide}<!--{/if}--></a>  
  89.                     <!--{/if}-->  
  90.                                         <!-- 切换风格 -->  
  91.                     <!--{if $_G['uid'] && !empty($_G['style']['extstyle'])}--><a id="sslct" href="javascript:;" onmouseover="delayShow(this, function() {showMenu({'ctrlid':'sslct','pos':'34!'})});">{lang changestyle}</a><!--{/if}-->  
  92.                     <!-- 打开diy面板 -->  
  93.                                         <!--{if check_diy_perm($topic)}-->  
  94.                         $diynav  
  95.                     <!--{/if}-->  
  96.                 </div>  
  97.             </div>  
  98.         </div>  
  99.   
  100.         <!--{if !IS_ROBOT}-->  
  101.             <!--{if $_G['uid'] && !empty($_G['style']['extstyle'])}-->  
  102.                 <div id="sslct_menu" class="cl p_pop" style="display: none;">  
  103.                     <!--{if !$_G[style][defaultextstyle]}--><span class="sslct_btn" onclick="extstyle('')" title="{lang default}"><i></i></span><!--{/if}-->  
  104.                     <!--{loop $_G['style']['extstyle'] $extstyle}-->  
  105.                         <span class="sslct_btn" onclick="extstyle('$extstyle[0]')" title="$extstyle[1]"><i style='background:$extstyle[2]'></i></span>  
  106.                     <!--{/loop}-->  
  107.                 </div>  
  108.             <!--{/if}-->  
  109.   
  110.                 <div id="qmenu_menu" class="p_pop {if !$_G['uid']}blk{/if}" style="display: none;">  
  111.                     <!--{if $_G['uid']}-->  
  112.                     <ul>  
  113.                         <!--{loop $_G['setting']['mynavs'] $nav}-->  
  114.                             <!--{if $nav['available'] && (!$nav['level'] || ($nav['level'] == 1 && $_G['uid']) || ($nav['level'] == 2 && $_G['adminid'] > 0) || ($nav['level'] == 3 && $_G['adminid'] == 1))}-->  
  115.                                 <li>$nav[code]</li>  
  116.                             <!--{/if}-->  
  117.                         <!--{/loop}-->  
  118.                     </ul>  
  119.                     <!--{elseif $_G[connectguest]}-->  
  120.                         <div class="ptm pbw hm">  
  121.                             {lang connect_fill_profile_to_visit}  
  122.                         </div>  
  123.                     <!--{else}-->  
  124.                         <div class="ptm pbw hm">  
  125.                             {lang my_nav_login}  
  126.                         </div>  
  127.                     <!--{/if}-->  
  128.                 </div>  
  129.         <!--{/if}-->  
  130.                 <!-- 内置广告位 -->  
  131.         <!--{ad/headerbanner/wp a_h}-->  
  132.         <div id="hd">  
  133.             <div class="wp">  
  134.                 <div class="hdc cl">  
  135.                     <!--{eval $mnid = getcurrentnav();}-->  
  136.                                         <!-- 社区动力logo图:"static/image/common/logo.png" -->  
  137.                     <h2><!--{if !isset($_G['setting']['navlogos'][$mnid])}--><a href="{if $_G['setting']['domain']['app']['default']}http://{$_G['setting']['domain']['app']['default']}/{else}./{/if}" title="$_G['setting']['bbname']">{$_G['style']['boardlogo']}</a><!--{else}-->$_G['setting']['navlogos'][$mnid]<!--{/if}--></h2>  
  138.   
  139.                     <!--{if $_G['uid']}-->  
  140.                     <div id="um">  
  141.                                                 <!-- 头像 -->  
  142.                         <div class="avt y"><a href="home.php?mod=space&uid=$_G[uid]"><!--{avatar($_G[uid],small)}--></a></div>  
  143.                         <p>  
  144.                                                         <!-- 当前登录用户名,如:admin -->  
  145.                             <strong class="vwmy{if $_G['setting']['connect']['allow'] && $_G[member][conisbind]} qq{/if}"><a href="home.php?mod=space&uid=$_G[uid]" target="_blank" title="{lang visit_my_space}">{$_G[member][username]}</a></strong>  
  146.                             <!--{if $_G['group']['allowinvisible']}-->  
  147.                                                         <!-- 当前登录状态,如:在线、隐身 -->  
  148.                             <span id="loginstatus">  
  149.                                 <a id="loginstatusid" href="member.php?mod=switchstatus" title="{lang login_switch_invisible_mode}" onclick="ajaxget(this.href, 'loginstatus');return false;" class="xi2"></a>  
  150.                             </span>  
  151.                             <!--{/if}-->  
  152.                             <!--{hook/global_usernav_extra1}-->  
  153.                                                         <!-- 设置 -->  
  154.                             <span class="pipe">|</span><!--{hook/global_usernav_extra4}--><a href="home.php?mod=spacecp">{lang setup}</a>  
  155.                             <!-- 消息 -->  
  156.                                                         <span class="pipe">|</span><a href="home.php?mod=space&do=pm" id="pm_ntc"{if $_G[member][newpm]} class="new"{/if}>{lang pm_center}</a>  
  157.                             <!-- 提醒 -->  
  158.                                                         <span class="pipe">|</span><a href="home.php?mod=space&do=notice" id="myprompt"{if $_G[member][newprompt]} class="new"{/if}>{lang remind}<!--{if $_G[member][newprompt]}-->($_G[member][newprompt])<!--{/if}--></a><span id="myprompt_check"></span>  
  159.                             <!--{if $_G['setting']['taskon'] && !empty($_G['cookie']['taskdoing_'.$_G['uid']])}--><span class="pipe">|</span><a href="home.php?mod=task&item=doing" id="task_ntc" class="new">{lang task_doing}</a><!--{/if}-->  
  160.                             <!--{if ($_G['group']['allowmanagearticle'] || $_G['group']['allowpostarticle'] || $_G['group']['allowdiy'] || getstatus($_G['member']['allowadmincp'], 4) || getstatus($_G['member']['allowadmincp'], 6) || getstatus($_G['member']['allowadmincp'], 2) || getstatus($_G['member']['allowadmincp'], 3))}-->  
  161.                             <!-- 门户管理 -->   
  162.                                                             <span class="pipe">|</span><a href="portal.php?mod=portalcp"><!--{if $_G['setting']['portalstatus'] }-->{lang portal_manage}<!--{else}-->{lang portal_block_manage}<!--{/if}--></a>  
  163.                             <!--{/if}-->  
  164.                             <!--{if $_G['uid'] && $_G['group']['radminid'] > 1}-->  
  165.                                 <span class="pipe">|</span><a href="forum.php?mod=modcp&fid=$_G[fid]" target="_blank">{lang forum_manager}</a>  
  166.                             <!--{/if}-->  
  167.                             <!--{if $_G['uid'] && $_G['adminid'] == 1 && $_G['setting']['cloud_status']}-->  
  168.                                 <span class="pipe">|</span><a href="admin.php?frames=yes&action=cloud&operation=applist" target="_blank">{lang cloudcp}</a>  
  169.                             <!--{/if}-->  
  170.                                                         <!-- 管理中心 -->  
  171.                             <!--{if $_G['uid'] && getstatus($_G['member']['allowadmincp'], 1)}-->  
  172.                                 <span class="pipe">|</span><a href="admin.php" target="_blank">{lang admincp}</a>  
  173.                             <!--{/if}-->  
  174.                             <!--{hook/global_usernav_extra2}-->  
  175.                                                         <!-- 退出 -->  
  176.                             <span class="pipe">|</span><a href="member.php?mod=logging&action=logout&formhash={FORMHASH}">{lang logout}</a>  
  177.                         </p>  
  178.                         <p>  
  179.                             <!--{hook/global_usernav_extra3}-->  
  180.                             <!--{eval $upgradecredit = $_G['uid'] && $_G['group']['grouptype'] == 'member' && $_G['group']['groupcreditslower'] != 999999999 ? $_G['group']['groupcreditslower'] - $_G['member']['credits'] : false;}-->  
  181.                             <!-- 积分:43 -->  
  182.                                                         <a href="home.php?mod=spacecp&ac=credit&showcredit=1" id="extcreditmenu"{if !$_G[setting][bbclosed]} onmouseover="delayShow(this, showCreditmenu);" class="showmenu"{/if}>{lang credits}: $_G[member][credits]</a>  
  183.                             <!-- 用户组:管理员 -->  
  184.                                                         <span class="pipe">|</span>{lang usergroup}: <a href="home.php?mod=spacecp&ac=usergroup"{if $upgradecredit !== 'false'} id="g_upmine" class="xi2" onmouseover="delayShow(this, showUpgradeinfo)"{/if}>$_G[group][grouptitle]</a>  
  185.                         </p>  
  186.                     </div>  
  187.                     <!--{elseif !empty($_G['cookie']['loginuser'])}-->  
  188.                     <p>  
  189.                         <strong><a id="loginuser" class="noborder"><!--{echo dhtmlspecialchars($_G['cookie']['loginuser'])}--></a></strong>  
  190.                         <span class="pipe">|</span><a href="member.php?mod=logging&action=login" onclick="showWindow('login', this.href)">{lang activation}</a>  
  191.                         <span class="pipe">|</span><a href="member.php?mod=logging&action=logout&formhash={FORMHASH}">{lang logout}</a>  
  192.                     </p>  
  193.                     <!--{elseif !$_G[connectguest]}-->  
  194.                         <!--{template member/login_simple}-->  
  195.                     <!--{else}-->  
  196.                     <div id="um">  
  197.                         <div class="avt y"><!--{avatar(0,small)}--></div>  
  198.                         <p>  
  199.                             <strong class="vwmy qq">{$_G[member][username]}</strong>  
  200.                             <!--{hook/global_usernav_extra1}-->  
  201.                             <span class="pipe">|</span><a href="member.php?mod=logging&action=logout&formhash={FORMHASH}">{lang logout}</a>  
  202.                         </p>  
  203.                         <p>  
  204.                             <a href="home.php?mod=spacecp&ac=credit&showcredit=1">{lang credits}: 0</a>  
  205.                             <span class="pipe">|</span>{lang usergroup}: $_G[group][grouptitle]  
  206.                         </p>  
  207.                     </div>  
  208.                     <!--{/if}-->  
  209.                 </div>  
  210.   
  211.                 <div id="nv">  
  212.                                         <!-- 快捷导航 -->  
  213.                     <a href="javascript:;" id="qmenu" onmouseover="showMenu({'ctrlid':'qmenu','pos':'34!','ctrlclass':'a','duration':2});">{lang my_nav}</a>  
  214.                     <!-- 导航,如:门户、论坛、掏帖、家园、群组、广播、导读 -->  
  215.                                         <ul>  
  216.                         <!--{loop $_G['setting']['navs'] $nav}-->  
  217.                             <!--{if $nav['available'] && (!$nav['level'] || ($nav['level'] == 1 && $_G['uid']) || ($nav['level'] == 2 && $_G['adminid'] > 0) || ($nav['level'] == 3 && $_G['adminid'] == 1))}--><li {if $mnid == $nav[navid]}class="a" {/if}$nav[nav]></li><!--{/if}-->  
  218.                         <!--{/loop}-->  
  219.                     </ul>  
  220.                     <!--{hook/global_nav_extra}-->  
  221.                 </div>  
  222.                 <!--{if !empty($_G['setting']['plugins']['jsmenu'])}-->  
  223.                     <ul class="p_pop h_pop" id="plugin_menu" style="display: none">  
  224.                     <!--{loop $_G['setting']['plugins']['jsmenu'] $module}-->  
  225.                          <!--{if !$module['adminid'] || ($module['adminid'] && $_G['adminid'] > 0 && $module['adminid'] >= $_G['adminid'])}-->  
  226.                          <li>$module[url]</li>  
  227.                          <!--{/if}-->  
  228.                     <!--{/loop}-->  
  229.                     </ul>  
  230.                 <!--{/if}-->  
  231.                 $_G[setting][menunavs]  
  232.                 <div id="mu" class="cl">  
  233.                 <!--{if $_G['setting']['subnavs']}-->  
  234.                     <!--{loop $_G[setting][subnavs] $navid $subnav}-->  
  235.                         <!--{if $_G['setting']['navsubhover'] || $mnid == $navid}-->  
  236.                         <ul class="cl {if $mnid == $navid}current{/if}" id="snav_$navid" style="display:{if $mnid != $navid}none{/if}">  
  237.                         $subnav  
  238.                         </ul>  
  239.                         <!--{/if}-->  
  240.                     <!--{/loop}-->  
  241.                 <!--{/if}-->  
  242.                 </div>  
  243.                                 <!-- 内置广告位 -->  
  244.                 <!--{ad/subnavbanner/a_mu}-->  
  245.                                 <!-- 导航下的搜索框 -->  
  246.                 <!--{subtemplate common/pubsearchform}-->  
  247.             </div>  
  248.         </div>  
  249.   
  250.         <!--{hook/global_header}-->  
  251.     <!--{/if}-->  
  252.   
  253.     <div id="wp" class="wp">  
[php] view plain copy
 
 print?
  1. <!--{subtemplate common/header_common}-->  
  2.         <!-- 站点标题 -->  
  3.     <meta name="application-name" content="$_G['setting']['bbname']" />  
  4.         <!-- 站点标题 -->  
  5.     <meta name="msapplication-tooltip" content="$_G['setting']['bbname']" />  
  6.         <!-- 门户 -->  
  7.     <!--{if $_G['setting']['portalstatus']}--><meta name="msapplication-task" content="name=$_G['setting']['navs'][1]['navname'];action-uri={echo !empty($_G['setting']['domain']['app']['portal']) ? 'http://'.$_G['setting']['domain']['app']['portal'] : $_G[siteurl].'portal.php'};icon-uri={$_G[siteurl]}{IMGDIR}/portal.ico" /><!--{/if}-->  
  8.     <!-- 论坛 -->  
  9.         <meta name="msapplication-task" content="name=$_G['setting']['navs'][2]['navname'];action-uri={echo !empty($_G['setting']['domain']['app']['forum']) ? 'http://'.$_G['setting']['domain']['app']['forum'] : $_G[siteurl].'forum.php'};icon-uri={$_G[siteurl]}{IMGDIR}/bbs.ico" />  
  10.     <!-- 群组 -->  
  11.         <!--{if $_G['setting']['groupstatus']}--><meta name="msapplication-task" content="name=$_G['setting']['navs'][3]['navname'];action-uri={echo !empty($_G['setting']['domain']['app']['group']) ? 'http://'.$_G['setting']['domain']['app']['group'] : $_G[siteurl].'group.php'};icon-uri={$_G[siteurl]}{IMGDIR}/group.ico" /><!--{/if}-->  
  12.     <!-- 家园 -->  
  13.         <!--{if helper_access::check_module('feed')}--><meta name="msapplication-task" content="name=$_G['setting']['navs'][4]['navname'];action-uri={echo !empty($_G['setting']['domain']['app']['home']) ? 'http://'.$_G['setting']['domain']['app']['home'] : $_G[siteurl].'home.php'};icon-uri={$_G[siteurl]}{IMGDIR}/home.ico" /><!--{/if}-->  
  14.     <!--{if $_G['basescript'] == 'forum' && $_G['setting']['archiver']}-->  
  15.                 <!-- 站点地图 --><!--站点地图-->  
  16.         <link rel="archives" title="$_G['setting']['bbname']" href="{$_G[siteurl]}archiver/" />  
  17.     <!--{/if}-->  
  18.     <!--{if !empty($rsshead)}-->$rsshead<!--{/if}-->  
  19.     <!--{if widthauto()}-->  
  20.         <link rel="stylesheet" id="css_widthauto" type="text/css" href="data/cache/style_{STYLEID}_widthauto.css?{VERHASH}" />  
  21.         <script type="text/javascript">HTMLNODE.className += ' widthauto'</script>  
  22.     <!--{/if}-->  
  23.         <!-- 选择加载js文件 -->  
  24.     <!--{if $_G['basescript'] == 'forum' || $_G['basescript'] == 'group'}-->  
  25.         <script type="text/javascript" src="{$_G[setting][jspath]}forum.js?{VERHASH}"></script>  
  26.     <!--{elseif $_G['basescript'] == 'home' || $_G['basescript'] == 'userapp'}-->  
  27.         <script type="text/javascript" src="{$_G[setting][jspath]}home.js?{VERHASH}"></script>  
  28.     <!--{elseif $_G['basescript'] == 'portal'}-->  
  29.         <script type="text/javascript" src="{$_G[setting][jspath]}portal.js?{VERHASH}"></script>  
  30.     <!--{/if}-->  
  31.         <!-- 当diy时,会加载此js文件 -->  
  32.     <!--{if $_G['basescript'] != 'portal' && $_GET['diy'] == 'yes' && check_diy_perm($topic)}-->  
  33.         <script type="text/javascript" src="{$_G[setting][jspath]}portal.js?{VERHASH}"></script>  
  34.     <!--{/if}-->  
  35.         <!-- 当diy时,会加载此公共的css样式文件 -->  
  36.     <!--{if $_GET['diy'] == 'yes' && check_diy_perm($topic)}-->  
  37.     <link rel="stylesheet" type="text/css" id="diy_common" href="data/cache/style_{STYLEID}_css_diy.css?{VERHASH}" />  
  38.     <!--{/if}-->  
  39. </head>  
  40.   
  41. <!-- id="nv_forum" class="pg_index" -->  
  42. <body id="nv_{$_G[basescript]}" class="pg_{CURMODULE}{if $_G['basescript'] === 'portal' && CURMODULE === 'list' && !empty($cat)} {$cat['bodycss']}{/if}" onkeydown="if(event.keyCode==27) return false;">  
  43.     <div id="append_parent"></div><div id="ajaxwaitid"></div>  
  44.     <!--{if $_GET['diy'] == 'yes' && check_diy_perm($topic)}-->  
  45.         <!--{template common/header_diy}--><!-- diy面板模板 -->  
  46.     <!--{/if}-->  
  47.     <!--{if check_diy_perm($topic)}-->  
  48.         <!--{block diynav}-->  
  49.             <a id="diy-tg" href="javascript:openDiy();" title="{lang open_diy}" class="xi1 xw1" onmouseover="showMenu(this.id)"><img src="{STATICURL}image/diy/panel-toggle.png" alt="DIY" /></a>  
  50.             <div id="diy-tg_menu" style="display: none;">  
  51.                 <ul>  
  52.                     <li><a href="javascript:saveUserdata('diy_advance_mode', '');openDiy();" class="xi2">{lang header_diy_mode_simple}</a></li>  
  53.                     <li><a href="javascript:saveUserdata('diy_advance_mode', '1');openDiy();" class="xi2">{lang header_diy_mode_adv}</a></li>  
  54.                 </ul>  
  55.             </div>  
  56.         <!--{/block}-->  
  57.     <!--{/if}-->  
  58.     <!--{if CURMODULE == 'topic' && $topic && empty($topic['useheader']) && check_diy_perm($topic)}-->  
  59.         $diynav  
  60.     <!--{/if}-->  
  61.     <!--{if empty($topic) || $topic['useheader']}-->  
  62.         <!--{if $_G['setting']['mobile']['allowmobile'] && (!$_G['setting']['cacheindexlife'] && !$_G['setting']['cachethreadon'] || $_G['uid']) && ($_GET['diy'] != 'yes' || !$_GET['inajax']) && ($_G['mobile'] != '' && $_G['cookie']['mobile'] == '' && $_GET['mobile'] != 'no')}-->  
  63.             <div class="xi1 bm bm_c">  
  64.                 {lang your_mobile_browser}<a href="{$_G['siteurl']}forum.php?mobile=yes">{lang go_to_mobile}</a> <span class="xg1">|</span> <a href="$_G['setting']['mobile']['nomobileurl']">{lang to_be_continue}</a>  
  65.             </div>  
  66.         <!--{/if}-->  
  67.   
  68.         <div id="toptb" class="cl">  
  69.             <!--{hook/global_cpnav_top}-->  
  70.             <div class="wp">  
  71.                 <div class="z">  
  72.                                         <!-- 顶部导航-居左 -->  
  73.                     <!--{loop $_G['setting']['topnavs'][0] $nav}-->  
  74.                         <!--{if $nav['available'] && (!$nav['level'] || ($nav['level'] == 1 && $_G['uid']) || ($nav['level'] == 2 && $_G['adminid'] > 0) || ($nav['level'] == 3 && $_G['adminid'] == 1))}-->$nav[code]<!--{/if}-->  
  75.                     <!--{/loop}-->  
  76.                                         <!-- 没起作用 -->  
  77.                     <!--{hook/global_cpnav_extra1}-->  
  78.                 </div>  
  79.                 <div class="y">  
  80.                     <a id="switchblind" href="javascript:;" onclick="toggleBlind(this)" title="{lang switch_blind}" class="switchblind">{lang switch_blind}</a>  
  81.                     <!--{hook/global_cpnav_extra2}-->  
  82.                                         <!-- 顶部导航-居右 -->  
  83.                     <!--{loop $_G['setting']['topnavs'][1] $nav}-->  
  84.                         <!--{if $nav['available'] && (!$nav['level'] || ($nav['level'] == 1 && $_G['uid']) || ($nav['level'] == 2 && $_G['adminid'] > 0) || ($nav['level'] == 3 && $_G['adminid'] == 1))}-->$nav[code]<!--{/if}-->  
  85.                     <!--{/loop}-->  
  86.                                         <!-- 切换到宽版 -->  
  87.                     <!--{if empty($_G['disabledwidthauto']) && $_G['setting']['switchwidthauto']}-->  
  88.                         <a href="javascript:;" onclick="widthauto(this)"><!--{if widthauto()}-->{lang switch_narrow}<!--{else}-->{lang switch_wide}<!--{/if}--></a>  
  89.                     <!--{/if}-->  
  90.                                         <!-- 切换风格 -->  
  91.                     <!--{if $_G['uid'] && !empty($_G['style']['extstyle'])}--><a id="sslct" href="javascript:;" onmouseover="delayShow(this, function() {showMenu({'ctrlid':'sslct','pos':'34!'})});">{lang changestyle}</a><!--{/if}-->  
  92.                     <!-- 打开diy面板 -->  
  93.                                         <!--{if check_diy_perm($topic)}-->  
  94.                         $diynav  
  95.                     <!--{/if}-->  
  96.                 </div>  
  97.             </div>  
  98.         </div>  
  99.   
  100.         <!--{if !IS_ROBOT}-->  
  101.             <!--{if $_G['uid'] && !empty($_G['style']['extstyle'])}-->  
  102.                 <div id="sslct_menu" class="cl p_pop" style="display: none;">  
  103.                     <!--{if !$_G[style][defaultextstyle]}--><span class="sslct_btn" onclick="extstyle('')" title="{lang default}"><i></i></span><!--{/if}-->  
  104.                     <!--{loop $_G['style']['extstyle'$extstyle}-->  
  105.                         <span class="sslct_btn" onclick="extstyle('$extstyle[0]')" title="$extstyle[1]"><i style='background:$extstyle[2]'></i></span>  
  106.                     <!--{/loop}-->  
  107.                 </div>  
  108.             <!--{/if}-->  
  109.   
  110.                 <div id="qmenu_menu" class="p_pop {if !$_G['uid']}blk{/if}" style="display: none;">  
  111.                     <!--{if $_G['uid']}-->  
  112.                     <ul>  
  113.                         <!--{loop $_G['setting']['mynavs'$nav}-->  
  114.                             <!--{if $nav['available'] && (!$nav['level'] || ($nav['level'] == 1 && $_G['uid']) || ($nav['level'] == 2 && $_G['adminid'] > 0) || ($nav['level'] == 3 && $_G['adminid'] == 1))}-->  
  115.                                 <li>$nav[code]</li>  
  116.                             <!--{/if}-->  
  117.                         <!--{/loop}-->  
  118.                     </ul>  
  119.                     <!--{elseif $_G[connectguest]}-->  
  120.                         <div class="ptm pbw hm">  
  121.                             {lang connect_fill_profile_to_visit}  
  122.                         </div>  
  123.                     <!--{else}-->  
  124.                         <div class="ptm pbw hm">  
  125.                             {lang my_nav_login}  
  126.                         </div>  
  127.                     <!--{/if}-->  
  128.                 </div>  
  129.         <!--{/if}-->  
  130.                 <!-- 内置广告位 -->  
  131.         <!--{ad/headerbanner/wp a_h}-->  
  132.         <div id="hd">  
  133.             <div class="wp">  
  134.                 <div class="hdc cl">  
  135.                     <!--{eval $mnid = getcurrentnav();}-->  
  136.                                         <!-- 社区动力logo图:"static/image/common/logo.png" -->  
  137.                     <h2><!--{if !isset($_G['setting']['navlogos'][$mnid])}--><a href="{if $_G['setting']['domain']['app']['default']}http://{$_G['setting']['domain']['app']['default']}/{else}./{/if}" title="$_G['setting']['bbname']">{$_G['style']['boardlogo']}</a><!--{else}-->$_G['setting']['navlogos'][$mnid]<!--{/if}--></h2>  
  138.   
  139.                     <!--{if $_G['uid']}-->  
  140.                     <div id="um">  
  141.                                                 <!-- 头像 -->  
  142.                         <div class="avt y"><a href="home.php?mod=space&uid=$_G[uid]"><!--{avatar($_G[uid],small)}--></a></div>  
  143.                         <p>  
  144.                                                         <!-- 当前登录用户名,如:admin -->  
  145.                             <strong class="vwmy{if $_G['setting']['connect']['allow'] && $_G[member][conisbind]} qq{/if}"><a href="home.php?mod=space&uid=$_G[uid]" target="_blank" title="{lang visit_my_space}">{$_G[member][username]}</a></strong>  
  146.                             <!--{if $_G['group']['allowinvisible']}-->  
  147.                                                         <!-- 当前登录状态,如:在线、隐身 -->  
  148.                             <span id="loginstatus">  
  149.                                 <a id="loginstatusid" href="member.php?mod=switchstatus" title="{lang login_switch_invisible_mode}" onclick="ajaxget(this.href, 'loginstatus');return false;" class="xi2"></a>  
  150.                             </span>  
  151.                             <!--{/if}-->  
  152.                             <!--{hook/global_usernav_extra1}-->  
  153.                                                         <!-- 设置 -->  
  154.                             <span class="pipe">|</span><!--{hook/global_usernav_extra4}--><a href="home.php?mod=spacecp">{lang setup}</a>  
  155.                             <!-- 消息 -->  
  156.                                                         <span class="pipe">|</span><a href="home.php?mod=space&do=pm" id="pm_ntc"{if $_G[member][newpm]} class="new"{/if}>{lang pm_center}</a>  
  157.                             <!-- 提醒 -->  
  158.                                                         <span class="pipe">|</span><a href="home.php?mod=space&do=notice" id="myprompt"{if $_G[member][newprompt]} class="new"{/if}>{lang remind}<!--{if $_G[member][newprompt]}-->($_G[member][newprompt])<!--{/if}--></a><span id="myprompt_check"></span>  
  159.                             <!--{if $_G['setting']['taskon'] && !empty($_G['cookie']['taskdoing_'.$_G['uid']])}--><span class="pipe">|</span><a href="home.php?mod=task&item=doing" id="task_ntc" class="new">{lang task_doing}</a><!--{/if}-->  
  160.                             <!--{if ($_G['group']['allowmanagearticle'] || $_G['group']['allowpostarticle'] || $_G['group']['allowdiy'] || getstatus($_G['member']['allowadmincp'], 4) || getstatus($_G['member']['allowadmincp'], 6) || getstatus($_G['member']['allowadmincp'], 2) || getstatus($_G['member']['allowadmincp'], 3))}-->  
  161.                             <!-- 门户管理 -->   
  162.                                                             <span class="pipe">|</span><a href="portal.php?mod=portalcp"><!--{if $_G['setting']['portalstatus'] }-->{lang portal_manage}<!--{else}-->{lang portal_block_manage}<!--{/if}--></a>  
  163.                             <!--{/if}-->  
  164.                             <!--{if $_G['uid'] && $_G['group']['radminid'] > 1}-->  
  165.                                 <span class="pipe">|</span><a href="forum.php?mod=modcp&fid=$_G[fid]" target="_blank">{lang forum_manager}</a>  
  166.                             <!--{/if}-->  
  167.                             <!--{if $_G['uid'] && $_G['adminid'] == 1 && $_G['setting']['cloud_status']}-->  
  168.                                 <span class="pipe">|</span><a href="admin.php?frames=yes&action=cloud&operation=applist" target="_blank">{lang cloudcp}</a>  
  169.                             <!--{/if}-->  
  170.                                                         <!-- 管理中心 -->  
  171.                             <!--{if $_G['uid'] && getstatus($_G['member']['allowadmincp'], 1)}-->  
  172.                                 <span class="pipe">|</span><a href="admin.php" target="_blank">{lang admincp}</a>  
  173.                             <!--{/if}-->  
  174.                             <!--{hook/global_usernav_extra2}-->  
  175.                                                         <!-- 退出 -->  
  176.                             <span class="pipe">|</span><a href="member.php?mod=logging&action=logout&formhash={FORMHASH}">{lang logout}</a>  
  177.                         </p>  
  178.                         <p>  
  179.                             <!--{hook/global_usernav_extra3}-->  
  180.                             <!--{eval $upgradecredit = $_G['uid'] && $_G['group']['grouptype'] == 'member' && $_G['group']['groupcreditslower'] != 999999999 ? $_G['group']['groupcreditslower'] - $_G['member']['credits'] : false;}-->  
  181.                             <!-- 积分:43 -->  
  182.                                                         <a href="home.php?mod=spacecp&ac=credit&showcredit=1" id="extcreditmenu"{if !$_G[setting][bbclosed]} onmouseover="delayShow(this, showCreditmenu);" class="showmenu"{/if}>{lang credits}: $_G[member][credits]</a>  
  183.                             <!-- 用户组:管理员 -->  
  184.                                                         <span class="pipe">|</span>{lang usergroup}: <a href="home.php?mod=spacecp&ac=usergroup"{if $upgradecredit !== 'false'} id="g_upmine" class="xi2" onmouseover="delayShow(this, showUpgradeinfo)"{/if}>$_G[group][grouptitle]</a>  
  185.                         </p>  
  186.                     </div>  
  187.                     <!--{elseif !empty($_G['cookie']['loginuser'])}-->  
  188.                     <p>  
  189.                         <strong><a id="loginuser" class="noborder"><!--{echo dhtmlspecialchars($_G['cookie']['loginuser'])}--></a></strong>  
  190.                         <span class="pipe">|</span><a href="member.php?mod=logging&action=login" onclick="showWindow('login', this.href)">{lang activation}</a>  
  191.                         <span class="pipe">|</span><a href="member.php?mod=logging&action=logout&formhash={FORMHASH}">{lang logout}</a>  
  192.                     </p>  
  193.                     <!--{elseif !$_G[connectguest]}-->  
  194.                         <!--{template member/login_simple}-->  
  195.                     <!--{else}-->  
  196.                     <div id="um">  
  197.                         <div class="avt y"><!--{avatar(0,small)}--></div>  
  198.                         <p>  
  199.                             <strong class="vwmy qq">{$_G[member][username]}</strong>  
  200.                             <!--{hook/global_usernav_extra1}-->  
  201.                             <span class="pipe">|</span><a href="member.php?mod=logging&action=logout&formhash={FORMHASH}">{lang logout}</a>  
  202.                         </p>  
  203.                         <p>  
  204.                             <a href="home.php?mod=spacecp&ac=credit&showcredit=1">{lang credits}: 0</a>  
  205.                             <span class="pipe">|</span>{lang usergroup}: $_G[group][grouptitle]  
  206.                         </p>  
  207.                     </div>  
  208.                     <!--{/if}-->  
  209.                 </div>  
  210.   
  211.                 <div id="nv">  
  212.                                         <!-- 快捷导航 -->  
  213.                     <a href="javascript:;" id="qmenu" onmouseover="showMenu({'ctrlid':'qmenu','pos':'34!','ctrlclass':'a','duration':2});">{lang my_nav}</a>  
  214.                     <!-- 导航,如:门户、论坛、掏帖、家园、群组、广播、导读 -->  
  215.                                         <ul>  
  216.                         <!--{loop $_G['setting']['navs'$nav}-->  
  217.                             <!--{if $nav['available'] && (!$nav['level'] || ($nav['level'] == 1 && $_G['uid']) || ($nav['level'] == 2 && $_G['adminid'] > 0) || ($nav['level'] == 3 && $_G['adminid'] == 1))}--><li {if $mnid == $nav[navid]}class="a" {/if}$nav[nav]></li><!--{/if}-->  
  218.                         <!--{/loop}-->  
  219.                     </ul>  
  220.                     <!--{hook/global_nav_extra}-->  
  221.                 </div>  
  222.                 <!--{if !empty($_G['setting']['plugins']['jsmenu'])}-->  
  223.                     <ul class="p_pop h_pop" id="plugin_menu" style="display: none">  
  224.                     <!--{loop $_G['setting']['plugins']['jsmenu'$module}-->  
  225.                          <!--{if !$module['adminid'] || ($module['adminid'] && $_G['adminid'] > 0 && $module['adminid'] >= $_G['adminid'])}-->  
  226.                          <li>$module[url]</li>  
  227.                          <!--{/if}-->  
  228.                     <!--{/loop}-->  
  229.                     </ul>  
  230.                 <!--{/if}-->  
  231.                 $_G[setting][menunavs]  
  232.                 <div id="mu" class="cl">  
  233.                 <!--{if $_G['setting']['subnavs']}-->  
  234.                     <!--{loop $_G[setting][subnavs] $navid $subnav}-->  
  235.                         <!--{if $_G['setting']['navsubhover'] || $mnid == $navid}-->  
  236.                         <ul class="cl {if $mnid == $navid}current{/if}" id="snav_$navid" style="display:{if $mnid != $navid}none{/if}">  
  237.                         $subnav  
  238.                         </ul>  
  239.                         <!--{/if}-->  
  240.                     <!--{/loop}-->  
  241.                 <!--{/if}-->  
  242.                 </div>  
  243.                                 <!-- 内置广告位 -->  
  244.                 <!--{ad/subnavbanner/a_mu}-->  
  245.                                 <!-- 导航下的搜索框 -->  
  246.                 <!--{subtemplate common/pubsearchform}-->  
  247.             </div>  
  248.         </div>  
  249.   
  250.         <!--{hook/global_header}-->  
  251.     <!--{/if}-->  
  252.   
  253.     <div id="wp" class="wp">  

posted on 2017-06-28 23:35  alleyonine  阅读(274)  评论(0编辑  收藏  举报

导航