// {{{ constructor
function EvtReq($_titre, $_texte, $_pmin, $_pmax, $_peremption, $_comment, $_uid) {
- global $globals;
$this->Validate($_uid, false, 'evts');
$this->titre = $_titre;
$this->texte = $_texte;
{ 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()
function commit()
{
- global $globals;
- return $globals->xdb->execute(
+ return XDB::execute(
"INSERT INTO evenements
SET user_id = {?}, creation_date=NOW(), titre={?}, texte={?},
peremption={?}, promo_min={?}, promo_max={?}, flags=CONCAT(flags,',valide')",