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


PHP helper_access类代码示例

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


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

示例1: after_newreply

 public function after_newreply()
 {
     $feedid = 0;
     if (helper_access::check_module('follow') && !$this->param['isanonymous']) {
         require_once libfile('function/discuzcode');
         require_once libfile('function/followcode');
         $feedcontent = C::t('forum_threadpreview')->count_by_tid($this->thread['tid']);
         $firstpost = C::t('forum_post')->fetch_threadpost_by_tid_invisible($this->thread['tid']);
         if (empty($feedcontent)) {
             $feedcontent = array('tid' => $this->thread['tid'], 'content' => followcode($firstpost['message'], $this->thread['tid'], $this->pid, 1000));
             C::t('forum_threadpreview')->insert($feedcontent);
             C::t('forum_thread')->update_status_by_tid($this->thread['tid'], '512');
         } else {
             C::t('forum_threadpreview')->update_relay_by_tid($this->thread['tid'], 1);
         }
         $notemsg = cutstr(followcode($this->param['message'], $this->thread['tid'], $this->pid, 0, false), 140);
         $followfeed = array('uid' => $this->member['uid'], 'username' => $this->member['username'], 'tid' => $this->thread['tid'], 'note' => $notemsg, 'dateline' => TIMESTAMP);
         $feedid = C::t('home_follow_feed')->insert($followfeed, true);
         C::t('common_member_count')->increase($this->member['uid'], array('feeds' => 1));
     }
     if ($feedid) {
         $this->param['showmsgparam'] = array_merge((array) $this->param['showmsgparam'], array('feedid' => $feedid));
     }
 }
开发者ID:samyex6,项目名称:discuz3.2-lite,代码行数:24,代码来源:extend_thread_follow.php

示例2: add_comment

