file php
[php]if (isset($_GET['id']) && eregi('^[0-9]+$', $_GET['id']))
{
$sql = 'SELECT title FROM ' . PROPERTIES_TABLE . ' WHERE approved = 1 AND id = ' . intval($_GET['id']) . ' LIMIT 1';
$r_title = $db->query ( $sql );
$f_title = $db->fetcharray ( $r_title );
}
$f = $db->fetcharray( $r );
// Starting a new template
$template = new Template;
$tpl = implode ('', file( PATH . '/templates/' . $cookie_template . '/tpl/property_detailed.tpl' ));
// Load listing short search results template
$template->load ( $tpl );
// Make all values in the array 'n/a' if empty
$f = array_map ( 'if_empty', $f);
$template->set ( 'dimensions', $f['dimensions'] );
$template->set ( 'bathrooms', $f['bathrooms'] );
$template->set ( 'half_bathrooms', $f['half_bathrooms'] );
$template->set ( 'bedrooms', $f['bedrooms'] );
$template->set ( 'soggiorno', $f['soggiorno'] );
include ( PATH . '/templates/' . $cookie_template . '/footer.php' );[/php]
file property_detailed.tpl
[php] <tr>
<td width="65%" valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td width="32%"><b><font color="#DD6900">{@price}:</font></b></td>
<td width="68%"><span class="price">{currency} {price} {@trattative_riservate}</span> </td>
</tr>
<tr>
<td><b><font color="#DD6900">{@type2}:</font></b></td>
<td>{type2}</td>
</tr>
<tr>
<td><b><font color="#DD6900">{@type}:</font></b></td>
<td>{type}</td>
</tr>
<tr>
<td><b><font color="#DD6900">{@style}:</font></b></td>
<td>{style}</td>
</tr>
<tr>
<td><b><font color="#DD6900">{@year_built}:</font></b></td>
<td>{year_built}</td>
</tr>
<tr>
<td valign="top"><b><font color="#DD6900">{@location}:</font></b></td>
<td>{address1} {address2} {city} {location} {zip}</td>
</tr>
<tr>
<td valign="top"><b><font color="#DD6900">{@directions}:</font></b></td>
<td>{directions}</td>
</tr>
</table>
</td>
</tr>
<tr>
<td><br><br>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td width="25%"><b><font color="#DD6900">{@bedrooms}:</font></b></td>
<td width="25%">{bedrooms} </td>
<td width="25%"><b><font color="#DD6900">{@soggiorno}:</font></b></td>
<td width="25%"><? if (!empty($f['soggiorno'])) { ?> {soggiorno} <br> <? } ?></td>
<td width="40%"><b><font color="#DD6900">{@half_bathrooms}:</font></b></td>
<td width="25%">{half_bathrooms}</td>
</tr>
<tr>
<td><b><font color="#DD6900">{@bathrooms}:</font></b></td>
<td>{bathrooms}</td>
<td><b><font color="#DD6900">{@lot_size}:</font></font></b></td>
<td>{lot_size} </td>
</tr>
<tr>
<td><b><font color="#DD6900">{@basement}:</font></b></td>
<td>{basement}</td>
<td><b><font color="#DD6900">{@dimensions}:</font></b></td>
<td>{dimensions}</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td><br><br>
<table width="100%" border="0" cellspacing="0" cellpadding="2">
</table><br><br>
</td>
</tr>
<tr>
<td>
<table cellspacing="0" cellpadding="0" border="0" width="100%">
<tr>
<td width="100%" style="border-top: 1px dotted
#BABABA;"><br>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td>{description}<br><br> </td>
</tr>
<tr>
<td>
</td>
</tr>
</table>[/php]