Example #1
0
 public function __construct()
 {
     $connection = new model__connection(DATABASE);
     new library_filter();
     $controller = parent::request('c', 'index');
     switch ($controller) {
         case 'index':
         default:
             new controller_index();
             break;
     }
     unset($connection);
 }
Example #2
0
 private function setComment()
 {
     $comment = new model_comment();
     $comment->ip = $_SERVER['REMOTE_ADDR'];
     $comment->content = parent::request('content');
     if (trim($comment->content) == '') {
         return;
     }
     $commentId = model_comment::set($comment);
     if (isset($commentId) && !empty($commentId)) {
         $comment = model_comment::getByID($commentId);
         require_once 'view/html/index/index.comment.phtml';
     }
 }