/**
  * Fetch custom Element view.
  *
  * @param   string  $name          Field Name.
  * @param   mixed   $value         Field value.
  * @param   mixed   $node          Field node.
  * @param   mixed   $control_name  Field control_name/Id.
  *
  * @since   2.2
  * @return   null
  */
 public function fetchElement($name, $value, $node, $control_name)
 {
     $db = JFactory::getDBO();
     $user = JFactory::getUser();
     // While edit: get profile store id
     $app = JFactory::getApplication();
     $jinput = $app->input;
     $id = $jinput->get('id');
     $defaultStore_id = 0;
     // Load tax helper.
     $path = JPATH_SITE . DS . "components" . DS . "com_quick2cart" . DS . 'helpers' . DS . "taxHelper.php";
     if (!class_exists('taxHelper')) {
         JLoader::register('taxHelper', $path);
         JLoader::load('taxHelper');
     }
     $taxHelper = new taxHelper();
     if ($id) {
         $defaultStore_id = $taxHelper->getTaxProfileStoreId($id);
     }
     $storeList = $taxHelper->getStoreListForTaxprofile();
     $options = array();
     foreach ($storeList as $store) {
         $storename = ucfirst($store['title']);
         $options[] = JHtml::_('select.option', $store['store_id'], $storename);
     }
     $fieldName = $name;
     return JHtml::_('select.genericlist', $options, $fieldName, 'class="inputbox required"  size="1"  ', 'value', 'text', $defaultStore_id, $control_name);
 }
Esempio n. 2
0
 public static function autoload($className)
 {
     Doctrine::autoload($className);
     Doctrine::modelsAutoload($className);
     JLoader::load($className);
     return true;
 }
Esempio n. 3
0
 /**
  * Fetch custom Element view.
  *
  * @param   string  $name          Field Name.
  * @param   mixed   $value         Field value.
  * @param   mixed   $node          Field node.
  * @param   mixed   $control_name  Field control_name/Id.
  *
  * @since   2.2
  * @return   null
  */
 public function fetchElement($name, $value, $node, $control_name)
 {
     $db = JFactory::getDBO();
     $user = JFactory::getUser();
     $comquick2cartHelper = new comquick2cartHelper();
     // Getting user accessible store ids
     $storeList = $comquick2cartHelper->getStoreIds();
     $options = array();
     $app = JFactory::getApplication();
     $jinput = $app->input;
     $zone_id = $jinput->get('id');
     $defaultSstore_id = 0;
     if ($zone_id) {
         // Load Zone helper.
         $path = JPATH_SITE . DS . "components" . DS . "com_quick2cart" . DS . 'helpers' . DS . "zoneHelper.php";
         if (!class_exists('zoneHelper')) {
             JLoader::register('zoneHelper', $path);
             JLoader::load('zoneHelper');
         }
         $zoneHelper = new zoneHelper();
         $defaultSstore_id = $zoneHelper->getZoneStoreId($zone_id);
     }
     foreach ($storeList as $store) {
         $storename = ucfirst($store['title']);
         $options[] = JHtml::_('select.option', $store['store_id'], $storename);
     }
     $fieldName = $name;
     return JHtml::_('select.genericlist', $options, $fieldName, 'class="inputbox required"  size="1"  ', 'value', 'text', $defaultSstore_id, $control_name);
 }
Esempio n. 4
0
 function StoreAllAttribute($item_id, $allAttrib, $sku, $client)
 {
     // get  attributeid list FROM POST
     $attIdList = array();
     foreach ($allAttrib as $attributes) {
         if (!empty($attributes['attri_id'])) {
             $attIdList[] = $attributes['attri_id'];
         }
     }
     // DEL EXTRA ATTRIBUTES
     if (!class_exists('productHelper')) {
         // require while called from backend
         JLoader::register('productHelper', JPATH_SITE . DS . 'components' . DS . 'com_quick2cart' . DS . 'helpers' . DS . 'product.php');
         JLoader::load('productHelper');
     }
     //THIS  DELETE db attributes which is not present now or removed
     $productHelper = new productHelper();
     $productHelper->deleteExtaAttribute($item_id, $attIdList);
     if (!class_exists('quick2cartModelAttributes')) {
         // require while called from backend
         JLoader::register('quick2cartModelAttributes', JPATH_SITE . DS . 'components' . DS . 'com_quick2cart' . DS . 'models' . DS . 'attributes.php');
         JLoader::load('quick2cartModelAttributes');
     }
     $quick2cartModelAttributes = new quick2cartModelAttributes();
     foreach ($allAttrib as $key => $attr) {
         $attr['sku'] = $sku;
         $attr['client'] = $client;
         $attr['item_id'] = $item_id;
         // Dont consider empty attributes
         if (!empty($attr['attri_name'])) {
             $quick2cartModelAttributes->store($attr);
         }
     }
 }
