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


PHP JemHelper::config方法代码示例

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


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

示例1: display

 /**
  * Creates the output for the Venue view
  */
 function display($tpl = null)
 {
     $settings = JemHelper::config();
     $settings2 = JemHelper::globalattribs();
     $app = JFactory::getApplication();
     $jinput = JFactory::getApplication()->input;
     if ($settings2->get('global_show_ical_icon', '0') == 1) {
         // Get data from the model
         $model = $this->getModel();
         $model->setLimit($settings->ical_max_items);
         $model->setLimitstart(0);
         $rows = $model->getItems();
         $venueid = $jinput->getInt('id');
         // initiate new CALENDAR
         $vcal = JemHelper::getCalendarTool();
         // $vcal->setProperty('unique_id', 'category'.$catid.'@'.$mainframe->getCfg('sitename'));
         $vcal->setConfig("filename", "venue" . $venueid . ".ics");
         foreach ($rows as $row) {
             JemHelper::icalAddEvent($vcal, $row, $rows);
         }
         // generate and redirect output to user browser
         $vcal->returnCalendar();
     } else {
         return;
     }
 }
开发者ID:JKoelman,项目名称:JEM-3,代码行数:29,代码来源:view.raw.php

示例2: display

	/**
	 * Creates the output for the Eventslist view
	 */
	function display($tpl = null)
	{
		$settings 	= JemHelper::config();
		$settings2	= JemHelper::globalattribs();

		if ($settings2->get('global_show_ical_icon','0')==1) {
			// Get data from the model
			$model = $this->getModel();
			$model->setLimit($settings->ical_max_items);
			$model->setLimitstart(0);
			$rows = $model->getItems();

			// initiate new CALENDAR
			$vcal = JemHelper::getCalendarTool();
			$vcal->setConfig("filename", "events.ics");

			if (!empty($rows)) {
				foreach ($rows as $row) {
					JemHelper::icalAddEvent($vcal, $row);
				}
			}

			// generate and redirect output to user browser
			$vcal->returnCalendar();
		} else {
			return;
		}
	}
开发者ID:BillVGN,项目名称:PortalPRP,代码行数:31,代码来源:view.raw.php

示例3: populateState

 /**
  * Method to auto-populate the model state.
  *
  * Note. Calling getState in this method will result in recursion.
  */
 protected function populateState($ordering = null, $direction = null)
 {
     $app = JFactory::getApplication();
     $jemsettings = JemHelper::config();
     # it's needed to set the parent option
     parent::populateState('a.dates', 'asc');
 }
开发者ID:JKoelman,项目名称:JEM-3,代码行数:12,代码来源:attendees.php

