Changeset 54
- Timestamp:
- Feb 20, 2015, 11:32:56 PM (10 years ago)
- Location:
- branches/old
- Files:
-
- 1 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/old/global.php
r52 r54 42 42 echo($Output); 43 43 } 44 45 44 46 45 function MakeLink($Target, $Title) -
branches/old/index.php
r53 r54 6 6 function EditTime($Time) 7 7 { 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 for($I = 0; $I < 60; $I++)53 54 55 56 57 58 $Output .= '<input type="submit" value="Nastavit">'; 59 $Output .= '</form>';60 61 62 63 64 65 8 global $Months; 9 10 $Output = '<form style="display: inline;" action="?Operation=SetTime&Time='.$Time.'" method="post">'; 11 12 $TimeParts = getdate($_SESSION[$Time]); 13 14 // Day selection 15 $Output .= '<select name="Day">'; 16 for($I = 1; $I < 32; $I++) 17 { 18 if($I == $TimeParts['mday']) $Selected = ' selected="1"'; else $Selected = ''; 19 $Output .= '<option value="'.$I.'"'.$Selected.'>'.$I.'</option>'; 20 } 21 $Output .= '</select>. '; 22 23 // Month selection 24 $Output .= '<select name="Month">'; 25 foreach($Months as $Index => $Month) 26 { 27 if($Index == $TimeParts['mon']) $Selected = ' selected="1"'; else $Selected = ''; 28 if($Index > 0) $Output .= '<option value="'.$Index.'"'.$Selected.'>'.$Month.'</option>'; 29 } 30 $Output .= '</select>. '; 31 32 // Day selection 33 $Output .= '<select name="Year">'; 34 for($I = 2000; $I < 2010; $I++) 35 { 36 if($I == $TimeParts['year']) $Selected = ' selected="1"'; else $Selected = ''; 37 $Output .= '<option value="'.$I.'"'.$Selected.'>'.$I.'</option>'; 38 } 39 $Output .= '</select> '; 40 41 // Hour selection 42 $Output .= '<select name="Hour">'; 43 for($I = 0; $I < 24; $I++) 44 { 45 if($I == $TimeParts['hours']) $Selected = ' selected="1"'; else $Selected = ''; 46 $Output .= '<option value="'.$I.'"'.$Selected.'>'.$I.'</option>'; 47 } 48 $Output .= '</select> : '; 49 50 // Minute selection 51 $Output .= '<select name="Minute">'; 52 for($I = 0; $I < 60; $I++) 53 { 54 if($I == $TimeParts['minutes']) $Selected = ' selected="1"'; else $Selected = ''; 55 $Output .= '<option value="'.$I.'"'.$Selected.'>'.$I.'</option>'; 56 } 57 $Output .= '</select> '; 58 59 $Output .= '<input type="submit" value="Nastavit">'; 60 $Output .= '</form>'; 61 $Output .= ' <form style="display: inline;" action="?Operation=SetTimeNow&Time='.$Time.'" method="post">'; 62 $Output .= '<input type="submit" value="Aktuální čas">'; 63 $Output .= '</form>'; 64 65 return($Output); 66 66 } 67 67 … … 110 110 } 111 111 112 $Output = '<div style="text-align: center"><div class="Title"> Statistiky</div>';112 $Output = '<div style="text-align: center"><div class="Title">'.$Config['Web']['Title'].'</div>'; 113 113 114 114 if(!array_key_exists('Operation', $_GET)) $_GET['Operation'] = ''; … … 138 138 break; 139 139 140 } 141 $Output .= '<strong>Časový úsek:</strong><br>'; 142 // Show graph time range menu 143 if($_SESSION['TimeSpecify'] == 0) 144 { 145 $Output .= 'Délka úseku: '; 146 foreach($GrafTimeRanges as $Index => $Item) 147 $Output .= '<a href="?Period='.$Index.'">'.$Item['caption'].'</a> '; 148 $Output .= '<br>'; 149 $Output .= '<a href="?TimeSpecify=1">Přesnější nastavení...</a><br>'; 150 } else { 151 $Output .= '<table cellspacing="0" cellpadding="2" border="0" style="margin: 0px auto;">'; 152 $Output .= '<tr><td>Počátek:</td><td>'.EditTime('TimeStart').'</td></tr>'; 153 $Output .= '<tr><td>Konec:</td><td>'.EditTime('TimeEnd').'</td></tr>'; 154 $Output .= '</table>'; 155 $Output .= '<a href="?TimeSpecify=0">Jednoduché nastavení...</a><br>'; 156 } 140 } 141 $Output .= '<strong>Časový úsek:</strong><br>'; 142 143 // Show graph time range menu 144 if($_SESSION['TimeSpecify'] == 0) 145 { 146 $Output .= 'Délka úseku: '; 147 foreach($GrafTimeRanges as $Index => $Item) 148 $Output .= '<a href="?Period='.$Index.'">'.$Item['caption'].'</a> '; 149 $Output .= '<br>'; 150 $Output .= '<a href="?TimeSpecify=1">Přesnější nastavení...</a><br>'; 151 } else { 152 $Output .= '<table cellspacing="0" cellpadding="2" border="0" style="margin: 0px auto;">'; 153 $Output .= '<tr><td>Počátek:</td><td>'.EditTime('TimeStart').'</td></tr>'; 154 $Output .= '<tr><td>Konec:</td><td>'.EditTime('TimeEnd').'</td></tr>'; 155 $Output .= '</table>'; 156 $Output .= '<a href="?TimeSpecify=0">Jednoduché nastavení...</a><br>'; 157 } 157 158 $Output .= '<br>'; 158 159 159 $Result = $Database->select('measure', 'Id', '(Enabled=1) AND (PermissionView="all") OR (PermissionView="'.gethostbyaddr($_SERVER['REMOTE_ADDR']).'") AND (Id='.$_SESSION['Measure'].')'); 160 if($Result->num_rows == 0) $_SESSION['Measure'] = $Config['DefaultVariables']['Measure']; 160 $Result = $Database->select('measure', 'Id', '(Enabled=1) AND ((PermissionView="all") OR (PermissionView="'.gethostbyaddr($_SERVER['REMOTE_ADDR']).'")) AND (Id='.($_SESSION['Measure'] * 1).')'); 161 if($Result->num_rows == 0) 162 $_SESSION['Measure'] = $Config['DefaultVariables']['Measure']; 161 163 162 164 $Output .= '<strong>Graf:</strong><br>';
Note:
See TracChangeset
for help on using the changeset viewer.