Changeset 56 for branches/old/global.php
- Timestamp:
- Feb 21, 2015, 12:17:01 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/old/global.php
r54 r56 8 8 } 9 9 include_once('config.php'); 10 include_once('database.php'); 11 include_once('code.php'); 10 include_once('Version.php'); 12 11 include_once('types.php'); 13 12 include_once('classes.php'); 14 include_once(' Common/PrefixMultiplier.php');13 include_once('Packages/Common/Package.php'); 15 14 $PrefixMultiplier = new PrefixMultiplier(); 16 15 include_once('stat_functions.php'); 17 $Database = new Database($Config['Database']['Host'], $Config['Database']['User'], $Config['Database']['Password'], $Config['Database']['Database']); 18 if ($Database->connect_error) { 19 die('Connect Error (' . $Database->connect_errno . ') '.$Database->connect_error); 20 } 21 16 $Database = new Database(); 17 $Database->Connect($Config['Database']['Host'], $Config['Database']['User'], 18 $Config['Database']['Password'], $Config['Database']['Database']); 22 19 $Database->Prefix = $Config['Database']['Prefix']; 23 20 $Database->charset($Config['Database']['Charset']); 21 $Database->ShowSQLError = $Config['Web']['ShowSQLError']; 22 $Database->ShowSQLQuery = $Config['Web']['ShowSQLQuery']; 24 23 25 24 // SQL injection hack protection … … 27 26 foreach($_GET as $Index => $Item) $_GET[$Index] = addslashes($Item); 28 27 28 function HumanDate($Time) 29 { 30 return(date('j.n.Y', $Time)); 31 } 32 29 33 function ShowPage($Content) 30 34 { 31 global $Config; 32 $Output = '<?xml version="1.0" encoding="'.$Config['Web']['Charset'].'"?>'."\n". // <? 33 '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 34 <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> 35 <head> 36 <meta http-equiv="Content-Language" content="cs"/> 37 <meta http-equiv="Content-Type" content="text/html; charset='.$Config['Web']['Charset'].'"/> 38 <title>'.$Config['Web']['Title'].'</title> 39 <link rel="StyleSheet" href="style/style.css" type="text/css" media="all"/> 40 </head><body>'; 41 $Output .= $Content.'</body></html>'; 35 global $Config, $ReleaseTime, $Revision; 36 37 $Output = '<?xml version="1.0" encoding="'.$Config['Web']['Charset'].'"?>'."\n". 38 '<!DOCTYPE html>'. 39 '<html>'. 40 '<head>'. 41 '<meta http-equiv="Content-Language" content="cs"/>'. 42 '<meta http-equiv="content-type" content="text/html; charset='.$Config['Web']['Charset'].'" />'. 43 '<meta name="robots" content="all" />'. 44 '<title>'.$Config['Web']['Title'].'</title>'. 45 '<link rel="StyleSheet" href="style/style.css" type="text/css" media="all"/>'. 46 '</head><body>'; 47 $Output .= $Content; 48 $Output .= '<br/><div style="text-align: center; font-size: small;">Verze: '.$Revision.' ('.HumanDate($ReleaseTime).')'. 49 ' <a href="http://svn.zdechov.net/trac/statistic/browser/trunk">Zdrojový kód</a> '. 50 '<a href="http://svn.zdechov.net/trac/statistic/log/trunk?verbose=on">Historie změn</a></div>'; 51 $Output .= '</body></html>'; 42 52 echo($Output); 43 53 }
Note:
See TracChangeset
for help on using the changeset viewer.