Viewing file: mapa.php (3.39 KB) -rw-rw-rw- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php require_once('Connections/oab.php'); ?>
<?php
if (!function_exists("GetSQLValueString")) {
function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "")
{
$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_oab, $oab);
$query_rsLocal = "SELECT nombre, mapa_peq, mapa_grande FROM localidades ORDER BY nombre ASC";
$rsLocal = mysql_query($query_rsLocal, $oab) or die(mysql_error());
$row_rsLocal = mysql_fetch_assoc($rsLocal);
$totalRows_rsLocal = mysql_num_rows($rsLocal);
?>
<html>
<head>
<script type="text/javascript" src="js/prototype.js"></script>
<script type="text/javascript" src="js/scriptaculous.js?load=effects"></script>
<script type="text/javascript" src="js/lightbox.js"></script>
<link rel="stylesheet" href="css/lightbox.css" type="text/css" media="screen" />
</head>
<body>
<p>Localidades del Distrito Capital (excepto Sumapáz)<br>
</p>
<table width="420" border="0">
<tr>
<td><img src="images/mapas/mapagloballocal.gif" alt="Localidades del Distrito Capital" width="413" height="563" border="0" usemap="#Map"></td>
</tr>
</table>
<table border="0" >
<tr>
<?php
$rsLocal_endRow = 0;
$rsLocal_columns = 3; // number of columns
$rsLocal_hloopRow1 = 0; // first row flag
do {
if($rsLocal_endRow == 0 && $rsLocal_hloopRow1++ != 0) echo "<tr>";
?>
<td align="center" valign="middle"><table width="80" border="0" cellspacing="0" cellpadding="0">
<tr>
<td align="center" valign="middle"> <a href="images/mapas/<?php echo $row_rsLocal['mapa_grande']; ?>" rel="lightbox[roadtrip]" title="Localidad de: <?php echo $row_rsLocal['nombre']; ?>">
<img src="images/mapas/<?php echo $row_rsLocal['mapa_peq']; ?>" width="132" height="180" border="0">
<?php echo $row_rsLocal['nombre']; ?></a></td>
</tr>
</table></td>
<?php $rsLocal_endRow++;
if($rsLocal_endRow >= $rsLocal_columns) {
?>
</tr>
<?php
$rsLocal_endRow = 0;
}
} while ($row_rsLocal = mysql_fetch_assoc($rsLocal));
if($rsLocal_endRow != 0) {
while ($rsLocal_endRow < $rsLocal_columns) {
echo("<td> </td>");
$rsLocal_endRow++;
}
echo("</tr>");
}?>
</table>
<map name="Map">
<area shape="poly" coords="285,56,258,231,243,227,231,233,225,224,218,216,218,207,210,199,203,191,197,184,184,171,174,163,168,168,162,163,165,156,172,147,177,139,181,129,185,101,206,87,208,96,214,99,219,94,218,87,228,75,220,65,228,64,229,58,219,45,235,41,250,42,266,44,275,47"
href="images/mapas/suba.gif" rel="lightbox[roadtrip]" title="Suba">
</map>
</body>
</html>
<?php
mysql_free_result($rsLocal);
?>
|