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


PHP JToolBarHelper::assign方法代码示例

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


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

示例1: index

 function index()
 {
     JToolBarHelper::title(JText::_('DT_REGISTRATION_RECORDS'), 'dtregister');
     JToolBarHelper::addNew('group_registration', JText::_('DT_GROUP_REGISTRATION'));
     JToolBarHelper::divider();
     JToolBarHelper::addNew('new', JText::_('DT_INDIVIDUAL_REGISTRATION'));
     JToolBarHelper::divider();
     JToolBarHelper::editList('edit');
     JToolBarHelper::divider();
     JToolBarHelper::deleteList(JText::_("DT_DELETE_USER"), 'delete');
     JToolBarHelper::divider();
     JToolBarHelper::assign('resendthkemail', JText::_('DT_RESEND_THANKS_EMAIL'));
     JToolBarHelper::divider();
     JToolBarHelper::assign('attend', JText::_('DT_ATTENDED'));
     global $mainframe;
     $option = DTR_COM_COMPONENT;
     jimport('joomla.html.pagination');
     $listLimit = $mainframe->getCfg('list_limit', 10);
     $limit = intval($mainframe->getUserStateFromRequest("viewlistlimit", 'limit', $listLimit));
     $limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int');
     $limitstart = intval($mainframe->getUserStateFromRequest("viewuser{$option}limitstart", 'limitstart', 0));
     $search = $mainframe->getUserStateFromRequest('dtreg_user_search.search', 'search', array(), 'array');
     $filter_order = $mainframe->getUserStateFromRequest('dtreg_user_order.filter_order', 'filter_order', 'date');
     $filter_order_Dir = $mainframe->getUserStateFromRequest('dtreg_user_dir.filter_order_Dir', 'filter_order_Dir', 'desc');
     $where = array();
     $mUser = $this->getModel('user');
     $tUser = $mUser->table;
     $fieldSelectQuery = $tUser->TableUserfield->pivotFields();
     $query = "Select SQL_CALC_FOUND_ROWS u.*, f.* ,f.status fee_status , u.status user_status , e.title , d.code , e.dtstart , e.slabId  from #__dtregister_user u \n\n\t           left join #__dtregister_group_event e on u.eventId = e.slabId  \n\n\t\t\t   left join #__dtregister_fee f on f.user_id = u.userId\n\n\t\t\t   left join #__dtregister_codes d on d.id = u.discount_code_id \n\n\t\t\t   ";
     $Andwhere = array();
     if (isset($search['eventId']) && $search['eventId'] != "") {
         $Andwhere[] = "e.slabId=" . $search['eventId'];
     }
     if (isset($search['fee_status']) && $search['fee_status'] != "") {
         if ($search['fee_status'] == 1) {
             $Andwhere[] = "f.status=0 and f.payment_method='authorizenet'";
         } else {
             $Andwhere[] = '((f.payment_method  is null || f.payment_method != "authorizenet") || (f.status=1 and f.payment_method="authorizenet"))';
         }
     }
     if (isset($search['attend']) && $search['attend'] != "" && $search['attend'] != -1) {
         $Andwhere[] = "u.attend=" . $search['attend'];
     }
     if (isset($search['status']) && $search['status'] != "") {
         $Andwhere[] = "u.status=" . $search['status'];
     }
     if (isset($search['event_archive']) && $search['event_archive'] != "" && $search['event_archive'] != -1) {
         $Andwhere[] = "e.archive=" . $search['event_archive'];
     } elseif (!isset($search['event_archive']) || $search['event_archive'] != -1) {
         $Andwhere[] = " e.archive= 0";
     }
     $grpByHaving = "";
     if (isset($search['query']) && $search['query'] != "") {
         if (get_magic_quotes_gpc()) {
             $search['query'] = stripslashes($search['query']);
         }
         $searchQuery = $tUser->_db->getEscaped(trim(strtolower($search['query'])));
         $searchJoinSql = " inner join ( select distinct user_id from #__dtregister_user_field_values where value like '%" . $searchQuery . "%' ) searchable on u.userId = searchable.user_id ";
         $query .= $searchJoinSql;
         $Orwhere = array();
         if (get_magic_quotes_gpc()) {
             $search['query'] = stripslashes($search['query']);
         }
         $grpByHaving = " having ";
         $grpByHaving .= $mUser->searchQuery('u', $searchQuery);
     }
     $mUser->orderBYPivot($query, $filter_order);
     $where = count($Andwhere) > 0 ? " where " . implode(' and ', $Andwhere) : '';
     //$query .= " $where group  by u.userId ".$grpByHaving;
     $query .= " {$where} ";
     $query .= $mUser->orderBy($filter_order, $filter_order_Dir);
     // pr($query);
     $rows = $tUser->query($query, $limitstart, $limit);
     $total = $tUser->getLastCount();
     $pageNav = new JPagination($total, $limitstart, $limit);
     $this->view->assign('rows', $rows);
     $this->view->assign('mUser', $mUser);
     $this->view->assign('pageNav', $pageNav);
     $this->view->assign('search', $search);
     $this->view->setLayout('list');
     $this->view->assign('eventId', isset($search['eventId']) ? $search['eventId'] : '');
     $this->view->display();
 }
开发者ID:reeleis,项目名称:ohiocitycycles,代码行数:83,代码来源:user.php


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