source: branches/1.2/content/plugins/messaging/templates/messaging_inbox.php @ 1266

Revision 1266, 3.2 KB checked in by nick_ramsay, 3 years ago (diff)

[Branch 1.2] Messaging 0.4 Fix for empty inbox and outbox.

Line 
1<?php
2/**
3 * Messaging inbox
4 *
5 * PHP version 5
6 *
7 * LICENSE: Hotaru CMS is free software: you can redistribute it and/or
8 * modify it under the terms of the GNU General Public License as
9 * published by the Free Software Foundation, either version 3 of
10 * the License, or (at your option) any later version.
11 *
12 * Hotaru CMS is distributed in the hope that it will be useful, but WITHOUT
13 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
14 * FITNESS FOR A PARTICULAR PURPOSE.
15 *
16 * You should have received a copy of the GNU General Public License along
17 * with Hotaru CMS. If not, see http://www.gnu.org/licenses/.
18 *
19 * @category  Content Management System
20 * @package   HotaruCMS
21 * @author    Nick Ramsay <admin@hotarucms.org>
22 * @copyright Copyright (c) 2009, Hotaru CMS
23 * @license   http://www.gnu.org/copyleft/gpl.html GNU General Public License
24 * @link      http://www.hotarucms.org/
25 */
26
27?>
28
29<div id="messaging_inbox" class="users_content">
30
31<h2><?php echo $h->lang["messaging_inbox"]; ?></h2>
32   
33<?php echo $h->showMessages(); ?>
34
35<form name="inbox_form" action="<?php echo BASEURL; ?>index.php?page=inbox" method="post">
36<table class="messaging_list">
37    <tr class="messaging_list_headers">
38        <td class="messaging_fom"><?php echo $h->lang['messaging_from']; ?></td>
39        <td class="messaging_subject"><?php echo $h->lang['messaging_subject']; ?></td>
40        <td class="messaging_date"><?php echo $h->lang['messaging_date']; ?></td>
41        <td class="messaging_delete"></td>
42    </tr>
43   
44    <?php if (isset($h->vars['messages_list']->items)) { ?>
45
46        <?php foreach ($h->vars['messages_list']->items as $msg) { ?>
47       
48            <?php $read = (!$msg->message_read) ? "style='font-weight: bold;'" : ""; ?>
49                   
50            <tr id="<?php echo $msg->message_id; ?>" <?php echo $read; ?>>
51           
52                <?php $name = $h->getUserNameFromId($msg->message_from); ?>
53                <td class="messaging_from"><a href="<?php echo $h->url(array('user'=>$name)); ?>"><?php echo $name; ?></a></td>
54               
55                <td class="messaging_subject">
56                    <a href="<?php echo BASEURL; ?>index.php?page=show_message&amp;id=<?php echo $msg->message_id; ?>">
57                        <?php echo sanitize(urldecode($msg->message_subject), 'all'); ?>
58                    </a>
59                </td>
60               
61                <td class="messaging_date"><?php echo date('j M \'y', strtotime($msg->message_date)); ?></td>
62               
63                <td class="messaging_delete"><center><input type="checkbox" name="message[<?php echo $msg->message_id; ?>]" id="message-<?php echo $msg->message_id; ?>" value="delete"></center></td>
64               
65            </tr>
66        <?php } ?>
67   
68    <?php } else { ?>
69        <tr><td colspan='4'><center><?php echo $h->lang['messaging_no_messages']; ?></center></td></tr>
70    <?php } ?>
71   
72</table>
73
74    <?php echo $h->pageBar($h->vars['messages_list']); ?>
75
76    <br/>
77    <p align="right"><input type="submit" name="delete_selected" value="<?php echo $h->lang['messaging_delete_selected']; ?>" /></p>
78
79</form>
80
81</div>
Note: See TracBrowser for help on using the repository browser.