first commit

This commit is contained in:
alazhar
2020-01-02 22:20:31 +07:00
commit 10eb3340ad
5753 changed files with 631345 additions and 0 deletions

View File

@ -0,0 +1 @@
<!DOCTYPE html><title></title>

View File

@ -0,0 +1,71 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage com_messages
*
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
// Include the HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.formvalidation');
JHtml::_('behavior.keepalive');
JHtml::_('behavior.modal');
?>
<script type="text/javascript">
Joomla.submitbutton = function(task)
{
if (task == 'config.cancel' || document.formvalidator.isValid(document.id('config-form')))
{
Joomla.submitform(task, document.getElementById('config-form'));
}
}
</script>
<form action="<?php echo JRoute::_('index.php?option=com_messages'); ?>" method="post" name="adminForm" id="message-form" class="form-validate form-horizontal">
<fieldset>
<div>
<div class="modal-header">
<h3><?php echo JText::_('COM_MESSAGES_MY_SETTINGS');?></h3>
</div>
<div class="modal-body">
<button class="btn btn-primary" type="submit" onclick="Joomla.submitform('config.save', this.form);window.top.setTimeout('window.parent.SqueezeBox.close()', 700);">
<?php echo JText::_('JSAVE');?></button>
<button class="btn" type="button" onclick="window.parent.SqueezeBox.close();">
<?php echo JText::_('JCANCEL');?></button>
<hr />
<div class="control-group">
<div class="control-label">
<?php echo $this->form->getLabel('lock'); ?>
</div>
<div class="controls">
<?php echo $this->form->getInput('lock'); ?>
</div>
</div>
<div class="control-group">
<div class="control-label">
<?php echo $this->form->getLabel('mail_on_new'); ?>
</div>
<div class="controls">
<?php echo $this->form->getInput('mail_on_new'); ?>
</div>
</div>
<div class="control-group">
<div class="control-label">
<?php echo $this->form->getLabel('auto_purge'); ?>
</div>
<div class="controls">
<?php echo $this->form->getInput('auto_purge'); ?>
</div>
</div>
</div>
</div>
</fieldset>
<input type="hidden" name="task" value="" />
<?php echo JHtml::_('form.token'); ?>
</form>

View File

@ -0,0 +1 @@
<!DOCTYPE html><title></title>

View File

@ -0,0 +1,48 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage com_messages
*
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* View to edit messages user configuration.
*
* @package Joomla.Administrator
* @subpackage com_messages
* @since 1.6
*/
class MessagesViewConfig extends JViewLegacy
{
protected $form;
protected $item;
protected $state;
/**
* Display the view
*/
public function display($tpl = null)
{
$this->form = $this->get('Form');
$this->item = $this->get('Item');
$this->state = $this->get('State');
// Check for errors.
if (count($errors = $this->get('Errors')))
{
JError::raiseError(500, implode("\n", $errors));
return false;
}
// Bind the record to the form.
$this->form->bind($this->item);
parent::display($tpl);
}
}

View File

@ -0,0 +1 @@
<!DOCTYPE html><title></title>

View File

@ -0,0 +1 @@
<!DOCTYPE html><title></title>

View File

@ -0,0 +1,52 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage com_messages
*
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
JHtml::_('behavior.framework');
JHtml::_('formbehavior.chosen', 'select');
?>
<form action="<?php echo JRoute::_('index.php?option=com_messages'); ?>" method="post" name="adminForm" id="adminForm" class="form-horizontal">
<fieldset>
<div class="control-group">
<div class="control-label">
<?php echo JText::_('COM_MESSAGES_FIELD_USER_ID_FROM_LABEL'); ?>
</div>
<div class="controls">
<?php echo $this->item->get('from_user_name');?>
</div>
</div>
<div class="control-group">
<div class="control-label">
<?php echo JText::_('COM_MESSAGES_FIELD_DATE_TIME_LABEL'); ?>
</div>
<div class="controls">
<?php echo JHtml::_('date', $this->item->date_time);?>
</div>
</div>
<div class="control-group">
<div class="control-label">
<?php echo JText::_('COM_MESSAGES_FIELD_SUBJECT_LABEL'); ?>
</div>
<div class="controls">
<?php echo $this->item->subject;?>
</div>
</div>
<div class="control-group">
<div class="control-label">
<?php echo JText::_('COM_MESSAGES_FIELD_MESSAGE_LABEL'); ?>
</div>
<div class="controls">
<?php echo $this->item->message; ?>
</div>
</div>
<input type="hidden" name="task" value="" />
<input type="hidden" name="reply_id" value="<?php echo $this->item->message_id; ?>" />
<?php echo JHtml::_('form.token'); ?>
</fieldset>
</form>

View File

