Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function action_view()
- {
- $get = new Validate($_GET);
- $get = Validate::factory($_GET)->rule('article_id', 'is_numeric');
- if(!$get->check())
- {
- $this->errors = $get->errors('article_id');
- $view = View::factory('error')
- ->set('errors', $this->errors);
- $this->template->content = $view;
- }
- else
- {
- $article = new Model_Article;
- if(isset($_GET['article_id']))
- {
- if($article->exists($_GET['article_id']))
- {
- $this->template->content = 'true';
- }
- else
- {
- $this->template->content = 'false';
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement