Пример #1
0
<?php

$lib = new Trasa();
$trasa = $lib->getTrasa();
    }
    $Pn_Pt = implode(';', $tmp);
    $tmp2 = array();
    foreach ($_POST['hours2'] as $key1 => $value1) {
        $hours2[0] = $value1;
        $hours2[1] = $_POST['legend2'][$key1];
        $tmp2[] = trim($hours2[0] . ' ' . $hours2[1]);
    }
    $Sb = implode(';', $tmp2);
    $tmp3 = array();
    foreach ($_POST['hours3'] as $key1 => $value1) {
        $hours3[0] = $value1;
        $hours3[1] = $_POST['legend3'][$key1];
        $tmp3[] = trim($hours3[0] . ' ' . $hours3[1]);
    }
    $Nd = implode(';', $tmp3);
    echo $id_trasa . ' ' . $id_przystanek . ' ' . $Pn_Pt . ' ' . $Sb . ' ' . $Nd . ' ' . $id_linii;
    if ($lib->updatePrzystanek($id_trasa, $id_przystanek, $Pn_Pt, $Sb, $Nd, $id_linii)) {
        $message = 'Odjazdy zostały pomyślnie zaktualizowane';
        $MSG = Msg($message, 1);
    } else {
        $message = 'Błąd aktualizacji odjazdów.';
        $MSG = Msg($message, 0);
    }
}
$lib2 = new Linia();
$linia = $lib2->getLinia();
$lib3 = new Trasa();
$trasa = $lib3->getTrasa();
$lib4 = new Legenda();
$legenda = $lib4->getLegenda();