@ -0,0 +1,56 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage com_messages
*
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
// Include the HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('behavior.formvalidation');
JHtml::_('behavior.keepalive');
?>
<script type="text/javascript">
Joomla.submitbutton = function(task)
{
if (task == 'message.cancel' || document.formvalidator.isValid(document.id('message-form')))
{
Joomla.submitform(task, document.getElementById('message-form'));
}
}
</script>
<form action="<?php echo JRoute::_('index.php?option=com_messages'); ?>" method="post" name="adminForm" id="message-form" class="form-validate form-horizontal">
<fieldset class="adminform">
<div class="control-group">
<div class="control-label">
<?php echo $this->form->getLabel('user_id_to'); ?>
</div>
<div class="controls">
<?php echo $this->form->getInput('user_id_to'); ?>
</div>
</div>
<div class="control-group">
<div class="control-label">
<?php echo $this->form->getLabel('subject'); ?>
</div>
<div class="controls">
<?php echo $this->form->getInput('subject'); ?>
</div>
</div>
<div class="control-group">
<div class="control-label">
<?php echo $this->form->getLabel('message'); ?>
</div>
<div class="controls">
<?php echo $this->form->getInput('message'); ?>
</div>
</div>
</fieldset>
<input type="hidden" name="task" value="" />
<?php echo JHtml::_('form.token'); ?>
</form>

View File

@ -0,0 +1 @@
<!DOCTYPE html><title></title>

View File

@ -0,0 +1,70 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage com_messages
*
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* HTML View class for the Messages component
*
* @package Joomla.Administrator
* @subpackage com_messages
* @since 1.6
*/
class MessagesViewMessage extends JViewLegacy
{
protected $form;
protected $item;
protected $state;
public function display($tpl = null)
{
$this->form = $this->get('Form');
$this->item = $this->get('Item');
$this->state = $this->get('State');
// Check for errors.
if (count($errors = $this->get('Errors')))
{
JError::raiseError(500, implode("\n", $errors));
return false;
}
parent::display($tpl);
$this->addToolbar();
}
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
if ($this->getLayout() == 'edit')
{
JToolbarHelper::title(JText::_('COM_MESSAGES_WRITE_PRIVATE_MESSAGE'), 'new-privatemessage.png');
JToolbarHelper::save('message.save', 'COM_MESSAGES_TOOLBAR_SEND');
JToolbarHelper::cancel('message.cancel');
JToolbarHelper::help('JHELP_COMPONENTS_MESSAGING_WRITE');
}
else
{
JToolbarHelper::title(JText::_('COM_MESSAGES_VIEW_PRIVATE_MESSAGE'), 'inbox.png');
$sender = JUser::getInstance($this->item->user_id_from);
if ($sender->authorise('core.admin') || $sender->authorise('core.manage', 'com_messages') && $sender->authorise('core.login.admin'))
{
JToolbarHelper::custom('message.reply', 'redo', null, 'COM_MESSAGES_TOOLBAR_REPLY', false);
}
JToolbarHelper::cancel('message.cancel');
JToolbarHelper::help('JHELP_COMPONENTS_MESSAGING_READ');
}
}
}

View File

@ -0,0 +1 @@
<!DOCTYPE html><title></title>

View File

@ -0,0 +1,110 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage com_messages
*
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
// Include the component HTML helpers.
JHtml::addIncludePath(JPATH_COMPONENT.'/helpers/html');
JHtml::_('bootstrap.tooltip');
JHtml::_('behavior.multiselect');
JHtml::_('formbehavior.chosen', 'select');
$user = JFactory::getUser();
$listOrder = $this->escape($this->state->get('list.ordering'));
$listDirn = $this->escape($this->state->get('list.direction'));
?>
<form action="<?php echo JRoute::_('index.php?option=com_messages&view=messages'); ?>" method="post" name="adminForm" id="adminForm">
<?php if (!empty( $this->sidebar)) : ?>
<div id="j-sidebar-container" class="span2">
<?php echo $this->sidebar; ?>
</div>
<div id="j-main-container" class="span10">
<?php else : ?>
<div id="j-main-container">
<?php endif;?>
<div id="filter-bar" class="btn-toolbar">
<div class="filter-search btn-group pull-left">
<input type="text" name="filter_search" id="filter_search" placeholder="<?php echo JText::_('JSEARCH_FILTER'); ?>" value="<?php echo $this->escape($this->state->get('filter.search')); ?>" class="hasTooltip" title="<?php echo JHtml::tooltipText('COM_MESSAGES_SEARCH_IN_SUBJECT'); ?>" />
</div>
<div class="btn-group pull-left">
<button type="submit" class="btn hasTooltip" title="<?php echo JHtml::tooltipText('JSEARCH_FILTER_SUBMIT'); ?>"><i class="icon-search"></i></button>
<button type="button" class="btn hasTooltip" title="<?php echo JHtml::tooltipText('JSEARCH_FILTER_CLEAR'); ?>" onclick="document.id('filter_search').value='';this.form.submit();"><i class="icon-remove"></i></button>
</div>
<div class="btn-group pull-left">
<select name="filter_state" class="inputbox" onchange="this.form.submit()">
<option value=""><?php echo JText::_('JOPTION_SELECT_PUBLISHED');?></option>
<?php echo JHtml::_('select.options', MessagesHelper::getStateOptions(), 'value', 'text', $this->state->get('filter.state'));?>
</select>
</div>
</div>
<div class="clearfix"> </div>
<table class="table table-striped">
<thead>
<tr>
<th width="20">
<?php echo JHtml::_('grid.checkall'); ?>
</th>
<th class="title">
<?php echo JHtml::_('grid.sort', 'COM_MESSAGES_HEADING_SUBJECT', 'a.subject', $listDirn, $listOrder); ?>
</th>
<th width="5%">
<?php echo JHtml::_('grid.sort', 'COM_MESSAGES_HEADING_READ', 'a.state', $listDirn, $listOrder); ?>
</th>
<th width="15%">
<?php echo JHtml::_('grid.sort', 'COM_MESSAGES_HEADING_FROM', 'a.user_id_from', $listDirn, $listOrder); ?>
</th>
<th width="20%" class="nowrap">
<?php echo JHtml::_('grid.sort', 'JDATE', 'a.date_time', $listDirn, $listOrder); ?>
</th>
</tr>
</thead>
<tfoot>
<tr>
<td colspan="6">
<?php echo $this->pagination->getListFooter(); ?>
</td>
</tr>
</tfoot>
<tbody>
<?php foreach ($this->items as $i => $item) :
$canChange = $user->authorise('core.edit.state', 'com_messages');
?>
<tr class="row<?php echo $i % 2; ?>">
<td>
<?php echo JHtml::_('grid.id', $i, $item->message_id); ?>
</td>
<td>
<a href="<?php echo JRoute::_('index.php?option=com_messages&view=message&message_id='.(int) $item->message_id); ?>">
<?php echo $this->escape($item->subject); ?></a>
</td>
<td class="center">
<?php echo JHtml::_('messages.state', $item->state, $i, $canChange); ?>
</td>
<td>
<?php echo $item->user_from; ?>
</td>
<td>
<?php echo JHtml::_('date', $item->date_time, JText::_('DATE_FORMAT_LC2')); ?>
</td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
<div>
<input type="hidden" name="task" value="" />
<input type="hidden" name="boxchecked" value="0" />
<input type="hidden" name="filter_order" value="<?php echo $listOrder; ?>" />
<input type="hidden" name="filter_order_Dir" value="<?php echo $listDirn; ?>" />
<?php echo JHtml::_('form.token'); ?>
</div>
</div>
</form>

