/** * @Title: getNewestBbs * @Description: todo(获取论坛中最新的帖子,分享) * @$num 数量 默认调取10条 * @author qchlian * @date 2013-12-27 下午14:39:42 * return size */ public function getNewestBbs($num = 10) { import('@.ORG.UcenterBbs', '', $ext = '.php'); $objUcenterBbs = new UcenterBbs(); $list = $objUcenterBbs->getNewestBbs($num); return $list; }
/** * @Title: setBBSCookie * @Description: todo(在signin方法中调用,设置BBS的Cookie) * @param unknown_type $authInfo * @author liminggang * @date 2014-8-28 下午6:53:36 * @throws */ private function setBBSCookie($authInfo) { import('@.ORG.UcenterBbs', '', $ext = '.php'); $objUcenterBbs = new UcenterBbs(); $bbsuserinfo = $objUcenterBbs->login($authInfo['account'], $authInfo['id'], $authInfo['password']); if (!$bbsuserinfo) { $bbsuserinfo = $objUcenterBbs->register($authInfo['account'], $authInfo['id'], 5, $authInfo['password'], $authInfo['email'], $timestamp = 0); } Cookie::set("bbsuserinfo", $bbsuserinfo, C('COOKIE_EXPIRE')); }
/** * @Title: forumInformation * @Description: todo(论坛新帖) * @author jiangx * @date 2013-11-22 下午4:35:17 * @throws */ public function forumInformation($name = "", $sort, $color) { $this->assign('sort', $sort); if (!$name) { $name = "论坛资讯"; } $this->assign('name', $name); $this->assign('color', $color); import('@.ORG.UcenterBbs', '', $ext = '.php'); $UcenterBbs = new UcenterBbs(); $newest = $UcenterBbs->getNewestBbs(); $this->assign('newest', $newest); return $this->fetch("MisSystemPanelMethod:forumInformation"); }