$zobraz_form = true; if (isset($_POST['posli2'])) { $po->vymaz_pouzivatela($_GET['id']); echo '<meta http-equiv="refresh" content="0; URL=index.php">'; //unset($po); ?> <?php echo '<p class="chyba">Vymazane!</p>'; $zobraz_form = false; } if (isset($_POST['posli']) && over($_POST['meno']) && over($_POST['priezvisko'])) { $po->uprav_pouzivatela($_POST['meno'], $_POST['priezvisko'], $_POST['oddiel'], $_POST['oscislo'], $_POST['cip'], $_POST['poznamka'], $_POST['uspech']); unset($po); $po = new POUZIVATELIA(); $po = POUZIVATELIA::vrat_pouzivatela($_GET["id"]); ?> <?php } ?> <!DOCTYPE HTML> <html> <?php hlavicka("Upraviť údaje používateľa - " . $po->meno . " " . $po->priezvisko); ?> <script src="thumbnailviewer.js" type="text/javascript"></script>
<?php include 'funkcie.php'; include 'pouzivatelia.php'; include 'preteky.php'; session_start(); $zobraz_form = false; $po = new POUZIVATELIA(); if (isset($_POST['del']) && isset($_POST['id_user'])) { POUZIVATELIA::vymaz_pouzivatela($_POST['id_user']); } if (isset($_POST['novy'])) { $zobraz_form = true; } if (isset($_POST['stop'])) { $zobraz_form = false; } if (isset($_POST['posli']) && (isset($_POST['meno']) && isset($_POST['priezvisko']) && isset($_POST['oddiel']) && isset($_POST['oscislo']) && isset($_POST['cip']) && isset($_POST['poznamka']))) { $zobraz_form = false; $po->pridaj_pouzivatela($_POST['meno'], $_POST['priezvisko'], $_POST['oddiel'], $_POST['oscislo'], $_POST['cip'], $_POST['poznamka'], $_POST['uspech']); } ?> <!DOCTYPE HTML> <html> <?php hlavicka("Členovia klubu"); ?>
static function vypis_zoznam() { $db = napoj_db(); $sql = <<<EOF SELECT * from POUZIVATELIA LEFT JOIN oddiely ON POUZIVATELIA.id_oddiel=oddiely.id ORDER BY oddiely.id IS NULL, oddiely.nazov;; EOF; $akt_oddiel = "."; $ret = $db->query($sql); while ($row = $ret->fetchArray(SQLITE3_ASSOC)) { if ($akt_oddiel != $row['nazov']) { $akt_oddiel = $row['nazov']; if ($akt_oddiel == "") { echo "<h2 class=ZC_nadpis>Bez oddielu</h2>"; } else { echo "<h2 class=ZC_nadpis>" . $akt_oddiel . "</h2>"; } } POUZIVATELIA::vypis_profil($row); } //echo "Operation done successfully"."<br>"; $db->close(); }
PRETEKY::odhlas_z_preteku($_GET["id"], $val); } } } if (isset($_POST['del'])) { // PHP throws a fit if we try to loop a non-array if (is_array($_POST['incharge2'])) { foreach ($_POST['incharge2'] as $val) { //echo $val . '<br />'; $po = new POUZIVATELIA(); $po->vymaz_pouzivatela($val); unset($po); } } } $po = new POUZIVATELIA(); if (isset($_POST['posli']) && over($_POST['meno']) && over($_POST['priezvisko'])) { $id_novy = $po->pridaj_pouzivatela($_POST['meno'], $_POST['priezvisko'], "", $_POST['oscislo'], $_POST['cip'], $_POST['poznamka'], ""); if ($id_novy > -1 && isset($_POST['kategoria']) && $_POST['kategoria'] != '-') { PRETEKY::prihlas_na_pretek($_GET["id"], $id_novy, $_POST['kategoria'], $_POST['poznamka']); if (isset($_COOKIE['posledni_prihlaseni'])) { setcookie("posledni_prihlaseni", $_COOKIE['posledni_prihlaseni'] . "#" . $id_novy, time() + 86400 * 366, "/"); } else { setcookie("posledni_prihlaseni", $id_novy, time() + 86400 * 366, "/"); } } unset($po); } if (isset($_POST['navodik'])) { $navodik = true; }