Spade

Mini Shell

Directory:~$ /home/lmsyaran/public_html/joomla4/
Upload File

[Home] [System Details] [Kill Me]
Current File:~$ /home/lmsyaran/public_html/joomla4/tickethistory.zip

PKR��[�9y���tickethistory.phpnu�[���<?php
/**
 * @version        4.3.0
 * @package        Joomla
 * @subpackage     Helpdesk Pro
 * @author         Tuan Pham Ngoc
 * @copyright      Copyright (C) 2013 - 2021 Ossolution Team
 * @license        GNU/GPL, see LICENSE.php
 */

defined('_JEXEC') or die;

use Joomla\CMS\Plugin\CMSPlugin;
use Joomla\CMS\Plugin\PluginHelper;

class plgHelpdeskProTicketHistory extends CMSPlugin
{
	public function onViewTicket($row)
	{
		$limit      = (int) $this->params->get('limit', 10);
		$dateFormat = $this->params->get('date_format',
'm-d-Y');
		$db         = JFactory::getDbo();
		$query      = $db->getQuery(true);

		$query->select('id, subject, created_date')
			->from('#__helpdeskpro_tickets')
			->where('(user_id = ' . (int) $row->user_id . ' OR
email = ' . $db->quote($row->email) . ')')
			->order('id DESC');
		$db->setQuery($query, 0, $limit);
		$rows = $db->loadObjectList();

		if (count($rows))
		{
			// Get the path for the layout file
			$path = PluginHelper::getLayoutPath('helpdeskpro',
'tickethistory');

			// Render the layout
			ob_start();
			include $path;
			return ob_get_clean();
		}

		return null;
	}
}	PKR��[4����tickethistory.xmlnu�[���<?xml
version="1.0" encoding="utf-8"?>
<extension version="1.6.0" type="plugin"
group="helpdeskpro" method="upgrade">
	<name>Helpdesk Pro - Tickethistory</name>
	<author>Tuan Pham Ngoc</author>
	<creationDate>October 2012</creationDate>
	<copyright>Ossolution Team</copyright>
	<license>http://www.gnu.org/licenses/gpl-2.0.html
GNU/GPL</license>
	<authorEmail>contact@joomdonation.com</authorEmail>
	<authorUrl>www.joomdonation.com</authorUrl>
	<version>4.3.0</version>
	<description>This plugin displays tickets history the user who
submitted the current ticket</description>
	<files>
		<filename
plugin="tickethistory">tickethistory.php</filename>
		<folder>tmpl</folder>
	</files>
	<config>
		<fields name="params">
			<fieldset name="basic">
				<field name="limit" type="text"
default="10" label="Limit" description=""
/>
				<field name="date_format" type="text"
default="m-d-Y" label="Date Format"
description="" />
			</fieldset>
		</fields>
	</config>			
</extension>
PKR��[���UUtmpl/default.phpnu�[���<?php
/**
 * @version        3.4.0
 * @package        Joomla
 * @subpackage     Helpdesk Pro
 * @author         Tuan Pham Ngoc
 * @copyright      Copyright (C) 2013 - 2021 Ossolution Team
 * @license        GNU/GPL, see LICENSE.php
 */

use Joomla\CMS\HTML\HTMLHelper;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;

?>
	<tr>
		<th colspan="2"><?php echo
Text::_('HDP_TICKET_HISTORY'); ?></th>
	</tr>
<?php
	foreach ($rows as $row)
	{
	?>
		<tr id="footer_result">
			<td colspan="2">
				<a href="<?php echo
Route::_('index.php?option=com_helpdeskpro&task=ticket.edit&cid[]='
. (int) $row->id) ?>"
				   target="_blank">
					[#<?php echo $row->id; ?>]&nbsp;-&nbsp;<?php echo
$row->subject ?>
					(<?php echo HTMLHelper::_('date', $row->created_date,
$dateFormat); ?>)
				</a>
			</td>
		</tr>
	<?php
	}
PKR��[�9y���tickethistory.phpnu�[���PKR��[4�����tickethistory.xmlnu�[���PKR��[���UU	tmpl/default.phpnu�[���PK��