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 |
|
|
|
11 |
|
|
// Collect access information |
12 |
|
|
if (isset($libsession)) { |
13 |
|
|
|
14 |
|
|
// Fetch session information |
15 |
|
|
$sessionClass = new sessionClass("", $libsession, "", ""); |
16 |
|
|
$accessClass = new accessClass($sessionClass); |
17 |
|
|
|
18 |
|
|
// Load user session variables |
19 |
|
|
$sess_time_human = $sessionClass->time_human; |
20 |
|
|
$sess_staff_account = $sessionClass->staff_account; |
21 |
|
|
$sess_access_level = $accessClass->access_level; |
22 |
|
|
$sess_staff_id = $accessClass->staff_id; |
23 |
|
|
$sess_access = $accessClass->access; |
24 |
|
|
$sess_last_name = $accessClass->last_name; |
25 |
|
|
$sess_first_name = $accessClass->first_name; |
26 |
|
|
} |
27 |
|
|
|
28 |
|
|
// Page header |
29 |
|
|
require_once ($GLOBAL_ADMIN_INC."scribe_header.phtml"); |
30 |
|
|
|
31 |
|
|
// If the cookie is set and access level is appropriate |
32 |
|
|
if(isset($libsession) && $sess_access_level >= 20) { |
33 |
|
|
|
34 |
|
|
?> |
35 |
|
|
|
36 |
|
|
|
37 |
|
|
<center> |
38 |
|
|
|
39 |
|
|
|
40 |
|
|
|
41 |
|
|
<BR><BR> |
42 |
|
|
|
43 |
|
|
<table border="1" width="80%" class="backLight"><tr><td> |
44 |
|
|
<table width="100%" border = "0" cellpadding="4"> |
45 |
|
|
|
46 |
|
|
<tr> |
47 |
|
|
<td colspan="2" class="cellPlain"> |
48 |
|
|
Design a New CourseLib or PageScribe Page |
49 |
|
|
</td> |
50 |
|
|
</tr> |
51 |
|
|
|
52 |
|
|
<tr> |
53 |
|
|
<td colspan="2"> |
54 |
|
|
<form method = "POST" action = "scribe.phtml"> |
55 |
|
|
<b>New Course/Page Name:</b> <input type = "text" size="50" name = "page_title"><br><br> |
56 |
|
|
|
57 |
|
|
</td> |
58 |
|
|
</tr> |
59 |
|
|
|
60 |
|
|
<tr> |
61 |
|
|
<td width="30%" valign="top"> |
62 |
|
|
<b>Page Type:</b><br> |
63 |
|
|
|
64 |
|
|
<?php |
65 |
|
|
|
66 |
|
|
// Pre-check the appropriate radio button |
67 |
|
|
if ($pagetype_id == 3) $checked_courselib = "CHECKED"; |
68 |
|
|
else $checked_pagescribe = "CHECKED"; |
69 |
|
|
|
70 |
|
|
printf("<input type = \"radio\" value = \"3\" name = \"pagetype_id\" %s>CourseLib page<br>\n", $checked_courselib); |
71 |
|
|
printf("<input type = \"radio\" value = \"2\" name = \"pagetype_id\" %s >PageScribe page", $checked_pagescribe); |
72 |
|
|
?> |
73 |
|
|
<br><br> |
74 |
|
|
</td> |
75 |
|
|
|
76 |
|
|
<td width="70%" valign="top"> |
77 |
|
|
<b>Note:</b> CourseLib pages should be associated with an academic course designator, |
78 |
|
|
and other course-related fields, so they may be properly mapped. If you intend to |
79 |
|
|
make a more general page, please select PageScribe. |
80 |
|
|
</td> |
81 |
|
|
|
82 |
|
|
|
83 |
|
|
</tr> |
84 |
|
|
|
85 |
|
|
<tr> |
86 |
|
|
<td colspan = "2" align="center"> |
87 |
|
|
<input type="hidden" name="style_id" value="2"> |
88 |
|
|
<input type = "hidden" name = "page_id" value = "0"> |
89 |
|
|
<input type = "Submit" value = "Submit"> |
90 |
|
|
</td></form> |
91 |
|
|
</tr> |
92 |
|
|
|
93 |
|
|
</table> |
94 |
|
|
</td></tr></table> |
95 |
|
|
<br><br> |
96 |
|
|
<table width="80%" border="1" class="backLight"><tr><td> |
97 |
|
|
<table width="100%" border = "0" cellpadding="4"> |
98 |
|
|
<tr> |
99 |
|
|
<td colspan="2" class="cellPlain"> |
100 |
|
|
Load a Saved Page |
101 |
|
|
</td> |
102 |
|
|
</tr> |
103 |
|
|
|
104 |
|
|
<tr> |
105 |
|
|
<td align="right" width="20%"> |
106 |
|
|
|
107 |
|
|
<b>PageScribe pages authorized to edit:</b> |
108 |
|
|
</td> |
109 |
|
|
<td align="left" width="80%"> |
110 |
|
|
<form method = "POST" action = "scribe.phtml"> |
111 |
|
|
<select name = "page_id"> |
112 |
|
|
<?php |
113 |
|
|
dropDownAuthPages($con, $sess_access_level, $sess_staff_id); |
114 |
|
|
?> |
115 |
|
|
</select> |
116 |
|
|
<input type = "submit" value = "Load"> |
117 |
|
|
|
118 |
|
|
</td></form> |
119 |
|
|
</tr> |
120 |
|
|
|
121 |
|
|
<tr> |
122 |
|
|
<td align="right" width="20%"> |
123 |
|
|
|
124 |
|
|
<b>CourseLib pages authorized to edit:</b> |
125 |
|
|
</td> |
126 |
|
|
<td align="left" width="80%"> |
127 |
|
|
<form method = "POST" action = "scribe.phtml"> |
128 |
|
|
<select name = "page_id"> |
129 |
|
|
<?php |
130 |
|
|
dropDownAuthCourses($con, $sess_access_level, $sess_staff_id); |
131 |
|
|
?> |
132 |
|
|
</select> |
133 |
|
|
<input type = "submit" value = "Load"> |
134 |
|
|
|
135 |
|
|
</td></form> |
136 |
|
|
</tr> |
137 |
|
|
|
138 |
|
|
|
139 |
|
|
<tr> |
140 |
|
|
<td colspan = "2"> |
141 |
|
|
|
142 |
|
|
</td> |
143 |
|
|
</tr> |
144 |
|
|
|
145 |
|
|
|
146 |
|
|
<tr> |
147 |
|
|
<td width="50%" align="center"> |
148 |
|
|
<form method="POST" action="page_search.phtml"> |
149 |
|
|
<input type="Submit" value="Search PageScribe Pages"> |
150 |
|
|
</form> |
151 |
|
|
</td> |
152 |
|
|
<td width="50%" align="center"> |
153 |
|
|
<form method="POST" action="scribe_stats.phtml"> |
154 |
|
|
<input type="Submit" value="PageScribe Statistics"> |
155 |
|
|
</form> |
156 |
|
|
</td> |
157 |
|
|
</tr> |
158 |
|
|
|
159 |
|
|
</table> |
160 |
|
|
</td></tr></table> |
161 |
|
|
|
162 |
|
|
<br><br> |
163 |
|
|
<table width="80%" border="1" class="backLight"><tr><td> |
164 |
|
|
<table width="100%" border = "0" cellpadding="4"> |
165 |
|
|
<tr> |
166 |
|
|
<td colspan="2" class="cellPlain"> |
167 |
|
|
Clone an Existing Page as a New Template |
168 |
|
|
</td> |
169 |
|
|
</tr> |
170 |
|
|
|
171 |
|
|
<tr> |
172 |
|
|
|
173 |
|
|
<td align="right" width="20%"> |
174 |
|
|
|
175 |
|
|
<b>PageScribe pages:</b> |
176 |
|
|
</td> |
177 |
|
|
|
178 |
|
|
<td align="left" width="80%"> |
179 |
|
|
<form method = "POST" action = "scribe_transaction.phtml"> |
180 |
|
|
<select name = "page_id"> |
181 |
|
|
<?php |
182 |
|
|
dropDownFieldOmit($con, "page", "page_title", "page_id", " WHERE pagetype_id = 2"); |
183 |
|
|
printf("</select>"); |
184 |
|
|
printf("<input type=\"hidden\" name =\"transaction\" value = \"pageTemplateConfirm\">\n"); |
185 |
|
|
printf("<input type=\"hidden\" name =\"sess_staff_account\" value = \"%d\">\n", $sess_staff_account); |
186 |
|
|
printf("<input type=\"hidden\" name =\"sess_staff_id\" value = \"%d\">\n", $sess_staff_id); |
187 |
|
|
?> |
188 |
|
|
<input type = "submit" value = "Clone & Load"> |
189 |
|
|
|
190 |
|
|
</td></form> |
191 |
|
|
</tr> |
192 |
|
|
|
193 |
|
|
<tr> |
194 |
|
|
|
195 |
|
|
<td align="right" width="20%"> |
196 |
|
|
|
197 |
|
|
<b>CourseLib pages:</b> |
198 |
|
|
</td> |
199 |
|
|
<td align="left" width="80%"> |
200 |
|
|
<form method ="POST" action="scribe_transaction.phtml"> |
201 |
|
|
<select name = "page_id"> |
202 |
|
|
<?php |
203 |
|
|
dropDownCourses($con); |
204 |
|
|
printf("</select>\n"); |
205 |
|
|
printf("<input type=\"hidden\" name =\"transaction\" value = \"pageTemplateConfirm\">\n"); |
206 |
|
|
printf("<input type=\"hidden\" name =\"sess_staff_account\" value = \"%d\">\n", $sess_staff_account); |
207 |
|
|
printf("<input type=\"hidden\" name =\"sess_staff_id\" value = \"%d\">\n", $sess_staff_id); |
208 |
|
|
?> |
209 |
|
|
|
210 |
|
|
<input type = "submit" value = "Clone & Load"> |
211 |
|
|
|
212 |
|
|
</td></form> |
213 |
|
|
</tr> |
214 |
|
|
|
215 |
|
|
</table> |
216 |
|
|
</td></tr></table> |
217 |
|
|
|
218 |
|
|
|
219 |
|
|
<br> |
220 |
|
|
</center> |
221 |
|
|
|
222 |
|
|
<?php |
223 |
|
|
// Link to return to admin console |
224 |
|
|
adminReturn($sess_access_level); |
225 |
|
|
|
226 |
|
|
|
227 |
|
|
} // logged in user |
228 |
|
|
|
229 |
|
|
// No access |
230 |
|
|
else require_once ($GLOBAL_NO_ACCESS); |
231 |
|
|
|
232 |
|
|
|
233 |
|
|
// Page footer |
234 |
|
|
require_once ($GLOBAL_ADMIN_FOOTER); |
235 |
|
|
?> |
236 |
|
|
|
237 |
|
|
|
238 |
|
|
</center> |
239 |
|
|
</body> |
240 |
|
|
</html> |