X-Git-Url: http://git.polytechnique.org/?a=blobdiff_plain;f=include%2Fvalidations%2Fevts.inc.php;h=01c56582d031919e68cf695e8f9f7905ad6fa03a;hb=ae0508cbd08c4974520a6d3e80df42842ef34c10;hp=6714ab75358ab7848a02c26940ca4fe6aad9d654;hpb=0337d704b62718d7c77106c0e4c4e26fb02beacf;p=platal.git diff --git a/include/validations/evts.inc.php b/include/validations/evts.inc.php index 6714ab7..01c5658 100644 --- a/include/validations/evts.inc.php +++ b/include/validations/evts.inc.php @@ -1,6 +1,6 @@ Validate($_uid, false, 'evts'); $this->titre = $_titre; $this->texte = $_texte; @@ -54,6 +53,25 @@ class EvtReq extends Validate { 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() @@ -78,8 +96,7 @@ class EvtReq extends Validate 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')",