Current File : /home/pacjaorg/public_html/km/administrator/components/com_djclassifieds/views/email/view.html.php |
<?php
/**
* @package DJ-Classifieds
* @copyright Copyright (C) DJ-Extensions.com, All rights reserved.
* @license http://www.gnu.org/licenses GNU/GPL
* @author url: http://dj-extensions.com
* @author email: contact@dj-extensions.com
*/
defined ('_JEXEC') or die('Restricted access');
class DJClassifiedsViewEmail extends JViewLegacy
{
function display($tpl = null)
{
$this->state = $this->get('State');
$this->item = $this->get('Item');
$this->form = $this->get('Form');
$this->addToolbar();
$this->bs_cl = DJClassifiedsTheme::getBSClasses();
$allowed = array();
$allowed['ad_edit'] = array(11=>1,21=>1);
$allowed['ask'] = array(7=>1,27=>1,33=>1,34=>1,36=>1);
$allowed['ask_integration'] = array(7=>1,27=>1);
$allowed['receiver_guest'] = array(21=>1);
$allowed['abuse'] = array(8=>1);
$allowed['bidder'] = array(1=>1,2=>1,3=>1,4=>1,5=>1,6=>1,12=>1,13=>1,14=>1,15=>1);
$allowed['bidder_contact'] = array(6=>1);
$allowed['buynow'] = array(16=>1,17=>1);
$allowed['purchase_details'] = array(16=>1,17=>1,5=>1);
$allowed['buynow_offer'] = array(24=>1,25=>1,26=>1,31=>1,32=>1);
$allowed['buynow_offer_response'] = array(26=>1);
$allowed['payments'] = array(20=>1,23=>1,35=>1);
$allowed['points'] = array(22=>1);
$allowed['expiration'] = array(18=>1);
$allowed['plans'] = array(37=>1);
$allowed['prom'] = array(38=>1);
$disabled = array();
$disabled['ad_details'] = array(33=>1,34=>1,35=>1,36=>1,37=>1);
$disabled['receiver'] = array(8=>1,9=>1,10=>1,21=>1,23=>1,28=>1,29=>1,30=>1);
$app = JFactory::getApplication();
$app->triggerEvent('onDJClassifiedsAdminEditEmailTemplatePrepare', array (&$this->item, &$allowed, &$disabled));
$this->allowed = $allowed;
$this->disabled = $disabled;
parent::display($tpl);
}
protected function addToolbar()
{
JFactory::getApplication()->input->set('hidemainmenu', true);
$isNew = ($this->item->id == 0);
$text = $isNew ? JText::_( 'COM_DJCLASSIFIEDS_NEW' ) : JText::_( 'COM_DJCLASSIFIEDS_EDIT' );
JToolBarHelper::title( JText::_( 'COM_DJCLASSIFIEDS_EMAIL_TEMPLATE' ).': <small><small>[ ' . $text.' ]</small></small>', 'generic.png' );
JToolBarHelper::apply('email.apply', 'JTOOLBAR_APPLY');
JToolBarHelper::save('email.save', 'JTOOLBAR_SAVE');
JToolBarHelper::custom('email.savesend', 'mail', 'mail', 'JTOOLBAR_SAVE_AND_SEND_TO_ADMIN', false);
JToolBarHelper::cancel('email.cancel', 'JTOOLBAR_CANCEL');
}
}