Chat window now opens with no messages inside.
[Assignment-Trapper.git] / workflow_comments.php
blobc3f895afc047e35b60288510b6a8867e2bdaa495
1 <?php
3 include_once("auth.php");
4 include_once("header.php");
5 include_once("time.php");
7 if($role != 0) { die("Account \"".$user_name."\" Is Not Authorized To View This Page.<br><br>This Event Will Be Logged And Reported."); }
9 $sql = 'select txt, name, email, title, type_name, DATE_FORMAT(comments.timeposted,"%a, %d %b %Y %T CST") AS timeposted, comments.sub_id, schedule.sched_id, comments.user_id from comments, users, schedule, types where (schedule.assign_type = types.assign_type) and (schedule.sched_id = comments.sub_id) and (comments.user_id = users.user_id) order by timeposted limit 75';
12 //$sql = 'select txt, name, email, title, type_name, DATE_FORMAT(comments.timeposted,"%a, %d %b %Y %T CST") AS timeposted, comments.sub_id, schedule.sched_id, comments.user_id from comments, users, schedule, types where (schedule.assign_type = types.assign_type) and (schedule.sched_id = comments.sub_id) and (comments.user_id = users.user_id) UNION select txt from filecom order by timeposted limit 30';
14 $result = mysql_query($sql);
16 $comment_list = '<table class="gridtable">
17 <tr>
18 <th>Role</th><th>Title</th><th>Type</th><th>Comment</th>
19 </tr>';
21 while($row = mysql_fetch_array($result))
23 $row['txt'] = substr( $row['txt'] ,0, 75);
24 $comment_list .= '<tr>';
25 $comment_list .= '<td>'.$row['name'].'</td>';
26 $comment_list .= '<td><a href=detail_root.php?sched='.$row['sched_id'].'&user='.$row['user_id'].'>'.$row['title'].'</a></td>';
27 $comment_list .= '<td>'.$row['type_name'].'</td>';
28 $comment_list .= '<td>'.$row['txt'].'</td>';
29 $comment_list .= '</tr>';
32 $comment_list .= '</table>';
36 <h1>Most Recent Comments</h1>
38 <?php echo $comment_list; ?>