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 _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);
 }
Ejemplo n.º 3
0
 function getInput()
 {
     if (FLEXI_J16GE) {
         $node =& $this->element;
         $attributes = get_object_vars($node->attributes());
         $attributes = $attributes['@attributes'];
     } else {
         $attributes =& $node->_attributes;
     }
     $themes = flexicontent_tmpl::getTemplates();
     $tmpls = $themes->category;
     $view = JRequest::getVar('view');
     $value = FLEXI_J16GE ? $this->value : $value;
     $value = $value ? $value : $attributes['default'];
     $lays = array();
     foreach ($tmpls as $tmpl) {
         $lays[] = $tmpl->name;
     }
     $lays = implode("','", $lays);
     if (@$attributes['enableparam']) {
         $cparams = JComponentHelper::getParams('com_flexicontent');
         if (!$cparams->get($attributes['enableparam'])) {
             return FLEXI_J16GE ? '' : JText::_('FLEXI_DISABLED');
         }
     }
     if (!@$attributes['skipparams']) {
         $doc = JFactory::getDocument();
         $js = "\nvar tmpl = ['" . $lays . "'];\t\n\nfunction disablePanel(element) {\n\tvar panel \t= \$(element+'-attribs-options').getNext();\n\tvar selects = panel.getElements('select');\n\tvar inputs \t= panel.getElements('input');\n\tpanel.getParent().addClass('pane-disabled');\n\tselects.each(function(el){\n\t\tel.setProperty('disabled', 'disabled');\n\t});\n\tinputs.each(function(el){\n\t\tel.setProperty('disabled', 'disabled');\n\t});\n\tpanel.getParent().setStyle('display','none');\n}\n\nfunction enablePanel(element) {\n\tvar panel \t= \$(element+'-attribs-options').getNext();\n\tvar selects = panel.getElements('select');\n\tvar inputs \t= panel.getElements('input');\n\tpanel.getParent().removeClass('pane-disabled');\n\tselects.each(function(el){\n    \tel.setProperty('disabled', '');\n\t});\n\tinputs.each(function(el){\n    \tel.setProperty('disabled', '');\n\t});\n\tpanel.getParent().setStyle('display','');\n}\n\nfunction activatePanel(active) {\n\tvar inactives = tmpl.filter(function(item, index){\n\t\treturn item != active;\n\t\t});\n\t\t\t\n\tinactives.each(function(el){\n\t\tdisablePanel(el);\n\t\t});\n\t\t\n\tif (active) enablePanel(active);\n}\n\nwindow.addEvent('domready', function(){\n\tactivatePanel('" . $value . "');\t\t\t\n});\n";
         $doc->addScriptDeclaration($js);
     }
     $layouts = array();
     if (@$attributes['firstoption']) {
         $layouts[] = JHTMLSelect::option('', JText::_($attributes['firstoption']));
     }
     if ($tmpls !== false) {
         if ($view != 'category' && $view != 'user') {
             $layouts[] = JHTMLSelect::option('', JText::_('FLEXI_USE_GLOBAL'));
         }
         foreach ($tmpls as $tmpl) {
             $layouts[] = JHTMLSelect::option($tmpl->name, $tmpl->name);
         }
     }
     $fieldname = FLEXI_J16GE ? $this->name : $control_name . '[' . $name . ']';
     $element_id = FLEXI_J16GE ? $this->id : $control_name . $name;
     $attribs = !FLEXI_J16GE ? ' style="float:left;" ' : '';
     if (@$attributes['multiple'] == 'multiple' || @$attributes['multiple'] == 'true') {
         $attribs .= ' multiple="multiple" ';
         $attribs .= @$attributes['size'] ? ' size="' . @$attributes['size'] . '" ' : ' size="6" ';
         $fieldname .= !FLEXI_J16GE ? "[]" : "";
         // NOTE: this added automatically in J2.5
     } else {
         $attribs .= 'class="inputbox"';
     }
     if (!@$attributes['skipparams']) {
         $attribs .= ' onchange="activatePanel(this.value);"';
     }
     return JHTML::_('select.genericlist', $layouts, $fieldname, $attribs, 'value', 'text', $value, $element_id);
 }
 function _displayDefault($tpl)
 {
     $option = JRequest::getCmd('option');
     $mainframe = JFactory::getApplication();
     $db = JFactory::getDBO();
     $uri = JFactory::getURI();
     $node =& $this->get('Data');
     $total =& $this->get('Total');
     $pagination =& $this->get('Pagination');
     $model = $this->getModel();
     $projectws =& $this->get('Data', 'projectws');
     $treetows =& $this->get('Data', 'treetows');
     //build the html options for teams
     $team_id[] = JHTML::_('select.option', '0', JText::_('COM_JOOMLEAGUE_GLOBAL_SELECT_TEAM'));
     if ($projectteams =& $model->getProjectTeamsOptions()) {
         $team_id = array_merge($team_id, $projectteams);
     }
     $lists['team'] = $team_id;
     unset($team_id);
     $style = 'style="background-color: #dddddd; ';
     $style .= 'border: 0px solid white;';
     $style .= 'font-weight: normal; ';
     $style .= 'font-size: 8pt; ';
     $style .= 'width: 150px; ';
     $style .= 'font-family: verdana; ';
     $style .= 'text-align: center;"';
     $path = 'media/com_joomleague/treebracket/onwhite/';
     // build the html radio for adding into new round / exist round
     $createYesNo = array(0 => JText::_('JNO'), 1 => JText::_('JYES'));
     $createLeftRight = array(0 => JText::_('L'), 1 => JText::_('R'));
     $ynOptions = array();
     $lrOptions = array();
     foreach ($createYesNo as $key => $value) {
         $ynOptions[] = JHTMLSelect::option($key, $value);
     }
     foreach ($createLeftRight as $key => $value) {
         $lrOptions[] = JHTMLSelect::option($key, $value);
     }
     $lists['addToRound'] = JHTMLSelect::radiolist($ynOptions, 'addToRound', 'class="inputbox"', 'value', 'text', 1);
     // build the html radio for auto publish new matches
     $lists['autoPublish'] = JHTMLSelect::radiolist($ynOptions, 'autoPublish', 'class="inputbox"', 'value', 'text', 0);
     // build the html radio for Left or Right redepth
     $lists['LRreDepth'] = JHTMLSelect::radiolist($lrOptions, 'LRreDepth', 'class="inputbox"', 'value', 'text', 0);
     // build the html radio for create new treeto
     $lists['createNewTreeto'] = JHTMLSelect::radiolist($ynOptions, 'createNewTreeto', 'class="inputbox"', 'value', 'text', 1);
     $this->assignRef('lists', $lists);
     $this->assignRef('node', $node);
     //	$this->assignRef('roundcode',$roundcode);
     $this->assignRef('style', $style);
     $this->assignRef('path', $path);
     $this->assignRef('projectws', $projectws);
     $this->assignRef('treetows', $treetows);
     $this->assignRef('total', $total);
     $this->assignRef('pagination', $pagination);
     $this->assignRef('request_url', $uri->toString());
     parent::display($tpl);
 }
 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);
 }