Esempio n. 5
0
 public function __construct()
 {
     parent::__construct();
     // Load all required helpers.
     $component_path = JPATH_ROOT . DS . 'components' . DS . 'com_jticketing';
     if (!file_exists($component_path)) {
         return;
     }
     $jticketingmainhelperPath = JPATH_ROOT . DS . 'components' . DS . 'com_jticketing' . DS . 'helpers' . DS . 'main.php';
     if (!class_exists('jticketingmainhelper')) {
         JLoader::register('jticketingmainhelper', $jticketingmainhelperPath);
         JLoader::load('jticketingmainhelper');
     }
     $jticketingfrontendhelper = JPATH_ROOT . DS . 'components' . DS . 'com_jticketing' . DS . 'helpers' . DS . 'frontendhelper.php';
     if (!class_exists('jticketingfrontendhelper')) {
         JLoader::register('jticketingfrontendhelper', $jticketingfrontendhelper);
         JLoader::load('jticketingfrontendhelper');
     }
     $jteventHelperPath = JPATH_ROOT . DS . 'components' . DS . 'com_jticketing' . DS . 'helpers' . DS . 'event.php';
     if (!class_exists('jteventHelper')) {
         JLoader::register('jteventHelper', $jteventHelperPath);
         JLoader::load('jteventHelper');
     }
     ApiResource::addIncludePath(dirname(__FILE__) . '/jticket');
 }
Esempio n. 6
0
 /**
  * Internal service functions
  *
  * @return	object
  */
 protected function getApiInstance()
 {
     if (!$this->gplusClient) {
         JLoader::load('Google_Client');
         JLoader::load('Google_PlusService');
         $this->gplusClient = new google_api\Google_Client();
         $sitename = JFactory::getConfig()->get('sitename');
         $this->gplusClient->setApplicationName($sitename);
         $this->gplusClient->setClientId($this->client_id);
         $this->gplusClient->setClientSecret($this->client_secret);
         $requestVisibleActions = array('http://schemas.google.com/AddActivity');
         $this->gplusClient->setRequestVisibleActions($requestVisibleActions);
         if (isset($this->channel->id) && $this->channel->id) {
             require_once dirname(__FILE__) . '/../../controllers/gpluschannels.php';
             $url = AutotweetControllerGplusChannels::getCallbackUrl($this->channel->id);
             $this->gplusClient->setRedirectUri($url);
         }
         $access_token = $this->getAccessToken();
         if (empty($access_token)) {
             $this->gplusClient->setDeveloperKey($this->developer_key);
         } else {
             $this->gplusClient->setAccessToken($access_token);
         }
         $this->gplus = new google_api\Google_PlusService($this->gplusClient);
     }
     return $this->gplusClient;
 }
Esempio n. 7
0
 /**
  * Fetch custom Element view.
  *
  * @param   string  $name          Field Name.
  * @param   mixed   $value         Field value.
  * @param   mixed   $node          Field node.
  * @param   mixed   $control_name  Field control_name/Id.
  *
  * @since   2.2
  * @return   null
  */
 public function fetchElement($name, $value, $node, $control_name)
 {
     $db = JFactory::getDBO();
     $user = JFactory::getUser();
     // Load Zone helper.
     $path = JPATH_SITE . DS . "components" . DS . "com_quick2cart" . DS . 'helpers' . DS . "zoneHelper.php";
     JLoader::register('zoneHelper', $path);
     JLoader::load('zoneHelper');
     $zoneHelper = new zoneHelper();
     // Get user's accessible zone list
     $zoneList = $zoneHelper->getUserZoneList('', array(1));
     $options = array();
     $app = JFactory::getApplication();
     $jinput = $app->input;
     $taxrate_id = $jinput->get('id');
     $defaultZoneid = "";
     if ($taxrate_id) {
         $defaultZoneid = $zoneHelper->getZoneFromTaxRateId($taxrate_id);
     }
     foreach ($zoneList as $zone) {
         $zoneName = ucfirst($zone['name']);
         $options[] = JHtml::_('select.option', $zone['id'], $zoneName);
     }
     $fieldName = $name;
     return JHtml::_('select.genericlist', $options, $fieldName, 'class="inputbox required"  size="1"  ', 'value', 'text', $defaultZoneid, $control_name);
 }
 /**
  * createChannel
  *
  * @param   F0FTable  &$channel  Param
  *
  * @return	object
  */
 protected function createChannel(&$channel)
 {
     $channeltype = F0FModel::getTmpInstance('Channeltypes', 'AutoTweetModel');
     $classname = $channeltype->getChannelClass($channel->channeltype_id);
     JLoader::load($classname);
     if (!class_exists($classname)) {
         throw new Exception('Unable to load channel type (' . $channel->channeltype_id . ')');
     }
     return new $classname($channel);
 }
