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

Parent Directory Parent Directory | Revision Log Revision Log


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

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 require_once ($GLOBAL_ADMIN_INC."scribe_fix.php");
12
13 // HTML header
14 printf("<HTML>\n");
15 printf("<HEAD>\n");
16 printf("<title>CourseLib/PageScribe Page Debugger</title>\n");
17 printf("<link rel=\"stylesheet\" href=\"%s\" type=\"text/css\">\n", $GLOBAL_ADMIN_CSS);
18 printf("</HEAD>\n");
19
20
21 // Default access settings
22 $sess_time_human = "";
23 $sess_staff_account = "";
24 $sess_staff_id = 0;
25 $sess_access_level = 0;
26 $sess_access = "";
27 $sess_last_name = "";
28 $sess_first_name = "";
29
30
31 // Page header
32 require_once ($GLOBAL_ADMIN_HEADER);
33
34
35 // Collect access information
36 if (isset($libsession)) {
37
38 // Fetch session information
39 $sessionClass = new sessionClass("", $libsession, "", "");
40 $accessClass = new accessClass($sessionClass);
41
42 // Load user session variables
43 $sess_time_human = $sessionClass->time_human;
44 $sess_staff_account = $sessionClass->staff_account;
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 // cookie must be set
53 if(isset($libsession) && $sess_access_level >= 1000) {
54
55 printf("<h2>CourseLib/PageScribe Page Debugger</h2>\n");
56
57 // Determine if page exists
58 $exists = existsRow("page", "page_id", $page_id);
59
60 if ($exists == 1){
61
62 // Debugger
63 $passed = errorTrap($page_id);
64
65 }
66 else printf("Page %s not found!", $page_id);
67
68
69 // If failed, allow a fix
70 if ($passed == 0) {
71
72 printf("<br><br><center>\n");
73 printf("<table width=\"90%%\" class=\"backLight\" border=\"1\">\n");
74 printf("<tr><td class=\"cellPlain\">Error(s) Found on Page (ID# %d)</td></tr>\n", $page_id);
75 printf("<tr><td><br>\n");
76 printf("<b>Page Fix Options</b><br>\n");
77 printf("Note: the following options range from least to most destructive. It is ");
78 printf("recommended that least destructive methods are tried first, moving to ");
79 printf("moving to progressively more destructive only as necessary.<br><br>");
80 printf("<form method =\"post\" action = \"scribe_fix.phtml?page_id=%d\">\n", $page_id);
81 printf("<select name =\"method\">\n");
82 printf("<option value=\"1\">Attach orphans to foster parent</option>\n");
83 printf("<option value=\"2\">Delete fostered children and their descendants</option>\n");
84 printf("<option value=\"3\">Purge all parent-children relationships!</option>\n");
85 printf("</select>\n");
86 printf("<input type=\"submit\" value=\"Fix this Page\">\n");
87 printf("<br><br>\n");
88 printf("</td></form></tr></table>\n");
89
90 }
91
92 // Link to return to admin console
93 adminReturn($sess_access_level);
94
95 } // logged in
96
97 // No access
98 else require_once ($GLOBAL_NO_ACCESS);
99
100 // Page footer
101 require_once ($GLOBAL_ADMIN_FOOTER);
102 ?>
103
104 </body>
105 </html>

  ViewVC Help
Powered by ViewVC 1.1.26