protected function getBoxStatus($data) { // get box status $this->WwoData['Status'] = 1; if (WBBCore::getUser()->userID) { $this->WwoData['Status'] = intval(WBBCore::getUser()->todayonlinebox); } else { if (WBBCore::getSession()->getVar('todayonlinebox') != false) { $this->WwoData['Status'] = WBBCore::getSession()->getVar('todayonlinebox'); } } }
protected function getBoxStatus($data) { // get box status $this->TopData['Status'] = 1; if (WBBCore::getUser()->userID) { $this->TopData['Status'] = intval(WBBCore::getUser()->topthanksgivingposts); } else { if (WBBCore::getSession()->getVar('topthanksgivingposts') != false) { $this->TopData['Status'] = WBBCore::getSession()->getVar('topthanksgivingposts'); } } }
protected function getBoxStatus($data) { // get box status $this->BoxData['Status'] = 1; if (WBBCore::getUser()->userID) { $this->BoxData['Status'] = intval(WBBCore::getUser()->profileLastVisitorsBox); } else { if (WBBCore::getSession()->getVar('profileLastVisitorsBox') != false) { $this->BoxData['Status'] = WBBCore::getSession()->getVar('profileLastVisitorsBox'); } } }
protected function getBoxStatus($data) { // get box status $this->threadLastPostsBoxData['Status'] = 1; if (WBBCore::getUser()->userID) { $this->threadLastPostsBoxData['Status'] = intval(WBBCore::getUser()->threadlastpostsbox); } else { if (WBBCore::getSession()->getVar('threadlastpostsbox') != false) { $this->threadLastPostsBoxData['Status'] = WBBCore::getSession()->getVar('threadlastpostsbox'); } } }
protected function getBoxStatus($data) { // get box status $this->BoxData['Status'] = 1; if (WBBCore::getUser()->userID) { $this->BoxData['Status'] = intval(WBBCore::getUser()->wbb3addonsBox01); } else { if (WBBCore::getSession()->getVar('wbb3addonsBox01') != false) { $this->BoxData['Status'] = WBBCore::getSession()->getVar('wbb3addonsBox01'); } } }
protected function getBoxStatus($data) { // get box status $this->BoxData['Status'] = 1; if (WBBCore::getUser()->userID) { $this->BoxData['Status'] = intval(WBBCore::getUser()->downloadDatabaseBox); } else { if (WBBCore::getSession()->getVar('downloadDatabaseBox') != false) { $this->BoxData['Status'] = WBBCore::getSession()->getVar('downloadDatabaseBox'); } } }
protected function getBoxStatus($data) { // get box status $this->StickyTopicsData['Status'] = 1; if (WBBCore::getUser()->userID) { $this->StickyTopicsData['Status'] = intval(WBBCore::getUser()->stickyTopicsBox); } else { if (WBBCore::getSession()->getVar('stickyTopicsBox') != false) { $this->StickyTopicsData['Status'] = WBBCore::getSession()->getVar('stickyTopicsBox'); } } }
protected function getBoxStatus($data) { // get box status $this->BoardlistData['Status'] = 1; if (WBBCore::getUser()->userID) { $this->BoardlistData['Status'] = intval(WBBCore::getUser()->listboards); } else { if (WBBCore::getSession()->getVar('listboards') != false) { $this->BoardlistData['Status'] = WBBCore::getSession()->getVar('listboards'); } } }
/** * @see CacheBuilder::getData() */ public function getData($cacheResource) { $data = array(); $boardIDs = STICKYTOPICSBOX_BOARDIDS; $limit = STICKYTOPICSBOX_NUMOFENTRIES; $showClosed = STICKYTOPICSBOX_SHOWCLOSED; $sortField = STICKYTOPICSBOX_SORTFIELD; $permBoardIDs = Board::getAccessibleBoards(); if (empty($boardIDs) || empty($permBoardIDs)) { return $data; } $sql = "SELECT *" . "\n FROM wbb" . WBB_N . "_thread" . "\n WHERE isSticky = 1" . "\n AND boardID IN(" . $boardIDs . ")" . "\n AND boardID IN(" . $permBoardIDs . ")" . "\n AND isDeleted = 0" . "\n AND isDisabled = 0" . "\n AND movedThreadID = 0"; if (empty($showClosed)) { $sql .= "\n AND isClosed = 0"; } $sql .= " ORDER BY " . $sortField . " DESC" . "\n LIMIT " . $limit; $result = WBBCore::getDB()->sendQuery($sql); while ($row = WBBCore::getDB()->fetchArray($result)) { $data[] = $row; } return $data; }
/** * @see WCF::initSession() */ protected function initSession() { // start session require_once WBB_DIR . 'lib/system/session/WBBSessionFactory.class.php'; $factory = new WBBSessionFactory(); self::$sessionObj = $factory->get(); self::$userObj = self::getSession()->getUser(); }
public function getBirthdays($y, $m, $d = 0) { $month = intval($m); $day = intval($d); if ($day != 0 && $day < 10) { $day = '0' . $day; } $ret = array(); if ($month < 10) { $month = '0' . $month; } $optionID = intval(User::getUserOptionID('birthday')); if (!empty($optionID)) { $sql = "SELECT u.userID, u.username, uov.userOption" . $optionID . " AS BD" . "\n FROM wcf" . WCF_N . "_user_option_value uov" . "\n LEFT JOIN wcf" . WCF_N . "_user u ON (u.userID = uov.userID)" . "\n WHERE 1 = 1"; if ($day == 0) { $sql .= "\n AND uov.userOption" . $optionID . " LIKE '____-" . $month . "-__'"; } else { $sql .= "\n AND uov.userOption" . $optionID . " LIKE '____-" . $month . "-" . $day . "'"; } $result = WBBCore::getDB()->sendQuery($sql); while ($row = WBBCore::getDB()->fetchArray($result)) { list($by, $bm, $bd) = preg_split('/\\-/', $row['BD'], 3); $by = intval($by); $bm = intval($bm); $bd = intval($bd); if ($y >= $by) { if (!$by > 0) { $age = null; } else { $age = $y - $by; } if (isset($ret[$bd])) { $ret[$bd] .= ", "; } else { $ret[$bd] = ''; } $ret[$bd] .= StringUtil::encodeHTML($row['username']) . ($age ? ' (' . $age . ')' : ''); } } } return $ret; }
protected function getBoxStatus($data) { // get box status $this->BoxData['Status'] = 1; if (WBBCore::getUser()->userID) { $this->BoxData['Status'] = intval(WBBCore::getUser()->monthlyCalendarBox); } else { if (WBBCore::getSession()->getVar('monthlyCalendarBox') != false) { $this->BoxData['Status'] = WBBCore::getSession()->getVar('monthlyCalendarBox'); } } }
protected function getBoxStatus($data) { // get box status $this->spnrbData['Status'] = 1; if (WBBCore::getUser()->userID) { $this->spnrbData['Status'] = intval(WBBCore::getUser()->simplePieNewsreaderBox); } else { if (WBBCore::getSession()->getVar('simplePieNewsreaderBox') != false) { $this->spnrbData['Status'] = WBBCore::getSession()->getVar('simplePieNewsreaderBox'); } } }