コード例 #1
0
ファイル: ergebnisse.php プロジェクト: kbaerthel/com_clm
    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 
    }
コード例 #2
0
    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 
    }