/[libdata]/trunk/admin/scribe_transaction.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 /trunk/admin/scribe_transaction.phtml

Parent Directory Parent Directory | Revision Log Revision Log


Revision 18 - (show annotations)
Tue Jan 27 20:42:02 2004 UTC (17 years, 10 months ago) by dpavlin
File size: 5649 byte(s)
Initial revision

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."scribe_application.php");
11
12 // Collect access information
13 if (isset($libsession)) {
14
15 // Fetch session information
16 $sessionClass = new sessionClass("", $libsession, "", "");
17 $accessClass = new accessClass($sessionClass);
18
19 // Load user session variables
20 $sess_time_human = $sessionClass->time_human;
21 $sess_staff_account = $sessionClass->staff_account;
22 $sess_staff_id = $accessClass->staff_id;
23 $sess_access_level = $accessClass->access_level;
24 $sess_access = $accessClass->access;
25 //$sess_last_name = $accessClass->last_name;
26 //$sess_first_name = $accessClass->first_name;
27
28 }
29
30
31 // If the cookie is set and access level is appropriate
32 if(isset($libsession) && $sess_access_level >= 20) {
33
34 // First, we update the page for any transaction involves a page and a user
35 if ($page_id > 0 && strlen($sess_staff_account) > 0) {
36 updateScribeUpdate($con, $page_id, $sess_staff_account);
37 }
38
39 // Then determine which SQL function to perform
40 switch ($transaction){
41
42 // Assignment-type transactions
43 case "assignPageStaff":
44 assignPageStaff($con, $page_id, $staff_id_array);
45 break;
46 case "assignStaffCoordinator":
47 assignStaffCoordinator($con, $page_id, $staff_coordinator);
48 break;
49
50 // Delete transactions
51 case "deleteCopyBuffer":
52 deleteCopyBuffer($con, $page_id, $paste_staff_id);
53 break;
54 case "deleteElement":
55 deleteElement($con, $page_id, $place_array_HTML, $promote);
56 break;
57 case "deletePage":
58 deletePage($con, $page_id);
59 break;
60 case "deletePageConfirm":
61 deletePageConfirm($con, $page_id);
62 break;
63 case "deletePageStaff":
64 deletePageStaff($con, $page_id, $staff_list_array);
65 break;
66 case "deleteCoursePers":
67 deleteCoursePers($con, $course_id, $page_id, $personnel_id);
68 break;
69
70 // Insert a new element
71 case "copyPasteElement":
72 copyPasteElement($con, $page_id, $place_array_HTML, $copysingle, $sess_staff_id);
73 break;
74 case "pasteElement":
75 pasteElement($con, $element_order, $indent_level, $page_id, $position, $sess_staff_id);
76 break;
77 case "insertScribeLabel":
78 insertScribeLabel($con, $element_descr, $label, $label_url, $place_array_HTML, $page_id);
79 break;
80 case "insertScribeLocation":
81 insertScribeLocation($con, $location_id, $place_array_HTML, $page_id);
82 break;
83 case "insertScribeResource":
84 insertScribeResource($con, $place_array_HTML, $resource_id, $page_id);
85 break;
86 case "insertScribeRQS":
87 insertScribeRQS($con, $place_array_HTML, $subject_id, $page_id);
88 break;
89 case "insertScribeRQSLink":
90 insertScribeRQSLink($con, $place_array_HTML, $subject_id, $page_id);
91 break;
92 case "insertScribeService":
93 insertScribeService($con, $place_array_HTML, $page_id, $service_id);
94 break;
95 case "insertScribeStaff":
96 insertScribeStaff($con, $place_array_HTML, $staff_id, $page_id);
97 break;
98 case "insertCoursePers":
99 insertCoursePers($con, $course_id, $faculty_id, $page_id, $pers_email,
100 $pers_firstname, $pers_lastname, $pers_type, $pers_account,
101 $staff_id, $stafftitle_id);
102 break;
103
104 // Element changes
105 case "elementDecrease":
106 elementDecrease($con, $element_id, $page_id, $position);
107 break;
108 case "elementDown":
109 elementDown($con, $element_id, $page_id, $position);
110 break;
111 case "elementIncrease":
112 elementIncrease($con, $element_id, $page_id, $position);
113 break;
114 case "elementMultiFormat":
115 elementMultiFormat($con, $auto_element_size, $auto_indent_level, $page_id);
116 break;
117 case "elementSize":
118 elementSize($con, $element_id, $page_id, $position, $size);
119 break;
120 case "elementUp":
121 elementUp($con, $element_id, $page_id, $position);
122 break;
123 case "updateScribeElement":
124 updateScribeElement($con, $element_descr, $element_id, $label, $label_flag, $label_url, $page_id, $position);
125 break;
126
127 // General page updates
128 case "pageTemplate":
129 pageTemplate($con, $page_id, $sess_staff_id, $sess_staff_account);
130 break;
131 case "pageTemplateConfirm":
132 pageTemplateConfirm($con, $page_id, $sess_staff_id, $sess_staff_account);
133 break;
134 case "scribePublish":
135 scribePublish($con, $page_id);
136 break;
137 case "scribeUnpublish":
138 scribeUnpublish($con, $page_id);
139 break;
140 case "toggleTOCDisplay":
141 toggleTOCDisplay($con, $display_toc, $page_id);
142 break;
143 case "toggleTOCWrap":
144 toggleTOCWrap($con, $page_id, $wrap_toc);
145 break;
146 case "toggleUpDisplay":
147 toggleUpDisplay($con, $display_up, $page_id, $up_text);
148 break;
149 case "toggleUpText":
150 toggleUpText($con, $page_id, $up_text);
151 break;
152 case "toggleURLDisplay":
153 toggleURLDisplay($con, $display_urls, $page_id);
154 break;
155 case "updatePageDebug":
156 updatePageDebug($con, $page_debug, $page_id);
157 break;
158 case "updatePageHeader":
159 updatePageHeader($con, $page_id, $pageheader);
160 break;
161 case "updatePageTitleStyle":
162 updatePageTitleStyle($con, $page_id, $pagetitle_style);
163 break;
164 case "updateScribeHeader":
165 updateScribeHeader($con, $course_id, $page_id, $page_title, $pagetype_id);
166 break;
167 case "updateScribeStyle":
168 updateScribeStyle($con, $page_id, $style_id);
169 break;
170
171 // Course header updates
172 case "updateScribeCourse":
173 updateScribeCourse($con, $course_id, $field_name, $field_value, $page_id);
174 break;
175
176 } // end switch
177 } // if access
178
179 // No access
180 else require_once ($GLOBAL_NO_ACCESS);
181 ?>
182
183

  ViewVC Help
Powered by ViewVC 1.1.26