216 lines
11 KiB
Smarty
216 lines
11 KiB
Smarty
{include file='header.tpl'}
|
|
{literal}<script type="text/javascript">
|
|
function changecheck(){
|
|
|
|
if (jQuery('#checkAll').is(':checked')) {
|
|
jQuery('.delete').prop('checked',true);
|
|
} else {
|
|
jQuery('.delete').prop('checked', false);
|
|
}
|
|
}
|
|
</script>{/literal}
|
|
{if $user->user_info.user_level_id==1 && $p>3}
|
|
Please upgrade your <a href="/premium.php">membership</a> to see more messages<br /><br />
|
|
{elseif $user->user_info.user_level_id==5 && $p>1}
|
|
Please upgrade your <a href="/premium.php">membership</a> to see more messages<br /><br />
|
|
{else}
|
|
{* $Id: user_messages.tpl 8 2009-01-11 06:02:53Z john $ *}
|
|
|
|
<table class='tabs' cellpadding='0' cellspacing='0'>
|
|
<tr>
|
|
<td class='tab0'> </td>
|
|
<td class='tab1' NOWRAP><a href='user_messages.php'>{lang_print id=780}</a></td>
|
|
<td class='tab'> </td>
|
|
<td class='tab2' NOWRAP><a href='user_messages_outbox.php'>{lang_print id=781}</a></td>
|
|
<td class='tab3'> </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. {if $user_unread_pms > 0}(<a href="user_messages.php?task=markallasread">Mark all as read</a>){/if}</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 data-toggle="modal" data-target="#myModal" href="user_messages_new.php">{lang_print id=784}</a>
|
|
</td></tr></table>
|
|
</td>
|
|
</tr>
|
|
</table>
|
|
|
|
<br />
|
|
|
|
|
|
|
|
|
|
{* DISPLAY PAGINATION MENU IF APPLICABLE *}
|
|
{if $maxpage > 1}
|
|
<div class='browse_pages'>
|
|
{if $p != 1}<a href="{$smarty.server.PHP_SELF}?p=1&s={$s}"><span class="white arrow">«</span></a> <a href='{$smarty.server.PHP_SELF}?p={math equation='p-1' p=$p}&s={$s}'><span class="white arrow">‹</span></a>{else}<font class='disabled'><span class="white arrow">« ‹</span></font>{/if}
|
|
| {foreach from=$for item=foo}
|
|
<a href='{$smarty.server.PHP_SELF}?&p={$foo}&s={$s}'>{$foo}</a>
|
|
{/foreach} |
|
|
{if $p != $maxpage}<a href='{$smarty.server.PHP_SELF}?p={math equation='p+1' p=$p}&s={$s}'><span class="white arrow">›</span></a> <a href="{$smarty.server.PHP_SELF}?p={$maxpage}&s={$s}"><span class="white arrow">»</span></a>{else}<font class='disabled'><span class="white arrow">› »</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">
|
|
<br />
|
|
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>
|
|
<option {if $s=="unread"}selected="selected"{/if} value="unread" >Unread</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' style="text-align:center;"><input type="checkbox" id="checkAll" onclick="changecheck();"></td>
|
|
<td class='messages_header'>{lang_print id=601}</td>
|
|
<td class='messages_header hidden-xs hidden-sm visible-md visible-lg'></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}
|
|
|
|
{if $pms[pm_loop].club==1}
|
|
<tr class='{$row_class}'>
|
|
<td class='messages_message' style="width:15px;" align='center'><input type='checkbox' name='delete_convos[]' class="delete" 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}
|
|
{if $pms[pm_loop].pm_read === FALSE}<div style='padding-left: 5px; padding-top: 3px;'>Unread<!--<img src='./images/icons/message_replied16.gif' class='icon' border='0'>--></div>{/if}
|
|
</td>
|
|
<td class='messages_photo hidden-xs hidden-sm visible-md visible-lg'><a href='club.php?club_id={$pms[pm_loop].pm_user->user_info.user_id}'>
|
|
|
|
<img src="{$pms[pm_loop].pm_user->user_info.user_photo}" onerror="this.src='{$cloudcdn1}/images/nophoto.png'" style="max-width:90px;">
|
|
|
|
</a>
|
|
</td>
|
|
<td class='messages_message' width='130' nowrap='nowrap'>
|
|
|
|
<b><a href='club.php?club_id={$pms[pm_loop].pm_user->user_info.user_id}'>{$pms[pm_loop].pm_user->user_info.user_username}</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'>
|
|
|
|
|
|
<b><a href='user_messages_view.php?pmconvo_id={$pms[pm_loop].pmconvo_id}&s={$s}#bottom'>{$pms[pm_loop].pmconvo_subject|truncate:50}</b>
|
|
<br>
|
|
{if $pms[pm_loop].pm_body|json_decode:true}{$pms[pm_loop].pm_body|json_decode:true|truncate:150|choptext:75:"<br>"}{else}{$pms[pm_loop].pm_body|truncate:150|choptext:75:"<br>"}{/if}
|
|
</a>
|
|
|
|
|
|
</td>
|
|
<td class='messages_message hidden-xs hidden-sm visible-md visible-lg' align='right' nowrap='nowrap'>
|
|
[ <a href='user_messages_view.php?pmconvo_id={$pms[pm_loop].pmconvo_id}&s={$s}#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>
|
|
{else}
|
|
|
|
<tr class='{$row_class}'>
|
|
<td class='messages_message' style="width:15px;" align='center'><input type='checkbox' name='delete_convos[]' class="delete" 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}
|
|
{if $pms[pm_loop].pm_read === FALSE}<div style='padding-left: 5px; padding-top: 3px;'>Unread<!--<img src='./images/icons/message_replied16.gif' class='icon' border='0'>--></div>{/if}
|
|
</td>
|
|
<td class='messages_photo hidden-xs hidden-sm visible-md visible-lg'>{if $pms[pm_loop].pm_user->user_info.user_enabled!=1}{else}<a href='{$url->url_create('profile', $pms[pm_loop].pm_user->user_info.user_username)}'>
|
|
|
|
|
|
{assign var="profilepicture" value=$pms[pm_loop].pm_user->user_photo("./images/nophoto.png")}
|
|
{$pms[pm_loop].pm_user->userprofiledot($profilepicture, "90px")}
|
|
</a>
|
|
{/if}</td>
|
|
<td class='messages_message' width='130' nowrap='nowrap'>
|
|
|
|
{if $pms[pm_loop].pm_user->user_info.user_enabled!=1}{else}<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>{/if}
|
|
</td>
|
|
<td class='messages_message'>
|
|
|
|
{if $pms[pm_loop].pm_user->user_info.user_enabled!=1}This user no longer exists{else}
|
|
<b><a href='user_messages_view.php?pmconvo_id={$pms[pm_loop].pmconvo_id}&s={$s}#bottom'>{$pms[pm_loop].pmconvo_subject|truncate:50}</b>
|
|
<br>
|
|
{if $pms[pm_loop].pm_body|json_decode:true}{$pms[pm_loop].pm_body|json_decode:true|truncate:150|choptext:75:"<br>"}{else}{$pms[pm_loop].pm_body|truncate:150|choptext:75:"<br>"}{/if}
|
|
</a>
|
|
{/if}
|
|
|
|
</td>
|
|
<td class='messages_message hidden-xs hidden-sm visible-md visible-lg' align='right' nowrap='nowrap'>
|
|
{if $pms[pm_loop].pm_user->user_info.user_enabled!=1}{else}[ <a href='user_messages_view.php?pmconvo_id={$pms[pm_loop].pmconvo_id}&s={$s}#bottom'>respond</a> ]<br />{/if}
|
|
[ <a href='user_messages_view.php?pmconvo_id={$pms[pm_loop].pmconvo_id}&task=delete'>{lang_print id=155}</a> ]
|
|
|
|
</td>
|
|
</tr>
|
|
{/if}
|
|
{/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&s={$s}"><span class="white arrow">«</span></a> <a href='{$smarty.server.PHP_SELF}?p={math equation='p-1' p=$p}&s={$s}'><span class="white arrow">‹</span></a>{else}<font class='disabled'><span class="white arrow">« ‹</span></font>{/if}
|
|
| {foreach from=$for item=foo}
|
|
<a href='{$smarty.server.PHP_SELF}?&p={$foo}&s={$s}'>{$foo}</a>
|
|
{/foreach} |
|
|
{if $p != $maxpage}<a href='{$smarty.server.PHP_SELF}?p={math equation='p+1' p=$p}&s={$s}'><span class="white arrow">›</span></a> <a href="{$smarty.server.PHP_SELF}?p={$maxpage}&s={$s}"><span class="white arrow">»</span></a>{else}<font class='disabled'><span class="white arrow">› »</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}
|
|
|
|
{/if}
|
|
{include file='footer.tpl'} |