コード例 #1
0
 function _displayModal($tpl)
 {
     $mainframe = JFactory::getApplication();
     // 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->assignRef('lists', $lists);
     $this->assignRef('project_id', $proj_id);
     parent::display($tpl);
 }
コード例 #2
0
 function display($tpl = null)
 {
     $option = JRequest::getCmd('option');
     $app = JFactory::getApplication();
     $uri = JFactory::getURI();
     $user = JFactory::getUser();
     $mainframe =& JFactory::getApplication();
     $model = $this->getModel();
     $lists = array();
     //get template data
     $template =& $this->get('data');
     $isNew = $template->id < 1;
     // fail if checked out not by 'me'
     if ($model->isCheckedOut($user->get('id'))) {
         $msg = JText::sprintf('DESCBEINGEDITTED', JText::_('COM_JOOMLEAGUE_ADMIN_TEMPLATE_THETEMPLATE'), $template->name);
         $app->redirect('index.php?option=' . $option, $msg);
     }
     $projectws =& $this->get('Data', 'projectws');
     $templatepath = JPATH_COMPONENT_SITE . DS . 'settings';
     $xmlfile = $templatepath . DS . 'default' . DS . $template->template . '.xml';
     $mainframe->setUserState($option . 'template_help', $template->template);
     $extensions = JoomleagueHelper::getExtensions(JRequest::getInt('p'));
     foreach ($extensions as $e => $extension) {
         $extensiontpath = JPATH_COMPONENT_SITE . DS . 'extensions' . DS . $extension;
         if (is_dir($extensiontpath . DS . 'settings' . DS . 'default')) {
             if (file_exists($extensiontpath . DS . 'settings' . DS . 'default' . DS . $template->template . '.xml')) {
                 $xmlfile = $extensiontpath . DS . 'settings' . DS . 'default' . DS . $template->template . '.xml';
             }
         }
     }
     $jRegistry = new JRegistry();
     $jRegistry->loadString($template->params, 'ini');
     $form =& JForm::getInstance($template->template, $xmlfile, array('control' => 'params'));
     $form->bind($jRegistry);
     $form_value = $form->getValue('person_events');
     if ($form_value) {
         $form->setValue('person_events', null, explode(",", $form_value));
     }
     $master_id = $projectws->master_template ? $projectws->master_template : '-1';
     $templates = array();
     //$templates[]=JHTML::_('select.option','0',JText::_('COM_JOOMLEAGUE_ADMIN_TEMPLATE_OTHER_TEMPLATE' ),'value','text');
     if ($res = $model->getAllTemplatesList($projectws->id, $master_id)) {
         $templates = array_merge($templates, $res);
     }
     $lists['templates'] = JHTMLSelect::genericlist($templates, 'select_id', 'class="inputbox" size="1" onchange="javascript: Joomla.submitbutton(\'template.apply\');"', 'value', 'text', $template->id);
     unset($res);
     unset($templates);
     $this->assignRef('request_url', $uri->toString());
     $this->assignRef('template', $template);
     $this->assignRef('form', $form);
     $this->assignRef('project', $projectws);
     $this->assignRef('lists', $lists);
     $this->assignRef('user', $user);
     $this->addToolbar();
     parent::display($tpl);
 }
コード例 #3
0
ファイル: default.php プロジェクト: annggeel/tienda
            </td>
    		<td style="text-align: center;">
    		    <?php 
echo TiendaSelect::btbooleanlist('createproductfileserver_enabled', '', '');
?>
    		</td>
            <td style="text-align: center;">
                <?php 
$helper = Tienda::getClass('TiendaHelperProduct', 'helpers.product');
$path = $helper->getFilePath($row->product_id);
$files = $helper->getServerFiles($path);
$list = array();
foreach (@$files as $file) {
    $list[] = TiendaSelect::option($file, $file);
}
echo JHTMLSelect::genericlist($list, 'createproductfileserver_file');
?>
            </td>
            <td style="text-align: center;">
                <input type="text" name="createproductfileserver_max_download" id="createproductfileserver_max_download" value="-1" size="10" maxlength="250" />
            </td>
            
    	</tr>
    	</tbody>
    </table>

</div>

<div class="note_green" style="width: 96%; margin-left: auto; margin-right: auto;">
    <div style="float: left; font-size: 1.3em; font-weight: bold; height: 30px;"><?php 
