/[libdata]/branches/paul/admin/insert.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

Annotation of /branches/paul/admin/insert.phtml

Parent Directory Parent Directory | Revision Log Revision Log


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

1 dpavlin 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."insert.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 dpavlin 67 // 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 dpavlin 1 // 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 dpavlin 67 /********************************************
56     ** Functions requiring author level access **
57     ********************************************/
58 dpavlin 1 if(isset($libsession) && $sess_access_level >= 20) {
59    
60     // Determine which transaction function to call
61     switch ($transaction){
62    
63     // Insert
64     case "insertResource":
65 dpavlin 67 insertResource($annotation, $author, $call_no, $cat_num, $coverage_detail, $edition,
66     $guide_url, $infotype_id, $mastersubject_id, $other_title, $pub_date, $publisher,
67     $resource_message, $resource_status, $sess_staff_account, $sources_indexed,
68     $title, $url, $vendor_id);
69 dpavlin 1 break;
70 dpavlin 67 case "insertSubject":
71     insertSubject($sess_staff_account, $sess_staff_id, $subject, $subject_descr, $sublocation_id);
72 dpavlin 1 break;
73 dpavlin 67 } // end author inserts
74 dpavlin 1
75    
76 dpavlin 67 /*********************************************
77     ** Functions requiring manager level access **
78     *********************************************/
79 dpavlin 1
80 dpavlin 67 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     } // end logged in at author or higher
130    
131 dpavlin 1 // 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