Esempio n. 9
0
 private static function loadHelper($class, $path, $prefix = null)
 {
     if (empty($prefix)) {
         global $ext_prefix;
         $prefix = $ext_prefix;
     }
     $class = $prefix . ucfirst($class);
     JLoader::register($class, $path);
     JLoader::load($class);
 }
 /**
  * getInstance
  *
  * @param   array  $data  Param
  *
  * @return	object
  */
 public static function getInstance($data)
 {
     JLoader::register('AutotweetIsgdService', dirname(__FILE__) . '/autotweetisgd.php');
     JLoader::register('AutotweetBitlyService', dirname(__FILE__) . '/autotweetbitly.php');
     JLoader::register('AutotweetTinyurlcomService', dirname(__FILE__) . '/autotweettinyurlcom.php');
     JLoader::register('AutotweetYourlsService', dirname(__FILE__) . '/autotweetyourls.php');
     $classname = 'AutoTweet' . $data['type'] . 'Service';
     JLoader::load($classname);
     return new $classname($data);
 }
Esempio n. 11
0
 function getVersion()
 {
     if (!class_exists('comquick2cartHelper')) {
         $path = JPATH_SITE . DS . 'components' . DS . 'com_quick2cart' . DS . 'helper.php';
         JLoader::register('comquick2cartHelper', $path);
         JLoader::load('comquick2cartHelper');
     }
     $helperobj = new comquick2cartHelper();
     echo $latestversion = $helperobj->getVersion();
     jexit();
 }
Esempio n. 12
0
 /**
  * getApiInstance
  *
  * @return	object
  */
 protected function getApiInstance()
 {
     if (!$this->linkedin) {
         $API_CONFIG = array('appKey' => $this->get('api_key'), 'appSecret' => $this->get('secret_key'), 'callbackUrl' => null);
         JLoader::load('LinkedIn');
         $this->linkedin = new SimpleLinkedIn\LinkedIn($API_CONFIG);
         $ACCESS_TOKEN = array('oauth_token' => $this->get('oauth_user_token'), 'oauth_token_secret' => $this->get('oauth_user_secret'));
         $this->linkedin->setTokenAccess($ACCESS_TOKEN);
     }
     return $this->linkedin;
 }
Esempio n. 13
0
 function getPaymentVars($pg_plugin, $order_id)
 {
     if (!class_exists('socialadsModelpayment')) {
         //require_once $path;
         JLoader::register('socialadsModelpayment', JPATH_SITE . DS . 'components' . DS . 'com_socialads' . DS . 'models' . DS . 'payment.php');
         JLoader::load('socialadsModelpayment');
     }
     $socialadsModelpayment = new socialadsModelpayment();
     return $socialadsModelpayment->getPaymentVars($pg_plugin, $order_id, $payPerAd = 1);
     /*
     		require(JPATH_SITE.DS."administrator".DS."components".DS."com_socialads".DS."config".DS."config.php");
     		$orderdata = $this->getdetails($order_id);
     			$pg_plugin=$orderdata['pg_plugin'];
     			$vars = new stdclass;
     			$vars->order_id=$orderdata['order_id'];
     			$socialadshelper= new socialadshelper();
     			$orderdata['ad_title']=$socialadshelper->getAdInfo($orderdata['adid'],'ad_title');
     			if(!empty($orderdata['payment_type']))
     			$vars->payment_type=$orderdata['payment_type'];
     			else
     			$vars->payment_type="";
     			$vars->user_id=JFactory::getUser()->id;
     			$vars->user_name=JFactory::getUser()->name;
     			$vars->user_firstname=JFactory::getUser()->name;
     			$vars->user_email=JFactory::getUser()->email;
     			$vars->item_name = JText::_('ADVERTISEMENT').$orderdata['ad_title']['0']->ad_title;
     			$msg_fail=JText::_( 'ERROR_SAVE' );
     			$vars->return = JRoute::_(JUri::root()."index.php?option=com_socialads&view=managead&layout=list");
     			$vars->submiturl = JRoute::_("index.php?option=com_socialads&controller=showad&task=confirmpayment&processor={$pg_plugin}");
     			$vars->cancel_return = JRoute::_(JUri::root()."index.php?option=com_socialads&view=managead&layout=list&processor={$pg_plugin}",$msg_fail);
     			$vars->url=$vars->notify_url= JRoute::_(JUri::root()."?option=com_socialads&controller=showad&task=processpayment&pg_nm={$pg_plugin}&pg_action=onTP_Processpayment&order_id=".$orderdata['order_id']);
     			$vars->currency_code = $socialads_config['currency'];
     			$vars->amount = $orderdata['amount'];
     			$vars->client="socialads";
     			$vars->success_message = $orderdata['success_message'];
     			if($vars->payment_type=='recurring')
     			{
     				$vars->notify_url= $vars->url=$vars->url."&payment_type=recurring";
     				$vars->recurring_startdate=$orderdata['recurring_startdate'];
     				$vars->recurring_payment_interval_unit="days";
     				$vars->recurring_payment_interval_totaloccurances=$orderdata['recurring_payment_interval_totaloccurances'];
     				$vars->recurring_payment_interval_length=$orderdata['recurring_payment_interval_length'];
     
     
     			}
     			return $vars;
     			* */
 }
