case "confirm": $OUTPUT = confirm($_POST); break; case "write": $OUTPUT = write($_POST); break; default: if (isset($_GET['file'])) { $OUTPUT = confirm2($_GET['file']); } else { $OUTPUT = show(); } } } else { if (isset($_GET['file'])) { $OUTPUT = confirm2($_GET['file']); } else { $OUTPUT = show(); } } # display output require "template.php"; # print Info from db function show() { # start table, etc $show = "<h3>Upload accounts file</h3>\r\n <table cellpadding='" . TMPL_tblCellPadding . "' cellspacing='" . TMPL_tblCellSpacing . "'>\r\n\t\t\t<form ENCTYPE='multipart/form-data' action='" . SELF . "' method=post>\r\n\t\t\t<input type=hidden name=key value=confirm>\r\n\t\t\t<tr><th>Field</th><th>Value</th></tr>\r\n\t\t\t<tr class='bg-even'><td>Accounts File</td><td><input type=file size=20 name=accfile></td></tr>\r\n\t\t\t<tr><td colspan=2 align=right><input type=submit value='Confirm »'></td></tr>\r\n\t\t\t</form>\r\n </table>"; return $show; } function confirm($_POST) {
# # # # Get settings require "../settings.php"; require "../core-settings.php"; require_lib("docman"); require "../libs/ext.lib.php"; # Decide what to do if (isset($_POST["key"])) { switch ($_POST["key"]) { case "cancel": $OUTPUT = write($_POST); break; case "confirm2": $OUTPUT = confirm2($_POST); break; default: # Display default output if (isset($_GET['cashid'])) { $OUTPUT = confirm($_GET['cashid']); } else { $OUTPUT = "<li class=err> Invalid use of mudule"; } } } else { # Display default output if (isset($_GET['cashid'])) { $OUTPUT = confirm($_GET['cashid']); } else { $OUTPUT = "<li class=err> Invalid use of mudule";