case "list": list_category($config); show_add_category_form(); break; case "submit_add": $isSuccess = submit_add_category($config); if ($isSuccess) { echo "<p>1 category is added</p>"; } else { echo "<p>CAN NOT add category</p>"; } list_category($config); show_add_category_form(); break; case "edit": show_edit_category_form($config, $_GET['id']); break; case "submit_edit": $isSuccess = submit_edit_category($config); if ($isSuccess) { echo "<p>1 category is updated</p>"; } else { echo "<p>CAN NOT update category</p>"; } list_category($config); show_add_category_form(); break; case "delete": confirmDeleteCategory($config); break; case "submit_delete":
<html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> <link rel="stylesheet" type="text/css" href="style/style.css"/> <title>Finance - Category</title> </head> <body id="category"> <div id="wrap"> <?php show_header(); ?> <div id="content"> <div id="setting"> <?php if (isset($_GET['id'])) { $result = show_edit_category_form($_GET['id']); if ($result == 0) { echo "<p><b>Identifier was not found.</b></p>"; } } ?> </div> <!-- End of setting --> </div> <!-- End of content --> </div> <!-- End of wrap --> </body> </html>