Changeset 69 for trunk/Global.php
- Timestamp:
- Feb 28, 2016, 10:54:30 AM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Global.php
r67 r69 1 1 <?php 2 2 3 include_once('Version.php');4 3 include_once('Types.php'); 5 4 include_once('Classes.php'); 6 5 include_once('Packages/Common/Common.php'); 7 include_once('Measure.php');8 include_once('Application.php');9 include_once('Update.php');10 6 11 7 function HumanDate($Time) … … 18 14 list($Usec, $Sec) = explode(" ", microtime()); 19 15 return ((float)$Usec + (float)$Sec); 20 }21 22 function ShowPage($Content)23 {24 global $Config, $ReleaseTime, $Revision;25 26 $Output = '<?xml version="1.0" encoding="'.$Config['Web']['Charset'].'"?>'."\n".27 '<!DOCTYPE html>'.28 '<html>'.29 '<head>'.30 '<meta http-equiv="Content-Language" content="cs"/>'.31 '<meta http-equiv="content-type" content="text/html; charset='.$Config['Web']['Charset'].'" />'.32 '<meta name="robots" content="all" />'.33 '<title>'.$Config['Web']['Title'].'</title>'.34 '<link rel="StyleSheet" href="style/style.css" type="text/css" media="all"/>'.35 '</head><body>';36 $Output .= $Content;37 $Output .= '<br/><div style="text-align: center; font-size: small;">Verze: '.$Revision.' ('.HumanDate($ReleaseTime).')'.38 ' <a href="http://svn.zdechov.net/trac/statistic/browser/trunk">Zdrojový kód</a> '.39 '<a href="http://svn.zdechov.net/trac/statistic/log/trunk?verbose=on">Historie změn</a></div>';40 $Output .= '</body></html>';41 echo($Output);42 16 } 43 17 … … 97 71 return($Output); 98 72 } 73 74 function ProcessURL() 75 { 76 if(array_key_exists('REDIRECT_QUERY_STRING', $_SERVER)) 77 $PathString = $_SERVER['REDIRECT_QUERY_STRING']; 78 else $PathString = ''; 79 if(substr($PathString, -1, 1) == '/') $PathString = substr($PathString, 0, -1); 80 $PathItems = explode('/', $PathString); 81 if(array_key_exists('REQUEST_URI', $_SERVER) and (strpos($_SERVER['REQUEST_URI'], '?') !== false)) 82 $_SERVER['QUERY_STRING'] = substr($_SERVER['REQUEST_URI'], strpos($_SERVER['REQUEST_URI'], '?') + 1); 83 else $_SERVER['QUERY_STRING'] = ''; 84 parse_str($_SERVER['QUERY_STRING'], $_GET); 85 return($PathItems); 86 } 87 88 function GetQueryStringArray($QueryString) 89 { 90 $Result = array(); 91 $Parts = explode('&', $QueryString); 92 foreach($Parts as $Part) 93 { 94 if($Part != '') 95 { 96 if(!strpos($Part, '=')) $Part .= '='; 97 $Item = explode('=', $Part); 98 $Result[$Item[0]] = $Item[1]; 99 } 100 } 101 return($Result); 102 } 103 104 function SetQueryStringArray($QueryStringArray) 105 { 106 $Parts = array(); 107 foreach($QueryStringArray as $Index => $Item) 108 { 109 $Parts[] = $Index.'='.$Item; 110 } 111 return(implode('&', $Parts)); 112 }
Note:
See TracChangeset
for help on using the changeset viewer.