title = $_title; $this->description = $_description; $this->end = $_end; $this->mode = $_mode; $this->promos = $_promos; $this->questions = $_questions; } // }}} // {{{ function formu() public function formu() { return 'include/form.valid.surveys.tpl'; } // }}} // {{{ function _mail_subj protected function _mail_subj() { return "[Polytechnique.org/SONDAGES] Proposition de sondage"; } // }}} // {{{ function _mail_body protected function _mail_body($isok) { if ($isok) { return " Le sondage que tu avais proposé vient d'être validé."; } else { return " Le sondage que tu avais proposé a été refusé."; } } // }}} // {{{ function updateReq() public function updateReq($_title, $_description, $_end, $_mode, $_promos, $_questions) { $this->title = $_title; $this->description = $_description; $this->end = $_end; $this->mode = $_mode; $this->promos = $_promos; $this->questions = $_questions; return $this->update(); } // }}} // {{{ function commit() public function commit() { $sql = 'INSERT INTO surveys SET questions = {?}, title = {?}, description = {?}, uid = {?}, end = {?},mode = {?}, promos = {?}'; return XDB::execute($sql, serialize($this->questions), $this->title, $this->description, $this->user->id(), $this->end, $this->mode, $this->promos); } // }}} } // }}} // vim:set et sw=4 sts=4 sws=4 foldmethod=marker enc=utf-8: ?>