- md5
- 9625328ed696272ef910942091461253
- sha1
- 955e73b37478752858d73eefb5d7ea21059e120a
- sha256
- c70268327e83bbfb0e965c418a7020feeef671b7770f220f57ffbb641af3990b
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
<?php
/**
* @version $Id: admin.messages.html.php 85 2005-09-15 23:12:03Z eddieajau $
* @package Joomla
* @subpackage Messages
* @copyright Copyright (C) 2005 Open Source Matters. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
* Joomla! is free software. This version may have been modified pursuant
* to the GNU General Public License, and as distributed it includes or
* is derivative of works licensed under the GNU General Public License or
* other free or open source software licenses.
* See COPYRIGHT.php for copyright notices and details.
*/
// no direct access
defined( '_VALID_MOS' ) or die( 'Restricted access' );
/**
* @package Joomla
* @subpackage Messages
*/
class HTML_messages {
function showMessages( &$rows, $pageNav, $search, $option ) {
?>
<form action="index2.php" method="post" name="adminForm">
<table class="adminheading">
<tr>
<th class="inbox">Private Messaging</th>
<td>Search:</td>
<td> <input type="text" name="search" value="<?php echo $search;?>" class="inputbox" onChange="document.adminForm.submit();" />
</td>
</tr>
</table>
<table class="adminlist">
<tr>
<th width="20">#</th>
<th width="5%" class="title"> <input type="checkbox" name="toggle" value="" onClick="checkAll(<?php echo count($rows); ?>);" />
</th>
<th width="60%" class="title">Subject</th>
<th width="15%" class="title">From</th>
<!-- <th width="20%" class="title">UserType</th> -->
<th width="15%" class="title">Date</th>
<th width="5%" class="title">Read</th>
</tr>
<?php
$k = 0;
for ($i=0, $n=count( $rows ); $i < $n; $i++) {
$row =& $rows[$i];
?>
<tr class="<?php echo "row$k"; ?>">
<td width="20"><?php echo $i+1+$pageNav->limitstart;?></td>
<td width="5%"><?php echo mosHTML::idBox( $i, $row->message_id ); ?></td>
<td width="60%"> <a href="#edit" onClick="hideMainMenu();return listItemTask('cb<?php echo $i;?>','view')">
<?php echo $row->subject; ?> </a> </td>
<td width="15%"><?php echo $row->user_from; ?></td>
<td width="15%"><?php echo $row->date_time; ?></td>
<td width="15%"><?php
if (intval( $row->state ) == "1") {
echo "Read";
} else {
echo "Unread";
} ?></td>
</tr>
<?php $k = 1 - $k;
} ?>
</table>
<?php echo $pageNav->getListFooter(); ?>
<input type="hidden" name="option" value="<?php echo $option;?>" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="hidemainmenu" value="0" />
</form>
<?php }
function editConfig( &$vars, $option) {
$tabs = new mosTabs(0);
?>
<table class="adminheading">
<tr>
<th class="msgconfig">Private Messaging Configuration</th>
</tr>
</table>
<?php
$tabs->startPane("messages");
$tabs->startTab("General","general-page");
?>
<form action="index2.php" method="post" name="adminForm">
<script language="javascript" type="text/javascript">
function submitbutton(pressbutton) {
var form = document.adminForm;
if (pressbutton == 'saveconfig') {
if (confirm ("Are you sure?")) {
submitform( pressbutton );
}
} else {
document.location.href = 'index2.php?option=<?php echo $option;?>';
}
}
</script>
<table class="adminform">
<tr>
<td width="20%">Lock Inbox:</td>
<td> <?php echo $vars['lock']; ?> </td>
</tr>
<tr>
<td width="20%">Mail me on new Message:</td>
<td> <?php echo $vars['mail_on_new']; ?> </td>
</tr>
</table>
<?php
$tabs->endTab();
$tabs->endPane();
?> <input type="hidden" name="option" value="<?php echo $option; ?>">
<input type="hidden" name="task" value="">
</form>
<?php }
function viewMessage( &$row, $option ) {
?>
<table class="adminheading">
<tr>
<th class="inbox">View Private Message</th>
</tr>
</table>
<form action="index2.php" method="post" name="adminForm">
<table class="adminform">
<tr>
<td width="100">From:</td>
<td width="85%" bgcolor="#ffffff"><?php echo $row->user_from;?></td>
</tr>
<tr>
<td>Posted:</td>
<td bgcolor="#ffffff"><?php echo $row->date_time;?></td>
</tr>
<tr>
<td>Subject:</td>
<td bgcolor="#ffffff"><?php echo $row->subject;?></td>
</tr>
<tr>
<td valign="top">Message:</td>
<td width="100%" bgcolor="#ffffff"><pre><?php echo htmlspecialchars( $row->message );?></pre></td>
</tr>
</table>
<input type="hidden" name="option" value="<?php echo $option;?>" />
<input type="hidden" name="task" value="" />
<input type="hidden" name="boxchecked" value="1" />
<input type="hidden" name="cid[]" value="<?php echo $row->message_id; ?>" />
<input type="hidden" name="userid" value="<?php echo $row->user_id_from; ?>" />
<input type="hidden" name="subject" value="Re: <?php echo $row->subject; ?>" />
<input type="hidden" name="hidemainmenu" value="0" />
</form>
<?php }
function newMessage($option, $recipientslist, $subject ) {
global $my;
?>
<script language="javascript" type="text/javascript">
function submitbutton(pressbutton) {
var form = document.adminForm;
if (pressbutton == 'cancel') {
submitform( pressbutton );
return;
}
// do field validation
if (form.subject.value == "") {
alert( "You must provide a subject." );
} else if (form.message.value == "") {
alert( "You must provide a message." );
} else if (getSelectedValue('adminForm','user_id_to') < 1) {
alert( "You must select a recipient." );
} else {
submitform( pressbutton );
}
}
</script>
<table class="adminheading">
<tr>
<th class="inbox">New Private Message</th>
</tr>
</table>
<form action="index2.php" method="post" name="adminForm">
<table class="adminform">
<tr>
<td width="100">To:</td>
<td width="85%"><?php echo $recipientslist; ?></td>
</tr>
<tr>
<td>Subject:</td>
<td>
<input type="text" name="subject" size="50" maxlength="100" class="inputbox" value="<?php echo $subject; ?>"/>
</td>
</tr>
<tr>
<td valign="top">Message:</td>
<td width="100%">
<textarea name="message" style="width:100%" rows="30" class="inputbox"></textarea>
</td>
</tr>
</table>
<input type="hidden" name="user_id_from" value="<?php echo $my->id; ?>">
<input type="hidden" name="option" value="<?php echo $option; ?>">
<input type="hidden" name="task" value="">
</form>
<?php }
}?>
The same content is in 4 releases, Joomla 1.0.3 to 1.0.8. See them all, or every version of this file.