• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

PHP JRequest类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



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

示例1: featured

 /**
  * Method to toggle the featured setting of a list of articles.
  *
  * @return	void
  * @since	1.6
  */
 function featured()
 {
     // Check for request forgeries
     JSession::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
     // Initialise variables.
     $user = JFactory::getUser();
     $ids = JRequest::getVar('cid', array(), '', 'array');
     $values = array('featured' => 1, 'unfeatured' => 0);
     $task = $this->getTask();
     $value = JArrayHelper::getValue($values, $task, 0, 'int');
     // Access checks.
     foreach ($ids as $i => $id) {
         if (!$user->authorise('core.edit.state', 'com_content.article.' . (int) $id)) {
             // Prune items that you can't change.
             unset($ids[$i]);
             JError::raiseNotice(403, JText::_('JLIB_APPLICATION_ERROR_EDITSTATE_NOT_PERMITTED'));
         }
     }
     if (empty($ids)) {
         JError::raiseWarning(500, JText::_('JERROR_NO_ITEMS_SELECTED'));
     } else {
         // Get the model.
         $model = $this->getModel();
         // Publish the items.
         if (!$model->featured($ids, $value)) {
             JError::raiseWarning(500, $model->getError());
         }
     }
     $this->setRedirect('index.php?option=com_content&view=articles');
 }
开发者ID:joomline,项目名称:Joomla2.5.999,代码行数:36,代码来源:articles.php


示例2: save

 function save()
 {
     $mainframe =& JFactory::getApplication();
     $row =& JTable::getInstance('K2UserGroup', 'Table');
     if (!$row->bind(JRequest::get('post'))) {
         $mainframe->redirect('index.php?option=com_k2&view=userGroups', $row->getError(), 'error');
     }
     if (!$row->check()) {
         $mainframe->redirect('index.php?option=com_k2&view=userGroup&cid=' . $row->id, $row->getError(), 'error');
     }
     if (!$row->store()) {
         $mainframe->redirect('index.php?option=com_k2&view=userGroups', $row->getError(), 'error');
     }
     $cache =& JFactory::getCache('com_k2');
     $cache->clean();
     switch (JRequest::getCmd('task')) {
         case 'apply':
             $msg = JText::_('Changes to User Group saved');
             $link = 'index.php?option=com_k2&view=userGroup&cid=' . $row->id;
             break;
         case 'save':
         default:
             $msg = JText::_('User Group Saved');
             $link = 'index.php?option=com_k2&view=userGroups';
             break;
     }
     $mainframe->redirect($link, $msg);
 }
开发者ID:navinpai,项目名称:GEC-Tandav,代码行数:28,代码来源:usergroup.php


示例3: display

 /**
  * Method to display a view.
  *
  * @param	boolean			If true, the view output will be cached
  * @param	array			An array of safe url parameters and their variable types, for valid values see {@link JFilterInput::clean()}.
  *
  * @return	JController		This object to support chaining.
  * @since	1.5
  */
 public function display($cachable = false, $urlparams = false)
 {
     require_once JPATH_COMPONENT . '/helpers/users.php';
     // Load the submenu.
     UsersHelper::addSubmenu(JRequest::getCmd('view', 'users'));
     $view = JRequest::getCmd('view', 'users');
     $layout = JRequest::getCmd('layout', 'default');
     $id = JRequest::getInt('id');
     if (!$this->canView($view)) {
         JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
         return;
     }
     // Check for edit form.
     if ($view == 'user' && $layout == 'edit' && !$this->checkEditId('com_users.edit.user', $id)) {
         // Somehow the person just went to the form - we don't allow that.
         $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id));
         $this->setMessage($this->getError(), 'error');
         $this->setRedirect(JRoute::_('index.php?option=com_users&view=users', false));
         return false;
     } elseif ($view == 'group' && $layout == 'edit' && !$this->checkEditId('com_users.edit.group', $id)) {
         // Somehow the person just went to the form - we don't allow that.
         $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id));
         $this->setMessage($this->getError(), 'error');
         $this->setRedirect(JRoute::_('index.php?option=com_users&view=groups', false));
         return false;
     } elseif ($view == 'level' && $layout == 'edit' && !$this->checkEditId('com_users.edit.level', $id)) {
         // Somehow the person just went to the form - we don't allow that.
         $this->setError(JText::sprintf('JLIB_APPLICATION_ERROR_UNHELD_ID', $id));
         $this->setMessage($this->getError(), 'error');
         $this->setRedirect(JRoute::_('index.php?option=com_users&view=levels', false));
         return false;
     }
     return parent::display();
 }
