Heray-Was-Here
Server : Apache
System : Linux hybrid3195.ca.ns.planethoster.net 3.10.0-1160.119.1.el7.tuxcare.els19.x86_64 #1 SMP Mon Mar 31 17:29:00 UTC 2025 x86_64
User : alliancerealtynb ( 1004)
PHP Version : 7.4.33
Disable Function : noop
Directory :  /home/alliancerealtynb/avantmaj.alliancerealty.nb.ca/adminAR/files/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : /home/alliancerealtynb/avantmaj.alliancerealty.nb.ca/adminAR/files/Comparable.php
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Print</title>
	<link rel=STYLESHEET href="fs2.css" type="text/css">
	<style>
		@media print {
		  h2 { 
			font-size:16px;
			page-break-before: always;
		  }

		}
	</style>
	
	<script>
                window.print(); //this triggers the print
				
				var mediaQueryList = window.matchMedia('print');
				mediaQueryList.addListener(function(mql) {
					if (mql.matches) {
						
					} else {
						window.close();
					}
				});
	</script>
</head>

<body>
<?php
	require_once 'config.php';
	//setlocale(LC_MONETARY, 'en_US');
	setlocale(LC_MONETARY, 'en_CA');
	$Path = '../../';
	
	$ID = $_REQUEST['ID'];
	
	$query = "SELECT p.*, i.parent_id, i.item_name, CONCAT(u.first_name, ' ', u.last_name) AS Agent,
		Concat(coalesce(c.first_name, ''), ' ', c.last_name) AS Owner, field_3193 AS Buyer
		FROM `wp_wpl_properties` p
		LEFT JOIN `wp_wpl_items` i ON p.id = i.parent_id
		LEFT JOIN wp_wpl_users u ON p.user_id = u.id
		LEFT JOIN wp_wpl_addon_crm_contacts c ON p.field_3006 = c.id
		WHERE parent_id=".$ID." ORDER BY i.id LIMIT 1";

	$result = mysqli_query($mysqli, $query) or die("SQL Error 1: " . mysqli_error());

	while ($row = mysqli_fetch_array($result, MYSQLI_ASSOC)) {
		$add_date = date("Y-m-d",strtotime($row['add_date']));
		$add_date2 = new DateTime($row['add_date']);
		$closing_date = date("Y-m-d",strtotime($row['field_3121']));
		$closing_date2 = new DateTime($row['field_3121']);
		$DiffDate = $closing_date2->diff($add_date2)->format("%a");
			
		$Seller = mb_convert_encoding($row['Owner'], "UTF-8", "HTML-ENTITIES");
		$Buyer = mb_convert_encoding($row['Buyer'], "UTF-8", "HTML-ENTITIES");

			
		$img = $Path."/wp-content/uploads/WPL/".$row['parent_id']."/".$row['item_name'];
		$addressFR = $row['field_313_en_us'];
		$code_postal = $row['location_text'];
		$Dwelling = $row['field_3065'];

		if ($row['n_3048'] == 1) {$neighborhood = 'Edmundston North';}
			elseif ($row['n_3046'] == 1) {$neighborhood = 'Edmundston Centre';}
			elseif ($row['n_3047'] == 1) {$neighborhood = 'Edmundston East';}
			elseif ($row['n_3049'] == 1) {$neighborhood = 'Edmundston West';}
			elseif ($row['n_3051'] == 1) {$neighborhood = 'St-Basile';}
			elseif ($row['n_3053'] == 1) {$neighborhood = 'St-Jacques';}
			elseif ($row['n_3050'] == 1) {$neighborhood = 'Rivière Verte';}
			elseif ($row['n_3056'] == 1) {$neighborhood = 'Upper Madawaska';}
			elseif ($row['n_3054'] == 1) {$neighborhood = 'St-Joseph';}
			elseif ($row['n_3055'] == 1) {$neighborhood = 'Ste-Anne-de-Madawaska';}
			elseif ($row['n_3058'] == 1) {$neighborhood = 'St-Leonard';}
			elseif ($row['n_3052'] == 1) {$neighborhood = 'St-Hilaire';}
			elseif ($row['n_3045'] == 1) {$neighborhood = 'Baker Lake';}
			elseif ($row['n_3059'] == 1) {$neighborhood = 'Verret';}
			elseif ($row['n_3057'] == 1) {$neighborhood = 'Lower Madawaska';}
			else { $neighborhood = 'Not available';}

		$Agent = $row['Agent'];
		$MLS = $row['field_3015'];
		
		if ($Dwelling == 1) {$DwellingFR  = 'Bungalow';}
			elseif ($Dwelling == 2) {$DwellingFR = 'Split Entry';}
			elseif ($Dwelling == 3) {$DwellingFR = 'Split Level';}
			elseif ($Dwelling == 4) {$DwellingFR = '1 1/2 Story';}
			elseif ($Dwelling == 5) {$DwellingFR = '2 Story';}
			elseif ($Dwelling == 6) {$DwellingFR  = '2 1/2 Story';}
			elseif ($Dwelling == 7) {$DwellingFR  = 'Semi-Detached';}
			elseif ($Dwelling == 8) {$DwellingFR  = 'Duplex';}
			elseif ($Dwelling == 9) {$DwellingFR  = 'Trailer House';}
			elseif ($Dwelling == 10) {$DwellingFR  = 'Mini-Home';}
			elseif ($Dwelling == 11) {$DwellingFR  = 'Condo / Town House';}
			elseif ($Dwelling == 12) {$DwellingFR  = 'Vacant Lot';}
			elseif ($Dwelling == 13) {$DwellingFR  = 'Multi Apt Complex';}
			elseif ($Dwelling == 14) {$DwellingFR  = 'A-Frame';}
			elseif ($Dwelling == 15) {$DwellingFR  = 'Appartment';}
			elseif ($Dwelling == 31) {$DwellingFR  = 'Other';}
			elseif ($Dwelling == 32) {$DwellingFR  = 'Cottage / Camp';}
			elseif ($Dwelling == 33) {$DwellingFR  = 'Commercial';}
			else {$DwellingFR  = 'Not available';}

		$LotSize = mb_convert_encoding($row['field_3119_en_us'], "UTF-8", "HTML-ENTITIES");
		if ($LotSize == '')
		{
			$LotSizeFR = 'Not available';
		}	
		else
		{
			$LotSizeFR = '±'.$LotSize;
		}
		
		if ($row['field_3195'] == '1') 
		{
			$LotSizeFR = $LotSizeFR ." (Rented Lot)";
		}

		
		$Service = $row['field_3086'];			
		if ($Service == 1) {$ServiceFR = 'Municipal';}
		elseif ($Service == 2) {$ServiceFR = 'Private';}
		elseif ($Service == 3) {$ServiceFR = 'Park';}
		elseif ($Service == 4) {$ServiceFR = 'No service';}	
		else { $ServiceFR = 'Not available';}
				
		$Zonage = $row['field_3192'];	
		if ($Zonage == 1) {$ZonageFR = 'Residential';}
		elseif ($Zonage == 2) {$ZonageFR = 'Rural';}
		elseif ($Zonage == 3) {$ZonageFR = 'Commercial';}	
		
		$ListingType = $row['listing'];
		if ($ListingType == 9) {$ListingTypeFR = 'Property Taxes';}	
		else { $ListingTypeFR = 'Security Deposit';}	
		

		$PlusTVH = $row['field_3169'];
		if ($PlusTVH == 1 && $ListingType == 9) {$PriceHeaderFR = 'Price (plus HST)';}	
		elseif ($PlusTVH == 0 && $ListingType == 9) { $PriceHeaderFR = 'Price';}	
		
		$InitialPrice = $row['field_3115'];
		if ($PlusTVH == 1 && $ListingType == 9) {$PriceHeaderFR = 'Price (plus HST)';}	
		elseif ($PlusTVH == 0 && $ListingType == 9) { $PriceHeaderFR = 'Price';}	
		else { $PriceHeaderFR = 'Cost';}

				
		$Assessed = $row['field_3197'];
		if ($Assessed > 0) {$AssessedFR = '$'.number_format($Assessed, 0, '.', ',');}	
		else {$AssessedFR = 'Not available';}	

		
		$PropertyTax =$row['field_3173'];
		if ($PropertyTax > 0) {$PropertyTaxFR = '$'.number_format($PropertyTax, 0, '.', ',');}	
		else {$PropertyTaxFR = 'Not available';}
		$SecurityDeposite = $row['field_3168'];
		if ($ListingType == 10 && $SecurityDeposite > 0) {$SecurityDepositeFR = '$'.number_format($SecurityDeposite, 0, '.', ',');}	

	
		$ActualPrice = $row['price'];
		$RentValue = $row['field_3167'];
		if ($ActualPrice > 0 && $ListingType == 9 && $ActualPrice < $InitialPrice) {$ActualPriceFR = '$'.number_format($InitialPrice, 0, '.', ',').' reduced to  $'.number_format($ActualPrice, 0, '.', ',');}	
		elseif ($ActualPrice > 0 && $ListingType == 9 && $ActualPrice == $InitialPrice) {$ActualPriceFR = '$'.number_format($ActualPrice, 0, '.', ',');}
		elseif ($ActualPrice > 0 && $ListingType == 10) {$ActualPriceFR = '$'.number_format($RentValue, 0, '.', ',').' $/month';}

		
		
		
		$HouseSizeFR = mb_convert_encoding($row['field_3120_en_us'], "UTF-8", "HTML-ENTITIES");
		if ($HouseSizeFR == '') 	
		{
			$HouseSizeFR = 'Not available';
		}	
		else
		{
			$HouseSizeFR = '±'.$HouseSizeFR;
		}	


		$DwellingAge = $row['build_year'];
		if ($DwellingAge == 0) 
		{
			$DwellingAge = 'Not available';
		}
		else
		{
			$DwellingAge = '±'.$DwellingAge;
		}
		
		
		
		
		$Basement = $row['field_3067'];
		if ($Basement == 1) {$BasementFR = 'Finished';}
		elseif ($Basement == 2) {$BasementFR = 'Partially finished';}
		elseif ($Basement == 3) {$BasementFR = 'Unfinished';}
		elseif ($Basement == 4) {$BasementFR = 'Crawlspace';}
		elseif ($Basement == 5) {$BasementFR = 'Other';}
		elseif ($Basement == 6) {$BasementFR = 'None';}
		else {$BasementFR = 'Not available';}
					
		
		$Roofing = $row['field_3073'];
		$RoofingFR = $row['field_3074_en_us'];
		$RoofingOtherFR = $row['field_3113_en_us'];
		if ($Roofing == 2) {$RoofingFR = "Asphalt shingle";}
		elseif ($Roofing == 3) {$RoofingFR = 'Tar - Gravel';}
		elseif ($Roofing == 4) {$RoofingFR = 'Metal roof';}
		elseif ($Roofing == 5) {$RoofingFR = 'Wood shingle';}
		elseif ($Roofing == 6) {$RoofingFR = $RoofingOtherFR;}
		else {$RoofingFR = 'Not available';}
		
		
		
		
		
		
		$Garage = $row['field_3072'];
		$GarageDescFR = mb_convert_encoding($row['field_3071_en_us'], "UTF-8", "HTML-ENTITIES");
		if ($Garage == 1) {$GarageFR = "Not available";}
		elseif ($Garage == 7) {$GarageFR = 'None';}
		elseif ($Garage == 2) {$GarageFR = 'Attached';}
		elseif ($Garage == 3) {$GarageFR = 'Detached';}
		if ($GarageDescFR <> '') {$GarageFR = $GarageFR. ' ('.$GarageDescFR.')';}




		$CarportDescFR = mb_convert_encoding($row['field_3180_en_us'], "UTF-8", "HTML-ENTITIES");
		if ($CarportDescFR == "") {$CarportDescFR = "None";}
		elseif ($CarportDescFR == 'NULL') {$CarportDescFR = "None";}
		
		$Driveway = $row['field_3070'];
		if ($Driveway == 1) {$DrivewayFR = "Not available";}
		elseif ($Driveway == 2) {$DrivewayFR = 'Paved';}
		elseif ($Driveway == 3) {$DrivewayFR = 'Gravel';}
		elseif ($Driveway == 5) {$DrivewayFR = 'Crushed stone';}
		elseif ($Driveway == 6) {$DrivewayFR = 'Interlocked';}
		elseif ($Driveway == 7) {$DrivewayFR = 'Concrete';}
		elseif ($Driveway == 4) {$DrivewayFR = 'Gravel - Paved';}
		elseif ($Driveway == 8) {$DrivewayFR = 'Other';}
		

		$Siding = $row['field_3075'];
		$SidingDescFR = $row['field_3076_en_us'];
		if ($Siding == 1) {$SidingFR = "Not available";}
		elseif ($Siding == 2) {$SidingFR = 'Wood';}
		elseif ($Siding == 3) {$SidingFR = 'Masonite';}
		elseif ($Siding == 4) {$SidingFR = 'Vinyl';}
		elseif ($Siding == 5) {$SidingFR = 'Aluminium';}
		elseif ($Siding == 6) {$SidingFR = 'Steel';}
		elseif ($Siding == 7) {$SidingFR = 'Stucco';}
		elseif ($Siding == 8) {$SidingFR = 'Brick';}
		elseif ($Siding == 9) {$SidingFR = 'Stone';}
		elseif ($Siding == 11) {$SidingFR = 'Brick/Vinyl';}
		elseif ($Siding == 14) {$SidingFR = 'Stucco/Vinyl';}
		elseif ($Siding == 18) {$SidingFR = 'Vinyl/Other';}
		elseif ($Siding == 15) {$SidingFR = 'Canaxel';}
		elseif ($Siding == 16) {$SidingFR = 'Canaxel/Other';}
		elseif ($Siding == 12) {$SidingFR = 'Brique/Other';}
		elseif ($Siding == 17) {$SidingFR = $SidingDescFR;}
		elseif ($Siding == 10) {$SidingFR = 'Stone/Canaxel';}
		elseif ($Siding == 13) {$SidingFR = 'Stucco/Masonite';}

		
		$Windows = $row['field_3077'];
		$WindowsDescFR = $row['field_3117_en_us'];
		if ($Windows == 1) {$WindowsFR = "Not available";}
		elseif ($Windows == 6) {$WindowsFR = 'PVC';}
		elseif ($Windows == 8) {$WindowsFR = 'Wood';}
		elseif ($Windows == 7) {$WindowsFR = 'PVC/Wood';}
		elseif ($Windows == 2) {$WindowsFR = 'Aluminium';}
		elseif ($Windows == 3) {$WindowsFR = 'Aluminium/PVC';}
		elseif ($Windows == 4) {$WindowsFR = 'Aluminium/Wood';}
		elseif ($Windows == 5) {$WindowsFR = 'Aluminium/Wood/PVC';}
		elseif ($Windows == 9) {$WindowsFR = $WindowsDescFR;}

		
		$Chimney = $row['field_3078'];
		if ($Chimney == 1 || $Chimney == -1) {$ChimneyFR = "Not available";}
		elseif ($Chimney == 2) {$ChimneyFR = 'Brick';}
		elseif ($Chimney == 3) {$ChimneyFR = 'Cement Block';}
		elseif ($Chimney == 4) {$ChimneyFR = 'Metal';}
		elseif ($Chimney == 5) {$ChimneyFR = 'Selkirk';}
		elseif ($Chimney == 6) {$ChimneyFR = 'Stone';}
		elseif ($Chimney == 7) {$ChimneyFR = 'Other';}
		elseif ($Chimney == 8) {$ChimneyFR = 'None';}

		
		$Bedrooms = mb_convert_encoding($row['field_3171'], "UTF-8", "HTML-ENTITIES");		
		$Bathrooms = mb_convert_encoding($row['field_3172'], "UTF-8", "HTML-ENTITIES");
		
		
		$Floor = $row['field_3082_en_us'];
		if ($Floor == "") {$FloorFR = "Not available";}
		else {$FloorFR = $Floor;}
	
		
		
		$Plumbing = $row['field_3079'];
		$PlumbingDescFR = $row['field_3080_en_us'];
		if ($Plumbing == 1 || $Plumbing == "") {$PlumbingFR = "Not available";}
		elseif ($Plumbing == 2) {$PlumbingFR = 'ABS - Copper';}
		elseif ($Plumbing == 4) {$PlumbingFR = 'ABS - PEX';}
		elseif ($Plumbing == 3) {$PlumbingFR = 'Mixed';}
		elseif ($Plumbing == 5) {$PlumbingFR = $PlumbingDescFR;}
		elseif ($Plumbing == 8) {$PlumbingFR = 'ABS - PEX - Copper';}
		elseif ($Plumbing == 7) {$PlumbingFR = 'PEX';}		
		//echo '======='.$row['field_3079'];	
		
		$Wiring = $row['field_3084'];
		if ($Wiring == 6) {$WiringFR = "Not available";}
		elseif ($Wiring == 1) {$WiringFR = '100 + 60 Amps';}
		elseif ($Wiring == 2) {$WiringFR = '100 Amps';}
		elseif ($Wiring == 3) {$WiringFR = '125 Amps';}
		elseif ($Wiring == 4) {$WiringFR = '100 + 200 Amps';}
		elseif ($Wiring == 5) {$WiringFR = '200 Amps';}
		elseif ($Wiring == 7) {$WiringFR = 'Other';}
					
		$Wiring2 = $row['field_3112'];
		if ($Wiring2 == 1 || $Wiring2 == -1) {$Wiring2FR = "Not available";}
		elseif ($Wiring2 == 2) {$Wiring2FR = 'Breakers';}
		elseif ($Wiring2 == 3) {$Wiring2FR = 'Fuses';}
		elseif ($Wiring2 == 'NULL') {$Wiring2FR = '';}
		

		if ($Wiring != 6 && $Wiring2 > 1) {$WiringDescFR = $WiringFR ."(".$Wiring2FR.")";}
		elseif ($Wiring != 6 && $Wiring2 == 1) {$WiringDescFR = $WiringFR;}
		elseif ($Wiring == 6 && $Wiring2 > 1) {$WiringDescFR = $Wiring2FR;}
		elseif ($Wiring == '' && $Wiring2FR == 'Not available') {$WiringDescFR = "Not available";}
		elseif ($Wiring != '' && $Wiring2 == '') {$WiringDescFR = $WiringFR;}
		
		
		$HeatingDesc = $row['field_3081_en_us'];
		if ($HeatingDesc == "") {$HeatingDescFR = "Not available";}
		else {$HeatingDescFR = $HeatingDesc;}		
		
		
		$Sunroom = $row['field_3181'];
		if ($Sunroom == 2) {$SunroomFR = '3 seasons';}
		elseif ($Sunroom == 3) {$SunroomFR = '4 seasons';}
		elseif ($Sunroom == 1) {$SunroomFR = "Not available";}
		elseif ($Sunroom == 4) {$SunroomFR = "None";}
		
		$AirConditioningType = $row['field_3182'];
		if ($AirConditioningType == 1 || $AirConditioningType == '') {$AirConditioningTypeFR = 'Not available';}
		elseif ($AirConditioningType == 2) {$AirConditioningTypeFR = 'Central';}
		elseif ($AirConditioningType == 3) {$AirConditioningTypeFR = "Wall mounted";}
		elseif ($AirConditioningType == 4) {$AirConditioningTypeFR = "None";}
		elseif ($AirConditioningType == 5) {$AirConditioningTypeFR = "Yes";}
		
		
		$ItemsFR = $row['field_3017_en_us'];

		
		
		$CommentsFR =  mb_convert_encoding($row['field_308_en_us'], "UTF-8", "HTML-ENTITIES");
		$RentRemarksFR =  mb_convert_encoding($row['field_3118_en_us'], "UTF-8", "HTML-ENTITIES");
		$Banner = "";
if ($row['sp_featured'] == 1) {$Banner = "sold_en.png";}
		if ($row['sp_hot'] == 1) {$Banner = "price_reduced_en.png";}
		//if ($row['sp_openhouse'] == 1) {$Banner = "Spéciales";}
		if ($row['field_3126'] == 1) {$Banner = "10000_reduction_en.png";}
		if ($row['field_3127'] == 1) {$Banner = "35000_reduction_en.png";}
		if ($row['field_3128'] == 1) {$Banner = "3_bedrooms_en.png";}
		if ($row['field_3129'] == 1) {$Banner = "4_bedrooms_en.png";}
		if ($row['field_3130'] == 1) {$Banner = "season_cottage_en.png";}
		if ($row['field_3131'] == 1) {$Banner = "big_lot_en.png";}
		if ($row['field_3132'] == 1) {$Banner = "cashback_en.png";}
		if ($row['field_3133'] == 1) {$Banner = "cathedral_ceiling_en.png";}
		if ($row['field_3134'] == 1) {$Banner = "close_services_en.png";}
		if ($row['field_3135'] == 1) {$Banner = "cottage_en.png";}
		if ($row['field_3136'] == 1) {$Banner = "duplex_en.png";}
		if ($row['field_3137'] == 1) {$Banner = "fireplace_en.png";}
		if ($row['field_3138'] == 1) {$Banner = "foreclosed property_en.png";}
		if ($row['field_3139'] == 1) {$Banner = "time_market_en.png";}
		if ($row['field_3140'] == 1) {$Banner = "quick_sale_en.png";}
		if ($row['field_3141'] == 1) {$Banner = "handyman_special_en.png";}
		if ($row['field_3142'] == 1) {$Banner = "high_quality_en.png";}
		if ($row['field_3143'] == 1) {$Banner = "impeccable_en.png";}
		if ($row['field_3144'] == 1) {$Banner = "investor_en.png";}
		if ($row['field_3145'] == 1) {$Banner = "country_en.png";}
		if ($row['field_3146'] == 1) {$Banner = "renovations_en.png";}
		if ($row['field_3147'] == 1) {$Banner = "near_university_en.png";}
		if ($row['field_3148'] == 1) {$Banner = "negociable_en.png";}
		if ($row['field_3149'] == 1) {$Banner = "new_construction_en.png";}
		if ($row['field_3150'] == 1) {$Banner = "new_listing_en.png";}
		if ($row['field_3151'] == 1) {$Banner = "panoramic_view_en.png";}
		if ($row['field_3152'] == 1) {$Banner = "pool_en.png";}
		if ($row['field_3153'] == 1) {$Banner = "pre-inspected_en.png";}
		if ($row['field_3154'] == 1) {$Banner = "prestigious_property_en.png";}
		if ($row['field_3155'] == 1) {$Banner = "price_revised_en.png";}
		if ($row['field_3156'] == 1) {$Banner = "renovated_en.png";}
		if ($row['field_3157'] == 1) {$Banner = "revenu_en.png";}
		if ($row['field_3158'] == 1) {$Banner = "riverside_property_en.png";}
		if ($row['field_3159'] == 1) {$Banner = "spacious_property_en.png";}
		if ($row['field_3160'] == 1) {$Banner = "transfer_en.png";}
		if ($row['field_3161'] == 1) {$Banner = "unique_en.png";}
		if ($row['field_3162'] == 1) {$Banner = "urgent_en.png";}
		if ($row['field_3163'] == 1) {$Banner = "vacant_lot_en.png";}
		if ($row['field_3164'] == 1) {$Banner = "view_river_en.png";}
		if ($row['field_3165'] == 1) {$Banner = "waterfront_en.png";}		
		
		
		
}//while	


