function display($tpl = null)
 {
     //$model = $this->getModel();
     //$this->assignRef( 'project',		$model->getProject() );
     //$this->assignRef( 'overallconfig',	$model->getOverallConfig() );
     parent::display($tpl);
 }
 function display($tpl = null)
 {
     // Set toolbar items for the page
     JToolBarHelper::title(JText::_('JoomLeague XML Export'), 'generic.png');
     $db = JFactory::getDBO();
     parent::display($tpl);
 }
 function _displayForm($tpl)
 {
     $option = JRequest::getCmd('option');
     $mainframe = JFactory::getApplication();
     $uri = JFactory::getURI();
     $user = JFactory::getUser();
     $model = $this->getModel();
     //get the project
     $object =& $this->get('data');
     $isNew = $object->id < 1;
     // fail if checked out not by 'me'
     if ($model->isCheckedOut($user->get('id'))) {
         $msg = JText::sprintf('DESCBEINGEDITTED', JText::_('COM_JOOMLEAGUE_ADMIN_LEAGUE'), $object->name);
         $mainframe->redirect('index.php?option=' . $option, $msg);
     }
     // Edit or Create?
     if (!$isNew) {
         $model->checkout($user->get('id'));
     } else {
         // initialise new record
         $object->order = 0;
     }
     $extended = $this->getExtended($object->extended, 'league');
     $this->assignRef('extended', $extended);
     $this->assignRef('object', $object);
     $this->assignRef('form', $this->get('form'));
     $this->assign('cfg_which_media_tool', JComponentHelper::getParams($option)->get('cfg_which_media_tool', 0));
     $this->addToolbar();
     parent::display($tpl);
 }
Example #4
0
 function display($tpl = null)
 {
     // Get a refrence of the page instance in joomla
     $document = JFactory::getDocument();
     $model = $this->getModel();
     $project = $model->getProject();
     //no treeko !!!
     $config = $model->getTemplateConfig('tree');
     $this->project = $model->getProject();
     $this->overallconfig = $model->getOverallConfig();
     $this->config = $config;
     $this->node = $model->getTreetonode();
     $this->roundname = $model->getRoundName();
     $this->model = $model;
     // Set page title
     ///TODO: treeto name, no project name
     $titleInfo = JoomleagueHelper::createTitleInfo(JText::_('COM_JOOMLEAGUE_TREETO_PAGE_TITLE'));
     if (!empty($this->project)) {
         $titleInfo->projectName = $this->project->name;
         $titleInfo->leagueName = $this->project->league_name;
         $titleInfo->seasonName = $this->project->season_name;
     }
     $division = $model->getDivision(JRequest::getInt('division', 0));
     if (!empty($division) && $division->id != 0) {
         $titleInfo->divisionName = $division->name;
     }
     $this->pagetitle = JoomleagueHelper::formatTitle($titleInfo, $this->config["page_title_format"]);
     $document->setTitle($this->pagetitle);
     parent::display($tpl);
 }
Example #5
0
 function display($tpl = null)
 {
     $option = JRequest::getCmd('option');
     $mainframe = JFactory::getApplication();
     $uri = JFactory::getURI();
     $filter_order = $mainframe->getUserStateFromRequest($option . 's_filter_order', 'filter_order', 's.ordering', 'cmd');
     $filter_order_Dir = $mainframe->getUserStateFromRequest($option . 's_filter_order_Dir', 'filter_order_Dir', '', 'word');
     $search = $mainframe->getUserStateFromRequest($option . 's_search', 'search', '', 'string');
     $search = JString::strtolower($search);
     $items = $this->get('Data');
     $total = $this->get('Total');
     $pagination = $this->get('Pagination');
     // table ordering
     $lists['order_Dir'] = $filter_order_Dir;
     $lists['order'] = $filter_order;
     // search filter
     $lists['search'] = $search;
     $user = JFactory::getUser();
     $this->user = $user;
     $this->lists = $lists;
     $this->items = $items;
     $this->pagination = $pagination;
     $this->request_url = $uri->toString();
     $this->addToolbar();
     parent::display($tpl);
 }
