3 include_once("auth.php");
4 include_once("header.php");
8 $sql = 'select count(*) from users';
10 $result = mysql_query($sql);
12 $row = mysql_fetch_row($result);
14 $user_count = $row[0];
17 $sql = 'select count(*) from schedule';
19 $result = mysql_query($sql);
21 $row = mysql_fetch_row($result);
23 $assignment_count = $row[0];
26 $sql = 'select count(*) from comments';
28 $result = mysql_query($sql);
30 $row = mysql_fetch_row($result);
32 $comment_count = $row[0];
35 $sql = 'select count(*) from filecom';
37 $result = mysql_query($sql);
39 $row = mysql_fetch_row($result);
41 $filecomm_count = $row[0];
44 $sql = 'select count(*) from files';
46 $result = mysql_query($sql);
48 $row = mysql_fetch_row($result);
50 $file_count = $row[0];
51 // ADIMINISTRATOR MENU
54 <h3
><img src
="gfx/rss.png">Feeds
:</h3
>
55 <a href
="comment_feed.php">Full Comments
</a
><br
>
56 <a href
="assignment_feed.php">Assignments Modified
</a
>
58 <h3
><img src
="gfx/report.png">Assignments
:</h3
>
59 <a href
="assignment_add.php">Add
New Assignment
</a
><br
>
61 <h3
><img src
="gfx/user_female.png">Users
:</h3
>
62 <a href
="enrollment.php">Enrollment Manager
</a
><br
>
63 <a href
="enrollment_new.php">New Enrollment
</a
><br
>
64 <a href
="password_change.php">Change Personal Password
</a
><br
>
65 <a href
="password_change_user.php">Change User Password
</a
><br
>
67 <h3
><img src
="gfx/database.png">System Admin
:</h3
>
68 <a href
="adminer.php">SQL Admin
</a
><br
>
72 <table
class="gridtable">
73 <tr
><th
>Stat
</th
><th
>Value
</th
></tr
>
74 <tr
><td
>Users
:</td
><td
><?php
echo $user_count; ?
></td
></tr
>
75 <tr
><td
>Assignments
:</td
><td
><?php
echo $assignment_count; ?
></td
></tr
>
76 <tr
><td
>Files
:</td
><td
><?php
echo $file_count; ?
></td
></tr
>
77 <tr
><td
>Comments
:</td
><td
><?php
echo $comment_count; ?
></td
></tr
>
78 <tr
><td
>Line Comments
:</td
><td
><?php
echo $filecomm_count; ?
></td
></tr
>
79 <tr
><td
>Current Time
:</td
><td
><?php
echo date("F d, Y h:i" ,time()); ?
></td
></tr
>
84 } else { // STUDENT MENU
89 <img src
="gfx/rss.png"><a href
="comment_feed.php">Full Comments
</a
><br
>
90 <img src
="gfx/rss.png"><a href
="assignment_feed.php">Assignments Modified
</a
>
93 <a href
="password_change.php">Change Password
</a
><br
>