Ejemplo n.º 6
0
 function fetchElement($name, $value, &$node, $control_name)
 {
     $db =& JFactory::getDBO();
     $name = 'gid';
     // URL variable to add is 'gid', which is id in #__rsgallery2_galleries
     //Get galleries for optionlist from database
     $query = 'SELECT id as gid, name' . ' FROM #__rsgallery2_galleries' . ' WHERE published = 1' . ' ORDER BY name';
     $db->setQuery($query);
     $options = $db->loadObjectList();
     //Add default option (no value)
     $options[] = JHTMLSelect::option('', JText::_('ROOT GALLERY'), 'gid', 'name');
     return JHTML::_('select.genericlist', $options, '' . $control_name . '[' . $name . ']', 'class="inputbox"', 'gid', 'name', $value, $control_name . $name);
 }
Ejemplo n.º 7
0
 function fetchElement($name, $value, &$node, $control_name)
 {
     # cache activation
     $cache =& JFactory::getCache('JLanguage');
     $admin = $cache->call('JLanguage::getKnownLanguages', JPATH_ADMINISTRATOR);
     $site = $cache->call('JLanguage::getKnownLanguages', JPATH_SITE);
     # only languages in both site and admin can be reference languages
     $languages = array();
     foreach ($admin as $k => $v) {
         if (isset($site[$k])) {
             $languages[] = array('value' => $k, 'text' => $v['name']);
         }
     }
     # return the select box
     return JHTMLSelect::genericList($languages, '' . $control_name . '[' . $name . ']', 'class="inputbox"', 'value', 'text', $value, $control_name . $name);
 }
Ejemplo n.º 8
0
 protected function getInput()
 {
     $node =& $this->element;
     $attributes = get_object_vars($node->attributes());
     $attributes = $attributes['@attributes'];
     $themes = flexicontent_tmpl::getTemplates();
     $tmpls = $themes->category ? $themes->category : array();
     $values = $this->value;
     if (empty($values)) {
         $values = array();
     }
     if (!is_array($values)) {
         $values = preg_split("/[\\|,]/", $values);
     }
     $fieldname = $this->name;
     $element_id = $this->id;
     // Field parameter (attributes)
     $attribs = '';
     $classes = 'use_select2_lib ';
     $classes .= @$attributes['required'] && @$attributes['required'] != 'false' ? ' required' : '';
     $classes .= @$attributes['class'] ? ' ' . $attributes['class'] : '';
     $attribs = ' class="' . $classes . '" ' . $attribs;
     $attribs .= ' style="float:left;" ';
     if (@$attributes['multiple'] == 'multiple' || @$attributes['multiple'] == 'true') {
         $attribs .= ' multiple="multiple" ';
         $attribs .= @$attributes['size'] ? ' size="' . $attributes['size'] . '" ' : ' size="6" ';
     } else {
         array_unshift($types, JHTML::_('select.option', '', JText::_('FLEXI_PLEASE_SELECT')));
         $attribs .= 'class="inputbox"';
     }
     if ($onchange = @$attributes['onchange']) {
         $attribs .= ' onchange="' . $onchange . '"';
     }
     // Field data (the templates)
     $lays = array();
     foreach ($tmpls as $tmpl) {
         $lays[] = $tmpl->name;
     }
     $lays = implode("','", $lays);
     if ($tmpls !== false) {
         foreach ($tmpls as $tmpl) {
             $layouts[] = JHTMLSelect::option($tmpl->name, $tmpl->name);
         }
     }
     return JHTML::_('select.genericlist', $layouts, $fieldname, $attribs, 'value', 'text', $values, $element_id);
 }
Ejemplo n.º 9
0
 function fetchElement($name, $value, &$node, $control_name)
 {
     $doc = JFactory::getDocument();
     $db = JFactory::getDBO();
     if (FLEXI_J16GE) {
         $node =& $this->element;
         $attributes = get_object_vars($node->attributes());
         $attributes = $attributes['@attributes'];
     } else {
         $attributes =& $node->_attributes;
     }
     $values = FLEXI_J16GE ? $this->value : $value;
     if (empty($values)) {
         $values = array();
     } else {
         if (!is_array($values)) {
             $values = !FLEXI_J16GE ? array($values) : explode("|", $values);
         }
     }
     $fieldname = FLEXI_J16GE ? $this->name : $control_name . '[' . $name . ']';
     $element_id = FLEXI_J16GE ? $this->id : $control_name . $name;
     // 'multiple' attribute in XML adds '[]' automatically in J2.5 and manually in J1.5
     // This field is always multiple, we will add '[]' WHILE checking for the attribute ...
     $is_multiple = @$attributes['multiple'] == 'multiple' || @$attributes['multiple'] == 'true';
     if (!FLEXI_J16GE || !$is_multiple) {
         $fieldname .= '[]';
     }
     $plggroup = @$attributes['plggroup'];
     $plggroup = $plggroup ? $plggroup : 'content';
     $query = 'SELECT element AS name' . ' FROM ' . (FLEXI_J16GE ? '#__extensions' : '#__plugins') . ' WHERE folder = ' . $db->Quote($plggroup) . (FLEXI_J16GE ? ' AND `type`=' . $db->Quote('plugin') : '') . ' AND element NOT IN (' . $db->Quote('pagebreak') . ',' . $db->Quote('pagenavigation') . ',' . $db->Quote('vote') . ')' . ' ORDER BY name';
     $db->setQuery($query);
     $plgs = $db->loadObjectList();
     $plugins = array();
     //$plugins[] 	= JHTMLSelect::option('', JText::_( 'FLEXI_ENABLE_ALL_PLUGINS' ));
     foreach ($plgs as $plg) {
         $plugins[] = JHTMLSelect::option($plg->name, $plg->name);
     }
     $class = 'class="inputbox" multiple="multiple" size="5"';
     $html = JHTMLSelect::genericList($plugins, $fieldname, $class, 'value', 'text', $values, $element_id);
     $onclick = "" . "{$element_id} = document.getElementById(\"{$element_id}\");" . "if ({$element_id}.size<40) {" . "\t{$element_id}_oldsize = {$element_id}.size;" . "\t{$element_id}.size=40;" . "} else {" . "\t{$element_id}.size = {$element_id}_oldsize;" . "}" . "parent = {$element_id}.getParent(); upcnt=0;" . "while(upcnt<10 && !parent.hasClass(\"jpane-slider\")) {" . "\tupcnt++; parent = parent.getParent();" . "}" . "if (parent.hasClass(\"jpane-slider\")) parent.setStyle(\"height\", \"auto\");";
     $style = 'display:inline-block;' . (FLEXI_J16GE ? 'float:left; margin: 6px 0px 0px 18px;' : 'margin:0px 0px 6px 12px');
     $maximize_link = "<a style='{$style}' href='javascript:;' onclick='{$onclick}' >Maximize/Minimize</a>";
     return $html . $maximize_link;
 }
