3 include_once("auth_root.php");
4 //include_once("conn.php");
6 /* TODO: Lock out account if this user keeps hitting this page. */
8 //if($role != 0) { die("Account \"".$user_name."\" Is Not Authorized To View This Page.<br><br>This Event Will Be Logged And Reported."); }
12 $sql = 'select txt, name, email, title, type_name, DATE_FORMAT(comments.timeposted,"%a, %d %b %Y %T CST") AS timeposted, comments.sub_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 30';
15 $sql = 'select txt, name, email, title, type_name, DATE_FORMAT(comments.timeposted,"%a, %d %b %Y %T CST") AS timeposted, comments.sub_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) and users.user_id='.$user_id.' order by timeposted limit 30';
21 $result = mysql_query($sql);
23 $server_url = "http://".$_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF'];
24 $server_url_base = "http://".$_SERVER['SERVER_NAME'];
27 if (!$result) { die("SQL ERROR"); }
30 while($row = mysql_fetch_array($result))
32 $row['txt'] = htmlspecialchars($row['txt']);
35 <title>'.$row['name'].' - '.$row['title'].' - '.$row['type_name'].'</title>
36 <description>'.$row['txt'].'</description>
37 <link>'.$server_url_base.'/at/detail_root.php?sched='.$row['sub_id'].'</link>
38 <author>'.$row['email'].' ('.$row['name'].')</author>
39 <category domain="comment feed">comments</category>
40 <guid>'.$server_url_base.'/at/detail_root.php?sched='.$row['sub_id'].'random='.$i.'</guid>
41 <pubDate>'.$row['timeposted'].'</pubDate>
48 $now = date("D, d M Y H:i:s T");
52 echo '<?xml version="1.0" encoding="UTF-8" ?>';
56 <rss version
="2.0" xmlns
:atom
="http://www.w3.org/2005/Atom">
58 <title
>Assignment Trapper
- Comment Feed
</title
>
59 <description
>Latest comments listed by date
.</description
>
60 <link
><?php
echo $server_url; ?
></link
>
61 <lastBuildDate
>Fri
, 31 Dec
1999 23:59:59 EST
</lastBuildDate
>
62 <pubDate
>Fri
, 31 Dec
1999 23:59:59 EST
</pubDate
>
63 <language
>en
-US
</language
>
64 <copyright
>Copyright
2011 Steven Schronk
</copyright
>
65 <managingEditor
>steven@schronk
.com (Steven Schronk
)</managingEditor
>
66 <webMaster
>steven@schronk
.com (Steven Schronk
)</webMaster
>
68 <atom
:link href
="http://www.opentextbook.info/at/comment_feed.php" rel
="self" type
="application/rss+xml" />
70 <title
>Assignment Trapper
- Comment Feed
</title
>
71 <url
><?php
echo $server_url_base; ?
>/at
/gfx
/bricks
.png
</url
>
72 <link
><?php
echo $server_url_base; ?
>/at
/comment_feed
.php
</link
>