| 1 | <?php
|
|---|
| 2 | session_start();
|
|---|
| 3 | include_once('config.php');
|
|---|
| 4 | include_once('db.php');
|
|---|
| 5 |
|
|---|
| 6 | include_once('stat.php');
|
|---|
| 7 | StatProcess();
|
|---|
| 8 |
|
|---|
| 9 | function IconedLink($Link, $Text)
|
|---|
| 10 | {
|
|---|
| 11 | $Extension = substr($Link, strrpos($Link, '.')+1);
|
|---|
| 12 | //echo($Extension);
|
|---|
| 13 | $Icon = '<img src="images/icons/'.$Extension.'.gif" alt="'.$Extension.'"> ';
|
|---|
| 14 | return($Icon.'<a href="'.$Link.'">'.$Text.'</a>');
|
|---|
| 15 | }
|
|---|
| 16 |
|
|---|
| 17 | function ShowArray($Pole)
|
|---|
| 18 | {
|
|---|
| 19 | echo('<pre style="font-size: 8pt;">');
|
|---|
| 20 | print_r($Pole);
|
|---|
| 21 | echo('</pre>');
|
|---|
| 22 | }
|
|---|
| 23 |
|
|---|
| 24 | function GetMicrotime()
|
|---|
| 25 | {
|
|---|
| 26 | list($Usec, $Sec) = explode(" ",microtime());
|
|---|
| 27 | return ((float)$Usec + (float)$Sec);
|
|---|
| 28 | }
|
|---|
| 29 |
|
|---|
| 30 | function ShowHeader($Title,$Path)
|
|---|
| 31 | {
|
|---|
| 32 | global $Time_Start, $refresh, $Charset, $Description, $Keywords;
|
|---|
| 33 | $Time_Start = GetMicrotime(); // Zjisti počátečnà čas
|
|---|
| 34 | $Cesty = array(
|
|---|
| 35 | '/www/index.php' => '<a href="/index.php">RozcestnĂk</a>',
|
|---|
| 36 | '/www/vyzva.php' => '<a href="/index.php">RozcestnĂk</a> > <a href="/www/vyzva.php">VĂ˝zva k pĹ™ipojenĂ</a>',
|
|---|
| 37 | '/www/statistic.php' => '<a href="/index.php">RozcestnĂk</a> > <a href="/www/statistic.php">Statistika</a>',
|
|---|
| 38 | );
|
|---|
| 39 | echo('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
|---|
| 40 | <html> <head>
|
|---|
| 41 | <link media="all" href="style.css" rel="stylesheet" type="text/css">
|
|---|
| 42 | <meta http-equiv="Content-Language" content="cs">
|
|---|
| 43 | <meta http-equiv="Content-Type" content="text/html; charset=');
|
|---|
| 44 | if(isset($Charset)) echo('windows-1250');
|
|---|
| 45 | else echo('iso-8859-2');
|
|---|
| 46 | echo('">'."\n");
|
|---|
| 47 | if (isset($Keywords)) echo(' <meta name="keywords" content="'.$Keywords.'">'."\n");
|
|---|
| 48 | if (isset($Description)) echo(' <meta name="description" content="'.$Description.'">'."\n");
|
|---|
| 49 | if (isset($refresh)) echo(' <meta http-equiv="Refresh" content="'.$refresh."\">\n");
|
|---|
| 50 |
|
|---|
| 51 | if(substr($_SERVER['SCRIPT_NAME'], 0, 21) == '/dev/zdechov.net/www/') $_SERVER['SCRIPT_NAME'] = '/www'.substr($_SERVER['SCRIPT_NAME'], 20);
|
|---|
| 52 | //echo($_SERVER['SCRIPT_NAME']);
|
|---|
| 53 | echo(' <title>ZdechovNET - '.$Path.'</title>
|
|---|
| 54 | </head>'."\n".'<body style="font-family: Arial, sans-serif;">'."\n".
|
|---|
| 55 | '<div style="background-color: #5050FF; color: white; padding: 0 5 0 5; font-size: 20pt;">'.$Title.'</div>'.
|
|---|
| 56 | '<div style="margin-bottom: 5px; padding-bottom: 2px; border-width: 0 0 1 0; border-color: gray; border-style: dotted;"><strong>Navigace:</strong> '.$Cesty[$_SERVER['SCRIPT_NAME']].'</div>'.
|
|---|
| 57 | '<div>');
|
|---|
| 58 | //phpinfo();
|
|---|
| 59 | }
|
|---|
| 60 |
|
|---|
| 61 |
|
|---|
| 62 | function ShowFooter()
|
|---|
| 63 | {
|
|---|
| 64 | global $Time_Start;
|
|---|
| 65 | $Time = floor((GetMicrotime() - $Time_Start)*100)/100;
|
|---|
| 66 | echo('</div><div style="border-width: 1 0 0 0; border-color: gray; border-style: solid;" align="center"><i style="font-size: x-small;">| Poslednà aktualizace: '.date('j.n.Y',filemtime($_SERVER['SCRIPT_FILENAME'])).' | Doba generovánà stránky: '.$Time.' s | Webmistr: robie@centrum.cz |</i></div>');
|
|---|
| 67 | //ShowArray($GLOBALS);
|
|---|
| 68 | echo('</body></html>');
|
|---|
| 69 | }
|
|---|
| 70 |
|
|---|