function add_comment($message, $id, $idtype, $cid = 0)
{
    global $_G, $bbcode;
    $allowcomment = false;
    switch ($idtype) {
        case 'uid':
            $allowcomment = helper_access::check_module('wall');
            break;
        case 'picid':
            $allowcomment = helper_access::check_module('album');
            break;
        case 'blogid':
            $allowcomment = helper_access::check_module('blog');
            break;
        case 'sid':
            $allowcomment = helper_access::check_module('share');
            break;
    }
    if (!$allowcomment) {
        showmessage('quickclear_noperm');
    }
    $summay = getstr($message, 150, 0, 0, 0, -1);
    $comment = array();
    if ($cid) {
        $comment = C::t('home_comment')->fetch_by_id_idtype($id, $idtype, $cid);
        if ($comment && $comment['authorid'] != $_G['uid']) {
            $comment['message'] = preg_replace("/\\<div class=\"quote\"\\>\\<blockquote\\>.*?\\<\\/blockquote\\>\\<\\/div\\>/is", '', $comment['message']);
            $comment['message'] = $bbcode->html2bbcode($comment['message']);
            $message = "<div class=\"quote\"><blockquote><b>" . $comment['author'] . "</b>: " . getstr($comment['message'], 150, 0, 0, 2, 1) . '</blockquote></div>' . $message;
            if ($comment['idtype'] == 'uid') {
                $id = $comment['authorid'];
            }
        } else {
            $comment = array();
        }
    }
    $hotarr = array();
    $stattype = '';
    $tospace = $pic = $blog = $album = $share = $poll = array();
    switch ($idtype) {
        case 'uid':
            $tospace = getuserbyuid($id);
            $stattype = 'wall';
            break;
        case 'picid':
            $pic = C::t('home_pic')->fetch($id);
            if (empty($pic)) {
                showmessage('view_images_do_not_exist');
            }
            $picfield = C::t('home_picfield')->fetch($id);
            $pic['hotuser'] = $picfield['hotuser'];
            $tospace = getuserbyuid($pic['uid']);
            $album = array();
            if ($pic['albumid']) {
                $query = C::t('home_album')->fetch($pic['albumid']);
                if (!$query['albumid']) {
                    C::t('home_pic')->update_for_albumid($albumid, array('albumid' => 0));
                }
            }
            if (!ckfriend($album['uid'], $album['friend'], $album['target_ids'])) {
                showmessage('no_privilege_ckfriend_pic');
            } elseif (!$tospace['self'] && $album['friend'] == 4) {
                $cookiename = "view_pwd_album_{$album['albumid']}";
                $cookievalue = empty($_G['cookie'][$cookiename]) ? '' : $_G['cookie'][$cookiename];
                if ($cookievalue != md5(md5($album['password']))) {
                    showmessage('no_privilege_ckpassword_pic');
                }
            }
            $hotarr = array('picid', $pic['picid'], $pic['hotuser']);
            $stattype = 'piccomment';
            break;
        case 'blogid':
            $blog = array_merge(C::t('home_blog')->fetch($id), C::t('home_blogfield')->fetch_targetids_by_blogid($id));
            if (empty($blog)) {
                showmessage('view_to_info_did_not_exist');
            }
            $tospace = getuserbyuid($blog['uid']);
            if (!ckfriend($blog['uid'], $blog['friend'], $blog['target_ids'])) {
                showmessage('no_privilege_ckfriend_blog');
            } elseif (!$tospace['self'] && $blog['friend'] == 4) {
                $cookiename = "view_pwd_blog_{$blog['blogid']}";
                $cookievalue = empty($_G['cookie'][$cookiename]) ? '' : $_G['cookie'][$cookiename];
                if ($cookievalue != md5(md5($blog['password']))) {
                    showmessage('no_privilege_ckpassword_blog');
                }
            }
            if (!empty($blog['noreply'])) {
                showmessage('do_not_accept_comments');
            }
            if ($blog['target_ids']) {
                $blog['target_ids'] .= ",{$blog['uid']}";
            }
            $hotarr = array('blogid', $blog['blogid'], $blog['hotuser']);
            $stattype = 'blogcomment';
            break;
        case 'sid':
            $share = C::t('home_share')->fetch($id);
            if (empty($share)) {
                showmessage('sharing_does_not_exist');
            }
//.........这里部分代码省略.........
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:101,代码来源:function_comment.php

示例3: foreach

    foreach ($query as $value) {
        if ($value['picnum']) {
            $albumlist[] = $value;
        }
    }
}
$posturl = "action={$_GET['action']}&fid={$_G['fid']}" . (!empty($_G['tid']) ? "&tid={$_G['tid']}" : '') . (!empty($pid) ? "&pid={$pid}" : '') . (!empty($special) ? "&special={$special}" : '') . (!empty($sortid) ? "&sortid={$sortid}" : '') . (!empty($typeid) ? "&typeid={$typeid}" : '') . (!empty($_GET['firstpid']) ? "&firstpid={$firstpid}" : '') . (!empty($_GET['addtrade']) ? "&addtrade={$addtrade}" : '');
if ($_GET['action'] == 'reply') {
    check_allow_action('allowreply');
} else {
    check_allow_action('allowpost');
}
if ($special == 4) {
    $_G['setting']['activityfield'] = $_G['setting']['activityfield'] ? dunserialize($_G['setting']['activityfield']) : array();
}
if (helper_access::check_module('album') && $_G['group']['allowupload'] && $_G['setting']['albumcategorystat'] && !empty($_G['cache']['albumcategory'])) {
    require_once libfile('function/portalcp');
}
$navtitle = lang('core', 'title_' . $_GET['action'] . '_post');
if ($_GET['action'] == 'newthread' || $_GET['action'] == 'newtrade') {
    loadcache('groupreadaccess');
    $navtitle .= ' - ' . $_G['forum']['name'];
    require_once libfile('post/newthread', 'include');
} elseif ($_GET['action'] == 'reply') {
    $navtitle .= ' - ' . $thread['subject'] . ' - ' . $_G['forum']['name'];
    require_once libfile('post/newreply', 'include');
} elseif ($_GET['action'] == 'edit') {
    loadcache('groupreadaccess');
    $navtitle .= ' - ' . $thread['subject'] . ' - ' . $_G['forum']['name'];
    require_once libfile('post/editpost', 'include');
}
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:31,代码来源:forum_post.php

示例4: if

<div class="umus">
<a  style="display:none;" href="javascript:;" onClick="tbox('wrap');"><img src="<?php echo $mstyle;?>/m_xinglan/img/unfold.png" height="20" /></a>
<a  style="display:none;" href="search.php<?php if($searchstyle == 1) { ?>?mod=forum<?php } else { ?>?mod=portal<?php } ?>" class="a"><img src="<?php echo $mstyle;?>/m_xinglan/img/sreach.png" height="20" /></a>
<?php if($_G['uid'] || $_G['connectguest']) { ?>
<a href="javascript:;" id="h_umu" class="a" onClick="dbox('h_umu','a');"><img src="<?php echo $mstyle;?>/m_xinglan/img/image/5.png" height="29" /></a>
<?php } else { ?>    
<a href="member.php?mod=logging&amp;action=login" class="a"><img src="<?php echo $mstyle;?>/m_xinglan/img/image/5.png" height="20" /></a>
<?php } if($_G['member']['newpm'] || $_G['member']['newprompt'] ) { } ?>
</div>
<div class="a_no"><a href="javascript:;" onClick="tbox('wrap');"></a></div>
<?php if($_G['uid']) { ?>
<ul class="p_umu" id="h_umu_menu" style="display:none;"><em></em>
    <li class="notb"><a href="home.php?mod=space&amp;do=pm"<?php if($_G['member']['newpm']) { ?> class="xi1"<?php } ?>><?php if($_G['member']['newpm']) { ?>新短消息<?php } else { ?>消息<?php } ?></a></li>
    <li><a href="home.php?mod=space&amp;do=notice"<?php if($_G['member']['newprompt']) { ?> class="xi1"<?php } ?>><?php if($_G['member']['newprompt']) { ?>提醒(<?php echo $_G['member']['newprompt'];?>)<?php } else { ?>提醒<?php } ?></a></li>
<?php if($_G['setting']['version'] != 'X2') { if(helper_access::check_module('feed')) { ?><li><a href="home.php"><?php echo m_lang('mfeed'); ?></a></li><?php } if(helper_access::check_module('doing')) { ?><li><a href="home.php?mod=space&amp;do=doing"><?php echo m_lang('mdoing'); ?></a></li><?php } if(helper_access::check_module('album')) { ?><li><a href="home.php?mod=space&amp;do=album"><?php echo m_lang('photo'); ?></a></li><?php } } ?>
    <li><a href="home.php?mod=space&amp;uid=<?php echo $_G['uid'];?>&amp;do=thread&amp;view=me">我的帖子</a></li>
    <li><a href="home.php?mod=space&amp;uid=<?php echo $_G['uid'];?>&amp;do=favorite&amp;view=me&amp;type=forum"><?php echo m_lang('favorite'); ?></a></li>    
    <li><a href="home.php?mod=space&amp;uid=<?php echo $_G['uid'];?>&amp;do=profile"><?php echo m_lang('profile'); ?></a></li>
    <li style=" border-bottom:none;"><a href="member.php?mod=logging&amp;action=logout&amp;formhash=<?php echo FORMHASH;?>">退出</a></li>
</ul>
<?php } elseif($_G['connectguest']) { ?>
<ul class="p_umu" id="h_umu_menu" style="display:none;"><em></em>
    <li style=" border-bottom:none;"><a href="member.php?mod=logging&amp;action=logout&amp;formhash=<?php echo FORMHASH;?>">退出</a></li>
</ul>
<?php } ?>
</header>

<div class="wp">
<?php echo $imenus;?><div class="ct">
<div class="pt bb">
开发者ID:noikiy,项目名称:ejia,代码行数:30,代码来源:2_2_touch_common_showmessage.tpl.php

示例5: updatecache

        }
        C::t('common_setting')->update('domain', $_G['setting']['domain']);
        updatecache('setting');
        cpmsg('setting_update_succeed', 'action=domain&operation=root', 'succeed');
    }
} else {
    if (!submitcheck('domainsubmit')) {
        showtips('setting_domain_base_tips');
        showformheader("domain");
        showtableheader();
        if ($_G['setting']['homepagestyle']) {
            showsetting('setting_domain_allow_space', 'settingnew[allowspacedomain]', $_G['setting']['allowspacedomain'], 'radio');
        } else {
            showhiddenfields(array('settingnew[allowspacedomain]' => 0));
        }
        if (helper_access::check_module('group')) {
            showsetting('setting_domain_allow_group', 'settingnew[allowgroupdomain]', $_G['setting']['allowgroupdomain'], 'radio');
        } else {
            showhiddenfields(array('settingnew[allowgroupdomain]' => 0));
        }
        showsetting('setting_domain_hold_domain', 'settingnew[holddomain]', $_G['setting']['holddomain'], 'text');
        showsubmit('domainsubmit');
        showtablefooter();
        showformfooter();
    } else {
        $settings = $_GET['settingnew'];
        $settings['allowspacedomain'] = (double) $settings['allowspacedomain'];
        $settings['allowgroupdomain'] = (double) $settings['allowgroupdomain'];
        if ($settings) {
            C::t('common_setting')->update_batch($settings);
            updatecache('setting');
开发者ID:dalinhuang,项目名称:healthshop,代码行数:31,代码来源:admincp_domain.php

示例6: foreach

<span id="imgSpanButtonPlaceholder"></span>
</div>
<div class="upfilelist upfl bbda">
<div id="imgattachlist">
<?php 
    if ($_G['basescript'] == 'portal') {
        echo $article['attachs'];
    }
    ?>
</div>
<div class="fieldset flash" id="imgUploadProgress"></div>
</div>
<p class="notice">点击图片添加到编辑器内容中</p>
</div>
<?php 
    if (helper_access::check_module('album')) {
        ?>
<div class="p_opt" unselectable="on" id="icoImg_albumlist" <?php 
        if ($_G['basescript'] == 'home' && $_G['group']['allowupload'] || $_G['basescript'] == 'portal') {
            ?>
 style="display: none;"<?php 
        }
        ?>
>
<div class="upfilelist pbm bbda">
选择相册:
<select name="view_albumid" onchange="picView(this.value, 'albumphoto')" class="ps">
<option value="none">选择相册</option>
<option value="0">默认相册</option><?php 
        if (is_array($albums)) {
            foreach ($albums as $value) {
开发者ID:dalinhuang,项目名称:healthshop,代码行数:31,代码来源:2_2_portal_portalcp_article.tpl.php

示例7: array

     $bfmethods[] = array('class' => 'extend_thread_trade', 'method' => 'before_newreply');
 }
 $attentionon = empty($_GET['attention_add']) ? 0 : 1;
 $attentionoff = empty($attention_remove) ? 0 : 1;
 $bfmethods[] = array('class' => 'extend_thread_rushreply', 'method' => 'before_newreply');
 if ($_G['group']['allowat']) {
     $bfmethods[] = array('class' => 'extend_thread_allowat', 'method' => 'before_newreply');
 }
 $bfmethods[] = array('class' => 'extend_thread_comment', 'method' => 'before_newreply');
 $modpost->attach_before_method('newreply', array('class' => 'extend_thread_filter', 'method' => 'before_newreply'));
 if ($_G['group']['allowat']) {
     $afmethods[] = array('class' => 'extend_thread_allowat', 'method' => 'after_newreply');
 }
 $afmethods[] = array('class' => 'extend_thread_rushreply', 'method' => 'after_newreply');
 $afmethods[] = array('class' => 'extend_thread_comment', 'method' => 'after_newreply');
 if (helper_access::check_module('follow') && !empty($_GET['adddynamic'])) {
     $afmethods[] = array('class' => 'extend_thread_follow', 'method' => 'after_newreply');
 }
 if ($thread['replycredit'] > 0 && $thread['authorid'] != $_G['uid'] && $_G['uid']) {
     $afmethods[] = array('class' => 'extend_thread_replycredit', 'method' => 'after_newreply');
 }
 if ($special == 5) {
     $afmethods[] = array('class' => 'extend_thread_debate', 'method' => 'after_newreply');
 }
 $afmethods[] = array('class' => 'extend_thread_image', 'method' => 'after_newreply');
 if ($special == 2 && $_G['group']['allowposttrade'] && $thread['authorid'] == $_G['uid']) {
     $afmethods[] = array('class' => 'extend_thread_trade', 'method' => 'after_newreply');
 }
 $afmethods[] = array('class' => 'extend_thread_filter', 'method' => 'after_newreply');
 if ($_G['forum']['allowfeed']) {
     if ($special == 2 && !empty($_GET['trade'])) {
开发者ID:lemonstory,项目名称:bbs,代码行数:31,代码来源:post_newreply.php

示例8: array

 $newdoid = C::t('home_doing')->insert($setarr, 1);
 $setarr = array('recentnote' => $message, 'spacenote' => $message);
 $credit = $experience = 0;
 $extrasql = array('doings' => 1);
 updatecreditbyaction('doing', 0, $extrasql);
 C::t('common_member_field_home')->update($_G['uid'], $setarr);
 if ($_POST['to_signhtml'] && $_G['group']['maxsigsize']) {
     if ($_G['group']['maxsigsize'] < 200) {
         $signhtml = getstr($_POST['message'], $_G['group']['maxsigsize'], 0, 0, 1);
         $signhtml = preg_replace("/\\<br.*?\\>/i", ' ', $signhtml);
     } else {
         $signhtml = $message;
     }
     C::t('common_member_field_forum')->update($_G['uid'], array('sightml' => $signhtml));
 }
 if (helper_access::check_module('feed') && ckprivacy('doing', 'feed') && $doing_status == '0') {
     $feedarr = array('appid' => '', 'icon' => 'doing', 'uid' => $_G['uid'], 'username' => $_G['username'], 'dateline' => $_G['timestamp'], 'title_template' => lang('feed', 'feed_doing_title'), 'title_data' => serialize(array('message' => $message)), 'body_template' => '', 'body_data' => '', 'id' => $newdoid, 'idtype' => 'doid');
     C::t('home_feed')->insert($feedarr);
 }
 if ($doing_status == '1') {
     updatemoderate('doid', $newdoid);
     manage_addnotify('verifydoing');
 }
 require_once libfile('function/stat');
 updatestat('doing');
 C::t('common_member_status')->update($_G['uid'], array('lastpost' => TIMESTAMP), 'UNBUFFERED');
 if (!empty($_GET['fromcard'])) {
     showmessage($message . lang('spacecp', 'card_update_doing'));
 } else {
     showmessage('do_success', dreferer(), array('doid' => $newdoid), $_GET['spacenote'] ? array('showmsg' => false) : array('header' => true));
 }
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:31,代码来源:spacecp_doing.php

示例9: showmessage

    if (!helper_access::check_module('blog') || !checkperm('allowblog')) {
        showmessage('no_authority_to_add_log', '', array(), array('return' => true));
    }
    cknewuser();
    $waittime = interval_check('post');
    if ($waittime > 0) {
        showmessage('operating_too_fast', '', array('waittime' => $waittime), array('return' => true));
    }
    $blog['subject'] = empty($_GET['subject']) ? '' : getstr($_GET['subject'], 80);
    $blog['message'] = empty($_GET['message']) ? '' : getstr($_GET['message'], 5000);
} else {
    if ($_G['uid'] != $blog['uid'] && !checkperm('manageblog') && $_GET['modblogkey'] != modauthkey($blog['blogid'])) {
        showmessage('no_authority_operation_of_the_log');
    }
}
if (submitcheck('blogsubmit', 0, $seccodecheck, $secqaacheck) && helper_access::check_module('blog')) {
    if (empty($blog['blogid'])) {
        $blog = array();
    } else {
        if (!checkperm('allowblog')) {
            showmessage('no_privilege_blog');
        }
    }
    if ($_G['setting']['blogcategorystat'] && $_G['setting']['blogcategoryrequired'] && !$_POST['catid']) {
        showmessage('blog_choose_system_category');
    }
    require_once libfile('function/blog');
    if ($newblog = blog_post($_POST, $blog)) {
        if (empty($blog) && $newblog['topicid']) {
            $url = 'home.php?mod=space&uid=' . $_G['uid'] . '&do=topic&topicid=' . $newblog['topicid'] . '&view=blog&quickforward=1';
        } else {
开发者ID:MCHacker,项目名称:discuz-docker,代码行数:31,代码来源:spacecp_blog.php

示例10: if

<?php if(!defined('IN_DISCUZ')) exit('Access Denied'); hookscriptoutput('guide');
0
|| checktplrefresh('./template/default/forum/guide.htm', './template/default/forum/guide_list_row.htm', 1436237307, '1', './data/template/1_1_forum_guide.tpl.php', './template/default', 'forum/guide')
;?><?php include template('common/header'); ?><style type="text/css">
.xl2 { background: url(<?php echo IMGDIR;?>/vline.png) repeat-y 50% 0; }
.xl2 li { width: 49.9%; }
.xl2 li em { padding-right: 10px; }
.xl2 .xl2_r em { padding-right: 0; }
.xl2 .xl2_r i { padding-left: 10px; }
</style>
<div id="pt" class="bm cl">
<div class="z">
<a href="./" class="nvhm" title="首页"><?php echo $_G['setting']['bbname'];?></a><?php if(helper_access::check_module('guide')) { ?><em>&raquo;</em><a href="forum.php?mod=guide&amp;view=index">导读</a><?php } ?><?php echo $navigation;?>
</div>
</div>
<div class="boardnav">
<div id="ct" class="wp cl<?php if($_G['forum']['allowside']) { ?> ct2<?php } ?>"<?php if($leftside) { ?> style="margin-left:<?php echo $_G['leftsidewidth_mwidth'];?>px"<?php } ?>>
<div class="mn">
<div class="bm bml pbn">
<div class="bm_h cl">
<?php if($view != 'index' && $view != 'my') { ?>
<span class="y">
<a href="forum.php?mod=guide&amp;view=<?php echo $view;?>&amp;rss=1" class="fa_rss" target="_blank" title="RSS">订阅</a>
</span>
<?php } ?>
<h1 class="xs2">
<?php echo $lang['guide_'.$view];?>
</h1>
</div>
<?php if($view != 'my') { ?>
<div class="bm_c cl pbn">
开发者ID:noikiy,项目名称:fruit,代码行数:31,代码来源:1_1_forum_guide.tpl.php

示例11: cutstr

        if (empty($_GET['syncbbs'])) {
            $_GET['subject'] = cutstr($_GET['message'], 75, '');
        }
        $_POST['replysubmit'] = true;
        $_GET['fid'] = $fid;
        $_GET['action'] = 'newthread';
        $_GET['allownoticeauthor'] = '1';
        include_once libfile('function/forum');
        require_once libfile('function/post');
        loadforum();
        $_G['forum']['picstyle'] = 0;
        $skipmsg = 1;
        include_once libfile('forum/post', 'module');
    }
} elseif ($op == 'relay') {
    if (!helper_access::check_module('follow')) {
        showmessage('quickclear_noperm');
    }
    $tid = intval($_GET['tid']);
    $preview = $post = array();
    $preview = C::t('forum_threadpreview')->fetch($tid);
    if (empty($preview)) {
        $post = C::t('forum_post')->fetch_threadpost_by_tid_invisible($tid);
        if ($post['anonymous']) {
            showmessage('follow_anonymous_unfollow');
        }
    }
    if (empty($post) && empty($preview)) {
        showmessage('follow_content_not_exist');
    }
    if (submitcheck('relaysubmit')) {
开发者ID:tang86,项目名称:discuz-utf8,代码行数:31,代码来源:spacecp_follow.php

示例12: elseif

} elseif ($_GET['op'] == 'edithot') {
    if (!checkperm('manageshare')) {
        showmessage('no_privilege_edithot_share');
    }
    if ($sid) {
        if (!($share = C::t('home_share')->fetch($sid))) {
            showmessage('share_does_not_exist');
        }
    }
    if (submitcheck('hotsubmit')) {
        C::t('home_share')->update($sid, array('hot' => $_POST['hot']));
        C::t('home_feed')->update($sid, array('hot' => $_POST['hot']), 'sid');
        showmessage('do_success', dreferer());
    }
} else {
    if (!checkperm('allowshare') || !helper_access::check_module('share')) {
        showmessage('no_privilege_share');
    }
    cknewuser();
    $type = empty($_GET['type']) ? '' : $_GET['type'];
    $id = empty($_GET['id']) ? 0 : intval($_GET['id']);
    $note_uid = 0;
    $note_message = '';
    $note_values = array();
    $hotarr = array();
    $arr = array();
    $feed_hash_data = '';
    switch ($type) {
        case 'space':
            $feed_hash_data = "uid{$id}";
            $tospace = getuserbyuid($id);
开发者ID:tang86,项目名称:discuz-utf8,代码行数:31,代码来源:spacecp_share.php

示例13: sendPost


//.........这里部分代码省略.........
             notification_add($atuid, 'at', 'at_message', array('from_id' => $tid, 'from_idtype' => 'at', 'buyerid' => $_G['uid'], 'buyer' => $_G['username'], 'tid' => $tid, 'subject' => $subject, 'pid' => $pid, 'message' => messagecutstr($message, 150)));
         }
         set_atlist_cookie(array_keys($atlist));
     }
     $threadimageaid = 0;
     $threadimage = array();
     if ($special == 4 && $_GET['activityaid']) {
         $threadimageaid = $_GET['activityaid'];
         convertunusedattach($_GET['activityaid'], $tid, $pid);
     }
     if ($_G['forum']['threadsorts']['types'][$sortid] && !empty($_G['forum_optiondata']) && is_array($_G['forum_optiondata']) && $sortaids) {
         foreach ($sortaids as $sortaid) {
             convertunusedattach($sortaid, $tid, $pid);
         }
     }
     if (($_G['group']['allowpostattach'] || $_G['group']['allowpostimage']) && ($_GET['attachnew'] || $sortid || !empty($_GET['activityaid']))) {
         updateattach($displayorder == -4 || $modnewthreads, $tid, $pid, $_GET['attachnew']);
         if (!$threadimageaid) {
             $threadimage = C::t('forum_attachment_n')->fetch_max_image('tid:' . $tid, 'tid', $tid);
             $threadimageaid = $threadimage['aid'];
         }
     }
     $values = array('fid' => $_G['fid'], 'tid' => $tid, 'pid' => $pid, 'coverimg' => '', 'sechash' => !empty($_GET['sechash']) ? $_GET['sechash'] : '');
     $param = array();
     Mobcent::import(MOBCENT_APP_ROOT . '/components/discuz/source/function/function_post.php');
     if ($_G['forum']['picstyle']) {
         if (!mobcent_setthreadcover($pid, 0, $threadimageaid)) {
             preg_match_all("/(\\[img\\]|\\[img=\\d{1,4}[x|\\,]\\d{1,4}\\])\\s*([^\\[\\<\r\n]+?)\\s*\\[\\/img\\]/is", $message, $imglist, PREG_SET_ORDER);
             $values['coverimg'] = "<p id=\"showsetcover\">" . lang('message', 'post_newthread_set_cover') . "<span id=\"setcoverwait\"></span></p><script>if(\$('forward_a')){\$('forward_a').style.display='none';setTimeout(\"\$('forward_a').style.display=''\", 5000);};ajaxget('forum.php?mod=ajax&action=setthreadcover&tid={$tid}&pid={$pid}&fid={$_G['fid']}&imgurl={$imglist[0][2]}&newthread=1', 'showsetcover', 'setcoverwait')</script>";
             $param['clean_msgforward'] = 1;
             $param['timeout'] = $param['refreshtime'] = 15;
         }
     }
     if ($threadimageaid) {
         if (!$threadimage) {
             $threadimage = C::t('forum_attachment_n')->fetch('tid:' . $tid, $threadimageaid);
         }
         $threadimage = daddslashes($threadimage);
         C::t('forum_threadimage')->insert(array('tid' => $tid, 'attachment' => $threadimage['attachment'], 'remote' => $threadimage['remote']));
     }
     $statarr = array(0 => 'thread', 1 => 'poll', 2 => 'trade', 3 => 'reward', 4 => 'activity', 5 => 'debate', 127 => 'thread');
     include_once libfile('function/stat');
     updatestat($isgroup ? 'groupthread' : $statarr[$special]);
     if ($modnewthreads) {
         updatemoderate('tid', $tid);
         C::t('forum_forum')->update_forum_counter($_G['fid'], 0, 0, 1);
         manage_addnotify('verifythread');
         return WebUtils::makeErrorInfo_oldVersion($res, 'post_newthread_mod_succeed', array('noError' => 1));
         //showmessage('post_newthread_mod_succeed', $returnurl, $values, $param);
     } else {
         if ($displayorder >= 0 && helper_access::check_module('follow') && !empty($_GET['adddynamic']) && !$isanonymous) {
             require_once libfile('function/discuzcode');
             require_once libfile('function/followcode');
             $feedcontent = array('tid' => $tid, 'content' => followcode($message, $tid, $pid, 1000));
             C::t('forum_threadpreview')->insert($feedcontent);
             C::t('forum_thread')->update_status_by_tid($tid, '512');
             $followfeed = array('uid' => $_G['uid'], 'username' => $_G['username'], 'tid' => $tid, 'note' => '', 'dateline' => TIMESTAMP);
             $values['feedid'] = C::t('home_follow_feed')->insert($followfeed, true);
             C::t('common_member_count')->increase($_G['uid'], array('feeds' => 1));
         }
         $feed = array('icon' => '', 'title_template' => '', 'title_data' => array(), 'body_template' => '', 'body_data' => array(), 'title_data' => array(), 'images' => array());
         if ($displayorder != -4) {
             if ($digest) {
                 updatepostcredits('+', $_G['uid'], 'digest', $_G['fid']);
             }
             //updatepostcredits('+',  $_G['uid'], 'post', $_G['fid']);
             Mobcent::import(MOBCENT_APP_ROOT . '/components/discuz/source/function/function_post.php');
             //Yii::import('application.components.discuz.source.function.function_post', true);
             mobcent_updatepostcredits('+', $_G['uid'], 'post', $_G['fid']);
             if ($isgroup) {
                 C::t('forum_groupuser')->update_counter_for_user($_G['uid'], $_G['fid'], 1);
             }
             $subject = str_replace("\t", ' ', $subject);
             $lastpost = "{$tid}\t" . $subject . "\t{$_G['timestamp']}\t{$author}";
             C::t('forum_forum')->update($_G['fid'], array('lastpost' => $lastpost));
             C::t('forum_forum')->update_forum_counter($_G['fid'], 1, 1, 1);
             if ($_G['forum']['type'] == 'sub') {
                 C::t('forum_forum')->update($_G['forum']['fup'], array('lastpost' => $lastpost));
             }
         }
         if ($_G['forum']['status'] == 3) {
             C::t('forum_forumfield')->update($_G['fid'], array('lastupdate' => TIMESTAMP));
             require_once libfile('function/grouplog');
             updategroupcreditlog($_G['fid'], $_G['uid']);
         }
         /*如果显示地理位置,入库到表里*/
         if ($jsonInfo['isShowPostion']) {
             $data = DB::query('INSERT INTO  %t VALUES(null,%f,%f,%d,%d,%s)', array('home_surrounding_user', $jsonInfo['longitude'], $jsonInfo['latitude'], $tid, 3, (string) $jsonInfo['location']));
         }
         /*  //客户端发表主题积分入库
                $temp = DB::fetch_first('SELECT extcredits3  FROM '.DB::table('common_credit_rule').' WHERE rid =%d ',array(1));
                $extcredits3 = DB::fetch_first('SELECT extcredits3 FROM '.DB::table('common_member_count').' WHERE uid = %d',array($_G['uid']));
                $temp = $extcredits3['extcredits3'] + $temp['extcredits3'];
                DB::query('UPDATE '.DB::table('common_member_count').' set extcredits3 = %d WHERE uid = %d',array($temp,$_G['uid']));
             */
         //showmessage('post_newthread_succeed', $returnurl, $values, $param);
         // return array('rs'=>1,'errcode'=>WebUtils::t('发贴成功'));
         return $this->makeErrorInfo($res, 'mobcent_post_newthread_success', array('noError' => 1));
     }
 }
开发者ID:caidongyun,项目名称:CS,代码行数:101,代码来源:TopicAdminAction.php

示例14: array

 if (helper_access::check_module('portal')) {
     $search_portal = array($setting['search']['portal']['status'] ? '<input type="checkbox" class="checkbox" name="settingnew[search][portal][status]" value="1" checked="checked" />' : '<input type="checkbox" class="checkbox" name="settingnew[search][portal][status]" value="1" />', cplang('setting_search_status_portal'), '<input type="text" class="txt" name="settingnew[search][portal][searchctrl]" value="' . $setting['search']['portal']['searchctrl'] . '" />', '<input type="text" class="txt" name="settingnew[search][portal][maxspm]" value="' . $setting['search']['portal']['maxspm'] . '" />', '<input type="text" class="txt" name="settingnew[search][portal][maxsearchresults]" value="' . $setting['search']['portal']['maxsearchresults'] . '" />');
 }
 if (!$appService->getCloudAppStatus('search')) {
     $search_forum = array($setting['search']['forum']['status'] ? '<input type="checkbox" class="checkbox" name="settingnew[search][forum][status]" value="1" checked="checked" />' : '<input type="checkbox" class="checkbox" name="settingnew[search][forum][status]" value="1" />', cplang('setting_search_status_forum'), '<input type="text" class="txt" name="settingnew[search][forum][searchctrl]" value="' . $setting['search']['forum']['searchctrl'] . '" />', '<input type="text" class="txt" name="settingnew[search][forum][maxspm]" value="' . $setting['search']['forum']['maxspm'] . '" />', '<input type="text" class="txt" name="settingnew[search][forum][maxsearchresults]" value="' . $setting['search']['forum']['maxsearchresults'] . '" />');
 }
 if (helper_access::check_module('blog')) {
     $search_blog = array($setting['search']['blog']['status'] ? '<input type="checkbox" class="checkbox" name="settingnew[search][blog][status]" value="1" checked="checked" />' : '<input type="checkbox" class="checkbox" name="settingnew[search][blog][status]" value="1" />', cplang('setting_search_status_blog'), '<input type="text" class="txt" name="settingnew[search][blog][searchctrl]" value="' . $setting['search']['blog']['searchctrl'] . '" />', '<input type="text" class="txt" name="settingnew[search][blog][maxspm]" value="' . $setting['search']['blog']['maxspm'] . '" />', '<input type="text" class="txt" name="settingnew[search][blog][maxsearchresults]" value="' . $setting['search']['blog']['maxsearchresults'] . '" />');
 }
 if (helper_access::check_module('album')) {
     $search_album = array($setting['search']['album']['status'] ? '<input type="checkbox" class="checkbox" name="settingnew[search][album][status]" value="1" checked="checked" />' : '<input type="checkbox" class="checkbox" name="settingnew[search][album][status]" value="1" />', cplang('setting_search_status_album'), '<input type="text" class="txt" name="settingnew[search][album][searchctrl]" value="' . $setting['search']['album']['searchctrl'] . '" />', '<input type="text" class="txt" name="settingnew[search][album][maxspm]" value="' . $setting['search']['album']['maxspm'] . '" />', '<input type="text" class="txt" name="settingnew[search][album][maxsearchresults]" value="' . $setting['search']['album']['maxsearchresults'] . '" />');
 }
 if (helper_access::check_module('group')) {
     $search_group = array($setting['search']['group']['status'] ? '<input type="checkbox" class="checkbox" name="settingnew[search][group][status]" value="1" checked="checked" />' : '<input type="checkbox" class="checkbox" name="settingnew[search][group][status]" value="1" />', cplang('setting_search_status_group'), '<input type="text" class="txt" name="settingnew[search][group][searchctrl]" value="' . $setting['search']['group']['searchctrl'] . '" />', '<input type="text" class="txt" name="settingnew[search][group][maxspm]" value="' . $setting['search']['group']['maxspm'] . '" />', '<input type="text" class="txt" name="settingnew[search][group][maxsearchresults]" value="' . $setting['search']['group']['maxsearchresults'] . '" />');
 }
 if (helper_access::check_module('collection')) {
     $search_collection = array($setting['search']['collection']['status'] ? '<input type="checkbox" class="checkbox" name="settingnew[search][collection][status]" value="1" checked="checked" />' : '<input type="checkbox" class="checkbox" name="settingnew[search][collection][status]" value="1" />', cplang('setting_search_status_collection'), '<input type="text" class="txt" name="settingnew[search][collection][searchctrl]" value="' . $setting['search']['collection']['searchctrl'] . '" />', '<input type="text" class="txt" name="settingnew[search][collection][maxspm]" value="' . $setting['search']['collection']['maxspm'] . '" />', '<input type="text" class="txt" name="settingnew[search][collection][maxsearchresults]" value="' . $setting['search']['collection']['maxsearchresults'] . '" />');
 }
 showtablerow('', array('width="100"', 'width="120"', 'width="120"', 'width="120"'), $search_portal);
 showtablerow('', '', $search_forum);
 showtablerow('', '', $search_blog);
 showtablerow('', '', $search_album);
 showtablerow('', '', $search_group);
 showtablerow('', '', $search_collection);
 showtablefooter();
 if (!$appService->getCloudAppStatus('search')) {
     showtableheader('setting_search_srchhotkeywords');
     showsetting('setting_search_srchhotkeywords', 'settingnew[srchhotkeywords]', $setting['srchhotkeywords'], 'textarea');
     showtablefooter();
     showtableheader('settings_sphinx', 'fixpadding');
     showsetting('settings_sphinx_sphinxon', 'settingnew[sphinxon]', $setting['sphinxon'], 'radio');
开发者ID:KKRainbow,项目名称:discuz-x32-php7,代码行数:31,代码来源:admincp_setting.php

示例15: if

<li><a href="admin.php?action=threads&amp;operation=group&amp;searchsubmit=1&amp;detail=1&amp;search=true&amp;fromumanage=1&amp;users=<?php echo $encodeusername;?>" target="_blank">群组主题</a></li>
<li><a href="admin.php?action=prune&amp;searchsubmit=1&amp;detail=1&amp;operation=group&amp;fromumanage=1&amp;users=<?php echo $encodeusername;?>" target="_blank">群组帖子</a></li>
<?php } ?>
</ul>
<?php } } ?>
</p>
</div>

<?php if(!empty($_G['setting']['pluginhooks']['space_menu_extra'])) echo $_G['setting']['pluginhooks']['space_menu_extra'];?>
<ul class="tb cl" style="padding-left: 75px;">
<?php if(helper_access::check_module('follow')) { ?>
<li<?php if(CURMODULE == 'follow') { ?> class="a"<?php } ?>><a href="home.php?mod=follow&amp;uid=<?php echo $space['uid'];?>&amp;do=view&amp;from=space">广播</a></li>
<?php } ?>
<li<?php if($do=='thread') { ?> class="a"<?php } ?>><a href="home.php?mod=space&amp;uid=<?php echo $space['uid'];?>&amp;do=thread&amp;view=me&amp;from=space">主题</a></li>
<?php if(helper_access::check_module('blog')) { ?>
<li<?php if($do=='blog') { ?> class="a"<?php } ?>><a href="home.php?mod=space&amp;uid=<?php echo $space['uid'];?>&amp;do=blog&amp;view=me&amp;from=space">日志</a></li>
<?php } if(helper_access::check_module('album')) { ?>
<li<?php if($do=='album') { ?> class="a"<?php } ?>><a href="home.php?mod=space&amp;uid=<?php echo $space['uid'];?>&amp;do=album&amp;view=me&amp;from=space">相册</a></li>
<?php } if(helper_access::check_module('doing')) { ?>
<li<?php if($do=='doing') { ?> class="a"<?php } ?>><a href="home.php?mod=space&amp;uid=<?php echo $space['uid'];?>&amp;do=doing&amp;view=me&amp;from=space">记录</a></li>
<?php } if(helper_access::check_module('home')) { ?>
<li<?php if($do=='home') { ?> class="a"<?php } ?>><a href="home.php?mod=space&amp;uid=<?php echo $space['uid'];?>&amp;do=home&amp;view=me&amp;from=space">动态</a></li>
<?php } if(helper_access::check_module('share')) { ?>
<li<?php if($do=='share') { ?> class="a"<?php } ?>><a href="home.php?mod=space&amp;uid=<?php echo $space['uid'];?>&amp;do=share&amp;view=me&amp;from=space">分享</a></li>
<?php } if(helper_access::check_module('wall')) { ?>
<li<?php if($do==wall) { ?> class="a"<?php } ?>><a href="home.php?mod=space&amp;uid=<?php echo $space['uid'];?>&amp;do=wall&amp;from=space">留言板</a></li>
<?php } ?>
<li<?php if($do==profile) { ?> class="a"<?php } ?>><a href="home.php?mod=space&amp;uid=<?php echo $space['uid'];?>&amp;do=profile&amp;from=space">个人资料</a></li>
</ul>
</div>
<?php } ?>
开发者ID:hutao1004,项目名称:yintt,代码行数:31,代码来源:2_2_home_space_menu.tpl.php


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