public function activate_action($hash) { $link = new $this->class(); $link->activate($hash); $view = new View_main(); $view->view = 'default'; $view->errors = $link->errors; $view->render(); }
public function my_links_action() { $links = new $this->class(); $links->user_id = $_SESSION['user_id']; $link = $links->find_by_user_id(); $count_links = $links->count_found_links(); $view = new View_main(); $view->view = 'link_storage'; $view->arguments = array('link' => $link, 'count_links' => $count_links); $view->user_id = $_SESSION['user_id']; $view->errors = $links->errors; $view->render(); }
public function storage_action() { $user = new $this->class(); $user->user_id = $_SESSION['user_id']; $users = $user->find_all_users(); $count_users = $user->count_found_users(); $view = new View_main(); $view->view = 'user_storage'; $view->arguments = array('user' => $users, 'count_users' => $count_users); $view->errors = $user->errors; $view->render(); }