echo JText::_('COM_TIENDA_CURRENT_FILES');
コード例 #4
0
 function _displayEditlist($tpl)
 {
     $option = JRequest::getCmd('option');
     $mainframe = JFactory::getApplication();
     $project_id = $mainframe->getUserState($option . 'project');
     $db = JFactory::getDBO();
     $uri = JFactory::getURI();
     $filter_state = $mainframe->getUserStateFromRequest($option . 'tl_filter_state', 'filter_state', '', 'word');
     $filter_order = $mainframe->getUserStateFromRequest($option . 'tl_filter_order', 'filter_order', 't.name', 'cmd');
     $filter_order_Dir = $mainframe->getUserStateFromRequest($option . 'tl_filter_order_Dir', 'filter_order_Dir', '', 'word');
     $search = $mainframe->getUserStateFromRequest($option . 'tl_search', 'search', '', 'string');
     $search_mode = $mainframe->getUserStateFromRequest($option . 'tl_search_mode', 'search_mode', '', 'string');
     $search = JString::strtolower($search);
     $projectteam =& $this->get('Data');
     $total =& $this->get('Total');
     $pagination =& $this->get('Pagination');
     $model = $this->getModel();
     // 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;
     $projectws =& $this->get('Data', 'projectws');
     //build the html select list for project assigned teams
     $ress = array();
     $res1 = array();
     $notusedteams = array();
     if ($ress =& $model->getProjectTeams($project_id)) {
         $teamslist = array();
         foreach ($ress as $res) {
             if (empty($res1->info)) {
                 $project_teamslist[] = JHTMLSelect::option($res->value, $res->text);
             } else {
                 $project_teamslist[] = JHTMLSelect::option($res->value, $res->text . ' (' . $res->info . ')');
             }
         }
         $lists['project_teams'] = JHTMLSelect::genericlist($project_teamslist, 'project_teamslist[]', ' style="width:250px; height:300px;" class="inputbox" multiple="true" size="' . min(30, count($ress)) . '"', 'value', 'text');
     } else {
         $lists['project_teams'] = '<select name="project_teamslist[]" id="project_teamslist" style="width:250px; height:300px;" class="inputbox" multiple="true" size="10"></select>';
     }
     if ($ress1 =& $model->getTeams()) {
         if ($ress =& $model->getProjectTeams($project_id)) {
             foreach ($ress1 as $res1) {
                 $used = 0;
                 foreach ($ress as $res) {
                     if ($res1->value == $res->value) {
                         $used = 1;
                     }
                 }
                 if ($used == 0 && !empty($res1->info)) {
                     $notusedteams[] = JHTMLSelect::option($res1->value, $res1->text . ' (' . $res1->info . ')');
                 } elseif ($used == 0 && empty($res1->info)) {
                     $notusedteams[] = JHTMLSelect::option($res1->value, $res1->text);
                 }
             }
         } else {
             foreach ($ress1 as $res1) {
                 if (empty($res1->info)) {
                     $notusedteams[] = JHTMLSelect::option($res1->value, $res1->text);
                 } else {
                     $notusedteams[] = JHTMLSelect::option($res1->value, $res1->text . ' (' . $res1->info . ')');
                 }
             }
         }
     } else {
         JError::raiseWarning('ERROR_CODE', '<br />' . JText::_('COM_JOOMLEAGUE_ADMIN_PROJECTTEAMS_ADD_TEAM') . '<br /><br />');
     }
     //build the html select list for teams
     if (count($notusedteams) > 0) {
         $lists['teams'] = JHTMLSelect::genericlist($notusedteams, 'teamslist[]', ' style="width:250px; height:300px;" class="inputbox" multiple="true" size="' . min(30, count($notusedteams)) . '"', 'value', 'text');
     } else {
         $lists['teams'] = '<select name="teamslist[]" id="teamslist" style="width:250px; height:300px;" class="inputbox" multiple="true" size="10"></select>';
     }
     unset($res);
     unset($res1);
     unset($notusedteams);
     $this->assignRef('user', JFactory::getUser());
     $this->assignRef('lists', $lists);
     $this->assignRef('projectteam', $projectteam);
     $this->assignRef('projectws', $projectws);
     $this->assignRef('pagination', $pagination);
     $this->assignRef('request_url', $uri->toString());
     $this->addToolbar_Editlist();
     parent::display($tpl);
 }
