Example #1
0
 public function display($cachable = false, $urlparams = false)
 {
     $option = JRequest::getCmd('option');
     $mainframe = JFactory::getApplication();
     $document = JFactory::getDocument();
     $model = $this->getModel('projectposition');
     $viewType = $document->getType();
     $view = $this->getView('projectposition', $viewType);
     $view->setModel($model, true);
     // true is for the default model;
     $projectws = $this->getModel('project');
     $projectws->setId($mainframe->getUserState($option . 'project', 0));
     $view->setModel($projectws);
     $task = $this->getTask();
     switch ($task) {
         case 'add':
             JRequest::setVar('layout', 'form');
             JRequest::setVar('view', 'projectposition');
             JRequest::setVar('edit', false);
             $model = $this->getModel('projectposition');
             $model->checkout();
             break;
         case 'edit':
             JRequest::setVar('layout', 'form');
             JRequest::setVar('view', 'projectposition');
             JRequest::setVar('edit', true);
             // Checkout the project
             $model = $this->getModel('projectposition');
             $model->checkout();
             break;
     }
     parent::display();
 }
Example #2
0
 public function __construct()
 {
     // Get the document object.
     $document = JFactory::getDocument();
     // Set the MIME type for JSON output.
     $document->setMimeEncoding('application/json');
     parent::__construct();
 }
Example #3
0
 public function __construct()
 {
     parent::__construct();
     $model = $this->getModel('jlxmlexport');
     $export = $model->exportData();
     if ($export) {
         echo $export;
     }
 }
Example #4
0
 public function display($cachable = false, $urlparams = false)
 {
     $document = JFactory::getDocument();
     $model = $this->getModel('updates');
     $viewType = $document->getType();
     $view = $this->getView('updates', $viewType);
     $view->setModel($model, true);
     // true is for the default model;
     $view->setLayout('updates');
     parent::display();
 }
Example #5
0
 public function select()
 {
     $app = JFactory::getApplication();
     $selectType = JRequest::getVar('type', 0, 'get', 'int');
     $recordID = JRequest::getVar('id', 0, 'get', 'int');
     $app->setUserState('com_joomleague' . 'selectType', $selectType);
     $app->setUserState('com_joomleague' . 'recordID', $recordID);
     JRequest::setVar('hidemainmenu', 1);
     JRequest::setVar('layout', 'selectpage');
     JRequest::setVar('view', 'jlxmlimports');
     parent::display();
 }
 function select()
 {
     $mainframe =& JFactory::getApplication();
     $selectType = JRequest::getVar('type', 0, 'get', 'int');
     $recordID = JRequest::getVar('id', 0, 'get', 'int');
     $mainframe->setUserState('com_joomleague' . 'selectType', $selectType);
     $mainframe->setUserState('com_joomleague' . 'recordID', $recordID);
     JRequest::setVar('hidemainmenu', 1);
     JRequest::setVar('layout', 'selectpage');
     JRequest::setVar('view', 'jlextindividualsportringen');
     parent::display();
 }