echo '<div align="center" style="display:block;width:100%;margin-bottom:10px;"><table class="defaulttable" border="0" cellspacing="0" cellpadding="0">';
echo '<tr><td align="left" VALIGN="middle">';



if ($Banner <> "")
{
	echo '<div style="float:left;"><img src="../../wp-content/uploads/Banners/'.$Banner.'" style="position:absolute;margin-top:1;margin-left:2;width:180px;z-index:100;" /></div>';
}




	
if ($img <> "") 
{
	echo '<img src="'.$img.'" width="380" style="border-spacing: 0; border: 2px solid #999; border-radius: 10px;" alt="">';
}
else
{
	'<div align="center">Image not available</div>';
}
	
		
echo '<div align="center"><b>'. mb_convert_encoding($addressFR, "UTF-8", "HTML-ENTITIES").', '.$code_postal.'</b><br>';

echo '<b>Neighborhood: '.$neighborhood.'</b><br></div>';
						 
echo '</td>
<TD>&nbsp;&nbsp;&nbsp;</TD>
<TD ALIGN="left" VALIGN="top" class="texte"><div style="display:block;background-color:#000;color:white;padding:5px;text-align:center;font-size:14px;font-weight:700;">List: '.$add_date.'<br>
 Sold: '.$closing_date.'<br>
 Price: $'.number_format($ActualPrice, 0, '.', ',').' ('.$DiffDate.' days)<br></div><br>
 <div align="center"><img src="'.$Path.'/wp-content/uploads/2021/06/AllianceRealtyLogo.png" width="130"  alt="" border="0">