コード例 #5
0
 function display($tpl = null)
 {
     $option = JRequest::getCmd('option');
     $mainframe = JFactory::getApplication();
     $uri = JFactory::getURI();
     $params =& JComponentHelper::getParams($option);
     $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');
     $model = $this->getModel();
     // 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;
     $projectws =& $this->get('Data', 'projectws');
     $roundws =& $this->get('Data', 'roundws');
     //build the html options for teams
     foreach ($matches as $row) {
         if ($row->divhomeid == '') {
             $row->divhomeid = 0;
         }
         if ($row->divawayid == '') {
             $row->divawayid = 0;
         }
         $teams[] = JHTML::_('select.option', '0', JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_TEAM'));
         $divhomeid = 0;
         //apply the filter only if both teams are from the same division
         //teams are not from the same division in tournament mode with divisions
         if ($row->divhomeid == $row->divawayid) {
             $divhomeid = $row->divhomeid;
         } else {
             $row->divhomeid = 0;
             $row->divawayid = 0;
         }
         if ($projectteams =& $model->getProjectTeamsOptions($divhomeid)) {
             $teams = array_merge($teams, $projectteams);
         }
         $lists['teams_' + $divhomeid] = $teams;
         unset($teams);
     }
     //build the html selectlist for rounds
     $model = $this->getModel('projectws');
     $ress = JoomleagueHelper::getRoundsOptions($model->_id, 'ASC', true);
     foreach ($ress as $res) {
         $datum = JoomleagueHelper::convertDate($res->round_date_first, 1) . ' - ' . JoomleagueHelper::convertDate($res->round_date_last, 1);
         $project_roundslist[] = JHTML::_('select.option', $res->id, sprintf("%s (%s)", $res->name, $datum));
     }
     $lists['project_rounds'] = JHTML::_('select.genericList', $project_roundslist, 'rid[]', 'class="inputbox" ' . 'onChange="document.getElementById(\'short_act\').value=\'rounds\';' . 'document.roundForm.submit();" ', 'value', 'text', $roundws->id);
     $lists['project_rounds2'] = JHTML::_('select.genericList', $project_roundslist, 'rid', 'class="inputbox" ', 'value', 'text', $roundws->id);
     // diddipoeler rounds for change in match
     $project_change_roundslist = array();
     if ($ress =& JoomleagueHelper::getRoundsOptions($model->_id, 'ASC', true)) {
         $project_change_roundslist = array_merge($project_change_roundslist, $ress);
     }
     $lists['project_change_rounds'] = $project_change_roundslist;
     unset($project_change_roundslist);
     //build the html selectlist for matches
     $overall_config = $model->getTemplateConfig('overall');
     if (isset($overall_config['use_jl_substitution']) && $overall_config['use_jl_substitution'] || isset($overall_config['use_jl_events']) && $overall_config['use_jl_events']) {
         $match_list = array();
         $mdd[] = JHTML::_('select.option', '0', JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_MATCH'));
         foreach ($matches as $row) {
             $mdd[] = JHTML::_('select.option', 'index3.php?option=com_joomleague&controller=match&task=editEvents&cid[0]=' . $row->id, $row->team1 . '-' . $row->team2);
         }
         $RosterEventMessage = isset($overall_config['use_jl_substitution']) && $overall_config['use_jl_substitution'] ? JText::_('COM_JOOMLEAGUE_ADMIN_MATCHES_LINEUP') : '';
         if (isset($overall_config['use_jl_events']) && $overall_config['use_jl_events']) {
             if (isset($overall_config['use_jl_events']) && $overall_config['use_jl_substitution']) {
                 $RosterEventMessage .= ' / ';
             }
             $RosterEventMessage .= JText::_('COM_JOOMLEAGUE_ADMIN_MATCHES_EVENTS');
         }
         $RosterEventMessage .= $RosterEventMessage != '' ? ':' : '';
         $lists['RosterEventMessage'] = $RosterEventMessage;
         $lists['round_matches'] = JHTML::_('select.genericList', $mdd, 'mdd', 'id="mdd" class="inputbox" onchange="jl_load_new_match_events(this,\'eventscontainer\')"', 'value', 'text', '0');
     }
     //build the html options for extratime
     $match_result_type[] = JHTMLSelect::option('0', JText::_('COM_JOOMLEAGUE_ADMIN_MATCHES_RT'));
     $match_result_type[] = JHTMLSelect::option('1', JText::_('COM_JOOMLEAGUE_ADMIN_MATCHES_OT'));
     $match_result_type[] = JHTMLSelect::option('2', JText::_('COM_JOOMLEAGUE_ADMIN_MATCHES_SO'));
     $lists['match_result_type'] = $match_result_type;
     unset($match_result_type);
     //build the html options for massadd create type
     $createTypes = array(0 => JText::_('COM_JOOMLEAGUE_ADMIN_MATCHES_MASSADD'), 1 => JText::_('COM_JOOMLEAGUE_ADMIN_MATCHES_MASSADD_1'), 2 => JText::_('COM_JOOMLEAGUE_ADMIN_MATCHES_MASSADD_2'));
     $ctOptions = array();
     foreach ($createTypes as $key => $value) {
         $ctOptions[] = JHTMLSelect::option($key, $value);
     }
     $lists['createTypes'] = JHTMLSelect::genericlist($ctOptions, 'ct[]', 'class="inputbox" onchange="javascript:displayTypeView();"', 'value', 'text', 1, 'ct');
     unset($createTypes);
     // build the html radio for adding into one round / all rounds
     $createYesNo = array(0 => JText::_('JNO'), 1 => JText::_('JYES'));
     $ynOptions = array();
     foreach ($createYesNo as $key => $value) {
         $ynOptions[] = JHTMLSelect::option($key, $value);
     }
     $lists['addToRound'] = JHTMLSelect::radiolist($ynOptions, 'addToRound', 'class="inputbox"', 'value', 'text', 0);
     // build the html radio for auto publish new matches
     $lists['autoPublish'] = JHTMLSelect::radiolist($ynOptions, 'autoPublish', 'class="inputbox"', 'value', 'text', 0);
     //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('division', $division);
     $this->assignRef('user', JFactory::getUser());
     $this->assignRef('lists', $lists);
     $this->assignRef('matches', $matches);
     $this->assignRef('ress', $ress);
     $this->assignRef('projectws', $projectws);
     $this->assignRef('roundws', $roundws);
     $this->assignRef('pagination', $pagination);
     $this->assignRef('request_url', $uri->toString());
     $this->assignRef('prefill', $params->get('use_prefilled_match_roster', 0));
     $this->addToolbar();
     parent::display($tpl);
 }
コード例 #6
0
 function _displayForm($tpl)
 {
     $option = JRequest::getCmd('option');
     $mainframe =& JFactory::getApplication();
     $document = JFactory::getDocument();
     $db =& JFactory::getDBO();
     $uri =& JFactory::getURI();
     $user =& JFactory::getUser();
     $model =& $this->getModel();
     $edit = JRequest::getVar('edit', true);
     $addposition = JRequest::getVar('addposition');
     $this->assignRef('edit', $edit);
     $lists = array();
     //get the project
     $object =& $this->get('data');
     $isNew = $object->id < 1;
     $bildpositionenhome = array();
     $bildpositionenhome[HOME_POS][0][heim][oben] = 5;
     $bildpositionenhome[HOME_POS][0][heim][links] = 233;
     $bildpositionenhome[HOME_POS][1][heim][oben] = 113;
     $bildpositionenhome[HOME_POS][1][heim][links] = 69;
     $bildpositionenhome[HOME_POS][2][heim][oben] = 113;
     $bildpositionenhome[HOME_POS][2][heim][links] = 179;
     $bildpositionenhome[HOME_POS][3][heim][oben] = 113;
     $bildpositionenhome[HOME_POS][3][heim][links] = 288;
     $bildpositionenhome[HOME_POS][4][heim][oben] = 113;
     $bildpositionenhome[HOME_POS][4][heim][links] = 397;
     $bildpositionenhome[HOME_POS][5][heim][oben] = 236;
     $bildpositionenhome[HOME_POS][5][heim][links] = 179;
     $bildpositionenhome[HOME_POS][6][heim][oben] = 236;
     $bildpositionenhome[HOME_POS][6][heim][links] = 288;
     $bildpositionenhome[HOME_POS][7][heim][oben] = 318;
     $bildpositionenhome[HOME_POS][7][heim][links] = 69;
     $bildpositionenhome[HOME_POS][8][heim][oben] = 318;
     $bildpositionenhome[HOME_POS][8][heim][links] = 233;
     $bildpositionenhome[HOME_POS][9][heim][oben] = 318;
     $bildpositionenhome[HOME_POS][9][heim][links] = 397;
     $bildpositionenhome[HOME_POS][10][heim][oben] = 400;
     $bildpositionenhome[HOME_POS][10][heim][links] = 233;
     $bildpositionenaway = array();
     $bildpositionenaway[AWAY_POS][0][heim][oben] = 970;
     $bildpositionenaway[AWAY_POS][0][heim][links] = 233;
     $bildpositionenaway[AWAY_POS][1][heim][oben] = 828;
     $bildpositionenaway[AWAY_POS][1][heim][links] = 69;
     $bildpositionenaway[AWAY_POS][2][heim][oben] = 828;
     $bildpositionenaway[AWAY_POS][2][heim][links] = 179;
     $bildpositionenaway[AWAY_POS][3][heim][oben] = 828;
     $bildpositionenaway[AWAY_POS][3][heim][links] = 288;
     $bildpositionenaway[AWAY_POS][4][heim][oben] = 828;
     $bildpositionenaway[AWAY_POS][4][heim][links] = 397;
     $bildpositionenaway[AWAY_POS][5][heim][oben] = 746;
     $bildpositionenaway[AWAY_POS][5][heim][links] = 179;
     $bildpositionenaway[AWAY_POS][6][heim][oben] = 746;
     $bildpositionenaway[AWAY_POS][6][heim][links] = 288;
     $bildpositionenaway[AWAY_POS][7][heim][oben] = 664;
     $bildpositionenaway[AWAY_POS][7][heim][links] = 69;
     $bildpositionenaway[AWAY_POS][8][heim][oben] = 664;
     $bildpositionenaway[AWAY_POS][8][heim][links] = 397;
     $bildpositionenaway[AWAY_POS][9][heim][oben] = 587;
     $bildpositionenaway[AWAY_POS][9][heim][links] = 179;
     $bildpositionenaway[AWAY_POS][10][heim][oben] = 587;
     $bildpositionenaway[AWAY_POS][10][heim][links] = 288;
     // fail if checked out not by 'me'
     if ($model->isCheckedOut($user->get('id'))) {
         $msg = JText::sprintf('DESCBEINGEDITTED', JText::_('COM_JOOMLEAGUE_ADMIN_ROSTERPOSITION'), $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;
     }
     //build the html select list for countries
     $countries[] = JHTML::_('select.option', '', JText::_('COM_JOOMLEAGUE_ADMIN_ROSTERPOSITIONS_SELECT_COUNTRY'));
     if ($res =& Countries::getCountryOptions()) {
         $countries = array_merge($countries, $res);
     }
     $lists['countries'] = JHTML::_('select.genericlist', $countries, 'country', 'class="inputbox" size="1"', 'value', 'text', $object->country);
     unset($countries);
     // build the html select list for ordering
     $query = 'SELECT ordering AS value,name AS text FROM	#__joomleague_rosterposition ORDER BY ordering ';
     $lists['ordering'] = JHTML::_('list.specificordering', $object, $object->id, $query, 1);
     //     $document->addScript( JURI::base(true).'/components/com_joomleague/assets/js/dragpull.js');
     /*
      * extended data
      */
     //     echo JPATH_COMPONENT.'<br>';
     //     echo JPATH_COMPONENT_SITE.'<br>';
     //$paramsdata=$object->extended;
     //    $paramsdefs=JPATH_COMPONENT.DS.'assets'.DS.'extended'.DS.'rosterposition.xml';
     //     echo $paramsdefs.'<br>';
     //    $extended=new JLGExtraParams($paramsdata,$paramsdefs);
     $this->assignRef('form', $this->get('form'));
     $extended = $this->getExtended($object->extended, 'rosterposition');
     $this->assignRef('extended', $extended);
     $this->assign('show_debug_info', JComponentHelper::getParams('com_joomleague')->get('show_debug_info', 0));
     $this->assign('jquery_version', JComponentHelper::getParams('com_joomleague')->get('jqueryversionfrontend', 0));
     $this->assign('jquery_sub_version', JComponentHelper::getParams('com_joomleague')->get('jquerysubversionfrontend', 0));
     $this->assign('jquery_ui_version', JComponentHelper::getParams('com_joomleague')->get('jqueryuiversionfrontend', 0));
     $this->assign('jquery_ui_sub_version', JComponentHelper::getParams('com_joomleague')->get('jqueryuisubversionfrontend', 0));
     if (!$this->edit) {
         // neu
         $position = 1;
         $object->name = $addposition;
         $object->short_name = $addposition;
         $xmlfile = JPATH_COMPONENT_ADMINISTRATOR . DS . 'assets' . DS . 'extended' . DS . 'rosterposition.xml';
         $extended = JForm::getInstance('extended', $xmlfile, array('control' => 'extended'), false, '/config');
         $jRegistry = new JRegistry();
         $jRegistry->loadString('', 'ini');
         $extended->bind($jRegistry);
         switch ($addposition) {
             case 'HOME_POS':
                 for ($a = 0; $a < 11; $a++) {
                     $extended->setValue('COM_JOOMLEAGUE_EXT_ROSTERPOSITIONS_' . $position . '_TOP', null, $bildpositionenhome[$object->name][$a]['heim']['oben']);
                     $extended->setValue('COM_JOOMLEAGUE_EXT_ROSTERPOSITIONS_' . $position . '_LEFT', null, $bildpositionenhome[$object->name][$a]['heim']['links']);
                     $position++;
                 }
                 $this->assignRef('bildpositionen', $bildpositionenhome);
                 break;
             case 'AWAY_POS':
                 for ($a = 0; $a < 11; $a++) {
                     $extended->setValue('COM_JOOMLEAGUE_EXT_ROSTERPOSITIONS_' . $position . '_TOP', null, $bildpositionenaway[$object->name][$a]['heim']['oben']);
                     $extended->setValue('COM_JOOMLEAGUE_EXT_ROSTERPOSITIONS_' . $position . '_LEFT', null, $bildpositionenaway[$object->name][$a]['heim']['links']);
                     $position++;
                 }
                 $this->assignRef('bildpositionen', $bildpositionenaway);
                 break;
         }
         $object->extended = $extended;
     } else {
         // bearbeiten positionen übergeben
         $position = 1;
         //$xmlfile=JPATH_COMPONENT_ADMINISTRATOR.DS.'assets'.DS.'extended'.DS.'rosterposition.xml';
         $jRegistry = new JRegistry();
         $jRegistry->loadString($object->extended, 'ini');
         for ($a = 0; $a < 11; $a++) {
             $bildpositionen[$object->name][$a]['heim']['oben'] = $jRegistry->get('COM_JOOMLEAGUE_EXT_ROSTERPOSITIONS_' . $position . '_TOP');
             $bildpositionen[$object->name][$a]['heim']['links'] = $jRegistry->get('COM_JOOMLEAGUE_EXT_ROSTERPOSITIONS_' . $position . '_LEFT');
             $position++;
         }
         $this->assignRef('bildpositionen', $bildpositionen);
     }
     $project_type = array(JHTMLSelect::option('HOME_POS', JText::_('HOME_POS'), 'id', 'name'), JHTMLSelect::option('AWAY_POS', JText::_('AWAY_POS'), 'id', 'name'));
     $lists['project_type'] = JHTMLSelect::genericlist($project_type, 'short_name', 'class="inputbox" size="1"', 'id', 'name', $object->short_name);
     unset($project_type);
     // Add Script
     //$document->addScript('https://ajax.googleapis.com/ajax/libs/jquery/'.$this->jquery_version.'/jquery.min.js');
     //$document->addScript('https://ajax.googleapis.com/ajax/libs/jqueryui/'.$this->jquery_ui_version.'.'.$this->jquery_ui_sub_version.'/jquery-ui.min.js');
     //$javascript .= "\n".'var $JoLe2 = jQuery.noConflict();' . "\n";
     $javascript .= "\n";
     $javascript .= 'jQuery(document).ready(function() {' . "\n";
     $start = 1;
     $ende = 11;
     for ($a = $start; $a <= $ende; $a++) {
         $javascript .= '    jQuery("#draggable_' . $a . '").draggable({stop: function(event, ui) {
 	// Show dropped position.
 	var Stoppos = jQuery(this).position();
 	jQuery("div#stop").text("STOP: \\nLeft: "+ Stoppos.left + "\\nTop: " + Stoppos.top);
 	jQuery("#extended_COM_JOOMLEAGUE_EXT_ROSTERPOSITIONS_' . $a . '_TOP").val(Stoppos.top);
   jQuery("#extended_COM_JOOMLEAGUE_EXT_ROSTERPOSITIONS_' . $a . '_LEFT").val(Stoppos.left);
 }});' . "\n";
     }
     $javascript .= '  });' . "\n";
     $javascript .= "\n";
     $document->addScriptDeclaration($javascript);
     $this->assignRef('form', $this->get('form'));
     $this->assignRef('lists', $lists);
     $this->assignRef('object', $object);
     parent::display($tpl);
 }
