</div> </div> </div> </div>'; if ($count == 1) { $list .= "<div class=\"clearfix visible-md visible-lg\"></div>"; $count = 0; } else { $count++; } } if (!$list) { echo "Nessun torneo passato"; } echo $list; BSformomod("passati.php"); # calendario delle gare con rispettivi vincitori if ($_GET[prog] > 0) { $start = "\n\t<table class='table table-striped table-bordered table-hover ui-datatable' id='garet'>\n\t<thead>\n\t\t<tr>"; if (ssql("select get_tipo(" . $_GET[torneo] . ")") == 2) { $start .= "<th>Girone</th>"; } $start .= "\n\t\t\t<th>Data</th>\n\t\t\t<th>Vincitore</th>\n\t\t\t<th>Giocatori</th>\n\t\t\t<th>Risultati</th>\n\t\t\t<th>Punteggi</th>\n\t\t</tr>\n\t</thead>\n\t<tbody>\n\t"; $end = "\n\t</tbody>\n\t</table>\n\t"; $rows = ""; $res = sql("select g.id as id,\n\t\t\t\t\tg.data as data,\n\t\t\t\t\tg.vincitore as vincitore,\n\t\t\t\t\tcase when g.vincitore is null\n\t\t\t\t\t\tthen '-'\n\t\t\t\t\t\telse concat(u.nome,' ',u.cognome)\n\t\t\t\t\tend\tas vincitore,\n\t\t\t\t\tarray_to_string(array_agg(concat(u2.nome,' ',u2.cognome)), '<br>') as giocatori,\n\t\t\t\t\tarray_to_string(array_agg(pa.risultato), '<br>') as risultati,\n\t\t\t\t\tarray_to_string(array_agg(concat('+',pa.punteggio)), '<br>') as punteggi,\n\t\t\t\t\tg.girone as girone\n\t\t\t\tfrom gara g\n\t\t\t\t\tleft join utenti u on u.id=g.vincitore\n\t\t\t\t\tleft join partecipa_a pa on pa.IDgara=g.id \n\t\t\t\t\tleft join utenti u2 on u2.id=pa.IDutente\n\t\t\t\twhere g.IDtorneo='" . $_GET[torneo] . "'\n\t\t\t\tgroup by g.id, u.cognome, u.nome\n\t\t\t\torder by g.girone, g.data asc"); while ($g = pg_fetch_array($res)) { if (ssql("select get_tipo(" . $_GET[torneo] . ")") == 2) { $gironi = "<td>" . $g[girone] . "</td>"; } $rows .= "\n\t\t<tr>\n\t\t\t" . $gironi . "\n\t\t\t<td class='data'>" . $g[data] . "</td>\n\t\t\t<td>" . $g[vincitore] . "</td>\n\t\t\t<td class='players'>" . $g[giocatori] . "</td>\n\t\t\t<td class='res'>" . $g[risultati] . "</td>\n\t\t\t<td class='points'>" . $g[punteggi] . "</td>\n\t\t</tr>\n\t\t";
</div> </div> </div> </div>'; if ($count == 1) { $list .= "<div class=\"clearfix visible-md visible-lg\"></div>"; $count = 0; } else { $count++; } } if (!$list) { echo "Non hai organizzato nessun torneo."; } echo $list; BSformomod("admin_tornei.php"); $list = "<ul>"; if (isset($_GET[open])) { if (isset($_GET[gamers])) { $gamers = sql("select * \n\t\t\t\t\t\tfrom utenti\n\t\t\t\t\t\t\tleft join iscritto_a on id=IDutente\n\t\t\t\t\t\twhere IDtorneo='" . $_GET[torneo] . "'"); while ($g = pg_fetch_array($gamers)) { $jq2footer = '$("#modal-title").empty(); $("#modal-title").append("Iscritti"); $("#edithere").modal("show");'; $list .= "<li>" . $g[nome] . " " . $g[cognome] . "</li>"; } $list .= "</ul>"; echo $list; } else { $torneo = sql("select * from torneo where id='" . $_GET[torneo] . "'"); while ($t = pg_fetch_array($torneo)) {
</div> </div> </div>'; if ($count == 1) { $list .= "<div class=\"clearfix visible-md visible-lg\"></div>"; $count = 0; } else { $count++; } } if (!$list) { echo "Nessun torneo futuro."; } else { echo $list; } BSformomod("index.php"); # calendario delle gare con rispettivi vincitori if ($_GET[prog] > 0) { $start = "\n <table class='table table-striped table-bordered table-hover ui-datatable' id='garet'>\n <thead>\n <tr>"; if (ssql("select get_tipo(" . $_GET[torneo] . ")") == 2) { $start .= "<th>Girone</th>"; } $start .= "\n <th>Data</th>\n <th>Vincitore</th>\n <th>Giocatori</th>\n <th>Risultati</th>\n <th>Punteggi</th>\n </tr>\n </thead>\n <tbody>\n "; $end = "\n </tbody>\n </table>\n "; $rows = ""; $res = sql("select g.id as id,\n g.data as data,\n g.vincitore as vincitore,\n case when g.vincitore is null\n then '-'\n else concat(u.nome,' ',u.cognome)\n end as vincitore,\n array_to_string(array_agg(concat(u2.nome,' ',u2.cognome)), '<br>') as giocatori,\n array_to_string(array_agg(pa.risultato), '<br>') as risultati,\n array_to_string(array_agg(concat('+',pa.punteggio)), '<br>') as punteggi,\n g.girone as girone\n from gara g\n left join utenti u on u.id=g.vincitore\n left join partecipa_a pa on pa.IDgara=g.id \n left join utenti u2 on u2.id=pa.IDutente\n where g.IDtorneo='" . $_GET[torneo] . "'\n group by g.id, u.cognome, u.nome\n order by g.girone, g.data asc"); while ($g = pg_fetch_array($res)) { if (ssql("select get_tipo(" . $_GET[torneo] . ")") == 2) { $gironi = "<td>" . $g[girone] . "</td>"; } $rows .= "\n <tr>\n " . $gironi . "\n <td class='data'>" . $g[data] . "</td>\n <td>" . $g[vincitore] . "</td>\n <td class='players'>" . $g[giocatori] . "</td>\n <td class='res'>" . $g[risultati] . "</td>\n <td class='points'>" . $g[punteggi] . "</td>\n </tr>\n ";
</div> </div> </div> </div>'; if ($count == 1) { $list .= "<div class=\"clearfix visible-md visible-lg\"></div>"; $count = 0; } else { $count++; } } if (!$list) { echo "Non sei iscritto a nessun torneo futuro"; } echo $list; BSformomod("mycomps.php"); # calendario delle gare con rispettivi vincitori if ($_GET[prog] > 0) { $start = "\n\t<table class='table table-striped table-bordered table-hover ui-datatable' id='garet'>\n\t<thead>\n\t\t<tr>"; if (ssql("select get_tipo(" . $_GET[torneo] . ")") == 2) { $start .= "<th>Girone</th>"; } $start .= "\n\t\t\t<th>Data</th>\n\t\t\t<th>Vincitore</th>\n\t\t\t<th>Giocatori</th>\n\t\t\t<th>Risultati</th>\n\t\t\t<th>Punteggi</th>\n\t\t</tr>\n\t</thead>\n\t<tbody>\n\t"; $end = "\n\t</tbody>\n\t</table>\n\t"; $rows = ""; $res = sql("select g.id as id,\n\t\t\t\t\tg.data as data,\n\t\t\t\t\tg.vincitore as vincitore,\n\t\t\t\t\tcase when g.vincitore is null\n\t\t\t\t\t\tthen '-'\n\t\t\t\t\t\telse concat(u.nome,' ',u.cognome)\n\t\t\t\t\tend\tas vincitore,\n\t\t\t\t\tarray_to_string(array_agg(concat(u2.nome,' ',u2.cognome)), '<br>') as giocatori,\n\t\t\t\t\tarray_to_string(array_agg(pa.risultato), '<br>') as risultati,\n\t\t\t\t\tarray_to_string(array_agg(concat('+',pa.punteggio)), '<br>') as punteggi,\n\t\t\t\t\tg.girone as girone\n\t\t\t\tfrom gara g\n\t\t\t\t\tleft join utenti u on u.id=g.vincitore\n\t\t\t\t\tleft join partecipa_a pa on pa.IDgara=g.id \n\t\t\t\t\tleft join utenti u2 on u2.id=pa.IDutente\n\t\t\t\twhere g.IDtorneo='" . $_GET[torneo] . "'\n\t\t\t\tgroup by g.id, u.cognome, u.nome\n\t\t\t\torder by g.girone, g.data asc"); while ($g = pg_fetch_array($res)) { if (ssql("select get_tipo(" . $_GET[torneo] . ")") == 2) { $gironi = "<td>" . $g[girone] . "</td>"; } $rows .= "\n\t\t<tr>\n\t\t\t" . $gironi . "\n\t\t\t<td class='data'>" . $g[data] . "</td>\n\t\t\t<td>" . $g[vincitore] . "</td>\n\t\t\t<td class='players'>" . $g[giocatori] . "</td>\n\t\t\t<td class='res'>" . $g[risultati] . "</td>\n\t\t\t<td class='points'>" . $g[punteggi] . "</td>\n\t\t</tr>\n\t\t";
BSdate("data", "Data", $data); BSdropdown("gg1", "Giocatore 1", "select u.id as user, concat(u.nome,' ',u.cognome) as nome \n\t\t\t\t\t\t\t\t\t\t\tfrom utenti u\n\t\t\t\t\t\t\t\t\t\t\t\tjoin iscritto_a ia on u.id=ia.IDutente\n\t\t\t\t\t\t\t\t\t\t\twhere ia.IDtorneo='" . $_GET[torneo] . "'\n\t\t\t\t\t\t\t\t\t\t\t\tand u.id>2", "user", "nome", ""); BSdropdown("gg2", "Giocatore 2", "select u.id as user, concat(u.nome,' ',u.cognome) as nome \n\t\t\t\t\t\t\t\t\t\t\tfrom utenti u\n\t\t\t\t\t\t\t\t\t\t\t\tjoin iscritto_a ia on u.id=ia.IDutente\n\t\t\t\t\t\t\t\t\t\t\twhere ia.IDtorneo='" . $_GET[torneo] . "'\n\t\t\t\t\t\t\t\t\t\t\t\tand u.id>2", "user", "nome", ""); BSbutton("Inserisci"); BSformc(); $jq2footer .= ' var fine = ' . $isend . '; if(fine) { $("#data").prop("disabled", true); $("#gg1").prop("disabled", true); $("#gg2").prop("disabled", true); $("#formo button").prop("disabled", true); } '; } BSformomod("admin_gare.php?torneo=" . $_GET[torneo]); if ($_GET[open] > 0 && $_GET[gid] > 0) { hidden("regris"); hidden($_GET[gid], "gara"); $gara = multisqlarr("select * from gara where id='" . $_GET[gid] . "'"); $tipo = ssql("select get_tipo(" . $_GET[torneo] . ")"); hidden($tipo, "tipo"); $jq2footer = '$("#modal-title").empty(); $("#modal-title").append("Risultati della gara del ' . $gara[data] . '"); $("#edithere").modal("show");'; $res = sql("select nome,\n\t\t\t\t\t\t\tcognome,\n\t\t\t\t\t\t\trisultato,\n\t\t\t\t\t\t\tid\n\t\t\t\t\t\tfrom utenti \n\t\t\t\t\t\t\tleft join partecipa_a on IDutente=id\n\t\t\t\t\t\twhere IDgara='" . $gara[id] . "'"); $c = 1; while ($g = pg_fetch_array($res)) { BSnum("gioc{$c}", $g[nome] . " " . $g[cognome], $g[risultato]); hidden($g[id], "g{$c}"); $c++;
</div> </div> </div> </div>'; if ($count == 1) { $list .= "<div class=\"clearfix visible-md visible-lg\"></div>"; $count = 0; } else { $count++; } } if (!$list) { echo "Non hai partecipato a nessun torneo"; } echo $list; BSformomod("myhof.php"); # calendario delle gare con rispettivi vincitori if ($_GET[prog] > 0) { $start = "\n\t<table class='table table-striped table-bordered table-hover ui-datatable' id='garet'>\n\t<thead>\n\t\t<tr>"; if (ssql("select get_tipo(" . $_GET[torneo] . ")") == 2) { $start .= "<th>Girone</th>"; } $start .= "\n\t\t\t<th>Data</th>\n\t\t\t<th>Vincitore</th>\n\t\t\t<th>Giocatori</th>\n\t\t\t<th>Risultati</th>\n\t\t\t<th>Punteggi</th>\n\t\t</tr>\n\t</thead>\n\t<tbody>\n\t"; $end = "\n\t</tbody>\n\t</table>\n\t"; $rows = ""; $res = sql("select g.id as id,\n\t\t\t\t\tg.data as data,\n\t\t\t\t\tg.vincitore as vincitore,\n\t\t\t\t\tcase when g.vincitore is null\n\t\t\t\t\t\tthen '-'\n\t\t\t\t\t\telse concat(u.nome,' ',u.cognome)\n\t\t\t\t\tend\tas vincitore,\n\t\t\t\t\tarray_to_string(array_agg(concat(u2.nome,' ',u2.cognome)), '<br>') as giocatori,\n\t\t\t\t\tarray_to_string(array_agg(pa.risultato), '<br>') as risultati,\n\t\t\t\t\tarray_to_string(array_agg(concat('+',pa.punteggio)), '<br>') as punteggi,\n\t\t\t\t\tg.girone as girone\n\t\t\t\tfrom gara g\n\t\t\t\t\tleft join utenti u on u.id=g.vincitore\n\t\t\t\t\tleft join partecipa_a pa on pa.IDgara=g.id \n\t\t\t\t\tleft join utenti u2 on u2.id=pa.IDutente\n\t\t\t\twhere g.IDtorneo='" . $_GET[torneo] . "'\n\t\t\t\tgroup by g.id, u.cognome, u.nome\n\t\t\t\torder by g.girone, g.data asc"); while ($g = pg_fetch_array($res)) { if (ssql("select get_tipo(" . $_GET[torneo] . ")") == 2) { $gironi = "<td>" . $g[girone] . "</td>"; } else { $gironi = "";