Example #6
0
 public function display($tpl = null)
 {
     $option = JRequest::getCmd('option');
     $mainframe = JFactory::getApplication();
     $uri = JFactory::getURI();
     $lists = array();
     $filter_order = $mainframe->getUserStateFromRequest($option . 's_filter_order', 'filter_order', 's.ordering', 'cmd');
     $filter_order_Dir = $mainframe->getUserStateFromRequest($option . 's_filter_order_Dir', 'filter_order_Dir', '', 'word');
     $filter_state = $mainframe->getUserStateFromRequest($option . '.' . $this->get('identifier') . '.filter_state', 'filter_state', 'P', 'word');
     $search = $mainframe->getUserStateFromRequest($option . 's_search', 'search', '', 'string');
     $search = JString::strtolower($search);
     $items = $this->get('Data');
     $total = $this->get('Total');
     $pagination = $this->get('Pagination');
     // state filter
     $lists['state'] = JHtml::_('grid.state', $filter_state, 'Published', 'Unpublished', 'Archived', 'Trashed');
     // table ordering
     $lists['order_Dir'] = $filter_order_Dir;
     $lists['order'] = $filter_order;
     // search filter
     $lists['search'] = $search;
     $this->user = JFactory::getUser();
     $this->lists = $lists;
     $this->items = $items;
     $this->pagination = $pagination;
     $this->request_url = $uri->toString();
     $this->addToolbar();
     parent::display($tpl);
 }
 function _displayForm($tpl)
 {
     $option = JRequest::getCmd('option');
     $mainframe = JFactory::getApplication();
     $db = JFactory::getDBO();
     $uri = JFactory::getURI();
     $user = JFactory::getUser();
     $model = $this->getModel();
     $lists = array();
     //get the matchday
     $round =& $this->get('data');
     $isNew = $round->id < 1;
     // fail if checked out not by 'me'
     if ($model->isCheckedOut($user->get('id'))) {
         $msg = JText::sprintf('DESCBEINGEDITTED', JText::_('The matchday'), $round->name);
         $mainframe->redirect('index.php?option=' . $option, $msg);
     }
     // Edit or Create?
     if (!$isNew) {
         $model->checkout($user->get('id'));
     } else {
         // initialise new record
         $round->order = 0;
     }
     $projectws =& $this->get('Data', 'projectws');
     $this->assignRef('projectws', $projectws);
     #$this->assignRef('lists',$lists);
     $this->assignRef('matchday', $round);
     $this->assignRef('form', $this->get('form'));
     //$extended = $this->getExtended($round->extended, 'round');
     //$this->assignRef( 'extended', $extended );
     $this->addToolbar();
     parent::display($tpl);
 }
 function _displayDefault($tpl)
 {
     $option = JRequest::getCmd('option');
     $mainframe = JFactory::getApplication();
     $project_id = $mainframe->getUserState($option . 'project');
     $db = JFactory::getDBO();
     $uri = JFactory::getURI();
     // Get data from the model
     $items =& $this->get('Data');
     $total =& $this->get('Total');
     $pagination =& $this->get('Pagination');
     $model = $this->getModel();
     $projectws =& $this->get('Data', 'projectws');
     $division = $mainframe->getUserStateFromRequest($option . 'tt_division', 'division', '', 'string');
     //build the html options for divisions
     $divisions[] = JHTMLSelect::option('0', JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_DIVISION'));
     $mdlDivisions = JModel::getInstance("divisions", "JoomLeagueModel");
     if ($res =& $mdlDivisions->getDivisions($project_id)) {
         $divisions = array_merge($divisions, $res);
     }
     $lists['divisions'] = $divisions;
     unset($divisions);
     $this->assignRef('user', JFactory::getUser());
     $this->assignRef('lists', $lists);
     $this->assignRef('items', $items);
     $this->assignRef('projectws', $projectws);
     $this->assignRef('division', $division);
     $this->assignRef('total', $total);
     $this->assignRef('pagination', $pagination);
     $this->assignRef('request_url', $uri->toString());
     $this->addToolbar();
     parent::display($tpl);
 }
 function display($tpl = null)
 {
     // Get a refrence of the page instance in joomla
     $document = JFactory::getDocument();
     $model = $this->getModel();
     $config = $model->getTemplateConfig($this->getName());
     $project = $model->getProject();
     $division = $model->getDivision();
     $overallconfig = $model->getOverallConfig();
     $clubs = $model->getClubs();
     $this->assignRef('project', $project);
     $this->assignRef('division', $division);
     $this->assignRef('overallconfig', $overallconfig);
     $this->assignRef('config', $config);
     $this->assignRef('clubs', $clubs);
     // Set page title
     $pageTitle = JText::_('COM_JOOMLEAGUE_CLUBS_PAGE_TITLE');
     if (isset($this->project)) {
         $pageTitle .= ' - ' . $this->project->name;
         if (isset($this->division)) {
             $pageTitle .= ' : ' . $this->division->name;
         }
     }
     $document->setTitle($pageTitle);
     parent::display($tpl);
 }
Example #10
0
 public function display($tpl = null)
 {
     // Get a refrence of the page instance in joomla
     $document = JFactory::getDocument();
     $model = $this->getModel();
     $config = $model->getTemplateConfig("player");
     // Get the type of persondata to be shown from the query string
     // pt==1 ==> as player // pt==2 ==> as staffmember  // pt==3 ==> as referee // pt==4 ==> as club-staffmember
     $showType = JRequest::getVar('pt', '1', 'default', 'int');
     if ($showType > 3) {
         $showType = 1;
     }
     $person = $model->getPerson();
     $this->showType = $showType;
     $this->project = $model->getProject();
     $this->overallconfig = $model->getOverallConfig();
     $this->config = $config;
     $this->person = $person;
     //$extended = $this->getExtended($person->extended, 'person');
     //$this->extended = $extended;
     switch ($showType) {
         case '4':
             $titleStr = 'About %1$s %2$s as a Club staff';
             $this->historyClubStaff = $model->getPersonHistory('ASC');
             break;
         case '3':
             $titleStr = 'About %1$s %2$s as a Referee';
             $this->inprojectinfo = $model->getReferee();
             $this->historyReferee = $model->getRefereeHistory('ASC');
             break;
         case '2':
             $titleStr = 'About %1$s %2$s as a Staff member';
             $this->inprojectinfo = $model->getTeamStaff();
             $this->historyStaff = $model->getStaffHistory('ASC');
             break;
         case '1':
             $titleStr = 'About %1$s %2$s as a Player';
             $this->inprojectinfo = $model->getTeamPlayer();
             $this->historyPlayer = $model->getPlayerHistory('ASC');
             //$this->historyStaff = $model->getStaffHistory('ASC');
             $this->AllEvents = $model->getAllEvents();
             break;
         default:
             break;
     }
     // Set page title
     $titleInfo = JoomleagueHelper::createTitleInfo(JText::sprintf($titleStr, $this->person->firstname, $this->person->lastname));
     if (!empty($this->project)) {
         $titleInfo->projectName = $this->project->name;
         $titleInfo->leagueName = $this->project->league_name;
         $titleInfo->seasonName = $this->project->season_name;
     }
     $division = $model->getDivision(JRequest::getInt('division', 0));
     if (!empty($division) && $division->id != 0) {
         $titleInfo->divisionName = $division->name;
     }
     $this->pagetitle = JoomleagueHelper::formatTitle($titleInfo, $this->config["page_title_format"]);
     $document->setTitle($this->pagetitle);
     parent::display($tpl);
 }
 function _displayForm($tpl)
 {
     $option = JRequest::getCmd('option');
     $mainframe = JFactory::getApplication();
     $project_id = $mainframe->getUserState('com_joomleagueproject');
     $uri = JFactory::getURI();
     $user = JFactory::getUser();
     $model = $this->getModel();
     $lists = array();
     $node =& $this->get('data');
     $match =& $model->getNodeMatch();
     $total =& $this->get('Total');
     $pagination =& $this->get('Pagination');
     $projectws =& $this->get('Data', 'projectws');
     $model = $this->getModel('projectws');
     $mdlTreetonodes = JModel::getInstance("Treetonodes", "JoomleagueModel");
     $team_id[] = JHTML::_('select.option', '0', JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_TEAM'));
     if ($projectteams =& $mdlTreetonodes->getProjectTeamsOptions($model->_id)) {
         $team_id = array_merge($team_id, $projectteams);
     }
     $lists['team'] = $team_id;
     unset($team_id);
     $this->assignRef('user', JFactory::getUser());
     $this->assignRef('projectws', $projectws);
     $this->assignRef('lists', $lists);
     $this->assignRef('division', $division);
     $this->assignRef('division_id', $division_id);
     $this->assignRef('node', $node);
     $this->assignRef('match', $match);
     $this->assignRef('pagination', $pagination);
     parent::display($tpl);
 }
 function display($tpl = null)
 {
     // Get a refrence of the page instance in joomla
     $document =& JFactory::getDocument();
     $uri =& JFactory::getURI();
     $model =& $this->getModel();
     $config = $model->getTemplateConfig($this->getName());
     //$config	= $model->getAllRoundsParams();
     $project = $model->getProject();
     $this->assignRef('project', $project);
     //     $mdlProject = JModel::getInstance("Project", "JoomleagueModel");
     $this->assignRef('projectid', $this->project->id);
     $this->assignRef('projectmatches', $model->getProjectMatches());
     $this->assignRef('rounds', $model->getRounds());
     $this->assignRef('overallconfig', $model->getOverallConfig());
     $this->assignRef('config', array_merge($this->overallconfig, $config));
     //$this->assignRef('config', $model->getAllRoundsParams());
     //     echo '<br />getRounds<pre>~'.print_r($this->rounds,true).'~</pre><br />';
     $this->assignRef('favteams', $model->getFavTeams($this->projectid));
     //     echo '<br />getFavTeams<pre>~'.print_r($this->favteams,true).'~</pre><br />';
     $this->assignRef('projectteamid', $model->getProjectTeamID($this->favteams));
     $this->assignRef('content', $model->getRoundsColumn($this->rounds, $this->config));
     $this->assign('show_debug_info', JComponentHelper::getParams('com_joomleague')->get('show_debug_info', 0));
     parent::display($tpl);
 }
Example #13
0
 public function display($tpl = null)
 {
     $app = JFactory::getApplication();
     $jinput = $app->input;
     $option = $jinput->getCmd('option');
     $uri = JFactory::getURI();
     $lists = array();
     $filter_order = $app->getUserStateFromRequest($this->get('context') . '.filter_order', 'filter_order', 's.ordering', 'cmd');
     $filter_order_Dir = $app->getUserStateFromRequest($this->get('context') . '.filter_order_Dir', 'filter_order_Dir', '', 'word');
     $filter_state = $app->getUserStateFromRequest($this->get('context') . '.filter_state', 'filter_state', 'P', 'word');
     $search = $app->getUserStateFromRequest($this->get('context') . '.search', 'search', '', 'string');
     $search = JString::strtolower($search);
     $items = $this->get('Data');
     $total = $this->get('Total');
     $pagination = $this->get('Pagination');
     // state filter
     $lists['state'] = JoomleagueHelper::stateOptions($filter_state);
     // table ordering
     $lists['order_Dir'] = $filter_order_Dir;
     $lists['order'] = $filter_order;
     // search filter
     $lists['search'] = $search;
     $this->user = JFactory::getUser();
     $this->lists = $lists;
     $this->items = $items;
     $this->pagination = $pagination;
     $this->request_url = $uri->toString();
     $this->addToolbar();
     parent::display($tpl);
 }
 function display($tpl = null)
 {
     // Get a refrence of the page instance in joomla
     $document = JFactory::getDocument();
     // read the config-data from template file
     $model = $this->getModel();
     $config = $model->getTemplateConfig($this->getName());
     $this->assignRef('project', $model->getProject());
     $this->assignRef('division', $model->getDivision());
     $this->assignRef('matchid', $model->matchid);
     $this->assignRef('overallconfig', $model->getOverallConfig());
     $this->assignRef('config', $config);
     $this->assignRef('teamid', $model->getTeamId());
     $this->assignRef('teams', $model->getTeamsIndexedById());
     $this->assignRef('favteams', $model->getFavTeams());
     $this->assignRef('eventtypes', $model->getEventTypes());
     $this->assignRef('limit', $model->getLimit());
     $this->assignRef('limitstart', $model->getLimitStart());
     $this->assignRef('pagination', $this->get('Pagination'));
     $this->assignRef('eventranking', $model->getEventRankings($this->limit));
     $this->assign('multiple_events', count($this->eventtypes) > 1);
     if ($this->multiple_events) {
         $title = JText::_('COM_JOOMLEAGUE_EVENTSRANKING_TITLE');
     } else {
         // Next query will result in an array with exactly 1 statistic id
         $evid = array_keys($this->eventtypes);
         // Selected one valid eventtype, so show its name
         $title = JText::_($this->eventtypes[$evid[0]]->name);
     }
     // Set page title
     $title = JText::sprintf('COM_JOOMLEAGUE_EVENTSRANKING_PAGE_TITLE', $title);
     $document->setTitle($title);
     $this->assign('title', $title);
     parent::display($tpl);
 }
Example #15
0
 public function display($tpl = null)
 {
     $option = $this->input->getCmd('option');
     $params = JComponentHelper::getParams($option);
     $app = JFactory::getApplication();
     $uri = JFactory::getURI();
     $filter_state = $app->getUserStateFromRequest($this->get('context') . '.filter_state', 'filter_state', '', 'word');
     $filter_order = $app->getUserStateFromRequest($this->get('context') . '.filter_order', 'filter_order', 'a.ordering', 'cmd');
     $filter_order_Dir = $app->getUserStateFromRequest($this->get('context') . '.filter_order_Dir', 'filter_order_Dir', '', 'word');
     $search = $app->getUserStateFromRequest($this->get('context') . '.search', 'search', '', 'string');
     $search_mode = $app->getUserStateFromRequest($this->get('context') . '.search_mode', 'search_mode', '', 'string');
     $search = JString::strtolower($search);
     $items = $this->get('Data');
     $total = $this->get('Total');
     $pagination = $this->get('Pagination');
     // state filter
     $lists['state'] = JHtml::_('grid.state', $filter_state);
     // table ordering
     $lists['order_Dir'] = $filter_order_Dir;
     $lists['order'] = $filter_order;
     // search filter
     $lists['search'] = $search;
     $lists['search_mode'] = $search_mode;
     $this->user = JFactory::getUser();
     $this->config = JFactory::getConfig();
     $this->lists = $lists;
     $this->items = $items;
     $this->pagination = $pagination;
     $this->request_url = $uri->toString();
     $this->component_params = $params;
     $this->addToolbar();
     parent::display($tpl);
 }
 function _displayForm($tpl)
 {
     $option = JRequest::getCmd('option');
     $mainframe = JFactory::getApplication();
     $db = JFactory::getDBO();
     $uri = JFactory::getURI();
     $user = JFactory::getUser();
     $model = $this->getModel();
     //get the sportstype
     $sportstype =& $this->get('data');
     $isNew = $sportstype->id < 1;
     // fail if checked out not by 'me'
     if ($model->isCheckedOut($user->get('id'))) {
         $msg = JText::sprintf('DESCBEINGEDITTED', JText::_('COM_JOOMLEAGUE_ADMIN_SPORTSTYPE'), $sportstype->name);
         $mainframe->redirect('index.php?option=' . $option, $msg);
     }
     // Edit or Create?
     if (!$isNew) {
         $model->checkout($user->get('id'));
     }
     $this->assignRef('sportstype', $sportstype);
     $this->assignRef('request_url', $uri->toString());
     $this->assignRef('form', $this->get('form'));
     $this->assign('cfg_which_media_tool', JComponentHelper::getParams($option)->get('cfg_which_media_tool', 0));
     //$extended = $this->getExtended($sportstype->extended, 'sporttype');
     //$this->assignRef( 'extended', $extended );
     $this->addToolbar();
     parent::display($tpl);
 }
 function display($tpl = null)
 {
     // Get a refrence of the page instance in joomla
     $document =& JFactory::getDocument();
     $model =& $this->getModel();
     $option = JRequest::getCmd('option');
     $optiontext = strtoupper(JRequest::getCmd('option') . '_');
     $this->assignRef('optiontext', $optiontext);
     $mainframe = JFactory::getApplication();
     $this->assignRef('predictionGame', $model->getPredictionGame());
     if (isset($this->predictionGame)) {
         $config = $model->getPredictionTemplateConfig($this->getName());
         $overallConfig = $model->getPredictionOverallConfig();
         $this->assignRef('model', $model);
         $this->assignRef('config', array_merge($overallConfig, $config));
         $configavatar = $model->getPredictionTemplateConfig('predictionusers');
         $this->assignRef('configavatar', $configavatar);
         $this->assignRef('predictionMember', $model->getPredictionMember($configavatar));
         $this->assignRef('predictionProjectS', $model->getPredictionProjectS());
         $this->assignRef('actJoomlaUser', JFactory::getUser());
         //echo '<br /><pre>~'.print_r($this,true).'~</pre><br />';
         $this->assign('show_debug_info', JComponentHelper::getParams('com_joomleague')->get('show_debug_info', 0));
         // Set page title
         $pageTitle = JText::_('COM_JOOMLEAGUE_PRED_USERS_TITLE');
         // 'Tippspiel Regeln'
         $document->setTitle($pageTitle);
         parent::display($tpl);
     } else {
         JError::raiseNotice(500, JText::_('COM_JOOMLEAGUE_PRED_PREDICTION_NOT_EXISTING'));
     }
 }
Example #18
0
 function _displayForm($tpl)
 {
     $option = JRequest::getCmd('option');
     $mainframe = JFactory::getApplication();
     $project_id = $mainframe->getUserState('com_joomleagueproject');
     $uri = JFactory::getURI();
     $user = JFactory::getUser();
     $model = $this->getModel();
     $lists = array();
     $node = $this->get('data');
     $match = $model->getNodeMatch();
     $total = $this->get('Total');
     $pagination = $this->get('Pagination');
     $projectws = $this->get('Data', 'project');
     $model = $this->getModel('project');
     $mdlTreetonodes = JModelLegacy::getInstance("Treetonodes", "JoomleagueModel");
     $team_id[] = JHtml::_('select.option', '0', JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_TEAM'));
     if ($projectteams = $mdlTreetonodes->getProjectTeamsOptions($model->_id)) {
         $team_id = array_merge($team_id, $projectteams);
     }
     $lists['team'] = $team_id;
     unset($team_id);
     $this->user = JFactory::getUser();
     $this->projectws = $projectws;
     $this->lists = $lists;
     $this->division = $division;
     $this->division_id = $division_id;
     $this->node = $node;
     $this->match = $match;
     $this->pagination = $pagination;
     parent::display($tpl);
 }
Example #19
0
 function display($tpl = null)
 {
     $option = JRequest::getCmd('option');
     $mainframe = JFactory::getApplication();
     $project_id = $mainframe->getUserState($option . 'project');
     $uri = JFactory::getURI()->toString();
     $user = JFactory::getUser();
     // Get data from the model
     $items = $this->get('Data');
     $total = $this->get('Total');
     $pagination = $this->get('Pagination');
     $model = $this->getModel();
     $projectws = $this->get('Data', 'project');
     $division = $mainframe->getUserStateFromRequest($option . 'tt_division', 'division', '', 'string');
     //build the html options for divisions
     $divisions[] = JHtmlSelect::option('0', JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_DIVISION'));
     $mdlDivisions = JModelLegacy::getInstance("divisions", "JoomLeagueModel");
     if ($res = $mdlDivisions->getDivisions($project_id)) {
         $divisions = array_merge($divisions, $res);
     }
     $lists['divisions'] = $divisions;
     unset($divisions);
     $this->user = $user;
     $this->lists = $lists;
     $this->items = $items;
     $this->projectws = $projectws;
     $this->division = $division;
     $this->total = $total;
     $this->pagination = $pagination;
     $this->request_url = $uri;
     $this->addToolbar();
     parent::display($tpl);
 }
Example #20
0
 function display($tpl = null)
 {
     //$model = $this->getModel();
     //$this->project = $model->getProject();
     //$this->overallconfig = $model->getOverallConfig();
     parent::display($tpl);
 }
 function _displayForm($tpl)
 {
     $mainframe =& JFactory::getApplication();
     $option = JRequest::getCmd('option');
     $db =& JFactory::getDBO();
     $uri =& JFactory::getURI();
     $user =& JFactory::getUser();
     $model =& $this->getModel();
     $lists = array();
     //get the member data
     $predictionuser =& $this->get('data');
     $isNew = $predictionuser->id < 1;
     // Edit or Create?
     if (!$isNew) {
         //$model->checkout( $user->get( 'id' ) );
     } else {
         // initialise new record
         $predictionuser->order = 0;
     }
     /*        
             //build the html select list for parent positions
     		$parents[] = JHTML::_( 'select.option', '0', '- ' . JText::_( 'Prediction Group' ) . ' -' );
     		if ( $res =& $model->getPredictionGroups() )
     		{
     			$parents = array_merge( $parents, $res );
     		}
     		$lists['parents'] = JHTML::_(	'select.genericlist', $parents, 'group_id', 'class="inputbox" size="1"', 'value', 'text',
     										$predictionuser->group_id );
     		unset( $parents );
     */
     //$this->assignRef( 'lists',			$lists );
     $this->assignRef('form', $this->get('form'));
     $this->assignRef('predictionuser', $predictionuser);
     parent::display($tpl);
 }
 function _displayDefault($tpl)
 {
     global $mainframe, $option;
     $db =& JFactory::getDBO();
     $uri =& JFactory::getURI();
     $user =& JFactory::getUser();
     $model =& $this->getModel();
     $document =& JFactory::getDocument();
     $dbblink = '';
     $project = $mainframe->getUserState($option . 'project');
     $this->assignRef('project', $project);
     $config =& JComponentHelper::getParams('com_media');
     $stylelink = '<link rel="stylesheet" href="' . JURI::root() . 'administrator/components/com_joomleague/assets/css/jlextusericons.css' . '" type="text/css" />' . "\n";
     $document->addCustomTag($stylelink);
     JToolBarHelper::title(JText::_('JL_ADMIN_EXT_DBB_TITLE_2'), 'dbb-cpanel');
     $teamart = '';
     $teamarten['Herren'] = 'Herren';
     $teamarten['U18m'] = 'U18m';
     $teamarten['U18'] = 'U18';
     $teamarten['U16m'] = 'U16m';
     $teamarten['U16'] = 'U16';
     //     $teamarten[] = '';
     //     $teamarten[] = '';
     //     $teamarten[] = '';
     $teamarthtml[] = JHTML::_('select.option', '', JText::_('JL_ADMIN_XML_IMPORT_DBB_SELECT_TEAMART'));
     foreach ($teamarten as $key => $value) {
         $teamarthtml[] = JHTML::_('select.option', $value, $value);
     }
     $lists['teamart'] = JHTML::_('select.genericlist', $teamarthtml, 'teamart', 'class="inputbox" size="1"', 'value', 'text', $teamart);
     $this->assignRef('lists', $lists);
     $this->assignRef('request_url', $uri->toString());
     $this->assignRef('config', $config);
     $this->assignRef('dbblink', $dbblink);
     parent::display($tpl);
 }
 function display($tpl = null)
 {
     // Get a refrence of the page instance in joomla
     $document = JFactory::getDocument();
     $model = $this->getModel();
     $config = $model->getTemplateConfig($this->getName());
     $person = $model->getPerson();
     $this->assignRef('project', $model->getProject());
     $this->assignRef('overallconfig', $model->getOverallConfig());
     $this->assignRef('config', $config);
     $this->assignRef('person', $person);
     $this->assignRef('showediticon', $model->getAllowed($config['edit_own_player']));
     $staff =& $model->getTeamStaff();
     $titleStr = JText::sprintf('COM_JOOMLEAGUE_STAFF_ABOUT_AS_A_STAFF', JoomleagueHelper::formatName(null, $this->person->firstname, $this->person->nickname, $this->person->lastname, $this->config["name_format"]));
     $this->assignRef('inprojectinfo', $staff);
     $this->assignRef('history', $model->getStaffHistory('ASC'));
     $this->assignRef('stats', $model->getStats());
     $this->assignRef('staffstats', $model->getStaffStats());
     $this->assignRef('historystats', $model->getHistoryStaffStats());
     $this->assign('title', $titleStr);
     $extended = $this->getExtended($person->extended, 'staff');
     $this->assignRef('extended', $extended);
     $document->setTitle($titleStr);
     parent::display($tpl);
 }
 function display($tpl = null)
 {
     $option = JRequest::getCmd('option');
     $mainframe = JFactory::getApplication();
     $db = JFactory::getDBO();
     $uri = JFactory::getURI();
     $filter_state = $mainframe->getUserStateFromRequest($option . 'dv_filter_state', 'filter_state', '', 'word');
     $filter_order = $mainframe->getUserStateFromRequest($option . 'dv_filter_order', 'filter_order', 'dv.ordering', 'cmd');
     $filter_order_Dir = $mainframe->getUserStateFromRequest($option . 'dv_filter_order_Dir', 'filter_order_Dir', '', 'word');
     $search = $mainframe->getUserStateFromRequest($option . 'dv_search', 'search', '', 'string');
     $search = JString::strtolower($search);
     $items =& $this->get('Data');
     $total =& $this->get('Total');
     $pagination =& $this->get('Pagination');
     $projectws =& $this->get('Data', 'projectws');
     // state filter
     $lists['state'] = JHTML::_('grid.state', $filter_state);
     // table ordering
     $lists['order_Dir'] = $filter_order_Dir;
     $lists['order'] = $filter_order;
     // search filter
     $lists['search'] = $search;
     $this->assignRef('user', JFactory::getUser());
     $this->assignRef('lists', $lists);
     $this->assignRef('items', $items);
     $this->assignRef('projectws', $projectws);
     $this->assignRef('pagination', $pagination);
     $this->assignRef('request_url', $uri->toString());
     $this->addToolbar();
     parent::display($tpl);
 }
Example #25
0
 public function display($tpl = null)
 {
     // Get a reference of the page instance in joomla
     $document = JFactory::getDocument();
     $model = $this->getModel();
     $config = $model->getTemplateConfig($this->getName());
     $this->project = $model->getProject();
     $this->division = $model->getDivision();
     $this->overallconfig = $model->getOverallConfig();
     $this->config = $config;
     $this->teams = $model->getTeams();
     // Set page title
     $titleInfo = JoomleagueHelper::createTitleInfo(JText::_('COM_JOOMLEAGUE_TEAMS_TITLE'));
     if (!empty($this->project)) {
         $titleInfo->projectName = $this->project->name;
         $titleInfo->leagueName = $this->project->league_name;
         $titleInfo->seasonName = $this->project->season_name;
     }
     if (!empty($this->division) && $this->division->id != 0) {
         $titleInfo->divisionName = $this->division->name;
     }
     $this->pagetitle = JoomleagueHelper::formatTitle($titleInfo, $this->config["page_title_format"]);
     $document->setTitle($this->pagetitle);
     parent::display($tpl);
 }
 function display($tpl = null)
 {
     // Get a refrence of the page instance in joomla
     $document = JFactory::getDocument();
     $model = $this->getModel();
     $config = $model->getTemplateConfig($this->getName());
     $person = $model->getPerson();
     $this->assignRef('project', $model->getProject());
     $this->assignRef('overallconfig', $model->getOverallConfig());
     $this->assignRef('config', $config);
     $this->assignRef('person', $person);
     $ref =& $model->getReferee();
     if ($ref) {
         $titleStr = JText::sprintf('COM_JOOMLEAGUE_REFEREE_ABOUT_AS_A_REFEREE', JoomleagueHelper::formatName(null, $ref->firstname, $ref->nickname, $ref->lastname, $this->config["name_format"]));
     } else {
         $titleStr = JText::_('Unknown referee within project');
     }
     $this->assignRef('referee', $ref);
     $this->assignRef('history', $model->getHistory('ASC'));
     $this->assign('title', $titleStr);
     if ($config['show_gameshistory']) {
         $this->assignRef('games', $model->getGames());
         $this->assignRef('teams', $model->getTeamsIndexedByPtid());
     }
     if ($person) {
         $extended = $this->getExtended($person->extended, 'referee');
         $this->assignRef('extended', $extended);
     }
     $document->setTitle($titleStr);
     $this->assign('show_debug_info', JComponentHelper::getParams('com_joomleague')->get('show_debug_info', 0));
     parent::display($tpl);
 }
 function _displayDefault($tpl)
 {
     $option = JRequest::getCmd('option');
     $mainframe =& JFactory::getApplication();
     $uri =& JFactory::getURI();
     $cid = JRequest::getCmd('cid');
     $match_id = $cid[0];
     $model =& $this->getModel();
     /*
     		$filter_state		= $mainframe->getUserStateFromRequest($option.'mc_filter_state',	'filter_state', 	'', 'word');
     		$filter_order		= $mainframe->getUserStateFromRequest($option.'mc_filter_order',	'filter_order', 	'mc.match_number', 'cmd');
     		$filter_order_Dir	= $mainframe->getUserStateFromRequest($option.'mc_filter_order_Dir','filter_order_Dir', '', 'word');
     		$search				= $mainframe->getUserStateFromRequest($option.'mc_search', 'search',					'', 'string');
     		$search_mode		= $mainframe->getUserStateFromRequest($option.'mc_search_mode',		'search_mode',		'', 'string');
     		$division			= $mainframe->getUserStateFromRequest($option.'mc_division',		'division',			'',	'string');
     		$project_id			= $mainframe->getUserState( $option . 'project' );
     		$search				= JString::strtolower($search);
     */
     $matches =& $this->get('Data');
     $total =& $this->get('Total');
     $pagination =& $this->get('Pagination');
     $match = $model->getMatchData($match_id);
     echo 'getModel<pre>' . print_r($model, true) . '</pre><br>';
     $this->assignRef('homeplayer', $model->HomeTeamPlayer());
     $this->assignRef('awayplayer', $model->AwayTeamPlayer());
     $this->assignRef('matches', $matches);
     $this->assignRef('match', $match);
     $this->assignRef('pagination', $pagination);
     $this->assignRef('lists', $lists);
     $this->assignRef('request_url', $uri->toString());
     parent::display($tpl);
 }
Example #28
0
 function _displayModal($tpl)
 {
     JToolBarHelper::title(JText::_('COM_JOOMLEAGUE_ADMIN_PERSON_ASSIGN_DESCR'));
     // Do not allow cache
     JResponse::allowCache(false);
     $document = JFactory::getDocument();
     $prjid = array();
     $prjid = JRequest::getVar('prjid', array(0), 'post', 'array');
     $proj_id = (int) $prjid[0];
     //build the html select list for projects
     $projects[] = JHtml::_('select.option', '0', JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_PROJECT'), 'id', 'name');
     if ($res = JoomleagueHelper::getProjects()) {
         $projects = array_merge($projects, $res);
     }
     $lists['projects'] = JHtmlSelect::genericlist($projects, 'prjid[]', 'class="inputbox" onChange="this.form.submit();" style="width:170px"', 'id', 'name', $proj_id);
     unset($projects);
     $projectteams[] = JHtmlSelect::option('0', JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_TEAM'), 'value', 'text');
     // if a project is active we show the teams select list
     if ($proj_id > 0) {
         if ($res = JoomleagueHelper::getProjectteams($proj_id)) {
             $projectteams = array_merge($projectteams, $res);
         }
         $lists['projectteams'] = JHtmlSelect::genericlist($projectteams, 'xtid[]', 'class="inputbox" style="width:170px"', 'value', 'text');
         unset($projectteams);
     }
     $this->lists = $lists;
     $this->project_id = $proj_id;
     parent::display($tpl);
 }
 /**
  *  view display method
  * @return void
  */
 function display($tpl = null)
 {
     // Get data from the model
     //		$items = $this->get('Items');
     //		$pagination = $this->get('Pagination');
     $model = $this->getModel();
     $this->assignRef('version', $model->getVersion());
     /*        
     		jimport('joomla.html.pane');
     		$pane	=& JPane::getInstance('sliders');
     		$this->assignRef( 'pane'		, $pane );
            $this->assignRef( 'version', $model->getVersion() );
            $this->assignRef( 'githubrequest', $model->getGithubRequests() );
     
     		// Check for errors.
     		if (count($errors = $this->get('Errors'))) 
     		{
     			JError::raiseError(500, implode('<br />', $errors));
     			return false;
     		}
     		// Assign data to the view
     		$this->items = $items;
     		$this->pagination = $pagination;
     */
     // Set the toolbar
     $this->addToolBar();
     // Display the template
     parent::display($tpl);
     // Set the document
     $this->setDocument();
 }
 function display($tpl = null)
 {
     // Get a refrence of the page instance in joomla
     $document = JFactory::getDocument();
     $version = urlencode(JoomleagueHelper::getVersion());
     $css = 'components/com_joomleague/assets/css/tabs.css?v=' . $version;
     $document->addStyleSheet($css);
     // Joomleague model
     $model = $this->getModel();
     $user = JFactory::getUser();
     $rankingconfig = $model->getTemplateConfig("ranking");
     $this->assignRef('project', $model->getProject());
     $this->assignRef('overallconfig', $model->getTemplateConfig('overall'));
     $this->assignRef('rankingconfig', $rankingconfig);
     $this->assignRef('playgrounds', $model->getPlaygrounds());
     $this->assignRef('match', $model->getMatch());
     $this->assignRef('team1', $model->getTeaminfo($this->match->projectteam1_id));
     $this->assignRef('team2', $model->getTeaminfo($this->match->projectteam2_id));
     $isAllowed = $model->isAllowed() || $model->isMatchAdmin($this->match->id, $user->id);
     $this->assignRef('showediticon', $isAllowed);
     //echo '<br /><pre>~' . print_r( $this->match, true ) . '~</pre><br />';
     // extended match data
     $xmlfile = JLG_PATH_ADMIN . DS . 'assets' . DS . 'extended' . DS . 'match.xml';
     $jRegistry = new JRegistry();
     $jRegistry->loadString($this->match->extended, 'ini');
     $extended =& JForm::getInstance('extended', $xmlfile, array('control' => 'extended'), false, '/config');
     $extended->bind($jRegistry);
     $lists = array();
     // build the html select booleanlist for cancel
     $lists['cancel'] = JHTML::_('select.booleanlist', 'cancel', 'class="inputbox"', $this->match->cancel);
     $playgrounds[] = JHTML::_('select.option', '0', JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_PLAYGROUND'));
     if (!empty($this->playgrounds)) {
         $playgrounds = array_merge($playgrounds, $this->playgrounds);
     }
     $lists['playgrounds'] = JHTML::_('select.genericlist', $playgrounds, 'playground_id', 'class="inputbox" size="1"', 'value', 'text', $this->match->playground_id);
     //match relation lists
     //$mdlMatch = $model->getMatch();
     $oldmatches[] = JHTML::_('select.option', '0', JText::_('COM_JOOMLEAGUE_EDITMATCH_SELECT_PREV_MATCH'));
     $res = array();
     $new_match_id = $this->match->new_match_id ? $this->match->new_match_id : 0;
     if ($res =& $model->getMatchRelationsOptions($this->project->id, $this->match->id . "," . $new_match_id)) {
         $oldmatches = array_merge($oldmatches, $res);
     }
     unset($res);
     $lists['old_match'] = JHTML::_('select.genericlist', $oldmatches, 'old_match_id', 'class="inputbox" size="1"', 'value', 'text', $this->match->old_match_id);
     $newmatches[] = JHTML::_('select.option', '0', JText::_('COM_JOOMLEAGUE_EDITMATCH_SELECT_NEW_MATCH'));
     $res = array();
     $old_match_id = $this->match->old_match_id ? $this->match->old_match_id : 0;
     if ($res =& $model->getMatchRelationsOptions($this->project->id, $this->match->id . "," . $old_match_id)) {
         $newmatches = array_merge($newmatches, $res);
     }
     unset($res);
     $lists['new_match'] = JHTML::_('select.genericlist', $newmatches, 'new_match_id', 'class="inputbox" size="1"', 'value', 'text', $this->match->new_match_id);
     $this->assignRef('form', $this->get('form'));
     $this->assignRef('extended', $extended);
     $this->assignRef('lists', $lists);
     $pageTitle = JText::_('COM_JOOMLEAGUE_EDITMATCH_MATCHDETAILS');
     $document->setTitle($pageTitle);
     parent::display($tpl);
 }