Example #7
0
 public function __construct()
 {
     parent::__construct();
     // Register Extra tasks
     $this->registerTask('searchplayer', 'searchPlayer');
     $this->registerTask('searchstaff', 'searchStaff');
     $this->registerTask('searchreferee', 'searchReferee');
     $this->registerTask('searchteam', 'searchTeam');
     $this->registerTask('addplayer', 'addPlayer');
     $this->registerTask('addstaff', 'addstaff');
     $this->registerTask('addreferee', 'addReferee');
     $this->registerTask('addteam', 'addTeam');
 }
 function display()
 {
     //$mainframe		=& JFactory::getApplication();
     //$option			= 'com_joomleague';
     $option = JRequest::getCmd('option');
     $mainframe = JFactory::getApplication();
     $document = JFactory::getDocument();
     $mainframe->enqueueMessage(JText::_('PredictionTemplate Task -> ' . $this->getTask()), '');
     $model = $this->getModel('predictiontemplates');
     $viewType = $document->getType();
     $view = $this->getView('predictiontemplates', $viewType);
     $view->setModel($model, true);
     // true is for the default model;
     $prediction_id1 = JRequest::getVar('prediction_id', '-1', '', 'int');
     //echo 'CPT-A' . $prediction_id1 . 'CPT-A<br />';
     $prediction_id2 = (int) $mainframe->getUserState('com_joomleague' . 'prediction_id');
     //echo 'CPT-B' . $prediction_id2 . 'CPT-B<br />';
     if ($prediction_id1 > -1) {
         $mainframe->setUserState('com_joomleague' . 'prediction_id', (int) $prediction_id1);
     } else {
         $mainframe->setUserState('com_joomleague' . 'prediction_id', (int) $prediction_id2);
     }
     $prediction_id = (int) $mainframe->getUserState('com_joomleague' . 'prediction_id');
     //echo 'CPT-C' . $prediction_id . 'CPT-C<br />';
     switch ($this->getTask()) {
         case 'add':
             JRequest::setVar('hidemainmenu', 0);
             JRequest::setVar('layout', 'form');
             JRequest::setVar('view', 'predictiontemplate');
             JRequest::setVar('edit', false);
             // Checkout the project
             $model = $this->getModel('predictiontemplate');
             //$model->checkout();
             break;
         case 'edit':
             $model = $this->getModel('predictiontemplate');
             $viewType = $document->getType();
             $view = $this->getView('predictiontemplate', $viewType);
             $view->setModel($model, true);
             // true is for the default model;
             //JRequest::setVar( 'hidemainmenu',	0 );
             JRequest::setVar('layout', 'form');
             JRequest::setVar('view', 'predictiontemplate');
             JRequest::setVar('edit', true);
             //$model = $this->getModel( 'predictiontemplate' );
             break;
     }
     parent::display();
 }
