<?
  if($_SERVER['HTTP_HOST'] == '127.0.0.1'){
		$conn = mysql_connect('localhost', $g_baza_user, $g_baza_user_pass);
		mysql_select_db($g_baza) or die("unable to select database");
		mysql_query("SET sql_mode = 'ALLOW_INVALID_DATES' ");
	}else{
		/*
		// fake register globals, if not set
		// or you can  user .htaccess to override this
		if(!ini_get('register_globals')){
			$types_to_register = array('GET','POST','COOKIE','SESSION','SERVER');
			foreach($types_to_register as $type){
				if(@count(${'_'.$type}) > 0){
					extract(${'_'.$type}, EXTR_OVERWRITE);
				}
			}
		}
		$HTTP_SERVER_VARS = $_SERVER;
		*/
		
		$conn = @mysql_connect('localhost', $g_baza_user, $g_baza_user_pass);
		@mysql_select_db($g_baza) or die("spajanje neuspjesno");
		//mysql_query("SET time_zone = '+1:00'; ");
	}
	mysql_query("SET NAMES 'utf8' ");
	
	
	$y1 = get_item('select value from settings where name = "putanja.abs" ');
	$y2 = get_item('select value from settings where name = "putanja.http" ');
	
	$g_path_res = $y1.'app/webroot/iso/res/';
	$g_path_sl = $y2.'app/webroot/iso/';
	$g_path_sl_outer = $y2;
	$g_path_sl_res = $g_path_sl.'res/';
	$g_logged_url = str_replace('http://', '', $y2);
?>