Changeset 2 for trunk/www/style.php
- Timestamp:
- Nov 28, 2008, 8:21:35 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/www/style.php
r1 r2 1 <? 1 <?php 2 2 session_start(); 3 3 include_once('config.php'); 4 4 include_once('db.php'); 5 6 5 include_once('stat.php'); 7 6 StatProcess(); … … 9 8 function IconedLink($Link, $Text) 10 9 { 11 $Extension = substr($Link, strrpos($Link, '.') +1);10 $Extension = substr($Link, strrpos($Link, '.') + 1); 12 11 //echo($Extension); 13 12 $Icon = '<img src="images/icons/'.$Extension.'.gif" alt="'.$Extension.'"> '; … … 24 23 function GetMicrotime() 25 24 { 26 list($Usec, $Sec) = explode(" ", microtime());25 list($Usec, $Sec) = explode(" ", microtime()); 27 26 return ((float)$Usec + (float)$Sec); 28 27 } 29 28 30 function ShowHeader($Title, $Path)29 function ShowHeader($Title, $Path) 31 30 { 32 global $Time_Start, $refresh, $Charset, $Description, $Keywords; 33 $Time_Start = GetMicrotime(); // Zjisti poèáteèní èas 34 $Cesty = array( 31 global $Time_Start, $refresh, $Description, $Keywords, $Options; 32 33 $Time_Start = GetMicrotime(); // Zjisti počáteční čas 34 $Cesty = array 35 ( 35 36 '/www/history.php' => '<a href="/www/index.php">Rozcestník</a> > <a href="/www/history.php">Historie</a>', 36 37 '/www/index.php' => '<a href="/www/index.php">Rozcestník</a>', 37 '/www/vyzva.php' => '<a href="/www/index.php">Rozcestník</a> > <a href="/www/vyzva.php">Výzva k p øipojení</a>',38 '/www/vyzva.php' => '<a href="/www/index.php">Rozcestník</a> > <a href="/www/vyzva.php">Výzva k připojení</a>', 38 39 '/www/statistic.php' => '<a href="/www/index.php">Rozcestník</a> > <a href="/www/statistic.php">Statistika</a>', 39 40 ); 40 41 echo('<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> 41 <html> <head> 42 <html> <head> 42 43 <link media="all" href="style.css" rel="stylesheet" type="text/css"> 43 44 <meta http-equiv="Content-Language" content="cs"> 44 <meta http-equiv="Content-Type" content="text/html; charset='); 45 if(isset($Charset)) echo('windows-1250'); 46 else echo('iso-8859-2'); 47 echo('">'."\n"); 48 if (isset($Keywords)) echo(' <meta name="keywords" content="'.$Keywords.'">'."\n"); 49 if (isset($Description)) echo(' <meta name="description" content="'.$Description.'">'."\n"); 50 if (isset($refresh)) echo(' <meta http-equiv="Refresh" content="'.$refresh."\">\n"); 51 45 <meta http-equiv="Content-Type" content="text/html; charset='.$Options['WebEncoding'].'">'."\n"); 46 if(isset($Keywords)) echo(' <meta name="keywords" content="'.$Keywords.'">'."\n"); 47 if(isset($Description)) echo(' <meta name="description" content="'.$Description.'">'."\n"); 48 if(isset($refresh)) echo(' <meta http-equiv="Refresh" content="'.$refresh."\">\n"); 49 52 50 if(substr($_SERVER['SCRIPT_NAME'], 0, 21) == '/dev/zdechov.net/www/') $_SERVER['SCRIPT_NAME'] = '/www'.substr($_SERVER['SCRIPT_NAME'], 20); 53 51 //echo($_SERVER['SCRIPT_NAME']); … … 55 53 </head>'."\n".'<body style="font-family: Arial, sans-serif;">'."\n". 56 54 '<div style="background-color: #5050FF; color: white; padding: 0 5 0 5; font-size: 20pt;">'.$Title.'</div>'. 57 '<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>'. 58 '<div>'); 55 '<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><div>'); 59 56 //phpinfo(); 60 57 } 61 62 58 63 59 function ShowFooter() 64 60 { 65 61 global $Time_Start; 66 $Time = floor((GetMicrotime() - $Time_Start) *100)/100;62 $Time = floor((GetMicrotime() - $Time_Start) * 100) / 100; 67 63 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>'); 68 64 //ShowArray($GLOBALS);
Note:
See TracChangeset
for help on using the changeset viewer.