"); echo ("window.location.href = '".self_path()."?js=1';"); echo (""); // slijedeći dio koda se izvrši ako JavaScript nije podržan // resetiraj varijabu da bi se ponovno izvršila provjera za JavaScript unset ($_SESSION["jsProvjera"]); // ako je varijabla $jsNeophodan postavljena na TRUE prekini izvršavanje uz poruku upozorenja // .. ako nije znači da JavaScript nije neophodan za izvršavanje te stranice if ($jsRequired) { require ($htmlStartFile); exit ("Za učitavanje ove stranice neophodan je JavaScript. Uključite ga a zatim učitajte stranicu ponovno."); } } } else if ($jsRequired) { // provjeri ako je korisnik opet isključio JavaScript a neophodan je za tekuću stranicu echo (""); echo (""); } } function browser_invalidate_cache() { header ("Expires: ".gmdate("D, d M Y H:i:s", time())." GMT"); header ("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT"); header ("Cache-Control: no-cache, must-revalidate"); header ("Pragma: no-cache"); } function js_redirect ($address) { echo (""); } function js_message ($message) { echo (""); } function js_code ($code) { echo (""); } function redirect_default_set ($url) { $GLOBALS["redirect_default_url"] = $url; } function redirect_default() { return ($GLOBALS["redirect_default_url"]); } function redirect_to ($url) { if (headers_sent()) { echo (""); } else header ("Location: $url"); exit(); } function redirect_to_default() { redirect_to (redirect_default()); } function online_users() { $count = 0; if ($directory_handle = opendir (session_save_path())) { while (false !== ($file = readdir ($directory_handle))) { if ($file != '.' && $file != '..') { if (time() - fileatime (session_save_path() . '/' . $file) < ONLINE_USERS_MAX_IDLE_TIME * 60) $count++; } } closedir ($directory_handle); } return ($count); } function geoplugin() { return (unserialize (file_get_contents ("http://www.geoplugin.net/php.gp?ip=".user_ip()))); } function email_send ($email_from, $email_to, $bcc_to, $subject, $message) { /*if (empty ($email_to)) return (FALSE); //require_once ("Mail.php"); if (strstr ($email_to, "<") === FALSE) $email_to = "<$email_to>"; if (empty ($email_from)) $email_from = $email_to;*/ /*$headers = array ('From' => $email_from, 'To' => $email_to, 'Subject' => $subject); $smtp = Mail::factory ('smtp', array ('host' => EMAIL_HOST, 'port' => EMAIL_PORT, 'auth' => true, 'username' => EMAIL_USERNAME, 'password' => EMAIL_PASSWORD)); $mail = $smtp->send ($email_to, $headers, $message); if (PEAR::isError ($mail)) return (FALSE);*/ if (defined ("DVL_ACTIVE")) return (TRUE); $headers = "MIME-Version: 1.0\r\n"; $headers .= "Content-type: text/html; charset=utf-8\r\n"; $headers .= "From: $email_from\r\n"; if (!empty ($bcc_to)) $headers .= "Bcc: $bcc_to\r\n"; $result = mail ($email_to, $subject, $message, $headers); return ($result); } ?>