Ejemplo n.º 10
0
 public function getOptions()
 {
     $images = array();
     $images[] = JHTMLSelect::option('', JText::_('FLEXI_SELECT_IMAGE_FIELD'));
     $db = JFactory::getDBO();
     if (FLEXI_J16GE) {
         $node =& $this->element;
         $attributes = get_object_vars($node->attributes());
         $attributes = $attributes['@attributes'];
     } else {
         $attributes =& $node->_attributes;
     }
     $valcolumn = 'name';
     if (@$attributes['valcolumn']) {
         $valcolumn = $attributes['valcolumn'];
     }
     $query = 'SELECT ' . $valcolumn . ' AS value, label AS text' . ' FROM #__flexicontent_fields' . ' WHERE published = 1' . ' AND field_type = ' . $db->Quote('image') . ' ORDER BY label ASC, id ASC';
     $db->setQuery($query);
     $fields = $db->loadObjectList();
     foreach ($fields as $field) {
         $images[] = JHTMLSelect::option($field->value, JText::_('FLEXI_FIELD') . ': ' . $field->text);
     }
     return $images;
 }
Ejemplo n.º 11
0
 function fetchElement($name, $value, &$node, $control_name)
 {
     if (FLEXI_J16GE) {
         $node =& $this->element;
         $attributes = get_object_vars($node->attributes());
         $attributes = $attributes['@attributes'];
     } else {
         $attributes =& $node->_attributes;
     }
     $themes = flexicontent_tmpl::getTemplates();
     $tmpls = $themes->items;
     $values = FLEXI_J16GE ? $this->value : $value;
     if (empty($values)) {
         $values = array();
     } else {
         if (!is_array($values)) {
             $values = !FLEXI_J16GE ? array($values) : explode("|", $values);
         }
     }
     $fieldname = FLEXI_J16GE ? $this->name : $control_name . '[' . $name . ']';
     $element_id = FLEXI_J16GE ? $this->id : $control_name . $name;
     // Field parameter (attributes)
     $attribs = '';
     $classes = 'use_select2_lib ';
     if ($node->attributes('required') && $node->attributes('required') == 'true') {
         $classes .= 'required ';
     }
     if ($node->attributes('validation_class')) {
         $classes .= $node->attributes('validation_class');
     }
     $attribs = ' class="' . $classes . '" ' . $attribs;
     $attribs .= ' style="float:left;" ';
     if (@$attributes['multiple'] == 'multiple' || @$attributes['multiple'] == 'true') {
         $attribs .= ' multiple="multiple" ';
         $attribs .= @$attributes['size'] ? ' size="' . $attributes['size'] . '" ' : ' size="6" ';
         $fieldname .= !FLEXI_J16GE ? "[]" : "";
         // NOTE: this added automatically in J2.5
         //$maximize_link = "<a style='display:inline-block;".(FLEXI_J16GE ? 'float:left; margin: 6px 0px 0px 18px;':'margin:0px 0px 6px 12px')."' href='javascript:;' onclick='$element_id = document.getElementById(\"$element_id\"); if ($element_id.size<16) { ${element_id}_oldsize=$element_id.size; $element_id.size=16;} else { $element_id.size=${element_id}_oldsize; } ' >Maximize/Minimize</a>";
     } else {
         array_unshift($types, JHTML::_('select.option', '', JText::_('FLEXI_PLEASE_SELECT')));
         $attribs .= 'class="inputbox"';
         //$maximize_link = '';
     }
     $maximize_link = '';
     if ($onchange = @$attributes['onchange']) {
         $attribs .= ' onchange="' . $onchange . '"';
     }
     // Field data (the templates)
     $lays = array();
     foreach ($tmpls as $tmpl) {
         $lays[] = $tmpl->name;
     }
     $lays = implode("','", $lays);
     if ($tmpls !== false) {
         foreach ($tmpls as $tmpl) {
             $layouts[] = JHTMLSelect::option($tmpl->name, $tmpl->name);
         }
     }
     $html = JHTML::_('select.genericlist', $layouts, $fieldname, $attribs, 'value', 'text', $values, $element_id);
     return $html . $maximize_link;
 }
 function _displayDefault($tpl)
 {
     $document = JFactory::getDocument();
     $option = JRequest::getCmd('option');
     $mainframe = JFactory::getApplication();
     $project_id = $mainframe->getUserState($option . 'project');
     $show_debug_info = JComponentHelper::getParams($option)->get('show_debug_info', 0);
     $db = JFactory::getDBO();
     $uri = JFactory::getURI();
     $baseurl = JURI::root();
     $document->addScript($baseurl . 'administrator/components/com_joomleague/assets/js/autocompleter/1_4/Autocompleter.js');
     $document->addScript($baseurl . 'administrator/components/com_joomleague/assets/js/autocompleter/1_4/Autocompleter.Request.js');
     $document->addScript($baseurl . 'administrator/components/com_joomleague/assets/js/autocompleter/1_4/Observer.js');
     $document->addScript($baseurl . 'administrator/components/com_joomleague/assets/js/autocompleter/1_4/quickaddteam.js');
     $document->addStyleSheet($baseurl . 'administrator/components/com_joomleague/assets/css/Autocompleter.css');
     $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');
     $division = $mainframe->getUserStateFromRequest($option . 'tl_division', 'division', '', '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);
     // search filter
     $lists['search'] = $search;
     $lists['search_mode'] = $search_mode;
     // table ordering
     $lists['order_Dir'] = $filter_order_Dir;
     $lists['order'] = $filter_order;
     //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);
     $projectws =& $this->get('Data', 'projectws');
     $this->assignRef('user', JFactory::getUser());
     $this->assignRef('lists', $lists);
     $this->assignRef('projectteam', $projectteam);
     $this->assignRef('division', $division);
     $this->assignRef('projectws', $projectws);
     $this->assignRef('pagination', $pagination);
     $this->assignRef('request_url', $uri->toString());
     $this->addToolbar();
     parent::display($tpl);
 }
Ejemplo n.º 13
0
        ?>
</td>

		      			<td><?php 
        $options = array();
        $options[] = JHTML::_('select.option', "0", JText::_('DT_NONE'));
        $options[] = JHTML::_('select.option', "1", JText::_('DT_INDIVIDUAL'));
        $options[] = JHTML::_('select.option', "2", JText::_('DT_GROUP'));
        $options[] = JHTML::_('select.option', "3", JText::_('DT_BOTH'));
        $options[] = JHTML::_('select.option', "-1", JText::_('DT_DEFAULT'));
        echo JHTML::_('select.radiolist', $options, "data[field][" . $rowField->id . "][showed]", ' class="fields" ', 'value', 'text', $showed);
        ?>
</td>

                        <td><?php 
        echo JHTMLSelect::booleanlist("data[field][" . $rowField->id . "][required]", "", $required);
        ?>
</td>

                <td>

		      		  <?php 
        $options = array();
        $options[] = JHTML::_('select.option', "1", JText::_('DT_EACH_MEMBER'));
        $options[] = JHTML::_('select.option', "2", JText::_('DT_BILLING_ONLY'));
        $options[] = JHTML::_('select.option', "3", JText::_('DT_MEMBERS_BILLING'));
        echo JHTML::_('select.radiolist', $options, 'data[field][' . $rowField->id . '][group_behave]', '', 'value', 'text', $group);
        ?>

		      			</td>
 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);
 }
