1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281
| <?php
require ( "admin/config.php" );
require ( "CGI.php" );
require ( "SQL.php" );
$cgi = new CGI ();
$sql = new SQL ( $DBusername, $DBpassword, $server, $database );
if ( ! $sql->isConnected () )
{
die ( $DatabaseError );
}
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Formulaire de recherche de l'agence All'Immo</title>
<LINK REL="STYLESHEET" HREF="style.css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<SCRIPT LANGUAGE="JavaScript">
<!-- Begin
var submitcount=0;
function reset() {
document.emailform.name.value="";
document.emailform.email.value="";
document.emailform.address.value="";
}
function checkFields() {
if (
(document.emailform.name.value=="") ||
(document.emailform.email.value=="") ||
(document.emailform.address.value==""))
{
alert("Remplisser votre nom, Email et les détails de votre demande.");
return false;
}
else
{
if (submitcount == 0)
{
submitcount++;
return true;
}
else
{
alert("Le formulaire a déjà été envoyé.");
return false;
}
}
}
function PopupImage(img) {
titre="Agrandissement";
w=open("",'image','width=400,height=400,toolbar=no,scrollbars=no,resizable=no');
w.document.write("<HTML><HEAD><TITLE>"+titre+"</TITLE></HEAD>");
w.document.write("<SCRIPT language=javascript>function checksize() { if (document.images[0].complete) { window.resizeTo(document.images[0].width+10,document.images[0].height+30); window.focus();} else { setTimeout('checksize()',250) } }</"+"SCRIPT>");
w.document.write("<BODY onload='checksize()' onblur='window.close()' onclick='window.close()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0>");
w.document.write("<TABLE width='100%' border='0' cellspacing='0' cellpadding='0' height='100%'><TR>");
w.document.write("<TD valign='middle' align='center'><IMG src='"+img+"' border=0 alt=' Image dans pop-up '>");
w.document.write("</TD></TR></TABLE>");
w.document.write("</BODY></HTML>");
w.document.close();
}
// End --></SCRIPT>
<style type="text/css">
<!--
.Style1 {font-size: 18px}
.Style2 {font-size: 16px; }
-->
</style>
</head>
<body background="boutons/French/fondjaune.JPG">
<?php
if ( $cgi->getValue ( "op" ) == "SendInformationRequest" )
{
$yoursubject = "Demande d'information sur le bien Ref: " .
$cgi->getValue ( "propertyref" );
$emailtext = "
-----------------------------------------------------------------------------
Demande d'information sur un bien
-----------------------------------------------------------------------------
Un visiteur du site web souhaite plus de renseignement.
DETAILS DU BIEN
Référence du bien : " . $cgi->getValue ( "propertyref" ) . "
Addresse du bien: " . $cgi->getValue ( "propertyaddress" ) . " " .
$cgi->getValue ( "propertylocation" ) . "
Prix du bien: " . $CurrencyUnit . $cgi->getValue ( "propertyprice" ) . "
DETAILS DE LA DEMANDE
Nom : " . $cgi->getValue ( "name" ) . "
Email: " . $cgi->getValue ( "email" ) . "
" . $cgi->getValue ( "address" ) . "
________________________________
Fin du mail
";
$yoursubject = stripslashes ( $yoursubject );
$emailtext = stripslashes ( $emailtext );
@mail ( $cgi->getValue ( "adminemailaddress" ), $yoursubject, $emailtext,
"From: " . $cgi->getValue ( "email" ) );
?>
<br><br><br><p align=center><font size="-1"><b>Merci pour votre demande d'informations.</b><br>La demande a bien été envoyé.</font></p>
<br><br><p align=center>Prenez le temps de continuer a visiter notre site web.</p><br>
<p align="center">[<a href="?op=search&pt=&pp=2000000&pb=0">Voir tous nos biens</a>]</p><br><br>
<?php
exit ();
}
if ( $cgi->getValue ( "op" ) == "mi" )
{
?>
<?php
$cgi = new CGI ();
$sql = new SQL ( $DBusername, $DBpassword, $server, $database );
if ( ! $sql->isConnected () )
{
die ( $DatabaseError );
}
$layoutId = $cgi->getValue ( "id" );
//$rows = $sql->execute ( "SELECT * FROM " . $property_table . "
//
//WHERE id=" .
//$sql->quote ( $layoutId ) . " AND propertyshow=1 LIMIT 1",
//SQL_RETURN_ASSOC );
$rows = $sql->execute ( "SELECT
p.id AS id,
p.propertyprice AS propertyprice,
p.propertyaddress AS propertyaddress,
pl.propertylocation AS propertylocation,
pt.propertytype AS propertytype,
p.propertyref AS propertyref,
p.propertypieces AS propertypieces,
p.propertysurface AS propertysurface,
p.propertysituation AS propertysituation,
p.propertyexposition AS propertyexposition,
p.propertyannee AS propertyannee,
p.propertysurfaceterrain AS propertysurfaceterrain,
p.propertynatureterrain AS propertynatureterrain,
p.propertydependance AS propertydependance,
p.propertychauffage AS propertychauffage,
p.propertygeneral AS propertygeneral,
p.propertybedrooms AS propertybedrooms,
p.propertyphoto1 AS propertyphoto1,
p.propertyphoto2 AS propertyphoto2,
p.propertyphoto3 AS propertyphoto3,
p.propertyphoto4 AS propertyphoto4,
p.shortdescription AS shortdescription,
p.longdescription AS longdescription
FROM
" . $property_table . " p
INNER JOIN
" . $propertytypes_table . " pt ON (p.propertytype=pt.id)
INNER JOIN
" . $propertylocations_table . " pl ON (p.propertylocation=pl.id)
WHERE p.id=" .
$sql->quote ( $layoutId ) . " AND p.propertyshow=1 LIMIT 1",
SQL_RETURN_ASSOC )or die('requete =>'.$rows.'<br>
error->'.mysql_error());;
$row = $rows [ 0 ];
$Price = number_format ( $row [ 'propertyprice' ], 0, ".", " " );
$sql->execute ( "UPDATE " . $property_table .
" SET propertyviews=(propertyviews + 1) WHERE id=" .
$sql->quote ( $layoutId ) . " LIMIT 1" );
?><center><p><br>Vous avez souhaité voir plus d'informations concernant ce bien </b><br></br>
<b><a href="search_.php" class="Style1">Retourner au formulaire de recherche</a></b></p>
</center><br><br>
<TABLE WIDTH="100%" CELLPADDING="10" CELLSPACING="5">
<TR VALIGN="TOP">
<TD VALIGN="TOP" ALIGN="LEFT">
<TD VALIGN="TOP" ALIGN="LEFT" bgcolor="#FFFFFF">
<P ALIGN="CENTER"><a
href="javascript:history.go(-1)"><img src="<?php echo $ImageURLFrench;
?>retour.gif" border="0"></a> <a href="#CONTACT"><img
src="<?php echo $ImageURLFrench; ?>demande_information.gif" border="0"></a> </p>
<br>
<P ALIGN="CENTER">
<?php
if ( ! $row [ 'propertyphoto1' ] )
{
?><img src="<?php echo $ImageURLFrench; ?>no_image.jpg" height="<?php
echo $ShowImageHeight; ?>" width="<?php echo $ShowImageWidth; ?>"><?php
}
else
{
?>
<a href="javascript:PopupImage('http://www.allimmo.fr/agence/photos/<?php echo $row['propertyphoto1']; ?>')"><img src="http://www.allimmo.fr/agence/photos/<?php echo $row['propertyphoto1']; ?> " height="<?php echo $ShowImageHeight; ?>" width="<?php echo $ShowImageWidth; ?>"border="0" alt="Cliquer pour agrandir" /></a>
<?php
}
if ( ! $row [ 'propertyphoto2' ] )
{
?><?php
}
else
{
?>
<a href="javascript:PopupImage('http://www.allimmo.fr/agence/photos/<?php echo $row['propertyphoto2']; ?>')"><img src="http://www.allimmo.fr/agence/photos/<?php echo $row['propertyphoto2']; ?> " height="<?php echo $ShowImageHeight; ?>" width="<?php echo $ShowImageWidth; ?>"border="0" alt="Cliquer pour agrandir" /></a>
<?php
}
if ( ! $row [ 'propertyphoto3' ] )
{
?><?php
}
else
{
?>
<a href="javascript:PopupImage('http://www.allimmo.fr/agence/photos/<?php echo $row['propertyphoto3']; ?>')"><img src="http://www.allimmo.fr/agence/photos/<?php echo $row['propertyphoto3']; ?> " height="<?php echo $ShowImageHeight; ?>" width="<?php echo $ShowImageWidth; ?>"border="0" alt="Cliquer pour agrandir" /></a>
<?php
}
if ( ! $row [ 'propertyphoto4' ] )
{
?><?php
}
else
{
?><a href="javascript:PopupImage('http://www.allimmo.fr/agence/photos/<?php echo $row['propertyphoto4']; ?>')"><img src="http://www.allimmo.fr/agence/photos/<?php echo $row['propertyphoto4']; ?> " height="<?php echo $ShowImageHeight; ?>" width="<?php echo $ShowImageWidth; ?>"border="0" alt="Cliquer pour agrandir" /></a>
<?php
}
?><p></P></br>
<hr>
<P class="Style2" >
Référence du bien : <strong><?php echo $row [ "propertyref" ]; ?></strong><br>
Prix : <strong><?php echo $Price; ?> <?php echo $CurrencyUnit; ?></strong><BR>
Type de bien : <strong><?php echo $row [ "propertytype" ];?></strong><BR>
Chambres : <strong><?php echo $row [ "propertybedrooms" ]; ?></strong><BR>
Type : <strong><?php echo $row [ "propertypieces" ]; ?></strong><BR>
Surface habitable : <strong><?php echo $row [ "propertysurface" ];?></strong> m²<BR>
Situation : <strong><?php echo $row [ "propertysituation" ]; ?></strong><BR>
Exposition : <strong><?php echo $row [ "propertyexposition" ];?></strong><BR>
Année de construction : <strong><?php echo $row [ "propertyannee" ];?></strong><BR>
Surface du terrain : <strong><?php echo $row [ "propertysurfaceterrain" ];?></strong> m²<BR>
Nature du terrain : <strong><?php echo $row [ "propertynatureterrain" ];?></strong><BR>
Dépendance : <strong><?php echo $row [ "propertydependance" ];?></strong><BR>
Type de chauffage : <strong><?php echo $row [ "propertychauffage" ];?></strong><BR>
Etat général du bien : <strong><?php echo $row [ "propertygeneral" ];?></strong><BR>
Contact : <strong><?php echo $row [ "propertyaddress" ]?></strong> </P>
<?php echo nl2br($row [ "longdescription" ]); ?><br>
<P>
<?php
$compteur = mysql_query("SELECT * FROM pm_properties WHERE page = $page")or die(mysql_error(error));
$donnees = mysql_fetch_array($compteur);
$hit = $donnees['propertyviews'];
echo $hit; ?>
</P> |