开发者ID:Simarpreet05,项目名称:joomla,代码行数:43,代码来源:controller.php


示例4: getFolderList

 /**
  * Image Manager Popup
  *
  * @param string $listFolder The image directory to display
  * @since 1.5
  */
 function getFolderList($base = null)
 {
     global $mainframe;
     // Get some paths from the request
     if (empty($base)) {
         $base = JA_WORKING_DATA_FOLDER;
     }
     // Get the list of folders
     jimport('joomla.filesystem.folder');
     $folders = JFolder::folders($base, '.', 4, true);
     // Load appropriate language files
     $lang =& JFactory::getLanguage();
     $lang->load(JRequest::getCmd('option'), JPATH_ADMINISTRATOR);
     $document =& JFactory::getDocument();
     $document->setTitle(JText::_('Insert Image'));
     // Build the array of select options for the folder list
     $options[] = JHTML::_('select.option', "", "/");
     foreach ($folders as $folder) {
         $folder = str_replace(JA_WORKING_DATA_FOLDER, "", $folder);
         $value = substr($folder, 1);
         $text = str_replace(DS, "/", $folder);
         $options[] = JHTML::_('select.option', $value, $text);
     }
     // Sort the folder list array
     if (is_array($options)) {
         sort($options);
     }
     // Create the drop-down folder select list
     $list = JHTML::_('select.genericlist', $options, 'folderlist', "class=\"inputbox\" size=\"1\" onchange=\"ImageManager.setFolder(this.options[this.selectedIndex].value)\" ", 'value', 'text', $base);
     return $list;
 }
开发者ID:rlee1962,项目名称:diylegalcenter,代码行数:37,代码来源:repo.php


示例5: display

 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();
 }
开发者ID:laiello,项目名称:yrm,代码行数:25,代码来源:view.resources.php


示例6: save

 function save()
 {
     $data = JRequest::getVar('jform', array(), 'post', 'NONE', 4);
     $id = (int) $data['id'];
     if (empty($id)) {
         if (!igGeneralHelper::authorise('core.igalleryfront.create')) {
             return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
         }
     } else {
         if (!igGeneralHelper::authorise('core.igalleryfront.edit', $id)) {
             return JError::raiseWarning(404, JText::_('JERROR_ALERTNOAUTHOR'));
         }
     }
     $model = $this->getModel();
     $msg = '';
     if (!$model->save($data)) {
         JError::raise(2, 500, $model->getError());
     } else {
         $msg = JText::_('SUCCESSFULLY_SAVED');
     }
     switch ($this->task) {
         case 'apply':
             $url = 'index.php?option=com_igallery&view=icategory&id=' . $id;
             break;
         case 'save':
             $url = 'index.php?option=com_igallery&view=categories';
     }
     $this->setRedirect(JRoute::_($url, false), $msg);
 }
开发者ID:iFactoryDigital,项目名称:gympieradiology,代码行数:29,代码来源:icategory.php


示例7: delete

 /**
  * Removes an item
  */
 function delete()
 {
     // Check for request forgeries
     JRequest::checkToken() or jexit(JText::_('JINVALID_TOKEN'));
     // Initialise variables.
     $user = JFactory::getUser();
     $ids = JRequest::getVar('cid', array(), '', 'array');
     // Access checks.
     foreach ($ids as $i => $id) {
         if (!$user->authorise('core.delete', 'com_content.article.' . (int) $id)) {
             // Prune items that you can't delete.
             unset($ids[$i]);
             JError::raiseNotice(403, JText::_('JERROR_CORE_DELETE_NOT_PERMITTED'));
         }
     }
     if (empty($ids)) {
         JError::raiseWarning(500, JText::_('JERROR_NO_ITEMS_SELECTED'));
     } else {
         // Get the model.
         $model = $this->getModel();
         // Remove the items.
         if (!$model->featured($ids, 0)) {
             JError::raiseWarning(500, $model->getError());
         }
     }
     $this->setRedirect('index.php?option=com_content&view=featured');
 }
