当前位置: 首页>>代码示例>>PHP>>正文


PHP JRequest::setvar方法代码示例

本文整理汇总了PHP中JRequest::setvar方法的典型用法代码示例。如果您正苦于以下问题:PHP JRequest::setvar方法的具体用法?PHP JRequest::setvar怎么用?PHP JRequest::setvar使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在JRequest的用法示例。


在下文中一共展示了JRequest::setvar方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: getImage

 public function getImage()
 {
     $ini = microtime(true);
     /** Initialization */
     $this->ImageAllocate();
     /** Text insertion */
     $text = $this->getRandomText() . ' ' . $this->getRandomText();
     $fontcfg = $this->fonts[array_rand($this->fonts)];
     $this->WriteText($text, $fontcfg);
     JRequest::setvar('com_jobboard_humanv', $text, 'post');
     $app =& JFactory::getApplication();
     $app->getUserStateFromRequest('com_jobboard.humanv', 'com_jobboard_humanv', $text);
     /** Transformations */
     $this->WaveImage();
     if ($this->blur && function_exists('imagefilter')) {
         imagefilter($this->im, IMG_FILTER_GAUSSIAN_BLUR);
     }
     $this->ReduceImage();
     if ($this->debug) {
         imagestring($this->im, 1, 1, $this->height - 8, "{$text} {$fontcfg['font']} " . round((microtime(true) - $ini) * 1000) . "ms", $this->GdFgColor);
     }
     /** Output */
     $this->WriteImage();
     $this->Cleanup();
 }
开发者ID:Rayvid,项目名称:joomla-jobboard,代码行数:25,代码来源:jobboard_human.php

示例2: display

 /**
  * Render the view
  */
 function display($tpl = null)
 {
     // Load the helper(s)
     $this->loadHelper('html');
     $this->loadHelper('html');
     $this->loadHelper('currencydisplay');
     $this->loadHelper('reportFunctions');
     $model = VmModel::getModel();
     // $config		= JFactory::getConfig();
     // $tzoffset	= $config->getValue('config.offset');
     JRequest::setvar('task', '');
     // set period
     //$date_presets = $model->getDatePresets();
     $this->SetViewTitle('REPORT');
     $myCurrencyDisplay = CurrencyDisplay::getInstance();
     $this->addStandardDefaultViewLists($model);
     $revenueBasic = $model->getRevenue();
     if ($revenueBasic) {
         $totalReport['revenueTotal_brutto'] = $totalReport['revenueTotal_netto'] = $totalReport['number_of_ordersTotal'] = $totalReport['itemsSoldTotal'] = 0;
         foreach ($revenueBasic as &$j) {
             vmdebug('VirtuemartViewReport revenue', $j);
             $totalReport['revenueTotal_netto'] += $j['order_subtotal_netto'];
             $totalReport['revenueTotal_brutto'] += $j['order_subtotal_brutto'];
             $totalReport['number_of_ordersTotal'] += $j['count_order_id'];
             $j['order_subtotal_netto'] = $myCurrencyDisplay->priceDisplay($j['order_subtotal_netto']);
             $j['order_subtotal_brutto'] = $myCurrencyDisplay->priceDisplay($j['order_subtotal_brutto']);
             $j['product_quantity'] = $model->getItemsByRevenue($j);
             $totalReport['itemsSoldTotal'] += $j['product_quantity'];
         }
         $totalReport['revenueTotal_netto'] = $myCurrencyDisplay->priceDisplay($totalReport['revenueTotal_netto']);
         $totalReport['revenueTotal_brutto'] = $myCurrencyDisplay->priceDisplay($totalReport['revenueTotal_brutto']);
         // if ( 'product_quantity'==JRequest::getWord('filter_order')) {
         // foreach ($revenueBasic as $key => $row) {
         // $created_on[] =$row['created_on'];
         // $intervals[] =$row['intervals'];
         // $itemsSold[] =$row['product_quantity'];
         // $number_of_orders[] =$row['count_order_id'];
         // $revenue[] =$row['revenue'];
         // }
         // if (JRequest::getWord('filter_order_Dir') == 'desc') array_multisort($itemsSold, SORT_DESC,$revenueBasic);
         // else array_multisort($itemsSold, SORT_ASC,$revenueBasic);
         // }
     }
     $this->assignRef('report', $revenueBasic);
     $this->assignRef('totalReport', $totalReport);
     //$itemsSold = $model->getItemsSold($revenueBasic);
     //$this->assignRef('itemsSold', $itemsSold);
     // I tihnk is to use in a different layout such as product solds
     // PATRICK K.
     // $productList = $model->getOrderItems();
     // $this->assignRef('productList', $productList);
     $this->lists['select_date'] = $model->renderDateSelectList();
     $this->lists['state_list'] = $model->renderOrderstatesList();
     $this->lists['intervals'] = $model->renderIntervalsList();
     $this->assignRef('from_period', $model->from_period);
     $this->assignRef('until_period', $model->until_period);
     $pagination = $model->getPagination();
     $this->assignRef('pagination', $pagination);
     parent::display($tpl);
 }
