Changeset 61
- Timestamp:
- Dec 31, 2015, 11:02:23 PM (9 years ago)
- Location:
- trunk
- Files:
-
- 2 added
- 4 deleted
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Packages/Common/RSS.php
r56 r61 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 { -
trunk/create_groups.php
r51 r61 1 1 <?php 2 2 3 include('error.php');4 3 include('stat_functions.php'); 5 4 include('db.php'); -
trunk/global.php
r56 r61 3 3 session_start(); 4 4 $FileName = dirname(__FILE__).'/config.php'; 5 if(file_exists($FileName)) include ($FileName);5 if(file_exists($FileName)) include_once($FileName); 6 6 else { 7 7 die('Configuration file "'.$FileName.'" not found.'); 8 8 } 9 include_once('config.php');10 9 include_once('Version.php'); 11 10 include_once('types.php'); 12 11 include_once('classes.php'); 13 include_once('Packages/Common/ Package.php');12 include_once('Packages/Common/Common.php'); 14 13 $PrefixMultiplier = new PrefixMultiplier(); 14 $ErrorHandler = new ErrorHandler(); 15 $ErrorHandler->Start(); 16 $ErrorHandler->ShowError = $Config['Web']['ShowError']; 15 17 include_once('stat_functions.php'); 16 18 $Database = new Database(); … … 55 57 function MakeLink($Target, $Title) 56 58 { 57 return('<a href="'.$Target.'">'.$Title.'</a>'); 59 return('<a href="'.$Target.'">'.$Title.'</a>'); 58 60 } 59 61 … … 87 89 foreach($Class as $Index => $Item) 88 90 { 89 if(!array_key_exists($Index, $Values)) $Values[$Index] = $Item['Default']; 91 if(!array_key_exists($Index, $Values)) $Values[$Index] = $Item['Default']; 90 92 switch($Item['Type']) 91 93 { -
trunk/graph.php
r56 r61 3 3 include('global.php'); 4 4 5 if(array_key_exists('Debug', $_GET)) $Debug = $_GET['Debug']; 5 if(array_key_exists('Debug', $_GET)) $Debug = $_GET['Debug']; 6 6 else $Debug = 0; 7 7 … … 14 14 if(!array_key_exists('Measure',$_GET)) die('Musíte zadat měřenou veličinu'); 15 15 $MeasureId = addslashes($_GET['Measure']); 16 if(!array_key_exists('Width', $_GET)) $Width = $DefaultWidth; 16 if(!array_key_exists('Width', $_GET)) $Width = $DefaultWidth; 17 17 else $Width = addslashes($_GET['Width']); 18 18 if(!array_key_exists('Height', $_GET)) $Height = $DefaultHeight; … … 32 32 $Points = GetValues($Measure, $StartTime, $EndTime, $Level); 33 33 34 if($Debug) echo('Points count: '.count($Points).'<br>'); 35 //if($Debug) foreach($Points as $Index => $Item) 34 if($Debug) echo('Points count: '.count($Points).'<br>'); 35 //if($Debug) foreach($Points as $Index => $Item) 36 36 // echo($Index.': '.$Item['min'].'<br>'); 37 37 … … 55 55 $AvgValue = $AvgValue / count($Points); //round(* $Measure['Divider']) / $Measure['Divider']; 56 56 57 // Generate polygon and recalculate y values to fit graph height 57 // Generate polygon and recalculate y values to fit graph height 58 58 $PointsMin = array(0, $Height-1); 59 59 $PointsAvg = array(0, $Height-1); … … 97 97 { 98 98 Header("Content-type: image/png"); 99 Header("Cache-Control: no-cache"); // Dynamic graph - no cache 99 Header("Cache-Control: no-cache"); // Dynamic graph - no cache 100 100 $Image = @imagecreate($Width, $Height); 101 101 $BackgroundColor = imagecolorallocate($Image, 255, 255, 255); … … 122 122 if($TimeMarksIndex < 2) $TimeMarksIndex = 2; 123 123 $MajorTimeMarks = $TimeMarks[$TimeMarksIndex - 1]; 124 $MinorTimeMarks = $TimeMarks[$TimeMarksIndex - 2]; 124 $MinorTimeMarks = $TimeMarks[$TimeMarksIndex - 2]; 125 125 126 $TimeShift = AlignTime($StartTime, $MajorTimeMarks) - $StartTime; 126 $TimeShift = AlignTime($StartTime, $MajorTimeMarks) - $StartTime; 127 127 //imagestring($Image, 10, 40, 50, $TimeShift, $Black); 128 128 … … 134 134 for($X=1; $X < $Width; $X = $X + 3) imagesetpixel($Image, $X, $Y, $Gray); 135 135 //imageline($Image, 30, $Y, $Width-1, $Y, IMG_COLOR_STYLED); 136 } 136 } 137 137 138 $TimeShift = AlignTime($StartTime, $MinorTimeMarks) - $StartTime; 138 $TimeShift = AlignTime($StartTime, $MinorTimeMarks) - $StartTime; 139 139 140 140 // Zobraz měřítko X … … 142 142 for($Time = $StartTime; $Time < $EndTime; $Time += $MajorTimeMarks) 143 143 { 144 $X = round(($Time - $StartTime + $TimeShift) / $TimeRange * $Width) % $Width; 144 $X = round(($Time - $StartTime + $TimeShift) / $TimeRange * $Width) % $Width; 145 145 //imageline($Image, 30, $Y, $Width-1, $Y, IMG_COLOR_STYLED); 146 146 if(($MajorTimeMarks > 60*60*24)) $Text = date('j.n.Y', $Time + $TimeShift);
Note:
See TracChangeset
for help on using the changeset viewer.