<?
include_once('../connect/connect.php');
include_once("../lib/lib.php");
$id_catalog=intval($_GET['id_catalog']);

if($id_catalog)
{
if(file_exists('../cashe_catalog/_svod_catalog_'.$id_catalog.'.php'))
include_once('../cashe_catalog/_svod_catalog_'.$id_catalog.'.php');

if(file_exists('../plugin/board/func_add.php'))
include_once('../plugin/board/func_add.php'); 

if(file_exists('../plugin/board/index.php'))
include_once('../plugin/board/index.php');

if($arr_sp)
	{
	foreach($arr_sp as $ars)
		{
		if(file_exists('../cashe_n/_svod_element_'.$ars[0].'.php'))
		include_once('../cashe_n/_svod_element_'.$ars[0].'.php');
		
		if(file_exists('../cashe_n/_svod_element_two_'.$ars[1].'.php'))
		include_once('../cashe_n/_svod_element_two_'.$ars[1].'.php');
		}
	}


if($arr_field)
	{
	echo '<table cellpadding="1" cellspacing="1" width=100%>';
	foreach($arr_field as $ar_fi)
		{
		if($ar_fi['spec']=='st' || $ar_fi['spec']=='sp')
			{
			eval("field_func_".$ar_fi['field_typ']." ('add', \$ar_fi, \$data[\$ar_fi['field_field']]);");
			}
		}
	echo '</table>';
	}
}
?>