<?
////////////// - tinytext- /////////////////
function field_func_view_1 ($d, $arr, $data, $data_two='')
{
	$v2 = $data;

	if($d=='view')
	{
	if(!$arr['field_name_no'])
	$v1 = $arr['field_name'].':';
	echo $v1.' '.$v2;
	}
	
	if($d=='view_tab')
	{
	echo $v2;
	}
	
	
	if($d=='view_idv')
	{
	if(!$arr['field_no'])
	$v1 = $arr['field'].':';
	echo '<tr><td valign=top width=50%>'.$v1.'</td><td>'.$v2.'</td></tr>';
	}
	
	if($d=='opis')
	{
	if(!$arr['field_no'])
	$v1 = $arr['field'].': ';
	return $v1.$v2;
	}
	
	if($d=='zag')
	{
	return $v2;
	}
}

//////////// - числовое - ///////////////////
function field_func_view_3 ($d, $arr, $data, $data_two='', $suff='')
{
	$v2 = $data;
	
	if($d=='view_tab')
	{
	echo _font($v2, $arr['field_format']);
	}
	
	if($d=='view_idv')
	{
	if(!$arr['field_no'])
	$v1 = $arr['field'].':';
	echo '<tr><td valign=top width=50%>'.$v1.'</td><td>'._font($v2, $arr['field_format']).'</td></tr>';
	}
	
	if($d=='opis')
	{
	if(!$arr['field_no'])
	$v1 = $arr['field'].': ';
	return $v1.$v2;
	}
	
	if($d=='zag')
	{
	return $v2;
	}
}
//////////// - цена - ///////////////////
function field_func_view_31 ($d, $arr, $data, $data_two='', $suff='')
{
	global $rru;
	
	$v2 = $data;
	
	if($d=='view_tab')
	{
	echo _font($v2, $arr['field_format'], 1);
	}
	
	if($d=='view_idv')
	{
	if(!$arr['field_no'])
		{
		$v1 = $arr['field'].', '.$rru['cena_valuta'];
		if($suff)
		$v1 .= ' '.$suff;
		elseif ($arr['field_suff'])
		$v1 .= ' '.$arr['field_suff'];
		$v1 .=':';
		}
	echo '<tr><td valign=top width=50%>'.$v1.'</td><td>'._font($v2, $arr['field_format'], 1).'</td></tr>';
	}
	
	if($d=='opis')
	{
	if(!$arr['field_no'])
	$v1 = $arr['field'].': ';
	return $v1.$v2;
	}
	
	if($d=='zag')
	{
	if($v2)
		{
		$va = _font($v2, 0, 0, $arr['field_znak']).' '.$rru['cena_valuta'];
		if($suff)
		$va .= ' '.$suff;
		elseif ($arr['field_suff'])
		$va .= ' '.$arr['field_suff'];
		return $va;
		}		
	else return '';
	}
}
//////////// - Этаж - ///////////////////
function field_func_view_32 ($d, $arr, $data, $data_two='', $suff='')
{
	$v2 .= $data.'/'.$data_two;

	$arr['field']=explode("|", $arr['field']);

	if($d=='view_tab')
	{
	echo $v2;
	}
	
	if($d=='view_idv')
	{
	if(!$arr['field_no'])
	$v1 = $arr['field'][0].':';
	echo '<tr><td valign=top width=50%>'.$v1.'</td><td>'.$v2.'</td></tr>';
	}
	
	if($d=='opis')
	{
	if(!$arr['field_no'])
	$v1 = $arr['field'][0].': ';
	return $v1.$v2;
	}
	
	if($d=='zag')
	{
	return $v2;
	}
}


//////////// - числовой список - ///////////////////
function field_func_view_4 ($d, $arr, $data, $data_two='', $suff='')
{
	$v2 = $data;
	
	if($d=='view_tab')
	{
	echo _font($v2, $arr['field_format'], 0, $arr['field_znak']);
	}
	
	if($d=='view_idv')
	{
	if(!$arr['field_no'])
	$v1 = $arr['field'].':';
	echo '<tr><td valign=top width=50%>'.$v1.'</td><td>'._font($v2, $arr['field_format'], 0, $arr['field_znak']).'</td></tr>';
	}
	
	if($d=='opis')
	{
	if(!$arr['field_no'])
	$v1 = $arr['field'].': ';
	return $v1.$v2;
	}
	
	if($d=='zag')
	{
	return _font($v2, 0, 0, $arr['field_znak']);
	}
}

/////////////// - список - /////////////////
function field_func_view_5 ($d, $arr, $data, $data_two='', $suff='')
{
	global $arr_element;
	global $arr_element_fon;
	global $arr_element_text;

	$v2 .= $arr_element[$arr['field_spisok']][$data];
	
	if($d=='view_tab')
	{
	if($arr_element_fon[$arr['field_spisok']][$data])
	echo '<div style=" width:30px; height:20px; border:1px; border: solid 1px #272727; background-color:'.$arr_element_fon[$arr['field_spisok']][$data].'"></div>';
	else
	echo $v2;
	}
	
	if($d=='view_idv')
	{
	if(!$arr['field_no'])
	$v1 = $arr['field'].':';
	echo '<tr><td valign=top width=50%>'.$v1.'</td><td>'.$v2.'</td></tr>';
	}
	
	if($d=='opis')
	{
	if(!$arr['field_no'])
	$v1 = $arr['field'].': ';
	return $v1.$v2;
	}
	
	if($d=='zag')
	{
	return $v2;
	}
}
/////////////// - двойной список - /////////////////
function field_func_view_7 ($d, $arr, $data, $data_two='', $suff='')
{
	global $arr_element;
	global $arr_element_two;
	
	$v2 .= $arr_element[$arr['field_spisok']][$data];
	if($data_two)
	$v2 .= ' '.$arr_element_two[$data][$data_two];
	
	if($d=='view_tab')
	{
	echo $v2;
	}
	
	if($d=='view_idv')
	{
	if(!$arr['field_no'])
	$v1 = $arr['field'].':';
	echo '<tr><td valign=top width=50%>'.$v1.'</td><td>'.$v2.'</td></tr>';
	}
	
	if($d=='opis')
	{
	if(!$arr['field_no'])
	$v1 = $arr['field'].': ';
	return $v1.$v2;
	}
	
	if($d=='zag')
	{
	return $v2;
	}
}

////////////// - URL- /////////////////
function field_func_view_9 ($d, $arr, $data, $data_two='')
{
	$v2 .= '<noindex><a target=_blank rel="nofollow" href="http://'.$data.'">http://'.$data.'</a></noindex>';

	if($d=='view')
	{
	if(!$arr['field_name_no'])
	$v1 = $arr['field_name'].':';
	echo $v1.' '.$v2;
	}
	
	if($d=='view_tab')
	{
	echo $v2;
	}
	
	if($d=='view_idv')
	{
	if(!$arr['field_no'])
	$v1 = $arr['field'].':';
	echo '<tr><td valign=top width=50%>'.$v1.'</td><td>'.$v2.'</td></tr>';
	}
	
	if($d=='opis')
	{
	if(!$arr['field_no'])
	$v1 = $arr['field'].': ';
	return $v1.$v2;
	}
}

?>