开发者ID:Joomla-on-NoSQL,项目名称:LaMojo,代码行数:30,代码来源:featured.php


示例8: fetchMethodForm

 function fetchMethodForm($uid, $step, $update = false)
 {
     global $task;
     switch ($step) {
         case 2:
             $lists = array();
             $lists['action'] = _taskLink($task, $uid, array('step' => $step + 1), false);
             return HTML_DMUploadMethod::linkFileForm($lists);
             break;
         case 3:
             $url = stripslashes(JRequest::getString('url', 'http://'));
             $err = DMUploadMethod::linkFileProcess($uid, $step, $url);
             if ($err['_error']) {
                 _returnTo($task, $err['_errmsg'], '', array("method" => 'link', "step" => $step - 1, "localfile" => '', "url" => DOCMAN_Utils::safeEncodeURL($url)));
             }
             $uploaded = DOCMAN_Utils::safeEncodeURL(_DM_DOCUMENT_LINK . $url);
             $catid = $update ? 0 : $uid;
             $docid = $update ? $uid : 0;
             $session = JFactory::getSession();
             $session->set('docman.dmfilename', _DM_DOCUMENT_LINK);
             $session->set('docman.document_url', $url);
             return fetchEditDocumentForm($docid, $uploaded, $catid);
             break;
         default:
             break;
     }
     return true;
 }
开发者ID:janssit,项目名称:www.ondernemenddiest.be,代码行数:28,代码来源:upload.link.php


示例9: addToolbar

 /**
  * 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);
 }
开发者ID:madcsaba,项目名称:li-de,代码行数:37,代码来源:view.html.php


示例10: display

 /**
  * 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();
 }
开发者ID:dnaoverride,项目名称:RaidPlanner,代码行数:32,代码来源:view.json.php


示例11: display

 function display($tpl = null)
 {
     $state = $this->get('State');
     $this->params = $state->get("parameters.menu");
     $categoryId = JRequest::getVar('categoryId');
     $this->assignRef('categoryId', $categoryId);
     $this->appSettings = JBusinessUtil::getInstance()->getApplicationSettings();
     $events = $this->get('Events');
     $this->assignRef('events', $events);
     //dump($events);
     $categories = $this->get('Categories');
     $this->assignRef('categories', $categories);
     if ($this->appSettings->enable_search_filter_events) {
         $serachFilter = $this->get('SeachFilter');
         $this->assignRef('searchFilter', $serachFilter);
     }
     $categoryId = $this->get('CategoryId');
     if (!empty($categoryId)) {
         $this->categoryId = $categoryId;
         $this->category = $this->get('Category');
     }
     $pagination = $this->get('Pagination');
     $this->assignRef('pagination', $pagination);
     parent::display($tpl);
 }
开发者ID:benji1979,项目名称:teszt1,代码行数:25,代码来源:view.html.php


示例12: display

 function display($tpl = null)
 {
     $task = JRequest::getVar('task');
     if ($task == "process") {
         return $this->process();
     }
 }
开发者ID:vstorm83,项目名称:propertease,代码行数:7,代码来源:view.html.php


示例13: language

 function language()
 {
     $app = JFactory::getApplication();
     $code = JRequest::getString('code');
     if (empty($code)) {
         $app->enqueueMessage(JText::_('Code not specified', true));
         return;
     }
     $file = new stdClass();
     $file->name = $code;
     $path = JPATH_COMPONENT_ADMINISTRATOR . DS . 'language' . DS . $code . DS . $code . getBookingExtName() . '.ini';
     $file->path = $path;
     jimport('joomla.filesystem.file');
     $showLatest = true;
     $loadLatest = false;
     if (JFile::exists($path)) {
         $file->content = JFile::read($path);
         if (empty($file->content)) {
             $app->enqueueMessage('File not found : ' . $path);
         }
     } else {
         $loadLatest = true;
         $file->content = JFile::read(JPATH_COMPONENT_ADMINISTRATOR . DS . 'language' . 'en-GB' . DS . 'en-GB.' . getBookingExtName() . '.ini');
     }
     $this->assignRef('file', $file);
     $tpl = "language";
     return $tpl;
 }
开发者ID:jmangarret,项目名称:webtuagencia24,代码行数:28,代码来源:view.html.php


示例14: bootstrap

	/**
	 * This renders the necessary bootstrap data into the html headers.
	 */
	public function bootstrap()
	{
		static $isRendered	= false;

		$doc 				= JFactory::getDocument();

		if( !$isRendered && $doc->getType() == 'html' )
		{
			// @task: Include dependencies from foundry.
			require_once( JPATH_ROOT . DIRECTORY_SEPARATOR . 'media' . DIRECTORY_SEPARATOR . 'foundry' . DIRECTORY_SEPARATOR . '3.1' . DIRECTORY_SEPARATOR . 'joomla' . DIRECTORY_SEPARATOR . 'configuration.php' );

			$config = Komento::getConfig();

			$environment = JRequest::getVar( 'komento_environment' , $config->get( 'komento_environment' ) );

			$folder	= 'scripts';

			// @task: Let's see if we should load the dev scripts.
			if( $environment == 'development' )
			{
				$folder		= 'scripts_';
			}

			$doc->addScript( rtrim( JURI::root() , '/' ) . '/media/com_komento/' . $folder . '/abstract.js' );

			$isRendered		= true;
		}

		return $isRendered;
	}