Esempio n. 14
0
	public function onAfterInitialise() {
		
		$key = $this->params->get('apiKey');

		if(strlen($key)) {
			if(FMSTS_JVERSION == '16') {
				$path = JPATH_ROOT . DS . 'plugins' . DS . 'system' . DS . 'fmsts' .DS. 'fmsts' .DS . 'mail.php';
			} else {
				$path = JPATH_ROOT . DS . 'plugins' . DS . 'system' . DS . 'fmsts' .DS . 'mail.php';
			}
			
			JLoader::register('JMail', $path );
			JLoader::load('JMail');

		} else {
			return JError::raiseWarning( 500, JText::_('NO_APIKEY_SPECIFIED_FOR_MAILCHIMP_STS_PLUGIN') );
		}	
	}
Esempio n. 15
0
 /**
  * Finds path to file containing requested class
  * according to sh404sef naming conventions
  * Feed that filename to JLoader so that
  * it gets loaded next
  *
  * Can be
  *       PrefixControllerSuffix
  *       PrefixModelSuffix
  *       PrefixHelperSuffix
  *       PrefixTableSuffix
  *       PrefixElementSuffix
  *       PrefixViewHelperSuffix
  *       PrefixClassSuffix
  *       PrefixAdapterSuffix
  *       PrefixExceptionSuffix
  *       PrefixFactory
  * with Prefix = 'Sh404sef'
  *
  * Classes are aways stored in backend, in Sh404sef folder
  * file is in controllers subdir (resp views, models, helpers)
  * file is named suffix.php
  *
  * @param string $class the class to load
  */
 public static function doAutoload($class)
 {
     // check if not already there
     if (class_exists($class)) {
         return true;
     }
     // check if not ours
     if (substr($class, 0, 8) != self::$_prefix) {
         return false;
     }
     // root path for including files
     $basePath = JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_sh404sef';
     // easy : is it our factory ?
     if ($class == self::$_prefix . 'Factory') {
         $classes = JLoader::register($class, $basePath . DS . strtolower($class) . '.php');
         $loaded = JLoader::load($class);
         return $loaded;
     }
     // if not our factory
     $types = array('Controller', 'Model', 'Helper', 'ViewHelper', 'Table', 'Element', 'Class', 'Adapter', 'Exception');
     foreach ($types as $type) {
         $suffix = self::matchClassName(self::$_prefix, $type, $class);
         if ($suffix) {
             // we found a class name that matches our pattern,
             // make JLoader find it, with a special case for view helpers
             if ($type == 'ViewHelper') {
                 $fileName = $basePath . DS . 'views' . DS . strtolower($suffix) . DS . 'helpers.php';
             } else {
                 // simplistic pluralization
                 $plural = strtolower($type) . (strtolower(substr($type, -1)) == 's' ? 'es' : 's');
                 $fileName = $basePath . DS . $plural . DS . strtolower($suffix) . '.php';
             }
             $classes = JLoader::register($class, $fileName);
             // go straight to exit
             break;
         }
     }
     // we must call explicitely Jloadeer::load. We could simply return false
     // so that it's called automatically later on, but that would fail
     // if several extensions use the same system, as __autoload (hence JLoader)
     // can be fired before one of the copies of our autoloader
     $loaded = JLoader::load($class);
     return $loaded;
 }
