<?PHP if(!empty($insightly_result) && $operation['type']=='profile'){ 	?>
		<div class="popover-content">
		   <div class="col-sm-12 line b-b line-lg pull-in"></div>
		   <br>
		   <div class="row m-b-sm">
			  <div class="col-sm-6">
				 <label class="font-bold m-r-sm"><?php echo $vis_language['TXTFIRSTNAME'];?></label>:
				 <label class="m-l-sm">
					<?php echo $insightly_result->FIRST_NAME; ?></span>
			  </div>
			  <div class="col-sm-6"><label class="font-bold m-r-sm"><?php echo $vis_language['TXTADDRESS'];?></label><label class="m-l-sm"><?php echo $insightly_result->ADDRESSES[0]->STREET; ?></span></div>
		   </div>
		   <div class="row m-b-sm">
			   <div class="col-sm-6"><label class="font-bold m-r-sm"><?php echo $vis_language['TXTLASTNAME'];?></label>:<label class="m-l-sm"><?php echo $insightly_result->LAST_NAME; ?></span></div>
			   <div class="col-sm-6"><label class="font-bold m-r-sm"><?php echo $vis_language['TXTCITY'];?></label>:<label class="m-l-sm"><?php echo $insightly_result->ADDRESSES[0]->CITY; ?></span></div>
		   </div>
		   <div class="row m-b-sm">
			   <div class="col-sm-6"><label class="font-bold m-r-sm"><?php echo $vis_language['TXTEMAIL'];?></label>:<label class="m-l-sm"><?php echo $insightly_result->CONTACTINFOS[0]->DETAIL; ?></span></div>
			   <div class="col-sm-6"><label class="font-bold m-r-sm"><?php echo $vis_language['TXTSTATE'];?></label>:<label class=" m-l-sm"><?php echo $insightly_result->ADDRESSES[0]->STATE; ?></span></div>
		   </div>
		   <div class="row m-b-sm">
			   <div class="col-sm-6"><label class="font-bold m-r-sm"><?php echo $vis_language['TXTCONTACTNUMBER'];?></label>:<label class="m-l-sm"><?php echo $insightly_result->CONTACTINFOS[1]->DETAIL; ?></span></div>
			   <div class="col-sm-6"><label class="font-bold m-r-sm"><?php echo $vis_language['TXTCOUNTRY'];?></label>:<label class=" m-l-sm"><?php echo $insightly_result->ADDRESSES[0]->COUNTRY; ?></span></div>
		   </div>
		   <div class="row m-b-sm">
			   <div class="col-sm-6"><label class="font-bold m-r-sm"><?php echo $vis_language['TXTROLE'];?></label>:<label class="m-l-sm"><?php echo $insightly_result->LINKS[0]->ROLE; ?></span></div>
			    <div class="col-sm-6"><label class="font-bold m-r-sm"><?php echo $vis_language['TXTZIPCODE'];?></label>:<label class="m-l-sm"><?php echo $insightly_result->ADDRESSES[0]->POSTCODE; ?></span></div>
		   </div>
		   <div class="row m-b-sm">
			   <div class="col-sm-6"><label class="font-bold m-r-sm"><?php echo $vis_language['TXTORGANIZATION'];?></label>:<label class="m-l-sm"><?php echo $insightly_result->ORGANISATION_NAME; ?></span></div>
			   <div class="col-sm-6"><label class="font-bold m-r-sm"><?php echo $vis_language['TXTORGANIZATIONEMAIL'];?></label>:<label class="m-l-sm"><?php echo $insightly_result->ORGANISATION_EMAIL; ?></span></div>
		   </div>
		</div>
	<? 
	}elseif(!empty($insightly_result) && $operation['type']=='notes' && isset($insightly_result[0]->TITLE)){ 
	$i=0; 
	foreach($insightly_result as $note_details) {?>
		<section id="vis_ticket_post_forms">
			<section id="vis_ticket_post_2">
				<section id="vis_ticket_post_area_2" class="panel panel-default pos-rlt clearfix m-b-md">
					<div class="panel-heading b-b b-light padder-v">
						<div class="btn-group pull-right">
							<div class="pull-left m-r-sm m-t-xs">
								<label>Created on</label>
								<span class="text-muted m-l-xs"><?php echo format_datetime(strtotime($insightly_result[$i]->DATE_CREATED_UTC)); ?> </span>
							</div>
							<div class="clear"></div>
						</div>
						<div>
							<a href="javascript:void(0);" class="link m-l-xs" title=""><?php echo $insightly_result[$i]->TITLE; ?> </a>
						</div>			
						<div class="m-r-sm m-b-xs">
							<span class="text-muted m-l-xs"><? echo $operation['vis_email'];?></span>
						</div>	
						<div class="clear"></div>
					</div>
					<div class="panel-body wrapper">			
						<div id="vis_ticket_post_content_div_2">
							<div id="vis_ticket_post_content_text_2" class="vis_max_img_size"><?php echo $insightly_result[$i]->BODY; ?></div>
							<div id="vis_ticket_post_content_edit_2"></div>
						</div>        
					</div>
				</section>
			</section>
		</section>
		<? $i++; } 
	}else include(VIS_PATH_TEMPLATE.'no_record_yet.php');?>