Example #1
0
 /**
  * @function load
  * @brief la funcion load carga una vista correspondiente a un modulo
  **/
 public static function load($view)
 {
     // Module::$module;
     if (!isset($_GET['view'])) {
         if (Core::$root == "") {
             include "core/app/view/" . $view . "-view.php";
         } else {
             if (Core::$root == "admin/") {
                 include "core/app/" . Core::$theme . "/view/" . $view . "-view.php";
             }
         }
     } else {
         if (View::isValid()) {
             $url = "";
             if (Core::$root == "") {
                 $url = "core/app/view/" . $_GET['view'] . "-view.php";
             } else {
                 if (Core::$root == "admin/") {
                     $url = "core/app/" . Core::$theme . "/view/" . $_GET['view'] . "-view.php";
                 }
             }
             include $url;
         } else {
             View::Error("<b>404 NOT FOUND</b> View <b>" . $_GET['view'] . "</b> folder !! - <a href='http://evilnapsis.com/legobox/help/' target='_blank'>Help</a>");
         }
     }
 }
Example #2
0
 /**
  * @function load
  * @brief la funcion load carga una vista correspondiente a un modulo
  **/
 public static function load($view)
 {
     // Module::$module;
     if (!isset($_GET['view'])) {
         include "core/modules/" . Module::$module . "/view/" . $view . "/widget-default.php";
     } else {
         if (View::isValid()) {
             include "core/modules/" . Module::$module . "/view/" . $_GET['view'] . "/widget-default.php";
         } else {
             View::Error("<b>404 NOT FOUND</b> View <b>" . $_GET['view'] . "</b> folder  !!");
         }
     }
 }
Example #3
0
 public static function render2($cntrllr, $view, $data = [])
 {
     // Module::$module;
     self::$content = "";
     if (!isset($_GET['view'])) {
         self::$content = "app/views/" . $view . "-view.php";
     } else {
         if (View::isValid()) {
             self::$content = "app/views/" . $view . "/widget-default.php";
         } else {
             View::Error("<b>404 NOT FOUND</b> View <b>" . $view . "</b> folder  !!");
         }
     }
     if ($cntrllr->default_layout != "") {
         include "app/layouts/layout.php";
     }
 }