Ejemplo n.º 15
0


				<td valign="top"><?php 
echo JText::_('DT_REQUIRED');
?>
:</td>



				<td valign="top">



				<?php 
echo JHTMLSelect::booleanlist('required', $atttribute, $row->required);
?>



				</td>



				<td valign="top"><?php 
echo JHTML::tooltip(JText::_('DT_HELP_FIELD_REQUIRED'), '', 'tooltip.png', '', '');
?>
</td>


 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);
 }
</legend>
				<table class="adminform">
					<tr class="row<?php 
echo $i;
?>
">
						<td width="21%"><div style="text-align: right; font-weight: bold;">
						<?php 
echo JText::_('COM_VIRTUEMART_PRODUCT_FORM_PUBLISH');
?>
</div>
						</td>
						<td width="79%">
							<fieldset class="radio">
							<?php 
echo JHTMLSelect::booleanlist('published', null, $this->product->published);
?>
							</fieldset>
						</td>
					</tr>
				<?php 
$i = 1 - $i;
?>
				<tr class="row<?php 
echo $i;
?>
">
					<td width="21%" >
						<div style="text-align:right;font-weight:bold;"><?php 
echo JText::_('COM_VIRTUEMART_PRODUCT_FORM_SKU');
?>
Ejemplo n.º 18
0
      </tr>

       <tr>

         <td>

           <?php 
echo JText::_('DT_PAY_LATER_PAID');
?>

         </td>

         <td>     

         <?php 
echo JHTMLSelect::booleanlist("User[Fee][status]", "", isset($tUser->fee->status) ? $tUser->fee->status : 0);
?>

         </td><td>&nbsp;</td>

      </tr>

       <tr>

         <td>

           <?php 
echo JText::_('DT_AMOUNT_PAID');
?>

         </td>
