Hi
I’m confused about the following code. What it should do (and it does in PHP4) is show info from a template.
It starts with $i==‘1’, which is general info, if you click the ‘photo’ button it sets $i==‘2’ and should show that data. Again, it does that fine in PHP4, but not in PHP5.
Can anyone please help me out, I’m lost on this one
PM me if you need to see an online sample, I have two domains setup, one with PHP4 and one with PHP5, both runnng the same code.
The info page:
[php]
$a1[city], $a1[state], $a1[country] $a1[address] | ntPrice: $$MyPrice | n
Property ID: $a1[ListingID] $desc $a1[rooms] br, $a1[bathrooms] ba, $a1[garage] gr Neighbourhood: $a1[neighbourhood] $a1[SquareMeters] sq.m. Lot Size: $a1[LotSize] sq.m. Age: $a1[HomeAge] "; if($a1[fireplace] == 'y') { $ShowInfo .= "Fireplace n"; } if($a1[NearSchool] == 'y') { $ShowInfo .= "Near school n"; } if($a1[NearTransit] == 'y') { $ShowInfo .= "Near transit n"; } if($a1[NearPark] == 'y') { $ShowInfo .= "Near park n"; } if($a1[OceanView] == 'y') { $ShowInfo .= "Ocean view n"; } if($a1[LakeView] == 'y') { $ShowInfo .= "Lake view n"; } if($a1[MountainView] == 'y') { $ShowInfo .= "Mountain view n"; } if($a1[OceanWaterfront] == 'y') { $ShowInfo .= "Ocean waterfront n"; } if($a1[LakeWaterfront] == 'y') { $ShowInfo .= "Lake waterfront n"; } if($a1[RiverWaterfront] == 'y') { $ShowInfo .= "River waterfront n"; } if(!empty($a1[image])) { $im_array = explode("|", $a1[image]); $FirstImage = ""; } if($a1[AccountType] == '2') { if(!empty($a1[cellular])) { $int[] = "Cellular: $a1[cellular]"; } if(!empty($a1[pager])) { $int[] = "Pager: $a1[pager]"; } if(!empty($int)) { $int2 = implode(" ", $int); $int2 = " ".$int2; } } $ShowInfo .= " | nt$FirstImage For more information call $a1[FirstName] $a1[LastName] Phone: $a1[phone]$int2 or click here to email. "; if($a1[AccountType] == '1') { $ShowInfo .= "More properties by this agent "; } else { $ShowInfo .= "More properties by $a1[FirstName] $a1[LastName] "; } if($a1[AccountType] == '1') { if(!empty($a1[logo])) { $ShowInfo .= ""; } else { $ShowInfo .= "$a1[FirstName] $a1[LastName] Resume"; } } $ShowInfo .= " | n
edit | delete | n
"; while(list(,$v) = each($MyImages)) { $ShowInfo .= " nnt"; } $ShowInfo .= " |
"; if(!empty($f)) { $ShowInfo .= "
"; } else { $ShowInfo .= "
"; } // afbeeldingsgrootte wordt bepaald door class=plaatje in de headertemplate! } else { $ShowInfo .= "
"; } } else { $Image2 = "infobalk_02.gif"; } $MyAddress = str_replace(" ", "+", $a1[address]); $MyAddress = str_replace(",", "", $MyAddress); $Image3 = ""; //$Image3 = ""; $ListingID = $a1[ListingID]; require_once("templates/HeaderTemplate.php"); require_once("templates/InfoTemplate.php"); require_once("templates/FooterTemplate.php"); //update the stats $q1 = "update re2_listings set visits = visits + '1' where ListingID = '$_GET[id]' "; mysql_query($q1) or die(mysql_error()); ?>[/php]
and the template (that works perfectly in PHP4)
[code]
<?=$HomeViews?> | Tell a friend! | |
<?=$_LANG['GEGEVENS'];?> | <?=$_LANG['INFOFOTO'];?> | " target=_blank>Printer friendly version [/code] |