/** * Handling delete! signal. * @param int $id The id of the task. */ public function handleDelete($id) { $user = $this->getUser(); if ($user->isLoggedIn()) { $this->tasksModel->deleteItem($id); $this->flashMessage('Zakázka byla úspěšně smazána.', 'success'); $this->redrawControl('taskContainer'); } else { $this->flashMessage('Pro provedení této operace je nutné být přihlášen.', 'error'); $this->redirect('Sign:in'); } }
public function __construct() { parent::__construct(); $this->spam = antispam::getInstance(); $this->security = security::getInstance(); $this->filter = array('content' => array('filters' => array()), 'suscribe' => array('filters' => array(array('trueOrFalse')))); $this->validate = array('author' => array('required' => true, 'rules' => array(array('rule' => VALID_NOT_EMPTY, 'message' => 'Por favor introduce tu Nombre.'))), 'url' => array('rules' => array(array('rule' => VALID_URL, 'message' => 'No es una URL valida.'))), 'email' => array('required' => true, 'rules' => array(array('rule' => VALID_EMAIL, 'message' => 'El e-mail no es valido.'))), 'content' => array('required' => true, 'rules' => array(array('rule' => VALID_NOT_EMPTY, 'message' => 'Debes introducir un comentario.'), array('rule' => array('isSpam'), 'message' => 'No se aceptan comentarios en blanco o con spam.')))); }
public function __construct() { parent::__construct(); $this->utils = new utils(); $this->secure = new secure(); $this->error = new error(); $this->mapper = new mapper(); $this->loader = new loader(); $this->image = new image(); }
public function Logout($_token) { $token = $this->TokenGen(); //Mise à jour de l'utilisateur. $cmd = "UPDATE users SET token= " . $token . "WHERE token = " . $_token; parent::DBExecute($cmd); }
public function DeleteProject($_projectId) { parent::DBExecute("DELETE FROM ratings WHERE projectID = " . $_projectId); parent::DBExecute("DELETE FROM projects WHERE ID = " . $_projectId); }
function __construct() { parent::__construct(); echo 'model creat'; }
public function FindRateByID($_internID, $_projectID) { return parent::DBQuery("SELECT * FROM ratings WHERE internID=" . $_internID . " AND projectID=" . $_projectID); }
public function __construct() { parent::__construct(); }
public function __construct() { parent::__construct(); $config = new configuration(); $this->config = $config->getBlogConfiguration(); }