当前位置: 首页>>代码示例>>PHP>>正文


PHP check_diy_perm函数代码示例

本文整理汇总了PHP中check_diy_perm函数的典型用法代码示例。如果您正苦于以下问题:PHP check_diy_perm函数的具体用法?PHP check_diy_perm怎么用?PHP check_diy_perm使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了check_diy_perm函数的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: if

<a href="javascript:;" id="shortcuttip">添加 <?php echo $_G['setting']['bbname'];?> 到桌面</a>

</div>
<script type="text/javascript">setTimeout(setShortcut, 2000);</script>
<?php } ?>
<div id="toptb" class="cl">
<?php if(!empty($_G['setting']['pluginhooks']['global_cpnav_top'])) echo $_G['setting']['pluginhooks']['global_cpnav_top'];?>
<div class="wp" style=" width:1000px; margin: 0 auto;">
<div class="z"><?php if(is_array($_G['setting']['topnavs']['0'])) foreach($_G['setting']['topnavs']['0'] as $nav) { if($nav['available'] && (!$nav['level'] || ($nav['level'] == 1 && $_G['uid']) || ($nav['level'] == 2 && $_G['adminid'] > 0) || ($nav['level'] == 3 && $_G['adminid'] == 1))) { ?><?php echo $nav['code'];?><?php } } ?>
<?php if(!empty($_G['setting']['pluginhooks']['global_cpnav_extra1'])) echo $_G['setting']['pluginhooks']['global_cpnav_extra1'];?>
</div>
<div class="y">

<?php if(!empty($_G['setting']['pluginhooks']['global_cpnav_extra2'])) echo $_G['setting']['pluginhooks']['global_cpnav_extra2'];?><?php if(is_array($_G['setting']['topnavs']['1'])) foreach($_G['setting']['topnavs']['1'] as $nav) { if($nav['available'] && (!$nav['level'] || ($nav['level'] == 1 && $_G['uid']) || ($nav['level'] == 2 && $_G['adminid'] > 0) || ($nav['level'] == 3 && $_G['adminid'] == 1))) { ?><?php echo $nav['code'];?><?php } } if(empty($_G['disabledwidthauto']) && $_G['setting']['switchwidthauto']) { ?>
<a href="javascript:;" id="switchwidth" onClick="widthauto(this)" title="<?php if(widthauto()) { ?>切换到窄版<?php } else { ?>切换到宽版<?php } ?>" class="switchwidth"><?php if(widthauto()) { ?>切换到窄版<?php } else { ?>切换到宽版<?php } ?></a>
<?php } if($_G['uid'] && !empty($_G['style']['extstyle'])) { ?><a id="sslct" href="javascript:;" onMouseOver="delayShow(this, function() {showMenu({'ctrlid':'sslct','pos':'34!'})});">切换风格</a><?php } if(check_diy_perm($topic)) { ?>
<?php echo $diynav;?>
<?php } ?>
</div>
</div>
</div>

