예제 #1
0
파일: Pages.class.php 프로젝트: habb0/mobbo
 private function run()
 {
     if ($_GET) {
         $oct = Actions::Names();
         foreach ($oct as $ind => $val) {
             if (array_key_exists($val, $_GET)) {
                 Actions::show($val);
             }
         }
         $act = isset($_GET['actions']) ? htmlspecialchars($_GET['actions']) : 1;
         $pae = isset($_GET['pages']) ? htmlspecialchars($_GET['pages']) : 'index';
         $this->geton = $_GET['nomeusuario'];
         if ($act != 1) {
             if ($act != 0 || $act != 1) {
                 self::actions($act);
             }
         } else {
             if (isset($pae) || $act != 0 || $act != 1) {
                 if ($pae != 0 || $pae != 1 || $pae != 'index') {
                     $pag = strpos($pae, '-') ? explode('-', $pae) : $pae;
                     if (is_array($pag)) {
                         $this->name = $pag;
                         foreach ($pag as $ind => $vale) {
                             if ($this->page == NULL) {
                                 parent::template(TEMPLATES . $this->path . '/' . $vale . '.php', $this->args);
                                 $this->page = parent::display();
                             } else {
                                 parent::template(TEMPLATES . $this->path . '/' . $vale . '.php', $this->args);
                                 $this->page .= parent::display();
                             }
                         }
                     } else {
                         $this->name = $pag;
                         parent::template(TEMPLATES . $this->path . '/' . $pag . '.php', $this->args);
                         $this->page = parent::display();
                     }
                 } else {
                     parent::template(TEMPLATES . $this->path . '/index.php', $this->args);
                     $this->page = parent::display();
                 }
             }
         }
     } else {
         parent::template(TEMPLATES . $this->path . '/index.php', $this->args);
         $this->page = parent::display();
     }
 }