Ejemplo n.º 1
0
 function testPhotoPng()
 {
     $a = new Activite();
     $a->slug = 'imagick-png';
     $a->debut = new Zend_Db_Expr('CURRENT_TIMESTAMP');
     $a->fin = new Zend_Db_Expr('CURRENT_TIMESTAMP');
     $a->save();
     $c = new Commentaire();
     $c->message = '';
     $c->save();
     $o = new Photo();
     $o->activite = $a->id;
     $o->commentaires = $c->id;
     $o->slug = 'photo-png';
     $o->storeFile(dirname(__FILE__) . '/images/transparente.png');
 }
 public function modifierActivite()
 {
     $this->load->model("Theme");
     $this->load->model("Activite");
     switch ($_SERVER['REQUEST_METHOD']) {
         case 'GET':
             $data['themes'] = Theme::getAll();
             $data['activite'] = Activite::get($_GET["id"]);
             $this->load->view("modifierActivite", $data);
             break;
         case 'POST':
             $x = Activite::save($_POST['idActivite'], $_POST['nomActivite'], $_POST['descriptionActivite'], $_POST['idTheme']);
             header("Location:" . base_url() . "index.php/activites/gestionActivites");
             exit;
             break;
     }
 }