Files
Testing/leptesting/user_messages.tpl
sean 0e8a8b3028
Some checks are pending
deploy-testing / deploy (push) Waiting to run
Initial testing snapshot
2026-11-17 16:15:01 -05:00

173 lines
7.8 KiB
Smarty

{include file='header.tpl'}
{* $Id: user_messages.tpl 8 2009-01-11 06:02:53Z john $ *}
<table class='tabs' cellpadding='0' cellspacing='0'>
<tr>
<td class='tab0'>&nbsp;</td>
<td class='tab1' NOWRAP><a href='user_messages.php'>{lang_print id=780}</a></td>
<td class='tab'>&nbsp;</td>
<td class='tab2' NOWRAP><a href='user_messages_outbox.php'>{lang_print id=781}</a></td>
<td class='tab3'>&nbsp;</td>
</tr>
</table>
<table cellpadding='0' cellspacing='0'>
<tr>
<td class='messages_left'>
<!--<img src='./images/icons/messages48.gif' border='0' class='icon_big'>-->
<div class='page_header'><span style="font-size:20pt; font-weight:bold; text-transform:uppercase;">My Messages</span></div>
{capture assign='unread_messages'}{if $user_unread_pms > 0}<b>{$user_unread_pms}</b>{else}0{/if}{/capture}
<div>
You have {$unread_messages} unread conversation{if $user_unread_pms != 1}s{/if} in your inbox.</div></td>
<td class='messages_right'>
<table cellpadding='0' cellspacing='0'>
<tr><td class='button' nowrap='nowrap'>
<!--<img src='./images/icons/sendmessage16.gif' border='0' class='icon'>--><a href="javascript:TB_show('{lang_print id=784}', 'user_messages_new.php?TB_iframe=true&height=400&width=450', '', './images/trans.gif');">{lang_print id=784}</a>
</td></tr></table>
</td>
</tr>
</table>
<br />
{* JAVASCRIPT FOR CHECK ALL MESSAGES FEATURE *}
{literal}
<script language='JavaScript'>
<!---
var checkboxcount = 1;
function doCheckAll() {
if(checkboxcount == 0) {
with (document.messageform) {
for (var i=0; i < elements.length; i++) {
if (elements[i].type == 'checkbox') {
elements[i].checked = false;
}}
checkboxcount = checkboxcount + 1;
}
} else
with (document.messageform) {
for (var i=0; i < elements.length; i++) {
if (elements[i].type == 'checkbox') {
elements[i].checked = true;
}}
checkboxcount = checkboxcount - 1;
}
}
// -->
</script>
{/literal}
{* DISPLAY PAGINATION MENU IF APPLICABLE *}
{if $maxpage > 1}
<div class='browse_pages'>
{if $p != 1}<a href="{$smarty.server.PHP_SELF}?p=1&amp;s={$s}"><span class="white arrow">&#171;</span></a> <a href='{$smarty.server.PHP_SELF}?p={math equation='p-1' p=$p}&amp;s={$s}'><span class="white arrow">&#8249;</span></a>{else}<font class='disabled'><span class="white arrow">&#171; &#8249;</span></font>{/if}
| {foreach from=$for item=foo}
<a href='{$smarty.server.PHP_SELF}?&p={$foo}&amp;s={$s}'>{$foo}</a>
{/foreach} |
{if $p != $maxpage}<a href='{$smarty.server.PHP_SELF}?p={math equation='p+1' p=$p}&amp;s={$s}'><span class="white arrow">&#8250;</span></a> <a href="{$smarty.server.PHP_SELF}?p={$maxpage}&amp;s={$s}"><span class="white arrow">&#187;</span></a>{else}<font class='disabled'><span class="white arrow">&#8250; &#187;</span></font>{/if}
<br /><span style="font-weight:normal;">{if $p_start == $p_end}
{lang_sprintf id=184 1=$p_start 2=$total_pms}
{else}
{lang_sprintf id=185 1=$p_start 2=$p_end 3=$total_pms}
{/if}</span><br />
<form>Go to Page: <input type="text" name="p" class="gotext" /><input type="submit" value="Go" /></form>
</div>
<br>
{/if}
{* CHECK IF THERE ARE NO MESSAGES IN INBOX *}
{if $total_pms == 0}
<div class='center'>
<table cellpadding='0' cellspacing='0'><tr>
<td class='result'><!--<img src='./images/icons/bulb16.gif' border='0' class='icon'>-->{lang_print id=785}</td>
</tr></table>
</div>
{* DISPLAY MESSAGES *}
{else}
<div style="background:black;">
<form method="post" name="sort" id="sort" action="user_messages.php">
&nbsp;<br />
&nbsp;Sort By: <input type="hidden" name="p" value="1" /><select name="s"><option {if $s==""}selected="selected"{/if} value="" >Newest First</option>
<option {if $s=="u"}selected="selected"{/if} value="u" >Username</option>
</select> <input type="submit" name="submit" value="Sort" /></form><br />
<form action='user_messages.php' method='post' name='messageform'>
<table class='messages_table' cellpadding='0' cellspacing='0'>
<tr>
<td class='messages_header'><a href='javascript:void(0);' onClick='doCheckAll();this.blur();'><!--<img src='./images/icons/checkall16.gif' border='0' style='margin-left: 3px;'>--></a></td>
<td class='messages_header'>{lang_print id=601}</td>
<td class='messages_header'></td>
<td class='messages_header' colspan='2'>{lang_print id=520}</td>
</tr>
{* LIST INBOX MESSAGES *}
{section name=pm_loop loop=$pms}
{* IF MESSAGE IS NEW, HIGHLIGHT ROW *}
{if $pms[pm_loop].pm_read === FALSE}
{assign var='row_class' value='messages_unread'}
{else}
{assign var='row_class' value='messages_read'}
{/if}
<tr class='{$row_class}'>
<td class='messages_message' width='1' align='center'><input type='checkbox' name='delete_convos[]' value='{$pms[pm_loop].pmconvo_id}'>{if $pms[pm_loop].pm_replied}<div style='padding-left: 5px; padding-top: 3px;'><!--<img src='./images/icons/message_replied16.gif' class='icon' border='0'>--></div>{/if}</td>
<td class='messages_photo' width='1'><a href='{$url->url_create('profile', $pms[pm_loop].pm_user->user_info.user_username)}'><img src='{$pms[pm_loop].pm_user->user_photo('./images/nophoto.png', TRUE)}' border='0' class='photo' width='60' height='60' alt="{lang_sprintf id=786 1=$pms[pm_loop].pm_user->user_displayname_short}"></a></td>
<td class='messages_message' width='130' nowrap='nowrap'>
<b><a href='{$url->url_create('profile', $pms[pm_loop].pm_user->user_info.user_username)}'>{$pms[pm_loop].pm_user->user_displayname}</a></b>
<div class='messages_date'>{$datetime->cdate("`$setting.setting_timeformat` `$setting.setting_dateformat`", $datetime->timezone($pms[pm_loop].pm_date, $global_timezone))}</div>
</td>
<td class='messages_message' width='100%'>
<b><a href='user_messages_view.php?pmconvo_id={$pms[pm_loop].pmconvo_id}#bottom'>{$pms[pm_loop].pmconvo_subject|truncate:50}</b>
<br>{$pms[pm_loop].pm_body|truncate:100|choptext:75:"<br>"}</a>
</td>
<td class='messages_message' align='right' nowrap='nowrap'>
[ <a href='user_messages_view.php?pmconvo_id={$pms[pm_loop].pmconvo_id}#bottom'>respond</a> ]<br />
[ <a href='user_messages_view.php?pmconvo_id={$pms[pm_loop].pmconvo_id}&task=delete'>{lang_print id=155}</a> ]
</td>
</tr>
{/section}
</table>
<br>
{* SHOW DELETE MESSAGES BUTTON *}
{if $total_pms != 0}
<input type='submit' class='button' value='{lang_print id=788}'>
<input type='hidden' name='task' value='deleteselected'>
<input type='hidden' name='p' value='{$p}'>
<input type='hidden' name='s' value='{$s}'>
{/if}
</form>
</div>
{/if}
{* DISPLAY PAGINATION MENU IF APPLICABLE *}
{if $maxpage > 1}
<div class='browse_pages'>
{if $p != 1}<a href="{$smarty.server.PHP_SELF}?p=1&amp;s={$s}"><span class="white arrow">&#171;</span></a> <a href='{$smarty.server.PHP_SELF}?p={math equation='p-1' p=$p}&amp;s={$s}'><span class="white arrow">&#8249;</span></a>{else}<font class='disabled'><span class="white arrow">&#171; &#8249;</span></font>{/if}
| {foreach from=$for item=foo}
<a href='{$smarty.server.PHP_SELF}?&p={$foo}&amp;s={$s}'>{$foo}</a>
{/foreach} |
{if $p != $maxpage}<a href='{$smarty.server.PHP_SELF}?p={math equation='p+1' p=$p}&amp;s={$s}'><span class="white arrow">&#8250;</span></a> <a href="{$smarty.server.PHP_SELF}?p={$maxpage}&amp;s={$s}"><span class="white arrow">&#187;</span></a>{else}<font class='disabled'><span class="white arrow">&#8250; &#187;</span></font>{/if}
<br /><span style="font-weight:normal;">{if $p_start == $p_end}
{lang_sprintf id=184 1=$p_start 2=$total_pms}
{else}
{lang_sprintf id=185 1=$p_start 2=$p_end 3=$total_pms}
{/if}</span><br />
<form>Go to Page: <input type="text" name="p" class="gotext" /><input type="submit" value="Go" /></form>
</div>
<br>
{/if}
{include file='footer.tpl'}