summaryrefslogtreecommitdiff
path: root/http/pkle2020a.php
diff options
context:
space:
mode:
Diffstat (limited to 'http/pkle2020a.php')
-rw-r--r--http/pkle2020a.php60
1 files changed, 38 insertions, 22 deletions
diff --git a/http/pkle2020a.php b/http/pkle2020a.php
index 65abb54..4a8d9e8 100644
--- a/http/pkle2020a.php
+++ b/http/pkle2020a.php
@@ -70,9 +70,11 @@ function display() {
var sqlTeamy = ['UPDATE `addons` SET `mastr` = 0;'];
var pklHTML = ['<tr><td class="t">Miejsce</td><td class="t">&nbsp;&nbsp;&nbsp;PKL&nbsp;&nbsp;&nbsp;</td></tr>'];
for (var place = 1; place <= parseInt(document.getElementsByName('iuc')[0].value); place++) {
- sqlPary.push('UPDATE `dodatki` SET `pkl` = ' + response.points[place] + ' WHERE `miejsce` = ' + place + ';');
- sqlTeamy.push('UPDATE `addons` SET `mastr` = ' + response.points[place] + ' WHERE `place` = ' + place + ';');
- pklHTML.push('<tr><td class="t">' + place + '</td><td class="t">' + response.points[place] + '</td></tr>');
+ if (response.points[place]) {
+ sqlPary.push('UPDATE `dodatki` SET `pkl` = ' + response.points[place] + ' WHERE `miejsce` = ' + place + ';');
+ sqlTeamy.push('UPDATE `addons` SET `mastr` = ' + response.points[place] + ' WHERE `place` = ' + place + ';');
+ pklHTML.push('<tr><td class="t">' + place + '</td><td class="t">' + response.points[place] + '</td></tr>');
+ }
}
pklHTML.push('<tr><td class="p">SUMA PKL</td><td class="t">' + response.sum + '</td></tr>');
document.getElementById('outsql').innerHTML = sqlPary.join("\n");
@@ -90,10 +92,12 @@ function sendit(form) {
players: parseInt(form.izw.value),
title_sum: parseFloat(form.swk.value),
tournament_rank: 8-form.rng.value,
- over39_boards: parseInt(form.rozdan.value)
+ boards: parseInt(form.rozdan.value)
}
+ params['over39_boards'] = (params['boards'] > 39) * 1;
var tourtypes = ['tk', 'to', 'tp', 'ok', 'ok1', 'ot', 'gp', 'gg'];
tourtypes[101] = 'kmp';
+ tourtypes[102] = 'bnet';
params['manual[players_coefficient]'] = parseFloat(form.zaw.value);
params['manual[min_points]'] = parseInt(form['min' + (8-params.tournament_rank) + (params.over39_boards ? '_' : '')].value);
params['manual[tournament_weight]'] = parseInt(form['r' + tourtypes[params.tournament_rank] + (params.over39_boards ? '_' : '')].value);
@@ -167,8 +171,9 @@ function submitit(ev){
<td><img src="images/logo_pzbs.gif"></td>
<td colspan="3" align="center"><h3>KALKULATOR PKLI W TURNIEJACH PZBS<br>
zgodny z <span style="color:#d00">nowym regulaminem (obowiązującym od 01.11.2018)</span><br>
- oraz <span style="color:#d00">nowym regulaminem KMP (obowiązującym od 01.01.2020)</span></h3>
- Przejdź do <a href="pkle2018.php"><b>kalkulatora zgodnego ze starym regulaminem KMP</b></a>!
+ z <span style="color:#d00">nowym regulaminem KMP (obowiązującym od 01.01.2020)</span><br>
+ oraz <span style="color:#d00">regulaminem BridgeNET Lokalnego (obowiązującym od 01.05.2020)</span></h3>
+ Przejdź do <a href="pkle2020.php"><b>kalkulatora sprzed 01.05.2020</b></a>
<br><br>
Możesz eksperymentować ze wszystkimi (prawie) parametrami.<br>
Dla przywrócenia stanu regulaminowego otwórz ponownie stronę.</td>
@@ -180,8 +185,8 @@ function submitit(ev){
<td align="center" colspan="2"><b>turniej od 40 rozdań</b></td>
</tr>
<tr>
- <td align="right">WAGA<br>turnieju</td><td align="left">MINIMUM<br>za 1sze miejsce</td>
- <td align="right">WAGA<br>turnieju</td><td align="left">MINIMUM<br>za 1sze miejsce</td>
+ <td align="right">WAGA<br>turnieju</td><td align="left">MINIMUM<br>za 1. miejsce</td>
+ <td align="right">WAGA<br>turnieju</td><td align="left">MINIMUM<br>za 1. miejsce</td>
<td align="left" colspan="3">WSP:</td>
</tr>
<tr>
@@ -195,6 +200,7 @@ function submitit(ev){
Okręgowy: <input type="text" id="rto" name="rto" maxlength="3" style="width:30px" value="2"><br />
Klubowy: <input type="text" id="rtk" name="rtk" maxlength="3" style="width:30px" value="1">
<input type="hidden" id="rkmp" name="rkmp" value="1">
+ <input type="hidden" id="rbnet" name="rbnet" value="1">
</td>
<td align="left" rowspan="3">
<input type="text" id="min1" name="min1" maxlength="3" style="width:30px" value="200"><br />
@@ -206,6 +212,7 @@ function submitit(ev){
<input type="text" id="min7" name="min7" maxlength="3" style="width:30px" value="0"><br />
<input type="text" id="min8" name="min8" maxlength="3" style="width:30px" value="0">
<input type="hidden" id="min-93" name="min-93" value="0"></td>
+ <input type="hidden" id="min-94" name="min-94" value="0"></td>
<td align="right" rowspan="3">
OTP<sup>&lowast;&lowast;&lowast;&lowast;</sup>: <input type="text" id="rgg_" name="rgg_" maxlength="3" style="width:30px" value="40"><br />
OTP<sup>&lowast;&lowast;&lowast;</sup>: <input type="text" id="rgp_" name="rgp_" maxlength="3" style="width:30px" value="25"><br />
@@ -216,6 +223,7 @@ function submitit(ev){
Okręgowy: <input type="text" id="rto_" name="rto_" maxlength="3" style="width:30px" value="3"><br />
Klubowy: <input type="text" id="rtk_" name="rtk_" maxlength="3" style="width:30px" value="2">
<input type="hidden" id="rkmp_" name="rkmp_" value="1">
+ <input type="hidden" id="rbnet_" name="rbnet_" value="1">
</td>
<td align="left" rowspan="3">
<input type="text" id="min1_" name="min1_" maxlength="3" style="width:30px" value="300"><br />
@@ -227,6 +235,7 @@ function submitit(ev){
<input type="text" id="min7_" name="min7_" maxlength="3" style="width:30px" value="0"><br />
<input type="text" id="min8_" name="min8_" maxlength="3" style="width:30px" value="0">
<input type="hidden" id="min-93_" name="min-93_" value="0"></td>
+ <input type="hidden" id="min-94_" name="min-94_" value="0"></td>
<td align="left" valign="top"><input type="text" id="zaw" name="zaw" maxlength="5" style="width:30px" value="0.05"></td>
<td valign="top" colspan="2">PKL za 1 m = <b>śr.WK&times;WAGA + il.zaw&times;WSP</b></td>
</tr>
@@ -241,24 +250,14 @@ function submitit(ev){
<tr><td colspan="5">&nbsp;</td></tr>
<tr>
- <td valign=top rowspan="2">TYP ZAWODÓW<br />
+ <td valign=top>TYP ZAWODÓW<br />
<input type="radio" name="typ" id="tp1" value="1" onclick="typtur(1)"><label for="tp1">&nbsp;Indywiduel</label><br />
<input type="radio" name="typ" id="tp2" value="2" onclick="typtur(2)"><label for="tp2">&nbsp;Pary</label><br />
<input type="radio" name="typ" id="tp3" value="4" onclick="typtur(4)"><label for="tp3">&nbsp;Teamy</label>
- <br><br>LICZBA ROZDAŃ<br>
- <input type="radio" name="rozdan" id="rozdan0" value="0"><label for="rozdan0">&nbsp;do 39</label><br />
- <input type="radio" name="rozdan" id="rozdan1" value="1"><label for="rozdan1">&nbsp;od 40</label>
</td>
- <td valign=top rowspan="2">RANGA ZAWODÓW<br />
- <input type="radio" name="rng" id="rg_kmp" value="-93"><label for="rg_kmp">&nbsp;KMP</label><br />
- <input type="radio" name="rng" id="rg1" value="1"><label for="rg1">&nbsp;OTP<sup>&lowast;&lowast;&lowast;&lowast;</sup></label><br />
- <input type="radio" name="rng" id="rg2" value="2"><label for="rg2">&nbsp;OTP<sup>&lowast;&lowast;&lowast;</sup></label><br />
- <input type="radio" name="rng" id="rg3" value="3"><label for="rg3">&nbsp;OTP<sup>&lowast;&lowast;</sup></label><br />
- <input type="radio" name="rng" id="rg4" value="4"><label for="rg4">&nbsp;OTP<sup>&lowast;</sup></label><br />
- <input type="radio" name="rng" id="rg5" value="5"><label for="rg5">&nbsp;OTP</label><br />
- <input type="radio" name="rng" id="rg6" value="6"><label for="rg6">&nbsp;Regionalny</label><br />
- <input type="radio" name="rng" id="rg7" value="7"><label for="rg7">&nbsp;Okręgowy</label><br />
- <input type="radio" name="rng" id="rg8" value="8"><label for="rg8">&nbsp;Klubowy</label>
+ <td align="CENTER" valign=top>
+ LICZBA ROZDAŃ<br>
+ <input type="text" name="rozdan" maxlength="3" style="width:50px" />
</td>
<td align="CENTER" valign=top>UCZESTNIKÓW<br />
<input type="text" id="iuc" name="iuc" maxlength="3" style="width:50px" onblur="valiuc(this,1)"><br />
@@ -271,6 +270,23 @@ function submitit(ev){
<small>Suma WK wszystkich<br />zawodników.</small></td>
</tr>
<tr>
+ <td><br/>
+ RANGA ZAWODÓW<br />
+ <input type="radio" name="rng" id="rg1" value="1"><label for="rg1">&nbsp;OTP<sup>&lowast;&lowast;&lowast;&lowast;</sup></label><br />
+ <input type="radio" name="rng" id="rg2" value="2"><label for="rg2">&nbsp;OTP<sup>&lowast;&lowast;&lowast;</sup></label><br />
+ <input type="radio" name="rng" id="rg3" value="3"><label for="rg3">&nbsp;OTP<sup>&lowast;&lowast;</sup></label><br />
+ <input type="radio" name="rng" id="rg4" value="4"><label for="rg4">&nbsp;OTP<sup>&lowast;</sup></label><br />
+ <input type="radio" name="rng" id="rg5" value="5"><label for="rg5">&nbsp;OTP</label><br />
+ </td>
+ <td>
+ <br/>
+ <br/>
+ <input type="radio" name="rng" id="rg_kmp" value="-93"><label for="rg_kmp">&nbsp;KMP</label><br />
+ <input type="radio" name="rng" id="rg6" value="6"><label for="rg6">&nbsp;Regionalny</label><br />
+ <input type="radio" name="rng" id="rg7" value="7"><label for="rg7">&nbsp;Okręgowy</label><br />
+ <input type="radio" name="rng" id="rg8" value="8"><label for="rg8">&nbsp;Klubowy</label><br />
+ <input type="radio" name="rng" id="rg_bnet" value="-94"><label for="rg_bnet">&nbsp;BridgeNET Lokalny</label>
+ </td>
<td align="CENTER" colspan="3">Średnie WK zawodnika w turnieju:&nbsp;
<input type="text" id="srd" name="srd" readonly="readonly"><br />
</td>