header('location: gestion_adherents.php'); die; } } if (isset($_POST['cancel'])) { header('location: gestion_titres.php'); die; } if (isset($_POST['id']) && !isset($_GET['id'])) { $_GET['id'] = $_POST['id']; } $title = new Title((int) $_GET['id']); if (isset($_POST['id'])) { $title->short = $_POST['short_label']; $title->long = $_POST['long_label']; $res = $title->store($zdb); if (!$res) { $error_detected[] = preg_replace('(%s)', $title->short, _T("Title '%s' has not been modified!")); } else { $success_detected[] = preg_replace('(%s)', $title->short, _T("Title '%s' has been successfully modified.")); $session['success_detected'] = serialize($success_detected); header('location: gestion_titres.php'); die; } } $tpl->assign('page_title', _T("Edit title")); $tpl->assign('title', $title); $tpl->assign('error_detected', $error_detected); $tpl->assign('success_detected', $success_detected); $content = $tpl->fetch('edit_title.tpl'); $tpl->assign('content', $content);