Changeset 46 for trunk/Application/View/Main.php
- Timestamp:
- Jul 27, 2014, 9:05:14 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Application/View/Main.php
r45 r46 24 24 'caption' => 'Měsíc', 25 25 'period' => 2592000, // 3600 * 24 * 30, 26 ), 26 ), 27 27 'year' => array( 28 28 'caption' => 'Rok', … … 46 46 for($I = 1; $I < 32; $I++) 47 47 { 48 if($I == $TimeParts['mday']) $Selected = ' selected="1"'; else $Selected = ''; 48 if($I == $TimeParts['mday']) $Selected = ' selected="1"'; else $Selected = ''; 49 49 $Output .= '<option value="'.$I.'"'.$Selected.'>'.$I.'</option>'; 50 50 } … … 54 54 $Output .= '<select name="Month">'; 55 55 foreach($this->Months as $Index => $Month) 56 { 56 { 57 57 if($Index == $TimeParts['mon']) $Selected = ' selected="1"'; else $Selected = ''; 58 58 if($Index > 0) $Output .= '<option value="'.$Index.'"'.$Selected.'>'.$Month.'</option>'; … … 63 63 $Output .= '<select name="Year">'; 64 64 for($I = 2000; $I < 2010; $I++) 65 { 65 { 66 66 if($I == $TimeParts['year']) $Selected = ' selected="1"'; else $Selected = ''; 67 67 $Output .= '<option value="'.$I.'"'.$Selected.'>'.$I.'</option>'; … … 72 72 $Output .= '<select name="Hour">'; 73 73 for($I = 0; $I < 24; $I++) 74 { 74 { 75 75 if($I == $TimeParts['hours']) $Selected = ' selected="1"'; else $Selected = ''; 76 76 $Output .= '<option value="'.$I.'"'.$Selected.'>'.$I.'</option>'; … … 80 80 // Minute selection 81 81 $Output .= '<select name="Minute">'; 82 for($I = 0; $I < 60; $I++) 82 for($I = 0; $I < 60; $I++) 83 83 { 84 84 if($I == $TimeParts['minutes']) $Selected = ' selected="1"'; else $Selected = ''; … … 99 99 { 100 100 $Debug = 0; 101 102 101 foreach($this->Config['Application']['DefaultVariables'] as $Index => $Variable) 103 102 { … … 112 111 $_SESSION['TimeEnd'] = time() - 60; 113 112 $_SESSION['TimeStart'] = $_SESSION['TimeEnd'] - $this->GraphTimeRanges[$_SESSION['Period']]['period']; 114 } 113 } 115 114 116 115 $Output = '<div class="Title">Statistiky</div>'; … … 130 129 } 131 130 } 132 break; 131 break; 133 132 case 'SetTimeNow': 134 if(array_key_exists('Time', $_GET)) 133 if(array_key_exists('Time', $_GET)) 135 134 { 136 135 if(($_GET['Time'] == 'TimeStart') or ($_GET['Time'] == 'TimeEnd')) … … 142 141 break; 143 142 } 144 $Output .= '<strong>Časový úsek:</strong><br >';143 $Output .= '<strong>Časový úsek:</strong><br/>'; 145 144 // Show graf time range menu 146 145 if($_SESSION['TimeSpecify'] == 0) … … 150 149 $Output .= '<a href="?Period='.$Index.'">'.$Item['caption'].'</a> '; 151 150 $Output .= '<br/>'; 152 $Output .= '<a href="?TimeSpecify=1">Přesnější nastavení...</a><br >';151 $Output .= '<a href="?TimeSpecify=1">Přesnější nastavení...</a><br/>'; 153 152 } else { 154 153 $Output .= '<table cellspacing="0" cellpadding="2" border="0">'; … … 156 155 $Output .= '<tr><td>Konec:</td><td>'.$this->EditTime('TimeEnd').'</td></tr>'; 157 156 $Output .= '</table>'; 158 $Output .= '<a href="?TimeSpecify=0">Jednoduché nastavení...</a><br >';157 $Output .= '<a href="?TimeSpecify=0">Jednoduché nastavení...</a><br/>'; 159 158 } 160 159 $Output .= '<br/>'.$this->Graph(); … … 162 161 $Output .= '<br/>'.$this->MeasureTable(); 163 162 return($Output); 164 } 165 163 } 164 166 165 function Graph() 167 166 { 168 167 $Output = '<strong>Graf:</strong><br/>'; 169 $Output .= '<img alt="Graf" src="?M=Graph&Measure='.$_SESSION['Measure'].'&From='.$_SESSION['TimeStart'].'&To='.$_SESSION['TimeEnd'].'&Width='.$this->Config['Application']['GraphSize']['Width'].'&Height='.$this->Config['Application']['GraphSize']['Height'].'&Differential='.$_SESSION['Differential'].'" width="'.$this->Config['Application']['GraphSize']['Width'].'" height="'.$this->Config['Application']['GraphSize']['Height'].'"><br>'; 170 $Output .= '<a href="?Measure='.$_SESSION['Measure'].'&TimeStart='.$_SESSION['TimeStart'].'&TimeEnd='.$_SESSION['TimeEnd'].'&TimeSpecify=1&Differential='.$_SESSION['Differential'].'">Odkaz na vybraný graf</a><br>'; 168 $Output .= '<img alt="Graf" src="?M=Graph&Measure='.$_SESSION['Measure']. 169 '&From='.$_SESSION['TimeStart'].'&To='.$_SESSION['TimeEnd'].'&Width='. 170 $this->Config['Application']['ImageWidth'].'&Height='.$this->Config['Application']['ImageHeight']. 171 '&Differential='.$_SESSION['Differential'].'" width="'.$this->Config['Application']['ImageWidth']. 172 '" height="'.$this->Config['Application']['ImageHeight'].'"/><br/>'; 173 $Output .= '<a href="?Measure='.$_SESSION['Measure'].'&TimeStart='.$_SESSION['TimeStart'].'&TimeEnd='.$_SESSION['TimeEnd'].'&TimeSpecify=1&Differential='.$_SESSION['Differential'].'">Odkaz na vybraný graf</a><br/>'; 171 174 //print_r(GetValues($Measure, $TimeStart, $TimeEnd)); 172 175 return($Output); 173 176 } 174 177 175 178 function MeasureTable() 176 179 { … … 202 205 $LastMeasureValue = ' '; 203 206 } 204 if($Measure['Continuity'] == 1) $Interpolate = 'Ano'; 207 if($Measure['Continuity'] == 1) $Interpolate = 'Ano'; 205 208 else $Interpolate = 'Ne'; 206 209 if($Measure['Info'] == '') $Measure['Info'] = ' '; … … 214 217 //print_r(gd_info()); 215 218 //print_r($_SESSION); 216 219 217 220 //ShowPage($Output); 218 221 //echo(AddPrefixMultipliers('-0.000000071112345', 'B'));
Note:
See TracChangeset
for help on using the changeset viewer.