function index() { global $mainframe; DT_Session::clearAll(); $mUser = $this->getModel('user'); $paymentVerified = JRequest::getVar('paymentVerified', ''); $keyword = JRequest::getVar('keyword', ''); $order = JRequest::getVar('filter_order', 'register_date'); $dir = JRequest::getVar('filter_order_Dir', 'desc'); jimport('joomla.html.pagination'); $listLimit = $mainframe->getCfg('list_limit', 10); $limit = JRequest::getInt('limit', $listLimit); $limitstart = JRequest::getVar('limitstart', 0, '', 'int'); $search = array(); $search['user_id'] = $this->user->id; if (isset($paymentVerified) && $paymentVerified != "") { $search['paymentVerified'] = $paymentVerified; } if (isset($keyword) && $keyword != "") { $search['keyword'] = $keyword; } $users = $mUser->getUsers($search, $order, $dir, $limitstart, $limit); $total = $mUser->table->getLastCount(); $pageNav = new JPagination($total, $limitstart, $limit); $this->view->assign('users', $users); $this->view->assign('pageNav', $pageNav); $this->display(); }
function freethanks() { global $mainframe, $thanksmsg, $thanks_redirection, $thanks_redirect_url; if (isset($thanks_redirection) && $thanks_redirection == 0 && isset($thanks_redirect_url)) { DT_Session::clearAll(); $mainframe->redirect($thanks_redirect_url); exit; } $userIndex = DT_Session::get('register.Setting.current.userIndex'); $user = DT_Session::get('register.User.' . $userIndex); $userTable = $this->getModel('user')->table; $TableEvent = $this->getModel('event')->table; $Tagparser = new Tagparser(); $messages = array(); if (DT_Session::get('register.User')) { $userTable->load($user['userId']); $TableEvent->load($user['eventId']); $tokenmessage = $TableEvent->thanksmsg_set ? $TableEvent->thanksmsg : $thanksmsg; $messages[] = stripslashes($Tagparser->parsetags($tokenmessage, $userTable)); } $this->view->setLayout('freethanks'); $this->view->assign('messages', $messages); $this->view->display(); DT_Session::clearAll(); }
function options() { global $mainframe, $Itemid, $xhtml; $eventId = JRequest::getVar('eventId', 0); DT_Session::set('register.Event.eventId', $eventId); if (false === DT_Session::get('register.Event.eventId') || DT_Session::get('register.Event.eventId') == 0) { $mainframe->redirect("index.php?option=com_dtregister&Itemid=" . $Itemid); } if (false === DT_Session::get('register.Setting.cart')) { if (DT_Session::get('register.User') !== false) { $userIndex = count(DT_Session::get('register.User')); $userIndex--; DT_Session::clear('register.User.' . $userIndex); // pr(DT_Session::get('register.User.'.$userIndex)); //pr(DT_Session::get('register.User')); // prd($userIndex); } elseif (DT_Session::get('register.Event.eventId') === false || DT_Session::get('register.Event.eventId') == 0) { DT_Session::clearAll(''); $userIndex = 0; } } else { DT_Session::clear('register.Setting.cart'); } $tEvent = $this->getModel('event')->table; $tEvent->load($eventId); $my =& JFactory::getUser(); $tUser = $this->getModel('user')->table; $tEvent->is_registerable($tUser); if (DT_Session::get('register.User') !== false) { $userIndex = count(DT_Session::get('register.User')); } else { $userIndex = 0; } DT_Session::set('register.Setting.current.userIndex', $userIndex); DT_Session::set('register.User.' . $userIndex . '.eventId', $eventId); $registered = $tEvent->getTotalregistered($tEvent->slabId); if (isset($tEvent->max_registrations) && $tEvent->max_registrations > 0) { if ($tEvent->max_registrations <= $registered) { if ($tEvent->waiting_list) { DT_Session::set('register.User.' . $userIndex . '.status', -2); } } } if ($tEvent->registration_type == "individual") { if (isset($_REQUEST['back'])) { $mainframe->redirect('index.php?option=com_dtregister&Itemid=' . $Itemid); } else { $mainframe->redirect('index.php?option=com_dtregister&Itemid=' . $Itemid . '&eventId=' . $eventId . '&controller=event&task=individualRegister'); } } elseif ($tEvent->registration_type == "group") { $mainframe->redirect('index.php?option=com_dtregister&Itemid=' . $Itemid . '&eventId=' . $eventId . '&controller=event&task=groupNum'); } $this->view->assign('header_eventId', $eventId); $this->view->assign('tEvent', $tEvent); $this->view->setLayout('options'); $this->view->display(); }
function cancel() { global $xhtml_url, $Itemid; $msg = '<h3>' . JText::_('DT_PAYMENT_CANCELLED') . '</h3>'; DT_Session::clearAll(); echo $msg . '<a href="' . JRoute::_('index.php', $xhtml_url) . '">' . JText::_('RETURN_TO_SITE') . '</a>'; }