Esempio n. 16
0
 function _getquick2cartstoreHTML()
 {
     jimport('joomla.filesystem.file');
     if (JFile::exists(JPATH_SITE . '/components/com_quick2cart/quick2cart.php')) {
         $lang = JFactory::getLanguage();
         $lang->load('com_quick2cart', JPATH_SITE);
         $path = JPATH_SITE . DS . 'components' . DS . 'com_quick2cart' . DS . 'helper.php';
         if (!class_exists('comquick2cartHelper')) {
             //require_once $path;
             JLoader::register('comquick2cartHelper', $path);
             JLoader::load('comquick2cartHelper');
         }
         // Load assets
         comquick2cartHelper::loadQuicartAssetFiles();
         $product_path = JPATH_SITE . DS . 'components' . DS . 'com_quick2cart' . DS . 'helpers' . DS . 'product.php';
         if (!class_exists('productHelper')) {
             //require_once $path;
             JLoader::register('productHelper', $product_path);
             JLoader::load('productHelper');
         }
         $params = $this->params;
         $no_of_stores = $params->get('no_of_stores', '2');
         //Get profile id
         $user = CFactory::getRequestUser();
         $model = new productHelper();
         $target_data = $model->getUserStores($user->_userid, $no_of_stores);
         if (!empty($target_data)) {
             $html = "\n\t\t\t\t<div class='techjoomla-bootstrap' >\n\t\t\t\t\t<div  class='row-fluid'>\n\t\t\t\t\t<ul class='thumbnails'  >\n\t\t\t\t\t";
             foreach ($target_data as $data) {
                 $path = JPATH_SITE . DS . 'components' . DS . 'com_quick2cart' . DS . 'views' . DS . 'vendor' . DS . 'tmpl' . DS . 'thumbnail.php';
                 //@TODO  condition vise mod o/p
                 ob_start();
                 include $path;
                 $html .= ob_get_contents();
                 ob_end_clean();
             }
             $html .= "\n\t\t\t\t\t\t</ul>\n\t\t\t\t\t</div>\n\t\t\t\t</div>";
             return $html;
         }
     }
 }
Esempio n. 17
0
 function fetchElement($name, $value, $node, $control_name)
 {
     $input = JFactory::getApplication()->input;
     $option = $input->get('option', '');
     if ($option != 'com_k2') {
         return;
     }
     jimport('joomla.filesystem.file');
     if (!JFile::exists(JPATH_SITE . '/components/com_quick2cart/quick2cart.php')) {
         return true;
     }
     $lang = JFactory::getLanguage();
     $lang->load('com_quick2cart', JPATH_ADMINISTRATOR);
     JHtml::_('behavior.modal', 'a.modal');
     $html = '';
     $client = "com_k2";
     $pid = JRequest::getInt('cid');
     // if($pid) {
     /* prefill k2 title */
     $db = JFactory::getDBO();
     $q = "SELECT `title` FROM `#__k2_items` WHERE `id` =" . (int) $pid;
     $db->setQuery($q);
     $k2item = $db->loadResult();
     $jinput = JFactory::getApplication()->input;
     $jinput->set('qtc_article_name', $k2item);
     /* prefill k2 title */
     if (!class_exists('comquick2cartHelper')) {
         // Require_once $path;
         $path = JPATH_SITE . DS . 'components' . DS . 'com_quick2cart' . DS . 'helper.php';
         JLoader::register('comquick2cartHelper', $path);
         JLoader::load('comquick2cartHelper');
     }
     $comquick2cartHelper = new comquick2cartHelper();
     $path = $comquick2cartHelper->getViewpath('attributes', '', "ADMIN", "SITE");
     ob_start();
     include $path;
     $html = ob_get_contents();
     ob_end_clean();
     return $html;
 }
Esempio n. 18
0
 function onK2AfterDisplayContent(&$item, &$params, $limitstart)
 {
     // Add Language file.
     $lang = JFactory::getLanguage();
     $lang->load('com_quick2cart', JPATH_SITE);
     jimport('joomla.filesystem.file');
     if (!JFile::exists(JPATH_SITE . '/components/com_quick2cart/quick2cart.php')) {
         return true;
     }
     $path = JPATH_SITE . DS . 'components' . DS . 'com_quick2cart' . DS . 'helper.php';
     if (!class_exists('comquick2cartHelper')) {
         // require_once $path;
         JLoader::register('comquick2cartHelper', $path);
         JLoader::load('comquick2cartHelper');
     }
     $mainframe = JFactory::getApplication();
     $lang = JFactory::getLanguage();
     $lang->load('com_quick2cart');
     $comquick2cartHelper = new comquick2cartHelper();
     $output = $comquick2cartHelper->getBuynow($item->id, 'com_k2');
     return $output;
 }