Ejemplo n.º 19
0
 protected function getInput()
 {
     $node =& $this->element;
     $attributes = get_object_vars($node->attributes());
     $attributes = $attributes['@attributes'];
     $themes = flexicontent_tmpl::getTemplates();
     $tmpls_all = $themes->category ? $themes->category : array();
     $value = $this->value;
     //$value = $value ? $value : @$attributes['default'];
     $view = JRequest::getVar('view');
     $controller = JRequest::getVar('controller');
     $app = JFactory::getApplication();
     $db = JFactory::getDBO();
     $cparams = JComponentHelper::getParams('com_flexicontent');
     // GET LIMITING to specific templates according to item's type, or according to type of new item
     $allowed_tmpls = array();
     $all_tmpl_allowed = true;
     $conf_default_layout = '';
     $conf_default_layout_mobile = '';
     $tmpls = array();
     $lays = array();
     foreach ($tmpls_all as $tmpl) {
         if ($all_tmpl_allowed || in_array($tmpl->name, $allowed_tmpls)) {
             $tmpls[] = $tmpl;
             $lays[] = $tmpl->name;
         }
     }
     $lays = implode("','", $lays);
     if (@$attributes['enableparam']) {
         $cparams = JComponentHelper::getParams('com_flexicontent');
         if (!$cparams->get($attributes['enableparam'])) {
             return FLEXI_J16GE ? '' : JText::_('FLEXI_DISABLED');
         }
     }
     if (!@$attributes['skipparams']) {
         $doc = JFactory::getDocument();
         $js = "\nvar tmpl = ['" . $lays . "'];\n\nfunction disablePanel(element) {\n\tif ( ! jQuery('#'+element+'-attribs-options') ) return;\n\t\n\tvar panel \t= jQuery('#'+element+'-attribs-options').next();\n\tvar selects = panel.find('select');\n\tvar inputs \t= panel.find('input');\n\tpanel.parent().addClass('pane-disabled');\n\tselects.each(function(index){\n\t\tjQuery(this).attr('disabled', 'disabled');\n\t});\n\tinputs.each(function(index){\n\t\tjQuery(this).attr('disabled', 'disabled');\n\t});\n\tpanel.parent().css('display','none');\n}\n\nfunction enablePanel(element) {\n\tif ( ! jQuery('#'+element+'-attribs-options') ) return;\n\t\n\tvar panel \t= jQuery('#'+element+'-attribs-options').next();\n\tvar selects = panel.find('select');\n\tvar inputs \t= panel.find('input');\n\tpanel.parent().removeClass('pane-disabled');\n\tselects.each(function(index){\n\t\tjQuery(this).removeAttr('disabled');\n\t});\n\tinputs.each(function(index){\n\t\tjQuery(this).removeAttr('disabled');\n\t});\n\tpanel.parent().css('display','');\n}\n\nfunction activatePanel(active) {\n\tvar inactives = jQuery.grep(tmpl, function( item, index ) {\n\t\treturn item != active;\n\t});\n\t\n\tinactives.each(function(el){\n\t\tdisablePanel(el);\n\t});\n\t\n\tif (active) {\n\t\tenablePanel(active);\n\t}\n}\n\njQuery(document).ready(function() {\n\tactivatePanel('" . $value . "');\n});\n";
         $doc->addScriptDeclaration($js);
     }
     $layouts = array();
     if (@$attributes['firstoption']) {
         $layouts[] = JHTMLSelect::option('', JText::_($attributes['firstoption']));
     } else {
         $layouts[] = JHTMLSelect::option('', '-- ' . JText::_('FLEXI_USE_GLOBAL') . ' --');
     }
     foreach ($tmpls as $tmpl) {
         $layouts[] = JHTMLSelect::option($tmpl->name, $tmpl->name);
     }
     $fieldname = $this->name;
     $element_id = $this->id;
     $attribs = '';
     if (@$attributes['multiple'] == 'multiple' || @$attributes['multiple'] == 'true') {
         $attribs .= ' multiple="multiple" ';
         $attribs .= @$attributes['size'] ? ' size="' . @$attributes['size'] . '" ' : ' size="6" ';
     }
     if (@$attributes['class']) {
         $attribs .= 'class="' . $attributes['class'] . '"';
     }
     if (!@$attributes['skipparams']) {
         $attribs .= ' onchange="activatePanel(this.value);"';
     }
     if ($inline_tip = @$attributes['inline_tip']) {
         $tip_img = @$attributes['tip_img'];
         $tip_img = $tip_img ? $tip_img : 'comment.png';
         $preview_img = @$attributes['preview_img'];
         $preview_img = $preview_img ? $preview_img : '';
         $tip_class = @$attributes['tip_class'];
         $tip_class .= FLEXI_J30GE ? ' hasTooltip' : ' hasTip';
         $hintmage = JHTML::image('administrator/components/com_flexicontent/assets/images/' . $tip_img, JText::_('FLEXI_NOTES'), ' style="max-height:24px; padding:0px; margin-left:12px; margin-right:0px;" ');
         $previewimage = $preview_img ? JHTML::image('administrator/components/com_flexicontent/assets/images/' . $preview_img, JText::_('FLEXI_NOTES'), ' style="max-height:24px; padding:0px; margin:0px;" ') : '';
         $tip_text = '<span class="' . $tip_class . '" style="" title="' . flexicontent_html::getToolTip(null, $inline_tip, 1, 1) . '">' . $hintmage . $previewimage . '</span>';
     }
     if ($inline_tip = @$attributes['inline_tip2']) {
         $tip_img = @$attributes['tip_img2'];
         $tip_img = $tip_img ? $tip_img : 'comment.png';
         $preview_img = @$attributes['preview_img2'];
         $preview_img = $preview_img ? $preview_img : '';
         $tip_class = @$attributes['tip_class2'];
         $tip_class .= FLEXI_J30GE ? ' hasTooltip' : ' hasTip';
         $hintmage = JHTML::image('administrator/components/com_flexicontent/assets/images/' . $tip_img, JText::_('FLEXI_NOTES'), ' style="max-height:24px; padding:0px; margin-left:12px; margin-right:0px;" ');
         $previewimage = $preview_img ? JHTML::image('administrator/components/com_flexicontent/assets/images/' . $preview_img, JText::_('FLEXI_NOTES'), ' style="max-height:24px; padding:0px; margin:0px;" ') : '';
         $tip_text2 = '<span class="' . $tip_class . '" style="" title="' . flexicontent_html::getToolTip(null, $inline_tip, 1, 1) . '">' . $hintmage . $previewimage . '</span>';
     }
     return JHTML::_('select.genericlist', $layouts, $fieldname, $attribs, 'value', 'text', $value, $element_id) . @$tip_text . @$tip_text2;
 }
Ejemplo n.º 20
0
				 <br />{GROUP_MEMBER}  {/GROUP_MEMBER} - <?php 
echo JText::_('DT_TAG_GROUP_MEMBER');
?>

                 </div>

                    </td>

					<td align="left" valign="top">

                    <?php 
echo JText::_('DT_ENABLE_FEATURE');
?>
: &nbsp;<?php 
echo JHTMLSelect::booleanlist("config[paid_status_change_msg_send]", "", $config->getGlobal('paid_status_change_msg_send', 1));
?>

                    <?php 
echo $editor->display("config[paid_status_change_msg]", stripslashes($config->getGlobal('paid_status_change_msg', '')), '', '340', '70', '20', '0');
?>
</td>

					<td align="center"><?php 
echo JHTML::tooltip(JText::_('DT_PAID_STATUS_CHANGE_MSG_HELP'));
?>
 </td>

				</tr>

                 <tr align="center" valign="middle">
