function display($tpl = null) { global $mainframe, $option; $cid = JRequest::getVar('cid_user'); if (!is_array($cid)) { $mainframe->redirect('index.php?option=' . $option); return; } $user_id = $cid[0]; $model = $this->getModel('user'); $model->load($user_id); $this->_setToolBar(); $say = JText::sprintf('USER_RESOURCES_TITLE', $model->user->username); $root_node = JText::_('RESOURCES_TREE_ROOT_NODE'); $nowdate = JFactory::getDate(); $str_now = JHTML::_('date', $nowdate->toMySQL(), '%Y-%m-%d %H:%M:%S'); $this->assign('nowdate', $str_now); $this->assign('say', $say); $this->assign('root_node', $root_node); $this->assignRef('uid', $user_id); $this->assignRef('option', $option); //hide the menu JRequest::setVar('hidemainmenu', 1); parent::display(); }
function saveForm() { $rule = new stdClass(); $rule->ruleid = acymailing_getCID('ruleid'); if (empty($rule->ruleid)) { $this->database->setQuery('SELECT max(ordering) FROM `#__acymailing_rules`'); $rule->ordering = intval($this->database->loadResult()) + 1; } $rule->executed_on = ''; $rule->action_message = ''; $rule->action_user = ''; $formData = JRequest::getVar('data', array(), '', 'array'); foreach ($formData['rule'] as $column => $value) { acymailing_secureField($column); if (is_array($value)) { $rule->{$column} = serialize($value); } else { $rule->{$column} = strip_tags($value); } } $ruleid = $this->save($rule); if (!$ruleid) { return false; } JRequest::setVar('ruleid', $ruleid); return true; }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { JRequest::setVar('hidemainmenu', true); $user = JFactory::getUser(); $isNew = $this->item->id == 0; $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id')); $canDo = NewsfeedsHelper::getActions($this->state->get('filter.category_id'), $this->item->id); JToolBarHelper::title(JText::_('COM_NEWSFEEDS_MANAGER_NEWSFEED'), 'newsfeeds.png'); // If not checked out, can save the item. if (!$checkedOut && ($canDo->get('core.edit') || count($user->getAuthorisedCategories('com_newsfeeds', 'core.create')) > 0)) { JToolBarHelper::apply('newsfeed.apply', 'JTOOLBAR_APPLY'); JToolBarHelper::save('newsfeed.save', 'JTOOLBAR_SAVE'); } if (!$checkedOut && count($user->getAuthorisedCategories('com_newsfeeds', 'core.create')) > 0) { JToolBarHelper::custom('newsfeed.save2new', 'save-new.png', 'save-new_f2.png', 'JTOOLBAR_SAVE_AND_NEW', false); } // If an existing item, can save to a copy. if (!$isNew && $canDo->get('core.create')) { JToolBarHelper::custom('newsfeed.save2copy', 'save-copy.png', 'save-copy_f2.png', 'JTOOLBAR_SAVE_AS_COPY', false); } if (empty($this->item->id)) { JToolBarHelper::cancel('newsfeed.cancel', 'JTOOLBAR_CANCEL'); } else { JToolBarHelper::cancel('newsfeed.cancel', 'JTOOLBAR_CLOSE'); } JToolBarHelper::divider(); JToolBarHelper::help('JHELP_COMPONENTS_NEWSFEEDS_FEEDS_EDIT'); }
/** * display the edit form * @return void */ function edit() { JRequest::setVar('view', 'guild'); JRequest::setVar('layout', 'form'); JRequest::setVar('hidemainmenu', 1); parent::display(); }
/** * Add the page title and toolbar. * * */ protected function addToolbar() { require_once JPATH_COMPONENT . '/helpers/jdownloadshelper.php'; JRequest::setVar('hidemainmenu', true); $user = JFactory::getUser(); $isNew = $this->item->id == 0; $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $user->get('id')); $canDo = JDownloadsHelper::getActions(); $document = JFactory::getDocument(); $document->addStyleSheet('components/com_jdownloads/assets/css/style.css'); $title = $isNew ? JText::_('COM_JDOWNLOADS_LICEDIT_ADD') : JText::_('COM_JDOWNLOADS_LICEDIT_EDIT'); JToolBarHelper::title(JText::_('COM_JDOWNLOADS') . ': ' . $title, 'jdlicenses'); // If not checked out, can save the item. if (!$checkedOut && ($canDo->get('core.edit') || $canDo->get('core.create'))) { JToolBarHelper::apply('license.apply'); JToolBarHelper::save('license.save'); } if (!$checkedOut && $canDo->get('core.create')) { JToolBarHelper::save2new('license.save2new'); } // If an existing item, can save to a copy. if (!$isNew && $canDo->get('core.create')) { JToolBarHelper::save2copy('license.save2copy'); } if (empty($this->item->id)) { JToolBarHelper::cancel('license.cancel'); } else { JToolBarHelper::cancel('license.cancel', 'JTOOLBAR_CLOSE'); } JToolBarHelper::divider(); JToolBarHelper::help('help.license', true); }
function edit() { $title = JRequest::getVar("title", ""); $advertiser_id = JRequest::getVar("advertiser_id", ""); $approved = JRequest::getVar("approved", ""); $target_url = JRequest::getVar("target_url", ""); $image_url = JRequest::getVar("image_url", ""); $image_content = JRequest::getVar("image_content", ""); $ad_headline = JRequest::getVar("ad_headline", ""); $ad_text = JRequest::getVar("ad_text", ""); $ad_start_date = JRequest::getVar("ad_start_date", ""); $ad_end_date = JRequest::getVar("ad_end_date", ""); $_SESSION["title"] = $title; $_SESSION["advertiser_id"] = $advertiser_id; $_SESSION["approved"] = $approved; $_SESSION["target_url"] = $target_url; $_SESSION["image_content"] = $image_content; $_SESSION["ad_headline"] = $ad_headline; $_SESSION["ad_text"] = $ad_text; $_SESSION["ad_start_date"] = $ad_start_date; $_SESSION["ad_end_date"] = $ad_end_date; JRequest::setVar("hidemainmenu", 1); $view = $this->getView("adagencyJomsocial", "html"); $view->setLayout("editForm"); $view->setModel($this->_model, true); $adagencyConfig = $this->getModel('adagencyConfig'); $view->setModel($adagencyConfig); $view->editForm(); }
/** * Return JSON encoded data for Statistic page */ function display($tpl = null) { $app = JFactory::getApplication(); $params = $app->getParams(); jimport('joomla.environment.request'); /* validating request */ $guild_id = $params->get('guild_id', '0'); $groups = $params->get('allowed_groups'); $by_chars = $params->get('stats_by_chars', 0); $show_rating = $params->get('show_rating', 0); if ($guild_id != 0) { JRequest::setVar('guild_id', $guild_id, 'get', true); } if ($by_chars == 0) { JRequest::setVar('character_id', 0, 'get', true); } if ($show_rating != 0) { JRequest::setVar('show_rating', 1, 'get', true); } if (JRequest::getVar('group_id', '', 'get', 'int') != '') { if (!in_array(JRequest::getVar('group_id', '', 'get', 'int'), $groups)) { JRequest::setVar('group_id', '', 'get', true); } } /* load backend controller */ JLoader::register('RaidPlannerControllerStats', JPATH_ADMINISTRATOR . '/components/com_raidplanner/controllers/stats.php'); $tmp = new RaidPlannerControllerStats(); $tmp->display(); }
function display($tpl = null) { $mainframe = JFactory::getApplication(); $user = JFactory::getUser(); $option = JRequest::getCmd('option'); $view = JRequest::getCmd('view'); $limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int'); $limitstart = $mainframe->getUserStateFromRequest($option . $view . '.limitstart', 'limitstart', 0, 'int'); $filter_order = $mainframe->getUserStateFromRequest($option . $view . 'filter_order', 'filter_order', '', 'cmd'); $filter_order_Dir = $mainframe->getUserStateFromRequest($option . $view . 'filter_order_Dir', 'filter_order_Dir', '', 'word'); $model = $this->getModel(); $total = $model->getTotalGroups(); if ($limitstart > $total - $limit) { $limitstart = max(0, (int) (ceil($total / $limit) - 1) * $limit); JRequest::setVar('limitstart', $limitstart); } $extraFieldGroups = $model->getGroups(); $this->assignRef('rows', $extraFieldGroups); jimport('joomla.html.pagination'); $pageNav = new JPagination($total, $limitstart, $limit); $this->assignRef('page', $pageNav); JToolBarHelper::title(JText::_('K2_EXTRA_FIELD_GROUPS'), 'k2.png'); JToolBarHelper::deleteList('', 'remove', 'K2_DELETE'); JToolBarHelper::editList(); JToolBarHelper::addNew(); if (K2_JVERSION != '15') { JToolBarHelper::preferences('com_k2', 550, 875, 'K2_PARAMETERS'); } else { $toolbar = JToolBar::getInstance('toolbar'); $toolbar->appendButton('Popup', 'config', 'Parameters', 'index.php?option=com_k2&view=settings'); } $this->loadHelper('html'); K2HelperHTML::subMenu(); parent::display($tpl); }
/** * Method to get a JDatabaseQuery object for retrieving the data set from a database. * * @return object A JDatabaseQuery object or string to retrieve the data set. */ protected function getListQuery() { if (JRequest::getVar('filterStr') != '') { $whereStr = 'a.szulo = 0 and a.megnevezes like "%' . JRequest::getVar('filterStr') . '%"'; } else { $whereStr = 'a.szulo = 0'; } if (JRequest::getVar('order') != '') { $order = JRequest::getVar('order'); } else { $order = '1'; JRequest::setVar('order', '1'); } $query = 'select a.id, a.megnevezes, sum(sz.vita1 + sz.vita2) vita, sum(szavazas) szavazas, sum(lezart) lezart, a.allapot from #__temakorok a left outer join ( /* közvetlenül a témakörhöz tartozó szavazások SELECT sz2.temakor_id, sz2.vita1, sz2.vita2, sz2.szavazas, sz2.lezart FROM #__temakorok t1 LEFT OUTER JOIN #__szavazasok sz2 ON sz2.temakor_id = t1.id WHERE t1.szulo=0 /* első szintű alketegoriákhoz tartozó szavazások */ UNION ALL SELECT t2.id, sz2.vita1, sz2.vita2, sz2.szavazas, sz2.lezart FROM #__temakorok t2 LEFT OUTER JOIN #__temakorok t1 ON t1.szulo = t2.id LEFT OUTER JOIN #__szavazasok sz2 ON sz2.temakor_id = t1.id WHERE t2.szulo=0 /* második szintű alketegoriákhoz tartozó szavazások */ UNION ALL SELECT t3.id, sz2.vita1, sz2.vita2, sz2.szavazas, sz2.lezart FROM #__temakorok t3 LEFT OUTER JOIN #__temakorok t2 ON t2.szulo = t3.id LEFT OUTER JOIN #__temakorok t1 ON t1.szulo = t2.id LEFT OUTER JOIN #__szavazasok sz2 ON sz2.temakor_id = t1.id WHERE t3.szulo=0 /* harmadik szintű alketegoriákhoz tartozó szavazások */ UNION ALL SELECT t4.id, sz2.vita1, sz2.vita2, sz2.szavazas, sz2.lezart FROM #__temakorok t4 LEFT OUTER JOIN #__temakorok t3 ON t3.szulo = t4.id LEFT OUTER JOIN #__temakorok t2 ON t2.szulo = t3.id LEFT OUTER JOIN #__temakorok t1 ON t1.szulo = t2.id LEFT OUTER JOIN #__szavazasok sz2 ON sz2.temakor_id = t1.id WHERE t4.szulo=0 ) sz ON sz.temakor_id = a.id where ' . $whereStr . ' group by a.id, a.megnevezes order by ' . $order . ',1'; return $query; }
function listing() { JRequest::setVar('tmpl', 'component'); $statsClass = acymailing_get('class.stats'); $statsClass->saveStats(); header('Cache-Control: no-store, no-cache, must-revalidate'); header('Cache-Control: post-check=0, pre-check=0', false); header('Pragma: no-cache'); header("Expires: Wed, 17 Sep 1975 21:32:10 GMT"); ob_end_clean(); JPluginHelper::importPlugin('acymailing'); $this->dispatcher = JDispatcher::getInstance(); $results = $this->dispatcher->trigger('acymailing_getstatpicture'); $picture = reset($results); if (empty($picture)) { $picture = 'media/com_acymailing/images/statpicture.png'; } $picture = ltrim(str_replace(array('\\', '/'), DS, $picture), DS); $imagename = ACYMAILING_ROOT . $picture; $handle = fopen($imagename, 'r'); if (!$handle) { exit; } header("Content-type: image/png"); $contents = fread($handle, filesize($imagename)); fclose($handle); echo $contents; exit; }
function display() { if (!JRequest::getCmd('view')) { JRequest::setVar('view', 'comment'); } parent::display(); }
function add() { $swt = JRequest::getVar('swt', ''); JRequest::setVar('view', 'swtturnierinfo'); JRequest::setVar('swt', $swt); parent::display(); }
function display($cachable = false, $urlparams = array()) { // set default view if not set JRequest::setVar("view", JFactory::getApplication()->input->get("view", "Dashboard")); // call parent behavior parent::display($cachable, $urlparams); }
/** * display the edit form * @return void */ function edit() { JRequest::setVar('view', 'hotellinkedit'); JRequest::setVar('layout', 'default'); JRequest::setVar('hidemainmenu', 1); parent::display(); }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { JRequest::setVar('hidemainmenu', true); $user = JFactory::getUser(); $isNew = $this->item->id == 0; $canDo = RedirectHelper::getActions(); JToolBarHelper::title(JText::_('COM_REDIRECT_MANAGER_LINK'), 'redirect'); // If not checked out, can save the item. if ($canDo->get('core.edit')) { JToolBarHelper::apply('link.apply'); JToolBarHelper::save('link.save'); } // This component does not support Save as Copy due to uniqueness checks. // While it can be done, it causes too much confusion if the user does // not change the Old URL. if ($canDo->get('core.edit') && $canDo->get('core.create')) { JToolBarHelper::save2new('link.save2new'); } if (empty($this->item->id)) { JToolBarHelper::cancel('link.cancel'); } else { JToolBarHelper::cancel('link.cancel', 'JTOOLBAR_CLOSE'); } JToolBarHelper::help('JHELP_COMPONENTS_REDIRECT_MANAGER_EDIT'); }
public function display($cachable = false, $url_params = false) { $user =& JFactory::getUser(); $view = JRequest::getVar("view"); if ($view == 'advancedopenportal') { JRequest::setVar("view", "listcases"); $view = "listcases"; } if (SugarCasesConnection::isValidPortalUser($user) && !SugarCasesConnection::isUserBlocked($user)) { parent::display($cachable, $url_params); } else { if (!$user->id) { $msg = JText::_('COM_ADVANCEDOPENPORTAL_LOGIN_REQUIRED'); } elseif (SugarCasesConnection::isUserBlocked($user)) { $msg = JText::_('COM_ADVANCEDOPENPORTAL_PORTAL_USER_BLOCKED'); } else { $msg = JText::_('COM_ADVANCEDOPENPORTAL_NO_PORTAL_ACCOUNT'); } if ($view != 'listcases') { JFactory::getApplication()->redirect(JURI::base(), $msg, 'error'); } else { JFactory::getApplication()->enqueueMessage($msg, 'error'); parent::display($cachable, $url_params); } } }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { JRequest::setVar('hidemainmenu', true); $user = JFactory::getUser(); $userId = $user->get('id'); $isNew = $this->item->id == 0; $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $userId); // Since we don't track these assets at the item level, use the category id. $canDo = BannersHelper::getActions($this->item->catid, 0); JToolBarHelper::title($isNew ? JText::_('COM_BANNERS_MANAGER_BANNER_NEW') : JText::_('COM_BANNERS_MANAGER_BANNER_EDIT'), 'banners.png'); // If not checked out, can save the item. if (!$checkedOut && ($canDo->get('core.edit') || count($user->getAuthorisedCategories('com_banners', 'core.create')) > 0)) { JToolBarHelper::apply('banner.apply'); JToolBarHelper::save('banner.save'); if ($canDo->get('core.create')) { JToolBarHelper::save2new('banner.save2new'); } } // If an existing item, can save to a copy. if (!$isNew && $canDo->get('core.create')) { JToolBarHelper::save2copy('banner.save2copy'); } if (empty($this->item->id)) { JToolBarHelper::cancel('banner.cancel'); } else { JToolBarHelper::cancel('banner.cancel', 'JTOOLBAR_CLOSE'); } JToolBarHelper::divider(); JToolBarHelper::help('JHELP_COMPONENTS_BANNERS_BANNERS_EDIT'); }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { JRequest::setVar('hidemainmenu', true); $user = JFactory::getUser(); $userId = $user->get('id'); $isNew = $this->item->id == 0; $checkedOut = !($this->item->checked_out == 0 || $this->item->checked_out == $userId); $canDo = TZ_PinboardHelper::getActions($this->state->get('filter.category_id'), $this->item->id); JToolBarHelper::title(JText::_('COM_CONTENT_PAGE_' . ($checkedOut ? 'VIEW_ARTICLE' : ($isNew ? 'ADD_ARTICLE' : 'EDIT_ARTICLE'))), 'article-add.png'); // Built the actions for new and existing records. // For new records, check the create permission. if ($isNew && count($user->getAuthorisedCategories('com_content', 'core.create')) > 0) { JToolBarHelper::save('article.save'); JToolBarHelper::cancel('article.cancel'); } else { // Can't save the record if it's checked out. if (!$checkedOut) { // Since it's an existing record, check the edit permission, or fall back to edit own if the owner. if ($canDo->get('core.edit') || $canDo->get('core.edit.own') && $this->item->created_by == $userId) { // We can save this record, but check the create permission to see if we can return to make a new one. if ($canDo->get('core.create')) { } } } // If checked out, we can still save if ($canDo->get('core.create')) { } JToolBarHelper::cancel('article.cancel', 'JTOOLBAR_CLOSE'); } JToolBarHelper::divider(); }
function doimport() { $model =& $this->getModel('Importcsv', 'FabrikFEModel'); if (!$model->import()) { $this->display(); return; } $id = $model->getListModel()->getId(); $document = JFactory::getDocument(); $viewName = JRequest::getVar('view', 'form', 'default', 'cmd'); $viewType = $document->getType(); // Set the default view name from the Request $view =& $this->getView($viewName, $viewType); $Itemid = JRequest::getInt('Itemid'); if (!empty($model->newHeadings)) { //as opposed to admin you can't alter table structure with a CSV import //from the front end JError::raiseNotice(500, $model->_makeError()); $this->setRedirect("index.php?option=com_fabrik&view=import&fietype=csv&listid=" . $id . "&Itemid=" . $Itemid); } else { JRequest::setVar('fabrik_list', $id); $msg = $model->makeTableFromCSV(); $this->setRedirect('index.php?option=com_fabrik&view=list&listid=' . $id . "&resetfilters=1&Itemid=" . $Itemid, $msg); } }
public function edit() { JRequest::setVar('view', 'giftcard_detail'); JRequest::setVar('layout', 'default'); JRequest::setVar('hidemainmenu', 1); parent::display(); }
public function display($cachable = false, $urlparams = false) { JRequest::setVar('view', JRequest::getCmd('view', 'Orphans')); if (isset($_POST['_orphanaction']) && $_POST['_orphanaction'] == "zipIt") { $file = tempnam("tmp", "zip"); $zip = new ZipArchive(); $zip->open($file, ZipArchive::OVERWRITE); foreach ($_POST['tozip'] as $_file) { $zip->addFile(JPATH_ROOT . "/" . $_file, $_file); } $zip->close(); header('Content-Type: application/zip'); header('Content-Length: ' . filesize($file)); header('Content-Disposition: attachment; filename="orphans.zip"'); readfile($file); unlink($file); die; } else { if (isset($_POST['_orphanaction']) && $_POST['_orphanaction'] == "delete" && isset($_POST['_confirmAction'])) { foreach ($_POST['tozip'] as $_file) { unlink(JPATH_ROOT . "/" . $_file); } } } // call parent behavior parent::display($cachable); }
function display($tpl = null) { if (JRequest::getString('task') != 'edit' && JRequest::getString('task') != 'add') { JToolBarHelper::title('J-HotelReservation : ' . JText::_('LNG_MANAGE_TAXES', true), 'generic.png'); JRequest::setVar('hidemainmenu', 1); $hotel_id = $this->get('HotelId'); if ($hotel_id > 0) { JToolBarHelper::addNew('managetaxes.edit'); JToolBarHelper::editList('managetaxes.edit'); JToolBarHelper::deleteList('', 'managetaxes.delete', JText::_('LNG_DELETE', true)); JToolBarHelper::custom('managetaxes.back', JHotelUtil::getDashBoardIcon(), 'home', JText::_('LNG_HOTEL_DASHBOARD', true), false, false); } $this->hotel_id = $hotel_id; $items = $this->get('Datas'); $this->items = $items; $hotels = $this->get('Hotels'); $hotels = checkHotels(JFactory::getUser()->id, $hotels); $this->hotels = $hotels; } else { $item = $this->get('Data'); $this->item = $item; $hotel_id = $this->get('HotelId'); $this->hotel_id = $hotel_id; $hotel = $this->get('Hotel'); $this->hotel = $hotel; JToolBarHelper::title('J-Hotel Reservation : ' . ($item->tax_id > 0 ? JText::_("LNG_EDIT", true) : JText::_("LNG_ADD_NEW", true)) . ' ' . JText::_('LNG_TAX', true), 'generic.png'); JRequest::setVar('hidemainmenu', 1); JToolBarHelper::cancel('managetaxes.back'); JToolBarHelper::save('managetaxes.save'); } parent::display($tpl); }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { JRequest::setVar('hidemainmenu', true); $user = JFactory::getUser(); $isNew = $this->item->id == 0; $canDo = MenusHelper::getActions($this->state->get('filter.parent_id')); JToolBarHelper::title(JText::_($isNew ? 'COM_MENUS_VIEW_NEW_MENU_TITLE' : 'COM_MENUS_VIEW_EDIT_MENU_TITLE'), 'menu.png'); // If a new item, can save the item. Allow users with edit permissions to apply changes to prevent returning to grid. if ($isNew && $canDo->get('core.create')) { if ($canDo->get('core.edit')) { JToolBarHelper::apply('menu.apply'); } JToolBarHelper::save('menu.save'); } // If user can edit, can save the item. if (!$isNew && $canDo->get('core.edit')) { JToolBarHelper::apply('menu.apply'); JToolBarHelper::save('menu.save'); } // If the user can create new items, allow them to see Save & New if ($canDo->get('core.create')) { JToolBarHelper::save2new('menu.save2new'); } if ($isNew) { JToolBarHelper::cancel('menu.cancel'); } else { JToolBarHelper::cancel('menu.cancel', 'JTOOLBAR_CLOSE'); } JToolBarHelper::divider(); JToolBarHelper::help('JHELP_MENUS_MENU_MANAGER_EDIT'); }
function display($tmpl = 'default') { require_once COM_FABRIK_FRONTEND . DS . 'helpers' . DS . 'html.php'; $model = $this->getModel(); $usersConfig = JComponentHelper::getParams('com_fabrik'); $id = JRequest::getVar('id', $usersConfig->get('visualizationid', JRequest::getInt('visualizationid', 0))); $model->setId($id); $this->assign('id', $id); $this->assignRef('row', $this->get('Visualization')); $this->assign('rows', $this->get('Rows')); $this->assign('containerId', $this->get('ContainerId')); $this->calName = $this->get('VizName'); $this->assignRef('params', $this->get('PluginParams')); $tmpl = $this->params->get('approvals_layout', $tmpl); $tmplpath = JPATH_SITE . DS . 'plugins' . DS . 'fabrik_visualization' . DS . 'approvals' . DS . 'views' . DS . 'approvals' . DS . 'tmpl' . DS . $tmpl; $this->_setPath('template', $tmplpath); $ab_css_file = $tmplpath . DS . "template.css"; if (file_exists($ab_css_file)) { JHTML::stylesheet('/plugins/fabrik_visualization/approvals/views/approvals/tmpl/' . $tmpl . '/template.css'); } FabrikHelperHTML::script('plugins/fabrik_visualization/approvals/approvals.js', true, "var approvals = new fbVisApprovals('approvals_" . $id . "');"); $text = $this->loadTemplate(); $opt = JRequest::getVar('option'); $view = JRequest::getCmd('view'); JRequest::setVar('view', 'article'); JRequest::setVar('option', 'com_content'); jimport('joomla.html.html.content'); $text .= '{emailcloak=off}'; $text = JHTML::_('content.prepare', $text); $text = preg_replace('/\\{emailcloak\\=off\\}/', '', $text); JRequest::setVar('option', $opt); echo $text; }
/** * Proxy for getModel. */ function display($cachable = false, $urlparams = array()) { switch (JRequest::getVar('task')) { case 'delete': $this->delete(); break; case 'remove_confirmed': $this->remove_confirmed(); break; case 'copyItem': $this->copyItem(); break; case 'uploadItem': $this->uploadItem(); break; case 'themelist.delete': $this->delete(); break; case 'themelist.remove_confirmed': $this->remove_confirmed(); break; case 'themelist.copyItem': $this->copyItem(); break; case 'themelist.uploadItem': $this->uploadItem(); break; default: JRequest::setVar('view', 'themelist'); parent::display(); break; } }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { JRequest::setVar('hidemainmenu', 1); $user = JFactory::getUser(); $isNew = $this->item->id == 0; $canDo = UsersHelper::getActions(); JToolBarHelper::title(JText::_($isNew ? 'COM_USERS_VIEW_NEW_GROUP_TITLE' : 'COM_USERS_VIEW_EDIT_GROUP_TITLE'), 'groups-add'); if ($canDo->get('core.edit') || $canDo->get('core.create')) { JToolBarHelper::apply('group.apply'); JToolBarHelper::save('group.save'); } if ($canDo->get('core.create')) { JToolBarHelper::save2new('group.save2new'); } // If an existing item, can save to a copy. if (!$isNew && $canDo->get('core.create')) { JToolBarHelper::save2copy('group.save2copy'); } if (empty($this->item->id)) { JToolBarHelper::cancel('group.cancel'); } else { JToolBarHelper::cancel('group.cancel', 'JTOOLBAR_CLOSE'); } JToolBarHelper::divider(); JToolBarHelper::help('JHELP_USERS_GROUPS_EDIT'); }
/** * TuiyoControllerResources::inc() * @param string $identifier * @param string $type * @param string $size * @return */ public function inc($identifier = '', $type = '', $size = '') { $itemStore = array(); $resource =& $this; if (!$resource instanceof self) { $resource = self::getInstance(); } //Tuiyo TakeOver JRequest::setVar('format', 'stream'); JRequest::setVar('tmpl', 'component'); $data = JRequest::getVar("data", null); $segments = explode('.', trim($data)); $count = sizeof($segments); //Methods $validMethods = array("avatar" => "_getAvatar", "audio" => "_getAudio", "doc" => "_getDocument"); if ($count > 0) { if (array_key_exists($segments[0], $validMethods)) { $type = $segments[0]; $args = $segments; //Get the file and return it; call_user_method($validMethods[$type], $resource, $args); } } jexit(0); }
function display($cachable = false, $urlparams = false) { switch (JRequest::getVar('task')) { case 'login': $this->LoginJUser(); break; case 'create': $this->create_user(); break; case 'create_proceed': $this->create_proceed(); break; case 'logout': $this->logout(); break; case 'switch': $this->distroy_fb_session(); break; default: break; } switch (JRequest::getVar('view')) { default: JRequest::setVar('view', 'fbconnct'); } parent::display(); }
function display() { if (!JRequest::getWord('view', null)) { JRequest::setVar('view', 'daily'); } parent::display(); }
/** * Add the page title and toolbar. * * @since 1.6 */ protected function addToolbar() { JRequest::setVar('hidemainmenu', true); $user = JFactory::getUser(); $isNew = $this->item->id == 0; $canDo = TemplatesHelper::getActions(); JToolBarHelper::title($isNew ? JText::_('COM_TEMPLATES_MANAGER_ADD_STYLE') : JText::_('COM_TEMPLATES_MANAGER_EDIT_STYLE'), 'thememanager'); // If not checked out, can save the item. if ($canDo->get('core.edit')) { JToolBarHelper::apply('style.apply'); JToolBarHelper::save('style.save'); } // If an existing item, can save to a copy. if (!$isNew && $canDo->get('core.create')) { JToolBarHelper::save2copy('style.save2copy'); } if (empty($this->item->id)) { JToolBarHelper::cancel('style.cancel'); } else { JToolBarHelper::cancel('style.cancel', 'JTOOLBAR_CLOSE'); } JToolBarHelper::divider(); // Get the help information for the template item. $lang = JFactory::getLanguage(); $help = $this->get('Help'); if ($lang->hasKey($help->url)) { $debug = $lang->setDebug(false); $url = JText::_($help->url); $lang->setDebug($debug); } else { $url = null; } JToolBarHelper::help($help->key, false, $url); }