<?
	$r_firm=@mysql_query("SELECT * FROM firm WHERE id_akk='".$_SESSION['ID_P'][1]."'");
	if($r_firm && $_SESSION['ID_P'][1])
	{
	$nr_firm=mysql_num_rows($r_firm);
		if($nr_firm)
			{
			$rr_firm=mysql_fetch_array($r_firm);
			$data['firm'][1]=$rr_firm['zag'];
			$data['id_firm'][1]=$rr_firm['id'];
			$data['id_firm_catalog'][1]=$rr_firm['id_catalog'];
			}
		else
			{
			$data['firm'][1]='';
			$data['id_firm'][1]=0;
			$data['id_firm_catalog'][1]=0;
			}
	} 
?>