Ejemplo n.º 21
0
    function fetchElement($name, $value, &$node, $control_name)
    {
        $timeMeasure = @$node->attributes('time_measure', 'seconds');
        $defaultQueries = @$node->attributes('default_queries', '');
        $defaultTime = @$node->attributes('default_time', '');
        if (!is_array($value)) {
            $value = array();
            $value[0] = $defaultQueries;
            $value[1] = $defaultTime;
        }
        $enabled = 0;
        if (count($value) == 4) {
            $enabled = $value[0];
            array_shift($value);
        } elseif (count($value) == 3) {
            $enabled = 1;
        }
        $html = '';
        if ($node->attributes('selectable', 0)) {
            $html = JHTMLSelect::booleanlist($control_name . '[' . $name . '][]', 'class="inputbox"', $enabled);
        } else {
            $html = '<div style="float:left; width:87px; clear: both">&nbsp;</div>';
        }
        $baseName = $control_name . '[' . $name . ']';
        $html .= '<input id="' . $baseName . '0" style="width: 50px" type="text" name="' . $baseName . '[]" value="' . @$value[0] . '" class="inputbox" /> ' . JText::_('or more queries in') . ' ';
        $html .= '<input id="' . $baseName . '1" style="width: 50px" type="text" name="' . $baseName . '[]" value="' . @$value[1] . '" class="inputbox" /> ' . JString::ucfirst(JText::_($timeMeasure)) . ' ';
        $html .= '<input id="' . $baseName . '2" type="hidden" name="' . $baseName . '[]" value="' . $timeMeasure . '" />';
        if ($timeMeasure) {
            ob_start();
            ?>
			window.addEvent('domready', function() {
				var c = $('<?php 
            echo $baseName;
            ?>
[]0');
				if ( c ) {
					c.addEvent('click', function() {
						$('<?php 
            echo $baseName;
            ?>
0').setProperty('disabled', true);
						$('<?php 
            echo $baseName;
            ?>
1').setProperty('disabled', true);
						$('<?php 
            echo $baseName;
            ?>
2').setProperty('disabled', true);
					});
					
					if (c.getProperty('checked')) {
						$('<?php 
            echo $baseName;
            ?>
0').setProperty('disabled', true);
						$('<?php 
            echo $baseName;
            ?>
1').setProperty('disabled', true);
						$('<?php 
            echo $baseName;
            ?>
2').setProperty('disabled', true);
					}
				}
				
				c = $('<?php 
            echo $baseName;
            ?>
[]1');
				if ( c ) {
					c.addEvent('click', function() {
						$('<?php 
            echo $baseName;
            ?>
0').removeProperty('disabled');
						$('<?php 
            echo $baseName;
            ?>
1').removeProperty('disabled');
						$('<?php 
            echo $baseName;
            ?>
2').removeProperty('disabled');
					});
				}
			});
			<?php 
            $document =& JFactory::getDocument();
            $document->addScriptDeclaration(ob_get_clean());
        }
        return '<div style="white-space:nowrap;">' . $html . '</div>';
    }
Ejemplo n.º 22
0
 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;
 }
Ejemplo n.º 23
0
 function fetchElement($name, $value, &$node, $control_name)
 {
     if (FLEXI_J16GE) {
         $node =& $this->element;
         $attributes = get_object_vars($node->attributes());
         $attributes = $attributes['@attributes'];
     } else {
         $attributes =& $node->_attributes;
     }
     $themes = flexicontent_tmpl::getTemplates();
     $tmpls_all = $themes->items ? $themes->items : array();
     $value = FLEXI_J16GE ? $this->value : $value;
     $view = JRequest::getVar('view');
     $controller = JRequest::getVar('controller');
     $app = JFactory::getApplication();
     $db = JFactory::getDBO();
     $cparams = JComponentHelper::getParams('com_flexicontent');
     // GET LIMITING to specific templates according to item's type, or according to type of new item
     $allowed_tmpls = array();
     $all_tmpl_allowed = true;
     $type_default_layout = '';
     $type_default_layout_mobile = '';
     if ($view == FLEXI_ITEMVIEW || $app->isAdmin() && 'items' == $controller) {
         // Get item id
         if (!$app->isAdmin()) {
             // FRONTEND, use "id" from request
             $pk = JRequest::getVar('id', 0, 'default', 'int');
         } else {
             // BACKEND, use "cid" array from request
             $cid = JRequest::getVar('cid', array(0), $hash = 'default', 'array');
             $pk = (int) $cid[0];
         }
         // Get type attibutes
         if ($pk) {
             $query = 'SELECT t.id as id, t.attribs attribs' . ' FROM #__flexicontent_items_ext as ie' . ' JOIN #__flexicontent_types as t ON ie.type_id=t.id' . ' WHERE ie.item_id = ' . (int) $pk;
         } else {
             $typeid = (int) JRequest::getInt('typeid', 0);
             $query = 'SELECT t.id,t.attribs' . ' FROM #__flexicontent_types as t' . ' WHERE t.id = ' . (int) $typeid;
         }
         $db->setQuery($query);
         $typedata = $db->loadObject();
         // Finally get allowed templates
         if ($typedata) {
             $tparams = FLEXI_J16GE ? new JRegistry($typedata->attribs) : new JParameter($typedata->attribs);
             $type_default_layout = $tparams->get('ilayout', 'default');
             $type_default_layout_mobile = $tparams->get('ilayout_mobile', JText::_('FLEXI_USE_DESKTOP'));
             $allowed_tmpls = $tparams->get('allowed_ilayouts');
             if (empty($allowed_tmpls)) {
                 $allowed_tmpls = array();
             } else {
                 if (!is_array($allowed_tmpls)) {
                     $allowed_tmpls = !FLEXI_J16GE ? array($allowed_tmpls) : explode("|", $allowed_tmpls);
                 }
             }
             $all_tmpl_allowed = count($allowed_tmpls) == 0;
             if (!in_array($type_default_layout, $allowed_tmpls)) {
                 $allowed_tmpls[] = $type_default_layout;
             }
             $use_mobile_layouts = $cparams->get('use_mobile_layouts', 0);
             if ($use_mobile_layouts && $type_default_layout_mobile) {
                 if (!in_array($type_default_layout_mobile, $allowed_tmpls)) {
                     $allowed_tmpls[] = $type_default_layout_mobile;
                 }
             }
             //echo "Allowed Templates: "; print_r($allowed_tmpls); echo "<br>\n";
         }
     }
     $tmpls = array();
     $lays = array();
     foreach ($tmpls_all as $tmpl) {
         if ($all_tmpl_allowed || in_array($tmpl->name, $allowed_tmpls)) {
             $tmpls[] = $tmpl;
             $lays[] = $tmpl->name;
         }
     }
     $lays = implode("','", $lays);
     if (@$attributes['enableparam']) {
         $cparams = JComponentHelper::getParams('com_flexicontent');
         if (!$cparams->get($attributes['enableparam'])) {
             return FLEXI_J16GE ? '' : JText::_('FLEXI_DISABLED');
         }
     }
     if (!@$attributes['skipparams']) {
         $doc = JFactory::getDocument();
         $js = "\nvar tmpl = ['" . $lays . "'];\t\n\nfunction disablePanel(element) {\n\tif ( ! \$('params-'+element) ) return;\n\t\n\tvar panel \t= \$('params-'+element).getNext();\n\tvar selects = panel.getElements('select');\n\tvar inputs \t= panel.getElements('input');\n\tpanel.getParent().addClass('pane-disabled');\n\tselects.each(function(el){\n\t\tel.setProperty('disabled', 'disabled');\n\t});\n\tinputs.each(function(el){\n\t\tel.setProperty('disabled', 'disabled');\n\t});\n\tpanel.getParent().setStyle('display','none');\n}\n\nfunction enablePanel(element) {\n\tif ( ! \$('params-'+element) ) return;\n\t\n\tvar panel \t= \$('params-'+element).getNext();\n\tvar selects = panel.getElements('select');\n\tvar inputs \t= panel.getElements('input');\n\tpanel.getParent().removeClass('pane-disabled');\n\tselects.each(function(el){\n    \tel.setProperty('disabled', '');\n\t});\n\tinputs.each(function(el){\n    \tel.setProperty('disabled', '');\n\t});\n\tpanel.getParent().setStyle('display','');\n}\n\nfunction activatePanel(active) {\n\tvar inactives = tmpl.filter(function(item, index){\n\t\treturn item != active;\n\t});\n\n\tinactives.each(function(el){\n\t\tdisablePanel(el);\n\t});\n\t\n\tif (active) {\n\t\tenablePanel(active);\n\t\tif ( \$('__content_type_default_layout__') ) \$('__content_type_default_layout__').setStyle('display','none');\n\t} else {\n\t\tif ( \$('__content_type_default_layout__') ) \$('__content_type_default_layout__').setStyle('display','');\n\t}\n}\nwindow.addEvent('domready', function() {\n\tactivatePanel('" . $value . "');\n});\n";
         $doc->addScriptDeclaration($js);
     }
     $layouts = array();
     if ($view != 'type') {
         $type_layout = $attributes['name'] == 'ilayout_mobile' ? $type_default_layout_mobile : $type_default_layout;
         $layouts[] = JHTMLSelect::option('', JText::_('FLEXI_TYPE_DEFAULT') . ' :: ' . $type_layout . ' ::');
     } else {
         if (@$attributes['firstoption']) {
             $layouts[] = JHTMLSelect::option('', JText::_($attributes['firstoption']));
         }
     }
     foreach ($tmpls as $tmpl) {
         $layouts[] = JHTMLSelect::option($tmpl->name, ':: ' . $tmpl->name . ' ::');
     }
     $fieldname = FLEXI_J16GE ? $this->name : $control_name . '[' . $name . ']';
     $element_id = FLEXI_J16GE ? $this->id : $control_name . $name;
     $attribs = !FLEXI_J16GE ? ' style="float:left;" ' : '';
     if (@$attributes['multiple'] == 'multiple' || @$attributes['multiple'] == 'true') {
         $attribs .= ' multiple="multiple" ';
         $attribs .= @$attributes['size'] ? ' size="' . @$attributes['size'] . '" ' : ' size="6" ';
         $fieldname .= !FLEXI_J16GE ? "[]" : "";
         // NOTE: this added automatically in J2.5
     }
     if (@$attributes['class']) {
         $attribs .= 'class="' . $attributes['class'] . '"';
     }
     if (!@$attributes['skipparams']) {
         $attribs .= ' onchange="activatePanel(this.value);"';
     }
     return JHTML::_('select.genericlist', $layouts, $fieldname, $attribs, 'value', 'text', $value, $element_id);
 }
Ejemplo n.º 24
0
     </td>

	  </tr>
    
    <tr align="center" valign="middle">

      	<td align="left" valign="top"><strong><?php 
echo JText::_('DT_EVENT_ADMIN_NOTIFICATION');
?>
:</strong>
             		<br /><br /><?php 
echo JText::_('DT_ENABLE_FEATURE');
?>
: <?php 
echo JHTMLSelect::booleanlist("data[event][admin_notification_set]", "", $row->admin_notification_set);
?>
 
          <div style="padding:5px 5px 5px 15px;">

                 <br /><?php 
echo JText::_('DT_TAG_INSERT_TEXT');
?>
:

                 	<br />[EVENT_NAME] - <?php 
echo JText::_('DT_TAG_EVENT_NAME');
?>

	                 <br />[EVENT_DATE] - <?php 
echo JText::_('DT_TAG_EVENT_DATE');
Ejemplo n.º 25
0
 /**
  * Generates an HTML select list
  *
  * @param	array	An array of objects
  * @param	string	The value of the HTML name attribute
  * @param	string	Additional HTML attributes for the <select> tag
  * @param	string	The name of the object variable for the option value
  * @param	string	The name of the object variable for the option text
  * @param	mixed	The key that is selected (accepts an array or a string)
  * @returns	string	HTML for the select list
  */
 function genericlist($arr, $name, $attribs = null, $key = 'value', $text = 'text', $selected = NULL, $idtag = false, $translate = false)
 {
     if (is_array($arr)) {
         reset($arr);
     }
     if (is_array($attribs)) {
         $attribs = JArrayHelper::toString($attribs);
     }
     $id = $name;
     if ($idtag) {
         $id = $idtag;
     }
     $id = str_replace('[', '', $id);
     $id = str_replace(']', '', $id);
     $html = '<select name="' . $name . '" id="' . $id . '" ' . $attribs . '>';
     $html .= JHTMLSelect::Options($arr, $key, $text, $selected, $translate);
     $html .= '</select>';
     return $html;
 }
Ejemplo n.º 26
0
 /**
  * Generates a yes/no radio list with the arguments in a consistent order
  *
  * @param string The value of the HTML name attribute
  * @param string Additional HTML attributes for the <select> tag
  * @param mixed The key that is selected
  * @returns string HTML for the radio list
  */
 public static function booleanlist($selected, $name = '', $attribs = null, $yes = 'yes', $no = 'no', $id = false)
 {
     return parent::booleanlist($name, $attribs, $selected, $yes, $no, $id);
 }
Ejemplo n.º 27
0
            </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');
 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);
 }
							<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;
    }
}
Ejemplo n.º 30
0
 function _editfield()
 {
     $this->setEditToolbar(JText::_("COM_ADSMANAGER") . " - " . JText::_("ADSMANAGER_EDIT_FIELD"));
     $fieldmodel = $this->getModel("field");
     $catmodel = $this->getModel("category");
     $positionmodel = $this->getModel("position");
     $columnmodel = $this->getModel("column");
     $plugins = $fieldmodel->getPlugins();
     $this->assignRef('plugins', $plugins);
     $id = JRequest::getVar('cid', array(0));
     if (is_array($id)) {
         $id = $id[0];
     }
     $field = null;
     if ($id) {
         $field = $fieldmodel->getField($id);
     } else {
         $field = new stdClass();
         $field->published = 1;
     }
     $this->assignRef('field', $field);
     $cats = $catmodel->getCatTree(false);
     $nbcats = $catmodel->getNbCats(false);
     $this->assignRef('cats', $cats);
     $this->assignRef('nbcats', $nbcats);
     $fieldValues = $fieldmodel->getFieldValues($id);
     $this->assignRef('fieldvalues', $fieldValues);
     $columns = array();
     $types = array();
     $lists = array();
     $positions = array();
     $cbfields = array();
     $sort_direction = array();
     $display_title_list = array();
     $types[] = JHTML::_('select.option', 'checkbox', 'Check Box (Single)');
     $types[] = JHTML::_('select.option', 'multicheckbox', 'Check Box (Multiple)');
     $types[] = JHTML::_('select.option', 'multicheckboximage', 'Check Box (Multiple Images)');
     $types[] = JHTML::_('select.option', 'date', 'Date');
     $types[] = JHTML::_('select.option', 'select', 'Drop Down (Single Select)');
     $types[] = JHTML::_('select.option', 'multiselect', 'Drop Down (Multi-Select)');
     $types[] = JHTML::_('select.option', 'emailaddress', 'Email Address');
     $types[] = JHTML::_('select.option', 'number', 'Number Text');
     $types[] = JHTML::_('select.option', 'price', 'Price');
     $types[] = JHTML::_('select.option', 'editor', 'Editor Text Area');
     $types[] = JHTML::_('select.option', 'textarea', 'Text Area');
     $types[] = JHTML::_('select.option', 'text', 'Text Field');
     $types[] = JHTML::_('select.option', 'url', 'URL');
     $types[] = JHTML::_('select.option', 'radio', 'Radio Button');
     $types[] = JHTMLSelect::option('radioimage', 'Radio Button (Image)');
     $types[] = JHTML::_('select.option', 'file', 'File');
     if (isset($plugins)) {
         foreach ($plugins as $key => $plug) {
             $types[] = JHTML::_('select.option', $key, $plug->getFieldName());
         }
     }
     $columns[] = JHTML::_('select.option', '-1', 'No Column');
     $db_columns = $columnmodel->getColumns(null, true);
     foreach ($db_columns as $col) {
         if (@$col->name && $col->name != "") {
             $coln = JText::_($col->name);
         }
         $columns[] = JHTML::_('select.option', "{$col->id}", "{$coln}");
     }
     $cb_fields = $fieldmodel->getAllCbFields();
     $cbfields[] = JHTML::_('select.option', '-1', JText::_('ADSMANAGER_NOT_USED'));
     if (isset($cb_fields)) {
         foreach ($cb_fields as $cb) {
             $cbfields[] = JHTML::_('select.option', $cb->fieldid, "(" . $cb->fieldid . ") " . $cb->name);
         }
     }
     $positions[] = JHTML::_('select.option', '-1', JText::_('ADSMANAGER_NO_DISPLAY'));
     $db_positions = $positionmodel->getPositions(null);
     foreach ($db_positions as $pos) {
         if (@$pos->title && $pos->title != "") {
             $p = "(" . JText::_($pos->title) . ")";
         } else {
             $p = "";
         }
         $positions[] = JHTML::_('select.option', "{$pos->id}", "{$pos->name}.{$p}");
     }
     $sort_direction[] = JHTML::_('select.option', 'DESC', JText::_('ADSMANAGER_CMN_SORT_DESC'));
     $sort_direction[] = JHTML::_('select.option', 'ASC', JText::_('ADSMANAGER_CMN_SORT_ASC'));
     $display_title_list[] = JHTML::_('select.option', '0', JText::_('ADSMANAGER_NO_DISPLAY'));
     $display_title_list[] = JHTML::_('select.option', '1', JText::_('ADSMANAGER_DISPLAY_DETAILS'));
     $display_title_list[] = JHTML::_('select.option', '2', JText::_('ADSMANAGER_DISPLAY_LIST'));
     $display_title_list[] = JHTML::_('select.option', '3', JText::_('ADSMANAGER_DISPLAY_LIST_AND_DETAILS'));
     $lists['display_title'] = JHTML::_('select.genericlist', $display_title_list, 'display_title', 'class="inputbox" size="1"', 'value', 'text', @$field->display_title);
     $lists['type'] = JHTML::_('select.genericlist', $types, 'type', 'class="inputbox" size="1" onchange="selType(this.options[this.selectedIndex].value);"', 'value', 'text', @$field->type);
     $lists['required'] = JHTML::_('select.booleanlist', 'required', 'class="inputbox" size="1"', @$field->required);
     $lists['columns'] = JHTML::_('select.genericlist', $columns, 'columnid', 'class="inputbox" size="1"', 'value', 'text', @$field->columnid);
     $lists['positions'] = JHTML::_('select.genericlist', $positions, 'pos', 'class="inputbox" size="1"', 'value', 'text', @$field->pos);
     $lists['profile'] = JHTML::_('select.booleanlist', 'profile', 'class="inputbox" size="1"', @$field->profile);
     $lists['cbfields'] = JHTML::_('select.genericlist', $cbfields, 'cb_field', 'class="inputbox" size="1"', 'value', 'text', @$field->cb_field);
     $lists['cbfieldvalues'] = JHTML::_('select.genericlist', $cbfields, 'cbfieldvalues', 'class="inputbox" size="1"', 'value', 'text', @$field->cbfieldvalues);
     if (!isset($field->editable)) {
         $field->editable = 1;
     }
     $lists['editable'] = JHTML::_('select.booleanlist', 'editable', 'class="inputbox" size="1"', @$field->editable);
     $lists['searchable'] = JHTML::_('select.booleanlist', 'searchable', 'class="inputbox" size="1"', @$field->searchable);
     $lists['sort'] = JHTML::_('select.booleanlist', 'sort', 'class="inputbox" size="1"', @$field->sort);
     $lists['sort_direction'] = JHTML::_('select.genericlist', $sort_direction, 'sort_direction', 'class="inputbox" size="1"', 'value', 'text', @$field->sort_direction);
     $lists['published'] = JHTML::_('select.booleanlist', 'published', 'class="inputbox" size="1"', @$field->published);
     $this->assignRef('lists', $lists);
     $path = JPATH_ROOT . "/images/com_adsmanager/fields";
     $handle = opendir($path);
     $fieldimages = array();
     while ($file = readdir($handle)) {
         $dir = $path . '/' . $file;
         if (!is_dir($dir)) {
             if ($file != "." && $file != "..") {
                 $fieldimages[] = $file;
             }
         }
     }
     closedir($handle);
     $this->assignRef('fieldimages', $fieldimages);
     $options = @$field->options;
     if ($options == null) {
         $options = new stdClass();
     }
     if (!isset($options->select_values_storage_type)) {
         $options->select_values_storage_type = "internal";
     }
     $this->assignRef('options', $options);
 }