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
|
<?php require_once('Connections/ConnexionBoutiquedream.php'); ?>
<?php
if(!isset($_GET['rubriqueID'])) $_GET['rubriqueID']="";
if(!isset($_GET['transactionID'])) $_GET['transactionID']="2";
if(!isset($_GET['piecesID'])) $_GET['piecesID']="";
?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
$theValue = get_magic_quotes_gpc() ? stripslashes($theValue) : $theValue;
}
$theValue = function_exists("mysql_real_escape_string") ? mysql_real_escape_string($theValue) : mysql_escape_string($theValue);
switch ($theType) {
case "text":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "long":
case "int":
$theValue = ($theValue != "") ? intval($theValue) : "NULL";
break;
case "double":
$theValue = ($theValue != "") ? doubleval($theValue) : "NULL";
break;
case "date":
$theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL";
break;
case "defined":
$theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue;
break;
}
return $theValue;
}
}
mysql_select_db($database_ConnexionBoutiquedream, $ConnexionBoutiquedream);
$query_rsTheme = "SELECT * FROM rubriques ORDER BY theme ASC";
$rsTheme = mysql_query($query_rsTheme, $ConnexionBoutiquedream) or die(mysql_error());
$row_rsTheme = mysql_fetch_assoc($rsTheme);
$totalRows_rsTheme = mysql_num_rows($rsTheme);
$maxRows_rsCatalogue = 5;
$pageNum_rsCatalogue = 0;
if (isset($_GET['pageNum_rsCatalogue'])) {
$pageNum_rsCatalogue = $_GET['pageNum_rsCatalogue'];
}
$startRow_rsCatalogue = $pageNum_rsCatalogue * $maxRows_rsCatalogue;
$coltheme_rsCatalogue = "1";
if (isset($_GET['rubriqueID'])) {
$coltheme_rsCatalogue = $_GET['rubriqueID'];
}
$colsurface_rsCatalogue = "1";
if (isset($_GET['VARsurface'])) {
$colsurface_rsCatalogue = $_GET['VARsurface'];
}
$colnombre_rsCatalogue = "1";
if (isset($_GET['piecesID'])) {
$colnombre_rsCatalogue = $_GET['piecesID'];
}
$colbien_rsCatalogue = "1";
if (isset($_GET['transactionID'])) {
$colbien_rsCatalogue = $_GET['transactionID'];
}
mysql_select_db($database_ConnexionBoutiquedream, $ConnexionBoutiquedream);
$query_rsCatalogue = sprintf("SELECT a.rubriqueID , a.transactionID, a.piecesID, a.Surface, a.Reference, a.Libelle FROM appartements a WHERE a.rubriqueID =%s AND a.transactionID=%s AND a.piecesID=%s UNION ALL SELECT m.rubriqueID , m.transactionID, m.piecesID, m.Reference, m.Libelle FROM maisons m WHERE m.rubriqueID =%s AND m.transactionID=%s AND m.piecesID=%s , GetSQLValueString($coltheme_rsCatalogue, "int"),GetSQLValueString($colbien_rsCatalogue, "int"),GetSQLValueString($colnombre_rsCatalogue, "int"),GetSQLValueString($coltheme_rsCatalogue, "int"),GetSQLValueString($colbien_rsCatalogue, "int"),GetSQLValueString($colnombre_rsCatalogue, "int"));
$query_limit_rsCatalogue = sprintf("%s LIMIT %d, %d", $query_rsCatalogue, $startRow_rsCatalogue, $maxRows_rsCatalogue);
$rsCatalogue = mysql_query($query_limit_rsCatalogue, $ConnexionBoutiquedream) or die(mysql_error());
$row_rsCatalogue = mysql_fetch_assoc($rsCatalogue);
if (isset($_GET['totalRows_rsCatalogue'])) {
$totalRows_rsCatalogue = $_GET['totalRows_rsCatalogue'];
} else {
$all_rsCatalogue = mysql_query($query_rsCatalogue);
$totalRows_rsCatalogue = mysql_num_rows($all_rsCatalogue);
}
$totalPages_rsCatalogue = ceil($totalRows_rsCatalogue/$maxRows_rsCatalogue)-1;
mysql_select_db($database_ConnexionBoutiquedream, $ConnexionBoutiquedream);
$query_rsbien = "SELECT * FROM transactions ORDER BY bien ASC";
$rsbien = mysql_query($query_rsbien, $ConnexionBoutiquedream) or die(mysql_error());
$row_rsbien = mysql_fetch_assoc($rsbien);
$totalRows_rsbien = mysql_num_rows($rsbien);
mysql_select_db($database_ConnexionBoutiquedream, $ConnexionBoutiquedream);
$query_rsnombre = "SELECT * FROM pieces ORDER BY nombre ASC";
$rsnombre = mysql_query($query_rsnombre, $ConnexionBoutiquedream) or die(mysql_error());
$row_rsnombre = mysql_fetch_assoc($rsnombre);
$totalRows_rsnombre = mysql_num_rows($rsnombre);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<
<div class="content1">
<table width="100%" border="0">
<?php do { ?>
<tr>
<td><?php echo $row_rsCatalogue['Reference']; ?></td>
<td><?php echo $row_rsCatalogue['Libelle']; ?></td>
</tr>
<?php } while ($row_rsCatalogue = mysql_fetch_assoc($rsCatalogue)); ?>
</table>
</div>
<div class="sidebar2">
<form name="form1" method="get" action="">
<table width="100%" border="0" class="table5" >
<tr>
<td colspan="2" style="color:#FFF"><label>
<input <?php if (!(strcmp($_GET['transactionID'],"1"))) {echo "checked=\"checked\"";} ?> <?php if (!(strcmp($_GET['transactionID'],1))) {echo "checked=\"checked\"";} ?> type="radio" name="transactionID" value="1" id="transaction_0" />
Acheter</label></td>
<td colspan="2" style="color:#FFF"><label>
<input <?php if (!(strcmp($_GET['transactionID'],"2"))) {echo "checked=\"checked\"";} ?> type="radio" name="transactionID" value="2" id="transactionID_1" />
Louer</label></td>
</tr>
<tr>
<td colspan="4" style="color:#FFF"><span style="color:#e6e8e9; font-size:12px; font-weight:bold" >TYPE(S) DE BIENS</span></td>
</tr>
<tr>
<td colspan="2" style="color:#FFF"><label>
<input <?php if (!(strcmp($_GET['rubriqueID'],1))) {echo "checked=\"checked\"";} ?> type="checkbox" name="rubriqueID" value="1" id="rubriqueID_0" />
Appartement</label></td>
<td colspan="2" style="color:#FFF"><label>
<input type="checkbox" name="rubriqueID" value="2" id="rubriqueID_1" />
Maison</label></td>
</tr>
<tr>
<td style="color:#FFF"><label>
<input <?php if (!(strcmp($_GET['piecesID'],1))) {echo "checked=\"checked\"";} ?> type="checkbox" name="piecesID" value="1" id="piecesID_0" checked="checked"/>
T1</label></td>
<td style="color:#FFF"><label>
<input type="checkbox" name="piecesID" value="2" id="piecesID_1" />
T2</label></td>
<td style="color:#FFF"><label>
<input name="piecesID" type="checkbox" id="piecesID_2" value="3"/>
T3</label></td>
<td style="color:#FFF"><label>
<input name="piecesID" type="checkbox" id="piecesID_3" value="4"/>
T4</label></td>
</tr>
<tr>
<td style="color:#FFF"><label>
<input name="piecesID" type="checkbox" id="piecesID_4" value="5"/>
T5+</label></td>
<td> </td>
<td colspan="2"> </td>
</tr>
<tr>
<td colspan="4" align="center"><input type="submit" name="button" id="button" value="Rechercher" /></td>
</tr>
</table>
</form>
</div>
</body>
</html>
<?php
mysql_free_result($rsTheme);
mysql_free_result($rsCatalogue);
mysql_free_result($rsbien);
mysql_free_result($rsnombre);
?> |
Partager