/** * 根据日志ID数组获得日志信息 * @return array */ function _getDataByTags() { if (empty($this->tags)) { return array(); } $articleDB = C::loadDB('article'); /* @var $articleDB PW_ArticleDB */ return $articleDB->getArticlesByIds($this->tags); }
function init($id) { $this->_cid = $id; require_once R_P . 'mode/cms/require/core.php'; $articleDB = C::loadDB('article'); $article = $articleDB->get($this->_cid); empty($article) && Showmsg('data_error'); $this->_url = $this->_url . "&id=" . $this->_cid; $title = $content = '我发现了一篇文章' . sprintf("[url=%s] %s [/url]", urlRewrite($this->_url), $article['subject']) . ',特别推荐。'; $descrip = $article['descrip']; $mailSubject = getLangInfo('app', 'cms_recommend'); $mailContent = getLangInfo('app', 'ajax_sendweibo_cmsinfo', array('title' => $title, 'descrip' => $descrip)); $this->_content = $content; $this->_mailSubject = $mailSubject; $this->_mailContent = $mailContent; }
function _loadPurviewDAO() { return C::loadDB('purview'); }
/** * 文章栏目表DAO * @return unknown_type */ function getCmsColumnDao() { static $sCmsColumnDao; if (!$sCmsColumnDao) { require_once R_P . 'mode/cms/require/core.php'; $sCmsColumnDao = C::loadDB('Column'); } return $sCmsColumnDao; }
$colony = $newColony->getColonyById($active['cid']); if ($active['poster']) { list($poster) = geturl("{$active['poster']}", 'lf'); } else { $poster = $imgpath . '/defaultactive.jpg'; } $collection['uid'] = $active['uid']; $collection['link'] = $db_bbsurl . '/apps.php?q=group&a=active&job=view&cyid=' . $colony['id'] . '&id=' . $active['id']; $collection['active']['type'] = $type; $collection['active']['name'] = $active['title']; $collection['active']['image'] = $poster; $type = 'active'; } elseif ($type == 'cms') { define('M_P', 1); require_once R_P . 'mode/cms/require/core.php'; $articleDB = C::loadDB('article'); $article = $articleDB->get($id); empty($article) && Showmsg('data_error'); $collection['uid'] = $article['userid']; $collection['link'] = $db_bbsurl . '/mode.php?m=cms&q=view&id=' . $id; $collection['cms']['subject'] = $article['subject']; } elseif ($type == 'postfavor') { //* $threadsService = L::loadClass('Threads' , 'forum'); /* @var $diaryService PW_Diary */ //* $favor = $threadsService->getThreads($id); $_cacheService = Perf::gatherCache('pw_threads'); $favor = $_cacheService->getThreadByThreadId($id); empty($favor) && Showmsg('data_error'); $collection['uid'] = $favor['authorid']; $collection['lastpost'] = $favor['lastpost']; $collection['link'] = $db_bbsurl . '/read.php?tid=' . $id; $collection['postfavor']['subject'] = $favor['subject'];
function loadColumnDB() { return C::loadDB($this->_module_name); }
/** *加载dao * * @return PW_CmsCommentDB */ function _getCmsCommentDB() { return C::loadDB('CmsComment'); }
function _getArticleExtendDAO() { return C::loadDB('articleextend'); }
/** *加载dao * * @return PW_CmsCommentDB */ function _getCmsCommentReplyDB() { return C::loadDB('CmsCommentReply'); }
function _getCmsAttachDAO() { return C::loadDB('cmsattach'); }