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


PHP L::loadclass方法代码示例

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


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

示例1: resetUserMsgCount

/**
 * 重置消息数
 */
function resetUserMsgCount($num)
{
    global $winduid, $winddb;
    $num = intval($num);
    $userService = L::loadclass('UserService', 'user');
    /* @var $userService PW_UserService */
    $userService->update($winduid, array('newpm' => $num));
}
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:11,代码来源:message.php

示例2: search

function search($fid)
{
    global $page, $thisp, $q, $db, $wap_perpage;
    /* 调用搜索Service -- searchThreads 搜索帖子内容 */
    $searcherService = L::loadclass('searcher', 'search');
    $result = $searcherService->searchThreads($q, 1, '', '', '', array(), $page, $wap_perpage, array());
    $start = ($page - 1) * $wap_perpage;
    if (is_array($result[1])) {
        foreach ($result[1] as $k => $v) {
            $id++;
            $v['anonymous'] && ($v['author'] = $db_anonymousname);
            $v['id'] = $id;
            $hots[] = $v;
        }
    }
    return $hots;
}
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:17,代码来源:search.php

示例3: overPrint

function overPrint($overprint, $tid, $operate = '', $oid = '')
{
    if (!in_array($overprint, array(1, 2))) {
        return false;
    }
    $overPrintService = L::loadclass("overprint");
    /*过滤*/
    if ($overPrintService->checkThreadRelated($overprint, $operate, $tid)) {
        return false;
    }
    if ($overprint == 2) {
        $oid = 0;
        $operate = '';
    }
    $overPrintService->suckThread($tid, $operate, $oid);
}
开发者ID:adi00,项目名称:wumaproject,代码行数:16,代码来源:common.php

示例4: substr_replace

     $keywhere = substr_replace($keywhere, "", 0, 3);
     $sql .= " AND ({$keywhere}) ";
 }
 if ($userip) {
     $userip = str_replace('*', '%', $userip);
     $sql .= " AND (userip LIKE " . S::sqlEscape($userip) . ")";
 }
 if ($tcounts) {
     $sql .= " AND char_length(content)>" . S::sqlEscape($tcounts);
 } elseif ($counts) {
     $sql .= " AND char_length(content)<" . S::sqlEscape($counts);
 }
 $nums = is_numeric($nums) ? $nums : 20;
 if ($sphinx && $keyword && $db_sphinx['isopen'] == 1 && strpos($keyword, '*') === false) {
     $forumIds = $fid > 0 ? array($fid) : array();
     $sphinxServer = L::loadclass('searcher', 'search');
     $result = $sphinxServer->manageThreads($keyword, 3, $authorarray, $pstart, $pend, $forumIds, $page, $nums);
     if ($result === false) {
         adminmsg('search_keyword_empty');
     }
     $count = $result[0];
     $query = $db->query("SELECT fid,pid,tid,author,authorid,content,postdate,userip FROM {$pw_posts} WHERE pid in (" . $result[1] . ")  ORDER BY postdate DESC ");
 } else {
     $rt = $db->get_one("SELECT COUNT(*) AS sum FROM {$pw_posts} WHERE {$sql}");
     $count = $rt['sum'];
     $page < 1 && ($page = 1);
     $limit = S::sqlLimit(($page - 1) * $nums, $nums);
     $sql .= ' ORDER BY postdate DESC ';
     $sql .= $_POST['direct'] ? " LIMIT {$nums}" : $limit;
     $query = $db->query("SELECT fid,pid,tid,author,authorid,content,postdate,userip FROM {$pw_posts} {$forceIndex} WHERE {$sql}");
 }
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:31,代码来源:superdel.php

