public function show_content($show_content = true) { //this function run from page class. // this function load plugin and run controller //checking for that plugin is enabled if ($this->obj_plugin->is_enabled($this->plugin)) { $plugin = new $this->plugin(); //run action directly if (method_exists($plugin, $this->action)) { $content = call_user_func(array($plugin, $this->action), 'content'); } else { if (method_exists($plugin, 'default')) { $content = call_user_func(array($plugin, 'default'), 'content'); } //show 404 page not found page $plugin = new msg(); $content = call_user_func(array($plugin, 'msg_404')); } } else { //plugin is not enabled //show 404 page not found page $plugin = new msg(); $content = call_user_func(array($plugin, 'msg_404')); } cls_page::set_page_tittle($content[0]); //show header in up of content or else if (sizeof($content) == 3 && $content[2] == false) { $output_content = cls_page::show_block('', $content[1], 'MAIN'); } else { $output_content = cls_page::show_block($content[0], $content[1], 'MAIN'); } //show content id show_content was set if ($show_content) { echo $output_content; } return $content; }