Beispiel #1
0
 function __construct($config = array())
 {
     parent::__construct($config);
     // Apply, Save & New
     $this->registerTask('apply', 'save');
     $this->registerTask('save2new', 'save');
 }
 public function init()
 {
     parent::init();
     $app = Yii::getPathOfAlias('app');
     $this->shell = $app . '/commands/shell/wakfu.sh';
     $this->client = $app . '/commands/shell/ss-client.sh';
     $this->pacPath = $app . '/data/pac/';
 }
 function __construct()
 {
     parent::__construct('Topic');
     self::$_main_title = _lg('Plugin');
 }
 function __construct()
 {
     parent::__construct();
     self::$_main_title = _lg('Widget');
 }
Beispiel #5
0
 function display($cachable = false, $urlparams = false)
 {
     $app = JFactory::getApplication();
     $document = JFactory::getDocument();
     $user = JFactory::getUser();
     if (!JRequest::getCmd('view')) {
         $default = 'front';
         JRequest::setVar('view', $default);
     }
     $viewName = JRequest::getVar('view', 'front', 'default', 'cmd');
     $type = JRequest::getVar('format', 'html', 'default', 'cmd');
     $view = $this->getView($viewName, $type);
     if ($viewName == "edit") {
         $this->write();
         return;
     }
     $uri = JFactory::getURI();
     $baseurl = JURI::base();
     $view->assign("baseurl", $baseurl);
     $view->assignRef("baseurl", $baseurl);
     if ($type == "html" && !defined('_ADSMANAGER_CSS')) {
         /** ensure that functions are declared only once */
         define('_ADSMANAGER_CSS', 1);
         $uri = JFactory::getURI();
         $baseurl = JURI::base();
         $document = JFactory::getDocument();
         $app = JFactory::getApplication();
         $templateDir = JPATH_ROOT . '/templates/' . $app->getTemplate();
         if (is_file($templateDir . '/html/com_adsmanager/css/adsmanager.css')) {
             $templateDir = JURI::base() . 'templates/' . $app->getTemplate();
             $document->addStyleSheet($templateDir . '/html/com_adsmanager/css/adsmanager.css');
         } else {
             $document->addStyleSheet($baseurl . 'components/com_adsmanager/css/adsmanager.css');
         }
     }
     // Push a model into the view
     $this->addModelPath(JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_adsmanager' . DS . 'models');
     $contentmodel = $this->getModel("content");
     $catmodel = $this->getModel("category");
     $positionmodel = $this->getModel("position");
     $columnmodel = $this->getModel("column");
     $fieldmodel = $this->getModel("field");
     $usermodel = $this->getModel("user");
     $adsmanagermodel = $this->getModel("adsmanager");
     $configurationmodel = $this->getModel("configuration");
     if (!JError::isError($contentmodel)) {
         $view->setModel($contentmodel, true);
     }
     $view->setModel($contentmodel);
     $view->setModel($catmodel);
     $view->setModel($positionmodel);
     $view->setModel($columnmodel);
     $view->setModel($fieldmodel);
     $view->setModel($usermodel);
     $view->setModel($adsmanagermodel);
     $view->setModel($configurationmodel);
     $conf = $configurationmodel->getConfiguration();
     if (ADSMANAGER_SPECIAL == "abrivac" && (JRequest::getCmd('view') == 'front' || JRequest::getCmd('view') == 'rules')) {
         return;
     }
     if (file_exists(JPATH_BASE . '/components/com_adsmanager/cron.php')) {
         require_once JPATH_BASE . '/components/com_adsmanager/cron.php';
     }
     if ($last_cron_date != date("Ymd")) {
         $contentmodel->manage_expiration($fieldmodel->getPlugins(), $conf);
     }
     if (function_exists("managePaidOption")) {
         managePaidOption();
     }
     if ($viewName == "details") {
         $contentid = JRequest::getInt('id', 0);
         $content = $contentmodel->getContent($contentid, false);
         // increment views. views from ad author are not counted to prevent highclicking views of own ad
         if ($user->id != $content->userid || $content->userid == 0) {
             $contentmodel->increaseHits($content->id);
         }
     }
     if ($viewName == "list" && $user->get('id') == 0 && JRequest::getInt('user', -1) == 0) {
         TTools::redirectToLogin("index.php?option=com_adsmanager&view=list&user="******"result") {
             parent::display(false);
         } else {
             if ($viewName == "list") {
                 $cache = JFactory::getCache('com_adsmanager');
                 $method = array($view, 'display');
                 $session = JFactory::getSession();
                 $tsearch = JRequest::getVar('tsearch', $session->get('tsearch', '', 'adsmanager'));
                 $limit = $conf->ads_per_page;
                 $order = $app->getUserStateFromRequest('com_adsmanager.front_content.order', 'order', 0, 'int');
                 $mode = $app->getUserStateFromRequest('com_adsmanager.front_content.mode', 'mode', $conf->display_expand);
                 $url = $uri->toString();
                 echo $cache->call($method, null, $url, $tsearch, $limit, $order, $mode) . "\n";
             } else {
                 parent::display(true);
             }
         }
     }
     $path = JPATH_ADMINISTRATOR . '/../libraries/joomla/database/table';
     JTable::addIncludePath($path);
 }
 function __construct($config = array())
 {
     parent::__construct($config);
 }
/**
 * @package		AdsManager
 * @copyright	Copyright (C) 2010-2014 Juloa.com. All rights reserved.
 * @license		GNU/GPL
 */

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

require_once(JPATH_COMPONENT.'/lib/core.php');

// Require the com_content helper library
require_once(JPATH_COMPONENT.'/controller.php');

// Component Helper
jimport('joomla.application.component.helper');



// Create the controller
if(version_compare(JVERSION,'1.6.0','>=')){
	$controller = TController::getInstance('adsmanager');
} else {
	$controller = new AdsmanagerController();
}

// Perform the Request task
$controller->execute(JRequest::getCmd('task'));
 
// Redirect if set by the controller
$controller->redirect();
 function __construct()
 {
     parent::__construct();
     self::$_main_title = _lg('Access');
 }
 function __construct()
 {
     parent::__construct();
     self::$_main_title = _lg('DropDown Menu');
 }
 function __construct()
 {
     parent::__construct();
     self::$_main_title = _lg('Managers');
 }
 function __construct()
 {
     parent::__construct();
 }
Beispiel #12
0
 function display($cachable = false, $urlparams = false)
 {
     $app = JFactory::getApplication();
     $document = JFactory::getDocument();
     $user = JFactory::getUser();
     if (!JRequest::getCmd('view')) {
         $default = 'front';
         JRequest::setVar('view', $default);
     }
     if (version_compare(JVERSION, '3.0', 'ge')) {
         $viewLayout = $this->input->get('layout', 'default', 'string');
     } else {
         $viewLayout = JRequest::getVar('layout', 'default', 'string');
     }
     //$viewLayout = "ouacheteroutrouver:write";
     $viewName = JRequest::getVar('view', 'front', 'default', 'cmd');
     $type = JRequest::getVar('format', 'html', 'default', 'cmd');
     $view = $this->getView($viewName, $type, '', array('layout' => $viewLayout));
     if ($viewName == "edit") {
         $this->write();
         return;
     }
     $uri = JFactory::getURI();
     $baseurl = JURI::base();
     $view->assign("baseurl", $baseurl);
     $view->assignRef("baseurl", $baseurl);
     // Push a model into the view
     $this->addModelPath(JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_adsmanager' . DS . 'models');
     $contentmodel = $this->getModel("content");
     $catmodel = $this->getModel("category");
     $positionmodel = $this->getModel("position");
     $columnmodel = $this->getModel("column");
     $fieldmodel = $this->getModel("field");
     $usermodel = $this->getModel("user");
     $adsmanagermodel = $this->getModel("adsmanager");
     $configurationmodel = $this->getModel("configuration");
     $conf = $configurationmodel->getConfiguration();
     loadAdsManagerCss();
     if (!JError::isError($contentmodel)) {
         $view->setModel($contentmodel, true);
     }
     $view->setModel($contentmodel);
     $view->setModel($catmodel);
     $view->setModel($positionmodel);
     $view->setModel($columnmodel);
     $view->setModel($fieldmodel);
     $view->setModel($usermodel);
     $view->setModel($adsmanagermodel);
     $view->setModel($configurationmodel);
     if (ADSMANAGER_SPECIAL == "abrivac" && (JRequest::getCmd('view') == 'front' || JRequest::getCmd('view') == 'rules')) {
         return;
     }
     if ($conf->crontype == "onrequest") {
         $this->cron();
     }
     if ($viewName == "details") {
         $contentid = JRequest::getInt('id', 0);
         $content = $contentmodel->getContent($contentid, false);
         // increment views. views from ad author are not counted to prevent highclicking views of own ad
         if ($user->id != $content->userid || $content->userid == 0) {
             $contentmodel->increaseHits($content->id);
         }
     }
     if ($viewName == "list" && $user->get('id') == 0 && JRequest::getInt('user', -1) == 0) {
         TTools::redirectToLogin("index.php?option=com_adsmanager&view=list&user="******"result") {
             parent::display(false);
         } else {
             if ($viewName == "list") {
                 $cache = JFactory::getCache('com_adsmanager');
                 $method = array($view, 'display');
                 $session = JFactory::getSession();
                 $tsearch = JRequest::getVar('tsearch', $session->get('tsearch', '', 'adsmanager'));
                 $limit = $conf->ads_per_page;
                 $order = $app->getUserStateFromRequest('com_adsmanager.front_content.order', 'order', 0, 'int');
                 $mode = $app->getUserStateFromRequest('com_adsmanager.front_content.mode', 'mode', $conf->display_expand);
                 $url = $uri->toString();
                 //Fix needed in case of cache activated otherwise addScript is not added by gmap module
                 $conf = TConf::getConfig();
                 if (@$conf->display_map_list == 1) {
                     $document = JFactory::getDocument();
                     $document->addScript(JURI::root() . 'components/com_adsmanager/js/jquery.cookie.js');
                 }
                 echo $cache->call($method, null, $url, $tsearch, $limit, $order, $mode) . "\n";
             } else {
                 parent::display(true);
             }
         }
     }
     $path = JPATH_ADMINISTRATOR . '/../libraries/joomla/database/table';
     JTable::addIncludePath($path);
 }
 function __construct()
 {
     parent::__construct();
     self::$_main_title = _lg('Members');
     $this->report = new TModel('report', 'report_');
 }
 function __construct()
 {
     parent::__construct();
     self::$_main_title = _lg('Search');
 }
	function display($cachable = false, $urlparams = false)
	{
		$app = JFactory::getApplication();
		$document = JFactory::getDocument();
		$user		= JFactory::getUser();
		
		if ( ! JRequest::getCmd( 'view' ) ) {
			$default	= 'front';
			JRequest::setVar('view', $default );
		}
		
        if(version_compare(JVERSION, '3.0', 'ge')) {
		$viewLayout = $this->input->get('layout', 'default', 'string');
        } else {
            $viewLayout = JRequest::getVar('layout', 'default', 'string');
        }
		//$viewLayout = "ouacheteroutrouver:write";
		
		$viewName  = JRequest::getVar('view', 'front', 'default', 'cmd');
		$type	   = JRequest::getVar('format', 'html', 'default', 'cmd');
		$view      = $this->getView($viewName,$type,'',array('layout' => $viewLayout));
		
		if ($viewName == "edit")
		{
			$this->write();
			return;
		}
		
		$uri = JFactory::getURI();
		$baseurl = JURI::base();
		$view->assign("baseurl",$baseurl);
		$view->assignRef("baseurl",$baseurl);
		
		// Push a model into the view
		$this->addModelPath(JPATH_ADMINISTRATOR.DS.'components'.DS.'com_adsmanager'.DS.'models');
		
		$contentmodel	=$this->getModel( "content" );
		$catmodel		=$this->getModel( "category" );
		$positionmodel	=$this->getModel( "position" );
		$columnmodel	=$this->getModel( "column" );
		$fieldmodel	    =$this->getModel( "field" );
		$usermodel		=$this->getModel( "user" );
		$adsmanagermodel=$this->getModel( "adsmanager" );
		$configurationmodel	=$this->getModel( "configuration" );
        $conf = $configurationmodel->getConfiguration();
        
		if (($type == "html")&&(!defined( '_ADSMANAGER_CSS' ))) {
			/** ensure that functions are declared only once */
			define( '_ADSMANAGER_CSS', 1 );
			$uri = JFactory::getURI();
			$baseurl = JURI::base();
			
			$document = JFactory::getDocument();
			$app = JFactory::getApplication();
			$templateDir = JPATH_ROOT . '/templates/' . $app->getTemplate();
            if(!isset($conf->bootstrap_loading) || $conf->bootstrap_loading != 2){
                if(@$conf->bootstrap_loading == 1) {
                    $document->addStyleSheet($baseurl.'components/com_adsmanager/css/bootstrap.min.css');
                    //$document->addStyleSheet($baseurl.'components/com_adsmanager/css/bootstrap-responsive.min.css');
                } else {
                    $document->addStyleSheet($baseurl.'components/com_adsmanager/css/basestyle.css');
                }
            }
			if (is_file($templateDir.'/html/com_adsmanager/css/adsmanager.css')) {
				$templateDir = JURI::base() . 'templates/' . $app->getTemplate();
				$document->addStyleSheet($templateDir.'/html/com_adsmanager/css/adsmanager.css');
            } else {
				$document->addStyleSheet($baseurl.'components/com_adsmanager/css/adsmanager.css');
			}
		}
		
		if (!JError::isError( $contentmodel )) {
			$view->setModel( $contentmodel, true );
		}	
		
		$view->setModel( $contentmodel);
		$view->setModel( $catmodel);
		$view->setModel( $positionmodel);
		$view->setModel( $columnmodel);
		$view->setModel( $fieldmodel);
		$view->setModel( $usermodel);
		$view->setModel( $adsmanagermodel);
		$view->setModel( $configurationmodel);
		
		if ((ADSMANAGER_SPECIAL == "abrivac") &&
			((JRequest::getCmd( 'view' ) == 'front')||(JRequest::getCmd( 'view' ) == 'rules')))
			return;
		
		if ($conf->crontype == "onrequest") {
			$this->cron();
		}
		
		if ($viewName == "details") {
			$contentid = JRequest::getInt( 'id',	0 );
			$content = $contentmodel->getContent($contentid,false);
			// increment views. views from ad author are not counted to prevent highclicking views of own ad
			if ( $user->id <> $content->userid || $content->userid==0) {
				$contentmodel->increaseHits($content->id);
			}
		}
		
		if (($viewName == "list")&&($user->get('id')==0)&&(JRequest::getInt( 'user',	-1 ) == 0)) {
			TTools::redirectToLogin("index.php?option=com_adsmanager&view=list&user="******"result")
		{
			parent::display(false);
		}
		else if ($viewName == "list")
		{
			$cache = JFactory::getCache( 'com_adsmanager' );
			$method = array( $view, 'display' );
			
			$session = JFactory::getSession();
			$tsearch = JRequest::getVar( 'tsearch',	$session->get('tsearch','','adsmanager'));
			$limit   = $conf->ads_per_page;
			$order   = $app->getUserStateFromRequest('com_adsmanager.front_content.order','order',0,'int');
			$mode    = $app->getUserStateFromRequest('com_adsmanager.front_content.mode','mode',$conf->display_expand);
			$url = $uri->toString();
			
			echo $cache->call( $method, null,$url,$tsearch,$limit,$order,$mode) . "\n";
		}
		else
		{	
			parent::display(true);
		}
		
		$path = JPATH_ADMINISTRATOR.'/../libraries/joomla/database/table';
		JTable::addIncludePath($path);
	}
 function __construct()
 {
     parent::__construct('category');
     self::$_main_title = _lg('Category');
 }
 public function init()
 {
     $this->aes = new MobifoneAES($this->key, '');
     parent::init();
 }
 function __construct()
 {
     parent::__construct();
     self::$_main_title = _lg('Upload');
 }