00001 <?php 00002 if(!isset($_GET['user'])) 00003 { 00004 $users = $atom->getAllUsersData(); 00005 ?> 00006 <p>Choose an user</p> 00007 <ul> 00008 <?php 00009 foreach($users as $key => $user) 00010 { 00011 ?> 00012 <li><a href="?page=feed&user=<?php echo $key;?>"><?php echo $key;?> (<?php echo $user['name'];?>)</a></li> 00013 <?php 00014 } 00015 ?> 00016 </ul> 00017 <?php 00018 } 00019 elseif(!isset($_GET['post'])) 00020 { 00021 $data = ($atom->getFeedData($_GET['user'],0,100)); 00022 ?> 00023 <table summary="list of entries"><caption>list of <em><?php echo $_GET['user'];?></em>’s entries</caption> 00024 <thead> 00025 <tr> 00026 <th>id</th> 00027 <th>title</th> 00028 <th>summary</th> 00029 <th>issued</th> 00030 <th>modified</th> 00031 <th>action</th> 00032 </tr> 00033 </thead> 00034 <tbody> 00035 <?php 00036 foreach($data as $id => $entry) 00037 { 00038 ?> 00039 <tr> 00040 <td><?php echo $id;?></td> 00041 <td><?php echo $entry['title'];?></td> 00042 <td><?php echo $entry['summary'];?></td> 00043 <td><?php echo $entry['issued'];?></td> 00044 <td><?php echo $entry['modified'];?></td> 00045 <td> 00046 <ul> 00047 <li><a href="?page=entry&user=<?php echo $_GET["user"];?>&action=edit&id=<?php echo $id;?>">edit</a>, </li> 00048 <li><a href="?page=entry&user=<?php echo $_GET["user"];?>&action=del&id=<?php echo $id;?>">delete</a>.</li> 00049 </ul> 00050 </td> 00051 </tr> 00052 <?php 00053 } 00054 ?> 00055 </tbody> 00056 </table> 00057 00058 <p><a href="?page=entry&user=<?php echo $_GET["user"];?>&action=new">add an entry</a></p> 00059 <?php 00060 } 00061 00062 ?>