开发者ID:kosmosby,项目名称:medicine-prof,代码行数:33,代码来源:foundry.php


示例15: getListQuery

    /**
     * Method to get a JDatabaseQuery object for retrieving the data set from a database.
     *
     * @return	object	A JDatabaseQuery object to retrieve the data set.
     */
    protected function getListQuery()
    {
        $w = explode('|', urldecode(JRequest::getVar('filterStr', '')));
        $user = JFactory::getUser();
        $filterStr = $w[0];
        $filterAktiv = $w[1];
        if ($filterAktiv == 1) {
            $lezartLimit = 1;
        } else {
            $lezartLimit = 99;
        }
        if ($filterStr != '') {
            $filterStr = ' and sz.megnevezes like "%' . $filterStr . '%"';
        }
        $db = $this->getDbo();
        $query = $db->getQuery(true);
        $catid = (int) $this->getState('authorlist.id', 1);
        $query = '
/* szavazások amik jelenleg vita1 állapotban vannak */
/* ================================================ */
SELECT sz.megnevezes, sz.vita1, sz.vita2, sz.szavazas, sz.lezart, sz.szavazas_vege, sz.titkos, sz.vita2_vege,
  sz.id, sz.temakor_id
FROM #__szavazasok sz
WHERE (sz.vita2=1) ' . $filterStr;
        $query .= ' order by ' . JRequest::getVar('order', '6');
        return $query;
    }
开发者ID:madcsaba,项目名称:li-de,代码行数:32,代码来源:vita_too.php