Esempio n. 19
0
    protected $type = 'modal_manufacturer';
    /**
     * Method to get the field input markup.
     *
     * @access	protected
     *
     * @return	string	The field input markup.
     *
     * @since	11.1
     */
    protected function getInput()
    {
        $db = JFactory::getDBO();
        $db->setQuery('SELECT `name`' . ' FROM #__rtiprint_manufacturers' . ' WHERE id = ' . (int) $this->value);
        $this->_title = $db->loadResult();
        if ($error = $db->getErrorMsg()) {
            JError::raiseWarning(500, $error);
        }
        return parent::getInput();
    }
}
// Search for a fork to be able to override this class
JLoader::register('JFormFieldModal_Manufacturer', JPATH_ADMIN_RTIPRINT . DS . 'fork' . DS . 'models' . DS . 'fields' . DS . 'modal' . DS . 'manufacturer.php');
JLoader::load('JFormFieldModal_Manufacturer');
/* To load class in memory */
// Fallback if no fork has been found
if (!class_exists('JFormFieldModal_Manufacturer')) {
    class JFormFieldModal_Manufacturer extends RtiprintCkJFormFieldModal_Manufacturer
    {
    }
}
Esempio n. 20
0
 /**
  * JFTP object constructor
  *
  * @access protected
  * @param array $options Associative array of options to set
  * @since 1.5
  */
 function __construct($options = array())
 {
     // If default transfer type is no set, set it to autoascii detect
     if (!isset($options['type'])) {
         $options['type'] = FTP_BINARY;
     }
     $this->setOptions($options);
     if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
         $this->_OS = 'WIN';
     } elseif (strtoupper(substr(PHP_OS, 0, 3)) === 'MAC') {
         $this->_OS = 'MAC';
     } else {
         $this->_OS = 'UNIX';
     }
     if (FTP_NATIVE) {
         // Import the generic buffer stream handler
         jimport('joomla.utilities.buffer');
         // Autoloading fails for JBuffer as the class is used as a stream handler
         JLoader::load('JBuffer');
     }
     // Register faked "destructor" in PHP4 to close all connections we might have made
     if (version_compare(PHP_VERSION, '5') == -1) {
         register_shutdown_function(array(&$this, '__destruct'));
     }
 }
Esempio n. 21
0
 /**
  * Add a class to autoload
  *
  * @param	string $classname	The class name
  * @param	string $file		Full path to the file that holds the class
  * @return	array|boolean  		Array of classes
  * @since 	1.5
  */
 function &register($class = null, $file = null)
 {
     static $classes;
     if (!isset($classes)) {
         $classes = array();
     }
     if ($class && is_file($file)) {
         // Force to lower case.
         $class = strtolower($class);
         $classes[$class] = $file;
         // In php4 we load the class immediately.
         if (version_compare(phpversion(), '5.0') < 0) {
             JLoader::load($class);
         }
     }
     return $classes;
 }
