provide installation instructions
[extjs.git] / examples / remoteload / loadEmployeePropGrid.php
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['street'] = "123 Bluebird Ct.";
15                                 $employee['city'] = "Columbia";
16                                 $employee['state'] = "MD";
17                                 $employee['salary'] = 118000;                           
18                         }
19                         break;
20                 case '2':
21                         $employee = array(
22                                 "employeeId"=>2,
23                                 "firstName"=>"George",
24                                 "lastName"=>"Loram",
25                                 "department"=>"Sales",
26                                 "title"=>"VP of Sales",
27                                 "telephone"=>"240-555-1287"
28                         );
29                         if (true == $_SESSION['isAdmin']) {
30                                 $employee['street'] = "283 N. Market St.";
31                                 $employee['city'] = "Frederick";
32                                 $employee['state'] = "MD";
33                                 $employee['salary'] = 68000;                            
34                         }
35                 case '3':
36                         $employee = array(
37                                 "employeeId"=>3,
38                                 "firstName"=>"Sally",
39                                 "lastName"=>"Beogagi",
40                                 "department"=>"Human Resources",
41                                 "title"=>"Senior Hiring Agent",
42                                 "telephone"=>"443-555-1220"
43                         );
44                         if (true == $_SESSION['isAdmin']) {
45                                 $employee['street'] = "8923 Redwood St.";
46                                 $employee['city'] = "Ellicott City";
47                                 $employee['state'] = "MD";
48                                 $employee['salary'] = 72000;                            
49                         }
50                         break;
51                 case '4':
52                         $employee = array(
53                                 "employeeId"=>4,
54                                 "firstName"=>"Billy",
55                                 "lastName"=>"Diarmaid",
56                                 "department"=>"Human Resources",
57                                 "title"=>"Hiring Agent",
58                                 "telephone"=>"443-555-2890"
59                         );
60                         if (true == $_SESSION['isAdmin']) {
61                                 $employee['street'] = "893 Madison St.";
62                                 $employee['city'] = "Mt. Airy";
63                                 $employee['state'] = "MD";
64                                 $employee['salary'] = 48000;                            
65                         }
66                         break;
67                 case '5':
68                         $employee = array(
69                                 "employeeId"=>5,
70                                 "firstName"=>"Bruno",
71                                 "lastName"=>"Domingos",
72                                 "department"=>"Technology",
73                                 "title"=>"CTO",
74                                 "telephone"=>"443-555-2890"
75                         );
76                         if (true == $_SESSION['isAdmin']) {
77                                 $employee['street'] = "123 5th St.";
78                                 $employee['city'] = "Washington";
79                                 $employee['state'] = "DC";
80                                 $employee['salary'] = 92000;                            
81                         }
82                         break;          
83         }
84         echo json_encode($employee);
85 ?>