开发者ID:Gskflute,项目名称:joomla25,代码行数:63,代码来源:view.html.php

示例3: filter

 public function filter()
 {
     // Check for request forgeries
     //JRequest::checkToken() or die('Invalid Token');
     $model = JModel::getInstance('List', 'FabrikFEModel');
     $id = JRequest::getInt('listid');
     $model->setId($id);
     JRequest::setvar('cid', $id);
     $request = $model->getRequestData();
     $model->storeRequestData($request);
     $this->view();
 }
开发者ID:romuland,项目名称:khparts,代码行数:12,代码来源:list.raw.php

示例4: getPluginHTML

 /**
  * get html form fields for a plugin (filled with
  * current element's plugin data
  * @param string $plugin
  * @return string html form fields
  */
 function getPluginHTML($plugin = null)
 {
     $item = $this->getItem();
     if (is_null($plugin)) {
         $plugin = $item->plugin;
     }
     JRequest::setvar('view', 'visualization');
     JPluginHelper::importPlugin('fabrik_visualizaton', $plugin);
     $pluginManager = JModel::getInstance('Pluginmanager', 'FabrikFEModel');
     if ($plugin == '') {
         $str = JText::_('COM_FABRIK_SELECT_A_PLUGIN');
     } else {
         $plugin = $pluginManager->getPlugIn($plugin, 'Visualization');
         $str = $plugin->onRenderAdminSettings(JArrayHelper::fromObject($item));
     }
     return $str;
 }
开发者ID:romuland,项目名称:khparts,代码行数:23,代码来源:visualization.php

