3 switch ($_REQUEST['employeeId']) {
9 "department"=>"Management",
11 "telephone"=>"240-555-1287"
13 if (true == $_SESSION['isAdmin']) {
14 $employee['street'] = "123 Bluebird Ct.";
15 $employee['city'] = "Columbia";
16 $employee['state'] = "MD";
17 $employee['salary'] = 118000;
23 "firstName"=>"George",
25 "department"=>"Sales",
26 "title"=>"VP of Sales",
27 "telephone"=>"240-555-1287"
29 if (true == $_SESSION['isAdmin']) {
30 $employee['street'] = "283 N. Market St.";
31 $employee['city'] = "Frederick";
32 $employee['state'] = "MD";
33 $employee['salary'] = 68000;
39 "lastName"=>"Beogagi",
40 "department"=>"Human Resources",
41 "title"=>"Senior Hiring Agent",
42 "telephone"=>"443-555-1220"
44 if (true == $_SESSION['isAdmin']) {
45 $employee['street'] = "8923 Redwood St.";
46 $employee['city'] = "Ellicott City";
47 $employee['state'] = "MD";
48 $employee['salary'] = 72000;
55 "lastName"=>"Diarmaid",
56 "department"=>"Human Resources",
57 "title"=>"Hiring Agent",
58 "telephone"=>"443-555-2890"
60 if (true == $_SESSION['isAdmin']) {
61 $employee['street'] = "893 Madison St.";
62 $employee['city'] = "Mt. Airy";
63 $employee['state'] = "MD";
64 $employee['salary'] = 48000;
71 "lastName"=>"Domingos",
72 "department"=>"Technology",
74 "telephone"=>"443-555-2890"
76 if (true == $_SESSION['isAdmin']) {
77 $employee['street'] = "123 5th St.";
78 $employee['city'] = "Washington";
79 $employee['state'] = "DC";
80 $employee['salary'] = 92000;
84 echo json_encode($employee);