<?php 

global $sugar_config;
$link = mysql_connect($sugar_config['dbconfig']['db_host_name'],$sugar_config['dbconfig']['db_user_name'],$sugar_config['dbconfig']['db_password']);
mysql_select_db('multicrm',$link); 
mysql_query("SET NAMES 'utf8'",$link);

	
		$z=mysql_query("show databases like 'pre%'",$link);
		while($d=mysql_fetch_array($z)){
		    mysql_select_db($d[0],$link);
		    mysql_query("SET NAMES 'utf8'",$link);

		    $zap=('insert into dom_lists (id,lang,dom_name,dom_lists.key,dom_lists.value) Values("'.create_guid().'","pl_pl","ecmproducts_group_ks_dom","1","Towar handlowy")');
    		
	mysql_query($zap,$link);
	$zap=('insert into dom_lists (id,lang,dom_name,dom_lists.key,dom_lists.value) Values("'.create_guid().'","pl_pl","ecmproducts_group_ks_dom","2","Wyrób gotowy")');
	
	mysql_query($zap,$link);
	$zap=('insert into dom_lists (id,lang,dom_name,dom_lists.key,dom_lists.value) Values("'.create_guid().'","pl_pl","ecmproducts_group_ks_dom","3","Usługi")');
	
	mysql_query($zap,$link);
			
    			//echo $zap;
    			mysql_query($zap,$link);
    			//mysql_query('delete from dom_lists',$link);
    
		}
	
	mysql_close($link);
	
/*
global $sugar_config;
$link = mysql_connect($sugar_config['dbconfig']['db_host_name'],$sugar_config['dbconfig']['db_user_name'],$sugar_config['dbconfig']['db_password']);
mysql_select_db('multicrm',$link);
mysql_query("SET NAMES 'utf8'",$link);


$z=mysql_query("show databases like 'pre%'",$link);
while($d=mysql_fetch_array($z)){
	echo "jest";
	mysql_select_db($d[0],$link);
	mysql_query("SET NAMES 'utf8'",$link);

	$zap="INSERT INTO `dom_lists` (`id`,`lang`,`dom_name`,`key`,`value`) values ('".create_guid()."','pl_pl','account_type_dom','rec','Odbiorca')";
	mysql_query($zap,$link);
				$zap="INSERT INTO `dom_lists` (`id`,`lang`,`dom_name`,`key`,`value`) values ('".create_guid()."','pl_pl','account_type_dom','sup','Dostawca')";
				mysql_query($zap,$link);

    
	//echo $zap;
	
	//mysql_query('delete from dom_lists',$link);

}

mysql_close($link);

	?>