<?php if(!IS_ROBOT) { if($_G['uid']) { ?>
<ul id="myprompt_menu" class="p_pop" style="display: none;">				
<li><a href="home.php?mod=space&amp;do=pm" id="pm_ntc" style="background-repeat: no-repeat; background-position: 0 50%;"><em class="prompt_news<?php if(empty($_G['member']['newpm'])) { ?>_0<?php } ?>"></em>消息</a></li>
<li><a href="home.php?mod=follow&amp;do=follower"><em class="prompt_follower<?php if(empty($_G['member']['newprompt_num']['follower'])) { ?>_0<?php } ?>"></em>新听众<?php if($_G['member']['newprompt_num']['follower']) { ?>(<?php echo $_G['member']['newprompt_num']['follower'];?>)<?php } ?></a></li>
<?php if($_G['member']['newprompt'] && $_G['member']['newprompt_num']['follow']) { ?>
<li><a href="home.php?mod=follow"><em class="prompt_concern"></em>我关注的(<?php echo $_G['member']['newprompt_num']['follow'];?>)</a></li>
<?php } if($_G['member']['newprompt']) { if(is_array($_G['member']['category_num'])) foreach($_G['member']['category_num'] as $key => $val) { ?><li><a href="home.php?mod=space&amp;do=notice&amp;view=<?php echo $key;?>"><em class="notice_<?php echo $key;?>"></em><?php echo lang('template', 'notice_'.$key); ?>(<span class="rq"><?php echo $val;?></span>)</a></li>
<?php } } if(empty($_G['cookie']['ignore_notice'])) { ?>
<li class="ignore_noticeli"><a href="javascript:;" onClick="setcookie('ignore_notice', 1);hideMenu('myprompt_menu')" title="暂不提醒"><em class="ignore_notice"></em></a></li>
开发者ID:netlabprj,项目名称:netlab,代码行数:31,代码来源:3_3_common_header_member_logging.tpl.php

示例2: if

<?php if(!empty($_G['setting']['pluginhooks']['global_qmenu_top'])) echo $_G['setting']['pluginhooks']['global_qmenu_top'];?>
<?php if($_G['uid']) { ?>
<ul class="cl nav">
<li><a id="friendnav" href="home.php?mod=space&amp;do=friend">好友</a></li>
<li><a id="favoritenav" href="home.php?mod=space&amp;do=favorite&amp;view=me">收藏</a></li>
<li><a id="medalnav" href="home.php?mod=medal">勋章</a></li>
<li><a id="tasknav" href="home.php?mod=task">任务<?php if($_G['setting']['taskon'] && !empty($_G['cookie']['taskdoing_'.$_G['uid']])) { ?><i>N</i><?php } ?></a></li>
<li><a id="threadnav" href="home.php?mod=space&amp;do=thread&amp;view=me">帖子</a></li>
<li><a id="exchangenav" href="#">礼品兑换</a></li>
<li><a id="ranklistnav" href="misc.php?mod=ranklist">排行榜</a></li>
<li><a id="productsnav" href="#">产品注册</a></li>
<li><a id="pm_ntcnav" href="home.php?mod=space&amp;do=pm">消息<?php if($_G['member']['newpm']) { ?><i>N</i><?php } ?></a></li>
<li><a id="mypromptnav" href="home.php?mod=space&amp;do=notice">提醒<?php if($_G['member']['newprompt']) { ?><i><?php echo $_G['member']['newprompt'];?></i><?php } ?></a></li>
<li><a id="setupnav" href="home.php?mod=spacecp">设置</a></li>
<li><a id="logoutnav" href="member.php?mod=logging&amp;action=logout">退出</a></li>
<?php if(check_diy_perm($topic)) { ?><li><a id="diynav" href="javascript:saveUserdata('diy_advance_mode', '');openDiy();" alt="DIY">DIY</a></li><?php } 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))) { ?><li><a id="portalcpnav" href="portal.php?mod=portalcp"><?php if($_G['setting']['portalstatus'] ) { ?>门户管理<?php } else { ?>模块管理<?php } ?></a></li><?php } if($_G['uid'] && $_G['group']['radminid'] > 1) { ?><li><a id="modcpnav" href="forum.php?mod=modcp&amp;fid=<?php echo $_G['fid'];?>" target="_blank"><?php echo $_G['setting']['navs']['2']['navname'];?>管理</a></li><?php } if($_G['uid'] && getstatus($_G['member']['allowadmincp'], 1)) { ?><li><a id="admincpnav" href="admin.php" target="_blank">管理中心</a></li><?php } ?>
</ul>
<?php } elseif($_G['connectguest']) { ?>
<div class="ptm pbw hm">
请先<br /><a class="xi2" href="member.php?mod=connect"><strong>完善帐号信息</strong></a> 或 <a href="member.php?mod=connect&amp;ac=bind" class="xi2 xw1"><strong>绑定已有帐号</strong></a><br />后使用快捷导航
</div>
<?php } else { ?>
<div class="ptm pbw hm">
请 <a href="javascript:;" class="xi2" onclick="lsSubmit()"><strong>登录</strong></a> 后使用快捷导航<br />没有帐号?<a href="member.php?mod=<?php echo $_G['setting']['regname'];?>" class="xi2 xw1"><?php echo $_G['setting']['reglinkname'];?></a>
</div>
<?php } ?>

<?php if(!empty($_G['setting']['pluginhooks']['global_qmenu_bottom'])) echo $_G['setting']['pluginhooks']['global_qmenu_bottom'];?>
</div>
<?php } ?><?php echo adshow("headerbanner/wp a_h");?><div id="nv">
        <div id="hd">
开发者ID:nicevoice,项目名称:bbs,代码行数:31,代码来源:6_5_common_header_forum_post.tpl.php

示例3: function

        if (widthauto()) {
            ?>
切换到窄版<?php 
        } else {
            ?>
切换到宽版<?php 
        }
        ?>
