submit(); } } else { $page->trig('Fichier inexistant ou vide'); } } elseif (Env::has('trombi')) { $myphoto = new PhotoReq(Session::getInt('uid'), file_get_contents($trombi_x)); if ($myphoto) { $myphoto->commit(); $myphoto->clean(); } } elseif (Env::get('suppr')) { $globals->xdb->execute('DELETE FROM photo WHERE uid = {?}', Session::getInt('uid')); $globals->xdb->execute('DELETE FROM requests WHERE user_id = {?} AND type="photo"', Session::getInt('uid')); } elseif (Env::get('cancel')) { $sql = $globals->xdb->query('DELETE FROM requests WHERE user_id={?} AND type="photo"', Session::getInt('uid')); } $sql = $globals->xdb->query('SELECT COUNT(*) FROM requests WHERE user_id={?} AND type="photo"', Session::getInt('uid')); $page->assign('submited', $sql->fetchOneCell()); $page->assign('has_trombi_x', file_exists($trombi_x)); $page->run(); // Affichage de la page principale ?>