| Server IP : 195.130.67.5 / Your IP : 216.73.217.154 Web Server : Microsoft-IIS/10.0 System : Windows NT WEBSERVER1 10.0 build 17763 (Windows Server 2016) i586 User : IUSR ( 0) PHP Version : 7.4.19 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /Old Sites/ees_request/administrator/components/com_printme/views/config/ |
Upload File : |
<?php
/**
* @version 1.5
* @package Printme
* @author Dioscouri Design
* @link http://www.dioscouri.com
* @copyright Copyright (C) 2007 Dioscouri Design. All rights reserved.
* @license http://www.gnu.org/copyleft/gpl.html GNU/GPL, see LICENSE.php
*/
/** ensure this file is being included by a parent file */
defined('_JEXEC') or die('Restricted access');
JLoader::import( 'com_printme.views._base', JPATH_ADMINISTRATOR.DS.'components' );
class PrintmeViewConfig extends PrintmeViewBase
{
/**
*
* @param $tpl
* @return unknown_type
*/
function getLayoutVars($tpl=null)
{
$layout = $this->getLayout();
switch(strtolower($layout))
{
case "default":
default:
$this->_default($tpl);
break;
}
}
/**
*
* @return void
**/
function _default($tpl = null)
{
JLoader::import( 'com_printme.library.select', JPATH_ADMINISTRATOR.DS.'components' );
JLoader::import( 'com_printme.library.grid', JPATH_ADMINISTRATOR.DS.'components' );
JLoader::import( 'com_printme.library.tools', JPATH_ADMINISTRATOR.DS.'components' );
// check config
$row = Printme::getInstance();
$this->assign( 'row', $row );
// add toolbar buttons
JToolBarHelper::save('save');
JToolBarHelper::cancel( 'close', JText::_( 'Close' ) );
// plugins
$filtered = array();
$items = PrintmeHelperTools::getPlugins();
for ($i=0; $i<count($items); $i++)
{
$item = &$items[$i];
// Check if they have an event
if ($hasEvent = PrintmeHelperTools::hasEvent( $item, 'onListConfigPrintme' )) {
// add item to filtered array
$filtered[] = $item;
}
}
$items = $filtered;
$this->assign( 'items_sliders', $items );
// Add pane
jimport('joomla.html.pane');
$sliders = JPane::getInstance( 'sliders' );
$this->assign('sliders', $sliders);
// form
$validate = JUtility::getToken();
$form = array();
$view = strtolower( JRequest::getVar('view') );
$form['action'] = "index.php?option=com_printme&controller={$view}&view={$view}";
$form['validate'] = "<input type='hidden' name='{$validate}' value='1' />";
$this->assign( 'form', $form );
// set the required image
// TODO Fix this to use defines
$required = new stdClass();
$required->text = JText::_( 'Required' );
$required->image = "<img src='".JURI::root()."/media/com_printme/images/required_16.png' alt='{$required->text}'>";
$this->assign('required', $required );
}
}