function _loadColumnService() { return C::loadClass('columnservice'); }
function __construct() { $this->_error = C::loadClass('error'); }
/** * 根据类型获得栏目数据 * @param string $type * @param int $columnid * @param int $num */ function _getData($columnid, $num) { $columnService = C::loadClass('columnservice'); return $columnService->getSubColumnsById($columnid, $num); }
/** * @param string $sourceType * @return Object */ function sourceFactory($sourceType) { $sourceTypeConfig = $this->getSourceTypeConfig(); if (isset($sourceTypeConfig[$sourceType])) { $className = $sourceType . 'sourcetype'; return C::loadClass($className, 'sourcetype'); } return C::loadClass('nonesourcetype', 'sourcetype'); }
/** * @param string $type * @return Object */ function _getDatanalyseServiceByType($type) { $type = $this->_filterType($type); return C::loadClass(strtolower($type) . 'analyse', 'datanalyse/datanalyse'); }
} elseif ($action == 'edit') { S::gp(array('id', 'page')); $articleModule = $articleService->getArticleModule($id); $userid = $articleModule->userId; if (!checkEditPurview($windid, $articleModule->columnId) && $userid != $winduid) { Showmsg('你没有权限编辑本栏目的文章'); } if (!$step) { if (!$page) { $page = 1; } if (!is_object($articleModule)) { Showmsg('文章不存在'); } $pagePosition = getPosition($articleModule->columnId, '', '', $cms_sitename); $columnService = C::loadClass('columnservice'); /* @var $columnService PW_columnService */ $columns = $columnService->getAllOrderColumns(0, $windid); $attach = initAttach($articleModule->attach); $postdate = get_date($articleModule->postDate); $atc_content = $articleModule->getPageContent($page); $articleModule->showError(); $pages = $articleModule->getPages($page, CMS_BASEURL . 'q=post&action=edit&id=' . $id . '&'); list($attachAllow, $imageAllow) = initFileTypeInfo($db_uploadfiletype); require_once M_P . 'require/header.php'; } else { S::gp(array('cms_subject', 'atc_content', 'cms_descrip'), 'P', 0); S::gp(array('cms_sourcetype', 'cms_sourceid', 'cid', 'cms_jumpurl', 'cms_author', 'cms_frominfo', 'cms_fromurl', 'cms_relate', 'flashatt', 'oldatt_desc', 'addnewpage', 'cms_timelimit')); $cms_timelimit = $cms_timelimit && (isGM($windid) || checkEditPurview($windid)) ? PwStrtoTime($cms_timelimit) : $timestamp; $cms_jumpurl = $cms_jumpurl && (isGM($windid) || checkEditPurview($windid)) ? $cms_jumpurl : ''; PostCheck();
/** * 加载db类 * @param $className */ function loadDB($dbName, $dir = '') { parent::_loadBaseDB(); return C::loadClass($dbName . 'DB', parent::_formatDir($dir) . 'db'); }
<?php !defined('P_W') && exit('Forbidden'); C::loadClass('sourcetype', 'base', false); class PW_NoneSourceType extends PW_SourceType { function getSourceData($sourceId) { return array(); } function getSourceUrl($sourceId) { return ''; } function getSourceType() { return ''; } }
Showmsg('undefined_action'); } $cmscommentreplyservice = C::loadClass('cmscommentreplyservice'); $replyList = $cmscommentreplyservice->getCommentsByCommentid($commentid); require_once PrintEot('cmsreply'); ajax_footer(); } if ($type == 'delreply') { S::gp(array('replyid', 'commentid', 'P', 2)); if ($replyid < 1 || $commentid < 1) { Showmsg('undefined_action'); } $cmscomment = C::loadClass('cmscommentservice'); $data = $cmscomment->getByCommentid($commentid); if (!$data) { Showmsg('data_error'); } $cmscommentreplyservice = C::loadClass('cmscommentreplyservice'); $replyData = $cmscommentreplyservice->getByReplyid($replyid); $articleService = C::loadClass('articleservice'); $articleModule = $articleService->getArticleModule($data['article_id']); if ($replyData['uid'] != $winduid && !checkEditPurview($windid, $articleModule->columnId)) { Showmsg('您没有权限'); } if (!$cmscommentreplyservice->deleteByReplyid($replyid)) { echo "fail"; } $cmscomment->updateReplynumByCommentid('-1', $commentid); echo "success"; ajax_footer(); }
$columnService = C::loadClass('columnservice'); /* @var $columnService PW_columnService */ $subColumns = $columnService->getAllOrderColumns($column); $subColumnIds = array_keys($subColumns); if (isGM($windid) || checkEditPurview($windid, $column)) { $articleCount = $articleService->searchArticleCount($subColumnIds, '', '', 1); $page = validatePage($page, $articleCount); $articleList = $articleService->searchAtricles($subColumnIds, '', '', 1, '', '', ($page - 1) * $db_perpage, $db_perpage); } else { $articleCount = $articleService->searchArticleCount($subColumnIds, '', '', 1, '', $timestamp); $page = validatePage($page, $articleCount); $articleList = $articleService->searchAtricles($subColumnIds, '', '', 1, '', $timestamp, ($page - 1) * $db_perpage, $db_perpage); } $pages = numofpage($articleCount, $page, ceil($articleCount / $db_perpage), $basename . 'q=list&column=' . $column . '&'); $pageCache = L::loadClass('pagecache', 'pagecache'); $pageCacheConfig = C::loadClass('pagecacheconfiglist', 'pagecache'); $pageCache->init($pageCacheConfig); $tmpHotArticle = $pageCache->getData('hotArticle'); $hotArticle = $articleService->filterArticles($tmpHotArticle); list($columns, $columnInfo) = $columnService->getCurrentAndSubColumns($column); if (!S::isArray($columns)) { list($columns, $columnInfo) = $columnService->getCurrentAndSubColumns($columnInfo['parent_id']); } /* update hits */ /*$hitfile = D_P . "data/bbscache/cms_hits.txt"; $hitsize = @filesize($hitfile); if ($hitsize && $hitsize > 1024) { updateArticleHits(); }*/ $pagePosition = getPosition($column, '', '', $cms_sitename); $_definedSeo = array('title' => $subColumns[$column]['seotitle'], 'metaDescription' => $subColumns[$column]['seodesc'], 'metaKeywords' => $subColumns[$column]['seokeywords']);
function loadArticleService() { return C::loadClass('articleservice'); }
$winduid = $winddb['uid']; $groupid = $winddb['groupid']; $groupid == '-1' && ($groupid = $winddb['memberid']); $userrvrc = round($winddb['rvrc'] / 10, 1); $windid = $winddb['username']; if (file_exists(D_P . "data/groupdb/group_{$groupid}.php")) { //* require_once pwCache::getPath(S::escapePath(D_P . "data/groupdb/group_$groupid.php")); pwCache::getData(S::escapePath(D_P . "data/groupdb/group_{$groupid}.php")); } else { //* require_once pwCache::getPath(D_P . "data/groupdb/group_1.php"); pwCache::getData(D_P . "data/groupdb/group_1.php"); } } define('FX', 1); } $cmsAttachService = C::loadClass('cmsattachservice'); $attach = $cmsAttachService->getAttachById($aid); if (!$attach) { Showmsg('job_attach_error'); } $fgeturl = $attach['attachurl']; $fileext = substr(strrchr($attach['attachurl'], '.'), 1); $filesize = 0; if (strpos($pwServer['HTTP_USER_AGENT'], 'MSIE') !== false && $fileext == 'torrent') { $attachment = 'inline'; } else { $attachment = 'attachment'; } $attach['name'] = trim(str_replace(' ', ' ', $attach['name'])); if ($db_charset == 'utf-8') { if (function_exists('mb_convert_encoding')) {
<?php !defined('M_P') && exit('Forbidden'); $USCR = 'square_weibo'; if (!$o_browseopen) { ObHeader('u.php'); } $act = S::getGP('act'); require_once R_P . 'u/require/core.php'; require_once R_P . 'require/showimg.php'; $thisbase = $basename; $squareService = C::loadClass('squareservice'); require_once M_P . 'require/header.php'; switch ($act) { case 'postlast': $postlast = $squareService->getLastPostUser(6); require_once PrintEot('m_browse_ajax'); ajax_footer(); break; case 'maxfans': $maxfans = $squareService->getFansDescUser(6); require_once PrintEot('m_browse_ajax'); ajax_footer(); break; case 'thread': $threadList = $squareService->getLastThread(20); require_once PrintEot('m_browse_ajax'); ajax_footer(); break; case 'weibo': $weiboList = $squareService->getWeiboLives(20);
function _getDatanalyseService() { return C::loadClass('cmsdatanalyseservice', 'datanalyse'); }
function updateArticleHitsDatanalyse($aid, $cid, $num) { $articleService = C::loadClass('articleservice'); /* @var $articleService PW_ArticleService */ $articleService->updateArticleHits($aid); if ((int) $num % 13 == 0) { updateDatanalyse($aid, 'article_' . $cid, (int) $num, true); } }
<?php !defined('P_W') && exit('Forbidden'); $baseUrl = $admin_file . "?adminjob=mode&admintype=cms_purview&"; $purviewService = C::loadClass('PurviewService'); /* @var $purviewService PW_PurviewService */ S::gp(array('action', 'page')); if (!$action) { $perPage = 20; S::gp(array('username')); $cmsPurviews = $purviewService->findAll($username, $page, $perPage); if (!$username) { $count = $purviewService->countPurview(); $pager = pwGetPager($count, $page, $perPage, $baseUrl); } $ajaxUrl = EncodeUrl($baseUrl); } elseif ($action == 'add') { S::gp(array('username', 'pid')); if (!empty($pid)) { $userpurview = $purviewService->findPurviewById($pid); } $superchecked = $userpurview['super'] ? "checked=checked" : ""; $columns = $purviewService->getAllColumns(); } elseif ($action == 'addsubmit') { S::gp(array('pid', 'username', 'columnids', 'super')); if (empty($username)) { Showmsg('用户名不能为空', $basename . '&action=add&pid=' . $pid); } if (!empty($columnids) && !is_array($columnids)) { Showmsg('非法操作', $basename . '&action=add&pid=' . $pid); }