本文整理汇总了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();
}