*/ function isAdd($type) { return $type == "add"; } function isDetail($type) { return $type == "detail"; } function isDelete($type) { return $type == "delete"; } if (Session::isAlreadyConnected() && Session::isLoggedAsAdministrator()) { $DEFAULT = "sti"; $rights = Right::getRights(); // add, detail $type = "add"; $errors = array(); $get = Tools::prepareUserArgString($_GET["page"]); if (isset($_POST["delete"])) { $type = "delete"; $id = Tools::prepareUserArgInteger($_POST["id"]); if (User::findById($id) == null) { $errors["id"] = "The user " . $id . " doesn't exist"; } else { if (!User::deleteById($id)) { $errors["other"] = "An unknown error occurated."; } else { } }