コード例 #7
0
							<td class="nowrap" class="center">
								<?php 
        $append = '';
        if (empty($row->country)) {
            $append = ' background-color:#FFCCCC;';
        }
        echo JHTMLSelect::genericlist($this->lists['nation'], 'country' . $row->id, $inputappend . ' class="inputbox" style="width:140px; ' . $append . '" onchange="document.getElementById(\'cb' . $i . '\').checked=true"', 'value', 'text', $row->country);
        ?>
							</td>
							<td class="nowrap" class="center">
								<?php 
        $append = '';
        if (empty($row->position_id)) {
            $append = ' background-color:#FFCCCC;';
        }
        echo JHTMLSelect::genericlist($this->lists['positions'], 'position' . $row->id, $inputappend . 'class="inputbox" style="width:140px; ' . $append . '" onchange="document.getElementById(\'cb' . $i . '\').checked=true"', 'value', 'text', $row->position_id);
        ?>
							</td>
							<td class="center"><?php 
        echo $published;
        ?>
</td>
							<td class="center"><?php 
        echo $row->id;
        ?>
</td>
						</tr>
						<?php 
        $k = 1 - $k;
    }
}
コード例 #8
0
ファイル: view.html.php プロジェクト: jtresca/nysurveyor
 function _getOptionsLists($request, $params, $link)
 {
     global $Itemid;
     $this->ac_Jimport('joomla.html.html.select');
     $lists = array();
     if ($request['section'] != '') {
         $link .= "&amp;section=" . $request['section'];
     }
     if ($request['category'] != '') {
         $link .= "&amp;category=" . $request['category'];
     }
     $thelimit = "&amp;limitstart=" . $request['limitstart'] . "&amp;limit=" . $request['limit'] . "&amp;Itemid=" . $Itemid;
     if ($params->get('list_showorderinglist')) {
         if ($request['ordering'] == '') {
             $request['ordering'] = $params->get('list_defaultordering');
         }
         $options = array();
         $options[] = JHTMLSelect::Option('', JText::_('AC_ORDERING_BY'));
         $options[] = JHTMLSelect::Option(JRoute::_($link . '&amp;ordering=1' . $thelimit), JText::_('AC_TITLEAZ'));
         $options[] = JHTMLSelect::Option(JRoute::_($link . '&amp;ordering=2' . $thelimit), JText::_('AC_TITLEZA'));
         if ($request['section'] != 'weblinks' && $request['section'] != 'contacts') {
             $options[] = JHTMLSelect::Option(JRoute::_($link . '&amp;ordering=3' . $thelimit), JText::_('AC_DATECREATEDASC'));
             $options[] = JHTMLSelect::Option(JRoute::_($link . '&amp;ordering=4' . $thelimit), JText::_('AC_DATECREATEDDESC'));
             $options[] = JHTMLSelect::Option(JRoute::_($link . '&amp;ordering=5' . $thelimit), JText::_('AC_DATEMODIFIEDASC'));
             $options[] = JHTMLSelect::Option(JRoute::_($link . '&amp;ordering=6' . $thelimit), JText::_('AC_DATEMODIFIEDDESC'));
             $options[] = JHTMLSelect::Option(JRoute::_($link . '&amp;ordering=7' . $thelimit), JText::_('AC_HITSASC'));
             $options[] = JHTMLSelect::Option(JRoute::_($link . '&amp;ordering=8' . $thelimit), JText::_('AC_HITSDESC'));
             $options[] = JHTMLSelect::Option(JRoute::_($link . '&amp;ordering=9' . $thelimit), JText::_('AC_RATINGASC'));
             $options[] = JHTMLSelect::Option(JRoute::_($link . '&amp;ordering=10' . $thelimit), JText::_('AC_RATINGDESC'));
             $options[] = JHTMLSelect::Option(JRoute::_($link . '&amp;ordering=11' . $thelimit), JText::_('AC_AUTHORASC'));
             $options[] = JHTMLSelect::Option(JRoute::_($link . '&amp;ordering=12' . $thelimit), JText::_('AC_AUTHORDESC'));
         }
         $options[] = JHTMLSelect::Option(JRoute::_($link . '&amp;ordering=13' . $thelimit), JText::_('AC_DEFAULTORDERING'));
         $lists['list_defaultordering'] = JHTMLSelect::genericlist($options, 'ordering', 'class="inputbox" size="1" onchange="jumpmenu(\'parent\',this,1)"', 'value', 'text', $request['ordering']);
     }
     // create list field search
     if ($params->get('list_showsearchbox')) {
         $options = array();
         $options[] = JHTMLSelect::Option('a.title', JText::_('AC_TITLE_ONLY'));
         $options[] = JHTMLSelect::Option('a.introtext', JText::_('AC_INTRO_ONLY'));
         $options[] = JHTMLSelect::Option('', JText::_('AC_TITLE_AND_INTRO'));
         $options[] = JHTMLSelect::Option('a.fulltext', JText::_('AC_CONTENT'));
         $options[] = JHTMLSelect::Option('a.metakey', JText::_('AC_KEYWORDS'));
         if ($request['section'] != 'weblinks' && $request['section'] != 'contacts') {
             $options[] = JHTMLSelect::Option('a.created_by_alias', str_replace(':', '', JText::_('AC_AUTHOR')));
         }
         $lists['list_searchfield'] = JHTMLSelect::genericlist($options, 'searchfield', 'class="inputbox" size="1"', 'value', 'text', $request['searchfield']);
     }
     return $lists;
 }
