/[libdata]/branches/paul/admin/assign.phtml
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Contents of /branches/paul/admin/assign.phtml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 67 - (show annotations)
Thu Mar 18 19:24:54 2004 UTC (20 years, 1 month ago) by dpavlin
File size: 3876 byte(s)
updated to libdata 2.00

1 <?php
2 // Load globals
3 require_once ("global_vars.php");
4
5 // Includes
6 require_once ($GLOBAL_ADMIN_INC."sessionClass.php");
7 require_once ($GLOBAL_ADMIN_INC."accessClass.php");
8 require_once ($GLOBAL_ADMIN_INC."db_connect.php");
9 require_once ($GLOBAL_ADMIN_INC."app_controls.php");
10 require_once ($GLOBAL_ADMIN_INC."assign.php");
11 require_once ($GLOBAL_ADMIN_INC."forms.php");
12
13
14 // HTML header
15 printf("<HTML>\n");
16 printf("<HEAD>\n");
17 printf("<title>Administrative Functions</title>\n");
18 printf("<link rel=\"stylesheet\" href=\"%s\" type=\"text/css\">\n", $GLOBAL_ADMIN_CSS);
19 printf("</HEAD>\n");
20
21
22 // Default access settings
23 $sess_time_human = "";
24 $sess_staff_account = "";
25 $sess_staff_id = 0;
26 $sess_access_level = 0;
27 $sess_access = "";
28 $sess_last_name = "";
29 $sess_first_name = "";
30
31
32 // Page header
33 require_once ($GLOBAL_ADMIN_HEADER);
34
35
36 // Collect access information
37 if (isset($libsession)) {
38
39 // Fetch session information
40 $sessionClass = new sessionClass("", $libsession, "", "");
41 $accessClass = new accessClass($sessionClass);
42
43 // Load user session variables
44 $sess_time_human = $sessionClass->time_human;
45 $sess_staff_account = $sessionClass->staff_account;
46 $sess_staff_id = $accessClass->staff_id;
47 $sess_access_level = $accessClass->access_level;
48 $sess_access = $accessClass->access;
49 $sess_last_name = $accessClass->last_name;
50 $sess_first_name = $accessClass->first_name;
51
52 }
53
54
55 /********************************************
56 ** Functions requiring author level access **
57 ********************************************/
58 if(isset($libsession) && $sess_access_level >= 20) {
59
60 // Determine which transaction function to call
61 switch ($transaction){
62
63 // Bridging Assignments
64 case "assignResFeature":
65 assignResFeature($feature_id_array, $resource_id);
66 break;
67 case "assignResLoc":
68 assignResLoc($location_id_array, $resource_id);
69 break;
70 case "assignResMastersubject":
71 assignResMastersubject($mastersubject_id_array, $resource_id);
72 break;
73 case "assignSubCoursesub":
74 if (authSubject($sess_access_level, $sess_staff_id, $subject_id))
75 assignSubCoursesub($coursesub_id_array, $subject_id);
76 else require_once ($GLOBAL_NO_ACCESS);
77 break;
78 case "assignSubLoc":
79 if (authSubject($sess_access_level, $sess_staff_id, $subject_id))
80 assignSubLoc($location_id_array, $subject_id);
81 else require_once ($GLOBAL_NO_ACCESS);
82 break;
83 case "assignSubMaster":
84 if (authSubject($sess_access_level, $sess_staff_id, $subject_id))
85 assignSubMaster($mastersubject_id_array, $subject_id);
86 else require_once ($GLOBAL_NO_ACCESS);
87 break;
88 case "assignSubStaff":
89 if (authSubject($sess_access_level, $sess_staff_id, $subject_id))
90 assignSubStaff($staff_id_array, $subject_id);
91 else require_once ($GLOBAL_NO_ACCESS);
92 break;
93
94 } // end author assigns
95
96
97
98 /*********************************************
99 ** Functions requiring manager level access **
100 *********************************************/
101 if(isset($libsession) && $sess_access_level >= 100) {
102
103 // Determine which transaction function to call
104 switch ($transaction){
105
106 // Bridging Assignments
107 case "assignLibunitStaff":
108 assignLibunitStaff($staff_id_array, $libunit_id);
109 break;
110 case "assignServLoc":
111 assignServLoc($location_id_array, $service_id);
112 break;
113 case "assignServServtype":
114 assignServServtype($servicetype_id_array, $service_id);
115 break;
116 case "assignStaffLibunit":
117 assignStaffLibunit($libunit_id_array, $staff_id);
118 break;
119 case "assignStaffSub":
120 assignStaffSub($staff_id, $subject_id_array);
121 break;
122 } // end manager assigns
123
124 } // end manager functions
125
126 // Link to return to admin console
127 adminReturn($sess_access_level);
128
129 } // end logged in at author or higher
130
131 // No access
132 else require_once ($GLOBAL_NO_ACCESS);
133
134 // Page footer
135 require_once ($GLOBAL_ADMIN_FOOTER);
136 ?>
137
138 </body>
139 </html>

  ViewVC Help
Powered by ViewVC 1.1.26