<?
	header("Content-Type: text/html; charset=utf-8");
	
	$g_path = '../../my/';
	
	include $g_path."u_globals.php";
	include $g_path."html/f.php";
	include $g_path."u_spoj_na_bazu.php";
	
	include $g_path."u_headers.php";
	
	$x = sql_exe("delete from organizacijska_shema_drustva where guid = '".$_GET['value']."' ");
	$l_err = mysql_errno();
	
	//echo mysql_errno() . ": " . mysql_error() . "\n<br><br>";
	//print "delete from organizacijska_shema_drustva where guid = '".$_GET['value']."' <br>";
	
	
	if($x){
			print "deleted";
	}else{
		if($l_err == 1451){
			print "foreign_key";
		}else{
			print "error";
		}
	}
	
?>
