3 date_default_timezone_set('America/Chicago');
5 include_once("auth_root.php");
9 //include_once("conn.php");
11 /* TODO: Lock out account if this user keeps hitting this page. */
13 //if($role != 0) { die("Account \"".$user_name."\" Is Not Authorized To View This Page.<br><br>This Event Will Be Logged And Reported."); }
17 $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';
20 $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';
26 $result = mysql_query($sql);
28 $server_url = "http://".$_SERVER['SERVER_NAME'].$_SERVER['PHP_SELF'];
29 $server_url_base = "http://".$_SERVER['SERVER_NAME'];
32 if (!$result) { die("SQL ERROR"); }
35 while($row = mysql_fetch_array($result))
37 $row['txt'] = htmlspecialchars($row['txt']);
40 <title>'.$row['name'].' - '.$row['title'].' - '.$row['type_name'].'</title>
41 <description>'.$row['txt'].'</description>
42 <link>'.$server_url_base.'/at/detail_root.php?sched='.$row['sub_id'].'</link>
43 <author>'.$row['email'].' ('.$row['name'].')</author>
44 <category domain="comment feed">comments</category>
45 <guid>'.$server_url_base.'/at/detail_root.php?sched='.$row['sub_id'].'random='.$i.'</guid>
46 <pubDate>'.$row['timeposted'].'</pubDate>
53 $now = date("D, d M Y H:i:s T");
57 echo '<?xml version="1.0" encoding="UTF-8" ?>';
61 <rss version
="2.0" xmlns
:atom
="http://www.w3.org/2005/Atom">
63 <title
>Assignment Trapper
- Comment Feed
</title
>
64 <description
>Latest comments listed by date
.</description
>
65 <link
><?php
echo $server_url; ?
></link
>
66 <lastBuildDate
>Fri
, 31 Dec
1999 23:59:59 EST
</lastBuildDate
>
67 <pubDate
>Fri
, 31 Dec
1999 23:59:59 EST
</pubDate
>
68 <language
>en
-US
</language
>
69 <copyright
>Copyright
2011 Steven Schronk
</copyright
>
70 <managingEditor
>steven@schronk
.com (Steven Schronk
)</managingEditor
>
71 <webMaster
>steven@schronk
.com (Steven Schronk
)</webMaster
>
73 <atom
:link href
="http://www.opentextbook.info/at/comment_feed.php" rel
="self" type
="application/rss+xml" />
75 <title
>Assignment Trapper
- Comment Feed
</title
>
76 <url
><?php
echo $server_url_base; ?
>/at
/gfx
/bricks
.png
</url
>
77 <link
><?php
echo $server_url_base; ?
>/at
/comment_feed
.php
</link
>