function __construct() { parent::__construct(); $this->s_id = JRequest::getVar('sid', 0, '', 'int'); $this->title = JFactory::getDocument()->title; $this->limit = JRequest::getVar('jslimit', 20, '', 'int'); $this->limitstart = JRequest::getVar('page', 1, '', 'int'); $this->limitstart = intval($this->limitstart) > 1 ? $this->limitstart : 1; $this->tid = $this->mainframe->getUserStateFromRequest('com_joomsport.ftid' . $this->s_id, 'ftid', 0, 'int'); $this->mid = $this->mainframe->getUserStateFromRequest('com_joomsport.fmid' . $this->s_id, 'fmid', 0, 'int'); $this->teamhm = $this->mainframe->getUserStateFromRequest('com_joomsport.fteamhm' . $this->s_id, 'fteamhm', 0, '', 'int'); $this->fromdate = $this->mainframe->getUserStateFromRequest('com_joomsport.ffromdate' . $this->s_id, 'ffromdate', '', 'string'); $this->todate = $this->mainframe->getUserStateFromRequest('com_joomsport.ftodate' . $this->s_id, 'ftodate', '', 'string'); /*if(!$this->s_id){ JError::raiseError( 403, JText::_('Access Forbidden') ); return; }*/ $query = "SELECT COUNT(*) FROM #__bl_seasons as s, #__bl_tournament as t WHERE t.published='1' AND s.published='1' AND t.id = s.t_id AND s.s_id = " . $this->s_id; $this->db->setQuery($query); if (!$this->s_id || !$this->db->loadResult()) { JError::raiseError(403, JText::_('Access Forbidden')); return; } //get tiurnament type $tourn = $this->getTournOpt($this->s_id); $this->t_single = $tourn->t_single; $this->t_type = 0; //$tourn->t_type; $this->_lists["t_type"] = $this->t_type; $this->getPagination(); }
function __construct() { parent::__construct(); $Itemid = JRequest::getInt('Itemid'); $this->title = JFactory::getDocument()->getTitle(); $this->s_id = $this->mainframe->getUserStateFromRequest('com_joomsport.sidsel' . $Itemid, 'sidsel', -1, 'int'); //print_r($sidsel); //if($this->s_id){ $this->mainframe->setUserState('com_joomsport.sidsel' . $Itemid, -1); //} //echo $this->s_id; if ($this->s_id == '-1') { $this->s_id = JRequest::getVar('sid', 0, '', 'int'); } // Get the pagination request variables $this->limit = $this->mainframe->getUserStateFromRequest('com_joomsport.pl_jslimit', 'jslimit', 20, 'int'); $this->limitstart = JRequest::getVar('page', 1, '', 'int'); $this->limitstart = intval($this->limitstart) > 1 ? $this->limitstart : 1; $this->sortfield = $this->mainframe->getUserStateFromRequest('com_joomsport.sortfield', 'sortfield', 'name', 'string'); $this->sortdest = $this->mainframe->getUserStateFromRequest('com_joomsport.sortdest', 'sortdest', 0, 'string'); //get tournament type if ($this->s_id) { $tourn = $this->getTournOpt($this->s_id); $this->t_single = $tourn->t_single; $this->t_type = 0; } $this->getPagination(); }
function __construct() { parent::__construct(); $mainframe = JFactory::getApplication(); // Get the pagination request variables $this->season_id = $mainframe->getUserStateFromRequest('com_joomsport.sid', 'sid', 0, 'int'); $this->limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int'); $this->limitstart = $mainframe->getUserStateFromRequest('com_joomsport.limitstart_pl' . $this->season_id, 'limitstart', 0, 'int'); // In case limit has been changed, adjust limitstart accordingly $this->limitstart = $this->limit != 0 ? floor($this->limitstart / $this->limit) * $this->limit : 0; $user = JFactory::getUser(); if ($user->get('guest')) { $return_url = $_SERVER['REQUEST_URI']; $return_url = base64_encode($return_url); if (getVer() >= '1.6') { $uopt = "com_users"; } else { $uopt = "com_user"; } $return = 'index.php?option=' . $uopt . '&view=login&return=' . $return_url; $this->mainframe->redirect($return, JText::_('BLMESS_NOT_LOGIN')); } if (!$this->season_id) { JError::raiseError(403, JText::_('Access Forbidden')); return; } }
function __construct() { parent::__construct(); $mainframe = JFactory::getApplication(); $this->title = JFactory::getDocument()->getTitle(); $this->id = JRequest::getVar('id', 0, '', 'int'); $query = "SELECT COUNT(*) FROM #__bl_tournament as t WHERE t.published='1' AND t.id = " . $this->id; $this->db->setQuery($query); if (!$this->id || !$this->db->loadResult()) { JError::raiseError(403, JText::_('Access Forbidden')); return; } // Get the pagination request variables //$this->limit = $mainframe->getUserStateFromRequest( 'global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int' ); //$this->limitstart = $mainframe->getUserStateFromRequest( 'com_joomsport.limitstart', 'limitstart', 0, 'int' ); //$this->limitstart = JRequest::getVar( 'limitstart', 0,'', 'int' ); // In case limit has been changed, adjust limitstart accordingly //$this->limitstart = ($this->limit != 0 ? (floor($this->limitstart / $this->limit) * $this->limit) : 0); $this->limit = JRequest::getVar('jslimit', 20, '', 'int'); $this->limitstart = JRequest::getVar('page', 1, '', 'int'); $this->limitstart = intval($this->limitstart) > 1 ? $this->limitstart : 1; $this->getPagination(); $this->getData(); $this->getTournInfo(); //$this->_params = $this->JS_PageTitle($this->_tinfo->name); $this->p_title = $this->_tinfo->name; $this->_params = $this->JS_PageTitle($this->title ? $this->title : $this->p_title); $this->_lists["teams_season"] = $this->teamsToModer(); $this->_lists["panel"] = $this->getePanel($this->_lists["teams_season"], 0, null, 0); }
function __construct() { parent::__construct(); $this->team_id = JRequest::getVar('tid', 0, '', 'int'); $this->s_id = JRequest::getVar('sid', 0, '', 'int'); $this->limit = JRequest::getVar('jslimit', 20, '', 'int'); $this->limitstart = JRequest::getVar('page', 1, '', 'int'); $this->limitstart = intval($this->limitstart) > 1 ? $this->limitstart : 1; $this->limit2 = JRequest::getVar('jslimit2', 20, '', 'int'); $this->limitstart2 = JRequest::getVar('page2', 1, '', 'int'); $this->limitstart2 = intval($this->limitstart2) > 1 ? $this->limitstart2 : 1; $this->_lists['jscurtab'] = JRequest::getVar('jscurtab', 'etab_team', '', 'string'); $this->sortfield = $this->mainframe->getUserStateFromRequest('com_joomsport.sortfield', 'sortfield', '', 'string'); $this->sortdest = $this->mainframe->getUserStateFromRequest('com_joomsport.sortdest', 'sortdest', 0, 'string'); $this->_lists['s_id'] = $this->s_id; //print_r($this->s_id); if (isset($_REQUEST['limitstart'])) { if ($_REQUEST['limitstart'] != 0) { $this->_lists['jscurtab'] = 'etab_match'; } } $query = "SELECT t_name FROM #__bl_teams WHERE id = " . $this->team_id; $this->db->setQuery($query); $team_id = $this->db->loadResult(); if (!$team_id) { JError::raiseError(403, JText::_('Access Forbidden')); return; } }
function __construct() { parent::__construct(); $this->_user = JFactory::getUser(); $this->_enmd = 0; $this->session = JFactory::getSession(); $this->title = JFactory::getDocument()->getTitle(); }
function __construct() { parent::__construct(); $this->_user = JFactory::getUser(); $this->title = JFactory::getDocument()->getTitle(); $this->_enmd = 0; $this->sid = $this->mainframe->getUserStateFromRequest('com_joomsport.sid', 'sid', 0, 'int'); }
function __construct() { parent::__construct(); $mainframe = JFactory::getApplication(); $this->limit = $mainframe->getUserStateFromRequest('com_joomsport.tm_jslimit', 'jslimit', 20, 'int'); $this->limitstart = JRequest::getVar('page', 1, '', 'int'); $this->limitstart = intval($this->limitstart) > 1 ? $this->limitstart : 1; $this->season_id = $mainframe->getUserStateFromRequest('com_joomsport.sid', 'sid', 0, 'int'); }
function __construct() { parent::__construct(); $this->s_id = JRequest::getVar('sid', 0, '', 'int'); $this->_user = JFactory::getUser(); if (!$this->s_id) { JError::raiseError(403, JText::_('Access Forbidden')); return; } }
function __construct() { parent::__construct(); $mainframe = JFactory::getApplication(); // Get the pagination request variables $this->limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int'); $this->limitstart = $mainframe->getUserStateFromRequest('com_joomsport.limitstart_venues', 'limitstart', 0, 'int'); // In case limit has been changed, adjust limitstart accordingly $this->limitstart = $this->limit != 0 ? floor($this->limitstart / $this->limit) * $this->limit : 0; $this->getPagination(); $this->getData(); }
function __construct() { parent::__construct(); $this->club_id = JRequest::getVar('id', 0, '', 'int'); $this->title = JFactory::getDocument()->getTitle(); $query = "SELECT c_name FROM #__bl_club WHERE id = " . $this->club_id; $this->db->setQuery($query); $club_id = $this->db->loadResult(); if (!$club_id) { JError::raiseError(403, JText::_('Access Forbidden')); return; } }
function __construct() { parent::__construct(); $this->gr_id = JRequest::getVar('gr_id', 0, '', 'int'); $this->s_id = JRequest::getVar('sid', 0, '', 'int'); $this->_lists["table_n"] = JRequest::getVar('tab_n', '', '', 'string'); //print_r($this->_lists["table_n"]); $this->title = JFactory::getDocument()->getTitle(); $query = "SELECT COUNT(*) FROM #__bl_seasons as s, #__bl_tournament as t WHERE t.published='1' AND s.published='1' AND t.id = s.t_id AND s.s_id = " . $this->s_id; $this->db->setQuery($query); if (!$this->s_id || !$this->db->loadResult()) { JError::raiseError(403, JText::_('Access Forbidden')); return; } }
function __construct() { parent::__construct(); $mainframe = JFactory::getApplication(); $this->title = JFactory::getDocument()->getTitle(); $this->limit = JRequest::getVar('jslimit', 20, '', 'int'); $this->limitstart = JRequest::getVar('page', 1, '', 'int'); $this->limitstart = intval($this->limitstart) > 1 ? $this->limitstart : 1; $this->getPagination(); $this->getData(); $this->p_title = JText::_('BLFA_CLUBLIST'); $this->_params = $this->JS_PageTitle($this->title ? $this->title : $this->p_title); $this->_lists["teams_season"] = $this->teamsToModer(); $this->_lists["panel"] = $this->getePanel($this->_lists["teams_season"], 0, null, 0); }
function __construct() { parent::__construct(); $this->m_id = JRequest::getVar('id', 0, '', 'int'); $this->title = JFactory::getDocument()->getTitle(); $query = "SELECT COUNT(*) FROM #__bl_seasons as s, #__bl_tournament as t, #__bl_matchday as md, #__bl_match as m WHERE t.published='1' AND s.published='1' AND t.id = s.t_id AND s.s_id = md.s_id AND md.id=m.m_id AND m.id = '" . $this->m_id . "'"; $this->db->setQuery($query); if (!$this->db->loadResult()) { $query = "SELECT COUNT(*) FROM #__bl_matchday as md, #__bl_match as m WHERE md.s_id = '-1' AND md.id=m.m_id AND m.id = '" . $this->m_id . "'"; $this->db->setQuery($query); } if (!$this->m_id or !$this->db->loadResult()) { JError::raiseError(403, JText::_('Access Forbidden')); return; } }
function __construct() { parent::__construct(); $mainframe = JFactory::getApplication(); // Get the pagination request variables $this->limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int'); $this->limitstart = 0; if (!$mainframe->input->getInt('is_search')) { $this->limitstart = $mainframe->getUserStateFromRequest('com_joomsport.limitstart_players', 'limitstart', 0, 'int'); } $f_team = $this->mainframe->getUserStateFromRequest('com_joomsport.filter_team', 'f_team', 0, 'int'); // In case limit has been changed, adjust limitstart accordingly $this->limitstart = $this->limit != 0 ? floor($this->limitstart / $this->limit) * $this->limit : 0; $this->getPagination($f_team); $this->getData($f_team); $this->getPTeamList($f_team); }
function __construct() { parent::__construct(); $this->s_id = $this->mainframe->getUserStateFromRequest('com_joomsport.sidselt', 'sidselt', -1, 'int'); $this->title = JFactory::getDocument()->getTitle(); //if($this->s_id){ $this->mainframe->setUserState('com_joomsport.sidselt', -1); //} if ($this->s_id == '-1') { $this->s_id = JRequest::getVar('sid', 0, '', 'int'); } // Get the pagination request variables $this->limit = $this->mainframe->getUserStateFromRequest('com_joomsport.tl_jslimit', 'jslimit', 20, 'int'); $this->limitstart = JRequest::getVar('page', 1, '', 'int'); $this->limitstart = intval($this->limitstart) > 1 ? $this->limitstart : 1; $this->getPagination(); $this->getData(); }
function __construct($acl) { parent::__construct(); $this->acl = $acl; $this->_lists['jscurtab'] = JRequest::getVar('jscurtab', 'etab_team', '', 'string'); if ($this->acl == 1) { $cid = JRequest::getVar('cid', array(0), '', 'array'); JArrayHelper::toInteger($cid, array(0)); if ($cid[0]) { $is_id = $cid[0]; $this->id = $is_id; } $s_id = JRequest::getVar('sid', 0, '', 'int'); $this->season_id = $s_id; } else { $this->id = JRequest::getVar('tid', 0, '', 'int'); } }
function __construct($acl) { $this->acl = $acl; parent::__construct(); if ($this->acl == 1) { $this->season_id = $this->mainframe->getUserStateFromRequest('com_joomsport.sid', 'sid', 0, 'int'); } elseif ($this->acl == 2) { $this->season_id = $this->mainframe->getUserStateFromRequest('com_joomsport.moderseason', 'moderseason', 0, 'int'); } elseif ($this->acl == 3) { $this->_user = JFactory::getUser(); if ($this->_user->get('guest')) { $return_url = $_SERVER['REQUEST_URI']; $return_url = base64_encode($return_url); if (getVer() >= '1.6') { $uopt = "com_users"; } else { $uopt = "com_user"; } $return = 'index.php?option=' . $uopt . '&view=login&return=' . $return_url; // Redirect to a login form $this->mainframe->redirect($return, JText::_('BLFA_MSGLOGIN')); } $cid = JRequest::getVar('cid', array(0), '', 'array'); JArrayHelper::toInteger($cid, array(0)); if ($cid[0]) { $this->id = $cid[0]; } else { JError::raiseError(403, JText::_('Access Forbidden')); return; } } if ($this->acl != 1) { $this->_lists['jsmr_mark_played'] = $this->getJS_Config('jsmr_mark_played'); $this->_lists['jsmr_editresult_yours'] = $this->getJS_Config('jsmr_editresult_yours'); $this->_lists['jsmr_editresult_opposite'] = $this->getJS_Config('jsmr_editresult_opposite'); $this->_lists['jsmr_edit_playerevent_yours'] = $this->getJS_Config('jsmr_edit_playerevent_yours'); $this->_lists['jsmr_edit_playerevent_opposite'] = $this->getJS_Config('jsmr_edit_playerevent_opposite'); $this->_lists['jsmr_edit_matchevent_yours'] = $this->getJS_Config('jsmr_edit_matchevent_yours'); $this->_lists['jsmr_edit_matchevent_opposite'] = $this->getJS_Config('jsmr_edit_matchevent_opposite'); $this->_lists['jsmr_edit_squad_yours'] = $this->getJS_Config('jsmr_edit_squad_yours'); $this->_lists['jsmr_edit_squad_opposite'] = $this->getJS_Config('jsmr_edit_squad_opposite'); } }
function __construct() { parent::__construct(); JHtml::_('behavior.framework'); $mainframe = JFactory::getApplication(); $this->seas_id = JRequest::getVar('seas_id', null, 'get', 'int'); $this->session = JFactory::getSession(); if (!empty($this->seas_id) or $this->seas_id == '0') { $this->session->set('sid_pl', $this->seas_id); } else { $this->seas_id = $this->session->get('sid_pl'); } // Get the pagination request variables $this->limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int'); $this->limitstart = $mainframe->getUserStateFromRequest('com_joomsport.limitstart', 'limitstart', 0, 'int'); // In case limit has been changed, adjust limitstart accordingly $this->limitstart = $this->limit != 0 ? floor($this->limitstart / $this->limit) * $this->limit : 0; $this->getPagination(); $this->getData(); }
function __construct() { parent::__construct(); $mainframe = JFactory::getApplication(); $this->m_id = JRequest::getVar('id', 0, '', 'int'); $this->title = JFactory::getDocument()->getTitle(); $query = "SELECT COUNT(*) FROM #__bl_seasons as s, #__bl_tournament as t, #__bl_matchday as md WHERE t.published='1' AND s.published='1' AND t.id = s.t_id AND s.s_id = md.s_id AND md.id='" . $this->m_id . "'"; $this->db->setQuery($query); if (!$this->db->loadResult()) { $query = "SELECT COUNT(*) FROM #__bl_matchday as md WHERE md.s_id = '-1' AND md.id = '" . $this->m_id . "'"; $this->db->setQuery($query); } if (!$this->m_id || !$this->db->loadResult()) { JError::raiseError(403, JText::_('Access Forbidden')); return; } $this->limit = $mainframe->getUserStateFromRequest('com_joomsport.mdl_jslimit', 'jslimit', 20, 'int'); $this->limitstart = JRequest::getVar('page', 1, '', 'int'); $this->limitstart = intval($this->limitstart) > 1 ? $this->limitstart : 1; }
function __construct() { parent::__construct(); $mainframe = JFactory::getApplication(); $this->title = JFactory::getDocument()->getTitle(); $this->filtr_tourn = $mainframe->getUserStateFromRequest('global.list.filtr_tourn', 'filtr_tourn', 0, 'int'); // Get the pagination request variables $this->limit = JRequest::getVar('jslimit', 20, '', 'int'); $this->limitstart = JRequest::getVar('page', 1, '', 'int'); $this->limitstart = intval($this->limitstart) > 1 ? $this->limitstart : 1; $this->oreg = JRequest::getVar('oreg', 0, '', 'int'); // In case limit has been changed, adjust limitstart accordingly $this->getPagination(); $this->getData(); $this->getnewData(); $this->p_title = JText::_('BLFA_SEAS_LIST'); $this->_params = $this->JS_PageTitle($this->title ? $this->title : $this->p_title); $this->_lists["teams_season"] = $this->teamsToModer(); $this->_lists["panel"] = $this->getePanel($this->_lists["teams_season"], 0, null, 1); $this->getTourList(); }
function __construct() { parent::__construct(); $mainframe = JFactory::getApplication(); // Get the pagination request variables $this->limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int'); $this->limitstart = $mainframe->getUserStateFromRequest('com_joomsport.limitstart_mdays', 'limitstart', 0, 'int'); $season_id = $mainframe->getUserStateFromRequest('com_joomsport.s_id', 's_id', 0, 'int'); // In case limit has been changed, adjust limitstart accordingly $this->limitstart = $this->limit != 0 ? floor($this->limitstart / $this->limit) * $this->limit : 0; $this->getPagination($season_id); $this->getData($season_id); $this->getSlist($season_id); $type_tourn = array(); $type_tourn[] = JHTML::_('select.option', 0, JText::_('BLBE_GROUP'), 'id', 'name'); if ($season_id != -1) { $type_tourn[] = JHTML::_('select.option', 1, JText::_('BLBE_KNOCK'), 'id', 'name'); $type_tourn[] = JHTML::_('select.option', 2, JText::_('BLBE_DOUBLE'), 'id', 'name'); } $this->_lists['t_type'] = JHTML::_('select.genericlist', $type_tourn, 't_type', 'class="inputbox" size="1"', 'id', 'name'); }
function __construct($acl) { $this->acl = $acl; parent::__construct(); $cid = JRequest::getVar('cid', array(0), '', 'array'); JArrayHelper::toInteger($cid, array(0)); if ($cid[0]) { $is_id = $cid[0]; $this->id = $is_id; } if ($this->acl == 1) { $s_id = JRequest::getVar('sid', 0, '', 'int'); $this->season_id = $s_id; } else { $this->season_id = JRequest::getVar('moderseason', 0, 'int'); //$this->season_id = $this->mainframe->getUserStateFromRequest( 'com_joomsport.moderseason', 'moderseason', 0, 'int' ); } if ($this->acl == 2) { $this->tid = JRequest::getVar('tid', 0, '', 'int'); } }
function __construct() { parent::__construct(); $this->player_id = JRequest::getVar('id', 0, '', 'int'); $this->s_id = JRequest::getVar('sid', 0, '', 'int'); $this->limit = JRequest::getVar('jslimit', 20, '', 'int'); $this->limitstart = JRequest::getVar('page', 1, '', 'int'); $this->limitstart = intval($this->limitstart) > 1 ? $this->limitstart : 1; $this->_lists['jscurtab'] = JRequest::getVar('jscurtab', 'etab_player', '', 'string'); $this->title = JFactory::getDocument()->getTitle(); if (isset($_REQUEST['limitstart']) && $this->_lists['jscurtab'] == 'etab_player') { $this->_lists['jscurtab'] = 'etab_match'; } $query = "SELECT first_name FROM #__bl_players WHERE id = " . $this->player_id; $this->db->setQuery($query); $player_id = $this->db->loadResult(); if (!$player_id) { JError::raiseError(403, JText::_('Access Forbidden')); return; } $this->getPagination(); }
function __construct() { parent::__construct(); $mainframe = JFactory::getApplication(); JHtml::_('behavior.framework'); // Get the pagination request variables $this->limit = $mainframe->getUserStateFromRequest('global.list.limit', 'limit', $mainframe->getCfg('list_limit'), 'int'); $this->limitstart = $mainframe->getUserStateFromRequest('com_joomsport.limitstart', 'limitstart', 0, 'int'); $this->_season_id = $mainframe->getUserStateFromRequest('com_joomsport.s_id', 's_id', 0, 'int'); $is_tourn = array(); $javascript = 'onchange = "document.adminForm.submit();"'; $query = "SELECT s.s_id as id, CONCAT(t.name,' ',s.s_name) as name FROM #__bl_tournament as t, #__bl_seasons as s WHERE t.published='1' AND s.published='1' AND s.t_id = t.id ORDER BY t.name, s.s_name"; $this->db->setQuery($query); $tourn = $this->db->loadObjectList(); $is_tourn[] = JHTML::_('select.option', 0, JText::_('BLBE_SELTOURNAMENT'), 'id', 'name'); $is_tourn[] = JHTML::_('select.option', -1, JText::_('BLBE_FRIENDLYMATCH'), 'id', 'name'); $tourn_is = array_merge($is_tourn, $tourn); $this->_lists['tourn'] = JHTML::_('select.genericlist', $tourn_is, 's_id', 'class="inputbox" size="1" ' . $javascript, 'id', 'name', $this->_season_id); // In case limit has been changed, adjust limitstart accordingly $this->limitstart = $this->limit != 0 ? floor($this->limitstart / $this->limit) * $this->limit : 0; $this->getPagination(); $this->getData(); }
function __construct($acl) { parent::__construct(); $this->acl = $acl; $this->mid = JRequest::getVar('mid', 0, '', 'int'); if ($this->acl == 2) { $this->tid = JRequest::getVar('tid', 0, '', 'int'); $this->season_id = $this->mainframe->getUserStateFromRequest('com_joomsport.moderseason', 'moderseason', 0, 'int'); $query = "SELECT CONCAT(tr.name,' ',s.s_name) as t_name,s.s_id as id FROM #__bl_season_teams as t,#__bl_seasons as s,#__bl_tournament as tr WHERE s.published=1 AND tr.id=s.t_id AND s.s_id=t.season_id AND t.team_id=" . $this->tid . " ORDER BY s.s_id desc"; $this->db->setQuery($query); $seass = $this->db->loadObjectList(); if (!$this->season_id) { $this->season_id = $seass[0]->id; } $isinseas = false; for ($j = 0; $j < count($seass); $j++) { if ($this->season_id == $seass[$j]->id) { $isinseas = true; } } if ($this->season_id == -1) { $isinseas = true; } if (!$isinseas && count($seass)) { $this->season_id = $seass[0]->id; } } elseif ($this->acl == 3) { $this->_user = JFactory::getUser(); if ($this->_user->get('guest')) { $return_url = $_SERVER['REQUEST_URI']; $return_url = base64_encode($return_url); if ($this->getVer() >= '1.6') { $uopt = "com_users"; } else { $uopt = "com_user"; } $return = 'index.php?option=' . $uopt . '&view=login&return=' . $return_url; // Redirect to a login form $this->mainframe->redirect($return, JText::_('BLFA_MSGLOGIN')); } $this->season_id = $this->mainframe->getUserStateFromRequest('com_joomsport.sid', 'sid', $this->season_id, 'int'); $query = "SELECT s.s_id as id,CONCAT(tr.name,' ',s.s_name) as t_name" . " FROM #__bl_season_players as t,#__bl_players as p,#__bl_seasons as s,#__bl_tournament as tr" . " WHERE s.published=1 AND tr.id=s.t_id AND s.s_id=t.season_id AND t.player_id=p.id AND p.usr_id=" . $this->_user->id . " ORDER BY s.s_id desc"; $this->db->setQuery($query); $seass = $this->db->loadObjectList(); $error = $this->db->getErrorMsg(); if ($error) { return JError::raiseError(500, $error); } if (!$this->season_id) { $this->season_id = $seass[0]->id; } $isinseas = false; for ($j = 0; $j < count($seass); $j++) { if ($this->season_id == $seass[$j]->id) { $isinseas = true; } } if ($this->season_id == -1) { $isinseas = true; } if (!$isinseas && count($seass)) { $this->season_id = $seass[0]->id; } } }
function __construct() { parent::__construct(); $mainframe = JFactory::getApplication(); $this->getData(); }
function __construct() { parent::__construct(); }
function __construct($acl) { parent::__construct(); $mainframe = JFactory::getApplication(); $this->acl = $acl; $this->t_type = new stdClass(); // Get the pagination request variables $this->limit = $mainframe->getUserStateFromRequest('com_joomsport.pl_jslimit', 'jslimit', 20, 'int'); $this->limitstart = JRequest::getVar('page', 1, '', 'int'); $this->limitstart = intval($this->limitstart) > 1 ? $this->limitstart : 1; $this->season_id = $mainframe->getUserStateFromRequest('com_joomsport.sid', 'sid', 0, 'int'); if ($this->acl == 2) { $this->season_id = $this->mainframe->getUserStateFromRequest('com_joomsport.moderseason', 'moderseason', 0, 'int'); } if ($this->acl == 2) { $this->tid = JRequest::getVar('tid', 0, '', 'int'); $this->t_single = 0; $query = "SELECT CONCAT(tr.name,' ',s.s_name) as t_name,s.s_id as id FROM #__bl_season_teams as t,#__bl_seasons as s,#__bl_tournament as tr WHERE s.published=1 AND tr.id=s.t_id AND s.s_id=t.season_id AND t.team_id=" . $this->tid . " ORDER BY s.s_id desc"; $this->db->setQuery($query); $seass = $this->db->loadObjectList(); $error = $this->db->getErrorMsg(); if ($error) { return JError::raiseError(500, $error); } if (!$this->season_id) { $this->season_id = isset($seass[0]->id) ? $seass[0]->id : ''; } $isinseas = false; for ($j = 0; $j < count($seass); $j++) { if ($this->season_id == $seass[$j]->id) { $isinseas = true; } } if (!$isinseas && count($seass)) { $this->season_id = $seass[0]->id; } } $user = JFactory::getUser(); $this->_user = $user; if ($user->get('guest')) { $return_url = $_SERVER['REQUEST_URI']; $return_url = base64_encode($return_url); if (getVer() >= '1.6') { $uopt = "com_users"; } else { $uopt = "com_user"; } $return = 'index.php?option=' . $uopt . '&view=login&return=' . $return_url; $this->mainframe->redirect($return, JText::_('BLMESS_NOT_LOGIN')); } if ($this->acl == 2) { $this->_lists['moder_addplayer'] = $this->getJS_Config('moder_addplayer'); $query = "SELECT COUNT(*) FROM #__bl_teams as t, #__bl_moders as m WHERE m.tid=t.id AND m.uid=" . $user->id . " AND t.id=" . $this->tid; $this->db->setQuery($query); if (!$this->db->loadResult() || !$this->_lists['moder_addplayer']) { JError::raiseError(403, JText::_('Access Forbidden')); return; } } elseif ($this->acl == 1) { if (!$this->season_id) { JError::raiseError(403, JText::_('Access Forbidden')); return; } } }
function __construct() { parent::__construct(); $this->getData(); }