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 |
|
12 |
// HTML header |
13 |
printf("<HTML>\n"); |
14 |
printf("<HEAD>\n"); |
15 |
printf("<title>%s Authoring Console</title>\n", $GLOBAL_SYS_NAME); |
16 |
printf("<link rel=\"stylesheet\" href=\"%s\" type=\"text/css\">\n", $GLOBAL_ADMIN_CSS); |
17 |
printf("</HEAD>\n"); |
18 |
|
19 |
|
20 |
// Default access settings |
21 |
$sess_time_human = ""; |
22 |
$sess_staff_account = ""; |
23 |
$sess_staff_id = 0; |
24 |
$sess_access_level = 0; |
25 |
$sess_access = ""; |
26 |
$sess_last_name = ""; |
27 |
$sess_first_name = ""; |
28 |
|
29 |
|
30 |
// Page header |
31 |
require_once ($GLOBAL_ADMIN_HEADER); |
32 |
|
33 |
|
34 |
// Collect access information |
35 |
if (isset($libsession)) { |
36 |
|
37 |
// Fetch session information |
38 |
$sessionClass = new sessionClass("", $libsession, "", ""); |
39 |
$accessClass = new accessClass($sessionClass); |
40 |
|
41 |
// Load user session variables |
42 |
$sess_time_human = $sessionClass->time_human; |
43 |
$sess_staff_account = $sessionClass->staff_account; |
44 |
$sess_staff_id = $accessClass->staff_id; |
45 |
$sess_access_level = $accessClass->access_level; |
46 |
$sess_access = $accessClass->access; |
47 |
$sess_last_name = $accessClass->last_name; |
48 |
$sess_first_name = $accessClass->first_name; |
49 |
|
50 |
} |
51 |
|
52 |
|
53 |
// If the cookie is set and access level is appropriate |
54 |
if(isset($libsession) && $sess_access_level >= 20) { |
55 |
?> |
56 |
<h2>Authoring Console</h2> |
57 |
<table> |
58 |
<tr> |
59 |
<td> |
60 |
Welcome, |
61 |
<?php |
62 |
printf("%s %s (%s)<BR>\n", $sess_first_name, $sess_last_name, $sess_staff_account); |
63 |
|
64 |
// Uncomment if display of this is desired: |
65 |
//print "<br>\n"; |
66 |
//printf("ACL: %s(%d). Logged in at: %s\n", $sess_access, $sess_access_level, $sess_time_human); |
67 |
//printf("staff id: %d<BR>", $sess_staff_id); |
68 |
|
69 |
?> |
70 |
</td> |
71 |
<td> |
72 |
<?php |
73 |
printf("<form method=\"POST\" action=\"%s\">\n", $GLOBAL_AUTH_URL); |
74 |
printf("<input type=\"Submit\" value =\"Logout\">\n"); |
75 |
printf("<input type=\"Hidden\" name=\"session_id\" value=\"%s\">", $libsession); |
76 |
printf("</form>"); |
77 |
?> |
78 |
</td> |
79 |
</tr> |
80 |
</table> |
81 |
|
82 |
<table border="0" cellpadding="20" cellspacing="0" class="backLight" width="765"> |
83 |
<tr> |
84 |
<td valign="top"> |
85 |
<span class="biggerDark">Page Authoring</span><br> |
86 |
<i>Edit the pages you have control over:</i> |
87 |
<br><br> |
88 |
|
89 |
|
90 |
<span class="bigDark">Research QuickStart pages</span> |
91 |
<?php |
92 |
printf("<form method = \"POST\" action = \"subject_builder.phtml\" >\n"); |
93 |
printf("<select name = \"subject_id\" size=\"6\">\n"); |
94 |
dropDownAuthSubjects($sess_access_level, $sess_staff_id); |
95 |
printf("</select>\n"); |
96 |
print "<br>\n"; |
97 |
printf("<input type = \"Submit\" value = \"Edit Page\" > "); |
98 |
?> |
99 |
<br><a href="select_row.phtml?table=subject&key_field=subject_id&display_field=subject&display=Subject&size=25&limit=*">New or Delete</a> |
100 |
</form> |
101 |
|
102 |
<br><br> |
103 |
|
104 |
<span class="bigDark">CourseLib pages</span> |
105 |
<br> |
106 |
|
107 |
<form method = "POST" action = "scribe.phtml"> |
108 |
<select name = "page_id" size="6"> |
109 |
<?php |
110 |
dropDownAuthCourses($sess_access_level, $sess_staff_id); |
111 |
?> |
112 |
</select><br> |
113 |
<input type = "submit" value = "Edit or Delete Page"><br> |
114 |
<a href="scribe_start.phtml?pagetype_id=3">Create a new CourseLib Page</a> |
115 |
</form> |
116 |
|
117 |
<br><br> |
118 |
<span class="bigDark">PageScribe pages</span><br> |
119 |
|
120 |
|
121 |
<form method = "POST" action = "scribe.phtml"> |
122 |
<select name = "page_id" size="6"> |
123 |
<?php |
124 |
dropDownAuthPages($sess_access_level, $sess_staff_id); |
125 |
?> |
126 |
</select><br> |
127 |
<input type = "submit" value = "Edit or Delete Page"> |
128 |
<br> |
129 |
<a href="scribe_start.phtml?pagetype_id=2">Create a new PageScribe Page</a> |
130 |
</form> |
131 |
|
132 |
<br> |
133 |
<br> |
134 |
|
135 |
<ul> |
136 |
<li><b><a href="page_search.phtml">Search for CourseLib or PageScribe Pages</a></b></li> |
137 |
<li><b><a href="scribe_stats.phtml">CourseLib and PageScribe page statistics</a></b></li> |
138 |
<li><b><a href="subject_stats.phtml">RQS Subject Page Load Statistics</a></li> |
139 |
</ul> |
140 |
</td> |
141 |
|
142 |
<td width="2" valign="top"> |
143 |
<table border="0" cellpadding="0" cellspacing="0"> |
144 |
<tr> |
145 |
<td width="2" bgcolor="#800000"> |
146 |
<img src="/Images/blank.gif" height="550" width="2" alt=""> |
147 |
</td> |
148 |
</tr> |
149 |
</table> |
150 |
</td> |
151 |
|
152 |
<td valign="top"> |
153 |
|
154 |
<span class="biggerDark">Resource Authoring</span><br> |
155 |
|
156 |
<i>Create, edit or delete the resources you attach to your pages.</i><br><br> |
157 |
<span class="biggerDark">1.</span> <span class="bigDark">Search for Resources to View or Edit</span><br> |
158 |
|
159 |
<p><i><b>Important!</b> Before <b>adding a new resource</b>, check to see if the resource already exists in the database...</i></p> |
160 |
|
161 |
<form method="POST" action="res_results_brief.phtml"> |
162 |
<b>Title:</b> <input type="text" name="title" style="width: 200px" size="20"> |
163 |
<input type="hidden" name="orderby" value="title" checked> |
164 |
<input type="hidden" name="orderdir" value="ASC" checked> |
165 |
<input type="Submit" value="Search"> |
166 |
</form> |
167 |
|
168 |
<p><a href="res_search.phtml">Advanced Search</a></p> |
169 |
<hr noshade> |
170 |
<p><span class="biggerDark">2.</span> <span class="bigDark">Add a New Resource</span></p> |
171 |
|
172 |
<form method="post" action="new_resource.phtml"> |
173 |
<b>Title:</b> <input type="text" style="width: 200px" size="20" name="title"><input type="submit" value="Add Title!"> |
174 |
|
175 |
<br><br> |
176 |
<i>If you know what you are doing, fill out the following<br> or just leave blank for more instruction ...</i><br><br> |
177 |
<b>Initial Master Subject:</b><br> |
178 |
|
179 |
<select name = "mastersubject_id"> |
180 |
<?php dropDownFieldOmit("mastersubject", "mastersubject", "mastersubject_id", " WHERE mastersubject_id <> 2"); ?> |
181 |
</select><br><br> |
182 |
|
183 |
<b>Limit to Master Information Type:</b><br> |
184 |
|
185 |
<select name = "masterinfotype_id"> |
186 |
<?php dropDownFieldOmit("masterinfotype", "masterinfotype", "masterinfotype_id", " WHERE masterinfotype_id > 0"); ?> |
187 |
</select> |
188 |
|
189 |
<br><br> |
190 |
<i>Or click <a href="info_structure.phtml">here</a> to familiarize yourself with available |
191 |
information relationships</i> |
192 |
|
193 |
<input type="Hidden" name="table" value="resource"> |
194 |
<input type="Hidden" name="operation" value="New"> |
195 |
</form> |
196 |
|
197 |
|
198 |
<br><br> |
199 |
<hr noshade> |
200 |
<h3>Edit or Delete by ID number</h3> |
201 |
|
202 |
<table width="100%"> |
203 |
<tr> |
204 |
<td> |
205 |
<form method="POST" action="operation.phtml"> |
206 |
<input type="Hidden" name="table" value="resource"> |
207 |
<input type="Hidden" name="operation" value="Edit"> |
208 |
<b>ID:</b> <input type="text" name="key_id" size="6"> |
209 |
<br><br> |
210 |
<input type="submit" value="Edit"> |
211 |
</form> |
212 |
</td> |
213 |
|
214 |
<td> |
215 |
<form method="POST" action="delete.phtml"> |
216 |
<input type="Hidden" name="transaction" value="deleteResourceConfirm"> |
217 |
<b>ID:</b> <input type="text" name="resource_id" size="6"> |
218 |
<br><br> |
219 |
<input type="submit" value="Delete"> |
220 |
</form> |
221 |
</td> |
222 |
</tr> |
223 |
</table> |
224 |
|
225 |
</td> |
226 |
</tr> |
227 |
</table> |
228 |
<br> |
229 |
|
230 |
<table border="0" cellpadding = "5" cellspacing="0" class="backLight" width="765"> |
231 |
|
232 |
<tr> |
233 |
<td width="30%"> |
234 |
<span class="bigDark">Information Type</span> |
235 |
</td> |
236 |
|
237 |
<form method="POST" action="infotype_drill.phtml"> |
238 |
<td> |
239 |
|
240 |
<select name ="infotype_id"> |
241 |
<?php dropDownFieldOmit("infotype", "infotype", "infotype_id", " WHERE infotype_id > 0 "); ?> |
242 |
</select> |
243 |
</td> |
244 |
<td width="30%"> |
245 |
<input type="Submit" value="Drilldown"> |
246 |
</td> |
247 |
</form> |
248 |
</tr> |
249 |
|
250 |
<tr> |
251 |
<td> |
252 |
<span class="bigDark">General Information Type</span> |
253 |
</td> |
254 |
|
255 |
<form method="POST" action="masterinfotype_drill.phtml"> |
256 |
<td> |
257 |
<select name ="masterinfotype_id"> |
258 |
<?php dropDownFieldOmit("masterinfotype", "masterinfotype", "masterinfotype_id", " WHERE masterinfotype_id > 0 "); ?> |
259 |
</select> |
260 |
</td> |
261 |
<td> |
262 |
<input type="Submit" value="Drilldown"> |
263 |
</td> |
264 |
</form> |
265 |
</tr> |
266 |
|
267 |
|
268 |
<tr> |
269 |
<td> |
270 |
<span class="bigDark">General Subject</span> |
271 |
</td> |
272 |
|
273 |
<form method="POST" action="mastersubject_drill.phtml"> |
274 |
<td> |
275 |
<select name ="mastersubject_id"> |
276 |
<?php dropDownFieldOmit("mastersubject", "mastersubject", "mastersubject_id", " WHERE mastersubject_id > 0 "); ?> |
277 |
</select> |
278 |
</td> |
279 |
<td> |
280 |
<input type="Submit" value="Drilldown"> |
281 |
|
282 |
</td> |
283 |
</form> |
284 |
</tr> |
285 |
|
286 |
<tr> |
287 |
<td> |
288 |
<span class="bigDark">Resource</span> |
289 |
</td> |
290 |
|
291 |
<form method="POST" action="res_drill.phtml"> |
292 |
<td> |
293 |
<b>Resource ID:</b> |
294 |
<input type = "text" size="10" name="resource_id"> |
295 |
</td> |
296 |
<td> |
297 |
<input type="Submit" value="Drilldown"> |
298 |
|
299 |
</td> |
300 |
</form> |
301 |
</tr> |
302 |
|
303 |
</table> |
304 |
|
305 |
|
306 |
<?php |
307 |
|
308 |
adminReturn($sess_access_level); |
309 |
|
310 |
} // logged in user |
311 |
|
312 |
// No access page |
313 |
else require_once ($GLOBAL_NO_ACCESS); |
314 |
|
315 |
|
316 |
// Page footer |
317 |
require_once ($GLOBAL_ADMIN_FOOTER); |
318 |
?> |
319 |
|
320 |
</center> |
321 |
</HTML> |
322 |
|