get('id')); if (isset($_POST['add_external']) && !empty($_POST['login']) && !empty($_POST['password'])) { if ($jp->addExternal($_POST['login'], $_POST['password'])) utils::redirect('/ecrire/acces_prives.php?added'); else utils::redirect('/ecrire/acces_prives.php?exist'); } elseif (isset($_POST['add_internal']) && !empty($_POST['email'])) { if ($jp->addInternal($_POST['email'])) utils::redirect('/ecrire/acces_prives.php?added'); else utils::redirect('/ecrire/acces_prives.php?unknow'); } elseif (!empty($_GET['delete'])) { $jp->delete($_GET['delete']); utils::redirect('/ecrire/acces_prives.php?deleted'); } $tpl->assign('current', false); $tpl->assign('liste', $jp->getList()); $tpl->assign('default_pass', utils::generatePassword(mt_rand(5, 9), 'aeiouybcdfghjklmnpqrstvwxz')); $tpl->display('ecrire/acces_prives.tpl'); ?>