@@ -1,9 +1,9 @@ |
||
| 1 | 1 | <?php |
| 2 | 2 | class Items extends Template { |
| 3 | - public function __construct( $_parameters ) { |
|
| 4 | - parent::__construct( $_parameters ); |
|
| 5 | - $this->tags["title"] = "JATE - Items"; |
|
| 6 | - $this->tags["content"] = $this->makePage(); |
|
| 3 | + public function __construct($_parameters) { |
|
| 4 | + parent::__construct($_parameters); |
|
| 5 | + $this->tags["title"] = "JATE - Items"; |
|
| 6 | + $this->tags["content"] = $this->makePage(); |
|
| 7 | 7 | } |
| 8 | 8 | public function makePage() { |
| 9 | 9 | jBlock(); |
@@ -1,5 +1,5 @@ discard block |
||
| 1 | 1 | <?php |
| 2 | - if(!isset($GLOBALS["JATEPath"])) |
|
| 2 | + if (!isset($GLOBALS["JATEPath"])) |
|
| 3 | 3 | $GLOBALS["JATEPath"] = []; |
| 4 | 4 | $commonLocations = array( |
| 5 | 5 | "bower_components/JATE/dist/", |
@@ -7,7 +7,7 @@ discard block |
||
| 7 | 7 | "../../dist/" |
| 8 | 8 | ); |
| 9 | 9 | foreach ($commonLocations as $i) |
| 10 | - if(file_exists($i."jate/coreEngine.php")) { |
|
| 10 | + if (file_exists($i."jate/coreEngine.php")) { |
|
| 11 | 11 | array_push($GLOBALS["JATEPath"], $i); |
| 12 | 12 | require_once($i."jate/coreEngine.php"); |
| 13 | 13 | break; |
@@ -4,15 +4,15 @@ |
||
| 4 | 4 | |
| 5 | 5 | //JATE SUFF |
| 6 | 6 | require_once (end($GLOBALS["JATEPath"])."jate/functions/requirer.php"); |
| 7 | - requireComponent ("functions/folder.php"); |
|
| 8 | - requireComponent ("modules/JConfig/JConfig.php"); |
|
| 9 | - requireComponent ("modules/Module/Module.php"); |
|
| 10 | - requireComponents ("functions"); |
|
| 11 | - requireModules ("modules"); |
|
| 7 | + requireComponent("functions/folder.php"); |
|
| 8 | + requireComponent("modules/JConfig/JConfig.php"); |
|
| 9 | + requireComponent("modules/Module/Module.php"); |
|
| 10 | + requireComponents("functions"); |
|
| 11 | + requireModules("modules"); |
|
| 12 | 12 | |
| 13 | 13 | //USER STUFF |
| 14 | - requireComponent ("config.php",false); |
|
| 15 | - requireModules ("modules",false); |
|
| 16 | - requireComponents ("bundles/models",false); |
|
| 17 | - requireComponents ("bundles/controllers",false); |
|
| 14 | + requireComponent("config.php", false); |
|
| 15 | + requireModules("modules", false); |
|
| 16 | + requireComponents("bundles/models", false); |
|
| 17 | + requireComponents("bundles/controllers", false); |
|
| 18 | 18 | ?> |
@@ -1,45 +1,45 @@ |
||
| 1 | 1 | <?php |
| 2 | - function requireComponent( $_path, $_local = true ) { |
|
| 2 | + function requireComponent($_path, $_local = true) { |
|
| 3 | 3 | $path = getJFolder($_path, $_local, debug_backtrace()); |
| 4 | - if(file_exists($path) && isPhp($path)) |
|
| 4 | + if (file_exists($path) && isPhp($path)) |
|
| 5 | 5 | jRequire($path, false, 0); |
| 6 | 6 | else |
| 7 | 7 | requireError($_path); |
| 8 | 8 | } |
| 9 | - function requireComponents( $_path, $_local = true ) { |
|
| 9 | + function requireComponents($_path, $_local = true) { |
|
| 10 | 10 | $path = getJFolder($_path, $_local, debug_backtrace()); |
| 11 | - if(file_exists($path)) { |
|
| 11 | + if (file_exists($path)) { |
|
| 12 | 12 | $files = subFolderFile($path); |
| 13 | 13 | foreach ($files as $i) { |
| 14 | - if(isPhp($path."/".$i)) |
|
| 14 | + if (isPhp($path."/".$i)) |
|
| 15 | 15 | requireComponent($path."/".$i, false, 0); |
| 16 | 16 | } |
| 17 | 17 | } else |
| 18 | 18 | requireError($_path); |
| 19 | 19 | } |
| 20 | - function requireError( $_path ) { |
|
| 20 | + function requireError($_path) { |
|
| 21 | 21 | global $DEBUG; |
| 22 | - if( $DEBUG == 1 ) |
|
| 22 | + if ($DEBUG == 1) |
|
| 23 | 23 | echo "Error load ($_path)<br>"; |
| 24 | 24 | } |
| 25 | - function isPhp ( $_file ) { |
|
| 26 | - if(!is_file($_file)) return false; |
|
| 25 | + function isPhp($_file) { |
|
| 26 | + if (!is_file($_file)) return false; |
|
| 27 | 27 | $info = pathinfo($_file); |
| 28 | 28 | return ($info["extension"] == "php") || ($info["extension"] == "PHP"); |
| 29 | 29 | } |
| 30 | - function requireModules( $_path, $_local = true ) { |
|
| 30 | + function requireModules($_path, $_local = true) { |
|
| 31 | 31 | $path = getJFolder($_path, $_local, debug_backtrace()); |
| 32 | 32 | $subFolders = subFolderDir($path); |
| 33 | 33 | foreach ($subFolders as $i) { |
| 34 | 34 | requireComponents($path."/".$i, false, 0); |
| 35 | 35 | } |
| 36 | 36 | } |
| 37 | - function jRequire( $_path, $_local = true ) { |
|
| 37 | + function jRequire($_path, $_local = true) { |
|
| 38 | 38 | $path = getJFolder($_path, $_local, debug_backtrace()); |
| 39 | - require_once( $path ); |
|
| 39 | + require_once($path); |
|
| 40 | 40 | } |
| 41 | - function getJFolder( $_path, $_local, $_stack ) { |
|
| 42 | - if($_local) { |
|
| 41 | + function getJFolder($_path, $_local, $_stack) { |
|
| 42 | + if ($_local) { |
|
| 43 | 43 | $stackInfo = $_stack; |
| 44 | 44 | $folder = dirname($stackInfo[0]["file"]); |
| 45 | 45 | $file = "$folder/$_path"; |
@@ -6,45 +6,45 @@ |
||
| 6 | 6 | public $pages; |
| 7 | 7 | public $server; |
| 8 | 8 | public function __construct() { |
| 9 | - $this->connection["enable"] = false; |
|
| 10 | - $this->connection["user"] = ""; |
|
| 9 | + $this->connection["enable"] = false; |
|
| 10 | + $this->connection["user"] = ""; |
|
| 11 | 11 | $this->connection["password"] = ""; |
| 12 | 12 | $this->connection["database"] = ""; |
| 13 | - $this->connection["server"] = ""; |
|
| 14 | - $this->all = ""; |
|
| 13 | + $this->connection["server"] = ""; |
|
| 14 | + $this->all = ""; |
|
| 15 | 15 | $this->DEBUG = 0; |
| 16 | 16 | $this->pages = []; |
| 17 | - $this->server = []; |
|
| 17 | + $this->server = []; |
|
| 18 | 18 | $this->server["HTTP_HOST"] = $_SERVER["HTTP_HOST"]; |
| 19 | - $this->server["REQUEST_URI"] = $_SERVER["REQUEST_URI"]; |
|
| 19 | + $this->server["REQUEST_URI"] = $_SERVER["REQUEST_URI"]; |
|
| 20 | 20 | $this->server["PHP_SELF"] = $_SERVER["PHP_SELF"]; |
| 21 | 21 | } |
| 22 | - public function import( $_path, $_type = "misc" ) { |
|
| 22 | + public function import($_path, $_type = "misc") { |
|
| 23 | 23 | $data = file_get_contents($_path); |
| 24 | 24 | $data = json_decode($data); |
| 25 | - if( $_type == "connection" ) |
|
| 25 | + if ($_type == "connection") |
|
| 26 | 26 | $this->overlayConnection($data); |
| 27 | 27 | else |
| 28 | 28 | $this->overlayMisc($data); |
| 29 | 29 | } |
| 30 | - protected function overlayConnection( $_data ) { |
|
| 30 | + protected function overlayConnection($_data) { |
|
| 31 | 31 | $this->connection = $this->obj2array($_data); |
| 32 | 32 | } |
| 33 | - protected function overlayMisc( $_data ) { |
|
| 33 | + protected function overlayMisc($_data) { |
|
| 34 | 34 | $this->importObject($_data); |
| 35 | 35 | } |
| 36 | - protected function obj2array ( &$_instance ) { |
|
| 37 | - $clone = (array) $_instance; |
|
| 36 | + protected function obj2array(&$_instance) { |
|
| 37 | + $clone = (array) $_instance; |
|
| 38 | 38 | $return = []; |
| 39 | 39 | $return['___SOURCE_KEYS_'] = $clone; |
| 40 | - while ( list ($key, $value) = each ($clone) ) { |
|
| 41 | - $temp = explode ("\0", $key); |
|
| 42 | - $newkey = $temp[count($temp)-1]; |
|
| 40 | + while (list ($key, $value) = each($clone)) { |
|
| 41 | + $temp = explode("\0", $key); |
|
| 42 | + $newkey = $temp[count($temp) - 1]; |
|
| 43 | 43 | $return[$newkey] = &$return['___SOURCE_KEYS_'][$key]; |
| 44 | 44 | } |
| 45 | 45 | return $return; |
| 46 | 46 | } |
| 47 | - protected function importObject( $_object ) { |
|
| 47 | + protected function importObject($_object) { |
|
| 48 | 48 | foreach (get_object_vars($_object) as $key => $value) |
| 49 | 49 | $this->$key = $value; |
| 50 | 50 | } |
@@ -4,8 +4,8 @@ |
||
| 4 | 4 | parent::__construct(); |
| 5 | 5 | } |
| 6 | 6 | public function getPage() { |
| 7 | - $request = $this->parameters["app"]->server["REQUEST_URI"]; |
|
| 8 | - $base = $this->parameters["app"]->server["RELATIVE"]; |
|
| 7 | + $request = $this->parameters["app"]->server["REQUEST_URI"]; |
|
| 8 | + $base = $this->parameters["app"]->server["RELATIVE"]; |
|
| 9 | 9 | $url = str_replace($base, "", $request); |
| 10 | 10 | $url = explode("/", $url); |
| 11 | 11 | return $url; |
@@ -10,9 +10,9 @@ discard block |
||
| 10 | 10 | public $parameters; |
| 11 | 11 | public function __construct() { |
| 12 | 12 | $this->name = get_class($this); |
| 13 | - $this->modules = []; |
|
| 13 | + $this->modules = []; |
|
| 14 | 14 | $this->files = []; |
| 15 | - $this->required = []; |
|
| 15 | + $this->required = []; |
|
| 16 | 16 | $this->data = []; |
| 17 | 17 | $this->tags = []; |
| 18 | 18 | $this->connection = null; |
@@ -22,43 +22,43 @@ discard block |
||
| 22 | 22 | // abstract public function init(); |
| 23 | 23 | // abstract public function draw(); |
| 24 | 24 | public function getCss() { |
| 25 | - return $this->getRequire("getCss",".css"); |
|
| 25 | + return $this->getRequire("getCss", ".css"); |
|
| 26 | 26 | } |
| 27 | 27 | public function getJs() { |
| 28 | - return $this->getRequire("getJs",".js"); |
|
| 28 | + return $this->getRequire("getJs", ".js"); |
|
| 29 | 29 | } |
| 30 | 30 | public function getJsVariables() { |
| 31 | 31 | $temp = []; |
| 32 | 32 | foreach ($this->required as $i) |
| 33 | 33 | if (is_array($i)) |
| 34 | - array_push($temp,$i); |
|
| 34 | + array_push($temp, $i); |
|
| 35 | 35 | foreach ($this->modules as $i) |
| 36 | - $temp = array_merge( $temp, $i->getJsVariables() ); |
|
| 36 | + $temp = array_merge($temp, $i->getJsVariables()); |
|
| 37 | 37 | foreach ($this->files as $i) |
| 38 | 38 | if (is_array($i)) |
| 39 | - array_push($temp,$i); |
|
| 39 | + array_push($temp, $i); |
|
| 40 | 40 | return $temp; |
| 41 | 41 | } |
| 42 | - public function addModules( $_mods ) { |
|
| 42 | + public function addModules($_mods) { |
|
| 43 | 43 | foreach ($_mods as $value) |
| 44 | 44 | $this->addModule($value); |
| 45 | 45 | } |
| 46 | - public function addModule( $_mod ) { |
|
| 46 | + public function addModule($_mod) { |
|
| 47 | 47 | $this->modules[$_mod->name] = $_mod; |
| 48 | 48 | $this->modules[$_mod->name]->parameters = &$this->parameters; |
| 49 | 49 | } |
| 50 | - public function addFiles( $_files ) { |
|
| 50 | + public function addFiles($_files) { |
|
| 51 | 51 | foreach ($_files as $value) |
| 52 | 52 | $this->addFile($value); |
| 53 | 53 | } |
| 54 | - public function addFile( $_file ) { |
|
| 54 | + public function addFile($_file) { |
|
| 55 | 55 | array_push($this->files, $_file); |
| 56 | 56 | } |
| 57 | - public function addFilesRequired( $_files ) { |
|
| 57 | + public function addFilesRequired($_files) { |
|
| 58 | 58 | foreach ($_files as $value) |
| 59 | 59 | $this->addFileRequired($value); |
| 60 | 60 | } |
| 61 | - public function addFileRequired( $_file ) { |
|
| 61 | + public function addFileRequired($_file) { |
|
| 62 | 62 | array_push($this->required, $_file); |
| 63 | 63 | } |
| 64 | 64 | protected function addDipendences() { |
@@ -66,16 +66,16 @@ discard block |
||
| 66 | 66 | $this->tags["js"] = $this->getJs(); |
| 67 | 67 | $this->tags["jsVariables"] = $this->getJsVariables(); |
| 68 | 68 | } |
| 69 | - protected function getRequire( $_function, $_extenction) { |
|
| 69 | + protected function getRequire($_function, $_extenction) { |
|
| 70 | 70 | $temp = []; |
| 71 | 71 | foreach ($this->required as $i) |
| 72 | 72 | if (!is_array($i) && strpos($i, $_extenction) !== FALSE) |
| 73 | - array_push($temp,$i); |
|
| 73 | + array_push($temp, $i); |
|
| 74 | 74 | foreach ($this->modules as $i) |
| 75 | - $temp = array_merge( $temp, $i->$_function() ); |
|
| 75 | + $temp = array_merge($temp, $i->$_function()); |
|
| 76 | 76 | foreach ($this->files as $i) |
| 77 | 77 | if (!is_array($i) && strpos($i, $_extenction) !== FALSE) |
| 78 | - array_push($temp,$i); |
|
| 78 | + array_push($temp, $i); |
|
| 79 | 79 | return $temp; |
| 80 | 80 | } |
| 81 | 81 | } |
@@ -7,48 +7,48 @@ discard block |
||
| 7 | 7 | public function __construct() { |
| 8 | 8 | parent::__construct(); |
| 9 | 9 | $this->pages = []; |
| 10 | - $this->defaultPage = ["Page404",[]]; |
|
| 10 | + $this->defaultPage = ["Page404", []]; |
|
| 11 | 11 | $this->currentPage = null; |
| 12 | - $this->jConfig = null; |
|
| 12 | + $this->jConfig = null; |
|
| 13 | 13 | } |
| 14 | - public function addPage( $_page ) { |
|
| 14 | + public function addPage($_page) { |
|
| 15 | 15 | $param = []; |
| 16 | 16 | $path = $_page; |
| 17 | 17 | $class = $_page; |
| 18 | - if(is_array($_page)) { |
|
| 18 | + if (is_array($_page)) { |
|
| 19 | 19 | $path = $_page[0]; |
| 20 | 20 | $class = $_page[1]; |
| 21 | - if(isset($_page[2])) |
|
| 21 | + if (isset($_page[2])) |
|
| 22 | 22 | $param = $_page[2]; |
| 23 | 23 | } |
| 24 | 24 | $this->pages[$path] = [$class, $param]; |
| 25 | 25 | } |
| 26 | - public function addPages( $_pages ) { |
|
| 26 | + public function addPages($_pages) { |
|
| 27 | 27 | foreach ($_pages as $i) |
| 28 | 28 | $this->addPage($i); |
| 29 | 29 | } |
| 30 | 30 | public function fetchPage( ) { |
| 31 | 31 | $router = new Router(); |
| 32 | - $router->parameters = [ "app" => &$this->jConfig, "page" => null]; |
|
| 32 | + $router->parameters = ["app" => &$this->jConfig, "page" => null]; |
|
| 33 | 33 | $stack = $router->getPage(); |
| 34 | 34 | $parameters = []; |
| 35 | - $temp = $this->defaultPage; |
|
| 35 | + $temp = $this->defaultPage; |
|
| 36 | 36 | foreach ($this->pages as $key => $value) { |
| 37 | 37 | $variables = $this->pathSeeker(explode("/", $key), $stack); |
| 38 | - if(is_array($variables)) { |
|
| 38 | + if (is_array($variables)) { |
|
| 39 | 39 | $temp = $value; |
| 40 | 40 | $parameters = $variables; |
| 41 | 41 | break; |
| 42 | 42 | } |
| 43 | 43 | } |
| 44 | - if( isset($temp[1]) && is_array($temp[1]) ) |
|
| 44 | + if (isset($temp[1]) && is_array($temp[1])) |
|
| 45 | 45 | $temp[1] = array_merge($temp[1], $parameters); |
| 46 | 46 | else |
| 47 | 47 | $temp[1] = $parameters; |
| 48 | 48 | $this->currentPage = new $temp[0](["app" => $this->jConfig, "page" => $temp[1]]); |
| 49 | 49 | return $this->currentPage; |
| 50 | 50 | } |
| 51 | - public function setDefaultPage( $_page ) { |
|
| 51 | + public function setDefaultPage($_page) { |
|
| 52 | 52 | $this->defaultPage = $_page; |
| 53 | 53 | } |
| 54 | 54 | public function draw() { |
@@ -57,28 +57,28 @@ discard block |
||
| 57 | 57 | $gui->init($this->currentPage); |
| 58 | 58 | $gui->draw($this->currentPage->data["template"]); |
| 59 | 59 | } |
| 60 | - public function pathSeeker( $_path, $_url ) { |
|
| 60 | + public function pathSeeker($_path, $_url) { |
|
| 61 | 61 | $urlLength = count($_url); |
| 62 | 62 | $cont = 0; |
| 63 | 63 | $variables = []; |
| 64 | 64 | $pathLength = count($_path); |
| 65 | - if($urlLength == $pathLength) { |
|
| 66 | - while($cont < $urlLength) { |
|
| 67 | - if( $_path[$cont] == $_url[$cont] ) |
|
| 65 | + if ($urlLength == $pathLength) { |
|
| 66 | + while ($cont < $urlLength) { |
|
| 67 | + if ($_path[$cont] == $_url[$cont]) |
|
| 68 | 68 | $cont++; |
| 69 | - else if( strpos($_path[$cont], "\$") !== false ) { |
|
| 69 | + else if (strpos($_path[$cont], "\$") !== false) { |
|
| 70 | 70 | $variables[str_replace('$', "", $_path[$cont])] = $_url[$cont]; |
| 71 | 71 | $cont++; |
| 72 | 72 | } else break; |
| 73 | 73 | } |
| 74 | - if($cont == $urlLength) |
|
| 74 | + if ($cont == $urlLength) |
|
| 75 | 75 | return $variables; |
| 76 | 76 | } |
| 77 | 77 | return null; |
| 78 | 78 | } |
| 79 | - public function newConfig( $_path = "config/") { |
|
| 79 | + public function newConfig($_path = "config/") { |
|
| 80 | 80 | $this->jConfig = new JConfig(); |
| 81 | - $this->jConfig->import("${_path}connection.json","connection"); |
|
| 81 | + $this->jConfig->import("${_path}connection.json", "connection"); |
|
| 82 | 82 | $this->jConfig->import("${_path}misc.json"); |
| 83 | 83 | $this->jConfig->import("${_path}router.json"); |
| 84 | 84 | } |
@@ -8,13 +8,13 @@ discard block |
||
| 8 | 8 | $menu = $this->queryFetch("SELECT * FROM menu WHERE flag_active = 1 ORDER BY `order`"); |
| 9 | 9 | $temp = []; |
| 10 | 10 | foreach ($menu as $i) { |
| 11 | - if($i["fk_menu"] == 0) { |
|
| 11 | + if ($i["fk_menu"] == 0) { |
|
| 12 | 12 | $pk_menu = $i["pk_menu"]; |
| 13 | 13 | array_push($temp, array("label" => $i["label"], "link" => $i["link"], "submenu" => [], "relative" => false)); |
| 14 | 14 | $submenu = $this->queryFetch("SELECT * FROM menu WHERE fk_menu = $pk_menu ORDER BY `order`"); |
| 15 | - if($submenu) |
|
| 15 | + if ($submenu) |
|
| 16 | 16 | foreach ($submenu as $j) |
| 17 | - array_push( $temp[count($temp)-1]["submenu"], array("label" => $j["label"], "link" => $j["link"], "submenu" => [], "relative" => false) ); |
|
| 17 | + array_push($temp[count($temp) - 1]["submenu"], array("label" => $j["label"], "link" => $j["link"], "submenu" => [], "relative" => false)); |
|
| 18 | 18 | } |
| 19 | 19 | } |
| 20 | 20 | $this->tags["menu"] = $temp; |
@@ -23,15 +23,15 @@ discard block |
||
| 23 | 23 | public function draw() { |
| 24 | 24 | $temp = ""; |
| 25 | 25 | $host = $this->parameters["app"]->server["HTTP_HOST"]; |
| 26 | - $uri = $this->parameters["app"]->server["REQUEST_URI"]; |
|
| 27 | - $actualLink = "http://$host$uri"; |
|
| 28 | - $relative = $this->parameters["app"]->server["RELATIVE"]; |
|
| 26 | + $uri = $this->parameters["app"]->server["REQUEST_URI"]; |
|
| 27 | + $actualLink = "http://$host$uri"; |
|
| 28 | + $relative = $this->parameters["app"]->server["RELATIVE"]; |
|
| 29 | 29 | foreach ($this->tags["menu"] as $i) { |
| 30 | 30 | $prePath = ""; |
| 31 | - if($i["relative"]) |
|
| 31 | + if ($i["relative"]) |
|
| 32 | 32 | $prePath = $relative; |
| 33 | 33 | $active = $this->isSubString($actualLink, array_merge(array_column($i["submenu"], 'link'), array($i["link"]))) ? "active" : ""; |
| 34 | - if( is_array($i["submenu"]) && count($i["submenu"])<1) |
|
| 34 | + if (is_array($i["submenu"]) && count($i["submenu"]) < 1) |
|
| 35 | 35 | $temp .= "<li class='$active'><a href='$prePath$i[link]'>$i[label]</a></li>"; |
| 36 | 36 | else { |
| 37 | 37 | $temp .= "<li class='dropdown $active'>"; |
@@ -43,7 +43,7 @@ discard block |
||
| 43 | 43 | '<ul class="dropdown-menu">'; |
| 44 | 44 | foreach ($i["submenu"] as $j) { |
| 45 | 45 | $prePath = ""; |
| 46 | - if($j["relative"]) |
|
| 46 | + if ($j["relative"]) |
|
| 47 | 47 | $prePath = $relative; |
| 48 | 48 | $temp .= "<li><a href='$prePath$j[link]'>$j[label]</a></li>"; |
| 49 | 49 | } |
@@ -52,18 +52,18 @@ discard block |
||
| 52 | 52 | } |
| 53 | 53 | return $temp; |
| 54 | 54 | } |
| 55 | - protected function isSubString( $_string, $_list) { |
|
| 55 | + protected function isSubString($_string, $_list) { |
|
| 56 | 56 | $success = false; |
| 57 | 57 | foreach ($_list as $i) |
| 58 | - if(strpos($_string,$i) !== false) |
|
| 58 | + if (strpos($_string, $i) !== false) |
|
| 59 | 59 | $success = true; |
| 60 | 60 | return $success; |
| 61 | 61 | } |
| 62 | 62 | public function loginWithUser() { |
| 63 | 63 | $this->init(); |
| 64 | 64 | $temp = []; |
| 65 | - if(!isset($_SESSION["username"])) |
|
| 66 | - $_SESSION["username"] ="guest"; |
|
| 65 | + if (!isset($_SESSION["username"])) |
|
| 66 | + $_SESSION["username"] = "guest"; |
|
| 67 | 67 | $user = $_SESSION["username"]; |
| 68 | 68 | $blackList = $this->queryFetch( |
| 69 | 69 | "SELECT user.*,user_section.* |
@@ -78,10 +78,10 @@ discard block |
||
| 78 | 78 | $success = true; |
| 79 | 79 | $k = $i["label"]; |
| 80 | 80 | foreach ($blackList as $j) |
| 81 | - if( $j["section"] == $k) |
|
| 81 | + if ($j["section"] == $k) |
|
| 82 | 82 | $success = false; |
| 83 | - if($success) |
|
| 84 | - array_push($temp,$i); |
|
| 83 | + if ($success) |
|
| 84 | + array_push($temp, $i); |
|
| 85 | 85 | } |
| 86 | 86 | $this->tags["menu"] = $temp; |
| 87 | 87 | } |