<p style="font-size:10px;margin-bottom:20px;"><b>385, Victoria Street<BR>Edmundston NB, E3V 2K3<br>
http://www.alliancerealty.nb.ca</b></p></div>';

if ($Agent == 'Hermance Mercure Laplante')
{	
	echo '<span style="font-size:14px;"><b>Hermance Mercure Laplante</b></span><br>';
}

if ($Agent == 'Julien Laplante')
{	
	echo '<span style="font-size:14px;"><b>Julien Laplante</b></span><br>';
}

if ($Agent == 'Alain Violette')
{	
	echo '<span style="font-size:10px;"><b>Alain Violette</b></span><br>';
}

echo '<br>
<img src="'.$Path.'/wp-content/uploads/2021/06/logo_realtor.gif" width="35" alt="Realtor" border="0" ALIGN="left">';

if ($MLS <> '')
{	
	echo '<div style="text-align:center; margin-top:-3px;">&nbsp;&nbsp;<img src="'.$Path.'/wp-content/uploads/2021/01/mls.gif" width="50" alt="MLS" border="0" align="center">
	<p style="text-align:center; margin-top:-10px;"><b>N<sup>o</sup>: '.$MLS.'</b></p></div>';
}
	
echo '</TD></tr>
	</TABLE></div>';	
	


