Ejemplo n.º 1
0
        $msg .= " - Vnesite Ime i Prezime<br/>";
    }
    if (!isset($_POST["korisnik_telefon"]) || $_POST["korisnik_telefon"] == "") {
        $msg .= " - Vnesite Telefon<br/>";
    } else {
        if (!preg_match("/^[0-9]/", $_POST["korisnik_telefon"])) {
            $msg .= " - Vnesite Validan Telefon</br>";
        }
    }
    if ($msg == "") {
        $korisnik = new korisnik();
        $korisnik->submitKorisnik();
    }
}
$termini = array("11:00 – 11:20", "11:20 – 11:40", "11:40 – 12:00", "12:00 – 12:20", "12:20 – 12:40", "13:00 – 13:20", "13:20 – 13:40", "13:40 – 14:00", "PAUZA", "16:00 – 16:20", "16:20 – 16:40", "17:00 – 17:20", "17:20 – 17:40", "17:40 – 18:00");
$korisnici = new korisnik();
$svikorisnici = $korisnici->getAllDan(date("Y-m-d"));
if ($svikorisnici != "") {
    foreach ($svikorisnici as $k => $v) {
        $zafateni_termini[$k] = $v["termin"];
    }
} else {
    $zafateni_termini[0] = 15;
}
//die(print_r($svikorisnici[1]["ime_i_prezime"]));
//die(print_r($svikorisnici));
//die(print_r($zafateni_termini));
?>
<script type="text/javascript" src="../scripts/ajax.js"></script>
<script type="text/javascript" src="../scripts/ajax-dynamic-list.js"></script>
Ejemplo n.º 2
0
<?php

$current = "Lista";
include "../include/top.php";
include "../include/classes/korisnici.php";
function datum_print($datum)
{
    $datumarray = explode("-", $datum);
    return $datumarray[2] . "." . $datumarray[1] . "." . $datumarray[0];
}
$termini = array("11:00 – 11:20", "11:20 – 11:40", "11:40 – 12:00", "12:00 – 12:20", "12:20 – 12:40", "13:00 – 13:20", "13:20 – 13:40", "13:40 – 14:00", "PAUZA", "16:00 – 16:20", "16:20 – 16:40", "17:00 – 17:20", "17:20 – 17:40", "17:40 – 18:00");
$korisnici = new korisnik();
if (!isset($_GET["ascdesc"]) && !isset($_GET["col"]) && !isset($_GET["start"])) {
    $svikorisnici = $korisnici->getLista("ime_i_prezime", "ASC", 0);
    $start = 0;
} else {
    $svikorisnici = $korisnici->getLista($_GET["col"], $_GET["ascdesc"], $_GET["start"]);
    $start = $_GET["start"];
}
$countall = $korisnici->countall();
$pages = $countall[0] / $zapisi_po_strana;
$last = $countall[0] - $countall[0] % $zapisi_po_strana;
$preth = $start - $zapisi_po_strana;
$sledna = $start + $zapisi_po_strana;
//die(print_r($maxpages));
?>
	

<table cellspacing="0" align="center" cellpadding="0" border="1" width="700" class="termini">
    <tr align="center">
        <th width="350">
Ejemplo n.º 3
0
    $datum = date("Y-m-d");
    $print_datum = date("d.m.Y");
    $dan_old = date("j");
    $mesec_old = date("n");
    $godina_old = date("Y");
}
$denesen_datum = date("Y-m-d");
$denes = strtotime($denesen_datum);
$izbran_datum = strtotime($datum);
if ($izbran_datum >= $denes) {
    $validen = "da";
} else {
    $validen = "ne";
}
$termini = array("11:00 – 11:20", "11:20 – 11:40", "11:40 – 12:00", "12:00 – 12:20", "12:20 – 12:40", "13:00 – 13:20", "13:20 – 13:40", "13:40 – 14:00", "PAUZA", "16:00 – 16:20", "16:20 – 16:40", "17:00 – 17:20", "17:20 – 17:40", "17:40 – 18:00");
$korisnici = new korisnik();
$svikorisnici = $korisnici->getAllDan($datum);
if ($svikorisnici != "") {
    foreach ($svikorisnici as $k => $v) {
        $zafateni_termini[$k] = $v["termin"];
    }
} else {
    $zafateni_termini[0] = 15;
}
//die(print_r($svikorisnici[1]["ime_i_prezime"]));
//die(print_r($svikorisnici));
//die(print_r($zafateni_termini));
$nextdaydate = date('j', mktime(0, 0, 0, date("m", strtotime($datum)), date("d", strtotime($datum)) + 1, date("Y", strtotime($datum))));
$nextdaymonth = date('n', mktime(0, 0, 0, date("m", strtotime($datum)), date("d", strtotime($datum)) + 1, date("Y", strtotime($datum))));
$nextdayyear = date('Y', mktime(0, 0, 0, date("m", strtotime($datum)), date("d", strtotime($datum)) + 1, date("Y", strtotime($datum))));
$previousdaydate = date('j', mktime(0, 0, 0, date("m", strtotime($datum)), date("d", strtotime($datum)) - 1, date("Y", strtotime($datum))));