function error()
 {
     require 'Controllers/error.php';
     $controller = new error();
     $controller->index();
     return false;
 }
Exemplo n.º 2
0
 public static function Error()
 {
     Session::flush('sure', Messages::_404());
     require_once SITE_PATH . '/app/controllers/error_controller.php';
     $control = new error();
     $control->index();
     return FALSE;
 }
Exemplo n.º 3
0
 public static function Error()
 {
     Session::flush('sure', '404: Page does not exists!<br/>Are you sure what you are looking for?');
     require_once SITE_PATH . '/app/controllers/error_controller.php';
     $control = new error();
     $control->index();
     return FALSE;
 }
Exemplo n.º 4
0
 public function update($table, $data, $where)
 {
     ksort($data);
     $datastring = '';
     foreach ($data as $key => $value) {
         $datastring .= "`{$key}`=:{$key}, ";
     }
     $datastringcleaned = rtrim($datastring, ', ');
     $query = $this->prepare("UPDATE {$table} SET {$datastringcleaned} WHERE {$where};");
     foreach ($data as $key => $value) {
         $query->bindValue($key, $value);
     }
     if (!$query->execute()) {
         require_once CONTROLLER_FOLDER . 'error.php';
         $e = new error();
         $e->index();
         return false;
     } else {
         return true;
     }
 }