# # # # # # # # # # admin-employee-detail.php :: View employee detail ## require "settings.php"; require "libs/ext.lib.php"; if ($_GET) { # confirm removal $OUTPUT = viewEmp($_GET['empnum']); } else { $OUTPUT = "Invalid option."; } require "template.php"; ## # Functions ## # view employee details function viewEmp($empnum) { if (empty($empnum)) { return "Employee number missing.{$empnum}"; } $empnum = preg_replace("/[^\\w\\s-]/", "", substr($empnum, 0, 20)); # connect to db
# # # # # # # # # # # # admin-employee-view.php :: View employees in db ## require "settings.php"; require "salwages/emp-functions.php"; $OUTPUT = viewEmp(); require "template.php"; ## # Functions ## # view employees in db function viewEmp() { # Connect to db db_connect(); global $_GET; extract($_GET); if (!isset($err)) { $err = ""; } else { $err = "<li class='err'>{$err}</li>";