<?php require_once('Connections/conbanca.php'); ?>
<?php
if(!isset($_GET['field'])){ $_GET['field']='Id';
}
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
if (PHP_VERSION < 6) {
}
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;
}
}
$currentPage = $_SERVER["PHP_SELF"];
$maxRows_Recordset1 = 10;
$pageNum_Recordset1 = 0;
if (isset($_GET['pageNum_Recordset1'])) { $pageNum_Recordset1 = $_GET['pageNum_Recordset1'];
}
$startRow_Recordset1 = $pageNum_Recordset1 * $maxRows_Recordset1;
$colname_Recordset1 = "-1";
if (isset($_GET['ciudad'])) { $colname_Recordset1 = $_GET['ciudad'];
}
$colpara_Recordset1 = "-1";
if (isset($_GET['zona'])) { $colpara_Recordset1 = $_GET['zona'];
}
$coltype_Recordset1 = "-1";
if (isset($_GET['tipo'])) { $coltype_Recordset1 = $_GET['tipo'];
}
$colrang_Recordset1 = "-1";
if (isset($_GET['rango'])) { $colrang_Recordset1 = $_GET['rango'];
}
$query_Recordset1 = sprintf("SELECT inmuebles.foto_a, inmuebles.foto_b, inmuebles.foto_c, inmuebles.foto_d, inmuebles.foto_e, inmuebles.foto_f, inmuebles.ciudad, inmuebles.zona, inmuebles.barrio, inmuebles.direccion, inmuebles.tipo, inmuebles.valor, inmuebles.rango, inmuebles.area, inmuebles.habitaciones, inmuebles.codigo_inm, inmuebles.obs FROM inmuebles WHERE inmuebles.ciudad LIKE %s AND inmuebles.zona LIKE %s AND inmuebles.tipo LIKE %s AND inmuebles.rango LIKE %s ORDER BY" .$_GET['field']." ".$_GET['order'];, GetSQLValueString
($colname_Recordset1, "text"),GetSQLValueString
($colpara_Recordset1, "text"),GetSQLValueString
($coltype_Recordset1, "text"),GetSQLValueString
($colrang_Recordset1, "text")); $query_limit_Recordset1 = sprintf("%s LIMIT %d, %d", $query_Recordset1, $startRow_Recordset1, $maxRows_Recordset1);
if (isset($_GET['totalRows_Recordset1'])) { $totalRows_Recordset1 = $_GET['totalRows_Recordset1'];
} else {
}
$totalPages_Recordset1 = ceil($totalRows_Recordset1/$maxRows_Recordset1)-1;
$queryString_Recordset1 = "";
if (!empty($_SERVER['QUERY_STRING'])) { $params = explode("&", $_SERVER['QUERY_STRING']); foreach ($params as $param) {
if (stristr($param, "pageNum_Recordset1") == false && stristr($param, "totalRows_Recordset1") == false) { }
}
if (count($newParams) != 0) { }
}
$queryString_Recordset1 = sprintf("&totalRows_Recordset1=%d%s", $totalRows_Recordset1, $queryString_Recordset1); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0014)about:internet -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>BANCA CENTRAL INMOBILIARIA CONVIERTA SU ARRIENDO EN CASA PROPIA!!!</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">td img {display: block;}body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
</style>
<!--Fireworks CS3 Dreamweaver CS3 target. Created Sun Aug 08 21:13:53 GMT-0500 2010-->
<script language="JavaScript1.2" type="text/javascript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
//-->
</script>
<link href="imgs/bacanciSt.css" rel="stylesheet" type="text/css" />
</head>
<body>
<table width="100%" border="0" cellspacing="0" cellpadding="3">
<tr>
<td width="219"><img src="imgs/Página 1.jpg" width="219" height="31" /></td>
<td colspan="2"><table width="10%" border="0" align="right" cellpadding="0" cellspacing="0">
<tr>
<td nowrap="nowrap"><span class="textoN">Usted encontro </span><span class="encabN"><?php echo $totalRows_Recordset1 ?> <?php echo $row_Recordset1['tipo']; ?></span></td>
</tr>
</table></td>
</tr>
<tr>
<td height="40"><table width="10%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td nowrap="nowrap" class="textoN">Registros
<?php echo ($startRow_Recordset1 + 1) ?> a
<?php echo min($startRow_Recordset1 + $maxRows_Recordset1, $totalRows_Recordset1) ?> de
<?php echo $totalRows_Recordset1 ?></td>
</tr>
</table></td>
<td width="450"><form id="form1" name="form1" method="get" action="result2.php">
<label>
<select name="field" id="field">
<option>Seleccione un campo</option>
<option value="fecha">fecha</option>
<option value="barrio">barrio</option>
<option value="direccion">direccion</option>
<option value="codigo_inm">codigo_inm</option>
</select>
</label>
<label>
<select name="order" id="order" method="get">
<option selected="selected">Orden</option>
<option value="ASC">Ascendente</option>
<option value="DESC">Descendente</option>
</select>
</label>
<label>
<input type="submit" name="button" id="button" value="Enviar" />
</label>
</form></td>
<td width="213"><table border="0" align="right">
<tr>
<td><?php if ($pageNum_Recordset1 > 0) { // Show if not first page ?>
<a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, 0, $queryString_Recordset1); ?>"><img src="First.gif" border="0" /></a>
<?php } // Show if not first page ?></td>
<td><?php if ($pageNum_Recordset1 > 0) { // Show if not first page ?>
<a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, max(0, $pageNum_Recordset1 - 1), $queryString_Recordset1); ?>"><img src="Previous.gif" border="0" /></a>
<?php } // Show if not first page ?></td>
<td><?php if ($pageNum_Recordset1 < $totalPages_Recordset1) { // Show if not last page ?>
<a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, min($totalPages_Recordset1, $pageNum_Recordset1 + 1), $queryString_Recordset1); ?>"><img src="Next.gif" border="0" /></a>
<?php } // Show if not last page ?></td>
<td><?php if ($pageNum_Recordset1 < $totalPages_Recordset1) { // Show if not last page ?>
<a href="<?php printf("%s?pageNum_Recordset1=%d%s", $currentPage, $totalPages_Recordset1, $queryString_Recordset1); ?>"><img src="Last.gif" border="0" /></a>
<?php } // Show if not last page ?></td>
</tr>
</table></td>
</tr>
</table>
<?php do { ?>
<table width="100%" border="0" cellpadding="3" cellspacing="0" class="contmapa">
<tr>
<td width="152" rowspan="3" valign="top" bgcolor="#85C226"><a href="result3.php?codigo_inm=<?php echo $row_Recordset1['codigo_inm']; ?>"><img src="photos/<?php echo $row_Recordset1['foto_a']; ?>" width="152" height="100" border="0" /></a></td>
<td nowrap="nowrap" bgcolor="#85C226" class="encabN">Barrio</td>
<td nowrap="nowrap" bgcolor="#85C226" class="encabN">Valor venta</td>
<td nowrap="nowrap" bgcolor="#85C226" class="encabN">Area</td>
<td nowrap="nowrap" bgcolor="#85C226" class="encabN">Habit.</td>
<td nowrap="nowrap" bgcolor="#85C226" class="encabN">Código</td>
<td align="center" bgcolor="#FFFFFF"> </td>
</tr>
<tr>
<td nowrap="nowrap" bgcolor="#FFFFFF" class="textoN"><?php echo $row_Recordset1['barrio']; ?></td>
<td nowrap="nowrap" bgcolor="#FFFFFF" class="textoN">$ <?php echo $row_Recordset1['valor']; ?></td>
<td nowrap="nowrap" bgcolor="#FFFFFF" class="textoN"><?php echo $row_Recordset1['area']; ?> mts2</td>
<td nowrap="nowrap" bgcolor="#FFFFFF" class="textoN"><?php echo $row_Recordset1['habitaciones']; ?></td>
<td nowrap="nowrap" bgcolor="#FFFFFF" class="textoN"><?php echo $row_Recordset1['codigo_inm']; ?></td>
<td align="center" bgcolor="#FFFFFF"> </td>
</tr>
<tr class="textoN">
<td colspan="5" valign="top" bgcolor="#FFFFFF" class="linSup">mm</td>
<td align="center" bgcolor="#FFFFFF"><table width="10%" border="0" align="center" cellpadding="0" cellspacing="0">
<tr>
<td><a href="result3.php?codigo_inm=<?php echo $row_Recordset1['codigo_inm']; ?>"><img src="imgs/ingresar.png" width="100" height="25" border="0" /></a></td>
</tr>
</table></td>
</tr>
</table>
<br />
</body>
</html>
<?php
?>