Esempio n. 22
0
        $filters['filter_server']->jdomOptions = array('list' => $modelServer->getItems());
        // Limit
        $filters['limit']->jdomOptions = array('pagination' => $this->pagination);
        //Toolbar initialization
        JToolBarHelper::title(JText::_('RTIPRINT_LAYOUT_PRINTERS'), 'rtiprint_printers');
    }
    /**
     * Returns an array of fields the table can be sorted by.
     *
     * @access	protected
     * @param	string	$layout	The name of the called layout. Not used yet
     *
     * @return	array	Array containing the field name to sort by as the key and display text as value.
     *
     * @since	3.0
     */
    protected function getSortFields($layout = null)
    {
        return array('a.name' => JText::_('RTIPRINT_FIELD_NAME'), '_printer_model_.name' => JText::_('RTIPRINT_FIELD_MODEL'), '_building_.building' => JText::_('RTIPRINT_FIELD_BUILDING'), '_server_.name' => JText::_('RTIPRINT_FIELD_SERVER'), 'a.ordering' => JText::_('RTIPRINT_FIELD_ORDERING'), 'a.published' => JText::_('RTIPRINT_FIELD_PUBLISHED'));
    }
}
// Search for a fork to be able to override this class
JLoader::register('RtiprintViewPrinters', JPATH_ADMIN_RTIPRINT . DS . 'fork' . DS . 'views' . DS . 'printers' . DS . 'view.html.php');
JLoader::load('RtiprintViewPrinters');
/* To load class in memory */
// Fallback if no fork has been found
if (!class_exists('RtiprintViewPrinters')) {
    class RtiprintViewPrinters extends RtiprintCkViewPrinters
    {
    }
}
Esempio n. 23
0
    {
        //Convert from a non-SQL formated date (created)
        $data['created'] = RtiprintHelperDates::getSqlDate($data['created'], array('Y-m-d'), true);
        //Convert from a non-SQL formated date (modified)
        $data['modified'] = RtiprintHelperDates::getSqlDate($data['modified'], array('Y-m-d'), true);
        //Some security checks
        $acl = RtiprintHelper::getActions();
        //Secure the published tag if not allowed to change
        if (isset($data['published']) && !$acl->get('core.edit.state')) {
            unset($data['published']);
        }
        //Secure the author key if not allowed to change
        if (isset($data['created_by']) && !$acl->get('core.edit')) {
            unset($data['created_by']);
        }
        if (parent::save($data)) {
            return true;
        }
        return false;
    }
}
// Search for a fork to be able to override this class
JLoader::register('RtiprintModelPrinter', JPATH_SITE_RTIPRINT . DS . 'fork' . DS . 'models' . DS . 'printer.php');
JLoader::load('RtiprintModelPrinter');
/* To load class in memory */
// Fallback if no fork has been found
if (!class_exists('RtiprintModelPrinter')) {
    class RtiprintModelPrinter extends RtiprintCkModelPrinter
    {
    }
}
Esempio n. 24
0
        }
        //WHERE
        foreach ($this->getState('query.where', array()) as $where) {
            $query->where($where);
        }
        //GROUP ORDER : Prioritary order for groups in lists
        foreach ($this->getState('query.groupOrder', array()) as $groupOrder) {
            $query->order($groupOrder);
        }
        //ORDER
        foreach ($this->getState('query.order', array()) as $order) {
            $query->order($order);
        }
        //ORDER
        $orderCol = $this->getState('list.ordering');
        $orderDir = $this->getState('list.direction', 'asc');
        if ($orderCol) {
            $query->order($orderCol . ' ' . $orderDir);
        }
    }
}
// Search for a fork to be able to override this class
JLoader::register('RtiprintModelBuildings', JPATH_SITE_RTIPRINT . DS . 'fork' . DS . 'models' . DS . 'buildings.php');
JLoader::load('RtiprintModelBuildings');
/* To load class in memory */
// Fallback if no fork has been found
if (!class_exists('RtiprintModelBuildings')) {
    class RtiprintModelBuildings extends RtiprintCkModelBuildings
    {
    }
}
Esempio n. 25
0
        }
        //WHERE
        foreach ($this->getState('query.where', array()) as $where) {
            $query->where($where);
        }
        //GROUP ORDER : Prioritary order for groups in lists
        foreach ($this->getState('query.groupOrder', array()) as $groupOrder) {
            $query->order($groupOrder);
        }
        //ORDER
        foreach ($this->getState('query.order', array()) as $order) {
            $query->order($order);
        }
        //ORDER
        $orderCol = $this->getState('list.ordering');
        $orderDir = $this->getState('list.direction', 'asc');
        if ($orderCol) {
            $query->order($orderCol . ' ' . $orderDir);
        }
    }
}
// Search for a fork to be able to override this class
JLoader::register('RtiprintModelOperatingsystems', JPATH_ADMIN_RTIPRINT . DS . 'fork' . DS . 'models' . DS . 'operatingsystems.php');
JLoader::load('RtiprintModelOperatingsystems');
/* To load class in memory */
// Fallback if no fork has been found
if (!class_exists('RtiprintModelOperatingsystems')) {
    class RtiprintModelOperatingsystems extends RtiprintCkModelOperatingsystems
    {
    }
}
Esempio n. 26
0
* Rtiprint Table class
*
* @package	Rtiprint
* @subpackage	Changelog
*/
class RtiprintCkTableChangelog extends RtiprintClassTable
{
    /**
     * Constructor
     *
     * @access	public
     * @param	object	&$db	Database connector object
     * @param	string	$tbl	Table name
     * @param	string	$key	Primary key
     * @return	void
     */
    public function __construct(&$db, $tbl = '#__rtiprint_changelogs', $key = 'id')
    {
        parent::__construct($tbl, $key, $db);
    }
}
// Search for a fork to be able to override this class
JLoader::register('RtiprintTableChangelog', JPATH_ADMIN_RTIPRINT . DS . 'fork' . DS . 'tables' . DS . 'changelog.php');
JLoader::load('RtiprintTableChangelog');
/* To load class in memory */
// Fallback if no fork has been found
if (!class_exists('RtiprintTableChangelog')) {
    class RtiprintTableChangelog extends RtiprintCkTableChangelog
    {
    }
}
 /**
  * Tests if JLoader::applyAliasFor runs automatically when loading a class by its real name
  *
  * @return  void
  *
  * @since   11.3
  */
 public function testApplyAliasForAutorun()
 {
     JLoader::discover('Shuttle', JPATH_TEST_STUBS . '/discover2', true);
     JLoader::registerAlias('ShuttleOV105', 'ShuttleEndeavour');
     $this->assertThat(JLoader::load('ShuttleEndeavour'), $this->isTrue(), 'Tests that the class file was loaded.');
     $this->assertTrue(class_exists('ShuttleOV105'), 'Tests that loading a class also loads its aliases');
 }
