コード例 #1
0
ファイル: GetsClass.php プロジェクト: jenia-buianov/buianov
 public static function ViewBlock($ID)
 {
     $ID = htmlspecialchars($ID, ENT_QUOTES);
     $getBlock = parent::select('blocks', '`blockContent`', "`formID`='{$ID}' AND `isEnabled`='1'");
     if (count($getBlock) > 0) {
         self::$TEXT = htmlspecialchars_decode(urldecode($getBlock['blockContent']));
         return self::getIncludes(self::getFunction($this->URL()));
     }
 }
コード例 #2
0
 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];
     }
 }