$Item) $_POST[$Index] = addslashes($Item); foreach($_GET as $Index => $Item) $_GET[$Index] = addslashes($Item); session_start(); include('config.php'); include('database.php'); //$Database = new Database($Config['Database']['Host'], $Config['Database']['User'], $Config['Database']['Password'], $Config['Database']['Database']); //$Database->Prefix = $Config['Database']['Prefix']; //$Database->charset($Config['Database']['Charset']); $MonthNames = array('', 'Leden', 'Únor', 'Březen', 'Duben', 'Květen', 'Červen', 'Červenec', 'Srpen', 'Září', 'Říjen', 'Listopad', 'Prosinec'); function GetMicrotime() { list($Usec, $Sec) = explode(" ", microtime()); return ((float)$Usec + (float)$Sec); } function ShowArray($Pole) { echo('
'); print_r($Pole); echo(''); } function TimeToMysqlDateTime($Time) { return(date('Y-m-d H:i:s', $Time)); } function MysqlDateTimeToTime($Time) { $Parts = explode(' ', $Time); $DateParts = explode('-', $Parts[0]); $TimeParts = explode(':', $Parts[1]); $Result = mktime($TimeParts[0], $TimeParts[1], $TimeParts[2], $DateParts[1], $DateParts[2], $DateParts[0]); return($Result); } function MysqlDateToTime($Time) { return(MysqlDateTimeToTime($Time.' 0:0:0')); } function HumanDate($Time) { $Date = explode(' ', $Time); $Parts = explode('-', $Date[0]); if($Date != '0000-00-00') return(($Parts[2]*1).'.'.($Parts[1]*1).'.'.$Parts[0]); else return(' '); } // Zobrazení číselný seznamu stránek function PagesList($URL,$Page,$TotalCount,$CountPerPage) { $Count = ceil($TotalCount/$CountPerPage); $Around = 10; $Result = ''; if($Count>1) { if($Page>0) { $Result.= '<< '; $Result.= '< '; } $PagesMax = $Count-1; $PagesMin = 0; if($PagesMax>($Page+$Around)) $PagesMax = $Page+$Around; if($PagesMin<($Page-$Around)) { $Result.= ' .. '; $PagesMin = $Page-$Around; } for($i=$PagesMin;$i<=$PagesMax;$i++) { if($i==$Page) $Result.= ''; $Result.= ''.($i+1).' '; if($i==$Page) $Result.= ''; } if($PagesMax<($Count-1)) $Result .= ' .. '; if($Page<($Count-1)) { $Result.= '> '; $Result.= '>>'; } } return($Result); } function GetRemoteAddress() { if(array_key_exists('HTTP_X_FORWARDED_FOR',$_SERVER)) $IP = $_SERVER['HTTP_X_FORWARDED_FOR'] ; else if(array_key_exists('REMOTE_ADDR', $_SERVER)) $IP = $_SERVER['REMOTE_ADDR']; else $IP = '0.0.0.0'; return($IP); } function IsInternetAddr() { $RemoteAddr = GetRemoteAddress(); $RemoteAddr = explode('.', $RemoteAddr); return(!(($RemoteAddr[0] == 192) and ($RemoteAddr[1] == 168))); } function ShowPage($Title, $Content) { global $Config, $TimeStart; $Output = ''."\n". ''."\n". ''."\n". ''."\n". ''."\n". '