remove old readme
[atutor.git] / themes / mobile / inbox / inbox.tmpl.php
1
2 <?php 
3         if ($row = mysql_fetch_assoc($this->result_messages)) {
4 ?>
5         <ul id="inbox-msg">
6         <li>
7                 <div class="forum-post-author">
8                         <a href="profile.php?id=<?php echo $row['from_member_id']; ?>" class="title"><?php echo get_display_name($row['from_member_id']); ?></a><br />
9                         <?php print_profile_img($row['from_member_id']); ?>
10                 </div>
11
12                 <div class="forum-post-content">
13                         <h3><?php echo AT_print($row['subject'], 'messages.subject'); ?></h3>
14                         <div>
15                                 <div class="forum-post-ctrl">
16                                         <a href="inbox/send_message.php?reply=<?php echo $_GET['view']; ?>"><?php echo _AT('reply'); ?></a> | <a href="<?php echo $_SERVER['PHP_SELF']; ?>?delete=<?php echo $_GET['view']; ?>"><?php echo _AT('delete'); ?></a>
17                                 </div>
18                                 <p class="date"><?php echo AT_date(_AT('forum_date_format'), $row['date_sent'], AT_DATE_MYSQL_DATETIME); ?></p>
19                         </div>
20
21                         <div class="body">
22                                 <p><?php echo AT_print($row['body'], 'messages.body'); ?></p>
23                         </div>
24                 </div>
25
26         </li>
27         </ul><br /><br />
28         <?php
29         }
30 ?>
31         
32 <form method="post" action="<?php echo $_SERVER['PHP_SELF']; ?>" name="form" >
33 <div class="table-surround">
34 <table class="data" summary="" >
35 <thead>
36 <tr>
37         <th scope="col">&nbsp;</th>
38         <th scope="col">&nbsp;</th>
39         <th scope="col" ><?php echo _AT('from');   ?></th>
40         <th scope="col" ><?php echo _AT('subject');?></th>
41         <th scope="col" ><?php echo _AT('date');   ?></th>
42 </tr>
43 </thead>
44 <tfoot>
45 <tr>
46         <td colspan="5"><input type="submit" name="delete" value="<?php echo _AT('delete'); ?>"/></td>
47 </tr>
48 </tfoot>
49 <tbody>
50 <?php if ($row = mysql_fetch_assoc($this->result)): ?>
51         <?php do { ?>
52                 <?php if ($row['message_id'] == $_GET['view']): ?>
53                         <tr class="selected">
54                 <?php else: ?>
55                         <tr onmousedown="document.form['m<?php echo $row['message_id']; ?>'].checked = !document.form['m<?php echo $row['message_id']; ?>'].checked; rowselectbox(this, document.form['m<?php echo $row['message_id']; ?>'].checked, '');" id="r_<?php echo $row['message_id']; ?>_1">
56                 <?php endif; ?>
57                 <td><input type="checkbox" name="id[]" value="<?php echo $row['message_id']; ?>" id="m<?php echo $row['message_id']; ?>" <?php if (isset($_POST['id']) && in_array($row['message_id'], $_POST['id'])) { echo 'checked="checked"'; } ?> title="<?php echo _AT('delete').': '.AT_print($row['subject'], 'messages.subject');?>" onmouseup="this.checked=!this.checked" /></td>
58                 <td valign="middle">
59                 <?php
60                 if ($row['new'] == 1)   {
61                         echo _AT('new');
62                 } else if ($row['replied'] == 1) {
63                         echo _AT('replied');
64                 }
65                 echo '</td>';
66
67                 $name = get_display_name($row['from_member_id']);
68
69                 echo '<td align="left" valign="middle">';
70
71                 if ($_GET['view'] != $row['message_id']) {
72                         echo $name;
73                 } else {
74                         echo '<strong>'.$name.'</strong>';
75                 }
76                 echo '</td>';
77
78                 echo '<td><label for="m'.$row['message_id'].'">';
79                 if ($_GET['view'] != $row['message_id']) {
80                         echo '<a href="'.$_SERVER['PHP_SELF'].'?view='.$row['message_id'].'">'.AT_print($row['subject'], 'messages.subject').'</a>';
81                 } else {
82                         echo '<strong>'.AT_print($row['subject'], 'messages.subject').'</strong>';
83                 }
84                 echo '</label></td>';
85         
86                 echo '<td valign="middle" align="left" nowrap="nowrap">';
87                 echo AT_date(_AT('forum_date_format'),  $row['date_sent'], AT_DATE_MYSQL_DATETIME);
88                 //echo AT_date(_AT('%D',  $row['date_sent'], AT_DATE_MYSQL_DATETIME);
89                 echo '</td>';
90                 echo '</tr>';
91         } while ($row = mysql_fetch_assoc($this->result)); ?>
92 <?php else: ?>
93         <tr>
94                 <td colspan="5"><?php echo _AT('none_found'); ?></td>
95         </tr>
96 <?php endif; ?>
97 </tbody>
98 </table>
99 </div>
100 </form>