Esempio n. 28
0
 /**
  * JFTP object constructor
  *
  * @param   array  $options  Associative array of options to set
  *
  * @return
  * @since   11.1
  */
 function __construct($options = array())
 {
     // If default transfer type is not set, set it to autoascii detect
     if (!isset($options['type'])) {
         $options['type'] = FTP_BINARY;
     }
     $this->setOptions($options);
     if (strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
         $this->_OS = 'WIN';
     } elseif (strtoupper(substr(PHP_OS, 0, 3)) === 'MAC') {
         $this->_OS = 'MAC';
     } else {
         $this->_OS = 'UNIX';
     }
     if (FTP_NATIVE) {
         // Import the generic buffer stream handler
         jimport('joomla.utilities.buffer');
         // Autoloading fails for JBuffer as the class is used as a stream handler
         JLoader::load('JBuffer');
     }
 }
Esempio n. 29
0
    /**
     * The form field type.
     *
     * @var string
     */
    public $type = 'cktext';
    /**
     * Method to get the field input markup.
     *
     * @access	public
     *
     * @return	string	The field input markup.
     *
     * @since	11.1
     */
    public function getInput()
    {
        $this->input = JDom::_('html.form.input.text', array_merge(array('dataKey' => $this->getOption('name'), 'domClass' => $this->getOption('class'), 'domId' => $this->id, 'domName' => $this->name, 'dataValue' => $this->value, 'placeholder' => $this->getOption('placeholder'), 'responsive' => $this->getOption('responsive'), 'size' => $this->getOption('size')), $this->jdomOptions));
        return parent::getInput();
    }
}
// Search for a fork to be able to override this class
JLoader::register('JFormFieldCktext', JPATH_ADMIN_RTIPRINT . DS . 'fork' . DS . 'models' . DS . 'fields' . DS . 'cktext.php');
JLoader::load('JFormFieldCktext');
/* To load class in memory */
// Fallback if no fork has been found
if (!class_exists('JFormFieldCktext')) {
    class JFormFieldCktext extends RtiprintCkFormFieldCktext
    {
    }
}
Esempio n. 30
0
* @subpackage	
* @copyright	Copyright FGW 2014, All rights reserved
* @author		MOLEDesign (Morgan Leecy) - http://www.moledesign.biz - morgan@moledesign.biz
* @license		GNU/GPL
*
*             .oooO  Oooo.
*             (   )  (   )
* -------------\ (----) /----------------------------------------------------------- +
*               \_)  (_/
*/
// no direct access
defined('_JEXEC') or die('Restricted access');
/**
* Images Class for Rtiprint.
*
* @package	Rtiprint
* @subpackage	Class
*/
class RtiprintCkClassImage extends RtiprintImages
{
}
// Search for a fork to be able to override this class
JLoader::register('RtiprintClassImage', JPATH_ADMIN_RTIPRINT . DS . 'fork' . DS . 'classes' . DS . 'image' . DS . 'image.php');
JLoader::load('RtiprintClassImage');
/* To load class in memory */
// Fallback if no fork has been found
if (!class_exists('RtiprintClassImage')) {
    class RtiprintClassImage extends RtiprintCkClassImage
    {
    }
}