if (!isset($num_errors)) { $num_errors = 0; } if (!isset($num_alerts)) { $num_alerts = 0; } if (Validate_Session($complete_sess_id, $_SERVER['REMOTE_ADDR'], $bd)) { Get_Account_Id($sess_id, $account_id, $bd); if ($account_id != 'admin') { $error[$num_errors++] = "You are not the administrator"; include "logout.php"; exit; } if (!empty($_POST['submit_conf_yes']) || !empty($_POST['submit_conf_no'])) { if (!empty($_POST['submit_conf_yes'])) { if (Delete_Person($_POST['account_id'], $bd) == 1) { $alert[$num_alerts++] = 'Person deleted successfully'; } } else { $alert[$num_alerts++] = 'Person deletion cancelled'; } include "adm_acc_people.php"; exit; } else { if (!empty($_GET['account_id'])) { $people = List_People($_GET['account_id'], '', '', '', '', $bd); } } $result_xsl = "xsl/" . $default_xsl . "/adm_acc_people_remove.xsl"; } else { $error[$num_errors++] = "Invalid Session ID";
function deletePerson($complete_sess_id, $account_id) { if (!Validate_Session($complete_sess_id, $_SERVER['REMOTE_ADDR'], $GLOBALS['bd'])) { return "Invalid session ID!"; } return Delete_Person($account_id, $GLOBALS['bd']); }