示例5: recountTopic

 function recountTopic($read, $ifdel, $recycle)
 {
     global $db_anonymousname, $timestamp;
     $ret = 0;
     $tid = $read['tid'];
     $pw_posts = GetPtable($read['ptable']);
     $replies = $this->db->get_value("SELECT COUNT(*) AS replies FROM {$pw_posts} WHERE tid='{$tid}' AND ifcheck='1'");
     if (!$replies) {
         $read['anonymous'] && ($read['author'] = $db_anonymousname);
         if ($ifdel) {
             if ($recycle) {
                 //$this->db->update("UPDATE pw_threads SET fid='0',ifshield='0' WHERE tid='$tid'");
                 pwQuery::update('pw_threads', 'tid = :tid', array($tid), array('fid' => 0, 'ifshield' => 0));
             } else {
                 //* $threadManager = L::loadClass("threadmanager", 'forum');
                 //* $threadManager->deleteByThreadId($read['fid'], $tid);
                 $threadService = L::loadclass('threads', 'forum');
                 $threadService->deleteByThreadId($tid);
                 Perf::gatherInfo('changeThreadWithForumIds', array('fid' => $read['fid']));
                 $pw_tmsgs = GetTtable($tid);
                 //* $this->db->update("DELETE FROM $pw_tmsgs WHERE tid='$tid'");
                 pwQuery::delete($pw_tmsgs, 'tid=:tid', array($tid));
             }
             $ret = 1;
         } else {
             $pwSQL = array('replies' => 0, 'lastposter' => $read['author']);
             !($read['lastpost'] > $timestamp || $read['locked'] > 2) && ($pwSQL['lastpost'] = $read['postdate']);
             //$this->db->update("UPDATE pw_threads SET " . S::sqlSingle($pwSQL) . " WHERE tid=" . S::sqlEscape($tid));
             pwQuery::update('pw_threads', 'tid = :tid', array($tid), $pwSQL);
         }
     } else {
         $pt = $this->db->get_one("SELECT postdate,author,anonymous FROM {$pw_posts} WHERE tid='{$tid}' ORDER BY postdate DESC LIMIT 1");
         $pt['anonymous'] && ($pt['author'] = $db_anonymousname);
         $pwSQL = array('replies' => $replies, 'lastposter' => $pt['author']);
         !($read['lastpost'] > $timestamp || $read['locked'] > 2) && ($pwSQL['lastpost'] = $pt['postdate']);
         //$this->db->update("UPDATE pw_threads SET " . S::sqlSingle($pwSQL) . " WHERE tid=" . S::sqlEscape($tid));
         pwQuery::update('pw_threads', 'tid = :tid', array($tid), $pwSQL);
     }
     return $ret;
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:40,代码来源:delarticle.class.php

示例6: recycle

function recycle($ids)
{
    global $db, $fid;
    $delids = array();
    foreach ($ids as $key => $value) {
        if (is_numeric($value)) {
            $delids[] = $value;
        }
    }
    if ($delids) {
        $delids = S::sqlImplode($delids);
    } else {
        Showmsg('forumcp_recycle_nodata');
    }
    $query = $db->query("SELECT r.*,t.special,t.ifshield,t.ifupload,t.ptable,t.replies,t.fid AS ckfid FROM pw_recycle r LEFT JOIN pw_threads t ON r.tid=t.tid WHERE r.tid IN ({$delids}) AND r.pid='0' AND r.fid=" . S::sqlEscape($fid));
    $taid_a = $ttable_a = $ptable_a = array();
    $delids = $pollids = $actids = $delaids = $rewids = $ids = array();
    while (@extract($db->fetch_array($query))) {
        $ids[] = $tid;
        ($ifshield != '2' || $replies == '0' || $ckfid == '0') && ($delids[] = $tid);
        $special == 1 && ($pollids[] = $tid);
        $special == 2 && ($actids[] = $tid);
        $special == 3 && ($rewids[] = $tid);
        if ($ifshield != '2' || $replies == '0' || $ckfid == '0') {
            $ptable_a[$ptable] = 1;
            $ttable_a[GetTtable($tid)][] = $tid;
        }
        if ($ifupload) {
            $taid_a[GetTtable($tid)][] = $tid;
            if ($ifshield != '2' || $replies == '0' || $ckfid == '0') {
                $pw_posts = GetPtable($ptable);
                $query2 = $db->query("SELECT aid FROM {$pw_posts} WHERE tid=" . S::sqlEscape($tid) . " AND aid!=''");
                while (@extract($db->fetch_array($query2))) {
                    if (!$aid) {
                        continue;
                    }
                    $attachs = unserialize(stripslashes($aid));
                    foreach ($attachs as $key => $value) {
                        is_numeric($key) && ($delaids[] = $key);
                        pwDelatt($value['attachurl'], $GLOBALS['db_ifftp']);
                        $value['ifthumb'] && pwDelatt("thumb/{$value['attachurl']}", $GLOBALS['db_ifftp']);
                    }
                }
            }
        }
    }
    foreach ($taid_a as $pw_tmsgs => $value) {
        $value = S::sqlImplode($value);
        $query = $db->query("SELECT aid FROM {$pw_tmsgs} WHERE tid IN({$value}) AND aid!=''");
        while (@extract($db->fetch_array($query))) {
            if (!$aid) {
                continue;
            }
            $attachs = unserialize(stripslashes($aid));
            foreach ($attachs as $key => $value) {
                is_numeric($key) && ($delaids[] = $key);
                pwDelatt($value['attachurl'], $GLOBALS['db_ifftp']);
                $value['ifthumb'] && pwDelatt("thumb/{$value['attachurl']}", $GLOBALS['db_ifftp']);
            }
        }
    }
    if ($pollids) {
        $pollids = S::sqlImplode($pollids);
        $db->update("DELETE FROM pw_polls WHERE tid IN({$pollids})");
    }
    if ($actids) {
        $actids = S::sqlImplode($actids);
        $db->update("DELETE FROM pw_activity WHERE tid IN({$actids})");
        $db->update("DELETE FROM pw_actmember WHERE actid IN({$actids})");
    }
    if ($rewids) {
        $rewids = S::sqlImplode($rewids);
        $db->update("DELETE FROM pw_reward WHERE tid IN({$rewids})");
    }
    if ($delaids) {
        $pw_attachs = L::loadDB('attachs', 'forum');
        $pw_attachs->delete($delaids);
    }
    //$delids  = S::sqlImplode($delids);
    if ($delids) {
        # $db->update("DELETE FROM pw_threads	WHERE tid IN($delids)");
        # ThreadManager
        //* $threadManager = L::loadClass("threadmanager", 'forum');
        //* $threadManager->deleteByThreadIds($fid,$delids);
        $threadService = L::loadclass('threads', 'forum');
        $threadService->deleteByThreadIds($delids);
        Perf::gatherInfo('changeThreadWithForumIds', array('fid' => $fid));
    }
    foreach ($ttable_a as $pw_tmsgs => $val) {
        //* $val = S::sqlImplode($val);
        //* $db->update("DELETE FROM $pw_tmsgs WHERE tid IN($val)");
        pwQuery::delete($pw_tmsgs, 'tid IN(:tid)', array($val));
    }
    foreach ($ptable_a as $key => $val) {
        $pw_posts = GetPtable($key);
        //$db->update("DELETE FROM $pw_posts WHERE tid IN($delids)");
        pwQuery::delete($pw_posts, 'tid IN(:tid)', array($delids));
    }
    delete_tag(S::sqlImplode($delids));
    if ($ids) {
//.........这里部分代码省略.........
开发者ID:sherlockhouse,项目名称:aliyun,代码行数:101,代码来源:forumcp.php

示例7: delforum

function delforum($fid)
{
    global $db, $db_guestdir, $db_guestthread, $db_guestread;
    $foruminfo = $db->get_one("SELECT fid,fup,forumadmin FROM pw_forums WHERE fid=" . S::sqlEscape($fid));
    //$db->update("DELETE FROM pw_forums WHERE fid=".S::sqlEscape($fid));
    pwQuery::delete('pw_forums', 'fid=:fid', array($fid));
    //* $db->update("DELETE FROM pw_forumdata WHERE fid=".S::sqlEscape($fid));
    pwQuery::delete('pw_forumdata', 'fid=:fid', array($fid));
    $db->update("DELETE FROM pw_forumsextra WHERE fid=" . S::sqlEscape($fid));
    $db->update("DELETE FROM pw_permission WHERE fid>'0' AND fid=" . S::sqlEscape($fid));
    if ($foruminfo['forumadmin']) {
        $userService = L::loadClass('UserService', 'user');
        /* @var $userService PW_UserService */
        $forumadmin = explode(",", $foruminfo['forumadmin']);
        foreach ($forumadmin as $key => $value) {
            if ($value) {
                $gid = $userService->getByUserName($value);
                if ($gid['groupid'] == 5 && !ifadmin($value)) {
                    $userService->update($gid['uid'], array('groupid' => -1));
                    admincheck($gid['uid'], $value, $gid['groupid'], '', 'delete');
                }
            }
        }
    }
    if ($db_guestthread || $db_guestread) {
        require_once R_P . 'require/guestfunc.php';
        $db_guestthread && deldir(D_P . "{$db_guestdir}/T_{$fid}");
    }
    //* P_unlink(D_P."data/forums/fid_{$fid}.php");
    pwCache::deleteData(D_P . "data/forums/fid_{$fid}.php");
    require_once R_P . 'require/functions.php';
    require_once R_P . 'require/updateforum.php';
    $pw_attachs = L::loadDB('attachs', 'forum');
    $ttable_a = $ptable_a = array();
    $query = $db->query("SELECT tid,replies,ptable FROM pw_threads WHERE fid=" . S::sqlEscape($fid));
    while ($tpc = $db->fetch_array($query)) {
        $tid = $tpc['tid'];
        $ttable_a[GetTtable($tid)][] = $tid;
        $ptable_a[$tpc['ptable']] = 1;
        $db_guestread && clearguestcache($tid, $tpc['replies']);
        if ($attachdb = $pw_attachs->getByTid($tid)) {
            delete_att($attachdb);
        }
    }
    pwFtpClose($GLOBALS['ftp']);
    foreach ($ttable_a as $pw_tmsgs => $val) {
        //* $val = S::sqlImplode($val,false);
        //* $db->update("DELETE FROM $pw_tmsgs WHERE tid IN($val)");
        pwQuery::delete($pw_tmsgs, 'tid IN(:tid)', array($val));
    }
    # $db->update("DELETE FROM pw_threads WHERE fid=".S::sqlEscape($fid));
    # ThreadManager
    //* $threadManager = L::loadClass("threadmanager", 'forum');
    //* $threadManager->deleteByForumId($fid);
    $threadService = L::loadclass('threads', 'forum');
    $threadService->deleteByForumId($fid);
    //* Perf::gatherInfo('changeThreadWithForumIds', array('fid'=>$fid));
    foreach ($ptable_a as $key => $val) {
        $pw_posts = GetPtable($key);
        //$db->update("DELETE FROM $pw_posts WHERE fid=".S::sqlEscape($fid));
        pwQuery::delete($pw_posts, 'fid=:fid', array($fid));
    }
    updateforum($foruminfo['fup']);
}
开发者ID:jechiy,项目名称:PHPWind,代码行数:64,代码来源:setforum.php

示例8: deleteThreadsHander

function deleteThreadsHander($tidarray)
{
    global $windid, $manager, $groupid, $SYSTEM;
    PostCheck();
    (!$SYSTEM['superright'] || !$SYSTEM['delatc']) && Showmsg('mawhole_right');
    if ($tidarray == "") {
        Showmsg('data_error');
    }
    $tidarray = explode("|", $tidarray);
    if (!is_array($tidarray)) {
        Showmsg('data_error');
    }
    $forums = $threadIds = array();
    foreach ($tidarray as $v) {
        if ($v == "") {
            continue;
        }
        if (intval($v) < 0) {
            continue;
        }
        $threadIds[] = $v;
    }
    /**
    	$threadManager = L::loadclass('threadmanager', 'forum');
    	foreach($forums as $fid=>$threadIds){
    		$threadManager->deleteByThreadIds($fid,$threadIds);
    	}**/
    $threadService = L::loadclass('threads', 'forum');
    foreach ($forums as $fid => $_threadIds) {
        $threadService->deleteByThreadIds($_threadIds);
        Perf::gatherInfo('changeThreadWithForumIds', array('fid' => $fid));
    }
    $delarticle = L::loadClass('DelArticle', 'forum');
    $delarticle->delTopicByTids($threadIds, true);
    echo getLangInfo('other', 'search_manager_success');
    ajax_footer();
}
开发者ID:jechiy,项目名称:PHPWind,代码行数:37,代码来源:mawhole.php

示例9: _getThreadList

 function _getThreadList()
 {
     $threadlist = L::loadclass("threadlist");
     return $threadlist;
 }
开发者ID:adi00,项目名称:wumaproject,代码行数:5,代码来源:updatecache.php

示例10: exit

<?php

!defined('P_W') && exit('Forbidden');
/**
 * 门户前台管理入口
 * @author liuhui @2010-3-10
 */
S::gp(array("invokename", "channelid", "action", "selid"));
$invokename = pwConvert(urldecode($invokename), $db_charset, 'utf8');
$levelService = L::loadclass("AreaLevel", 'area');
if (empty($action)) {
    /*门户管理操作*/
    $portalPageService = L::loadClass('portalpageservice', 'area');
    $channelid = $portalPageService->getSignForManage($channelid);
    $invokeService = L::loadClass('invokeservice', 'area');
    $invokeInfo = $invokeService->getInvokeByName($invokename);
    if (!$invokeInfo) {
        echo $levelService->language("area_no_invoke");
    }
    $invokename = trim(strip_tags($invokename));
    $level = $levelService->getAreaLevel($winduid, $channelid, $invokename);
    if ($level) {
        //获取频道名称
        list($title, $baseUrl) = array("模块内容管理-" . $invokeInfo['title'], "mode.php?m=area&q=manage&invokename=" . urlencode($invokename) . "&channelid=" . $channelid);
        require_once areaLoadFrontView('area_dialog');
    } else {
        echo $levelService->language("area_no_level");
    }
    ajax_footer();
} elseif ($action == "pushto") {
    /*内容推送/推荐操作*/
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:m_dialog.php

示例11: channelService

 function channelService()
 {
     return L::loadclass("channelService", 'area');
 }
开发者ID:jechiy,项目名称:PHPWind,代码行数:4,代码来源:areamanage.class.php

示例12: runJob

function runJob()
{
    global $db_job_isopen, $winduid, $groupid;
    if (!$db_job_isopen || !$winduid) {
        /*是否开启用户任务*/
        return;
    }
    $taskClass = L::loadclass('job');
    $taskClass->run($winduid, $groupid);
}
开发者ID:adi00,项目名称:wumaproject,代码行数:10,代码来源:global.php

示例13: exit

<?php

!defined('P_W') && exit('Forbidden');
$overPrintClass = L::loadclass("overprint", 'forum');
if (empty($action)) {
    $relatedSelect = $overPrintClass->getRelatedSelect('');
    $isOpenSelect = $overPrintClass->getStatusSelect('');
    $iconPath = $overPrintClass->getIconPath();
    $overprints = $overPrintClass->getOverPrints();
    $overprintlists = array();
    foreach ($overprints as $overprint) {
        $list = array();
        $name = "list[" . $overprint['id'] . "][related]";
        $isopen = "list[" . $overprint['id'] . "][isopen]";
        $list['select'] = $overPrintClass->getRelatedSelect($overprint['related'], $name, $name);
        $list['isopen'] = $overprint['isopen'] > 0 ? "启用" : "关闭";
        $list['open'] = $overprint['isopen'] > 0 ? "checked" : "";
        $overprintlists[] = array_merge($overprint, $list);
    }
    $icons = $overPrintClass->getOverPrintIcons();
    include PrintEot('overprint');
    exit;
} elseif ($action == "add") {
    S::gp(array('title', 'icon', 'related', 'isopen'));
    $title = trim($title);
    $icon = trim($icon);
    $related = intval($related);
    $isopen = in_array($isopen, array(0, 1)) ? $isopen : 0;
    $title == "" && adminmsg("主题印戳 关联名称不能为空");
    ($icon == "" || !$overPrintClass->checkIcon($icon)) && adminmsg("请选择主题印戳图标或图标格式不正确");
    $data = array();
开发者ID:jechiy,项目名称:PHPWind,代码行数:31,代码来源:overprint.php

示例14: substr_replace

     $keywhere = substr_replace($keywhere, "", 0, 3);
     $sql .= " AND ({$keywhere}) ";
 }
 if ($userip) {
     $userip = str_replace('*', '%', $userip);
     $sql .= " AND (userip LIKE " . pwEscape($userip) . ")";
 }
 if ($tcounts) {
     $sql .= " AND char_length(content)>" . pwEscape($tcounts);
 } elseif ($counts) {
     $sql .= " AND char_length(content)<" . pwEscape($counts);
 }
 $nums = is_numeric($nums) ? $nums : 20;
 if ($sphinx && $keyword && $db_sphinx['isopen'] == 1 && strpos($keyword, '*') === false) {
     $index = $ptable ? 'posts1index' : 'postsindex';
     $sphinx = L::loadclass("search");
     $result = $sphinx->sphinxSearch($keyword, "OR", $index, $digest, $fid, $exclude, "lastpost", "DESC", $authorids, $pstart, $pend, "", $nums);
     if ($result === false) {
         adminmsg('search_keyword_empty');
     }
     $count = $result[0];
     $query = $db->query("SELECT fid,pid,tid,author,authorid,content,postdate,userip FROM {$pw_posts} WHERE pid in (" . $result[1] . ")  ORDER BY postdate DESC ");
 } else {
     $rt = $db->get_one("SELECT COUNT(*) AS sum FROM {$pw_posts} WHERE {$sql}");
     $count = $rt['sum'];
     $page < 1 && ($page = 1);
     $limit = pwLimit(($page - 1) * $nums, $nums);
     $sql .= ' ORDER BY postdate DESC ';
     $sql .= $_POST['direct'] ? " LIMIT {$nums}" : $limit;
     $query = $db->query("SELECT fid,pid,tid,author,authorid,content,postdate,userip FROM {$pw_posts} WHERE {$sql}");
 }
开发者ID:adi00,项目名称:wumaproject,代码行数:31,代码来源:superdel.php

示例15: Update_ol

$guidename .= " &raquo; <a href=\"read.php?tid={$tid}{$viewbbs}\">{$subject}</a>";
$forumtitle = '|' . $forumtitle;
/** Labs Code By cn0zz
if ($db_htmifopen) {
	$link_ref_canonical = ($_GET['fpage'] || $_GET['uid'] || $_GET['skinco']) ? "read{$db_dir}tid-$tid".($page>1 ? "-page-$page" : '').$db_ext : '';
} else {
	$link_ref_canonical = ($_GET['fpage'] || $_GET['uid'] || $_GET['skinco']) ? "read.php?tid=$tid".($page>1 ? "&page=$page" : '') : '';
}
*/
require_once R_P . 'require/header.php';
require_once R_P . 'require/showimg.php';
Update_ol();
$readdb = $authorids = array();
//主题印戳
if ($forumset['overprint']) {
    $overPrintService = L::loadclass("overprint");
    $overprint = $overPrintService->getOverPrintIcon($read['overprint']);
}
if ($read['modelid'] || $foruminfo['modelid']) {
    require_once R_P . 'lib/posttopic.class.php';
    $postTopic = new postTopic($read);
}
if ($read['special'] > 20 || $foruminfo['pcid']) {
    require_once R_P . 'lib/postcate.class.php';
    $postCate = new postCate($read);
}
//分类信息主题帖
if ($read['modelid']) {
    $modelid = $read['modelid'];
    $topicvalue = $postTopic->getTopicvalue($read['modelid']);
    $initSearchHtml = $postTopic->initSearchHtml($read['modelid']);
开发者ID:adi00,项目名称:wumaproject,代码行数:31,代码来源:read.php


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