示例4: display

    /**
     * Creates the Calendar View
     */
    function display($tpl = null)
    {
        $app = JFactory::getApplication();
        //initialize variables
        $menu = $app->getMenu();
        $menuitem = $menu->getActive();
        $jemsettings = JemHelper::config();
        $params = $app->getParams();
        $settings = JemHelper::globalattribs();
        // Load css
        JemHelper::loadCss('calendar');
        JemHelper::loadCss('jem');
        JemHelper::loadCustomCss();
        JemHelper::loadCustomTag();
        $evlinkcolor = $params->get('eventlinkcolor');
        $evbackgroundcolor = $params->get('eventbackgroundcolor');
        $currentdaycolor = $params->get('currentdaycolor');
        $eventandmorecolor = $params->get('eventandmorecolor');
        $style = '
		div[id^=\'catz\'] a {color:' . $evlinkcolor . ';}
		div[id^=\'catz\'] {background-color:' . $evbackgroundcolor . ';}
		.eventcontent {background-color:' . $evbackgroundcolor . ';}
		.eventandmore {background-color:' . $eventandmorecolor . ';}
		.today .daynum {background-color:' . $currentdaycolor . ';}';
        $this->document->addStyleDeclaration($style);
        // add javascript (using full path - see issue #590)
        JHtml::_('script', 'media/com_jem/js/calendar.js');
        $rows = $this->get('Items');
        $currentweek = $this->get('Currentweek');
        $currentyear = Date("Y");
        $showweeknr = $params->get('showweeknr', true);
        //Set Page title
        $pagetitle = $params->def('page_title', $menuitem->title);
        $params->def('page_heading', $pagetitle);
        $pageclass_sfx = $params->get('pageclass_sfx');
        // Add site name to title if param is set
        if ($app->getCfg('sitename_pagetitles', 0) == 1) {
            $pagetitle = JText::sprintf('JPAGETITLE', $app->getCfg('sitename'), $pagetitle);
        } elseif ($app->getCfg('sitename_pagetitles', 0) == 2) {
            $pagetitle = JText::sprintf('JPAGETITLE', $pagetitle, $app->getCfg('sitename'));
        }
        $this->document->setTitle($pagetitle);
        $this->document->setMetaData('title', $pagetitle);
        $cal = new activeCalendarWeek($currentyear, 1, 1);
        $cal->enableWeekNum(JText::_('COM_JEM_WKCAL_WEEK'), null, '', $showweeknr);
        // enables week number column with linkable week numbers
        $cal->setFirstWeekDay($params->get('firstweekday', 0));
        $this->rows = $rows;
        $this->params = $params;
        $this->jemsettings = $jemsettings;
        $this->settings = $settings;
        $this->currentweek = $currentweek;
        $this->cal = $cal;
        $this->pageclass_sfx = htmlspecialchars($pageclass_sfx);
        parent::display($tpl);
    }
开发者ID:JKoelman,项目名称:JEM-3,代码行数:59,代码来源:view.html.php

示例5: display

	public function display($tpl = null)
	{
		// Initialise variables.
		$this->form	 = $this->get('Form');
		$this->item	 = $this->get('Item');
		$this->state = $this->get('State');

		// Check for errors.
		if (count($errors = $this->get('Errors'))) {
			JError::raiseError(500, implode("\n", $errors));
			return false;
		}
		JHtml::_('behavior.framework');
		JHtml::_('behavior.modal', 'a.modal');
		JHtml::_('behavior.tooltip');
		JHtml::_('behavior.formvalidation');

		//initialise variables
		$jemsettings 	= JemHelper::config();
		$document		= JFactory::getDocument();
		$user 			= JemFactory::getUser();
		$this->settings	= JemAdmin::config();
		$task			= JFactory::getApplication()->input->get('task', '');
		$this->task 	= $task;
		$url 			= JUri::root();

		$categories 	= JemCategories::getCategoriesTree(1);
		$selectedcats 	= $this->get('Catsselected');

		$Lists = array();
		$Lists['category'] = JemCategories::buildcatselect($categories, 'cid[]', $selectedcats, 0, 'multiple="multiple" size="8"');

		// Load css
		JHtml::_('stylesheet', 'com_jem/backend.css', array(), true);

		// Load scripts
		JHtml::_('script', 'com_jem/attachments.js', false, true);
		JHtml::_('script', 'com_jem/recurrence.js', false, true);
		JHtml::_('script', 'com_jem/unlimited.js', false, true);
		JHtml::_('script', 'com_jem/seo.js', false, true);

		// JQuery noConflict
		//$document->addCustomTag('<script type="text/javascript">jQuery.noConflict();</script>');
		//$document->addScript('http://ajax.googleapis.com/ajax/libs/jquery/1.10.2/jquery.min.js');
		//$document->addScript('http://ajax.googleapis.com/ajax/libs/jqueryui/1.10.3/jquery-ui.min.js');

		$access2 			= JemHelper::getAccesslevelOptions();
		$this->access		= $access2;
		$this->jemsettings	= $jemsettings;
		$this->Lists 		= $Lists;

		$this->addToolbar();
		parent::display($tpl);
	}
开发者ID:BillVGN,项目名称:PortalPRP,代码行数:54,代码来源:view.html.php

示例6: populateState

	/**
	 * Method to auto-populate the model state.
	 */
	protected function populateState($ordering = null, $direction = null)
	{
		# parent::populateState($ordering, $direction);
		$app 			= JFactory::getApplication();
		$jemsettings	= JemHelper::config();
		$jinput			= JFactory::getApplication()->input;
		$itemid 		= $jinput->getInt('id', 0) . ':' . $jinput->getInt('Itemid', 0);
		$params 		= $app->getParams();
		$task           = $jinput->get('task','','cmd');
		$top_category 	= $params->get('top_category', 0);
		$startdayonly 	= $params->get('show_only_start', false);

		# params
		$this->setState('params', $params);

		# publish state
		$this->_populatePublishState($task);

		###########
		## DATES ##
		###########

		#only select events within specified dates. (chosen month)
		$monthstart	= mktime(0, 0, 1, strftime('%m', $this->_date), 1, strftime('%Y', $this->_date));
		$monthend	= mktime(0, 0, -1, strftime('%m', $this->_date)+1, 1, strftime('%Y', $this->_date));

		$filter_date_from	= $this->_db->Quote(strftime('%Y-%m-%d', $monthstart));
		$filter_date_to		= $this->_db->Quote(strftime('%Y-%m-%d', $monthend));

		$where = ' DATEDIFF(IF (a.enddates IS NOT NULL, a.enddates, a.dates), '. $filter_date_from .') >= 0';
		$this->setState('filter.calendar_from',$where);

		$where = ' DATEDIFF(a.dates, '. $filter_date_to .') <= 0';
		$this->setState('filter.calendar_to',$where);

		##################
		## TOP-CATEGORY ##
		##################

		if ($top_category) {
			$children = JEMCategories::getChilds($top_category);
			if (count($children)) {
				$where = 'rel.catid IN ('. implode(',', $children) .')';
				$this->setState('filter.category_top', $where);
			}
		}

		# set filter
		$this->setState('filter.calendar_multiday',true);
		$this->setState('filter.calendar_startdayonly',(bool)$startdayonly);
		$this->setState('filter.groupby',array('a.id'));
	}
开发者ID:BillVGN,项目名称:PortalPRP,代码行数:55,代码来源:calendar.php

示例7: populateState

 /**
  * Method to auto-populate the model state.
  */
 protected function populateState($ordering = null, $direction = null)
 {
     // parent::populateState($ordering, $direction);
     $app = JFactory::getApplication();
     $jemsettings = JemHelper::config();
     $jinput = JFactory::getApplication()->input;
     $itemid = $jinput->getInt('id', 0) . ':' . $jinput->getInt('Itemid', 0);
     $params = $app->getParams();
     $task = $jinput->get('task', '', 'cmd');
     // List state information
     /* in J! 3.3.6 limitstart is removed from request - but we need it! */
     if ($app->input->getInt('limitstart', null) === null) {
         $app->setUserState('com_jem.venue.' . $itemid . '.limitstart', 0);
     }
     $limit = $app->getUserStateFromRequest('com_jem.venue.' . $itemid . '.limit', 'limit', $jemsettings->display_num, 'int');
     $this->setState('list.limit', $limit);
     $limitstart = $app->getUserStateFromRequest('com_jem.venue.' . $itemid . '.limitstart', 'limitstart', 0, 'int');
     // correct start value if required
     $limitstart = $limit ? (int) (floor($limitstart / $limit) * $limit) : 0;
     $this->setState('list.start', $limitstart);
     # Search
     $search = $app->getUserStateFromRequest('com_jem.venue.' . $itemid . '.filter_search', 'filter_search', '', 'string');
     $this->setState('filter.filter_search', $search);
     # FilterType
     $filtertype = $app->getUserStateFromRequest('com_jem.venue.' . $itemid . '.filter_type', 'filter_type', '', 'int');
     $this->setState('filter.filter_type', $filtertype);
     # filter_order
     $orderCol = $app->getUserStateFromRequest('com_jem.venue.' . $itemid . '.filter_order', 'filter_order', 'a.dates', 'cmd');
     $this->setState('filter.filter_ordering', $orderCol);
     # filter_direction
     // Changed order from ASC to DESC for showing all events
     $listOrder = $app->getUserStateFromRequest('com_jem.venue.' . $itemid . '.filter_order_Dir', 'filter_order_Dir', 'DESC', 'word');
     $this->setState('filter.filter_direction', $listOrder);
     # show open date events
     # (there is no menu item option yet so show all events)
     $this->setState('filter.opendates', 1);
     if ($orderCol == 'a.dates') {
         $orderby = array('a.dates ' . $listOrder, 'a.times ' . $listOrder);
     } else {
         $orderby = $orderCol . ' ' . $listOrder;
     }
     $this->setState('filter.orderby', $orderby);
     # params
     $this->setState('params', $params);
     // Commented out to show all events
     // if ($task == 'archive') {
     // 	$this->setState('filter.published',2);
     // } else {
     // 	$this->setState('filter.published',1);
     // }
     $this->setState('filter.groupby', array('a.id'));
 }
开发者ID:abradbury,项目名称:Orienteering-Website,代码行数:55,代码来源:venue.php

示例8: populateState

 /**
  * Method to auto-populate the model state.
  */
 protected function populateState($ordering = null, $direction = null)
 {
     # parent::populateState($ordering, $direction);
     $app = JFactory::getApplication();
     $jemsettings = JemHelper::config();
     $jinput = JFactory::getApplication()->input;
     $itemid = $jinput->getInt('id', 0) . ':' . $jinput->getInt('Itemid', 0);
     $params = $app->getParams();
     $task = $jinput->getCmd('task');
     # params
     $this->setState('params', $params);
     # publish state
     $this->setState('filter.published', 1);
     # access
     $this->setState('filter.access', true);
     ###########
     ## DATES ##
     ###########
     #only select events within specified dates. (chosen month)
     $monthstart = mktime(0, 0, 1, strftime('%m', $this->_date), 1, strftime('%Y', $this->_date));
     $monthend = mktime(0, 0, -1, strftime('%m', $this->_date) + 1, 1, strftime('%Y', $this->_date));
     $filter_date_from = $this->_db->Quote(strftime('%Y-%m-%d', $monthstart));
     $filter_date_to = $this->_db->Quote(strftime('%Y-%m-%d', $monthend));
     $where = ' DATEDIFF(IF (a.enddates IS NOT NULL, a.enddates, a.dates), ' . $filter_date_from . ') >= 0';
     $this->setState('filter.calendar_from', $where);
     $where = ' DATEDIFF(a.dates, ' . $filter_date_to . ') <= 0';
     $this->setState('filter.calendar_to', $where);
     #####################
     ## FILTER-CATEGORY ##
     #####################
     $catids = $params->get('catids');
     $venids = $params->get('venueids');
     $eventids = $params->get('eventids');
     $catidsfilter = $params->get('catidsfilter');
     $venidsfilter = $params->get('venueidsfilter');
     $eventidsfilter = $params->get('eventidsfilter');
     if ($catids) {
         $this->setState('filter.category_id', $catids);
         $this->setState('filter.category_id.include', $catidsfilter);
     }
     if ($venids) {
         $this->setState('filter.venue_id', $venids);
         $this->setState('filter.venue_id.include', $venidsfilter);
     }
     if ($eventids) {
         $this->setState('filter.event_id', $eventids);
         $this->setState('filter.event_id.include', $eventidsfilter);
     }
     # set filter
     $this->setState('filter.calendar_multiday', true);
     $this->setState('filter.groupby', array('a.id'));
 }
开发者ID:JKoelman,项目名称:JEM-3,代码行数:55,代码来源:calendar.php

示例9: __construct

 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
     $app = JFactory::getApplication();
     $jinput = $app->input;
     $jemsettings = JemHelper::config();
     $itemid = $jinput->getInt('id', 0) . ':' . $jinput->getInt('Itemid', 0);
     $limit = $app->getUserStateFromRequest('com_jem.categoryelement.limit', 'limit', $jemsettings->display_num, 'int');
     $limitstart = $jinput->getInt('limitstart');
     $limitstart = $limit ? (int) (floor($limitstart / $limit) * $limit) : 0;
     $this->setState('limit', $limit);
     $this->setState('limitstart', $limitstart);
 }
开发者ID:JKoelman,项目名称:JEM-3,代码行数:16,代码来源:categoryelement.php

示例10: populateState

	/**
	 * Method to auto-populate the model state.
	 */
	protected function populateState($ordering = null, $direction = null)
	{
		$app          = JFactory::getApplication();
		$jemsettings  = JemHelper::config();
		$params       = $app->getParams();
		$jinput       = $app->input;
		$itemid       = $jinput->getInt('Itemid', 0);
		$task         = $jinput->getCmd('task', '');
		$startdayonly = $params->get('show_only_start', false);

		# params
		$this->setState('params', $params);

		# publish state
		//$this->setState('filter.published', 1);
		$this->_populatePublishState($task);


		###########
		## DATES ##
		###########

		#only select events within specified dates. (chosen month)
		$monthstart	= mktime(0, 0,  1, strftime('%m', $this->_date),   1, strftime('%Y', $this->_date));
		$monthend	= mktime(0, 0, -1, strftime('%m', $this->_date)+1, 1, strftime('%Y', $this->_date));

		$filter_date_from = strftime('%Y-%m-%d', $monthstart);
		$filter_date_to   = strftime('%Y-%m-%d', $monthend);

		$where = ' DATEDIFF(IF (a.enddates IS NOT NULL, a.enddates, a.dates), '. $this->_db->Quote($filter_date_from) .') >= 0';
		$this->setState('filter.calendar_from', $where);

		$where = ' DATEDIFF(a.dates, '. $this->_db->Quote($filter_date_to) .') <= 0';
		$this->setState('filter.calendar_to', $where);

		# set filter
		$this->setState('filter.calendar_multiday', true);
		$this->setState('filter.calendar_startdayonly', (bool)$startdayonly);
		$this->setState('filter.filter_catid', $this->_id);

		$app->setUserState('com_jem.categorycal.catid'.$itemid, $this->_id);

		# groupby
		$this->setState('filter.groupby', array('a.id'));
	}
开发者ID:BillVGN,项目名称:PortalPRP,代码行数:48,代码来源:categorycal.php

示例11: allowAdd

 /**
  * Method override to check if you can add a new record.
  *
  * @param	array	An array of input data.
  *
  * @return	boolean
  */
 protected function allowAdd($data = array())
 {
     // Initialise variables.
     $user = JFactory::getUser();
     $jinput = JFactory::getApplication()->input;
     //$categoryId	= JArrayHelper::getValue($data, 'catid', $jinput->getInt('catid'), 'int');
     $allow = null;
     //if ($categoryId) {
     //	// If the category has been passed in the data or URL check it.
     //	$allow	= $user->authorise('core.create', 'com_jem.category.'.$categoryId);
     //}
     $jemsettings = JemHelper::config();
     $maintainer = JEMUser::venuegroups('add');
     $delloclink = JEMUser::validate_user($jemsettings->locdelrec, $jemsettings->deliverlocsyes);
     if ($maintainer || $delloclink) {
         return true;
     }
     if ($allow === null) {
         // In the absense of better information, revert to the component permissions.
         return parent::allowAdd();
     } else {
         return $allow;
     }
 }
开发者ID:JKoelman,项目名称:JEM-3,代码行数:31,代码来源:editvenue.php

示例12: display

 public function display($tpl = null)
 {
     // Initialise variables.
     $this->form = $this->get('Form');
     $this->item = $this->get('Item');
     $this->state = $this->get('State');
     // Check for errors.
     if (count($errors = $this->get('Errors'))) {
         JError::raiseError(500, implode("\n", $errors));
         return false;
     }
     //initialise variables
     $jemsettings = JemHelper::config();
     $document = JFactory::getDocument();
     $user = JFactory::getUser();
     $this->settings = JemAdmin::config();
     $task = JFactory::getApplication()->input->get('task');
     $this->task = $task;
     $url = JUri::root();
     $categories = JemCategories::getCategoriesTree(1);
     $selectedcats = $this->get('Catsselected');
     $Lists = array();
     $Lists['category'] = JemCategories::buildcatselect($categories, 'cid[]', $selectedcats, 0, 'multiple="multiple" size="8"');
     // Load css
     JHtml::_('stylesheet', 'com_jem/backend.css', array(), true);
     // Load scripts
     JHtml::_('script', 'com_jem/attachments.js', false, true);
     JHtml::_('script', 'com_jem/recurrence.js', false, true);
     JHtml::_('script', 'com_jem/seo.js', false, true);
     JHtml::_('script', 'com_jem/slider-state.js', false, true);
     $this->access = JemHelper::getAccesslevelOptions();
     $this->jemsettings = $jemsettings;
     $this->Lists = $Lists;
     $this->addToolbar();
     parent::display($tpl);
 }
开发者ID:JKoelman,项目名称:JEM-3,代码行数:36,代码来源:view.html.php

示例13: populateState

 protected function populateState($ordering = null, $direction = null)
 {
     $app = JFactory::getApplication();
     $jemsettings = JemHelper::config();
     $jinput = JFactory::getApplication()->input;
     $itemid = $jinput->getInt('id', 0) . ':' . $jinput->getInt('Itemid', 0);
     # limit/start
     $limit = $app->getUserStateFromRequest('com_jem.myattendances.' . $itemid . '.limit', 'limit', $jemsettings->display_num, 'uint');
     $this->setState('list.limit', $limit);
     $limitstart = $app->input->get('limitstart', 0, 'uint');
     $this->setState('list.start', $limitstart);
     # Search
     $search = $app->getUserStateFromRequest('com_jem.myattendances.' . $itemid . '.filter_search', 'filter_search', '', 'string');
     $this->setState('filter.filter_search', $search);
     # FilterType
     $filtertype = $app->getUserStateFromRequest('com_jem.myattendances.' . $itemid . '.filter_type', 'filter_type', '', 'int');
     $this->setState('filter.filter_type', $filtertype);
     ###########
     ## ORDER ##
     ###########
     $filter_order = $app->getUserStateFromRequest('com_jem.myattendances.' . $itemid . '.filter_order', 'filter_order', 'a.dates', 'cmd');
     $filter_order_Dir = $app->getUserStateFromRequest('com_jem.myattendances.' . $itemid . '.filter_order_Dir', 'filter_order_Dir', 'ASC', 'string');
     $filter_order = JFilterInput::getInstance()->clean($filter_order, 'string');
     $filter_order_Dir = JFilterInput::getInstance()->clean($filter_order_Dir, 'string');
     if ($filter_order == 'a.dates') {
         $orderby = array('a.dates ' . $filter_order_Dir, 'a.times ' . $filter_order_Dir);
     } else {
         $orderby = $filter_order . ' ' . $filter_order_Dir;
     }
     $this->setState('filter.orderby', $orderby);
     # params
     $params = $app->getParams();
     $this->setState('params', $params);
     # groupby
     $this->setState('filter.groupby', array('a.id'));
 }
开发者ID:JKoelman,项目名称:JEM-3,代码行数:36,代码来源:myattendances.php

示例14: buildQueryContacts

 /**
  * contacts-query
  */
 function buildQueryContacts()
 {
     $app = JFactory::getApplication();
     $jemsettings = JemHelper::config();
     $filter_order = $app->getUserStateFromRequest('com_jem.selectcontact.filter_order', 'filter_order', 'con.ordering', 'cmd');
     $filter_order_Dir = $app->getUserStateFromRequest('com_jem.selectcontact.filter_order_Dir', 'filter_order_Dir', '', 'word');
     $filter_order = JFilterInput::getinstance()->clean($filter_order, 'cmd');
     $filter_order_Dir = JFilterInput::getinstance()->clean($filter_order_Dir, 'word');
     $filter_type = $app->getUserStateFromRequest('com_jem.selectcontact.filter_type', 'filter_type', '', 'int');
     $search = $app->getUserStateFromRequest('com_jem.selectcontact.filter_search', 'filter_search', '', 'string');
     $search = $this->_db->escape(trim(JString::strtolower($search)));
     // Query
     $db = JFactory::getDBO();
     $query = $db->getQuery(true);
     $query->select(array('con.*'));
     $query->from('#__contact_details As con');
     // where
     $where = array();
     $where[] = 'con.published = 1';
     /* something to search for? (we like to search for "0" too) */
     if ($search || $search === "0") {
         switch ($filter_type) {
             case 1:
                 /* Search name */
                 $where[] = ' LOWER(con.name) LIKE \'%' . $search . '%\' ';
                 break;
             case 2:
                 /* Search address (not supported yet, privacy) */
                 //$where[] = ' LOWER(con.address) LIKE \'%' . $search . '%\' ';
                 break;
             case 3:
                 // Search city
                 $where[] = ' LOWER(con.suburb) LIKE \'%' . $search . '%\' ';
                 break;
             case 4:
                 // Search state
                 $where[] = ' LOWER(con.state) LIKE \'%' . $search . '%\' ';
                 break;
         }
     }
     $query->where($where);
     // ordering
     // ensure it's a valid order direction (asc, desc or empty)
     if (!empty($filter_order_Dir) && strtoupper($filter_order_Dir) !== 'DESC') {
         $filter_order_Dir = 'ASC';
     }
     if ($filter_order != '') {
         $orderby = $filter_order . ' ' . $filter_order_Dir;
         if ($filter_order != 'con.name') {
             $orderby = array($orderby, 'con.name');
             // in case of city or state we should have a useful second ordering
         }
     } else {
         $orderby = 'con.name';
     }
     $query->order($orderby);
     return $query;
 }
开发者ID:abradbury,项目名称:Orienteering-Website,代码行数:61,代码来源:editevent.php

示例15: foreach

		</h1>
	<?php endif; ?>

	<div class="clr"></div>

	<?php foreach ($this->rows as $row) : ?>
		<h2 class="jem cat<?php echo $row->id; ?>">
			<?php echo JHtml::_('link', JRoute::_($row->linktarget), $this->escape($row->catname)); ?>
		</h2>

		<div class="floattext">
			<?php if ($this->jemsettings->discatheader) { ?>
				<div class="catimg">
					<?php // flyer
						if (empty($row->image)) {
							$jemsettings = JemHelper::config();
							$imgattribs['width'] = $jemsettings->imagewidth;
							$imgattribs['height'] = $jemsettings->imagehight;

							echo JHtml::_('image', 'com_jem/noimage.png', $row->catname, $imgattribs, true);
						} else {
							$cimage = JemImage::flyercreator($row->image, 'category');
							echo JemOutput::flyer($row, $cimage, 'category');
						}
					?>
				</div>
			<?php } ?>
			<div class="description cat<?php echo $row->id; ?>">
				<?php echo $row->description; ?>
				<p>
					<?php echo JHtml::_('link', JRoute::_($row->linktarget), $row->linktext); ?>
开发者ID:BillVGN,项目名称:PortalPRP,代码行数:31,代码来源:default.php


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