<?php require "settings.php"; if (isset($_POST["key"])) { switch ($_POST["key"]) { case "confirm": $OUTPUT = run_rem($_POST); break; default: $OUTPUT = confirm_rem($_POST); } } else { $OUTPUT = confirm_rem($_GET); } require "template.php"; function confirm_rem($_POST) { extract($_POST); if (!isset($bid) or strlen($bid) < 1) { return "Invalid Use Of Module. Invalid Branch."; } db_connect(); $get_branch = "SELECT * FROM branches_data WHERE id = '{$bid}' LIMIT 1"; $run_branch = db_exec($get_branch) or errDie("Unable to get branch information."); if (pg_numrows($run_branch) < 1) { #branch not found ... $barr = array(); } else { $barr = pg_fetch_array($run_branch); } $display = "\n\t\t\t\t\t<h2>Confirm Branch To Remove</h2>\n\t\t\t\t\t<table " . TMPL_tblDflts . ">\n\t\t\t\t\t<form action='" . SELF . "' method='POST'>\n\t\t\t\t\t\t<input type='hidden' name='key' value='confirm'>\n\t\t\t\t\t\t<input type='hidden' name='bid' value='{$bid}'>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th>Branch Name</th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t\t\t\t<td>{$barr['branch_name']}</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th>Branch Details</th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t\t\t\t<td>" . nl2br($barr['branch_desc']) . "</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<th>Branch Contact</th>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr class='" . bg_class() . "'>\n\t\t\t\t\t\t\t<td>{$barr['branch_contact']}</td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t\t<tr><td><br></td></tr>\n\t\t\t\t\t\t<tr>\n\t\t\t\t\t\t\t<td align='right'><input type='submit' value='Remove'></td>\n\t\t\t\t\t\t</tr>\n\t\t\t\t\t</form>\n\t\t\t\t\t</table>\n\t\t\t\t";
# # # # # # # # # # admin-employee-rem.php :: Remove employees from db ## require "settings.php"; if (isset($_POST["key"])) { switch ($_POST["key"]) { case "confirm_rem": $OUTPUT = confirm_rem($_POST); break; case "remove": $OUTPUT = remove($_POST); break; default: $OUTPUT = "Invalid use."; } } elseif (isset($_GET["empnum"])) { $OUTPUT = confirm_emp($_GET); } else { $OUTPUT = "Invalid."; } require "template.php"; ## # Functions