historique::getIdRef("ACTION"), "idUser" => session::getId(), "idPage" => historique::getIdRef("/user-".user::lastUser().".html"), "log" => "Création du compte de " . user::lastUser() )); alert::recSuccess("Création du compte de ". user::getNameById(user::lastUser())); header("Location: /user-" . user::lastUser() . ".html"); exit(); } else { user::maj_user(core::getPost()); historique::recRef("/user-".core::getPost("id").".html"); historique::add(array( "idType" => historique::getIdRef("ACTION"), "idUser" => session::getId(), "idPage" => historique::getIdRef("/user-".core::getPost("id").".html"), "log" => "Modification du compte de " . user::getNameById(core::getPost("id")) )); if(core::getPost("id") == session::getId()){ alert::recSuccess("Modification de votre compte"); header("Location: /user.html"); } else { alert::recSuccess("Modification du compte de ". user::getNameById(core::getPost("id"))); header("Location: /user-" . core::getPost("id") . ".html"); } exit(); } } else { header('HTTP/1.0 401 Unauthorized'); exit(); }