diff -r 000000000000 -r 74a6a363ff9e php/heslo/lib/funkce.inc.php --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/php/heslo/lib/funkce.inc.php Tue May 05 17:08:09 2009 +0200 @@ -0,0 +1,325 @@ +getMessage()); + //header("Location: chyba_db.php"); + exit(); +} + +set_exception_handler('exception_handler'); + +session_set_cookie_params(0, $NASTAVENI['cookie_cesta']); +session_start(); + + +$strankaP = split('/', $_SERVER['REQUEST_URI']); +$stranka = $strankaP[count($strankaP)-1]; + + +if (empty($_SERVER['HTTP_ACCEPT'])) { + $mimeTyp = 'application/xhtml+xml'; +} else { + $mimeTyp = (( stristr( $_SERVER['HTTP_ACCEPT'], 'application/xhtml+xml' ) && !preg_match("/application\/xhtml\+xml;\s*q=0(\.0)?\s*(,|$)/",$_SERVER['HTTP_ACCEPT']) ) ? 'application/xhtml+xml' : 'text/html' ); +} +header("Content-Type: $mimeTyp"); +//header("Content-Type: text/html"); +//header("Content-Type: application/xhtml+xml"); + +/** $nadpis = titulek stránky + h1 */ +function zahlavi($nadpis, $autorizace = true) { + global $mimeTyp; + if ($autorizace) { + overPristup(); + } + + html(' + + +
+ + + + + + + +Uživatel: ' . $_SESSION['login'] . '
'); +} +} + +/** $zobrazitNabidku = zobrazí postranní menu */ +function zapati($zobrazitNabidku = true) { + if ($zobrazitNabidku) { + html('