source: trunk/web/addons/job_monarch/lib/extjs/examples/remoteload/loadEmployeeInfo.php @ 619

Last change on this file since 619 was 619, checked in by ramonb, 15 years ago

lib/:

  • added new AJAX dependancies: ExtJS, pChart, Lightbox2
File size: 2.1 KB
Line 
1<?php   
2        session_start();
3        switch ($_REQUEST['employeeId']) {
4                case '1':
5                        $employee = array(
6                                "employeeId"=>1,
7                                "firstName"=>"Joe",
8                                "lastName"=>"Smith",
9                                "department"=>"Management",
10                                "title"=>"CEO",
11                                "telephone"=>"240-555-1287"
12                        );
13                        if (true == $_SESSION['isAdmin']) {
14                                $employee['homeAddress'] = array(
15                                        "street"=>"123 Bluebird Ct.",
16                                        "city"=>"Columbia",
17                                        "state"=>"MD"
18                                );
19                        }
20                        break;
21                case '2':
22                        $employee = array(
23                                "employeeId"=>2,
24                                "firstName"=>"George",
25                                "lastName"=>"Loram",
26                                "department"=>"Sales",
27                                "title"=>"VP of Sales",
28                                "telephone"=>"240-555-1287"
29                        );
30                        if (true == $_SESSION['isAdmin']) {
31                                $employee['homeAddress'] = array(
32                                        "street"=>"283 N. Market St.",
33                                        "city"=>"Frederick",
34                                        "state"=>"MD"
35                                );
36                        }
37                        break;
38                case '3':
39                        $employee = array(
40                                "employeeId"=>3,
41                                "firstName"=>"Sally",
42                                "lastName"=>"Beogagi",
43                                "department"=>"Human Resources",
44                                "title"=>"Senior Hiring Agent",
45                                "telephone"=>"443-555-1220"
46                        );
47                        if (true == $_SESSION['isAdmin']) {
48                                $employee['homeAddress'] = array(
49                                        "street"=>"8923 Redwood St.",
50                                        "city"=>"Ellicott City",
51                                        "state"=>"MD"
52                                );
53                        }
54                        break;
55                case '4':
56                        $employee = array(
57                                "employeeId"=>4,
58                                "firstName"=>"Billy",
59                                "lastName"=>"Diarmaid",
60                                "department"=>"Human Resources",
61                                "title"=>"Hiring Agent",
62                                "telephone"=>"443-555-2890"
63                        );
64                        if (true == $_SESSION['isAdmin']) {
65                                $employee['homeAddress'] = array(
66                                        "street"=>"893 Madison St.",
67                                        "city"=>"Mt. Airy",
68                                        "state"=>"MD"
69                                );
70                        }
71                        break;
72                case '5':
73                        $employee = array(
74                                "employeeId"=>5,
75                                "firstName"=>"Bruno",
76                                "lastName"=>"Domingos",
77                                "department"=>"Technology",
78                                "title"=>"CTO",
79                                "telephone"=>"443-555-2890"
80                        );
81                        if (true == $_SESSION['isAdmin']) {
82                                $employee['homeAddress'] = array(
83                                        "street"=>"123 5th St.",
84                                        "city"=>"Washington",
85                                        "state"=>"DC"
86                                );
87                        }
88                        break;         
89        }
90        echo json_encode($employee);
91?>
Note: See TracBrowser for help on using the repository browser.