/** * getParamsForm. * * @return void */ public function getParamsForm() { @ob_end_clean(); header('Content-type: text/plain'); // No JInputJSON in J2.5 $raw = file_get_contents('php://input'); $data = json_decode($raw, true); $safeHtmlFilter = JFilterInput::getInstance(); $token = $data['token']; $token = $safeHtmlFilter->clean($token, 'ALNUM'); $this->input->set($token, 1); // CSRF prevention if ($this->csrfProtection) { $this->_csrfProtection(); } $channeltype_id = $data['channelTypeId']; $channeltype_id = $safeHtmlFilter->clean($channeltype_id, 'ALNUM'); $channel_id = $data['channelId']; $channel_id = $safeHtmlFilter->clean($channel_id, 'ALNUM'); // Load the model $channeltype = F0FModel::getTmpInstance('Channeltypes', 'AutoTweetModel'); $view = 'nochannel'; if ($channeltype_id) { $view = $channeltype->getParamsForm($channeltype_id); } $config = array('input' => array('option' => 'com_autotweet', 'view' => $view, 'task' => empty($channel_id) ? 'add' : 'edit', 'id' => $channel_id, 'channeltype_id' => $channeltype_id), 'modelName' => 'AutotweetModelChannels'); @ob_start(); F0FDispatcher::getTmpInstance('com_autotweet', $view, $config)->dispatch(); $result = ob_get_contents(); @ob_end_clean(); $message = json_encode(array('status' => true, 'message' => $result)); echo EJSON_START . $message . EJSON_END; flush(); JFactory::getApplication()->close(); }
protected function getInput() { $app = JFactory::getApplication(); $id = $app->input->getInt('id'); if ($app->isSite()) { $id = $app->input->getInt('a_id'); } $productTable = F0FTable::getAnInstance('Product', 'J2StoreTable'); $productTable->load(array('product_source' => 'com_content', 'product_source_id' => $id)); $product_id = isset($productTable->j2store_product_id) ? $productTable->j2store_product_id : ''; $inputvars = array('task' => 'edit', 'render_toolbar' => '0', 'product_source_id' => $id, 'id' => $product_id, 'product_source' => 'com_content', 'product_source_view' => 'article', 'form_prefix' => 'jform[attribs][j2store]'); $input = new F0FInput($inputvars); @ob_start(); F0FDispatcher::getTmpInstance('com_j2store', 'product', array('layout' => 'form', 'tmpl' => 'component', 'input' => $input))->dispatch(); $html = ob_get_contents(); ob_end_clean(); return $html; }
include_once JPATH_ADMINISTRATOR . '/components/com_akeebasubs/version.php'; include_once JPATH_LIBRARIES . '/f0f/include.php'; if (!defined('F0F_INCLUDED') || !class_exists('F0FForm', true)) { return; } require_once JPATH_ADMINISTRATOR . '/components/com_akeebasubs/helpers/format.php'; require_once JPATH_ADMINISTRATOR . '/components/com_akeebasubs/helpers/cparams.php'; $lang = JFactory::getLanguage(); $lang->load('mod_aksubslist', JPATH_SITE, 'en-GB', true); $lang->load('mod_aksubslist', JPATH_SITE, null, true); $lang->load('com_akeebasubs', JPATH_SITE, 'en-GB', true); $lang->load('com_akeebasubs', JPATH_SITE, null, true); ?> <div id="mod-aksubslist-<?php echo $module->id; ?> " class="mod-aksubslist"> <?php if (JFactory::getUser()->guest) { ?> <span class="akeebasubs-subscriptions-itemized-nosubs"> <?php echo JText::_('COM_AKEEBASUBS_LEVELS_ITEMIZED_NOSUBS'); ?> </span> <?php } else { F0FDispatcher::getTmpInstance('com_akeebasubs', 'subscriptions', array('input' => array('savestate' => 0, 'option' => 'com_akeebasubs', 'view' => 'subscriptions', 'layout' => 'itemized', 'limit' => 0, 'limitstart' => 0, 'paystate' => 'C', 'user_id' => JFactory::getUser()->id, 'task' => 'browse')))->dispatch(); } ?> </div>
/** * @package AkeebaBackup * @copyright Copyright (c)2009-2014 Nicholas K. Dionysopoulos * @license GNU General Public License version 3, or later * * @since 1.3 */ // Protect from unauthorized access defined('_JEXEC') or die; JDEBUG ? define('AKEEBADEBUG', 1) : null; // Check for PHP4 if (defined('PHP_VERSION')) { $version = PHP_VERSION; } elseif (function_exists('phpversion')) { $version = phpversion(); } else { // No version info. I'll lie and hope for the best. $version = '5.0.0'; } // Old PHP version detected. EJECT! EJECT! EJECT! if (!version_compare($version, '5.3.0', '>=')) { return JError::raise(E_ERROR, 500, 'This version of PHP is not compatible with Akeeba Backup'); } JLoader::import('joomla.application.component.model'); // Load F0F include_once JPATH_SITE . '/libraries/f0f/include.php'; if (!defined('F0F_INCLUDED') || !class_exists('F0FForm', true)) { JError::raiseError('500', 'Your Akeeba Backup installation is broken; please re-install. Alternatively, extract the installation archive and copy the fof directory inside your site\'s libraries directory.'); } F0FDispatcher::getTmpInstance('com_akeeba')->dispatch();
/** * _execute * * @param object $article Params * @param object $params Params * * @return string */ private function _execute($article, $params) { $input = array('task' => 'read', 'article' => $article, 'params' => $params, 'savestate' => 0); $config = array('option' => 'com_autotweet', 'view' => 'feedarticle', 'input' => $input, 'cacheableTasks' => array()); ob_start(); F0FDispatcher::getTmpInstance('com_autotweet', 'feedarticle', $config)->dispatch(); $html = ob_get_contents(); ob_end_clean(); return $html; }
<?php /* * @package todo * @copyright Copyright (c)2014 Nicholas K. Dionysopoulos / AkeebaBackup.com * @license GNU General Public License version 2 or later */ defined('_JEXEC') or die; // Load FOF include_once JPATH_LIBRARIES . '/f0f/include.php'; if (!defined('F0F_INCLUDED')) { JError::raiseError('500', 'FOF is not installed'); return; } F0FDispatcher::getTmpInstance('com_todo')->dispatch();
require_once $version_php; } // If JSON functions don't exist, load our compatibility layer if (!function_exists('json_encode') || !function_exists('json_decode')) { require_once JPATH_COMPONENT_ADMINISTRATOR . DIRECTORY_SEPARATOR . 'helpers' . DIRECTORY_SEPARATOR . 'jsonlib.php'; } JLoader::import('joomla.application.component.model'); require_once JPATH_ADMINISTRATOR . '/components/com_admintools/models/storage.php'; $paths = array(JPATH_ADMINISTRATOR, JPATH_ROOT); $jlang = JFactory::getLanguage(); $jlang->load('com_admintools', $paths[0], 'en-GB', true); $jlang->load('com_admintools', $paths[0], null, true); $jlang->load('com_admintools', $paths[1], 'en-GB', true); $jlang->load('com_admintools', $paths[1], null, true); $jlang->load('com_admintools' . '.override', $paths[0], 'en-GB', true); $jlang->load('com_admintools' . '.override', $paths[0], null, true); $jlang->load('com_admintools' . '.override', $paths[1], 'en-GB', true); $jlang->load('com_admintools' . '.override', $paths[1], null, true); // Force the view and task JFactory::getApplication()->input->set('view', 'blocks'); JFactory::getApplication()->input->set('task', 'browse'); if (class_exists('JRequest')) { JRequest::setVar('view', 'blocks'); JRequest::setVar('task', 'browse'); } // Work around non-transparent proxy and reverse proxy IP issues if (class_exists('F0FUtilsIp', true)) { F0FUtilsIp::workaroundIPIssues(); } F0FDispatcher::getTmpInstance('com_admintools')->dispatch();
<?php /** * @package J2Store * @copyright Copyright (c)2014-17 Ramesh Elamathi / J2Store.org * @license GNU GPL v3 or later */ // No direct access to this file defined('_JEXEC') or die; // Load FOF // Include F0F if (!defined('F0F_INCLUDED')) { require_once JPATH_LIBRARIES . '/f0f/include.php'; } if (!defined('F0F_INCLUDED')) { ?> <h2>Incomplete installation detected</h2> <?php } if (!class_exists('J2StoreStrapper')) { require_once JPATH_ADMINISTRATOR . '/components/com_j2store/helpers/strapper.php'; } J2StoreStrapper::addJS(); J2StoreStrapper::addCSS(); F0FDispatcher::getTmpInstance('com_j2store')->dispatch();
*/ // No direct access defined('_JEXEC') or die('Restricted access'); if (!defined('AUTOTWEET_API')) { include_once JPATH_ADMINISTRATOR . '/components/com_autotweet/api/autotweetapi.php'; } // To have the version helper available always JLoader::load('VersionHelper'); $count = $params->get('count', 5); $mode = $params->get('mode', 1); $input = array('savestate' => 0, 'limit' => $count, 'limitstart' => 0, 'no_clear' => true, 'only_once' => true, 'task' => 'browse', 'filter_order' => 'postdate', 'filter_order_Dir' => 'DESC', 'enabled' => 1, 'caching' => false); switch ($mode) { // Show latest successful Posts case 1: $input['pubstate'] = 'success'; break; // Show latest error or pending Posts // Show latest error or pending Posts case 2: $input['pubstate'] = array('error', 'approve'); break; // Show waiting (cronjob) Posts // Show waiting (cronjob) Posts case 3: default: $input['pubstate'] = 'cronjob'; break; } $config = array('option' => 'com_autotweet', 'view' => 'posts', 'layout' => 'module', 'input' => $input); F0FDispatcher::getTmpInstance('com_autotweet', 'posts', $config)->dispatch();
/** * renderPost * * @param int $channelid Param * @param string $channeltype Param * @param string $message Param * @param string $data Param * * @return string */ public function renderPost($channelid, $channeltype, $message, $data) { $input = array('task' => 'read', 'format' => 'raw', 'cid' => array(), 'id' => $channelid, 'message' => $message, 'title' => $data->title, 'fulltext' => $data->fulltext, 'url' => $data->url, 'org_url' => $data->org_url, 'image_url' => $data->image_url, 'media_mode' => $this->getMediaMode()); $config = array('option' => 'com_autotweet', 'view' => 'channel', 'layout' => $channeltype . '-post', 'input' => $input); ob_start(); F0FDispatcher::getTmpInstance('com_autotweet', 'channels', $config)->dispatch(); $output = ob_get_contents(); ob_end_clean(); return $output; }
// no direct access defined('_JEXEC') or die(''); // PHP version check if (defined('PHP_VERSION')) { $version = PHP_VERSION; } elseif (function_exists('phpversion')) { $version = phpversion(); } else { // No version info. I'll lie and hope for the best. $version = '5.0.0'; } // Old PHP version detected. EJECT! EJECT! EJECT! if (!version_compare($version, '5.3.0', '>=')) { return; } include_once JPATH_ADMINISTRATOR . '/components/com_akeebasubs/version.php'; include_once JPATH_LIBRARIES . '/f0f/include.php'; if (!defined('F0F_INCLUDED') || !class_exists('F0FForm', true)) { return; } require_once JPATH_ADMINISTRATOR . '/components/com_akeebasubs/helpers/format.php'; require_once JPATH_ADMINISTRATOR . '/components/com_akeebasubs/helpers/cparams.php'; $layout = $params->get('layout', 'awesome'); $ids = $params->get('ids', array()); $config = array('option' => 'com_akeebasubs', 'view' => 'levels', 'layout' => $layout, 'input' => array('savestate' => 0, 'limit' => 0, 'limitstart' => 0, 'no_clear' => true, 'only_once' => true, 'task' => 'browse', 'filter_order' => 'ordering', 'filter_order_Dir' => 'ASC', 'enabled' => 1, 'caching' => false)); if (!empty($ids)) { $config['input']['id'] = $ids; } //$fp = fopen(JPATH_SITE.'/logs/backtrace.txt', 'at');fwrite($fp, "\n\n\n". str_repeat('*', 78)."\n\n\n");fclose($fp); F0FDispatcher::getTmpInstance('com_akeebasubs', 'levels', $config)->dispatch(); //$fp = fopen(JPATH_SITE.'/logs/backtrace.txt', 'at');fwrite($fp, "\n\n\n". str_repeat('~', 78)."\n\n\n");fclose($fp);
public function getJ2storeCartHtml($source_id = null) { $app = JFactory::getApplication(); $html = ''; $productTable = F0FTable::getAnInstance('Product', 'J2StoreTable'); $productTable->load(array('product_source' => 'com_djcatalog2', 'product_source_id' => $app->input->getInt('id'))); $product_id = isset($productTable->j2store_product_id) ? $productTable->j2store_product_id : ''; $inputvars = array('task' => 'edit', 'render_toolbar' => '0', 'product_source_id' => $productTable->product_source_id, 'j2store_product_id' => $product_id, 'id' => $product_id, 'product_source' => 'com_djcatalog2', 'product_source_view' => 'item', 'form_prefix' => 'jform[params][j2store]'); $input = new F0FInput($inputvars); @ob_start(); F0FDispatcher::getTmpInstance('com_j2store', 'product', array('layout' => 'form', 'tmpl' => 'component', 'input' => $input))->dispatch(); $html = ob_get_contents(); ob_end_clean(); return $html; }
include_once JPATH_ADMINISTRATOR . '/components/com_autotweet/api/autotweetapi.php'; } $base_url = EParameter::getComponentParam(CAUTOTWEETNG, 'base_url'); if (defined('AUTOTWEET_CRONJOB_RUNNING') && AUTOTWEET_CRONJOB_RUNNING && !filter_var($base_url, FILTER_VALIDATE_URL)) { throw new Exception('AUTOTWEET_CRONJOB: Url base not set.'); } $config = array(); $controller = null; // If we are processing Gplus, redirect to controller $session = JFactory::getSession(); $channelId = $session->get('channelId'); if (!empty($channelId)) { $input = new F0FInput(); // Google+ and Blogger $code = $input->getString('code'); // ScoopIt $oauth_token = $input->getString('oauth_token'); $oauth_verifier = $input->getString('oauth_verifier'); // LinkedIn // $code = $input->getString('code'); $state = $input->getString('state'); if (!empty($oauth_token) && !empty($oauth_verifier) || !empty($code) && !empty($state) || !empty($code)) { $controller = F0FModel::getTmpInstance('Channeltypes', 'AutoTweetModel')->getAuthCallback($channelId); $config['input'] = array('task' => 'callback'); } else { $session->set('channelId', false); } } // F0F app F0FDispatcher::getTmpInstance('com_autotweet', $controller, $config)->dispatch();