11 |
require_once ($GLOBAL_ADMIN_INC."forms.php"); |
require_once ($GLOBAL_ADMIN_INC."forms.php"); |
12 |
|
|
13 |
|
|
|
|
|
14 |
// HTML header |
// HTML header |
15 |
printf("<HTML>\n"); |
printf("<HTML>\n"); |
16 |
printf("<HEAD>\n"); |
printf("<HEAD>\n"); |
19 |
printf("</HEAD>\n"); |
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 |
// Page header |
33 |
require_once ($GLOBAL_ADMIN_HEADER); |
require_once ($GLOBAL_ADMIN_HEADER); |
34 |
|
|
52 |
} |
} |
53 |
|
|
54 |
|
|
55 |
// If the cookie is set and access level is appropriate |
/******************************************** |
56 |
|
** Functions requiring author level access ** |
57 |
|
********************************************/ |
58 |
if(isset($libsession) && $sess_access_level >= 20) { |
if(isset($libsession) && $sess_access_level >= 20) { |
59 |
|
|
60 |
// Determine which transaction function to call |
// Determine which transaction function to call |
61 |
switch ($transaction){ |
switch ($transaction){ |
62 |
|
|
63 |
// Insert |
// Insert |
|
case "insertCoursesub": |
|
|
insertCoursesub($con, $campus_id, $cip_code, $coursesub, $coursesub_descr); |
|
|
break; |
|
|
case "insertFaculty": |
|
|
insertFaculty($con, $faculty_email, $faculty_firstname, $faculty_lastname, $faculty_account); |
|
|
break; |
|
|
case "insertFeature": |
|
|
insertFeature($con, $feature, $image_alt, $image_path); |
|
|
break; |
|
|
case "insertInfotype": |
|
|
insertInfotype($con, $infotype, $masterinfotype_id, $mastersubject_id); |
|
|
break; |
|
|
case "insertLibunit": |
|
|
insertLibunit($con, $head_staff_id, $libunit, $libunit_abbrev); |
|
|
break; |
|
|
case "insertLocation": |
|
|
insertLocation($con, $address1, $address2, $address3, $address4, $campus, |
|
|
$hoursURL, $location, $location_descr, $mainURL, $mapURL, $referenceURL, $telephone); |
|
|
break; |
|
64 |
case "insertResource": |
case "insertResource": |
65 |
insertResource($con, $annotation, $author, $call_no, $cat_num, $coverage_detail, $edition, |
insertResource($annotation, $author, $call_no, $cat_num, $coverage_detail, $edition, |
66 |
$infotype_id, $mastersubject_id, $other_title, $pub_date, $publisher, |
$guide_url, $infotype_id, $mastersubject_id, $other_title, $pub_date, $publisher, |
67 |
$sess_staff_account, $sources_indexed, $title, $url); |
$resource_message, $resource_status, $sess_staff_account, $sources_indexed, |
68 |
break; |
$title, $url, $vendor_id); |
|
case "insertService": |
|
|
insertService($con, $address1, $address2, $address3, $address4, $email, $fax, |
|
|
$nonaff, $service, $serviceDescr, $serviceURL, $telephone); |
|
|
break; |
|
|
case "insertSingleField": |
|
|
insertSingleField($con, $display, $field, $newValue, $table); |
|
|
break; |
|
|
case "insertStaff": |
|
|
insertStaff($con, $access_id, $first_name, $last_name, $sess_access_level, |
|
|
$staff_account, $staff_email, $stafftitle_id); |
|
|
break; |
|
|
case "insertStyle": |
|
|
insertStyle($con, $css_file, $footer_file, $header_file, $style_title); |
|
69 |
break; |
break; |
70 |
case "insertSubject": |
case "insertSubject": |
71 |
insertSubject($con, $sess_staff_account, $sess_staff_id, $subject, $subject_descr, $sublocation_id); |
insertSubject($sess_staff_account, $sess_staff_id, $subject, $subject_descr, $sublocation_id); |
72 |
break; |
break; |
73 |
} |
} // end author inserts |
74 |
|
|
75 |
|
|
76 |
// Link to return to admin console |
/********************************************* |
77 |
adminReturn($sess_access_level); |
** Functions requiring manager level access ** |
78 |
|
*********************************************/ |
79 |
|
|
80 |
|
if(isset($libsession) && $sess_access_level >= 100) { |
81 |
|
|
82 |
|
// Determine which transaction function to call |
83 |
|
switch ($transaction){ |
84 |
|
|
85 |
|
// Insert |
86 |
|
case "insertCoursesub": |
87 |
|
insertCoursesub($campus_id, $cip_code, $coursesub, $coursesub_descr); |
88 |
|
break; |
89 |
|
case "insertFaculty": |
90 |
|
insertFaculty($faculty_email, $faculty_firstname, $faculty_lastname, $faculty_account); |
91 |
|
break; |
92 |
|
case "insertFeature": |
93 |
|
insertFeature($feature, $image_alt, $image_path); |
94 |
|
break; |
95 |
|
case "insertInfotype": |
96 |
|
insertInfotype($infotype, $masterinfotype_id, $mastersubject_id); |
97 |
|
break; |
98 |
|
case "insertLibunit": |
99 |
|
insertLibunit($head_staff_id, $libunit, $libunit_abbrev); |
100 |
|
break; |
101 |
|
case "insertLocation": |
102 |
|
insertLocation($address1, $address2, $address3, $address4, $campus, |
103 |
|
$hoursURL, $location, $location_descr, $mainURL, $mapURL, $referenceURL, $telephone); |
104 |
|
break; |
105 |
|
case "insertService": |
106 |
|
insertService($address1, $address2, $address3, $address4, $email, $fax, |
107 |
|
$nonaff, $service, $serviceDescr, $serviceURL, $telephone); |
108 |
|
break; |
109 |
|
case "insertSingleField": |
110 |
|
insertSingleField($display, $field, $newValue, $table); |
111 |
|
break; |
112 |
|
case "insertStaff": |
113 |
|
insertStaff($access_id, $first_name, $last_name, $sess_access_level, |
114 |
|
$staff_account, $staff_email, $stafftitle_id); |
115 |
|
break; |
116 |
|
case "insertStyle": |
117 |
|
insertStyle($css_file, $footer_file, $header_file, $style_title); |
118 |
|
break; |
119 |
|
case "insertVendor": |
120 |
|
insertVendor($vendor, $vendor_descr, $vendor_message, $vendor_status); |
121 |
|
break; |
122 |
|
} // end manager inserts |
123 |
|
|
124 |
|
} // end manager functions |
125 |
|
|
126 |
|
// Link to return to admin console |
127 |
|
adminReturn($sess_access_level); |
128 |
|
|
129 |
} // logged in |
} // end logged in at author or higher |
130 |
|
|
131 |
// No access |
// No access |
132 |
else require_once ($GLOBAL_NO_ACCESS); |
else require_once ($GLOBAL_NO_ACCESS); |