コード例 #9
0
 function _displayEditlist($tpl)
 {
     $option = JRequest::getCmd('option');
     $mainframe = JFactory::getApplication();
     $project_id = $mainframe->getUserState($option . 'project');
     $node_id = $mainframe->getUserState($option . 'node_id');
     $db = JFactory::getDBO();
     $uri = JFactory::getURI();
     $treetomatchs =& $this->get('Data');
     $total =& $this->get('Total');
     $model = $this->getModel();
     $projectws =& $this->get('Data', 'projectws');
     $nodews =& $this->get('Data', 'nodews');
     //build the html select list for node assigned matches
     $ress = array();
     $res1 = array();
     $notusedmatches = array();
     if ($ress =& $model->getNodeMatches($node_id)) {
         $matcheslist = array();
         foreach ($ress as $res) {
             if (empty($res1->info)) {
                 $node_matcheslist[] = JHTMLSelect::option($res->value, $res->text);
             } else {
                 $node_matcheslist[] = JHTMLSelect::option($res->value, $res->text . ' (' . $res->info . ')');
             }
         }
         $lists['node_matches'] = JHTMLSelect::genericlist($node_matcheslist, 'node_matcheslist[]', ' style="width:250px; height:300px;" class="inputbox" multiple="true" size="' . min(30, count($ress)) . '"', 'value', 'text');
     } else {
         $lists['node_matches'] = '<select name="node_matcheslist[]" id="node_matcheslist" style="width:250px; height:300px;" class="inputbox" multiple="true" size="10"></select>';
     }
     if ($ress1 =& $model->getMatches()) {
         if ($ress =& $model->getNodeMatches($node_id)) {
             foreach ($ress1 as $res1) {
                 $used = 0;
                 foreach ($ress as $res) {
                     if ($res1->value == $res->value) {
                         $used = 1;
                     }
                 }
                 if ($used == 0 && !empty($res1->info)) {
                     $notusedmatches[] = JHTMLSelect::option($res1->value, $res1->text . ' (' . $res1->info . ')');
                 } elseif ($used == 0 && empty($res1->info)) {
                     $notusedmatches[] = JHTMLSelect::option($res1->value, $res1->text);
                 }
             }
         } else {
             foreach ($ress1 as $res1) {
                 if (empty($res1->info)) {
                     $notusedmatches[] = JHTMLSelect::option($res1->value, $res1->text);
                 } else {
                     $notusedmatches[] = JHTMLSelect::option($res1->value, $res1->text . ' (' . $res1->info . ')');
                 }
             }
         }
     } else {
         JError::raiseWarning('ERROR_CODE', '<br />' . JText::_('COM_JOOMLEAGUE_ADMIN_TREETOMATCH_ADD_MATCH') . '<br /><br />');
     }
     //build the html select list for matches
     if (count($notusedmatches) > 0) {
         $lists['matches'] = JHTMLSelect::genericlist($notusedmatches, 'matcheslist[]', ' style="width:250px; height:300px;" class="inputbox" multiple="true" size="' . min(30, count($notusedmatches)) . '"', 'value', 'text');
     } else {
         $lists['matches'] = '<select name="matcheslist[]" id="matcheslist" style="width:250px; height:300px;" class="inputbox" multiple="true" size="10"></select>';
     }
     unset($res);
     unset($res1);
     unset($notusedmatches);
     $this->assignRef('user', JFactory::getUser());
     $this->assignRef('lists', $lists);
     $this->assignRef('treetomatchs', $treetomatchs);
     $this->assignRef('projectws', $projectws);
     $this->assignRef('nodews', $nodews);
     $this->assignRef('pagination', $pagination);
     $this->assignRef('request_url', $uri->toString());
     parent::display($tpl);
 }
