Beispiel #1
0
    case "edit":
        show_edit_detail_form($config, $_GET['id']);
        break;
    case "submit_edit":
        $isSuccess = submit_edit_detail($config);
        if ($isSuccess) {
            echo "<p>1 detail is updated</p>";
        } else {
            echo "<p>CAN NOT update detail</p>";
        }
        show_available_money($config);
        show_add_detail_form($config);
        list_detail($config);
        break;
    case "delete":
        confirmDeleteDetail($config);
        break;
    case "submit_delete":
        $isSuccess = submit_delete_detail($config);
        if ($isSuccess) {
            echo "<p>1 detail is deleted</p>";
        } else {
            echo "<p>CAN NOT delete detail</p>";
        }
        show_available_money($config);
        show_add_detail_form($config);
        list_detail($config);
        break;
}
?>
	<tr>
		<td width="400"><?php 
        show_add_detail_form();
        ?>
</td>
		<td><?php 
        show_filter_form();
        ?>
</td>
	</tr>
</table>
<?php 
        list_detail();
        break;
    case "delete":
        confirmDeleteDetail();
        break;
    case "submit_delete":
        $isSuccess = submit_delete_detail();
        if ($isSuccess) {
            echo "<p>1 detail is deleted</p>";
        } else {
            echo "<p>CAN NOT delete detail</p>";
        }
        show_available_money();
        ?>
	
<table border="0" cellpadding="10">
	<tr>
		<td width="400"><?php 
        show_add_detail_form();