Example #1
0
    function Wertung(&$row, $runde, $bretter, $ergebnis, $option, $lists)
    {
        CLMViewErgebnisse::setWertungToolbar($row);
        JRequest::setVar('hidemainmenu', 1);
        JFilterOutput::objectHTMLSafe($row, ENT_QUOTES, 'extrainfo');
        ?>

	<div class="width-100">
	<fieldset class="adminform">
	<legend><?php 
        echo JText::_('EVALUATION_HINT_1');
        ?>
</legend>
	<?php 
        echo JText::_('EVALUATION_HINT_2');
        ?>
	<br>
	<?php 
        echo JText::_('EVALUATION_HINT_3');
        ?>
	</fieldset>
	</div>

	<form action="index.php" method="post" name="adminForm" id="adminForm">

	<div>
	<div class="width-100">
	<fieldset class="adminform">
	<legend><?php 
        if ($runde[0]->dg == 1) {
            echo $runde[0]->lname . ' : ' . JText::_('EVALUATION_ROUND') . ' ' . $runde[0]->runde . ', ' . JText::_('EVALUATION_PAIRING') . ' ' . $runde[0]->paar;
        } else {
            echo $runde[0]->lname . ' : ' . JText::_('EVALUATION_ROUND') . ' ' . $runde[0]->runde . ', ' . JText::_('EVALUATION_PAIRING') . ' ' . $runde[0]->paar . ', ' . JText::_('EVALUATION_DG') . ' ' . $runde[0]->dg;
        }
        ?>
	</legend>
	<table class="admintable">
	<tr>
		<td class="key" nowrap="nowrap" width="25">Brett</td>
		<td class="key" nowrap="nowrap"><?php 
        echo $runde[0]->hname;
        ?>
</td>
		<td class="key" nowrap="nowrap"><?php 
        echo $runde[0]->gname;
        ?>
</td>
		<td class="key" nowrap="nowrap"><?php 
        echo JText::_('EVALUATION_RESULT');
        ?>
</td>
		<td class="key" nowrap="nowrap"><?php 
        echo JText::_('EVALUATION_RESULT_TO');
        ?>
</td>
	<tr>
<?php 
        for ($i = 0; $i < $runde[0]->stamm; $i++) {
            ?>
	<tr>
		<td class="key" nowrap="nowrap">
		  <label for="sid">
			<?php 
            echo JText::_('RESULTS_DETAILS_NO') . '&nbsp;&nbsp;' . ($i + 1) . '&nbsp;&nbsp;';
            ?>
		  </label>
		</td>
		<td class="key" nowrap="nowrap">
		<?php 
            echo $bretter[$i]->hname;
            ?>
		</td>

		<td class="key" nowrap="nowrap">
		<?php 
            echo $bretter[$i]->gname;
            ?>
		</td>

		<td class="key" nowrap="nowrap">
			<?php 
            for ($x = 0; $x < 9; $x++) {
                ?>
			<?php 
                if ($runde[0]->gemeldet > 0 and (int) $ergebnis[$x]->id - 1 == (int) $bretter[$i]->ergebnis) {
                    echo $ergebnis[$x]->erg_text;
                }
            }
            ?>
		</td>

		<td class="key" nowrap="nowrap">
		  <select size="1" name="<?php 
            echo 'ergebnis' . ($i + 1);
            ?>
" id="<?php 
            echo 'ergebnis' . ($i + 1);
            ?>
">
			<option value="-1" selected="selected"><?php 
            echo JText::_('RESULTS_DETAILS_DD_3');
            ?>
</option>
			<?php 
            for ($x = 0; $x < 9; $x++) {
                ?>
			 <option value="<?php 
                echo $ergebnis[$x]->eid;
                ?>
" <?php 
                if ($runde[0]->dwz_edit > 0 and isset($bretter[$i]->dwz_edit) and $ergebnis[$x]->id - 1 == (int) $bretter[$i]->dwz_edit) {
                    ?>
 selected="selected" <?php 
                }
                ?>
><?php 
                echo $ergebnis[$x]->erg_text;
                ?>
</option>
			<?php 
            }
            ?>
		  </select>
		</td>

	</tr>
<?php 
        }
        ?>
 
	<tr>
		<td class="key" nowrap="nowrap"><?php 
        echo JText::_('EVALUATION_RESULT_MANUALLY');
        ?>
		</td>
		<td class="key" nowrap="nowrap">
		</td>
		<td class="key" nowrap="nowrap"><?php 
        echo JText::_('EVALUATION_BRETTPUNKTE_MANUALLY');
        //klkl
        ?>
		</td>
		<td class="key" nowrap="nowrap">
		<?php 
        echo $lists['weiss'] . ' - ' . $lists['schwarz'];
        ?>
		</td>
		<td class="key" nowrap="nowrap">
		</td>
	</tr>
	<?php 
        if ($runde[0]->b_wertung > 0) {
            $ww_erg = $lists['weiss_w'];
            $sw_erg = $lists['schwarz_w'];
            ?>
	<tr>
		<td class="key" nowrap="nowrap">
		</td>
		<td class="key" nowrap="nowrap">
		</td>
		<td class="key" nowrap="nowrap"><?php 
            echo JText::_('EVALUATION_WERTPUNKTE_MANUALLY');
            //klkl
            ?>
		</td>
		<td class="key" nowrap="nowrap">
		<input class="inputbox" type="text" name="ww_erg" id="ww_erg" size="8" maxlength="8" value="<?php 
            echo $ww_erg;
            ?>
" />
		<?php 
            echo "   -   ";
            //klkl
            ?>
		<input class="inputbox" type="text" name="sw_erg" id="sw_erg" size="8" maxlength="8" value="<?php 
            echo $sw_erg;
            ?>
" />
		</td>
		<td class="key" nowrap="nowrap">
		</td>
	</tr>
	<?php 
        }
        ?>
	
		</table>
		</fieldset>
		</div>

		<div class="width-100">
		<fieldset class="adminform">
		<legend><?php 
        echo JText::_('RESULTS_DETAILS_DETAILS');
        ?>
</legend>

		<table class="admintable">
		<tr>
			<td class="key" width="20%" nowrap="nowrap">
			<label for="name"><?php 
        echo JText::_('RESULTS_DETAILS_BY');
        ?>
</label>
			</td>
			<td>
			<?php 
        if (!$runde[0]->melder) {
            echo JText::_('RESULTS_DETAILS_NOTHING');
        } else {
            echo $runde[0]->melder;
        }
        ?>
			</td>
		</tr>
		<tr>
			<td class="key" width="20%" nowrap="nowrap">
			<label for="name"><?php 
        echo JText::_('RESULTS_DETAILS_DATE');
        ?>
</label>
			</td>
			<td>
			<?php 
        if ($runde[0]->zeit != "0000-00-00 00:00:00") {
            echo JHtml::_('date', $runde[0]->zeit, JText::_('DATE_FORMAT_LC2'));
        } else {
            echo JText::_('RESULTS_DETAILS_NOTHING');
        }
        ?>

			</td>
		</tr>
		<tr>
			<td class="key" width="20%" nowrap="nowrap">
			<label for="name"><?php 
        echo JText::_('RESULTS_DETAILS_LAST_EDIT_BY');
        ?>
</label>
			</td>
			<td>
			<?php 
        if (!$runde[0]->editor) {
            echo JText::_('RESULTS_DETAILS_NOTHING');
        } else {
            echo $runde[0]->name_editor;
        }
        ?>
			</td>
		</tr>
		<tr>
			<td class="key" width="20%" nowrap="nowrap">
			<label for="name"><?php 
        echo JText::_('am : ');
        ?>
</label>
			</td>
			<td>
			<?php 
        if ($runde[0]->edit_zeit != "0000-00-00 00:00:00") {
            echo JHtml::_('date', $runde[0]->edit_zeit, JText::_('DATE_FORMAT_LC2'));
        } else {
            echo "---";
        }
        ?>
			</td>
		</tr>
		<tr>
			<td class="key" width="20%" nowrap="nowrap">
			<label for="name"><?php 
        echo JText::_('EVALUATION_RESULT_EDITED_BY');
        ?>
</label>
			</td>
			<td>
			<?php 
        if (!$runde[0]->dwz_editor) {
            echo JText::_('RESULTS_DETAILS_NOTHING');
        } else {
            echo $runde[0]->dwz_editor;
        }
        ?>
			</td>
		</tr>
		<tr>
			<td class="key" width="20%" nowrap="nowrap">
			<label for="name"><?php 
        echo JText::_('RESULTS_DETAILS_DATE');
        ?>
</label>
			</td>
			<td>
			<?php 
        if ($runde[0]->dwz_zeit != "0000-00-00 00:00:00") {
            echo JHtml::_('date', $runde[0]->dwz_zeit, JText::_('DATE_FORMAT_LC2'));
        } else {
            echo JText::_('RESULTS_DETAILS_NOTHING');
        }
        ?>
			</td>
		</tr>

		</table>
		</fieldset>
		</div>
		</div>
	<div class="clr"></div>

		<input type="hidden" name="section" value="ergebnisse" />
		<input type="hidden" name="option" value="com_clm" />
		<input type="hidden" name="sid" value="<?php 
        echo $runde[0]->sid;
        ?>
" />
		<input type="hidden" name="lid" value="<?php 
        echo $runde[0]->lid;
        ?>
" />
		<input type="hidden" name="rnd" value="<?php 
        echo $runde[0]->runde;
        ?>
" />
		<input type="hidden" name="paarung" value="<?php 
        echo $runde[0]->paar;
        ?>
" />
		<input type="hidden" name="dg" value="<?php 
        echo $runde[0]->dg;
        ?>
" />

		<input type="hidden" name="task" value="" />
		<input type="hidden" name="hzps" value="<?php 
        echo $runde[0]->hzps;
        ?>
" />
		<input type="hidden" name="gzps" value="<?php 
        echo $runde[0]->gzps;
        ?>
" />
		<input type="hidden" name="id" value="<?php 
        echo $runde[0]->id;
        ?>
" />
		<input type="hidden" name="cid" value="<?php 
        echo $runde[0]->id;
        ?>
" />
		<?php 
        echo JHtml::_('form.token');
        ?>
		</form>
		<?php 
    }
 function wertung()
 {
     global $mainframe, $option;
     // Check for request forgeries
     JRequest::checkToken() or die('Invalid Token !!');
     $db =& JFactory::getDBO();
     $user =& JFactory::getUser();
     $task = JRequest::getVar('task');
     $option = JRequest::getCmd('option');
     $section = JRequest::getVar('section');
     $cid = JRequest::getVar('cid', array(0), '', 'array');
     JArrayHelper::toInteger($cid);
     // load the row from the db table
     $row =& JTable::getInstance('ergebnisse', 'TableCLM');
     $row->load($cid[0]);
     $sid =& JTable::getInstance('saisons', 'TableCLM');
     $sid->load($row->sid);
     // Ergebnisse einer unveröffentlichten Saison nicht bearbeiten
     if ($sid->published == "0") {
         JError::raiseWarning(500, JText::_('ERGEBNISSE_SAISON_NO'));
         JError::raiseNotice(6000, JText::_('ERGEBNISSE_SAISON_WARTEN'));
         $mainframe->redirect('index.php?option=' . $option . '&section=' . $section);
     }
     // spielfreie Runde  kann nicht gemeldet / bearbeitet werden
     if ($row->gemeldet == "1") {
         JError::raiseNotice(6000, JText::_('ERGEBNISSE_TW_RUNDEN'));
         $mainframe->redirect('index.php?option=' . $option . '&section=' . $section, $msg);
     }
     $data = "SELECT a.gemeldet,a.editor, a.id,a.sid, a.lid, a.runde, a.dg, a.tln_nr," . " a.gegner,a.paar, a.dwz_zeit, a.dwz_editor as dwz_edit, w.name as dwz_editor, " . " a.zeit, a.edit_zeit, u.name as melder, v.name as name_editor, " . " m.name as hname,m.zps as hzps,m.man_nr as hmnr, " . " n.name as gname, n.zps as gzps, n.man_nr as gmnr, " . " l.name as lname, l.stamm, l.ersatz, l.sl as sl, l.b_wertung" . " FROM #__clm_rnd_man as a " . " LEFT JOIN #__clm_user as u ON u.jid = a.gemeldet AND u.sid = a.sid " . " LEFT JOIN #__clm_user as v ON v.jid = a.editor AND v.sid = a.sid " . " LEFT JOIN #__clm_user as w ON w.jid = a.dwz_editor AND w.sid = a.sid " . " LEFT JOIN #__clm_liga AS l ON (l.id = a.lid ) " . " LEFT JOIN #__clm_mannschaften AS m ON (m.liga = a.lid AND m.tln_nr = a.tln_nr) " . " LEFT JOIN #__clm_mannschaften AS n ON (n.liga = a.lid AND n.tln_nr = a.gegner) " . " WHERE a.id = " . $cid[0];
     $db->setQuery($data);
     $runde = $db->loadObjectList();
     // Prüfen ob Ergebnis bereits gemeldet wurde
     if ($runde[0]->gemeldet < 1) {
         JError::raiseWarning(500, JText::_('ERGEBNISSE_DWZ'));
         $link = 'index.php?option=' . $option . '&section=' . $section;
         $mainframe->redirect($link);
     }
     // Prüfen ob User Berechtigung zum editieren hat
     if ($runde[0]->sl !== CLM_ID and CLM_usertype !== 'admin') {
         JError::raiseWarning(500, JText::_('ERGEBNISSE_DWZ_BEARBEIT'));
         $link = 'index.php?option=' . $option . '&section=' . $section;
         $mainframe->redirect($link);
     }
     $row->checkout(CLM_ID);
     // Bretter / Spieler ermitteln
     $sql = "SELECT a.spieler, a.gegner, a.ergebnis, a.dwz_edit, d.Spielername as hname, e.Spielername as gname " . " FROM #__clm_rnd_spl as a " . " LEFT JOIN #__clm_dwz_spieler as d ON d.ZPS = a.zps AND d.Mgl_Nr = a.spieler AND d.sid = a.sid " . " LEFT JOIN #__clm_dwz_spieler as e ON e.ZPS = a.gzps AND e.Mgl_Nr = a.gegner AND e.sid = a.sid " . " WHERE a.sid = " . $runde[0]->sid . " AND a.lid = " . $runde[0]->lid . " AND a.runde = " . $runde[0]->runde . " AND a.paar = " . $runde[0]->paar . " AND a.dg = " . $runde[0]->dg . " AND heim = 1" . " ORDER BY a.brett";
     $db->setQuery($sql);
     $bretter = $db->loadObjectList();
     // Ergebnisliste laden
     $sql = "SELECT a.id, a.eid,a.erg_text " . " FROM #__clm_ergebnis as a ";
     $db->setQuery($sql);
     $ergebnis = $db->loadObjectList();
     // Punktemodus aus #__clm_liga holen
     $query = " SELECT a.sieg, a.remis, a.nieder, a.antritt, a.runden_modus " . " FROM #__clm_liga as a" . " WHERE a.id = " . $runde[0]->lid;
     $db->setQuery($query);
     $liga = $db->loadObjectList();
     $sieg = $liga[0]->sieg;
     $remis = $liga[0]->remis;
     $nieder = $liga[0]->nieder;
     $antritt = $liga[0]->antritt;
     // Ergebnistexte nach Modus setzen
     $ergebnis[0]->erg_text = $nieder + $antritt . " - " . ($sieg + $antritt);
     $ergebnis[1]->erg_text = $sieg + $antritt . " - " . ($nieder + $antritt);
     $ergebnis[2]->erg_text = $remis + $antritt . " - " . ($remis + $antritt);
     $ergebnis[3]->erg_text = $nieder + $antritt . " - " . ($nieder + $antritt);
     if ($antritt > 0) {
         $ergebnis[4]->erg_text = "0 - " . round($antritt + $sieg) . " (kampflos)";
         $ergebnis[5]->erg_text = round($antritt + $sieg) . " - 0 (kampflos)";
         $ergebnis[6]->erg_text = "0 - 0 (kampflos)";
     }
     // Listen zur manuellen Änderung des Mannschaftsergebnisses generieren
     $sql = "SELECT a.brettpunkte as bp, a.wertpunkte as wp " . " FROM #__clm_rnd_man as a " . " WHERE a.sid = " . $runde[0]->sid . " AND a.lid = " . $runde[0]->lid . " AND a.runde = " . $runde[0]->runde . " AND a.paar = " . $runde[0]->paar . " AND a.tln_nr = " . $runde[0]->tln_nr . " AND a.dwz_editor > 0";
     $db->setQuery($sql);
     $list_heim = $db->loadObjectList();
     $sql = "SELECT a.brettpunkte as bp, a.wertpunkte as wp " . " FROM #__clm_rnd_man as a " . " WHERE a.sid = " . $runde[0]->sid . " AND a.lid = " . $runde[0]->lid . " AND a.runde = " . $runde[0]->runde . " AND a.paar = " . $runde[0]->paar . " AND a.gegner = " . $runde[0]->tln_nr . " AND a.dwz_editor > 0";
     $db->setQuery($sql);
     $list_gast = $db->loadObjectList();
     $wlist[] = JHTML::_('select.option', '-1', JText::_('ERGEBNISSE_WAHL'), 'jid', 'name');
     $wlist[] = JHTML::_('select.option', '0', JText::_('0'), 'jid', 'name');
     for ($x = 1; $x < 1 + ($sieg + $antritt) * $runde[0]->stamm; $x++) {
         $wlist[] = JHTML::_('select.option', $x - 0.5, $x - 0.5, 'jid', 'name');
         $wlist[] = JHTML::_('select.option', $x, $x, 'jid', 'name');
     }
     $lists['weiss'] = JHTML::_('select.genericlist', $wlist, 'w_erg', 'class="inputbox" size="1"', 'jid', 'name', $list_heim[0]->bp);
     $lists['schwarz'] = JHTML::_('select.genericlist', $wlist, 's_erg', 'class="inputbox" size="1"', 'jid', 'name', $list_gast[0]->bp);
     $lists['weiss_w'] = $list_heim[0]->wp;
     $lists['schwarz_w'] = $list_gast[0]->wp;
     require_once JPATH_COMPONENT . DS . 'views' . DS . 'ergebnisse.php';
     CLMViewErgebnisse::wertung($row, $runde, $bretter, $ergebnis, $option, $lists);
 }
    public static function Wertung(&$row, $runde, $bretter, $ergebnis, $option, $lists)
    {
        CLMViewErgebnisse::setWertungToolbar($row);
        JRequest::setVar('hidemainmenu', 1);
        JFilterOutput::objectHTMLSafe($row, ENT_QUOTES, 'extrainfo');
        ?>

	<div class="width-100">
	<fieldset class="adminform">
	<legend><?php 
        echo JText::_('EVALUATION_HINT_1');
        ?>
</legend>
	<?php 
        echo JText::_('EVALUATION_HINT_2');
        ?>
	<br>
	<?php 
        echo JText::_('EVALUATION_HINT_3');
        ?>
	</fieldset>
	</div>

	<form action="index.php" method="post" name="adminForm" id="adminForm">

	<div>
	<div class="width-60 fltlft">
	<fieldset class="adminform">
	<legend><?php 
        if ($runde[0]->dg == 1) {
            echo $runde[0]->lname . ' : ' . JText::_('EVALUATION_ROUND') . ' ' . $runde[0]->runde . ', ' . JText::_('EVALUATION_PAIRING') . ' ' . $runde[0]->paar;
        } else {
            echo $runde[0]->lname . ' : ' . JText::_('EVALUATION_ROUND') . ' ' . $runde[0]->runde . ', ' . JText::_('EVALUATION_PAIRING') . ' ' . $runde[0]->paar . ', ' . JText::_('EVALUATION_DG') . ' ' . $runde[0]->dg;
        }
        ?>
	</legend>
	<table class="admintable">
	<tr>
		<td class="key" nowrap="nowrap" width="25">Brett</td>
		<td class="key" nowrap="nowrap"><?php 
        echo $runde[0]->hname;
        ?>
</td>
		<td class="key" nowrap="nowrap"><?php 
        echo $runde[0]->gname;
        ?>
</td>
		<td class="key" nowrap="nowrap"><?php 
        echo JText::_('EVALUATION_RESULT');
        ?>
</td>
		<td class="key" nowrap="nowrap"><?php 
        echo JText::_('EVALUATION_RESULT_TO');
        ?>
</td>
	<tr>
<?php 
        for ($i = 0; $i < $runde[0]->stamm; $i++) {
            ?>
	<tr>
		<td class="key" nowrap="nowrap">
		  <label for="sid">
			<?php 
            echo JText::_('RESULTS_DETAILS_NO') . '&nbsp;&nbsp;' . ($i + 1) . '&nbsp;&nbsp;';
            ?>
		  </label>
		</td>
		<td class="key" nowrap="nowrap">
		<?php 
            echo $bretter[$i]->hname;
            ?>
		</td>

		<td class="key" nowrap="nowrap">
		<?php 
            echo $bretter[$i]->gname;
            ?>
		</td>

		<td class="key" nowrap="nowrap">
			<?php 
            for ($x = 0; $x < 11; $x++) {
                ?>
			<?php 
                if ($runde[0]->gemeldet > 0 and (int) $ergebnis[$x]->id - 1 == (int) $bretter[$i]->ergebnis) {
                    echo $ergebnis[$x]->erg_text;
                }
            }
            ?>
		</td>

		<td class="key" nowrap="nowrap">
		  <select size="1" name="<?php 
            echo 'ergebnis' . ($i + 1);
            ?>
" id="<?php 
            echo 'ergebnis' . ($i + 1);
            ?>
">
			<option value="-1" selected="selected"><?php 
            echo JText::_('RESULTS_DETAILS_DD_3');
            ?>
</option>
			<?php 
            for ($x = 0; $x < 11; $x++) {
                ?>
			 <option value="<?php 
                echo $ergebnis[$x]->eid;
                ?>
" <?php 
                if ($runde[0]->dwz_edit > 0 and isset($bretter[$i]->dwz_edit) and $ergebnis[$x]->id - 1 == (int) $bretter[$i]->dwz_edit) {
                    ?>
 selected="selected" <?php 
                }
                ?>
><?php 
                echo $ergebnis[$x]->erg_text;
                ?>
</option>
			<?php 
            }
            ?>
		  </select>
		</td>

	</tr>
<?php 
        }
        ?>
 
	<tr>
		<td class="key" nowrap="nowrap"><?php 
        echo JText::_('EVALUATION_RESULT_MANUALLY');
        ?>
		</td>
		<td class="key" nowrap="nowrap">
		</td>
		<td class="key" nowrap="nowrap"><?php 
        echo JText::_('EVALUATION_BRETTPUNKTE_MANUALLY');
        //klkl
        ?>
		</td>
		<td class="key" nowrap="nowrap">
		<?php 
        echo $lists['weiss'] . ' - ' . $lists['schwarz'];
        ?>
		</td>
		<td class="key" nowrap="nowrap">
		</td>
	</tr>
	<?php 
        if ($runde[0]->b_wertung > 0) {
            $ww_erg = $lists['weiss_w'];
            $sw_erg = $lists['schwarz_w'];
            ?>
	<tr>
		<td class="key" nowrap="nowrap">
		</td>
		<td class="key" nowrap="nowrap">
		</td>
		<td class="key" nowrap="nowrap"><?php 
            echo JText::_('EVALUATION_WERTPUNKTE_MANUALLY');
            //klkl
            ?>
		</td>
		<td class="key" nowrap="nowrap">
		<input class="inputbox" type="text" name="ww_erg" id="ww_erg" size="8" maxlength="8" value="<?php 
            echo $ww_erg;
            ?>
" />
		<?php 
            echo "   -   ";
            //klkl
            ?>
		<input class="inputbox" type="text" name="sw_erg" id="sw_erg" size="8" maxlength="8" value="<?php 
            echo $sw_erg;
            ?>
" />
		</td>
		<td class="key" nowrap="nowrap">
		</td>
	</tr>
	<?php 
        }
        ?>
	
		</table>
		</fieldset>
		</div>

	<?php 
        if ($runde[0]->runden_modus == 4 or $runde[0]->runden_modus == 5) {
            // KO System
            ?>
	
	<div class="width-40 fltrt">
	<fieldset class="adminform">
	<legend><?php 
            echo JText::_('RESULTS_MT_KO_LEGEND');
            //" KO-System: Feinwertung ";
            ?>
	</legend>
	<table class="admintable">
		<tr>
			<td class="key" nowrap="nowrap">
			<label for="ko_decision"><?php 
            echo JText::_('RESULTS_MT_KO_DECISION');
            ?>
</label>
			</td>
			<td class="key" nowrap="nowrap">
			<select name="ko_decision" id="ko_decision" value="<?php 
            echo $runde[0]->ko_decision;
            ?>
" size="1">
			<!--<option>- wählen -</option>-->
			<option value="1" <?php 
            if ($runde[0]->ko_decision == 1) {
                echo 'selected="selected"';
            }
            ?>
><?php 
            echo JText::_('RESULTS_MT_KO_DECISION_BW');
            ?>
</option>
			<option value="2" <?php 
            if ($runde[0]->ko_decision == 2) {
                echo 'selected="selected"';
            }
            ?>
><?php 
            echo JText::_('RESULTS_MT_KO_DECISION_BLITZ') . $runde[0]->hname;
            ?>
</option>
			<option value="3" <?php 
            if ($runde[0]->ko_decision == 3) {
                echo 'selected="selected"';
            }
            ?>
><?php 
            echo JText::_('RESULTS_MT_KO_DECISION_BLITZ') . $runde[0]->gname;
            ?>
</option>
			<option value="4" <?php 
            if ($runde[0]->ko_decision == 4) {
                echo 'selected="selected"';
            }
            ?>
><?php 
            echo JText::_('RESULTS_MT_KO_DECISION_LOS') . $runde[0]->hname;
            ?>
</option>
			<option value="5" <?php 
            if ($runde[0]->ko_decision == 5) {
                echo 'selected="selected"';
            }
            ?>
><?php 
            echo JText::_('RESULTS_MT_KO_DECISION_LOS') . $runde[0]->gname;
            ?>
</option>
			</select>
			</td>
		</tr>
	</table>
	</fieldset>
	</div>		
<?php 
        }
        ?>
 

<?php 
        // Konfigurationsparameter auslesen
        $config = clm_core::$db->config();
        $pcomment = $config->kommentarfeld;
        if ($pcomment == 1 or $pcomment == 2 and ($runde[0]->runden_modus == 4 or $runde[0]->runden_modus == 5)) {
            // Kommentarfeld
            ?>
			
	<div class="width-40 fltrt">
	  <fieldset class="adminform">
		<legend><?php 
            echo JText::_('RESULTS_COMMENT_LEGEND');
            ?>
</legend>
		<table class="admintable">
		<tr>
			<td class="key" nowrap="nowrap">
			<label for="comment"><?php 
            echo JText::_('RESULTS_COMMENT');
            ?>
</label>
			</td>
			<td class="inputbox" nowrap="nowrap" width="100%" valign="top">
			<textarea name="comment" id="comment" cols="40" rows="3" style="width:90%"><?php 
            echo str_replace('&', '&amp;', $runde[0]->comment);
            ?>
</textarea>
			</td>
		</tr>
		</table>
	  </fieldset>	
	</div>		
<?php 
        }
        ?>
 		

		<div class="width-100">
		<fieldset class="adminform">
		<legend><?php 
        echo JText::_('RESULTS_DETAILS_DETAILS');
        ?>
</legend>

		<table class="admintable">
		<tr>
			<td class="key" width="20%" nowrap="nowrap">
			<label for="name"><?php 
        echo JText::_('RESULTS_DETAILS_BY');
        ?>
</label>
			</td>
			<td>
			<?php 
        if (!$runde[0]->melder) {
            echo JText::_('RESULTS_DETAILS_NOTHING');
        } else {
            echo $runde[0]->melder;
        }
        ?>
			</td>
		</tr>
		<tr>
			<td class="key" width="20%" nowrap="nowrap">
			<label for="name"><?php 
        echo JText::_('RESULTS_DETAILS_DATE');
        ?>
</label>
			</td>
			<td>
			<?php 
        if ($runde[0]->zeit != "0000-00-00 00:00:00") {
            echo JHtml::_('date', $runde[0]->zeit, JText::_('DATE_FORMAT_LC2'));
        } else {
            echo JText::_('RESULTS_DETAILS_NOTHING');
        }
        ?>

			</td>
		</tr>
		<tr>
			<td class="key" width="20%" nowrap="nowrap">
			<label for="name"><?php 
        echo JText::_('RESULTS_DETAILS_LAST_EDIT_BY');
        ?>
</label>
			</td>
			<td>
			<?php 
        if (!$runde[0]->editor) {
            echo JText::_('RESULTS_DETAILS_NOTHING');
        } else {
            echo $runde[0]->name_editor;
        }
        ?>
			</td>
		</tr>
		<tr>
			<td class="key" width="20%" nowrap="nowrap">
			<label for="name"><?php 
        echo JText::_('am : ');
        ?>
</label>
			</td>
			<td>
			<?php 
        if ($runde[0]->edit_zeit != "0000-00-00 00:00:00") {
            echo JHtml::_('date', $runde[0]->edit_zeit, JText::_('DATE_FORMAT_LC2'));
        } else {
            echo "---";
        }
        ?>
			</td>
		</tr>
		<tr>
			<td class="key" width="20%" nowrap="nowrap">
			<label for="name"><?php 
        echo JText::_('EVALUATION_RESULT_EDITED_BY');
        ?>
</label>
			</td>
			<td>
			<?php 
        if (!$runde[0]->dwz_editor) {
            echo JText::_('RESULTS_DETAILS_NOTHING');
        } else {
            echo $runde[0]->dwz_editor;
        }
        ?>
			</td>
		</tr>
		<tr>
			<td class="key" width="20%" nowrap="nowrap">
			<label for="name"><?php 
        echo JText::_('RESULTS_DETAILS_DATE');
        ?>
</label>
			</td>
			<td>
			<?php 
        if ($runde[0]->dwz_zeit != "0000-00-00 00:00:00") {
            echo JHtml::_('date', $runde[0]->dwz_zeit, JText::_('DATE_FORMAT_LC2'));
        } else {
            echo JText::_('RESULTS_DETAILS_NOTHING');
        }
        ?>
			</td>
		</tr>

		</table>
		</fieldset>
		</div>
		</div>
	<div class="clr"></div>

		<input type="hidden" name="section" value="ergebnisse" />
		<input type="hidden" name="option" value="com_clm" />
		<input type="hidden" name="sid" value="<?php 
        echo $runde[0]->sid;
        ?>
" />
		<input type="hidden" name="lid" value="<?php 
        echo $runde[0]->lid;
        ?>
" />
		<input type="hidden" name="rnd" value="<?php 
        echo $runde[0]->runde;
        ?>
" />
		<input type="hidden" name="paarung" value="<?php 
        echo $runde[0]->paar;
        ?>
" />
		<input type="hidden" name="dg" value="<?php 
        echo $runde[0]->dg;
        ?>
" />

		<input type="hidden" name="task" value="" />
		<input type="hidden" name="hzps" value="<?php 
        echo $runde[0]->hzps;
        ?>
" />
		<input type="hidden" name="gzps" value="<?php 
        echo $runde[0]->gzps;
        ?>
" />
		<input type="hidden" name="id" value="<?php 
        echo $runde[0]->id;
        ?>
" />
		<input type="hidden" name="cid" value="<?php 
        echo $runde[0]->id;
        ?>
" />
		<?php 
        echo JHtml::_('form.token');
        ?>
		</form>
		<?php 
    }