コード例 #10
0
ファイル: default.php プロジェクト: annggeel/tienda
				
				</td>				
			</tr>
			<tr>
				<th style="width: 25%;">
					<?php 
echo JText::_('COM_TIENDA_EXPORT_TYPE');
?>
				</th>
				<td>
					<?php 
$list = array();
?>
					<?php 
foreach ($types as $type) {
    ?>
					<?php 
    $list[] = JHTML::_('select.option', $type, $type);
    ?>
					<?php 
}
?>
					<?php 
echo JHTMLSelect::genericlist($list, 'type', array('class' => 'inputbox', 'size' => '1'), 'value', 'text');
?>
				
				</td>								
			</tr>
		</tbody>	
	</table>	
</form>
コード例 #11
0
 function _displayPredSettings($tpl)
 {
     $option = JRequest::getCmd('option');
     $mainframe =& JFactory::getApplication();
     $db =& JFactory::getDBO();
     $uri =& JFactory::getURI();
     $user =& JFactory::getUser();
     $model =& $this->getModel();
     $lists = array();
     //get the prediction game and the predicition project
     $prediction =& $this->get('data');
     $pred_project = $model->getPredictionProject();
     $isNew = $prediction->id < 1;
     // fail if checked out not by 'me'
     if ($model->isCheckedOut($user->get('id'))) {
         $msg = JText::sprintf('DESCBEINGEDITTED', JText::_('JL_ADMIN_PGAME_THE_PREDICTIONGAME'), $pred_project->project_name);
         $mainframe->redirect('index.php?option=' . $option, $msg);
     }
     // Edit or Create?
     if (!$isNew) {
         $model->checkout($user->get('id'));
     }
     // build the html radio for usage of published
     $lists['published'] = JHTML::_('select.booleanlist', 'published', 'class="inputbox" onclick="change_published(); " ', $pred_project->published);
     // build the html dropdown for Prediction game mode
     $mode = array(JHTMLSelect::option('1', JText::_('JL_ADMIN_PGAME_PRED_TOTO'), 'id', 'name'), JHTMLSelect::option('0', JText::_('JL_ADMIN_PGAME_PRED_TIPP'), 'id', 'name'));
     $lists['mode'] = JHTMLSelect::genericlist($mode, 'mode', 'class="inputbox" size="1" disabled="disabled" ', 'id', 'name', $pred_project->mode);
     unset($mode);
     // build the html dropdown for Prediction game mode
     $overview = array(JHTMLSelect::option('1', JText::_('JL_ADMIN_PGAME_TIPP_HALF'), 'id', 'name'), JHTMLSelect::option('0', JText::_('JL_ADMIN_PGAME_TIPP_COMPLETE'), 'id', 'name'));
     $lists['overview'] = JHTMLSelect::genericlist($overview, 'overview', 'class="inputbox" size="1" disabled="disabled" ', 'id', 'name', $pred_project->overview);
     unset($overview);
     // build the html radio for usage of tipp joker
     $lists['use_joker'] = JHTMLSelect::booleanlist('joker', 'class="inputbox" onclick="change_joker(); " disabled="disabled" ', $pred_project->joker);
     // build the html radio for limitation of tipp joker
     $joker_limit = $pred_project->joker_limit > 0;
     $lists['joker_limit'] = JHTMLSelect::booleanlist('joker_limit_select', 'class="inputbox" onclick="change_jokerlimit(); " disabled="disabled" ', $joker_limit);
     // build the html radio for usage of tipp champ
     $lists['use_champ'] = JHTMLSelect::booleanlist('champ', 'class="inputbox" onclick="change_champ(); " disabled="disabled" ', $pred_project->champ);
     $league_teams[] = JHTML::_('select.option', '0', JText::_('JL_ADMIN_PGAME_SET_CHAMPION'), 'id', 'name');
     if ($allLeagues =& $model->getProjectTeams($pred_project->project_id)) {
         $league_teams = array_merge($league_teams, $allLeagues);
     }
     $lists['league_teams'] = JHTMLSelect::genericlist($league_teams, 'league_champ', 'class="inputbox" size="' . sizeof($allLeagues) . '"', 'id', 'name', $pred_project->league_champ);
     #echo '<pre>'.print_r($projects,true).'</pre>';
     unset($allLeagues);
     $this->assignRef('lists', $lists);
     $this->assignRef('prediction', $prediction);
     $this->assignRef('pred_project', $pred_project);
     parent::display($tpl);
 }