View File

@ -0,0 +1 @@
<!DOCTYPE html><title></title>

View File

@ -0,0 +1,101 @@
<?php
/**
* @package Joomla.Administrator
* @subpackage com_messages
*
* @copyright Copyright (C) 2005 - 2013 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
JHtml::_('behavior.modal');
/**
* View class for a list of messages.
*
* @package Joomla.Administrator
* @subpackage com_messages
* @since 1.6
*/
class MessagesViewMessages extends JViewLegacy
{
protected $items;
protected $pagination;
protected $state;
/**
* Display the view
*/
public function display($tpl = null)
{
$this->items = $this->get('Items');
$this->pagination = $this->get('Pagination');
$this->state = $this->get('State');
// Check for errors.
if (count($errors = $this->get('Errors')))
{
JError::raiseError(500, implode("\n", $errors));
return false;
}
$this->addToolbar();
$this->sidebar = JHtmlSidebar::render();
parent::display($tpl);
}
/**
* Add the page title and toolbar.
*
* @since 1.6
*/
protected function addToolbar()
{
$state = $this->get('State');
$canDo = MessagesHelper::getActions();
JToolbarHelper::title(JText::_('COM_MESSAGES_MANAGER_MESSAGES'), 'inbox.png');
if ($canDo->get('core.create'))
{
JToolbarHelper::addNew('message.add');
}
if ($canDo->get('core.edit.state'))
{
JToolbarHelper::divider();
JToolbarHelper::publish('messages.publish', 'COM_MESSAGES_TOOLBAR_MARK_AS_READ');
JToolbarHelper::unpublish('messages.unpublish', 'COM_MESSAGES_TOOLBAR_MARK_AS_UNREAD');
}
if ($state->get('filter.state') == -2 && $canDo->get('core.delete'))
{
JToolbarHelper::divider();
JToolbarHelper::deleteList('', 'messages.delete', 'JTOOLBAR_EMPTY_TRASH');
} elseif ($canDo->get('core.edit.state'))
{
JToolbarHelper::divider();
JToolbarHelper::trash('messages.trash');
}
//JToolbarHelper::addNew('module.add');
JToolbarHelper::divider();
$bar = JToolBar::getInstance('toolbar');
JHtml::_('bootstrap.modal', 'collapseModal');
$title = JText::_('COM_MESSAGES_TOOLBAR_MY_SETTINGS');
$dhtml = "<a class=\"btn modal btn-small\" href=\"index.php?option=com_messages&amp;view=config&amp;tmpl=component\"
rel=\"{handler:'iframe', size:{x:700,y:300}}\">
<i class=\"icon-cog\" title=\"$title\"></i>$title</a>";
$bar->appendButton('Custom', $dhtml, 'config');
if ($canDo->get('core.admin'))
{
JToolbarHelper::preferences('com_messages');
}
JToolbarHelper::divider();
JToolbarHelper::help('JHELP_COMPONENTS_MESSAGING_INBOX');
}
}