$main_tbl_class = 'main_tbl_wide';
			
		    foreach($suppliers_data['data'] as $item){
			    if($curViewType == 'wide'){
					$str = 'нет данных';
					$activities=isset($suppliers_expanded_data[$item['id']]['activities'])?$suppliers_expanded_data[$item['id']]['activities'][0]:$str;
					$contacts=isset($suppliers_expanded_data[$item['id']]['contacts'])?$suppliers_expanded_data[$item['id']]['contacts'][0]:$str;
					$phones = isset($suppliers_expanded_data[$item['id']]['phones'])? $suppliers_expanded_data[$item['id']]['phones'][0]:$str;
					$emails = isset($suppliers_expanded_data[$item['id']]['emails'])? $suppliers_expanded_data[$item['id']]['emails'][0]:$str;
					$dop_data = isset($suppliers_expanded_data[$item['id']]['dop_data'])? $suppliers_expanded_data[$item['id']]['dop_data'][0]:$str;	
					
					$activities_full_list = make_drop_down_list(@$suppliers_expanded_data[$item['id']]['activities']);
					$contacts_full_list = make_drop_down_list(@$suppliers_expanded_data[$item['id']]['contacts']);
					$phones_full_list = make_drop_down_list(@$suppliers_expanded_data[$item['id']]['phones']);
					$emails_full_list = make_drop_down_list(@$suppliers_expanded_data[$item['id']]['emails']);
					$dop_data_full_list = make_drop_down_list(@$suppliers_expanded_data[$item['id']]['dop_data']);
					
					$activities_class = ($activities_full_list != '')?'roll':'';
					$contacts_class = ($contacts_full_list != '')?'roll':'';
					$phones_class = ($phones_full_list != '')?'roll':'';
					$emails_class = ($emails_full_list != '')?'roll':'';
					$dop_data_class = ($dop_data_full_list != '')?'roll':'';
					
					$activities_click = ($activities_full_list != '')?'onclick="openCloseMenu(event,\'subjectsList\');"':'';
					$contacts_click = ($contacts_full_list != '')?'onclick="openCloseMenu(event,\'subjectsList\');"':'';
					$phones_click = ($phones_full_list != '')?'onclick="openCloseMenu(event,\'subjectsList\');"':'';
					$emails_click = ($emails_full_list != '')?'onclick="openCloseMenu(event,\'subjectsList\');"':'';
					$dop_data_click = ($dop_data_full_list != '')?'onclick="openCloseMenu(event,\'subjectsList\');"':'';
				 }
				 if($curViewType == 'expanded'){
					$str = 'нет данных';
							$no_use_for_client_href = ' onclick="echo_message_js(\'Вы не можете просматривать в чужого клиента.\');return false;" ';
						}
						
					}
					// $phones = (isset($client_expanded_data[$item['id']]['phones']))? $client_expanded_data[$item['id']]['phones'][0]:$str;
					// $emails = (isset($client_expanded_data[$item['id']]['emails']))? $client_expanded_data[$item['id']]['emails'][0]:$str;
					// $contacts=(isset($client_expanded_data[$item['id']]['contacts']))?$client_expanded_data[$item['id']]['contacts'][0]:$str;
					
					$curators_full_list = make_drop_down_list(@$client_expanded_data[$item['id']]['curators']);
					$contacts_full_list = '';
					$phones_full_list = '';
					$emails_full_list = '';
					if($user_status != 1 && isset($client_expanded_data[$item['id']]['curators_id']) && (in_array($user_id,$client_expanded_data[$item['id']]['curators_id']))){
						$contacts_full_list = make_drop_down_list(@$client_expanded_data[$item['id']]['contacts']);
						$phones_full_list = make_drop_down_list(@$client_expanded_data[$item['id']]['phones']);
						$emails_full_list = make_drop_down_list(@$client_expanded_data[$item['id']]['emails']);	
					}
					
					
					$curators_class = ($curators_full_list != '')?'roll':'';
					$contacts_class = ($contacts_full_list != '')?'roll':'';
					$phones_class = ($phones_full_list != '')?'roll':'';
					$emails_class = ($emails_full_list != '')?'roll':'';
					
					$curators_click = ($curators_full_list != '')?'onclick="openCloseMenu(event,\'subjectsList\');"':'';
					$contacts_click = ($contacts_full_list != '')?'onclick="openCloseMenu(event,\'subjectsList\');"':'';
					$phones_click = ($phones_full_list != '')?'onclick="openCloseMenu(event,\'subjectsList\');"':'';
					$emails_click = ($emails_full_list != '')?'onclick="openCloseMenu(event,\'subjectsList\');"':'';
				}
				if($curViewType == 'expanded'){