Example #9
0
 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
     // Register Extra tasks
     $this->registerTask('csvpersonimport', 'dispatch');
     $this->registerTask('csvseasonimport', 'dispatch');
     $this->registerTask('csvleagueimport', 'dispatch');
     $this->registerTask('csvprojectimport', 'dispatch');
     $this->registerTask('csvclubimport', 'dispatch');
     $this->registerTask('csvteamimport', 'dispatch');
     $this->registerTask('csvsports_typeimport', 'dispatch');
     $this->registerTask('csveventtypeimport', 'dispatch');
     $this->registerTask('csvpositionimport', 'dispatch');
     $this->registerTask('csvplaygroundimport', 'dispatch');
 }
 function display()
 {
     $option = JRequest::getCmd('option');
     $mainframe = JFactory::getApplication();
     $document = JFactory::getDocument();
     $model = $this->getModel('treetonodes');
     $viewType = $document->getType();
     $view = $this->getView('treetonodes', $viewType);
     $view->setModel($model, true);
     // true is for the default model;
     $projectws = $this->getModel('project');
     $projectws->set('name', 'projectws');
     $projectws->setId($mainframe->getUserState($option . 'project', 0));
     $view->setModel($projectws);
     if ($tid = JRequest::getVar('tid', null, '', 'array')) {
         $mainframe->setUserState($option . 'treeto_id', $tid[0]);
     }
     $treetows = $this->getModel('treeto');
     $treetows->set('name', 'treetows');
     $treetows->setId($mainframe->getUserState($option . 'treeto_id'));
     $view->setModel($treetows);
     switch ($this->getTask()) {
         case 'edit':
             $model = $this->getModel('treetonode');
             $viewType = $document->getType();
             $view = $this->getView('treetonode', $viewType);
             $view->setModel($model, true);
             // true is for the default model;
             $projectws = $this->getModel('project');
             $projectws->set('name', 'projectws');
             $projectws->setId($mainframe->getUserState($option . 'project', 0));
             $view->setModel($projectws);
             JRequest::setVar('hidemainmenu', 0);
             JRequest::setVar('layout', 'form');
             JRequest::setVar('view', 'treetonode');
             JRequest::setVar('edit', true);
             $model = $this->getModel('treetonode');
             $model->checkout();
             break;
     }
     parent::display();
 }
 function display()
 {
     $option = JRequest::getCmd('option');
     $mainframe = JFactory::getApplication();
     $document = JFactory::getDocument();
     $model = $this->getModel('templates');
     $viewType = $document->getType();
     $view = $this->getView('templates', $viewType);
     $view->setModel($model, true);
     // true is for the default model;
     $projectws = $this->getModel('project');
     $projectws->set('name', 'projectws');
     $projectws->setId($mainframe->getUserState($option . 'project', 0));
     $view->setModel($projectws, false);
     switch ($this->getTask()) {
         case 'add':
             break;
         case 'edit':
             $model = $this->getModel('template');
             $viewType = $document->getType();
             $view = $this->getView('template', $viewType);
             $view->setModel($model, true);
             // true is for the default model;
             $projectws = $this->getModel('project');
             $projectws->set('name', 'projectws');
             $projectws->setId($mainframe->getUserState($option . 'project', 0));
             $view->setModel($projectws, false);
             $view->setLayout('form');
             JRequest::setVar('layout', 'form');
             JRequest::setVar('view', 'template');
             JRequest::setVar('edit', true);
             // Checkout the project
             $model->checkout();
             break;
     }
     parent::display();
 }
 function display()
 {
     global $mainframe, $option;
     $document =& JFactory::getDocument();
     $mainframe =& JFactory::getApplication();
     //$model		= $this->getModel ( 'modeljlextlmoimport' );
     $this->setMessage(JText::_('project selected'));
     switch ($this->getTask()) {
         case 'edit':
             JRequest::setVar('hidemainmenu', 0);
             JRequest::setVar('layout', 'form');
             JRequest::setVar('view', 'jlxmlimports');
             JRequest::setVar('edit', true);
             break;
             // 			case 'insert':
             // 				JRequest::setVar('hidemainmenu',0);
             // 				JRequest::setVar('layout','info');
             //         JRequest::setVar('view','jlxmlimports');
             // 				//JRequest::setVar('view','jlextlmoimport');
             // 				JRequest::setVar('edit',true);
             // 				break;
     }
     parent::display();
 }
 /**
  * Constructor
  *
  * @since 0.9
  */
 function __construct()
 {
     parent::__construct();
     // Register Extra task
 }
 function jlexteditsinglematches()
 {
     $option = JRequest::getCmd('option');
     $document = JFactory::getDocument();
     $mainframe = JFactory::getApplication();
     $model = $this->getModel('jlextindividualsport');
     $viewType = $document->getType();
     $view = $this->getView('jlextindividualsport', $viewType);
     $view->setModel($model, true);
     // true is for the default model;
     JRequest::setVar('view', 'jlextindividualsport');
     JRequest::setVar('hidemainmenu', 1);
     parent::display();
 }
 function genNode()
 {
     $option = JRequest::getCmd('option');
     $mainframe = JFactory::getApplication();
     $document = JFactory::getDocument();
     $proj = $mainframe->getUserState($option . 'project', 0);
     $post = JRequest::get('post');
     $cid = JRequest::getVar('cid', array(), 'get', 'array');
     JArrayHelper::toInteger($cid);
     $model = $this->getModel('treeto');
     $viewType = $document->getType();
     $view = $this->getView('treeto', $viewType);
     $view->setModel($model, true);
     // true is for the default model;
     $projectws = $this->getModel('project');
     $projectws->set('name', 'projectws');
     $projectws->setId($mainframe->getUserState($option . 'project', 0));
     $view->setModel($projectws);
     JRequest::setVar('hidemainmenu', 0);
     JRequest::setVar('layout', 'gennode');
     JRequest::setVar('view', 'treeto');
     JRequest::setVar('edit', true);
     // Checkout the project
     //$model=$this->getModel('treeto');
     $model->checkout();
     parent::display();
 }
Example #16
0
 /**
  * Proxy for getModel
  *
  * @param	string	$name	The model name. Optional.
  * @param	string	$prefix	The class prefix. Optional.
  *
  * @return	object	The model.
  * @since	1.6
  */
 public function getModel($name = 'SportsType', $prefix = 'JoomleagueModel', $config = array('ignore_request' => true))
 {
     $model = parent::getModel($name, $prefix, $config);
     return $model;
 }
 /**
  * Proxy for getModel
  *
  * @param	string	$name	The model name. Optional.
  * @param	string	$prefix	The class prefix. Optional.
  *
  * @return	object	The model.
  * @since	1.6
  */
 function getModel($name = 'Playground', $prefix = 'JoomleagueModel', $config = array('ignore_request' => true))
 {
     $model = parent::getModel($name, $prefix, $config);
     return $model;
 }