echo '<div align="center" style="display:block;width:600px;margin:auto;"><table align="center" style="width:100%;">';
///Si terrain
if ($Dwelling == 12)
{	
	echo '<thead><tr><th colspan="3" ALIGN="center" style="padding:2px;"><span style="font-size:16px;color:white;">PROPERTY SPECIFICATIONS</span></th></tr></thead>
	<tbody><tr><td WIDTH="33%" style="text-align:center;padding:2px;"><b>Lot size</b></TD>';
	
	echo '<td WIDTH="33%" style=" text-align:center;padding:2px;"><b>Services (Water & Sewage)</b></TD>
	<td WIDTH="33%" style=" text-align:center;padding:2px;"><b>Zonage</b></TD></TR>';

	echo '<tr><td style="text-align:center;padding:2px;">'.$LotSizeFR.'</td>';

	echo '<td style="text-align:center;padding:2px;">';
	echo $ServiceFR.'</TD>';

	echo '<td style="text-align:center;padding:2px;">'.$ZonageFR.'</TD></TR>';



	echo '<TR><td style="text-align:center;padding:2px;"><b>Assessed value</b></td>
	<td style="text-align:center;padding:2px;"><b>'.$ListingTypeFR.'</b></td>
	<td style="text-align:center;padding:2px;"><b>'.$PriceHeaderFR.'</b></td></tr>';

	echo '<tr><td style="text-align:center;padding:2px;">'.$AssessedFR.'</td>';
	echo '<td style="text-align:center;padding:2px;">'.($ListingType !== '' ?  $PropertyTaxFR : $SecurityDepositeFR).'</td>';
	echo '<td style="text-align:center;padding:2px;">'.$ActualPriceFR.'</td></TR></tbody>';

}

