X-Git-Url: https://git.piment-noir.org/?p=Project_webapp.git;a=blobdiff_plain;f=index.php;h=9dc9e0bff683e93bc416467c952f29a9e88095af;hp=125f62049964198da07139d78e5286c4990abb5b;hb=db6cae9045820883e6b4c7224fe68c4f4fb9c4e8;hpb=6405835a808d5ac4986ff463a7be0b146058440d diff --git a/index.php b/index.php index 125f620..9dc9e0b 100644 --- a/index.php +++ b/index.php @@ -1,33 +1,55 @@ "; } $found_action = true; break; } } if (!$found_action) { - echo "Action to display do not exist"; - } -} - -function get_url_action() { - global $page, $form, $isPage, $isForm; - - if (get_action_type() === "page") { - return $page; - } elseif (get_action_type() === "form") { - return $form; - } elseif (get_action_type() === "empty") { - return ""; - } elseif (get_action_type() === "unknown") { - die('Cannot get a valid action from URL parameters'); + echo "Action to display do not exist.
"; } } -$url_action = get_url_action(); +$action_type = get_action_type(); +$url_action = get_url_action($action_type); $action = validate_url_action($url_action); -display_action($action); +display_action($action, $action_type); + +$connection->close(); -session_destroy(); +session_write_close(); -require('footer.html'); +require('includes/footer.html'); ?>