Changeset 107 for trunk/includes/global.php
- Timestamp:
- Feb 18, 2009, 8:17:50 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/includes/global.php
r94 r107 1 1 <?php 2 3 $ScriptStartTime = GetMicrotime(); 2 4 3 5 if(!isset($_SESSION)) session_start(); … … 22 24 23 25 $TranslationTree = GetTranslationTree(); 26 27 function GetMicrotime() 28 { 29 list($Usec, $Sec) = explode(' ', microtime()); 30 return ((float)$Usec + (float)$Sec); 31 } 24 32 25 33 function ShowShoutbox() … … 205 213 } 206 214 215 $UnitNames = array('B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB'); 216 217 function HumanSize($Value) 218 { 219 global $UnitNames; 220 221 $UnitIndex = 0; 222 while($Value > 1024) 223 { 224 $Value = round($Value / 1024, 3); 225 $UnitIndex++; 226 } 227 return($Value.' '.$UnitNames[$UnitIndex]); 228 } 229 207 230 function ShowFooter() 208 231 { 209 global $Database; 210 232 global $Database, $Config, $ScriptStartTime; 233 234 $ScriptGenerateDuration = round(GetMicrotime() - $ScriptStartTime, 2); 211 235 echo('</td> 212 236 </tr> 213 237 <tr> 214 <td colspan="3" class="page-bottom">Autoři: maron, chronos <a href="http://wowpreklad.zdechov.net/trac/wowpreklad/browser/trunk">Zdrojové soubory</a> ');215 echo(' </td></tr> 216 238 <td colspan="3" class="page-bottom">Autoři: maron, chronos <a href="http://wowpreklad.zdechov.net/trac/wowpreklad/browser/trunk">Zdrojové soubory</a></td></tr>'); 239 if($Config['Web']['ShowRuntimeInfo'] == true) echo('<tr><td colspan="3" style="text-align: center;">Doba generování: '.$ScriptGenerateDuration.' s Použitá paměť: '.HumanSize(memory_get_peak_usage(FALSE)).'</td></tr>'); 240 echo('</table> 217 241 </body> 218 242 </html>');
Note:
See TracChangeset
for help on using the changeset viewer.