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