else	
{	
	echo '<tr><th colspan="3" style="padding:2px;"><span style="font-size:16px;color:white;">PROPERTY SPECIFICATIONS</span></th></tr>';
	echo '<tbody><tr><td WIDTH="33%" style="text-align:center;padding:2px;"><b>Type of dwelling</b></td>
	<td style="text-align:center;padding:2px;"><b>House size</b></td>
	<td style="text-align:center;padding:2px;"><b>Lot size</b></td></tr>';
	echo '<tr><td style="text-align:center;padding:2px;">'.$DwellingFR.'</td>';

	echo '<td style="text-align:center;padding:2px;">'.$HouseSizeFR.'</td>';

	echo '<td style="text-align:center;padding:2px;">'.$LotSizeFR.'</td></tr>';




////// RANGÉE 2

	echo '<tr><td WIDTH="33%" style="text-align:center;padding:2px;"><b>Age of Dwelling</b></td>
	<td style="text-align:center;padding:2px;"><b>Services (Water & Sewage)</b></td>
	<td style="text-align:center;padding:2px;"><b>Roofing</b></td></tr>';

	echo '<tr><td style="text-align:center;padding:2px;">'.$DwellingAge.'</td>';
	echo '<td style="text-align:center;padding:2px;">'.$ServiceFR.'</td>';
	echo '<td style="text-align:center;padding:2px;">'.$RoofingFR.'</td></tr>';


////// RANGÉE 3 --->
	echo '<tr><td style="text-align:center;padding:2px;"><b>Driveway</b></TD>
			<td style="text-align:center;padding:2px;"><b>Garage</b></TD>
			<td style="text-align:center;padding:2px;"><b>Carport</b></TD></TR>';    

	echo '<tr><td style="text-align:center;padding:2px;">'.$DrivewayFR.'</td>';	
	echo '<td style="text-align:center;padding:2px;">'.$GarageFR.'</td>';

	echo '<td style="text-align:center;padding:2px;">'.$CarportDescFR.'</td></tr>';



//////// RANGÉE 4 
	echo '<tr><td style="text-align:center;padding:2px;"><b>Siding</b></td>
		<td style="text-align:center;padding:2px;"><b>Window</b></td>
		<td style="text-align:center;padding:2px;"><b>Chimney</b></td></tr>'; 

	echo '<td style="text-align:center;padding:2px;">'.$SidingFR.'</td>';
	echo '<td style="text-align:center;padding:2px;">'.$WindowsFR.'</td>';
	echo '<td style="text-align:center;padding:2px;">'.$ChimneyFR.'</td></tr>';
	
				
			
////// RANGÉE 5 --->
	echo '<tr><td style="text-align:center;padding:2px;"><b>Assessed Value</b></td>
		<td style="text-align:center;padding:2px;"><b>'.$ListingTypeFR.'</b></td>
		<td style="text-align:center;padding:2px;"><b>'.$PriceHeaderFR.'</b></td></tr>'; 

	echo '<td style="text-align:center;padding:2px;">'.$AssessedFR.'</td>';
	echo '<td style="text-align:center;padding:2px;">'.($ListingType !== '' ?  $PropertyTaxFR : $SecurityDepositeFR).'</td>';
	echo '<td style="text-align:center;padding:2px;">'.$ActualPriceFR.'</td></tr>';	
	//echo '</tbody></table>';

	

	


	
	
	
	
	
	
////////////////INTÉRIEUR
	echo '<tr><th colspan="3" ALIGN="center" style="background: #890D05; padding:4px;font-size:16px;color:white;margin-top:5px;padding:2px;">INTERIOR</th></tr>
	<tbody><tr><td style="text-align:center;padding:2px;"><b>Number of bedrooms</b></td>';
	echo '<td style="text-align:center;padding:2px;"><b>Number of bathrooms</b></td>';
	echo '<td style="text-align:center;padding:2px;"><b>Floor</b></td></tr>';	
	
	echo '<tr><td style="text-align:center;padding:2px;">'.($Bedrooms !== '' ?  $Bedrooms : "Not available").'</TD>';
	echo '<td style="text-align:center;padding:2px;">'.($Bathrooms !== '' ?  $Bathrooms : "Not available").'</td>';
	echo '<td style="text-align:center;padding:2px;">'.($FloorFR !== '' ?  mb_convert_encoding($FloorFR, "UTF-8", "HTML-ENTITIES") : "Not available").'</td></tr>';


////////// RANGÉE 2
	echo '<tr><td style="text-align:center;padding:2px;"><b>Plumbing</b></td>';
	echo '<td style="text-align:center;padding:2px;"><b>Wiring</b></td>';
	echo '<td style="text-align:center;padding:2px;"><b>Type of heating</b></td></tr>';

	echo '<tr><td style="text-align:center;padding:2px;">'.$PlumbingFR.'</td>';
	echo '<td style="text-align:center;padding:2px;">'.$WiringDescFR.'</td>';
	echo '<td style="text-align:center;padding:2px;">'.($HeatingDescFR !== '' ?  mb_convert_encoding($HeatingDescFR, "UTF-8", "HTML-ENTITIES") : "Not available").'</td></tr>';

////////// RANGÉE 3
	echo '<tr><td style="text-align:center;padding:2px;"><b>Basement</b></td>';
	echo '<td style="text-align:center;padding:2px;"><b>Solarium</b></td>';
	echo '<td style="text-align:center;padding:2px;"><b>Air conditioning type</b></td></tr>';

	echo '<tr><td style="text-align:center;padding:2px;">'.$BasementFR.'</td>';
	echo '<td style="text-align:center;padding:2px;">'.$SunroomFR.'</td>';
	echo '<td style="text-align:center;padding:2px;">'.$AirConditioningTypeFR.'</td></tr>';





	if ($ItemsFR <> '')
	{	
		echo '<tr><th colspan="3" style="background: #890D05; padding:4px;font-size:16px;color:white;padding:2px;">INCLUDED ITEMS</th></tr>
		<tr><td colspan="3" style="padding:2px;">'.mb_convert_encoding($ItemsFR, "UTF-8", "HTML-ENTITIES").'</td></TR>';
	}

	if ($CommentsFR <> '' || $RentRemarksFR <> '')
	{	
		echo '<tr><th colspan="3" ALIGN="center"style="background: #890D05; padding:4px;font-size:16px;color:white;padding:2px;">REMARKS</th></tr>';
		echo '<tr><td colspan="3" style="padding:2px;text-align=justify">'.($ListingType == 9 ?  $CommentsFR :  $RentRemarksFR).'</td></TR>';
	}	
}
echo '</table><p style="font-size:10px;">Information is believed to be accurate but accuracy is not guaranteed.</p></div>';

	
	
echo "<h2>Seller: ".$Seller."<br><br>
Buyer: ".$Buyer."</h2>";


?>	
</body>
</html>

Hry