/com_joomleague/administrator/components/com_joomleague/views/jlxmlimports/tmpl/form.php
PHP | 1210 lines | 1143 code | 27 blank | 40 comment | 149 complexity | ae9d4983c50a22f5cb0b9d9f2a129195 MD5 | raw file
- <?php defined('_JEXEC') or die('Restricted access');
-
- JHtml::_('behavior.tooltip');
-
- if (isset($this->xml) && is_array($this->xml))
- {
- {
- //echo 'this<pre>'.print_r($this,true).'</pre>';
- if (array_key_exists('exportversion',$this->xml))
- {
- $exportversion =& $this->xml['exportversion'];
- }
- if (array_key_exists('project',$this->xml))
- {
- $proj =& $this->xml['project'];
- }
- if (array_key_exists('team',$this->xml))
- {
- $teams =& $this->xml['team'];
- }
- if (array_key_exists('club',$this->xml))
- {
- $clubs =& $this->xml['club'];
- }
- if (array_key_exists('playground',$this->xml))
- {
- $playgrounds =& $this->xml['playground'];
- }
- if (array_key_exists('league',$this->xml))
- {
- $league =& $this->xml['league'];
- }
- if (array_key_exists('season',$this->xml))
- {
- $season =& $this->xml['season'];
- }
- if (array_key_exists('sportstype',$this->xml))
- {
- $sportstype =& $this->xml['sportstype'];
- }
- if (array_key_exists('person',$this->xml))
- {
- $persons =& $this->xml['person'];
- }
- if (array_key_exists('event',$this->xml))
- {
- $events =& $this->xml['event'];
- }
- if (array_key_exists('position',$this->xml))
- {
- $positions =& $this->xml['position'];
- }
- if (array_key_exists('parentposition',$this->xml))
- {
- $parentpositions =& $this->xml['parentposition'];
- }
- if (array_key_exists('statistic',$this->xml))
- {
- $statistics =& $this->xml['statistic'];
- }
- }
-
- $xmlProjectImport=true;
- $xmlImportType='';
- if (!isset($proj))
- {
- $xmlProjectImport=false;
- $xmlImportTitle='';
- if (isset($teams))
- {
- $xmlImportType='teams'; // There shouldn't be any problems with import of teams-xml-export files
- $xmlImportTitle='Standard XML-Import of JoomLeague Teams';
- $teamsClubs=$teams;
- }
- elseif (isset($clubs))
- {
- $xmlImportType='clubs'; // There shouldn't be any problems with import of clubs-xml-export files
- $xmlImportTitle='Standard XML-Import of JoomLeague Clubs';
- $teamsClubs=$clubs;
- }
- elseif (isset($events)) // There shouldn't be any problems with import of events-xml-export files
- {
- $xmlImportType='events';
- $xmlImportTitle='Standard XML-Import of JoomLeague Events';
- }
- elseif (isset($positions)) // There shouldn't be any problems with import of positions-xml-export files
- { // maybe the positions export routine should also export position_eventtype and events
- $xmlImportType='positions';
- $xmlImportTitle='Standard XML-Import of JoomLeague Positions';
- }
- elseif (isset($parentpositions)) // There shouldn't be any problems with import of positions-xml-export files
- { // maybe the positions export routine should also export position_eventtype and events
- $xmlImportType='positions';
- $xmlImportTitle='Standard XML-Import of JoomLeague Positions';
- }
- elseif (isset($persons)) // There shouldn't be any problems with import of persons-xml-export files
- {
- $xmlImportType='persons';
- $xmlImportTitle='Standard XML-Import of JoomLeague Persons';
- }
- elseif (isset($playgrounds)) // There shouldn't be any problems with import of statistics-xml-export files
- {
- $xmlImportType='playgrounds';
- $xmlImportTitle='Standard XML-Import of JoomLeague Playgrounds';
- }
- elseif (isset($statistics)) // There shouldn't be any problems with import of statistics-xml-export files
- { // maybe the statistic export routine should also export position_statistic and positions
- $xmlImportType='statistics';
- $xmlImportTitle='Standard XML-Import of JoomLeague Statistics';
- }
- JError::raiseNotice(500,JText::_($xmlImportTitle));
- }
- else
- {
- $teamsClubs=$teams;
- }
- if (!empty($teamsClubs)){$teamsClubsCount=count($teamsClubs);}
- ?>
- <script><!--
-
-
- function chkFormular()
- {
- return true;
- var message='';
-
- <?php
- if (($xmlProjectImport) || ($xmlImportType=='events') || ($xmlImportType=='positions'))
- {
- ?>
- if ((($('adminForm').sportstype.selectedIndex=='0') && ($('adminForm').sportstypeNew.disabled) &&
- (!$('adminForm').newSportsTypeCheck.checked)) ||
- (($('adminForm').sportstypeNew.disabled==false) && (trim($('adminForm').sportstypeNew.value)=='')))
- {
- message+="<?php echo JText::_('Sports type is missing!'); ?>\n";
- }
- <?php
- if ($xmlProjectImport)
- {
- ?>
- if (trim($('adminForm').name.value)=='')
- {
- message+="<?php echo JText::_('Please select name of this project!'); ?>\n";
- }
- if ((($('adminForm').league.selectedIndex=='0') && ($('adminForm').leagueNew.disabled)) ||
- (($('adminForm').leagueNew.disabled==false) && (trim($('adminForm').leagueNew.value)=='')))
- {
- message+="<?php echo JText::_('League is missing!'); ?>\n";
- }
- if ((($('adminForm').season.selectedIndex=='0') && ($('adminForm').seasonNew.disabled)) ||
- (($('adminForm').seasonNew.disabled==false) && (trim($('adminForm').seasonNew.value)=='')))
- {
- message+="<?php echo JText::_('Season is missing!'); ?>\n";
- }
- <?php
- }
- }
- ?>
- <?php
- if (isset($teams) && count($teams) > 0)
- {
- // Perform some checks on teams?
- }
- ?>
- <?php
- if (isset($clubs) && count($clubs) > 0)
- {
- // Perform some checks on clubs?
- }
- ?>
- <?php
- if ((isset($playgrounds)) && (count($playgrounds) > 0))
- {
- for ($counter=0; $counter < count($playgrounds); $counter++)
- {
- ?>
- if ((($('adminForm').choosePlayground_<?php echo $counter; ?>.checked==false) &&
- ($('adminForm').createPlayground_<?php echo $counter; ?>.checked==false)) ||
- ((trim($('adminForm').playgroundName_<?php echo $counter; ?>.value)=='') ||
- (trim($('adminForm').playgroundShortname_<?php echo $counter; ?>.value)=='')))
- {
- message+='<?php echo JText::sprintf('No data selected for playground [%1$s]',addslashes($playgrounds[$counter]->name)); ?>\n';
- }
- <?php
- }
- }
- ?>
- <?php
- if ((isset($events)) && (count($events) > 0))
- {
- for ($counter=0; $counter < count($events); $counter++)
- {
- ?>
- if ((($('adminForm').chooseEvent_<?php echo $counter; ?>.checked==false) &&
- ($('adminForm').createEvent_<?php echo $counter; ?>.checked==false)) ||
- (trim($('adminForm').eventName_<?php echo $counter; ?>.value)==''))
- {
- message+='<?php echo JText::sprintf('No data selected for event [%1$s]',addslashes($events[$counter]->name)); ?>\n';
- }
- <?php
- }
- }
- ?>
- <?php
- if ((isset($parentpositions)) && (count($parentpositions) > 0))
- {
- for ($counter=0; $counter < count($parentpositions); $counter++)
- {
- ?>
- if ((($('adminForm').chooseParentPosition_<?php echo $counter; ?>.checked==false) &&
- ($('adminForm').createParentPosition_<?php echo $counter; ?>.checked==false)) ||
- (trim($('adminForm').parentPositionName_<?php echo $counter; ?>.value)==''))
- {
- message+='<?php echo JText::sprintf('No data selected for parentposition [%1$s]',addslashes($parentpositions[$counter]->name)); ?>\n';
- }
- <?php
- }
- }
- ?>
- <?php
- if ((isset($positions)) && (count($positions) > 0))
- {
- for ($counter=0; $counter < count($positions); $counter++)
- {
- ?>
- if ((($('adminForm').choosePosition_<?php echo $counter; ?>.checked==false) &&
- ($('adminForm').createPosition_<?php echo $counter; ?>.checked==false)) ||
- (trim($('adminForm').positionName_<?php echo $counter; ?>.value)==''))
- {
- message+='<?php echo JText::sprintf('No data selected for position [%1$s]',addslashes($positions[$counter]->name)); ?>\n';
- }
- <?php
- }
- }
- ?>
- <?php
- if ((isset($statistics)) && (count($statistics) > 0))
- {
- for ($counter=0; $counter < count($statistics); $counter++)
- {
- ?>
- if ((($('adminForm').chooseStatistic_<?php echo $counter; ?>.checked==false) &&
- ($('adminForm').createStatistic_<?php echo $counter; ?>.checked==false)) ||
- (trim($('adminForm').statisticName_<?php echo $counter; ?>.value)==''))
- {
- message+='<?php echo JText::sprintf('No data selected for statistic [%1$s]',addslashes($statistics[$counter]->name)); ?>\n';
- }
- <?php
- }
- }
- ?>
- <?php
- if ((isset($persons)) && (count($persons) > 0))
- {
- for ($counter=0; $counter < count($persons); $counter++)
- {
- ?>
- if($('adminForm').choosePerson_<?php echo $counter; ?>.checked==false) {
- if (($('adminForm').createPerson_<?php echo $counter; ?>.checked==false)||
- ((trim($('adminForm').personLastname_<?php echo $counter; ?>.value)=='') ||
- (trim($('adminForm').personFirstname_<?php echo $counter; ?>.value)=='')))
- {
- message+='<?php echo JText::sprintf('No data selected for person [%1$s,%2$s]',addslashes($persons[$counter]->lastname),addslashes($persons[$counter]->firstname)); ?>\n';
- }
- }
- <?php
- }
- }
- ?>
- if (message=='')
- {
- return true;
- }
- else
- {
- alert("<?php echo JText::_('COM_JOOMLEAGUE_ADMIN_XML_IMPORT_ERROR'); ?>\n\n"+message);
- return false;
- }
- }
-
- //--></script>
- <?php
- $useExistingEntryColor = "orange";
- $useNewEntryColor = "lightgreen";
- ?>
- <div id='editcell'>
- <a name='page_top'></a>
- <table class='adminlist'>
- <thead><tr><th><?php echo JText::_('COM_JOOMLEAGUE_ADMIN_XML_IMPORT_TABLE_TITLE_2'); ?></th></tr></thead>
- <tbody>
- <tr>
- <td style='text-align:center; '>
- <p style='text-align:center;'><b style='color:green; '><?php echo JText::sprintf('COM_JOOMLEAGUE_ADMIN_XML_IMPORT_UPLOAD_SUCCESS','<i>'.$this->uploadArray['name'].'</i>'); ?></b></p>
- <?php
- if ($this->import_version!='OLD')
- {
- if (isset($exportversion->exportRoutine) &&
- strtotime($exportversion->exportRoutine) >= strtotime('2010-09-19 23:00:00'))
- {
- ?>
- <p><?php
- echo JText::sprintf('This file was created using JoomLeague-Export-Routine dated: %1$s',$exportversion->exportRoutine).'<br />';
- echo JText::sprintf('Date and time of this file is: %1$s - %2$s',$exportversion->exportDate,$exportversion->exportTime).'<br />';
- echo JText::sprintf('The name of the Joomla-System where this file was created is: %1$s',$exportversion->exportSystem).'<br />';
- ?></p><?php
- }
- else
- {
- ?>
- <p><?php
- echo JText::_('This file was created by an older revision of JoomLeague 1.5.0a!').'<br />';
- echo JText::_('As we can not guarantee a correct processing the import routine will STOP here!!!');
- ?></p></td></tr></tbody></table></div><?php
- return;
- }
- }
- ?>
- <p><?php echo JText::_('COM_JOOMLEAGUE_ADMIN_XML_IMPORT_CREATE_CLUBS_HINT'); ?></p>
- </td>
- </tr>
- </tbody>
- </table>
- <form id='adminForm' action='<?php echo $this->request_url; ?>' method='post' onsubmit='return chkFormular();' >
- <input type='hidden' name='importProject' value="<?php echo $xmlProjectImport; ?>" />
- <input type='hidden' name='importType' value="<?php echo $xmlImportType; ?>" />
- <input type='hidden' name='sent' value="2" id='sent' />
- <input type='hidden' name='task' value="jlxmlimport.insert" />
- <?php echo JHtml::_('form.token')."\n"; ?>
- <?php
- if (($xmlProjectImport) || ($xmlImportType=='events') || ($xmlImportType=='positions'))
- {
- ?>
- <fieldset class="adminform">
- <legend><strong><?php echo JText::_('COM_JOOMLEAGUE_ADMIN_XML_IMPORT_GENERAL_DATA_LEGEND'); ?></strong></legend>
- <table class='adminlist'>
- <?php
- if (($xmlImportType!='events') && ($xmlImportType!='positions'))
- {
- ?>
- <tr>
- <td style='background-color:#EEEEEE'><?php echo JText::_('COM_JOOMLEAGUE_ADMIN_XML_IMPORT_PROJECT_NAME'); ?></td>
- <td style='background-color:#EEEEEE'>
- <input type='text' name='name' id='name' size='110' maxlength='100' value="<?php echo stripslashes(htmlspecialchars($proj->name)); ?>" />
- </td>
- </tr>
- <?php
- }
- ?>
- <tr>
- <td style='background-color:#DDDDDD'><?php echo JText::_('COM_JOOMLEAGUE_ADMIN_XML_IMPORT_SPORTSTYPE'); ?></td>
- <td style='background-color:#DDDDDD'>
- <?php
- $foundMatchingSportstype = false;
- $dSportsTypeName = "";
- if (isset($sportstype->name))
- {
- $dSportsTypeName=$sportstype->name;
- }
- if (count($this->sportstypes) > 0)
- {
- $options = "";
- foreach ($this->sportstypes AS $row)
- {
- $options .= '<option ';
- if (($row->name==$dSportsTypeName) ||
- ($row->name==JText::_($dSportsTypeName)))
- {
- $foundMatchingSportstype = true;
- $options .= "selected='selected' ";
- }
- elseif (count($this->sportstypes)==1)
- {
- $options .= "selected='selected' ";
- }
- $options .= "value='$row->id;'>";
- $options .= JText::_($row->name);
- $options .= '</option>';
- }
- ?>
- <select name='sportstype' id='sportstype' <?php if (!$foundMatchingSportstype){echo " disabled='disabled'";}?>>
- <option selected value="0"><?php echo JText::_('COM_JOOMLEAGUE_ADMIN_XML_IMPORT_SPORTSTYPE_SELECT'); ?></option>
- <?php echo $options;?>
- </select>
- <br /><br />
- <input type='checkbox' name='newSportsTypeCheck' style="float: none !important" value="1" style="float: none !important"
- <?php if (!$foundMatchingSportstype){echo " checked='checked'";}?>
- onclick="
- if (this.checked) {
- $('adminForm').sportstype.disabled=true;
- $('adminForm').sportstypeNew.disabled=false;
- } else {
- $('adminForm').sportstype.disabled=false;
- $('adminForm').sportstypeNew.disabled=true;
- }" />
- <?php echo JText::_('COM_JOOMLEAGUE_ADMIN_XML_IMPORT_CREATE_NEW'); ?>
- <input type='text' name='sportstypeNew' style="float: none !important" size='30' maxlength='25' id='sportstypeNew'
- value="<?php echo stripslashes(htmlspecialchars(JText::_($dSportsTypeName))); ?>"
- <?php if ($foundMatchingSportstype){echo " disabled='disabled'";}?>/>
- <?php
- }
- else
- {
- ?>
- <input type="hidden" name="newSportsTypeCheck" value="1" />
- <?php echo JText::_('COM_JOOMLEAGUE_ADMIN_XML_IMPORT_CREATE_NEW'); ?>
- <input type='text' name='sportstypeNew' style="float: none !important" size='30' maxlength='25' id='sportstypeNew'
- value="<?php echo stripslashes(htmlspecialchars(JText::_($dSportsTypeName))); ?>" />
- <?php
- }
- ?>
- </td>
- </tr>
- <?php
- if (($xmlImportType!='events') && ($xmlImportType!='positions'))
- {
- ?>
- <tr>
- <td style='background-color:#EEEEEE'><?php echo JText::_('COM_JOOMLEAGUE_ADMIN_XML_IMPORT_LEAGUE'); ?></td>
- <td style='background-color:#EEEEEE'>
- <?php
- $foundMatchingLeague = false;
- $dLeagueName="";
- $leagueCountry="";
- if (isset($league->name))
- {
- $dLeagueName=$league->name;
- $leagueCountry=$league->country;
- }
- $dCountry=$leagueCountry;
- if (preg_match('=^[0-9]+$=',$dCountry))
- {
- $dCountry=$this->OldCountries[(int)$dCountry];
- }
- if (count($this->leagues) > 0)
- {
- $options = "";
- foreach ($this->leagues AS $row)
- {
- $options .= '<option ';
- if ($row->name==$dLeagueName)
- {
- $foundMatchingLeague = true;
- $options .= "selected='selected' ";
- }
- elseif (count($this->leagues)==1)
- {
- $options .= "selected='selected' ";
- }
- $options .= "value='$row->id;'>";
- $options .= $row->name;
- $options .= '</option>';
- }
- ?>
- <select name='league' id='league' <?php if (!$foundMatchingLeague){echo " disabled='disabled'";}?>>
- <option selected value="0"><?php echo JText::_('COM_JOOMLEAGUE_ADMIN_XML_IMPORT_LEAGUE_SELECT'); ?></option>
- <?php echo $options;?>
- </select>
- <br /><br />
- <input type='checkbox' name='newLeagueCheck' style="float: none !important" value="1"
- <?php if (!$foundMatchingLeague){echo " checked='checked'";}?>
- onclick="
- if (this.checked) {
- $('adminForm').league.disabled=true;
- $('adminForm').leagueNew.disabled=false;
- } else {
- $('adminForm').league.disabled=false;
- $('adminForm').leagueNew.disabled=true;
- }" />
- <?php echo JText::_('COM_JOOMLEAGUE_ADMIN_XML_IMPORT_CREATE_NEW'); ?>
- <input type='text' name='leagueNew' style="float: none !important" size='90' maxlength='75' id='leagueNew'
- value="<?php echo stripslashes(htmlspecialchars($dLeagueName)); ?>"
- <?php if ($foundMatchingLeague){echo " disabled='disabled'";}?>/>
- <?php
- }
- else
- {
- ?>
- <input type="hidden" name="newLeagueCheck" value="1" />
- <?php echo JText::_('COM_JOOMLEAGUE_ADMIN_XML_IMPORT_CREATE_NEW'); ?>
- <input type='text' name='leagueNew' style="float: none !important" size='90' maxlength='75' id='leagueNew'
- value="<?php echo stripslashes(htmlspecialchars($dLeagueName)); ?>" />
- <?php
- }
- ?>
- </td>
- </tr>
- <tr>
- <td style='background-color:#DDDDDD'><?php echo JText::_('COM_JOOMLEAGUE_ADMIN_XML_IMPORT_SEASON'); ?></td>
- <td style='background-color:#DDDDDD'>
- <?php
- $foundMatchingSeason = false;
- $dSeasonName = "";
- if (isset($season->name))
- {
- $dSeasonName=$season->name;
- }
- if (count($this->seasons) > 0)
- {
- $options = "";
- foreach ($this->seasons AS $row)
- {
- $options .= '<option ';
- if ($row->name==$dSeasonName)
- {
- $foundMatchingSeason = true;
- $options .= "selected='selected' ";
- }
- elseif (count($this->seasons)==1)
- {
- $options .= "selected='selected' ";
- }
- $options .= "value='$row->id;'>";
- $options .= $row->name;
- $options .= '</option>';
- }
- ?>
- <select name='season' id='season' <?php if (!$foundMatchingSeason){echo " disabled='disabled'";}?>>
- <option selected value="0"><?php echo JText::_('COM_JOOMLEAGUE_ADMIN_XML_IMPORT_SEASON_SELECT'); ?></option>
- <?php echo $options;?>
- </select>
- <br /><br />
- <input type='checkbox' name='newSeasonCheck' style="float: none !important" value="1"
- <?php if (!$foundMatchingSeason){echo " checked='checked'";}?>
- onclick="
- if (this.checked) {
- $('adminForm').season.disabled=true;
- $('adminForm').seasonNew.disabled=false;
- } else {
- $('adminForm').season.disabled=false;
- $('adminForm').seasonNew.disabled=true;
- }" />
- <?php echo JText::_('COM_JOOMLEAGUE_ADMIN_XML_IMPORT_CREATE_NEW'); ?>
- <input type='text' name='seasonNew' style="float: none !important" size='90' maxlength='75' id='seasonNew'
- value="<?php echo stripslashes(htmlspecialchars($dSeasonName)); ?>"
- <?php if ($foundMatchingSeason){echo " disabled='disabled'";}?>/>
- <?php
- }
- else
- {
- ?>
- <input type="hidden" name="newSeasonCheck" value="1" />
- <?php echo JText::_('COM_JOOMLEAGUE_ADMIN_XML_IMPORT_CREATE_NEW'); ?>
- <input type='text' name='seasonNew' style="float: none !important" size='90' maxlength='75' id='seasonNew'
- value="<?php echo stripslashes(htmlspecialchars($dSeasonName)); ?>" />
- <?php
- }
- ?>
- </td>
- </tr>
- <tr>
- <td style='background-color:#EEEEEE'><?php echo JText::_('COM_JOOMLEAGUE_ADMIN_XML_IMPORT_TEMPLATES'); ?></td>
- <td style='background-color:#EEEEEE'>
- <select name='copyTemplate' id='copyTemplate'>
- <option value="0" selected><?php echo JText::_('COM_JOOMLEAGUE_ADMIN_XML_IMPORT_TEMPLATES_USEOWN'); ?></option>
- <?php
- foreach ($this->templates AS $row)
- {
- echo "<option value=\"$row->id\">$row->name</option>\n";
- }
- ?>
- </select>
- </td>
- </tr>
- <tr>
- <td style='background-color:#DDDDDD'><?php echo JText::_('COM_JOOMLEAGUE_ADMIN_XML_IMPORT_TIMEZONE'); ?></td>
- <td style='background-color:#DDDDDD'>
- <?php echo $this->lists['timezone'].' '; ?>
- </td>
- </tr>
- <tr>
- <td style='background-color:#EEEEEE'><?php echo JText::_('COM_JOOMLEAGUE_ADMIN_XML_IMPORT_PUBLISH'); ?></td>
- <td style='background-color:#EEEEEE'>
- <fieldset id="published" class="radio inputbox">
- <?php echo $this->lists['published'].' '; ?>
- </fieldset>
- </td>
- </tr>
- <?php
- }
- ?>
- </table>
- </fieldset>
- <p style='text-align:right;'><a href='#page_bottom'><?php echo JText::_('COM_JOOMLEAGUE_ADMIN_XML_IMPORT_BOTTOM'); ?></a></p>
- <?php
- }
- ?>
-
- <?php
- //===============================================================================================================
- //
- // CLUB AND TEAM IMPORT
- //
- //===============================================================================================================
- if ((isset($clubs) && count($clubs) > 0) || (isset($teams) && count($teams) > 0))
- {
- ?>
- <fieldset>
- <legend><strong><?php
- if (!empty($clubs) && !empty($teams))
- {
- echo JText::_('COM_JOOMLEAGUE_ADMIN_XML_IMPORT_CLUBS_TEAMS_LEGEND');
- }
- elseif (!empty($clubs))
- {
- echo JText::_('COM_JOOMLEAGUE_ADMIN_XML_IMPORT_CLUBS_LEGEND');
- }
- else
- {
- echo JText::_('COM_JOOMLEAGUE_ADMIN_XML_IMPORT_TEAMS_LEGEND');
- }
- ?></strong></legend>
- <table class='adminlist'>
- <thead>
- <tr>
- <th width='5%' nowrap='nowrap'><?php
- $checkCount=((isset($clubs) && count($clubs) > 0)) ? count($clubs) : count($teams);
- echo JText::_('COM_JOOMLEAGUE_ADMIN_XML_IMPORT_ALL_NEW');
- echo '<input type="checkbox" name="toggleTeamsClubs" value="" onclick="checkAllNewClubTeam('.$checkCount.')" />';
- ?></th>
- <th width="20%"><?php echo JText::_('Club and Team import option'); ?></th>
- <th width="45%"><?php echo JText::_('Club and Team information'); ?></th>
- </tr>
- </thead>
- <tbody>
- <?php
- // Some explanation on the used variables
- // $teamsClubs : array of xml objects present in the xml import file (containing all fields of the club table)
- // In case of a project import it is the list of teams, otherwise if clubs are defined in the
- // xml import file then it contains the defined clubs, and if no clubs are defined but teams are
- // then it will contain the team definition of the import file.
- // $clubs : array of xml objects present in the xml import file (containing all fields of the club table)
- // $teams : array of xml objects present in the xml import file (containing all fields of the team table)
- // $this->clubs : array of objects with id, name, standard playground and country that are present in the database
- // $this->teams : array of objects with id, name, club_id, short name, middle name and info that are present in the database
-
- $i=0;
- $color1="#DDDDDD";
- $color2="#EEEEEE";
- //foreach ($teams AS $key=> $team)
- foreach ($teamsClubs AS $key=> $teamClub)
- {
- $color = ($key % 2 == 1) ? $color1 : $color2;
-
- // Team info from the import file
- $importTeam_ID = (int)$teamClub->id;
- $importTeam_Name = (string)$teamClub->name;
- $importTeam_ShortName = (string)$teamClub->short_name;
- $importTeam_MiddleName = (string)$teamClub->middle_name;
- $importTeam_Info = (string)(($this->import_version=='OLD') ? $teamClub->description : $teamClub->info);
- $importTeam_ClubID = (int)$teamClub->club_id;
-
- // Find club name via the club ID specified for the team in the import file
- $importTeam_ClubName = "";
- $importTeam_ClubCountry = "";
- if (count($clubs) > 0)
- {
- foreach ($clubs AS $club)
- {
- if ((int)$club->id == $importTeam_ClubID)
- {
- $importTeam_ClubName = (string)$club->name;
- $importTeam_ClubCountry = (string)$club->country;
- if (preg_match('=^[0-9]+$=',$importTeam_ClubCountry))
- {
- $importTeam_ClubCountry = $this->OldCountries[(int)$importTeam_ClubCountry];
- }
- break;
- }
- }
- }
-
- // Find in database a team with the name equal to that of the imported team
- $matchingTeam_ID = 0;
- $matchingTeam_ClubID = 0;
- if (count($this->teams) > 0)
- {
- foreach ($this->teams AS $team)
- {
- if ((strcasecmp($importTeam_Name,$team->name) == 0) &&
- // (strcasecmp($importTeam_ShortName,$team->short_name)==0) &&
- // (strcasecmp($importTeam_MiddleName,$team->middle_name)==0) &&
- (strcasecmp($importTeam_Info,$team->info)==0))
- {
- $matchingTeam_ID = $team->id;
- $matchingTeam_ClubID = $team->club_id;
- break;
- }
- }
- }
-
- // Find in database a club with the name equal to that of the imported club
- $matchingClub_ID = 0;
- $matchingClub_PlaygroundID = 0;
- $matchingClub_Country = 0;
- if (count($this->clubs))
- {
- foreach ($this->clubs as $club)
- {
- if (strcasecmp($importTeam_ClubName,$club->name)==0)
- {
- $matchingClub_ID = $club->id;
- $matchingClub_PlaygroundID = $club->standard_playground;
- $matchingClub_Country = $club->country;
- break;
- }
- }
- }
-
- $foundMatchingClubAndTeam = (($matchingClub_ID != 0) && ($matchingTeam_ClubID == $matchingClub_ID));
- $foundMatchingClub = ($matchingClub_ID != 0);
- if (!$foundMatchingClubAndTeam)
- {
- $matchingTeam_ID = 0;
- $matchingTeam_ClubID = 0;
- }
-
- ?>
- <tr>
- <td nowrap='nowrap' style='text-align:center; vertical-align:middle; background-color:<?php echo $color; ?>'>
-
- </td>
- <?php $color = $foundMatchingClubAndTeam ? $useExistingEntryColor: $useNewEntryColor; ?>
- <td style='line-height:200%; text-align:left; vertical-align:middle; background-color:<?php echo $color; ?>' id='tetd<?php echo $key; ?>'>
- <?php
- if ($foundMatchingClubAndTeam)
- {
- $checked1 = "checked='checked'";
- $checked2 = "";
- $checked3 = "";
- }
- elseif ($foundMatchingClub)
- {
- $checked1 = "";
- $checked2 = "checked='checked'";
- $checked3 = "";
- }
- else
- {
- $checked1 = "";
- $checked2 = "";
- $checked3 = "checked='checked'";
- }
- ?>
- <!--
- Clicking on the first radio button will show a selector with "club / team" info in a popup window.
- The club_id, team_id and location of the database will be coupled to the textual entries.
- -->
- <input type='radio' name='cto_<?php echo $i; ?>' id='ecet_<?php echo $i; ?>' value='1' <?php echo $checked1; ?>
- <?php
- if ((count($this->clubs) > 0) && (count($this->teams) > 0))
- {
- echo "onclick='javascript:openSelectWindow(";
- echo $matchingTeam_ID;
- echo ",".$key;
- echo ',"selector"';
- echo ",this";
- echo ",9"; // Selection type (club&team)
- echo ")' />";
- }
- else
- {
- // If there are no clubs/teams to select from, restore the radiobutton to new club/new team
- echo "onclick='javascript:alertAndRestore($key, 10, \"".JText::_('COM_JOOMLEAGUE_ADMIN_XML_IMPORT_NO_CLUBS_TEAMS_IN_DB')."\")' />";
- }
- echo JText::_('COM_JOOMLEAGUE_ADMIN_XML_IMPORT_EXISTING_CLUB_AND_TEAM');
- ?>
- <br /><br />
- <!--
- Clicking on the second radiobutton will show a selector selector with "club" info in a popup window.
- The club_id and location of the database will be coupled to the textual entries.
- -->
- <input type='radio' name='cto_<?php echo $i; ?>' id='ecnt_<?php echo $i; ?>' value='2' <?php echo $checked2; ?>
- <?php
- if (count($this->clubs) > 0)
- {
- echo "onclick='javascript:openSelectWindow(";
- echo $matchingClub_ID;
- echo ",".$key;
- echo ',"selector"';
- echo ",this";
- echo ",10"; // Selection type (club)
- echo ")' />";
- }
- else
- {
- // If there are no clubs to select from, restore the radiobutton to new club/new team
- echo "onclick='javascript:alertAndRestore($key, 10, \"".JText::_('COM_JOOMLEAGUE_ADMIN_XML_IMPORT_NO_CLUBS_IN_DB')."\")' />";
- }
- echo JText::_('COM_JOOMLEAGUE_ADMIN_XML_IMPORT_EXISTING_CLUB_NEW_TEAM');
- ?>
- <br /><br />
- <!--
- Clicking the third radiobutton will result in the club and team being taken over from the import file.
- -->
- <input type='radio' name='cto_<?php echo $i; ?>' id='ncnt_<?php echo $i; ?>' value='3' <?php echo $checked3; ?>
- <?php
- echo "onclick='javascript:resetToImportValues(";
- echo $key;
- echo ",10"; // Selection type (club)
- echo ")' />";
-
- echo JText::_('COM_JOOMLEAGUE_ADMIN_XML_IMPORT_NEW_CLUB_NEW_TEAM');
- ?>
- <br /><br />
-
- </td>
- <?php
- if ($matchingClub_ID == 0)
- {
- $ic_disabled = ""; // imported club
- $dc_disabled = " disabled='disabled'"; // database club
- }
- else
- {
- $ic_disabled = " disabled='disabled'";
- $dc_disabled = "";
- }
- if ($matchingTeam_ID == 0)
- {
- $it_disabled = ""; // imported team
- $dt_disabled = " disabled='disabled'"; // database team
- }
- else
- {
- $it_disabled = " disabled='disabled'";
- $dt_disabled = "";
- }
- ?>
- <td style='text-align:left; vertical-align:top; background-color:<?php echo $color; ?>'>
- <table cellpadding='0' cellspacing='0' style='border-color:<?php echo $color; ?>; border-width:0; border-style:none'>
- <thead>
- <tr style='background-color:<?php echo $color; ?>; border-color:<?php echo $color; ?>; border-style:none'>
- <th style='background-color:<?php echo $color; ?>; border-color:<?php echo $color; ?>; width:75px'>
-
- </th>
- <th style='background-color:<?php echo $color; ?>; border-color:<?php echo $color; ?>'>
- <?php echo JText::_('Import File');?>
- </th>
- <th style='background-color:<?php echo $color; ?>; border-color:<?php echo $color; ?>; width:30px; text-align:center'>
- →
- </th>
- <th style='background-color:<?php echo $color; ?>; border-color:<?php echo $color; ?>'>
- <?php echo JText::_('Database');?>
- </th>
- </tr>
- </thead>
- <tbody>
- <tr style='background-color:<?php echo $color; ?>; border-color:<?php echo $color; ?>; border-style:none'>
- <td style='background-color:<?php echo $color; ?>; border-color:<?php echo $color; ?>'>
- <b><?php echo JText::_('COM_JOOMLEAGUE_ADMIN_XML_IMPORT_CLUBNAME');?></b>
- <input type='hidden' name='matching_ClubID_<?php echo $key;?>' value='<?php echo $matchingClub_ID;?>'/>
- <input type='hidden' name='clubID_<?php echo $key;?>' value='<?php echo $importTeam_ClubID;?>' <?php echo $ic_disabled;?>/>
- <input type='hidden' name='clubName_<?php echo $key; ?>' size='60' maxlength='100'
- value='<?php echo stripslashes(htmlspecialchars($importTeam_ClubName));?>' <?php echo $ic_disabled;?>/>
- <input type='hidden' name='clubFileID_<?php echo $key;?>' value='<?php echo $importTeam_ClubID;?>'/>
- <input type='hidden' name='clubCountry_<?php echo $key; ?>' size='60' maxlength='100'
- value='<?php echo stripslashes(htmlspecialchars($importTeam_ClubCountry));?>' <?php echo $ic_disabled;?>/>
-
- <input type='hidden' name='dbClubID_<?php echo $key;?>' value='<?php echo $matchingClub_ID;?>' <?php echo $dc_disabled;?>/>
- <input type='hidden' name='dbClubPlaygroundID_<?php echo $key;?>' value='<?php echo $matchingClub_PlaygroundID;?>'/>
- </td>
- <td style='background-color:<?php echo $color; ?>; border-color:<?php echo $color; ?>'>
- <input type='text' name='impClubName_<?php echo $key;?>' value='<?php echo $importTeam_ClubName;?>' size='30' maxlength='45' disabled='disabled'>
- </td>
- <td style='background-color:<?php echo $color; ?>; border-color:<?php echo $color; ?>'>
-
- </td>
- <td style='background-color:<?php echo $color; ?>; border-color:<?php echo $color; ?>'>
- <input type='text' name='dbClubName_<?php echo $key;?>' size='30' maxlength='45' disabled='disabled'
- value='<?php echo stripslashes(htmlspecialchars($importTeam_ClubName));?>' />
- </td>
- </tr>
- <tr style='background-color:<?php echo $color; ?>; border-color:<?php echo $color; ?>; border-style:none'>
- <td style='background-color:<?php echo $color; ?>; border-color:<?php echo $color; ?>'>
- <b><?php echo JText::_('COM_JOOMLEAGUE_ADMIN_XML_IMPORT_CLUBCOUNTRY');?></b>
- </td>
- <td style='background-color:<?php echo $color; ?>; border-color:<?php echo $color; ?>'>
- <input type='text' name='impClubCountry_<?php echo $key;?>' value='<?php echo $importTeam_ClubCountry;?>' size='30' maxlength='45' disabled='disabled'>
- </td>
- <td style='background-color:<?php echo $color; ?>; border-color:<?php echo $color; ?>'>
-
- </td>
- <td style='background-color:<?php echo $color; ?>; border-color:<?php echo $color; ?>'>
- <input type='text' name='dbClubCountry_<?php echo $key;?>' value='<?php echo $importTeam_ClubCountry; ?>' size='30' maxlength='45' disabled='disabled'>
- </td>
- </tr>
- <tr style='background-color:<?php echo $color; ?>; border-color:<?php echo $color; ?>; border-style:none'>
- <td style='background-color:<?php echo $color; ?>; border-color:<?php echo $color; ?>'>
- <input type='hidden' name='matching_TeamID_<?php echo $key;?>' value='<?php echo $matchingTeam_ID;?>' <?php echo $it_disabled;?>/>
- <input type='hidden' name='teamID_<?php echo $key;?>' value='<?php echo $importTeam_ID;?>' <?php echo $it_disabled;?>/>
- <input type='hidden' name='teamFileID_<?php echo $key;?>' value='<?php echo $importTeam_ID;?>' <?php echo $it_disabled;?>/>
- <input type='hidden' name='teamName_<?php echo $key; ?>' size='60' maxlength='100'
- value='<?php echo stripslashes(htmlspecialchars($importTeam_Name));?>' <?php echo $it_disabled;?>/>
- <input type='hidden' name='teamShortname_<?php echo $key; ?>' size='60' maxlength='100'
- value='<?php echo stripslashes(htmlspecialchars($importTeam_ShortName));?>' <?php echo $it_disabled;?>/>
- <input type='hidden' name='teamMiddleName_<?php echo $key; ?>' size='60' maxlength='100'
- value='<?php echo stripslashes(htmlspecialchars($importTeam_MiddleName));?>' <?php echo $it_disabled;?>/>
- <input type='hidden' name='teamInfo_<?php echo $key; ?>' size='60' maxlength='255'
- value='<?php echo stripslashes(htmlspecialchars($importTeam_Info));?>' <?php echo $it_disabled;?>/>
- <input type='hidden' name='dbTeamID_<?php echo $key;?>' value='<?php echo $matchingTeam_ID;?>' <?php echo $dt_disabled;?>/>
- <b><?php echo JText::_('COM_JOOMLEAGUE_ADMIN_XML_IMPORT_TEAMNAME');?></b>
- </td>
- <td style='background-color:<?php echo $color; ?>; border-color:<?php echo $color; ?>'>
- <input type='text' name='impTeamName_<?php echo $key;?>' value='<?php echo $importTeam_Name;?>' size='30' maxlength='45' disabled='disabled'/>
- </td>
- <td style='background-color:<?php echo $color; ?>; border-color:<?php echo $color; ?>'>
-
- </td>
- <td style='background-color:<?php echo $color; ?>; border-color:<?php echo $color; ?>'>
- <input type='text' name='dbTeamName_<?php echo $key;?>' value='<?php echo $importTeam_Name; ?>' size='30' maxlength='45' disabled='disabled'/>
- </td>
- </tr>
- </tbody>
- </table>
- </td>
- </tr>
- <?php
- $i++;
- }
- ?>
- </tbody>
- </table>
- </fieldset>
- <p style='text-align:right;'><a href='#page_top'><?php echo JText::_('COM_JOOMLEAGUE_ADMIN_XML_IMPORT_TOP'); ?></a></p>
- <?php
- }
- ?>
-
- <?php
- //===============================================================================================================
- //
- // PLAYGROUND IMPORT
- //
- //===============================================================================================================
- if (isset($playgrounds) && (is_array($playgrounds) && count($playgrounds) > 0))
- {
- ?>
- <fieldset>
- <legend><strong><?php echo JText::_('Playground Assignment'); ?></strong></legend>
- <table class='adminlist'>
- <thead>
- <tr>
- <th width='5%' nowrap='nowrap'><?php
- echo JText::_('COM_JOOMLEAGUE_ADMIN_XML_IMPORT_ALL_NEW');
- echo '<input type="checkbox" name="togglePlaygrounds" value="" onclick="checkAllPlaygrounds('.count($playgrounds).')" />';
- ?></th>
- <th><?php echo JText::_('Playground'); ?></th>
- </tr>
- </thead>
- <tbody>
- <?php
- $i=0;
- $color1="#DDDDDD";
- $color2="#EEEEEE";
- foreach ($playgrounds AS $key=> $playground)
- {
- if ($key%2==1){$color=$color1;}else{$color=$color2;}
- ?>
- <tr>
- <td style='text-align:center; vertical-align:middle; background-color:<?php echo $color; ?>'>
- <input type='checkbox' value="<?php echo $key; ?>" name='plid[]' id='pl<?php echo $i; ?>' onchange='testPlaygroundData(this,<?php echo $key; ?>)' />
- </td>
- <?php
- // Playground column starts here
- $color=$useNewEntryColor;
- $foundMatchingPlayground=0;
- $foundMatchingPlaygroundName='';
- $foundMatchingPlaygroundShortname='';
- $playgroundClubID=0;
-
- if (count($this->playgrounds) > 0)
- {
- foreach ($this->playgrounds AS $row1)
- {
- if (strcasecmp($playground->name,$row1->name)==0)
- {
- $color=$useExistingEntryColor;
- $foundMatchingPlayground=$row1->id;
- $foundMatchingPlaygroundName=$row1->name;
- $foundMatchingPlaygroundShortname=$row1->short_name;
- $playgroundClubID=$row1->club_id;
- break;
- }
- }
- }
- ?>
- <td width='45%' style='text-align:left; background-color:<?php echo $color; ?>' id='pltd<?php echo $key; ?>'>
- <?php
- if ($foundMatchingPlayground)
- {
- $checked=' checked="checked" ';
- $disabled='';
- }
- else
- {
- $checked='';
- $disabled=' disabled="disabled" ';
- }
- echo '<input type="checkbox" name="choosePlayground_'.$key.'"' . $checked;
- echo 'onclick="if(this.checked)
- {
- $(\'adminForm\').selectPlayground_'.$key.'.checked=false;
- $(\'adminForm\').createPlayground_'.$key.'.checked=false;
- $(\'adminForm\').playgroundName_'.$key.'.disabled=true;
- $(\'adminForm\').playgroundShortname_'.$key.'.disabled=true;
- }
- else
- {
- }" '. $disabled ;
- echo "/> ";
- $output1="<input type='text' name='dbPlaygroundName_$key' size='45' maxlength='45' value=\"".stripslashes(htmlspecialchars($foundMatchingPlaygroundName))."\" style='font-weight: bold;' disabled='disabled' />";
- $output2="<input type='text' name='dbPaygroundShortname_$key' size='20' maxlength='15' value=\"".stripslashes(htmlspecialchars($foundMatchingPlaygroundShortname))."\" style='font-weight: bold;' disabled='disabled' />";
-
- echo JText::sprintf('Use existing Playground from Database %1$s %2$s',$output1,$output2);
- echo "<input type='hidden' name='dbPlaygroundClubID_$key' value=\"$playgroundClubID\" />";
- echo "<input type='hidden' name='dbPlaygroundID_$key' value=\"$foundMatchingPlayground\" />";
- echo '<br /><br />';
-
- if (count($this->playgrounds) > 0)
- {
- echo "<input type='checkbox' name='selectPlayground_$key' ";
- echo "onclick='javascript:openSelectWindow(";
- echo $foundMatchingPlayground;
- echo ",".$key;
- echo ',"selector"';
- echo ",this";
- echo ",4";
- echo ")' ";
- echo "/> ";
- echo JText::_('Assign other Playground from Database');
- echo '<br /><br />';
- }
- else
- {
- echo "<input type='hidden' name='selectPlayground_$key' />";
- }
-
- if ($foundMatchingPlayground)
- {
- $checked='';
- //$disabled=' disabled="disabled" ';
- $disabled='';
- }
- else
- {
- $checked=' checked="checked" ';
- $disabled='';
- }
- echo '<input type="checkbox" style="float: none !important" name="createPlayground_'.$key.'"'. $checked;
- echo 'onclick="if(this.checked)
- {
- $(\'adminForm\').choosePlayground_'.$key.'.checked=false;
- $(\'adminForm\').selectPlayground_'.$key.'.checked=false;
- $(\'adminForm\').playgroundName_'.$key.'.disabled=false;
- $(\'adminForm\').playgroundShortname_'.$key.'.disabled=false;
- }
- else
- {
- $(\'adminForm\').playgroundName_'.$key.'.disabled=true;
- $(\'adminForm\').playgroundShortname_'.$key.'.disabled=true;
- }" ' .$disabled;
- echo "/> ";
- echo JText::_('Create new Playground');
- ?>
- <br /><br />
- <table cellspacing='0' cellpadding='0'>
- <tr>
- <td>
- <?php echo '<b>'.JText::_('Playgroundname').'</b>'; ?><br >
- <input type='hidden' name='playgroundID_<?php echo $key; ?>' value="<?php echo $key; ?>" />
- <input type='text' style="float: none !important" name='playgroundName_<?php echo $key; ?>' size='45' maxlength='45' value="<?php echo stripslashes(htmlspecialchars($playground->name)); ?>" <?php echo $disabled; ?> />
- </td>
- <td>
- <?php echo '<b>'.JText::_('Shortname').'</b>'; ?><br />
- <input type='text' style="float: none !important" name='playgroundShortname_<?php echo $key; ?>' size='20' maxlength='15' value="<?php echo stripslashes(htmlspecialchars($playground->short_name)); ?>" <?php echo $disabled; ?> />
- </td>
- </tr>
- </table>
- </td>
- </tr>
- <?php
- $i++;
- }
- ?>
- </tbody>
- </table>
- </fieldset>
- <p style='text-align:right;'><a href='#page_top'><?php echo JText::_('COM_JOOMLEAGUE_ADMIN_XML_IMPORT_TOP'); ?></a></p>
- <?php
- }
- ?>
-
- <?php
- //===============================================================================================================
- //
- // EVENT IMPORT
- //
- //===============================================================================================================
- if (isset($events) && (is_array($events) && count($events) > 0))
- {
- ?>
- <fieldset>
- <legend><strong><?php echo JText::_('Event Assignment'); ?></strong></legend>
- <table class='adminlist'>
- <thead>
- <tr>
- <th width='5%' nowrap='nowrap'><?php
- echo JText::_('COM_JOOMLEAGUE_ADMIN_XML_IMPORT_ALL_NEW');
- echo '<input type="checkbox" name="toggleEvents" value="" onclick="checkAllEvents('.count($events).')" />';
- ?></th>
- <th><?php echo JText::_('Event'); ?></th>
- </tr>
- </thead>
- <tbody>
- <?php
- $i=0;
- $color1="#DDDDDD";
- $color2="#EEEEEE";
- foreach ($events AS $key=> $event)
- {
- if ($key%2==1){$color=$color1;}else{$color=$color2;}
- ?>
- <tr>
- <td style='text-align:center; vertical-align:middle; background-color:<?php echo $color; ?>'>
- <input type='checkbox' value="<?php echo $key; ?>" name='evid[]' id='ev<?php echo $i; ?>' onchange='testEventsData(this,<?php echo $key; ?>)' />
- </td>
- <?php
- // Event column starts here
- $color=$useNewEntryColor;
- $foundMatchingEvent=0;
- $foundMatchingEventName='';
-
- if (count($this->events) > 0)
- {
- foreach ($this->events AS $row1)
- {
- if ((strcasecmp($event->name,$row1->name)==0) ||
- (strcasecmp(JText::_($event->name), JText::_($row1->name))==0))
- {
- $color=$useExistingEntryColor;
- $foundMatchingEvent=$row1->id;
- $foundMatchingEventName=$row1->name;
- break;
- }
- }
- }
- ?>
- <td width='45%' style='text-align:left; background-color:<?php echo $color; ?>' id='evtd<?php echo $key; ?>'>
- <?php
- if ($foundMatchingEvent)
- {
- $checked=' checked="checked" ';
- $disabled='';
- }
- else
- {
- $checked='';
- $disabled=' disabled="disabled" ';
- }
- echo '<input type="checkbox" name="chooseEvent_'.$key.'"'. $checked;
- echo 'onclick="if(this.checked)
- {
- $(\'adminForm\').selectEvent_'.$key.'.checked=false;
- $(\'adminForm\').createEvent_'.$key.'.checked=false;
- $(\'adminForm\').eventName_'.$key.'.disabled=true;
- }
- else
- {
- }" ' . $disabled ;
- echo "/> ";
- $output1="<input type='text' name='dbEventName_$key' size='45' maxlength='75' value=\"".stripslashes(htmlspecialchars(JText::_($foundMatchingEventName)))."\" style='font-weight: bold;' disabled='disabled' />";
- echo JText::sprintf('Use existing %1$s from Database',$output1);
- echo "<input type='hidden' name='dbEventID_$key' value=\"$foundMatchingEvent\" />";
- echo '<br /><br />';
-
- if (count($this->events) > 0)
- {
- echo "<input type='checkbox' name='selectEvent_$key' ";
- echo "onclick='javascript:openSelectWindow(";
- echo $foundMatchingEvent;
- echo ",".$key;
- echo ',"selector"';
- echo ",this";
- echo ",5";
- echo ")' ";
- echo "/> ";
- echo JText::_('Assign other Event from Database');
- echo '<br /><br />';
- }
- else
- {
- echo "<input type='hidden' name='selectEvent_$key' />";
- }
-
- if ($foundMatchingEvent)
- {
- $checked='';
- $disabled=' disabled="disabled" ';
- }
- else
- {
- $checked=' checked="checked" ';
- $disabled='';
- }
- echo '<input type="checkbox" name="createEvent_'.$key.'"'. $checked;
- echo 'onclick="if(this.checked)
- {
- $(\'adminForm\').chooseEvent_'.$key.'.checked=false;
- $(\'adminForm\').selectEvent_'.$key.'.checked=false;
- $(\'adminForm\').eventName_'.$key.'.disabled=fal