Changeset 56
- Timestamp:
- Feb 21, 2015, 12:17:01 AM (10 years ago)
- Location:
- branches/old
- Files:
-
- 1 added
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/old/Packages/Common/Package.php
r55 r56 4 4 'Name' => 'Common', 5 5 'Version' => 1, 6 }; 7 6 ); 7 8 include_once(dirname(__FILE__).'/PrefixMultiplier.php'); 9 include_once(dirname(__FILE__).'/Database.php'); 10 include_once(dirname(__FILE__).'/Image.php'); 11 include_once(dirname(__FILE__).'/Mail.php'); 12 include_once(dirname(__FILE__).'/UTF8.php'); 13 include_once(dirname(__FILE__).'/NetworkAddress.php'); 14 include_once(dirname(__FILE__).'/VarDumper.php'); 15 include_once(dirname(__FILE__).'/RSS.php'); -
branches/old/Packages/Common/RSS.php
r55 r56 1 1 <?php 2 2 3 class RSS 3 class RSS 4 4 { 5 5 var $Charset; … … 9 9 var $WebmasterEmail; 10 10 var $Items; 11 11 12 12 function __construct() 13 13 { -
branches/old/config.sample.php
r51 r56 2 2 3 3 // Toto je ukázkový konfigurační soubor. Zkopírujte si jej jako config.php do stejné složky a upravte podle potřeby. 4 5 $IsDeveloper = in_array($_SERVER['REMOTE_ADDR'], array('127.0.0.1')); 4 6 5 7 $Config = array( … … 19 21 'AdminEmail' => 'admin@domain', 20 22 'ShowError' => 0, 21 'ErrorLogFile' => 'php_script_error.log', 23 'ShowSQLError' => $IsDeveloper, 24 'ShowSQLQuery' => $IsDeveloper, 25 'ErrorLogFile' => 'php_script_error.log', 22 26 ), 23 27 'DivisionCount' => 500, -
branches/old/custom/convert_data.php
r6 r56 3 3 include('../global.php'); 4 4 5 $Database->select_db('measure');6 5 $Result = $Database->select('measure', '*', 'DataTable != "data"'); 7 6 while($Measure = $Result->fetch_array()) … … 34 33 } 35 34 } 36 37 ?> -
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 } -
branches/old/graph.php
r52 r56 96 96 if(!$Debug) 97 97 { 98 header("Content-type: image/png");99 header("Cache-Control: no-cache"); // Dynamic graph - no cache98 Header("Content-type: image/png"); 99 Header("Cache-Control: no-cache"); // Dynamic graph - no cache 100 100 $Image = @imagecreate($Width, $Height); 101 101 $BackgroundColor = imagecolorallocate($Image, 255, 255, 255); -
branches/old/index.php
r54 r56 173 173 if(array_key_exists('Debug', $_GET)) $Output .= '<th>Počet položek</th><th>Čas vykonání</th>'; 174 174 $Output .= '</tr>'; 175 $Database->select_db('measure');176 175 $Result = $Database->select('measure', '*', '(Enabled=1) AND ((PermissionView="all") OR (PermissionView="'.gethostbyaddr($_SERVER['REMOTE_ADDR']).'")) ORDER BY Description'); 177 176 while($Measure = $Result->fetch_array()) … … 202 201 } 203 202 $Output .= '</table>'; 204 $Output .= '<br><a href="http://svn.zdechov.net/trac/statistic/">Sekce vývoje systému</a>'; 205 $Output .= '</div></body></html>'; 203 $Output .= '</div>'; 206 204 207 205 ShowPage($Output); -
branches/old/stat_functions.php
r52 r56 7 7 list($Usec, $Sec) = explode(" ",microtime()); 8 8 return ((float)$Usec + (float)$Sec); 9 }10 11 function MysqlDateTimeToTime($Time)12 {13 $Parts = explode(' ', $Time);14 $DateParts = explode('-', $Parts[0]);15 $TimeParts = explode(':', $Parts[1]);16 $Result = mktime($TimeParts[0], $TimeParts[1], $TimeParts[2], $DateParts[1], $DateParts[2], $DateParts[0]);17 return($Result);18 }19 20 function TimeToMysqlDateTime($Time)21 {22 return(date('Y-m-d H:i:s', $Time));23 9 } 24 10
Note:
See TracChangeset
for help on using the changeset viewer.