Example #18
0
 /**
  * display the populate form
  *
  */
 public function populate()
 {
     $option = JRequest::getCmd('option');
     $app = JFactory::getApplication();
     $document = JFactory::getDocument();
     $model = $this->getModel('round');
     $viewType = $document->getType();
     $view = $this->getView('rounds', $viewType);
     $view->setModel($model, true);
     // true is for the default model;
     $projectws = $this->getModel('project');
     $projectws->setId($app->getUserState($option . 'project', 0));
     $view->setModel($projectws);
     JRequest::setVar('hidemainmenu', 0);
     JRequest::setVar('view', 'rounds');
     JRequest::setVar('layout', 'populate');
     parent::display();
 }
 /**
  * copy team to another project
  */
 function copy()
 {
     $dest = JRequest::getInt('dest');
     $ptids = JRequest::getVar('ptids', array(), 'post', 'array');
     // check if this is the final step
     if (!$dest) {
         JRequest::setVar('view', 'projectteams');
         JRequest::setVar('layout', 'copy');
         return parent::display();
     }
     $msg = '';
     $type = 'message';
     $model = $this->getModel('projectteams');
     if (!$model->copy($dest, $ptids)) {
         $msg = $model->getError();
         $type = 'error';
     } else {
         $msg = JText::_('COM_JOOMLEAGUE_ADMIN_PROJECTTEAMS_COPY_SUCCESS');
     }
     $this->setRedirect('index.php?option=com_joomleague&view=projectteams&task=projectteam.display', $msg, $type);
     $this->redirect();
 }
Example #20
0
 public function editlist()
 {
     $option = $this->input->getCmd('option');
     $app = JFactory::getApplication();
     $document = JFactory::getDocument();
     $model = $this->getModel('treetomatchs');
     $viewType = $document->getType();
     $view = $this->getView('treetomatchs', $viewType);
     $view->setModel($model, true);
     // true is for the default model;
     $projectws = $this->getModel('project');
     $projectws->setId($app->getUserState($option . 'project', 0));
     $view->setModel($projectws);
     if ($nid = JRequest::getVar('nid', null, '', 'array')) {
         $app->setUserState($option . 'node_id', $nid[0]);
     }
     if ($tid = JRequest::getVar('tid', null, '', 'array')) {
         $app->setUserState($option . 'treeto_id', $tid[0]);
     }
     $nodews = $this->getModel('treetonode');
     $nodews->setId($app->getUserState($option . 'node_id'));
     $view->setModel($nodews);
     JRequest::setVar('hidemainmenu', 0);
     JRequest::setVar('layout', 'editlist');
     JRequest::setVar('view', 'treetomatchs');
     JRequest::setVar('edit', true);
     // Checkout the project
     //	$model = $this->getModel('treetomatchs');
     parent::display();
 }
Example #21
0
 public function display($cachable = false, $urlparams = false)
 {
     parent::display();
 }
 function edit()
 {
     JRequest::setVar('hidemainmenu', 0);
     JRequest::setVar('view', 'settings');
     parent::display();
 }
 function import()
 {
     JRequest::setVar('view', 'import');
     JRequest::setVar('table', 'position_ringen');
     parent::display();
 }
 function display()
 {
     parent::display();
 }
 /**
  * Proxy for getModel
  *
  * @param	string	$name	The model name. Optional.
  * @param	string	$prefix	The class prefix. Optional.
  *
  * @return	object	The model.
  * @since	1.6
  */
 function getModel($name = 'jlextuserextrafield', $prefix = 'JoomleagueModel', $config = array('ignore_request' => true))
 {
     $model = parent::getModel($name, $prefix, $config);
     return $model;
 }
 function __construct()
 {
     parent::__construct();
 }