Validate($_uid, false, 'evts'); $this->titre = $_titre; $this->texte = $_texte; $this->pmin = $_pmin; $this->pmax = $_pmax; $this->peremption = $_peremption; $this->comment = $_comment; } // }}} // {{{ function formu() function formu() { return 'include/form.valid.evts.tpl'; } // }}} // {{{ functon editor() function editor() { return 'include/form.valid.edit-evts.tpl'; } // }}} // {{{ function handle_editor() function handle_editor() { $this->titre = Env::v('titre'); $this->texte = Env::v('texte'); $this->pmin = Env::i('promo_min'); $this->pmax = Env::i('promo_max'); $this->peremption = Env::v('peremption'); return true; } // }}} // {{{ function _mail_subj function _mail_subj() { return "[Polytechnique.org/EVENEMENTS] Proposition d'événement"; } // }}} // {{{ function _mail_body function _mail_body($isok) { if ($isok) { return " L'annonce que tu avais proposée ({$this->titre}) vient d'être validée."; } else { return " L'annonce que tu avais proposée ({$this->titre}) a été refusée."; } } // }}} // {{{ function commit() function commit() { return XDB::execute( "INSERT INTO evenements SET user_id = {?}, creation_date=NOW(), titre={?}, texte={?}, peremption={?}, promo_min={?}, promo_max={?}, flags=CONCAT(flags,',valide')", $this->uid, $this->titre, $this->texte, $this->peremption, $this->pmin, $this->pmax); } // }}} } // }}} // vim:set et sw=4 sts=4 sws=4 foldmethod=marker: ?>