/**
  * 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');
     }
 }
Exemplo n.º 2
0
 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.'))));
 }
Exemplo n.º 3
0
 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();
 }
Exemplo n.º 4
0
 public function Logout($_token)
 {
     $token = $this->TokenGen();
     //Mise à jour de l'utilisateur.
     $cmd = "UPDATE users SET token= " . $token . "WHERE token = " . $_token;
     parent::DBExecute($cmd);
 }
Exemplo n.º 5
0
 public function DeleteProject($_projectId)
 {
     parent::DBExecute("DELETE FROM ratings WHERE projectID = " . $_projectId);
     parent::DBExecute("DELETE FROM projects WHERE ID = " . $_projectId);
 }
Exemplo n.º 6
0
 function __construct()
 {
     parent::__construct();
     echo 'model creat';
 }
Exemplo n.º 7
0
 public function FindRateByID($_internID, $_projectID)
 {
     return parent::DBQuery("SELECT * FROM ratings WHERE internID=" . $_internID . " AND projectID=" . $_projectID);
 }
Exemplo n.º 8
0
 public function __construct()
 {
     parent::__construct();
 }
Exemplo n.º 9
0
 public function __construct()
 {
     parent::__construct();
     $config = new configuration();
     $this->config = $config->getBlogConfiguration();
 }