</a>
<?php 
    }
    if ($_G['uid'] && !empty($_G['style']['extstyle'])) {
        ?>
<a id="sslct" href="javascript:;" onmouseover="delayShow(this, function() {showMenu({'ctrlid':'sslct','pos':'34!'})});">切换风格</a><?php 
    }
    if (check_diy_perm($topic)) {
        echo $diynav;
    }
    ?>
</div>
</div>
</div>

<?php 
    if (!IS_ROBOT) {
        if ($_G['uid']) {
            ?>
<ul id="myprompt_menu" class="p_pop" style="display: none;">				
<li><a href="home.php?mod=space&amp;do=pm" id="pm_ntc" style="background-repeat: no-repeat; background-position: 0 50%;"><em class="prompt_news<?php 
            if (empty($_G['member']['newpm'])) {
                ?>
开发者ID:tang86,项目名称:discuz-utf8,代码行数:31,代码来源:1_1_common_header_forum_index.tpl.php

示例4: if

  <?php } ?>

  <?php if($_G['uid'] && $_G['adminid'] == 1 && $_G['setting']['cloud_status']) { ?>

  <li><a href="admin.php?frames=yes&amp;action=cloud&amp;operation=applist" target="_blank" class="u34">云平台</a></li>

  <?php } ?>

  <?php if($_G['uid'] && getstatus($_G['member']['allowadmincp'], 1)) { ?>

  <li><a href="admin.php" target="_blank"  class="u35">管理中心</a></li>

  <?php } ?>

  <?php if(check_diy_perm($topic)) { ?>

  <li><a href="javascript:openDiy();" title="打开 DIY 面板" class="u36">DIY设置</a></li>

  <?php } ?>
</ul>

<?php } if(!IS_ROBOT) { ?>

  <!--切换风格-->

<div id="wist_menu" class="wi_pop" style="display: none;">

  <ul class="wi_skin cl">

    <?php if(!$_G['style']['defaultextstyle']) { ?><li onClick="extstyle('')" title="时尚酷黑"><i></i></li><?php $i=2?><?php } else { $i=1?><?php } ?>
开发者ID:noikiy,项目名称:ejia,代码行数:30,代码来源:2_2_common_header_misc_faq.tpl.php

示例5: if

var loginstatusobj = $('loginstatusid');
if(loginstatusobj != undefined && loginstatusobj != null) loginstatusobj.innerHTML = invisiblestatus;
</script>
<?php } ?>
</div>
<?php } if(!$_G['setting']['bbclosed'] && !$_G['member']['freeze'] && !$_G['member']['groupexpiry']) { if($_G['uid'] && !isset($_G['cookie']['checkpm'])) { ?>
<script src="home.php?mod=spacecp&ac=pm&op=checknewpm&rand=<?php echo $_G['timestamp'];?>" type="text/javascript"></script>
<?php } if($_G['uid'] && helper_access::check_module('follow') && !isset($_G['cookie']['checkfollow'])) { ?>
<script src="home.php?mod=spacecp&ac=follow&op=checkfeed&rand=<?php echo $_G['timestamp'];?>" type="text/javascript"></script>
<?php } if(!isset($_G['cookie']['sendmail'])) { ?>
<script src="home.php?mod=misc&ac=sendmail&rand=<?php echo $_G['timestamp'];?>" type="text/javascript"></script>
<?php } if($_G['uid'] && $_G['member']['allowadmincp'] == 1 && !isset($_G['cookie']['checkpatch'])) { ?>
<script src="misc.php?mod=patch&action=checkpatch&rand=<?php echo $_G['timestamp'];?>" type="text/javascript"></script>
<?php } } if($_GET['diy'] == 'yes') { if(check_diy_perm($topic) && (empty($do) || $do != 'index')) { ?>
<script src="<?php echo $_G['setting']['jspath'];?>common_diy.js?<?php echo VERHASH;?>" type="text/javascript"></script>
<script src="<?php echo $_G['setting']['jspath'];?>portal_diy<?php if(!check_diy_perm($topic, 'layout')) { ?>_data<?php } ?>.js?<?php echo VERHASH;?>" type="text/javascript"></script>
<?php } if($space['self'] && CURMODULE == 'space' && $do == 'index') { ?>
<script src="<?php echo $_G['setting']['jspath'];?>common_diy.js?<?php echo VERHASH;?>" type="text/javascript"></script>
<script src="<?php echo $_G['setting']['jspath'];?>space_diy.js?<?php echo VERHASH;?>" type="text/javascript"></script>
<?php } } if($_G['uid'] && $_G['member']['allowadmincp'] == 1 && $_G['setting']['showpatchnotice'] == 1) { ?>
<script type="text/javascript">patchNotice();</script>
<?php } if($_G['uid'] && $_G['member']['allowadmincp'] == 1 && empty($_G['cookie']['pluginnotice'])) { ?>
<div class="focus plugin" id="plugin_notice"></div>
<script type="text/javascript">pluginNotice();</script>
<?php } if(!$_G['setting']['bbclosed'] && !$_G['member']['freeze'] && !$_G['member']['groupexpiry'] && $_G['setting']['disableipnotice'] != 1 && $_G['uid'] && !empty($_G['cookie']['lip'])) { ?>
<div class="focus plugin" id="ip_notice"></div>
<script type="text/javascript">ipNotice();</script>
<?php } if($_G['member']['newprompt'] && (empty($_G['cookie']['promptstate_'.$_G['uid']]) || $_G['cookie']['promptstate_'.$_G['uid']] != $_G['member']['newprompt']) && $_GET['do'] != 'notice') { ?>
<script type="text/javascript">noticeTitle();</script>
<?php } if(($_G['member']['newpm'] || $_G['member']['newprompt']) && empty($_G['cookie']['ignore_notice'])) { ?>
<script src="<?php echo $_G['setting']['jspath'];?>html5notification.js?<?php echo VERHASH;?>" type="text/javascript"></script>
开发者ID:TedaLIEz,项目名称:Backup,代码行数:31,代码来源:2_2_common_footer.tpl.php

示例6: block_fetch_content

function block_fetch_content($bid, $isjscall = false, $forceupdate = false)
{
    global $_G;
    static $allowmem = null, $cachettl = null;
    if ($allowmem === null) {
        $allowmem = ($cachettl = getglobal('setting/memory/diyblockoutput')) !== null && memory('check');
    }
    $str = '';
    $block = empty($_G['block'][$bid]) ? array() : $_G['block'][$bid];
    if (!$block) {
        return;
    }
    if ($forceupdate) {
        block_updatecache($bid, true);
        $block = $_G['block'][$bid];
    } elseif ($block['cachetime'] > 0 && $_G['timestamp'] - $block['dateline'] > $block['cachetime']) {
        $block['cachetimerange'] = empty($block['cachetimerange']) ? isset($_G['setting']['blockcachetimerange']) ? $_G['setting']['blockcachetimerange'] : '' : $block['cachetimerange'];
        $inrange = empty($block['cachetimerange']) ? true : false;
        if (!$inrange) {
            $block['cachetimerange'] = explode(',', $block['cachetimerange']);
            $hour = date('G', TIMESTAMP);
            if ($block['cachetimerange'][0] <= $block['cachetimerange'][1]) {
                $inrange = $block['cachetimerange'][0] <= $hour && $block['cachetimerange'][1] >= $hour;
            } else {
                $inrange = !($block['cachetimerange'][1] < $hour && $block['cachetimerange'][0] > $hour);
            }
        }
        if ($isjscall || $block['punctualupdate']) {
            block_updatecache($bid, true);
            $block = $_G['block'][$bid];
        } elseif ((empty($_G['blockupdate']) || $block['dateline'] < $_G['blockupdate']['dateline']) && $inrange) {
            $_G['blockupdate'] = array('bid' => $bid, 'dateline' => $block['dateline']);
        }
    }
    $hidediv = $isjscall || $block['blocktype'];
    $_cache_key = 'blockcache_' . ($isjscall ? 'js' : 'htm') . '_' . $bid;
    if ($allowmem && empty($block['hidedisplay']) && empty($block['nocache']) && ($str = memory('get', $_cache_key)) !== false) {
    } else {
        if ($hidediv) {
            if ($block['summary']) {
                $str .= $block['summary'];
            }
            $str .= block_template($bid);
        } else {
            if ($block['title']) {
                $str .= $block['title'];
            }
            $str .= '<div id="portal_block_' . $bid . '_content" class="dxb_bc">';
            if ($block['summary']) {
                $str .= "<div class=\"portal_block_summary\">{$block['summary']}</div>";
            }
            $str .= block_template($bid);
            $str .= '</div>';
        }
        if ($allowmem && empty($block['hidedisplay']) && empty($block['nocache'])) {
            memory('set', $_cache_key, $str, C::t('common_block')->cache_ttl);
        }
    }
    if (!$hidediv) {
        $classname = !empty($block['classname']) ? $block['classname'] . ' ' : '';
        $div = "<div id=\"portal_block_{$bid}\" class=\"{$classname}block move-span\">";
        if (($_GET['diy'] === 'yes' || $_GET['inajax']) && check_diy_perm()) {
            $div .= "<div class='block-name'>{$block['name']} (ID:{$bid})</div>";
        }
        $str = $div . $str . "</div>";
    }
    if ($block['blockclass'] == 'html_html' && $block['script'] == 'search') {
        $str = strtr($str, array('{FORMHASH}' => FORMHASH));
    }
    return !empty($block['hidedisplay']) ? '' : $str;
}
开发者ID:vanloswang,项目名称:discuzx-1,代码行数:71,代码来源:function_block.php

示例7:

}
if ($_GET['diy'] == 'yes') {
    if (check_diy_perm($topic) && (empty($do) || $do != 'index')) {
        ?>
<script src="<?php 
        echo $_G['setting']['jspath'];
        ?>
common_diy.js?<?php 
        echo VERHASH;
        ?>
" type="text/javascript"></script>
<script src="<?php 
        echo $_G['setting']['jspath'];
        ?>
portal_diy<?php 
        if (!check_diy_perm($topic, 'layout')) {
            ?>
_data<?php 
        }
        ?>
.js?<?php 
        echo VERHASH;
        ?>
" type="text/javascript"></script>
<?php 
    }
    if ($space['self'] && CURMODULE == 'space' && $do == 'index') {
        ?>
<script src="<?php 
        echo $_G['setting']['jspath'];
        ?>
开发者ID:dalinhuang,项目名称:healthshop,代码行数:31,代码来源:2_diy_forum_discuz.tpl.php

示例8: if

<span><a href="javascript:;" id="shortcutcloseid" title="关闭">关闭</a></span>
您经常访问 <?php echo $_G['setting']['bbname'];?>,试试添加到桌面,访问更方便!
<a href="javascript:;" id="shortcuttip">添加 <?php echo $_G['setting']['bbname'];?> 到桌面</a>

</div>
<script type="text/javascript">setTimeout(setShortcut, 2000);</script>
<?php } ?>
<div id="toptb" class="cl">
<?php if(!empty($_G['setting']['pluginhooks']['global_cpnav_top'])) echo $_G['setting']['pluginhooks']['global_cpnav_top'];?>
<div class="wp" style="width:1180px!important; margin:0 auto;">
<div class="z"><?php if(is_array($_G['setting']['topnavs']['0'])) foreach($_G['setting']['topnavs']['0'] as $nav) { if($nav['available'] && (!$nav['level'] || ($nav['level'] == 1 && $_G['uid']) || ($nav['level'] == 2 && $_G['adminid'] > 0) || ($nav['level'] == 3 && $_G['adminid'] == 1))) { ?><?php echo $nav['code'];?><?php } } ?>
<?php if(!empty($_G['setting']['pluginhooks']['global_cpnav_extra1'])) echo $_G['setting']['pluginhooks']['global_cpnav_extra1'];?>
</div>
<div class="y">
<div class="deandl">
                    	<?php if(check_diy_perm($topic)) { ?><?php echo $diynav;?><?php } ?>
                    <?php include template('common/header_userstatus'); ?>                        
                    </div>
</div>
                <div class="clear"></div>
</div>
</div>

<?php if(!IS_ROBOT) { if($_G['uid']) { ?>
<ul id="myprompt_menu" class="p_pop" style="display: none;">
<li><a href="home.php?mod=space&amp;do=pm" id="pm_ntc" style="background-repeat: no-repeat; background-position: 0 50%;"><em class="prompt_news<?php if(empty($_G['member']['newpm'])) { ?>_0<?php } ?>"></em>消息</a></li>

<li><a href="home.php?mod=follow&amp;do=follower"><em class="prompt_follower<?php if(empty($_G['member']['newprompt_num']['follower'])) { ?>_0<?php } ?>"></em>新听众<?php if($_G['member']['newprompt_num']['follower']) { ?>(<?php echo $_G['member']['newprompt_num']['follower'];?>)<?php } ?></a></li>

<?php if($_G['member']['newprompt'] && $_G['member']['newprompt_num']['follow']) { ?>
<li><a href="home.php?mod=follow"><em class="prompt_concern"></em>我关注的(<?php echo $_G['member']['newprompt_num']['follow'];?>)</a></li>
开发者ID:nicevoice,项目名称:bbs,代码行数:31,代码来源:2_2_common_header_forum_index.tpl.php


注:本文中的check_diy_perm函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。