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


PHP L::forum方法代码示例

本文整理汇总了PHP中L::forum方法的典型用法代码示例。如果您正苦于以下问题:PHP L::forum方法的具体用法?PHP L::forum怎么用?PHP L::forum使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在L的用法示例。


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

示例1: PwForum

 function PwForum($fid)
 {
     $this->fid = $fid;
     $this->db =& $GLOBALS['db'];
     $this->foruminfo = L::forum($fid);
     $this->name = $this->foruminfo['name'];
     $this->forumset = $this->foruminfo['forumset'];
     $this->creditset = $this->foruminfo['creditset'];
 }
开发者ID:adi00,项目名称:wumaproject,代码行数:9,代码来源:forum.class.php

示例2: get

 function get($fid)
 {
     if (!$fid) {
         return array();
     }
     $info = L::forum($fid);
     if (!$info && ($info = $this->getFromDB($fid))) {
         $info['creditset'] = unserialize($info['creditset']);
         $info['forumset'] = unserialize($info['forumset']);
         $info['commend'] = unserialize($info['commend']);
     }
     return $info;
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:13,代码来源:forum.class.php

示例3: setForum

 /**
  * 
  * 设置版块
  * @param mixed $forum (int fid|array foruminfo)
  */
 function setForum($forum)
 {
     if (!S::isArray($forum)) {
         $forum = intval($forum);
         if ($forum < 1) {
             return false;
         }
         $foruminfo = L::forum($forum);
         if (!S::isArray($foruminfo)) {
             return false;
         }
         $forum = $foruminfo;
     }
     $forum && ($this->foruminfo = $forum);
     return true;
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:21,代码来源:tucool.class.php

示例4: IN

 } else {
     $sTid = (int) $tid;
 }
 $sql = "SELECT pf.id,pf.tid,pt.fid,pt.subject,pt.author,pt.authorid FROM pw_filter AS pf " . "LEFT JOIN pw_threads AS pt ON pf.tid=pt.tid WHERE pf.tid IN (" . $sTid . ") AND pf.pid=0";
 $query = $db->query($sql);
 $objid = array();
 $threadsid = array();
 require_once R_P . 'require/credit.php';
 $creditOpKey = "Delete";
 $forumInfos = array();
 while ($rt = $db->fetch_array($query)) {
     $fids[$rt['fid']][] = $rt['tid'];
     $objid[] = $rt['id'];
     $threadsid[] = $rt['tid'];
     if (!isset($forumInfos[$rt['fid']])) {
         $forumInfos[$rt['fid']] = L::forum($rt['fid']);
     }
     $foruminfo = $forumInfos[$rt['fid']];
     $creditset = $credit->creditset($foruminfo['creditset'], $db_creditset);
     $credit->addLog("topic_{$creditOpKey}", $creditset[$creditOpKey], array('uid' => $rt['authorid'], 'username' => $rt['author'], 'ip' => $onlineip, 'fname' => strip_tags($foruminfo['name']), 'operator' => $windid));
     $credit->sets($rt['authorid'], $creditset[$creditOpKey], false);
     M::sendNotice(array($rt['author']), array('title' => getLangInfo('writemsg', 'filtermsg_thread_del_title'), 'content' => getLangInfo('writemsg', 'filtermsg_thread_del_content', array('subject' => $rt['subject']))));
 }
 $filter_id = implode(',', $objid);
 $credit->runsql();
 $delarticle->delTopicByTids($threadsid, $db_recycle);
 //更改审核状态,更新审核人员信息
 $sql = "UPDATE pw_filter SET state=2,assessor=" . S::sqlEscape($admin_name) . ",updated_at=" . S::sqlEscape($timestamp) . " WHERE id IN (" . $filter_id . ")";
 $db->update($sql);
 //重定向
 adminmsg('operate_success', "{$basename}" . "&action=check");
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:setbwd.php

示例5: pwEscape

         $db->update("UPDATE pw_threads SET replies=replies+" . pwEscape($value) . ",lastpost=" . pwEscape($rt['postdate'], false) . ",lastposter =" . pwEscape($rt['author'], false) . "WHERE tid=" . pwEscape($key));
         # memcache refresh
         $threadList = L::loadClass("threadlist");
         $threadList->updateThreadIdsByForumId($fid, $tid);
     }
     $db->update("UPDATE {$pw_posts} SET ifcheck='1' WHERE pid IN({$pids}) AND fid='{$fid}'");
     require_once R_P . 'require/updateforum.php';
     updateforum($fid);
     refreshto("forumcp.php?action=edit&type={$type}&fid={$fid}", 'operate_success');
 } else {
     PostCheck();
     InitGP(array('selid', 'ptable'));
     require_once R_P . 'require/credit.php';
     require_once R_P . 'require/msg.php';
     $creditOpKey = "Deleterp";
     $foruminfo = L::forum($fid);
     $creditset = $credit->creditset($foruminfo['creditset'], $db_creditset);
     $tids = '';
     $_tids = $_pids = $deluids = array();
     foreach ($selid as $key => $value) {
         is_numeric($value) && ($tids .= ($tids ? ',' : '') . $value);
     }
     !$tids && Showmsg('id_error');
     $msg_delrvrc = abs($creditset['Deleterp']['rvrc']);
     $msg_delmoney = abs($creditset['Deleterp']['money']);
     $pw_posts = GetPtable($ptable);
     $query = $db->query("SELECT tid,pid,fid,aid,author,authorid,postdate,subject,content FROM {$pw_posts} WHERE fid='{$fid}' AND pid IN({$tids})");
     while ($rt = $db->fetch_array($query)) {
         $rt['fid'] != $fid && Showmsg('admin_forum_right');
         $deluids[$rt['authorid']] = isset($deluids[$rt['authorid']]) ? $deluids[$rt['authorid']] + 1 : 1;
         //积分操作
开发者ID:adi00,项目名称:wumaproject,代码行数:31,代码来源:forumcp.php

示例6: getForumInfo

 function getForumInfo($fid, $key = null)
 {
     $forum = L::forum($fid);
     return $key ? $forum[$key] : $forum;
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:5,代码来源:delarticle.class.php

示例7: _getForum

 function _getForum($fid)
 {
     if (!$fid) {
         return array();
     }
     static $forums = array();
     if (!$forums[$fid]) {
         $forums[$fid] = L::forum($fid);
     }
     return $forums[$fid];
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:11,代码来源:search.post.class.php

示例8: _buildThreads

 /**
  * 组装帖子数据
  * @param $result
  * @return unknown_type
  */
 function _buildThreads($threads, $keywords)
 {
     if (!$threads) {
         return false;
     }
     $keywords = is_array($keywords) ? $keywords : explode(" ", $keywords);
     $data = array();
     require_once R_P . 'require/bbscode.php';
     foreach ($threads as $t) {
         $t['postdate'] = get_date($t['postdate'], "Y-m-d H:i");
         $forum = L::forum($t['fid']);
         $t['content'] = substrs(stripWindCode(strip_tags(convert($t['content'], array()))), 170);
         foreach ($keywords as $keyword) {
             $keyword = stripslashes($keyword);
             $keyword && ($t['subject'] = $this->_highlighting($keyword, $t['subject']));
             $keyword && ($t['content'] = $this->_highlighting($keyword, $t['content']));
         }
         $t['subject'] = $t['subject'] ? $t['subject'] : 'RE:';
         $t['name'] = strip_tags($forum['name']);
         $data[] = $t;
     }
     return $this->_buildThreadsAttachs($data);
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:28,代码来源:base.search.php

示例9: str_replace

        if ($prep < 1) {
            $prep = $total;
        }
        $rt['subject'] = str_replace('&nbsp;', '', wap_cv($rt['subject']));
        $ht = viewOneReply($tid, $pid, $rt['ptable']);
        $nextr = nextReply($tid, $pid, $rt['ptable'], 1);
        $prer = nextReply($tid, $pid, $rt['ptable'], -1);
    } else {
        wap_msg('illegal_tid');
    }
} elseif ($action == 'modify') {
    InitGP(array('step'), 'GP', 2);
    $pw_tmsgs = GetTtable($tid);
    $rt = $db->get_one("SELECT t.fid,t.tid,t.subject,t.author,t.authorid,t.replies,t.locked,t.postdate,t.anonymous,t.ptable,tm.content FROM pw_threads t LEFT JOIN {$pw_tmsgs} tm ON tm.tid=t.tid WHERE t.tid=" . pwEscape($tid) . " AND ifcheck=1");
    //读取板块信息
    if (!($foruminfo = L::forum($rt[fid]))) {
        wap_msg('data_error');
    }
    $isBM = admincheck($foruminfo['forumadmin'], $foruminfo['fupadmin'], $windid);
    //获得管理权限
    $pw_posts = GetPtable($rt['ptable']);
    $reply = $db->get_one("SELECT * FROM {$pw_posts} WHERE pid = " . pwEscape($pid));
    $editright = $isGM || pwRights($isBM, 'deltpcs') || $reply['authorid'] == $winduid;
    !$editright && wap_msg('您没有权限编辑此回复', 'index.php?a=reply&tid=' . $tid . '&pid=' . $pid);
    if (empty($step)) {
        $reply['content'] = str_replace(array('<', '>', '&nbsp;'), array('&lt;', '&gt;', ' '), $reply['content']);
    } elseif ($step == 2) {
        InitGP(array('content'), 'GP');
        $pw_posts = GetPtable('N', $tid);
        $db->update("UPDATE {$pw_posts} SET content = " . pwEscape(wap_cv($content)) . " WHERE pid = " . pwEscape($pid));
        wap_msg('operate_success', 'index.php?a=reply&tid=' . $tid . '&pid=' . $pid);
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:reply.php

示例10: filterForums

 /**
  * 
  * 过滤未开启图酷版块
  * @param string $fid
  * @return string
  */
 function filterForums($fid)
 {
     $tmpfids = $this->_cookFid($fid);
     $fids = array();
     if ($tmpfids && !S::isArray($tmpfids)) {
         return $tmpfids;
     }
     foreach ((array) $tmpfids as $v) {
         $foruminfo = L::forum($v);
         if (isset($foruminfo['forumset']['iftucool']) && !$foruminfo['forumset']['iftucool']) {
             continue;
         }
         $fids[] = $v;
     }
     return S::sqlImplode($fids);
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:22,代码来源:tucoolsource.class.php

示例11: ceil

    $per['maxmsg'] = (int) $gRight['maxmsg'];
    $per['signnum'] = (int) $gRight['signnum'];
    $per['allownum'] = (int) $gRight['allownum'];
    $per['maxfavor'] = (int) $gRight['maxfavor'];
    $per['maxgraft'] = !$gRight['maxgraft'] ? 0 : $gRight['maxgraft'];
    $per['uploadmaxsize'] = ceil(($gRight['uploadmaxsize'] ? $gRight['uploadmaxsize'] : $db_uploadmaxsize) / 1024);
    !$gRight['uploadtype'] && ($gRight['uploadtype'] = $db_uploadfiletype);
    $gRight['uploadtype'] = unserialize($gRight['uploadtype']);
    $per['uptype'] = '';
    foreach ($gRight['uploadtype'] as $key => $value) {
        $per['uptype'] .= ($per['uptype'] ? ', ' : '') . "{$key}:{$value}";
    }
    unset($creditdb, $groups, $value, $ltitle, $gRight);
} else {
    require_once R_P . 'require/forum.php';
    if (!($rt = L::forum($fid))) {
        Showmsg('data_error');
    }
    (!$rt || $rt['type'] == 'category') && Showmsg('data_error');
    wind_forumcheck($rt);
    $forumset = $rt['forumset'];
    $forumset['link'] && Showmsg('data_error');
    $per = $forumright = array();
    $creditset = $credit->creditset($rt['creditset'], $db_creditset);
    foreach ($creditset as $key => $value) {
        foreach ($value as $k => $v) {
            $forumright[$k][$key] = (int) $v;
        }
    }
    $per['upload'] = $per['down'] = $per['rp'] = $per['post'] = $per['visit'] = 1;
    $per['name'] = strip_tags($rt['name']);
开发者ID:adi00,项目名称:wumaproject,代码行数:31,代码来源:permission.php

示例12: banfree

 /**
  * 解封某个用户
  * 
  * @param int $uid 用户id
  * @param array $params
  * 				ifmsg	是否发送消息 1-是,0-否
  * 				reason	操作原因
  * 				fid		版块ID
  * 				tid		
  */
 function banfree($uid, $params = array())
 {
     $uid = intval($uid);
     $tid = intval($params['tid']);
     $pid = intval($params['pid']);
     $ifmsg = intval($params['ifmsg']);
     $reason = $params['reason'];
     $banuserDb = $this->_getBanUserDB();
     $userService = L::loadClass('UserService', 'user');
     /* @var $userService PW_UserService */
     $userinfo = $userService->get($uid);
     if (!$userinfo) {
         return 'undefined_action';
     }
     $GLOBALS['username'] = $userinfo['username'];
     if ($banuserDb->deleteByUserId($uid)) {
         //解除禁言
         $userService->setUserStatus($uid, PW_USERSTATUS_BANUSER, false);
         //* $userinfo['groupid'] == 6 && $this->db->update("UPDATE `pw_members` SET groupid='-1' WHERE `uid`=".S::sqlEscape($uid));
         $userinfo['groupid'] == 6 && pwQuery::update('pw_members', 'uid=:uid', array($uid), array('groupid' => -1));
         $ifmsg && M::sendNotice(array($userinfo['username']), array('title' => getLangInfo('writemsg', 'banuser_free_title'), 'content' => getLangInfo('writemsg', 'banuser_free_content', array('reason' => stripslashes($reason), 'manager' => $GLOBALS['windid']))));
         /*如果是版块禁言,获取帖子信息*/
         if ($tid > 0) {
             $postInfo = $this->getPostInfo($tid, $pid);
             if ($postInfo === false) {
                 return 'banuser_post_data_error';
             }
             $fid = $postInfo['fid'];
             $userip = $postInfo['userip'];
             //解除禁止的IP/
             require_once R_P . 'admin/cache.php';
             $ipban = $this->db->get_one("SELECT db_value FROM pw_config WHERE db_name='db_ipban'");
             $bannedIps = explode(',', $ipban['db_value']);
             if (in_array($userip, $bannedIps)) {
                 $bannedIps = array_filter(str_replace($userip, '', $bannedIps));
                 setConfig('db_ipban', implode(',', $bannedIps));
                 updatecache_c();
             }
             $fid && ($foruminfo = L::forum($fid));
             if ($foruminfo) {
                 //omit write log
                 if ($foruminfo['allowhtm']) {
                     $StaticPage = L::loadClass('StaticPage');
                     $StaticPage->update($tid);
                 }
             }
         }
         $this->clearUserCache($uid);
     } else {
         //未被禁言
         return 'banuser_notfound';
     }
     return true;
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:64,代码来源:banuser.class.php

示例13: ajax_footer

S::gp(array('tid', 'pids'));
if (empty($tid) || empty($pids)) {
    echo 'fail';
    ajax_footer();
}
$pidArr = array_unique(explode(',', $pids));
$readdb = $_pids = array();
//* $threadService = L::loadClass('threads', 'forum');
//* $read = $threadService->getThreads($tid, in_array('tpc', $pidArr));
$_cacheService = Perf::gatherCache('pw_threads');
$read = in_array('tpc', $pidArr) ? $_cacheService->getThreadAndTmsgByThreadId($tid) : $_cacheService->getThreadByThreadId($tid);
if (empty($read)) {
    echo 'fail';
    ajax_footer();
}
if (!($foruminfo = L::forum($read['fid']))) {
    echo 'fail';
    ajax_footer();
}
extract(L::style());
$ptable = $read['ptable'];
$forumset = $foruminfo['forumset'];
list(, , $downloadmoney, $downloadimg) = explode("\t", $forumset['uploadset']);
$isGM = S::inArray($windid, $manager);
$isBM = admincheck($foruminfo['forumadmin'], $foruminfo['fupadmin'], $windid);
$admincheck = $isGM || $isBM ? 1 : 0;
if (!$isGM) {
    #非创始人权限获取
    $pwSystem = pwRights($isBM);
    if ($pwSystem && ($pwSystem['tpccheck'] || $pwSystem['digestadmin'] || $pwSystem['lockadmin'] || $pwSystem['pushadmin'] || $pwSystem['coloradmin'] || $pwSystem['downadmin'] || $pwSystem['delatc'] || $pwSystem['moveatc'] || $pwSystem['copyatc'] || $pwSystem['topped'] || $pwSystem['unite'] || $pwSystem['pingcp'] || $pwSystem['areapush'])) {
        $managecheck = 1;
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:readfloor.php

示例14: getTopicType

/**
 * 获取主题的主题分类名称及url
 * @param $type
 * @param $fid
 * @return array
 */
function getTopicType($type, $fid)
{
    $foruminfo = L::forum($fid);
    $topic_type = isset($foruminfo['topictype'][$type]) ? $foruminfo['topictype'][$type] : array();
    return $topic_type ? array($topic_type['name'], getForumUrl($fid) . '&type=' . $type) : array('', '');
}
开发者ID:jechiy,项目名称:PHPWind,代码行数:12,代码来源:functions.php

示例15: finish_doPost

 function finish_doPost($factor)
 {
     $forum = L::forum($factor['fid']);
     $title = '<a target="_blank" href="thread.php?fid=' . $forum['fid'] . '">' . $forum['name'] . '</a>';
     return '在 【' . $title . '】 版块发 ' . $factor['num'] . ' 个帖子即可完成任务 ' . $this->getLimitTime($factor);
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:6,代码来源:config.job.php


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