<?php

/** 
* @package Component VM Coupons for Joomla! 2.5 
* @author Glimlag.gr 
* @copyright (C) 2012- Glimlag.gr 
* @license GNU/GPLv2 http://www.gnu.org/licenses/gpl-2.0.html
**/
// No direct access to this file
defined('_JEXEC') or die('Restricted access');
// import joomla controller library
JTable::addIncludePath(JPATH_COMPONENT . DS . 'tables');
if (!class_exists('VmConfig')) {
    require JPATH_ADMINISTRATOR . '/components/com_virtuemart/helpers/config.php';
}
VmConfig::loadConfig();
$jlang =& JFactory::getLanguage();
$jlang->load('com_vmcoupons', JPATH_ADMINISTRATOR, 'en-GB', true);
$jlang->load('tpl.fabrik.custom');
$jlang->load('com_vmcoupons', JPATH_ADMINISTRATOR, null, true);
$jlang->load('com_vmcoupons', JPATH_COMPONENT_ADMINISTRATOR, null, true);
require_once dirname(__FILE__) . DS . 'cookie.php';
require_once JPATH_COMPONENT . '/helpers/vmcoupon.helper.php';
// Require the base controller
require_once JPATH_COMPONENT . '/controller.php';
RSCouponsHelper::addSubmenu(JRequest::getCmd('view', 'dashboard'));
$controller = new VMCouponsController();
// Perform the Request task
$controller->execute(JRequest::getWord('task', ''));
// Redirect if set by the controller
$controller->redirect();
Exemple #2
0
 function addcoupon()
 {
     JRequest::setVar('cid', '');
     VMCouponsController::editcoupon();
 }