示例5: __construct

	function __construct($config = array()) {
		parent::__construct($config);
		JHTML::addIncludePath(OSEMSC_F_HELPER);
		// add detect
		$detect = new Mobile_Detect();
		//$this->isMobile = $detect->isMobile();
		$this->isMobile = false;
		$view = JRequest::getCmd('view');
		if ($this->isMobile && !empty($view) && in_array($view, array('login', 'register', 'member'))) {
			// Any mobile device.
			$this->setLayout('mobile');
			JRequest::setvar('tmpl', 'component');
			oseHtml::loadTouchJs();
			oseHTML::stylesheet('components/com_osemsc/assets/css/msc5mobile.css', '1.5');
		} else {
			$jversion = (JOOMLA16 == true) ? '1.6' : '1.5';
			oseHTML::script('media/system/js/core.js', $jversion);
			$this->loadViewJs();
		}
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:20,代码来源:view.php

示例6: display

	function display($tpl = null) {
		$config = oseRegistry::call('msc')->getConfig('global', 'obj');
		$frontend_style = $config->frontend_style;
		$config = oseRegistry::call('msc')->getConfig('register', 'obj');
		if ($this->isMobile) {
			// Any mobile device.
			$this->setLayout('mobile');
			JRequest::setvar('tmpl', 'component');
		} else {
			$com = OSECPU_PATH_JS . '/com_ose_cpu/extjs';
			oseHTML::initScript();
			oseHTML::script($com . '/ose/app.msg.js', '1.5');
			oseHTML::script(OSEMSC_F_URL . '/libraries/init.js', '1.5');
			oseHTML::stylesheet(OSEMSC_F_URL . '/assets/css/' . $frontend_style . '.css', (JOOMLA16) ? '1.6' : '1.5');
		}
		$this->assignRef('enable_fblogin', $config->enable_fblogin);
		$this->assignRef('facebookapiid', $config->facebookapiid);
		$this->prepareDocument();
		parent::display($tpl);
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:20,代码来源:view.html.php

示例7: process

 /**
  * do the plugin action
  *
  * @return number of records updated
  */
 function process(&$data, &$listModel)
 {
     $app = JFactory::getApplication();
     $params = $this->getParams();
     //Get plugin settings and save state of request array vars we might change
     $maxFiles = (int) $params->get('cron_importcsv_maxfiles', 1);
     $deleteFile = $params->get('cron_importcsv_deletefile', true);
     $cronDir = $params->get('cron_importcsv_directory');
     $useTableName = (int) $params->get('cron_importcsv_usetablename', false);
     $dropdata = $params->get('cron_importcsv_dropdata', '0');
     $orig_dropdata = JRequest::getVar('dropdata', -1);
     $overwrite = $params->get('cron_importcsv_overwrite', '0');
     $orig_overwrite = JRequest::getVar('overwrite', -1);
     $jform = array();
     $jform['drop_data'] = $dropdata;
     $jform['overwrite'] = $overwrite;
     JRequest::setVar('jform', $jform);
     $orig_listid = JRequest::getInt('listid', -1);
     //Fabrik use this as the base directory, so we need a new directory under 'media'
     define("FABRIK_CSV_IMPORT_ROOT", JPATH_ROOT . DS . 'media');
     $d = FABRIK_CSV_IMPORT_ROOT . DS . $cronDir;
     //TODO: Need to also have a FILTER for CSV files ONLY.
     $filter = "\\.CSV\$|\\.csv\$";
     $exclude = array('done', '.svn', 'CVS');
     $arrfiles = JFolder::files($d, $filter, true, true, $exclude);
     // the csv import class needs to know we are doing a cron import
     JRequest::setVar('cron_csvimport', true);
     $xfiles = 0;
     foreach ($arrfiles as $full_csvfile) {
         if (++$xfiles > $maxFiles) {
             break;
         }
         FabrikWorker::log('plg.cron.cronimportcsv.information', "Starting import: {$full_csvfile}:  ");
         $clsImportCSV = JModel::getInstance('Importcsv', 'FabrikFEModel');
         if ($useTableName) {
             $listid = $this->getListIdFromFileName(basename($full_csvfile));
         } else {
             $table =& $listModel->getTable();
             $listid = $table->id;
         }
         if (empty($listid)) {
             FabrikWorker::log('plg.cron.cronimportcsv.warning', "List with name {$filename} does not exist");
             continue;
         }
         JRequest::setVar('listid', $listid);
         // grab the CSV file, need to strip import root off path first
         $csvfile = str_replace(FABRIK_CSV_IMPORT_ROOT, '', $full_csvfile);
         $clsImportCSV->setBaseDir(FABRIK_CSV_IMPORT_ROOT);
         $clsImportCSV->readCSV($csvfile);
         //get this->matchedHeading
         $clsImportCSV->findExistingElements();
         $msg = $clsImportCSV->makeTableFromCSV();
         if ($app->isAdmin()) {
             $app->enqueueMessage($msg);
         }
         if ($deleteFile == '1') {
             JFile::delete($full_csvfile);
         } else {
             if ($deleteFile == '2') {
                 $new_csvfile = $full_csvfile . '.' . time();
                 JFile::move($full_csvfile, $new_csvfile);
             } else {
                 if ($deleteFile == '3') {
                     $done_folder = dirname($full_csvfile) . DS . 'done';
                     if (JFolder::exists($done_folder)) {
                         $new_csvfile = $done_folder . DS . basename($full_csvfile);
                         JFile::move($full_csvfile, $new_csvfile);
                     } else {
                         if ($app->isAdmin()) {
                             $app->enqueueMessage("Move file requested, but can't find 'done' folder: {$done_folder}");
                         }
                     }
                 }
             }
         }
         FabrikWorker::log('plg.cron.cronimportcsv.information', $msg);
     }
     // Leave the request array how we found it
     if (!empty($orig_listid)) {
         JRequest::setvar('listid', $orig_listid);
     }
     if ($orig_dropdata != -1) {
         JRequest::setVar('drop_data', $orig_dropdata);
     }
     if ($orig_overwrite != -1) {
         JRequest::setVar('overwite', $orig_overwrite);
     }
     if ($xfiles > 0) {
         $updates = $clsImportCSV->addedCount + $clsImportCSV->updatedCount;
     } else {
         $updates = 0;
     }
     return $updates;
 }
开发者ID:rhotog,项目名称:fabrik,代码行数:99,代码来源:importcsv.php

示例8: getPluginHTML

 /**
  * get html form fields for a plugin (filled with
  * current element's plugin data
  * @param string $plugin
  * @return string html form fields
  */
 function getPluginHTML($plugin = null)
 {
     $item = $this->getItem();
     if (is_null($plugin)) {
         $plugin = $item->plugin;
     }
     JRequest::setvar('view', 'element');
     JPluginHelper::importPlugin('fabrik_element', $plugin);
     $pluginManager = JModel::getInstance('Pluginmanager', 'FabrikFEModel');
     if ($plugin == '') {
         $str = JText::_('COM_FABRIK_SELECT_A_PLUGIN');
     } else {
         $plugin = $pluginManager->getPlugIn($plugin, 'Element');
         if (!is_object($plugin)) {
             JError::raiseNotice(500, 'Could not load plugin:' . $plugin);
         } else {
             $str = $plugin->onRenderAdminSettings(JArrayHelper::fromObject($item));
         }
     }
     return $str;
 }
开发者ID:rhotog,项目名称:fabrik,代码行数:27,代码来源:element.php

示例9: filter

	public function filter()
	{
		// Check for request forgeries
		JRequest::checkToken() or die('Invalid Token');
		//JModel::addIncludePath(JPATH_SITE.DS.'components'.DS.'com_fabrik'.DS.'models');
		$model = JModel::getInstance('List', 'FabrikFEModel');
		$id = JRequest::getInt('listid');
		$model->setId($id);
		JRequest::setvar('cid', $id);
		$request = $model->getRequestData();
		$model->storeRequestData($request);
		$this->view();
	}
开发者ID:Jobar87,项目名称:fabrik,代码行数:13,代码来源:list.php

示例10: filter

 /**
  * Filter the list data
  *
  * @return  void
  */
 public function filter()
 {
     // Check for request forgeries
     JSession::checkToken() or die('Invalid Token');
     $model = JModel::getInstance('List', 'FabrikFEModel');
     $id = JRequest::getInt('listid');
     $model->setId($id);
     JRequest::setvar('cid', $id);
     $request = $model->getRequestData();
     $model->storeRequestData($request);
     // $$$ rob pass in the model otherwise display() rebuilds it and the request data is rebuilt
     $this->view($model);
 }
开发者ID:rogeriocc,项目名称:fabrik,代码行数:18,代码来源:list.php

示例11: display

 /**
  * Render the view
  */
 function display($tpl = null)
 {
     if (!class_exists('VmHTML')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'html.php';
     }
     if (!class_exists('CurrencyDisplay')) {
         require JPATH_VM_ADMINISTRATOR . DS . 'helpers' . DS . 'currencydisplay.php';
     }
     $model = VmModel::getModel();
     JRequest::setvar('task', '');
     $this->SetViewTitle('REPORT');
     $myCurrencyDisplay = CurrencyDisplay::getInstance();
     //update order items button
     $q = 'SELECT * FROM #__virtuemart_order_items WHERE `product_discountedPriceWithoutTax` IS NULL ';
     $db = JFactory::getDBO();
     $db->setQuery($q);
     $res = $db->loadRow();
     if ($res) {
         JToolBarHelper::customX('updateOrderItems', 'new', 'new', JText::_('COM_VIRTUEMART_REPORT_UPDATEORDERITEMS'), false);
         vmError('COM_VIRTUEMART_REPORT_UPDATEORDERITEMS_WARN');
     }
     $this->addStandardDefaultViewLists($model);
     $revenueBasic = $model->getRevenue();
     if ($revenueBasic) {
         $totalReport['revenueTotal_brutto'] = $totalReport['revenueTotal_netto'] = $totalReport['number_of_ordersTotal'] = $totalReport['itemsSoldTotal'] = 0;
         foreach ($revenueBasic as &$j) {
             $totalReport['revenueTotal_netto'] += $j['order_subtotal_netto'];
             $totalReport['revenueTotal_brutto'] += $j['order_subtotal_brutto'];
             $totalReport['number_of_ordersTotal'] += $j['count_order_id'];
             $j['order_subtotal_netto'] = $myCurrencyDisplay->priceDisplay($j['order_subtotal_netto']);
             $j['order_subtotal_brutto'] = $myCurrencyDisplay->priceDisplay($j['order_subtotal_brutto']);
             //$j['product_quantity'] = $model->getItemsByRevenue($j);
             $totalReport['itemsSoldTotal'] += $j['product_quantity'];
         }
         $totalReport['revenueTotal_netto'] = $myCurrencyDisplay->priceDisplay($totalReport['revenueTotal_netto']);
         $totalReport['revenueTotal_brutto'] = $myCurrencyDisplay->priceDisplay($totalReport['revenueTotal_brutto']);
         // if ( 'product_quantity'==JRequest::getWord('filter_order')) {
         // foreach ($revenueBasic as $key => $row) {
         // $created_on[] =$row['created_on'];
         // $intervals[] =$row['intervals'];
         // $itemsSold[] =$row['product_quantity'];
         // $number_of_orders[] =$row['count_order_id'];
         // $revenue[] =$row['revenue'];
         // }
         // if (JRequest::getWord('filter_order_Dir') == 'desc') array_multisort($itemsSold, SORT_DESC,$revenueBasic);
         // else array_multisort($itemsSold, SORT_ASC,$revenueBasic);
         // }
     }
     $this->assignRef('report', $revenueBasic);
     $this->assignRef('totalReport', $totalReport);
     //$itemsSold = $model->getItemsSold($revenueBasic);
     //$this->assignRef('itemsSold', $itemsSold);
     // I tihnk is to use in a different layout such as product solds
     // PATRICK K.
     // $productList = $model->getOrderItems();
     // $this->assignRef('productList', $productList);
     $orderstatusM = VmModel::getModel('orderstatus');
     $this->lists['select_date'] = $model->renderDateSelectList();
     $orderstates = JRequest::getVar('order_status_code', array('C', 'S'));
     $this->lists['state_list'] = $orderstatusM->renderOSList($orderstates, 'order_status_code', TRUE);
     $this->lists['intervals'] = $model->renderIntervalsList();
     $this->assignRef('from_period', $model->from_period);
     $this->assignRef('until_period', $model->until_period);
     $pagination = $model->getPagination();
     $this->assignRef('pagination', $pagination);
     parent::display($tpl);
 }
开发者ID:juanmcortez,项目名称:Lectorum,代码行数:70,代码来源:view.html.php

示例12: save

 /**
  * Logic to save an item
  *
  * @access public
  * @return void
  * @since 1.0
  */
 function save()
 {
     // Check for request forgeries
     JRequest::checkToken() or jexit('Invalid Token');
     //echo '<html>  <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <body>';
     // Initialize variables
     $app = JFactory::getApplication();
     $db = JFactory::getDBO();
     $user = JFactory::getUser();
     $config = JFactory::getConfig();
     $session = JFactory::getSession();
     $task = JRequest::getVar('task');
     $ctrl_task = 'task=items.';
     // *********************
     // Get data from request
     // *********************
     // Retrieve form data these are subject to basic filtering
     $data = JRequest::getVar('jform', array(), 'post', 'array');
     // Core Fields and and item Parameters
     $custom = JRequest::getVar('custom', array(), 'post', 'array');
     // Custom Fields
     $jfdata = JRequest::getVar('jfdata', array(), 'post', 'array');
     // Joomfish Data
     // Set into model: id (needed for loading correct item), and type id (e.g. needed for getting correct type parameters for new items)
     $data_id = (int) $data['id'];
     $isnew = $data_id == 0;
     // If new make sure that type id is set too, before creating the model
     if ($isnew) {
         $typeid = JRequest::setvar('typeid', (int) @$data['type_id']);
     }
     // Get the model
     $model = $this->getModel('item');
     $model->setId($data_id);
     // Make sure id is correct
     // Get some flags this will also trigger item loading if not already loaded
     $isOwner = $model->get('created_by') == $user->get('id');
     // Get merged parameters: component, type, menu (FE)
     $params = new JRegistry();
     $model_params = $model->getComponentTypeParams();
     $params->merge($model_params);
     // Unique id for new items, needed by some fields for temporary data
     $unique_tmp_itemid = JRequest::getVar('unique_tmp_itemid');
     // Auto title for some content types
     if ($params->get('auto_title', 0)) {
         $data['title'] = (int) $data['id'];
     }
     // item id or ZERO for new items
     // *************************************
     // ENFORCE can change category ACL perms
     // *************************************
     $perms = FlexicontentHelperPerm::getPerm();
     // Per content type change category permissions
     $current_type_id = $isnew || !$model->get('type_id') ? (int) @$data['type_id'] : $model->get('type_id');
     // GET current (existing/old) item TYPE ID
     $CanChangeFeatCat = $user->authorise('flexicontent.change.cat.feat', 'com_flexicontent.type.' . $current_type_id);
     $CanChangeSecCat = $user->authorise('flexicontent.change.cat.sec', 'com_flexicontent.type.' . $current_type_id);
     $CanChangeCat = $user->authorise('flexicontent.change.cat', 'com_flexicontent.type.' . $current_type_id);
     $AutoApproveChanges = $perms->AutoApproveChanges;
     $enable_featured_cid_selector = $perms->MultiCat && $CanChangeFeatCat;
     $enable_cid_selector = $perms->MultiCat && $CanChangeSecCat;
     $enable_catid_selector = $isnew && !$params->get('catid_default') || !$isnew && !$model->get('catid') || $CanChangeCat;
     // Enforce maintaining featured categories
     $featured_cats_parent = $params->get('featured_cats_parent', 0);
     $featured_cats = array();
     if ($featured_cats_parent && !$enable_featured_cid_selector) {
         $featured_tree = flexicontent_cats::getCategoriesTree($published_only = 1, $parent_id = $featured_cats_parent, $depth_limit = 0);
         $disabled_cats = $params->get('featured_cats_parent_disable', 1) ? array($featured_cats_parent) : array();
         $featured_cid = array();
         if (!$isnew) {
             foreach ($model->get('categories') as $item_cat) {
                 if (isset($featured_tree[$item_cat]) && !isset($disabled_cats[$item_cat])) {
                     $featured_cid[] = $item_cat;
                 }
             }
         }
         $data['featured_cid'] = $featured_cid;
     }
     // Enforce maintaining secondary categories
     if (!$enable_cid_selector) {
         if ($isnew) {
             $data['cid'] = $params->get('cid_default');
         } else {
             if (isset($featured_cid)) {
                 $featured_cid_arr = array_flip($featured_cid);
                 $sec_cid = array();
                 foreach ($model->get('cats') as $item_cat) {
                     if (!isset($featured_cid_arr[$item_cat])) {
                         $sec_cid[] = $item_cat;
                     }
                 }
                 $data['cid'] = $sec_cid;
             } else {
                 $data['cid'] = $model->get('cats');
//.........这里部分代码省略.........
开发者ID:khetsothea,项目名称:flexicontent-cck,代码行数:101,代码来源:items.php

示例13: conteudo

 public function conteudo()
 {
     $script = '';
     if (!$this->funcao) {
         // abre as configurações do programa
         $this->config = $this->get_config($this->programa);
         if ($this->pagina == 'index') {
             $this->pagina = $this->config['default'];
             JRequest::setvar('pagina', $this->config['default']);
         }
         // carrega os menus laterais
         jimport('edesktop.menu.lateral');
         // verifica se existe o arquivo menus.php
         if (file_exists($this->pasta . DS . 'menus.php')) {
             require_once $this->pasta . DS . 'menus.php';
         }
         // inicia a class
         $dados = new stdClass();
         // carrega a messagem de retorno
         $dados->msg = JRequest::getvar('msg', '');
         $dados->msgTipo = JRequest::getvar('msg_tipo', 'error');
         // inicia as variaveis de sessão do dialog/pagina
         $script = "<script type=\"text/javascript\">\n                            \$(function(){\n                                    var processID = '{$this->processID}';\n                                    var \$dialog = \$('#d' +processID);\n                                    var \$main = \$dialog.parent();\n\n                                    var url_js = '{$this->url_programa}/js';\n                                    var url_base = '{$this->url_base}';\n                                    var url_programa = '{$this->url_programa}';\n                                    \n                                    var msg = '{$dados->msg}';\n                                 \n\t\t\t\t\t\t\t\t\tif(msg != '')\n\t\t\t\t\t\t\t\t\t\teDesktop.dialog.aviso(msg, '{$dados->msgTipo}', \$('.corpo', \$main));\n\n                                    var pagina = '{$this->pagina}';\n                                    var programa = '{$this->programa}';\n\n                                    var formURL = function(pagina, programa){\n                                            programa = (programa == undefined) ? '{$this->programa}' : programa;\n                                            return '?{$this->token}=1&template={$this->template}&class=programa&programa=' +programa+ '&method=conteudo&pagina=' + pagina;\n                                    };\n                                    \n                                    // botões\n                                    \$('.button, .acoes .submit').button();\n                    ";
         // verifica se existe o arquivo js
         $js_file = $this->pasta_paginas . DS . $this->pagina . '.js';
         if (file_exists($js_file) && filesize($js_file)) {
             $handle = fopen($js_file, "r");
             $js_file = fread($handle, filesize($js_file));
             fclose($handle);
             $script .= "// js_file\n\n" . $js_file . "\n\n";
         }
         $script .= "});\n</script>\n\n";
     }
     // verifica a permissão do usuário
     jAccess($this->pagina);
     // envia o formURL para o smarty
     $this->smarty->assign('formURL', $this->formURL(''));
     // envia o processID para o smarty
     $this->smarty->assign('processID', $this->processID);
     // abre a página
     $pagina = $this->pasta_paginas . DS . $this->pagina;
     // carrega o php
     if (file_exists($pagina . '.php')) {
         require_once $pagina . '.php';
         if (!$this->funcao) {
             echo $script;
             if (file_exists($pagina . '.html')) {
                 echo $this->smarty->fetch($pagina . '.html');
             }
         }
     } else {
         if ($this->funcao) {
             echo "{ 'msg' : 'Arquivo não encontrado! \"{$this->pagina}.html\"', 'retorno' : false, 'tipo' : 'error' }";
         } else {
             echo "Arquivo não encontrado!<br><br>{$pagina}.html<br><br><br><br><a href=\"javascript:void(0);\" class=\"link\" rel=\"{}\">Voltar</a>";
         }
     }
 }
开发者ID:eliasrosa,项目名称:eJoomla,代码行数:58,代码来源:programa.php

示例14: jimport

require_once JPATH_COMPONENT . '/controller.php';
jimport('joomla.application.component.model');
require_once JPATH_COMPONENT . '/models/model.php';
jimport('joomla.application.component.helper');
JHTML::addIncludePath(JPATH_COMPONENT_ADMINISTRATOR . '/helpers');
// ===============set the default values ========================
$task = JRequest::getVar('task', 'browse');
$config =& JComponentHelper::getParams('com_szavazasok');
$viewname = JRequest::getWord('view', 'szavazasoklist');
// view="szavazasok" id=0 az alapértelmezett hivás --> vita_alt
if ($viewname == 'szavazasok' & JRequest::getVar('id') == 0 & JRequest::getVar('task') == '') {
    $viewname = 'szavazasoklist';
    $task = 'browse';
}
JRequest::setVar('task', $task);
JRequest::setvar('view', $viewname);
// ==============================================================
// load specific controller if exists
$path = JPATH_COMPONENT . '/controllers/' . $viewname . '.php';
if (file_exists($path)) {
    require_once $path;
    $controllername = $viewname;
} else {
    $controllername = '';
}
$ControllerConfig = array('viewname' => strtolower($viewname), 'mainmodel' => strtolower($viewname), 'itemname' => ucfirst(strtolower($viewname)));
// Create the controller
$classname = 'SzavazasokController' . $controllername;
$controller = new $classname($ControllerConfig);
// Perform the Request task
$controller->execute($task);
开发者ID:madcsaba,项目名称:li-de,代码行数:31,代码来源:szavazasok.php

示例15: sc_configuration

                $cfgset = JRequest::getvar('cfgset');
                JRequest::setvar('task', "configuration");
                $cfg = new sc_configuration($cfgset);
                display::header();
                $cfg->show();
                break;
        }
        break;
    case "view_prod":
        $a = new products();
        $alist = $a->getPublishedProducts();
        display::view_prod($alist);
        break;
    case "about":
        switch ($task) {
            default:
                JRequest::setvar('task', "about");
                display::ShowAbout();
                break;
        }
        break;
    default:
        JRequest::setvar('task', "control");
        display::MainMenu();
}
if ($debug) {
    echo "<p>Development debug info</p><strong>task= '{$task}'<br>action='{$action}'</strong>";
}
if (!JRequest::getvar('no_html')) {
    display::afFooter();
}
开发者ID:bizanto,项目名称:Hooked,代码行数:31,代码来源:admin.caddy.php


注:本文中的JRequest::setvar方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。