示例16: addToolbar

 /**
  * 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');
 }
开发者ID:christianesperar,项目名称:joomla-example,代码行数:36,代码来源:view.html.php


示例17: display

 function display($tpl = null)
 {
     global $option, $mainframe;
     $model =& $this->getModel();
     $menu =& JMenu::getInstance('site');
     $item = $menu->getActive();
     $params =& $menu->getParams($item->id);
     //get controller
     $controller = new VnffhotelController();
     $cityid = $params->get('cityid', '1');
     $cityid = JRequest::getVar('cityid', $cityid);
     //if($cityid==1)
     $hotels = $model->getHotelsByCity($cityid);
     $pagination = $model->getPagination();
     for ($i = 0; $i < count($hotels); $i++) {
         $hotels[$i]->images = $model->getHotelImages($hotels[$i]->hotel_ID, 'm');
         if (count($hotels[$i]->images) == 0) {
             $image->image_Name = "noimage.png";
             $hotels[$i]->images[0] = $image;
         }
         $hotels[$i]->shortDes = $controller->cutDes($hotels[$i]->Overview, 30);
         $hotels[$i]->linkToHotel = $controller->linkToHotel($hotels[$i]->hotel_ID);
     }
     //get controller
     $mainframe->setPageTitle(JTEXT::_("HOTELS IN") . " " . $hotels[0]->city_Name);
     //echo $hotels[0]->images[0]->image_Name;
     //echo $hotels[0]->city_ID."hehehejhe";
     $this->assignRef('hotels', $hotels);
     $this->assignRef('pagination', $pagination);
     $this->assignRef('controller', $controller);
     //echo $this->cutDes("thang nay khung qua di thoi");
     parent::display($tpl);
 }
开发者ID:vCodeTech,项目名称:ivivu,代码行数:33,代码来源:view.html.php


示例18: addToolbar

 /**
  * 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');
 }
开发者ID:akksi,项目名称:jcg,代码行数:33,代码来源:view.html.php


示例19: save

 /**
  * save function
  *
  * @return      nothing
  */
 public function save()
 {
     //$ids	= JRequest::getVar('cid', array(), '', 'array');
     // Get posted form variables.
     $task = $this->getTask();
     $data = JRequest::getVar('jform', array(), 'post', 'array');
     //echo "ECHO:: ".$data['id'];
     //  echo " task:: ".$task;
     $session =& JFactory::getSession();
     $articleid = $session->get('articleid');
     $fieldsattachid = $session->get('fieldsattachid');
     $model = $this->getModel();
     if (!$model->store()) {
         return JError::raiseWarning(500, $model->getError());
     }
     if ($task == "apply") {
         $msg = "";
         $lastid = $data['id'];
         if (empty($lastid)) {
             $lastid = $model->lastid;
         }
         $link = 'index.php?option=com_fieldsattach&view=fieldsattachimage&layout=edit&id=' . $lastid . '&tmpl=component&fieldsattachid=' . $fieldsattachid . '&reload=true';
         $this->setRedirect($link, $msg);
     }
     if ($task == "save") {
         $msg = "";
         //$link= 'index.php?option=com_fieldsattach&view=fieldsattachimages&tmpl=component&articleid='.$articleid.'&fieldsattachid='.$fieldsattachid.'&reset=1'  ;
         $link = 'index.php?option=com_fieldsattach&view=fieldsattachimages&tmpl=component&fieldsattachid=' . $fieldsattachid;
         $this->setRedirect($link, $msg);
     }
 }
开发者ID:adjaika,项目名称:J3Base,代码行数:36,代码来源:fieldsattachimage.php


示例20: onPromoteData

 function onPromoteData($id)
 {
     $db = JFactory::getDBO();
     $Itemid = JRequest::getInt('Itemid');
     $jschk = $this->_chkextension();
     if (!empty($jschk)) {
         $query = "SELECT cf.id FROM #__community_fields as cf\n\t\t\t\t\t\t\t\tLEFT JOIN #__community_fields_values AS cfv ON cfv.field_id=cf.id\n\t\t\t\t\t\t\t\t\tWHERE cf.name like '%About me%' AND cfv.user_id=" . $id;
         $db->setQuery($query);
         $fieldid = $db->loadresult();
         $query = "SELECT u.name AS title, cu.avatar AS image, cfv.value AS bodytext\n\t\t\t\t\t\t\t\t\tFROM #__users AS u\n\t\t\t\t\t\t\t\t\tLEFT JOIN #__community_users AS cu ON u.id=cu.userid\n\t\t\t\t\t\t\t\t\tLEFT JOIN #__community_fields_values AS cfv ON cu.userid=cfv.user_id\n\t\t\t\t\t\t\t\t\tLEFT JOIN #__community_fields AS cf ON cfv.field_id=cf.id\n\t\t\t\t\t\t\t\t\tWHERE cu.userid =" . $id;
         if ($fieldid) {
             $query .= " AND cfv.field_id=" . $fieldid;
         }
         $db->setQuery($query);
         $previewdata = $db->loadObjectlist();
         if (!$fieldid) {
             $previewdata[0]->bodytext = '';
         }
         // Include Jomsocial core
         $jspath = JPATH_ROOT . DS . 'components' . DS . 'com_community';
         include_once $jspath . DS . 'libraries' . DS . 'core.php';
         $previewdata[0]->url = JUri::root() . substr(CRoute::_('index.php?option=com_community&view=profile&userid=' . $id), strlen(JUri::base(true)) + 1);
         if ($previewdata[0]->image == '') {
             $previewdata[0]->image = 'components/com_community/assets/user-Male.png';
         }
         return $previewdata;
     } else {
         return '';
     }
 }
开发者ID:politik86,项目名称:test2,代码行数:30,代码来源:plug_promote_jsprofile.php



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP JResponse类代码示例发布时间:2022-05-23
下一篇:
PHP JRegistryFormat类代码示例发布时间:2022-05-23
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap