private function FindPageInDB() { $thisUser = new USER($_SESSION['userID']); $getPage = parent::select('modules', '*', "`moduleTitle`='{$this->MODULE}' AND `isEnabled`='1' AND (`adminPanel`='1' OR `adminPanel`='2') AND (`accessGroup` IN ('" . $thisUser->GROUP . "') OR `accessUsers` IN ('" . $thisUser->USERID . "'))", ''); if (count($getPage) == 0) { header("HTTP/1.0 404 Not Found"); require_once dirname(__FILE__) . '/../../common/views/404.php'; exit; } elseif (!empty($this->PAGE_)) { $getPage = parent::select('modules', '*', "`moduleTitle`='{$this->MODULE}' AND `isEnabled`='1' AND `adminPanel`='1' AND (`accessGroup` IN ('" . $thisUser->GROUP . "') OR `accessUsers` IN ('" . $thisUser->USERID . "'))", ''); if (count($getPage) == 0) { header("HTTP/1.0 404 Not Found"); require_once dirname(__FILE__) . '/../../common/views/404.php'; exit; } else { self::$PAGE = $getPage[0]; } } else { self::$PAGE = $getPage[0]; } }