Viewing file: mapcdr - copia.php (31.06 KB) -rw-rw-rw- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Mapa CDRS</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) { //reloads the window if Nav4 resized
if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_dragLayer(objName,x,hL,hT,hW,hH,toFront,dropBack,cU,cD,cL,cR,targL,targT,tol,dropJS,et,dragJS) { //v4.01
//Copyright 1998 Macromedia, Inc. All rights reserved.
var i,j,aLayer,retVal,curDrag=null,curLeft,curTop,IE=document.all,NS4=document.layers;
var NS6=(!IE&&document.getElementById), NS=(NS4||NS6); if (!IE && !NS) return false;
retVal = true; if(IE && event) event.returnValue = true;
if (MM_dragLayer.arguments.length > 1) {
curDrag = MM_findObj(objName); if (!curDrag) return false;
if (!document.allLayers) { document.allLayers = new Array();
with (document) if (NS4) { for (i=0; i<layers.length; i++) allLayers[i]=layers[i];
for (i=0; i<allLayers.length; i++) if (allLayers[i].document && allLayers[i].document.layers)
with (allLayers[i].document) for (j=0; j<layers.length; j++) allLayers[allLayers.length]=layers[j];
} else {
if (NS6) { var spns = getElementsByTagName("span"); var all = getElementsByTagName("div");
for (i=0;i<spns.length;i++) if (spns[i].style&&spns[i].style.position) allLayers[allLayers.length]=spns[i];}
for (i=0;i<all.length;i++) if (all[i].style&&all[i].style.position) allLayers[allLayers.length]=all[i];
} }
curDrag.MM_dragOk=true; curDrag.MM_targL=targL; curDrag.MM_targT=targT;
curDrag.MM_tol=Math.pow(tol,2); curDrag.MM_hLeft=hL; curDrag.MM_hTop=hT;
curDrag.MM_hWidth=hW; curDrag.MM_hHeight=hH; curDrag.MM_toFront=toFront;
curDrag.MM_dropBack=dropBack; curDrag.MM_dropJS=dropJS;
curDrag.MM_everyTime=et; curDrag.MM_dragJS=dragJS;
curDrag.MM_oldZ = (NS4)?curDrag.zIndex:curDrag.style.zIndex;
curLeft= (NS4)?curDrag.left:(NS6)?parseInt(curDrag.style.left):curDrag.style.pixelLeft;
if (String(curLeft)=="NaN") curLeft=0; curDrag.MM_startL = curLeft;
curTop = (NS4)?curDrag.top:(NS6)?parseInt(curDrag.style.top):curDrag.style.pixelTop;
if (String(curTop)=="NaN") curTop=0; curDrag.MM_startT = curTop;
curDrag.MM_bL=(cL<0)?null:curLeft-cL; curDrag.MM_bT=(cU<0)?null:curTop-cU;
curDrag.MM_bR=(cR<0)?null:curLeft+cR; curDrag.MM_bB=(cD<0)?null:curTop+cD;
curDrag.MM_LEFTRIGHT=0; curDrag.MM_UPDOWN=0; curDrag.MM_SNAPPED=false; //use in your JS!
document.onmousedown = MM_dragLayer; document.onmouseup = MM_dragLayer;
if (NS) document.captureEvents(Event.MOUSEDOWN|Event.MOUSEUP);
} else {
var theEvent = ((NS)?objName.type:event.type);
if (theEvent == 'mousedown') {
var mouseX = (NS)?objName.pageX : event.clientX + document.body.scrollLeft;
var mouseY = (NS)?objName.pageY : event.clientY + document.body.scrollTop;
var maxDragZ=null; document.MM_maxZ = 0;
for (i=0; i<document.allLayers.length; i++) { aLayer = document.allLayers[i];
var aLayerZ = (NS4)?aLayer.zIndex:parseInt(aLayer.style.zIndex);
if (aLayerZ > document.MM_maxZ) document.MM_maxZ = aLayerZ;
var isVisible = (((NS4)?aLayer.visibility:aLayer.style.visibility).indexOf('hid') == -1);
if (aLayer.MM_dragOk != null && isVisible) with (aLayer) {
var parentL=0; var parentT=0;
if (NS6) { parentLayer = aLayer.parentNode;
while (parentLayer != null && parentLayer.style.position) {
parentL += parseInt(parentLayer.offsetLeft); parentT += parseInt(parentLayer.offsetTop);
parentLayer = parentLayer.parentNode;
} } else if (IE) { parentLayer = aLayer.parentElement;
while (parentLayer != null && parentLayer.style.position) {
parentL += parentLayer.offsetLeft; parentT += parentLayer.offsetTop;
parentLayer = parentLayer.parentElement; } }
var tmpX=mouseX-(((NS4)?pageX:((NS6)?parseInt(style.left):style.pixelLeft)+parentL)+MM_hLeft);
var tmpY=mouseY-(((NS4)?pageY:((NS6)?parseInt(style.top):style.pixelTop) +parentT)+MM_hTop);
if (String(tmpX)=="NaN") tmpX=0; if (String(tmpY)=="NaN") tmpY=0;
var tmpW = MM_hWidth; if (tmpW <= 0) tmpW += ((NS4)?clip.width :offsetWidth);
var tmpH = MM_hHeight; if (tmpH <= 0) tmpH += ((NS4)?clip.height:offsetHeight);
if ((0 <= tmpX && tmpX < tmpW && 0 <= tmpY && tmpY < tmpH) && (maxDragZ == null
|| maxDragZ <= aLayerZ)) { curDrag = aLayer; maxDragZ = aLayerZ; } } }
if (curDrag) {
document.onmousemove = MM_dragLayer; if (NS4) document.captureEvents(Event.MOUSEMOVE);
curLeft = (NS4)?curDrag.left:(NS6)?parseInt(curDrag.style.left):curDrag.style.pixelLeft;
curTop = (NS4)?curDrag.top:(NS6)?parseInt(curDrag.style.top):curDrag.style.pixelTop;
if (String(curLeft)=="NaN") curLeft=0; if (String(curTop)=="NaN") curTop=0;
MM_oldX = mouseX - curLeft; MM_oldY = mouseY - curTop;
document.MM_curDrag = curDrag; curDrag.MM_SNAPPED=false;
if(curDrag.MM_toFront) {
eval('curDrag.'+((NS4)?'':'style.')+'zIndex=document.MM_maxZ+1');
if (!curDrag.MM_dropBack) document.MM_maxZ++; }
retVal = false; if(!NS4&&!NS6) event.returnValue = false;
} } else if (theEvent == 'mousemove') {
if (document.MM_curDrag) with (document.MM_curDrag) {
var mouseX = (NS)?objName.pageX : event.clientX + document.body.scrollLeft;
var mouseY = (NS)?objName.pageY : event.clientY + document.body.scrollTop;
newLeft = mouseX-MM_oldX; newTop = mouseY-MM_oldY;
if (MM_bL!=null) newLeft = Math.max(newLeft,MM_bL);
if (MM_bR!=null) newLeft = Math.min(newLeft,MM_bR);
if (MM_bT!=null) newTop = Math.max(newTop ,MM_bT);
if (MM_bB!=null) newTop = Math.min(newTop ,MM_bB);
MM_LEFTRIGHT = newLeft-MM_startL; MM_UPDOWN = newTop-MM_startT;
if (NS4) {left = newLeft; top = newTop;}
else if (NS6){style.left = newLeft; style.top = newTop;}
else {style.pixelLeft = newLeft; style.pixelTop = newTop;}
if (MM_dragJS) eval(MM_dragJS);
retVal = false; if(!NS) event.returnValue = false;
} } else if (theEvent == 'mouseup') {
document.onmousemove = null;
if (NS) document.releaseEvents(Event.MOUSEMOVE);
if (NS) document.captureEvents(Event.MOUSEDOWN); //for mac NS
if (document.MM_curDrag) with (document.MM_curDrag) {
if (typeof MM_targL =='number' && typeof MM_targT == 'number' &&
(Math.pow(MM_targL-((NS4)?left:(NS6)?parseInt(style.left):style.pixelLeft),2)+
Math.pow(MM_targT-((NS4)?top:(NS6)?parseInt(style.top):style.pixelTop),2))<=MM_tol) {
if (NS4) {left = MM_targL; top = MM_targT;}
else if (NS6) {style.left = MM_targL; style.top = MM_targT;}
else {style.pixelLeft = MM_targL; style.pixelTop = MM_targT;}
MM_SNAPPED = true; MM_LEFTRIGHT = MM_startL-MM_targL; MM_UPDOWN = MM_startT-MM_targT; }
if (MM_everyTime || MM_SNAPPED) eval(MM_dropJS);
if(MM_dropBack) {if (NS4) zIndex = MM_oldZ; else style.zIndex = MM_oldZ;}
retVal = false; if(!NS) event.returnValue = false; }
document.MM_curDrag = null;
}
if (NS) document.routeEvent(objName);
} return retVal;
}
function getPos(layername){
var layerRef = MM_findObj(layername);
var curVertPos = layerRef.MM_UPDOWN;
var curHoriPos = layerRef.MM_LEFTRIGHT;
document.form1.y.value = curVertPos;
document.form1.x.value = curHoriPos;
}
function MM_callJS(jsStr) { //v2.0
return eval(jsStr)
}
function MM_showHideLayers() { //v6.0
var i,p,v,obj,args=MM_showHideLayers.arguments;
for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
obj.visibility=v; }
}
function selec() {
var capaold = document.form2.lal.value;
MM_showHideLayers(capaold,'','hide');
}
//-->
</script>
<style type="text/css"><!--
body {
scrollbar-face-color:#DFEDFE; scrollbar-track-color:#FFFFFF; scrollbar-arrow-color:#006699; scrollbar-shadow-color:#C6DEFF; scrollbar-dark-shadow-color:#C6DEFF; scrollbar-3dlight-color:#F2F8FF; scrollbar-highlight-color:#F2F8FF
}
input {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
color: #666666;
background-color: #F0F0F0;
}
--></style>
</head>
<body link="#6699CC" vlink="#6699CC" alink="#6699CC" topmargin="0" onLoad="MM_dragLayer('Layer2','',0,0,0,0,true,false,0,400,0,400,false,false,0,'',false,'')">
<table width="100%" border="0" cellspacing="0" cellpadding="2">
<?php
// -1. Excluir X y Y como variables generales
$s_y_set = isset($x);
if ($s_y_set == true){
$var_x = $x;
$var_y = $y;
}
// 0. Define Zoom
$zoom = isset($zm);
if ($zoom == false){
$zm = 1;
}
// 0.5 Define X and Y
$s_y_set = isset($x);
if ($s_y_set == false){
$x = 0;
$y = 0;
}
// 0.6 Define x y factor
if ($x!=0 and $y!=0 ) {
// 0.6.1 Escala 2
if ($zm == 2) {
$x = ($x * 10) - 1000;
$y = ($y * 10) - 1000;
// 0.6.1.1 Correccion del borde
if ($x < 0) {
$x = 0;
}
if ($y < 0) {
$y = 0;
}
if ($x > 2000) {
$x = 2000;
}
if ($y > 2000) {
$y = 2000;
}
}
if ($zm == 4) {
$x = ($cx + ($x * 5)) - 500;
$y = ($cy + ($y * 5)) - 500;
// 0.6.1.1 Correccion del borde
if ($x < 0) {
$x = 0;
}
if ($y < 0) {
$y = 0;
}
if ($x > 3000) {
$x = 3000;
}
if ($y > 3000) {
$y = 3000;
}
}
if ($zm == 8) {
$x = ($cx + ($x * 2.5)) - 250;
$y = ($cy + ($y * 2.5)) - 250;
}
if ($zm == 16) {
$x = ($cx + ($x * 1.25)) - 125;
$y = ($cy + ($y * 1.25)) - 125;
}
if ($zm == 32) {
$x = ($cx + ($x * 0.625)) - 125;
$y = ($cy + ($y * 0.625)) - 125;
$zm = 16;
}
}
?>
<tr>
<td> </td>
<td><table width="100%" border="0" cellspacing="0" cellpadding="4">
<tr>
<td width="20%"><table width="100%" height="100%" border="0" cellpadding="8" cellspacing="0">
<tr>
<td bgcolor="#C4E1FF"> </td>
</tr>
</table></td>
<td><font size="6" face="Arial, Helvetica, sans-serif">Mapa CDRs </font><font face="Arial, Helvetica, sans-serif"><br>
<font size="2">Centros de Diagnóstico Reconocido Vigentes</font></font></td>
</tr>
</table></td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td width="15%"> <div align="right"><a href="reqmapcdr.php?dir=ul"><img src="botones/upl.gif" alt="Mover Norte-Occidente" width="10" height="10" border="0"></a></div></td>
<td width="420"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="center"><a href="reqmapcdr.php?dir=u"><img src="botones/up.gif" alt="Mover Norte" width="10" height="10" border="0"></a></div>
<div align="right"></div></td>
</tr>
</table></td>
<td><a href="reqmapcdr.php?dir=ur"><img src="botones/upr.gif" alt="Mover Norte-Oriente" width="10" height="10" border="0"></a></td>
<td> </td>
<td><form name="form2" method="post" action="">
<font size="1" face="Verdana, Arial, Helvetica, sans-serif">Last Activated
Layer
<input name="lal" type="text" id="lal" value="none" size="5">
</font> </form></td>
</tr>
<tr>
<td width="15%"> <div align="right">
<?php if ($zm != 1) { ?>
<a href="reqmapcdr.php?dir=l
<?php
// 10. Función de desplazamiento occidente
if ($zm == 2) { ?>&zm=2&x=
<?php
$var_x2 =($var_x - 100);
if ($var_x2 > 300)
{
$var_x2 = 300;
}
if ($var_x2 < 1)
{
$var_x2 = 100;
}
echo $var_x2;
?>
&y=<?php echo $var_y; ?>&cx=0&cy=0
<?php } ?>
<?php
if ($zm == 4) {
$var_x4 =($cx - 500);
if ($var_x4 > 1500)
{
$var_x4 = 1500;
}
if ($var_x4 < 1)
{
$var_x4 = 0;
}
?>&zm=4&x=200&y=200&cx=<?php echo $var_x4; ?>&cy=<?php echo $cy; ?>&bx=<?php echo $bx; ?>&by=<?php echo $by;?>&dx=<?php echo $dx; ?>&dy=<?php echo $dy; } ?>
<?php
if ($zm == 8) {
$var_x8 =($cx - 250);
if ($var_x8 > 1500)
{
$var_x8 = 1500;
}
if ($var_x8 < 1)
{
$var_x8 = 0;
}
?>&zm=8&x=200&y=200&cx=<?php echo $var_x8; ?>&cy=<?php echo $cy; ?>&bx=<?php echo $bx; ?>&by=<?php echo $by; } ?>
<?php if ($zm == 16) { ?>&zm=16&x=200&y=200&cx=<?php echo ($cx - 125); ?>&cy=<?php echo $cy; ?>&bx=<?php echo $bx; ?>&by=<?php echo $by; ?>&dx=<?php echo $dx; ?>&dy=<?php echo $dy; ?>&ex=<?php echo $ex; ?>&ey=<?php echo $ey; ?>
<?php }
// Fin de función de desplazamiento
?>
">
<?php } ?>
<img src="botones/l.gif" alt="Mover Occidente" width="10" height="10" border="0"></a></div></td>
<?php
// 1. Scale background
$opend = 'c:\maps\tumbs';
@$opend_result = mkdir ($opend , 0777);
$v1 = "mapsys.jpg";
$sz = 400;
$size = GetImageSize($v1);
$an = $size[0] / $zm;
$la = $size[1] / $zm;
$an1 = round($an);
$la1 = round($la);
if ($an > $la) {
$la = $la * $sz;
$la = $la / $an;
$an = $sz;
}
if ($la > $an) {
$an = $an * $sz;
$an = $an / $la;
$la = $sz;
}
if ($la == $an) {
$an = $sz;
$la = $sz;
}
$size2 = filesize($v1);
$size2 = $size2 / 1024;
$size2 = round($size2);
$copyfile = $opend."/".$v1;
$original_file =$v1;
copy($original_file , $copyfile);
$dest = "c:\maps\\recipiente.jpg";
$img_src=imagecreatefromjpeg($v1);
$img_dst=imagecreatetruecolor($an,$la);
imagecopyresampled($img_dst, $img_src, 0, 0, $x, $y, $an, $la, $an1, $la1);
$dest = $opend."/".$v1;
imagejpeg($img_dst, $dest, 100);
// 1.1 Scale layer
$opend = 'c:\maps\tumbs';
@$opend_result = mkdir ($opend , 0777);
$v1 = "layert.gif";
$sz = 400;
$size = GetImageSize($v1);
$an = $size[0] / $zm;
$la = $size[1] / $zm;
$an1 = round($an);
$la1 = round($la);
if ($an > $la) {
$la = $la * $sz;
$la = $la / $an;
$an = $sz;
}
if ($la > $an) {
$an = $an * $sz;
$an = $an / $la;
$la = $sz;
}
if ($la == $an) {
$an = $sz;
$la = $sz;
}
$size2 = filesize($v1);
$size2 = $size2 / 1024;
$size2 = round($size2);
$copyfile = $opend."/".$v1;
$original_file =$v1;
copy($original_file , $copyfile);
$dest1 = "c:\maps\\recipiente.jpg";
$img_src=imagecreatefromgif($v1);
$img_dst=imagecreate($an,$la);
$black = ImageColorAllocate($img_dst, 255, 255, 255);
imagecolortransparent($img_dst, $black);
imagecopyresampled($img_dst, $img_src, 0, 0, $x, $y, $an, $la, $an1, $la1);
$dest1 = $opend."/".$v1.".png";
imagepng($img_dst, $dest1);
?>
<td width="420" height="400" valign="top"> <div id="Layer1" style="position:absolute; width:420px; height:420; z-index:5;">
<div id="Layer4" style="position:absolute; width:420px; height:420; z-index:8; visibility: hidden;">
<table width="100%" border="1" cellpadding="4" cellspacing="0" bordercolor="#999999">
<tr>
<td> <div align="center"><img src="<?php echo $dest1; ?>"></div></td>
</tr>
</table>
</div>
<div id="Layer2" style="position:absolute; width:20px; height:20; z-index:10"><img src="botones/cursor.png" alt="Haga clic aqui para ampliar..." width="20" height="20" border="0" onClick="MM_callJS('getPos(\'Layer2\');')"></div>
<?php
require('conexion.php');
$consul2 = "SELECT *
FROM layercdrs"
. " order by nombre";
$result2 = mysql_query($consul2,$db);
$num_filas2 = mysql_num_rows($result2);
$lay_num = 0;
$pev = 0;
while ($myrow2 = mysql_fetch_array($result2))
{
$lid = $myrow2["id"];
$lname = $myrow2["nombre"];
$ldescripcion = $myrow2["descripcion"];
$liden = $myrow2["iden"];
?>
<div id="data<?php echo $lay_num; ?>" style="position:absolute; width:420px; height:420px; z-index:9; visibility: visible;">
<?php
///////////////////////////////////////////
//// Modulo de Representacion de datos ////
///////////////////////////////////////////
require('conexion2.php');
// Búsqueda de un solo punto
$iset1 = isset($geo);
if ($iset1 == true and $geo == 1) {
$stmt = ociparse($c1," select EO_ID,CORX,CORY,EO_NAME,EO_ENTITY_TYPE,DIRECCION,TELEFONO,BARRIO
from sia_objeto
where eo_id=$id");
}else{
$stmt = ociparse($c1," select EO_ID,CORX,CORY,EO_NAME,EO_ENTITY_TYPE,DIRECCION,TELEFONO,BARRIO
from sia_objeto
where tipo_org='CDR' and eo_entity_type='$liden' and locesp_id is not null");
}
$result = OCIExecute($stmt);
while (OCIFetchInto($stmt, $value)) {
$pid = $value[0];
$pnom = $value[3];
$pdes = $value[5];
$plin = "http://point";
$px = $value[1];
$px1 = $px;
$py = $value[2];
$py1 = $py;
$visible = false;
$puntos_en_vista[$pev] = false;
$id_en_vista[$pev] = $pid;
// 1. Asignación de X y Y
if ($zm == 1) {
$px = (($px / 100) - 837.9809) + 81.6069;
$py = 400 - (($py / 100) - 858.8218);
$visible = true;
$puntos_en_vista[$pev] = true;
}
if ($zm > 1) {
$limx = $x / 10;
$limy = $y / 10;
$px = (($px / 100) - 837.9809) + 81.6069;
if ($px >= $limx) {
$px = ($px - $limx) * $zm;
if ($px <= 400) {
$py = 400 - (($py / 100) - 858.8218);
if ($py >= $limy) {
$py = ($py - $limy) * $zm;
if ($py <= 400) {
$visible = true;
$puntos_en_vista[$pev] = true;
}else{
$visible = false;
$puntos_en_vista[$pev] = false;
}
}else{
$visible = false;
$puntos_en_vista[$pev] = false;
}
}
}
}
if ($visible == true) {
?>
<div id="datax1" style="position:absolute; width:10px; height:10px; z-index:8; left: <?php echo $px; ?>; top: <?php echo $py; ?>;"><a href="#"><img src="botones/point.png" alt="<?php echo $pnom; ?>, X: <?php echo $px1; ?> y Y: <?php echo $py1; ?> , pX: <?php echo $px; ?> y pY: <?php echo $py; ?> Dir: <?php echo $pdes; ?>" width="10" height="10" border="0" onClick="selec(); MM_showHideLayers('Layerdes<?php echo $pev; ?>','','show'); document.form2.lal.value='Layerdes<?php echo $pev; ?>';"></a></div>
<?php }
$pev++;
} ?>
</div>
<?php
$lay_num++;
}
?>
<table width="100%" border="1" cellpadding="4" cellspacing="0" bordercolor="#999999">
<tr>
<td bgcolor="#F0F0F0"><div align="center"><img src="<?php echo $dest; ?>"></div></td>
</tr>
</table>
</div></td>
<td><a href="reqmapcdr.php?dir=r"><img src="botones/r.gif" alt="Mover Oriente" width="10" height="10" border="0"></a></td>
<td><table width="25%" border="0" cellspacing="0" cellpadding="2">
<tr>
<td align="left"> <div align="center"><a href="reqmapcdr.php?zm=1"><img src="botones/b1.gif" alt="Zoom Nivel Bogotá" width="20" height="20" border="0"></a><img src="botones/<?php if ($zm == 1) {echo 'tz.gif'; } else {echo 'w.gif';} ?>" width="20" height="20"><br>
<?php
// Preventing zoom
// Preventing II
$eb = isset($bx);
if ($eb == false) {
$bx = 0;
$by = 0;
}
$ed = isset($dx);
if ($ed == false) {
$dx = 0;
$dy = 0;
}
$ee = isset($ex);
if ($ee == false) {
$ex = 0;
$ey = 0;
}
?>
<?php if ($zm == 1) { ?>
<a href="reqmapcdr.php?zm=2&x=200&y=200&cx=<?php echo $x; ?>&cy=<?php echo $y; ?>">
<?php } ?>
<?php if ($zm == 4) { ?><a href="reqmapcdr.php?zm=2&x=200&y=200&cx=<?php echo $bx; ?>&cy=<?php echo $by; ?>">
<?php } ?>
<?php if ($zm == 8) { ?><a href="reqmapcdr.php?zm=2&x=200&y=200&cx=<?php echo $bx; ?>&cy=<?php echo $by; ?>">
<?php } ?>
<?php if ($zm == 16) { ?><a href="reqmapcdr.php?zm=2&x=200&y=200&cx=<?php echo $bx; ?>&cy=<?php echo $by; ?>">
<?php } ?>
<img src="botones/2.gif" alt="Zoom Nivel 2" width="20" height="20" border="0"></a><img src="botones/<?php if ($zm == 2) {echo 'tz.gif'; } else {echo 'w.gif';} ?>" width="20" height="20"><br>
<?php if ($zm == 2) { ?>
<a href="reqmapcdr.php?zm=4&x=200&y=200&cx=<?php echo $x; ?>&cy=<?php echo $y; ?>&bx=<?php echo $cx; ?>&by=<?php echo $cy; ?>">
<?php } ?>
<?php if ($zm == 8) { ?><a href="reqmapcdr.php?zm=4&x=200&y=200&cx=<?php echo $dx; ?>&cy=<?php echo $dy; ?>&bx=<?php echo $bx; ?>&by=<?php echo $by; ?>">
<?php } ?>
<?php if ($zm == 16) { ?><a href="reqmapcdr.php?zm=4&x=200&y=200&cx=<?php echo $dx; ?>&cy=<?php echo $dy; ?>&bx=<?php echo $bx; ?>&by=<?php echo $by; ?>">
<?php } ?>
<img src="botones/3.gif" alt="Zoom Nivel 3" width="20" height="20" border="0"></a><img src="botones/<?php if ($zm == 4) {echo 'tz.gif'; } else {echo 'w.gif';} ?>" width="20" height="20"><br>
<?php if ($zm == 4) { ?>
<a href="reqmapcdr.php?zm=8&x=200&y=200&cx=<?php echo $x; ?>&cy=<?php echo $y; ?>&bx=<?php echo $bx; ?>&by=<?php echo $by; ?>&dx=<?php echo $cx; ?>&dy=<?php echo $cy; ?>">
<?php } ?>
<?php if ($zm == 16) { ?><a href="reqmapcdr.php?zm=8&x=200&y=200&cx=<?php echo $ex; ?>&cy=<?php echo $ey; ?>&bx=<?php echo $bx; ?>&by=<?php echo $by; ?>&dx=<?php echo $dx; ?>&dy=<?php echo $dy; ?>">
<?php } ?>
<img src="botones/4.gif" alt="Zoom Nivel 4" width="20" height="20" border="0"></a><img src="botones/<?php if ($zm == 8) {echo 'tz.gif'; } else {echo 'w.gif';} ?>" width="20" height="20"><br>
<?php if ($zm == 8) { ?>
<a href="reqmapcdr.php?zm=16&x=200&y=200&cx=<?php echo $x; ?>&cy=<?php echo $y; ?>&bx=<?php echo $bx; ?>&by=<?php echo $by; ?>&dx=<?php echo $dx; ?>&dy=<?php echo $dy; ?>&ex=<?php echo $cx; ?>&ey=<?php echo $cy; ?>">
<?php } ?>
<img src="botones/m1.gif" alt="Zoom Nivel Máximo" width="20" height="20" border="0"></a><img src="botones/<?php if ($zm == 16) {echo 'tz.gif'; } else {echo 'w.gif';} ?>" width="20" height="20">
</div></td>
</tr>
</table>
<p> </p></td>
<td valign="top"> <p><img src="botones/capas.gif" width="250" height="35">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<?php
require('conexion.php');
$consul4 = "SELECT *
FROM layercdrs"
. " order by nombre";
$result4 = mysql_query($consul4,$db);
$num_filas4 = mysql_num_rows($result4);
$lay_num = 0;
while ($myrow4 = mysql_fetch_array($result4))
{
$lid = $myrow4["id"];
$lname = $myrow4["nombre"];
$ldescripcion = $myrow4["descripcion"];
$liden = $myrow4["iden"];
?>
<tr>
<td width="50"><a href="#"><img src="botones/on.gif" alt="Prender esta capa..." width="20" height="20" border="0" onClick="MM_showHideLayers('data<?php echo $lay_num; ?>','','show')"></a>
<a href="#"><img src="botones/off.gif" alt="Apagar esta capa..." width="20" height="20" border="0" onClick="MM_showHideLayers('data<?php echo $lay_num; ?>','','hide')"></a></td>
<td><font size="1" face="Verdana, Arial, Helvetica, sans-serif"> <a href="#"><?php echo $ldescripcion; ?></a></font></td>
</tr>
<?php
$lay_num++;
} ?>
</table>
<p><img src="botones/puntos.gif" width="250" height="35"><br>
<div id="Layer3" style="position:absolute; width:250px; height:100px; z-index:2; overflow: auto;">
<?php require('conexion2.php');
$stmt = ociparse($c1," select EO_ID,CORX,CORY,EO_NAME,EO_ENTITY_TYPE,DIRECCION,TELEFONO,BARRIO
from sia_objeto
where tipo_org='CDR' and locesp_id is not null order by eo_name");
$result = OCIExecute($stmt);
$pevc = 0;
$npoi = 1;
while (OCIFetchInto($stmt, $value)) {
$rid = $value[0];
$rnom = $value[3];
$rdes = $value[5];
$rlin = "http://point.php?id=";
$rx = $value[1];
$punx = (($rx / 100) - 837.9809) + 81.6069;
$ry = $value[2];
$puny = 400 - (($ry / 100) - 858.8218);
// Calculo de CX y CY para ampliar
$punx = ($punx * 10) - 1000;
$puny = ($puny * 10) - 1000;
// Paso 1 Zoom 2
if ($punx < 0) {
$punx = 0;
}
if ($puny < 0) {
$puny = 0;
}
if ($punx > 2000) {
$punx = 2000;
}
if ($puny > 2000) {
$puny = 2000;
}
// Pazo 2 Zoom 4
$punx = ($punx + (200 * 5)) - 500;
$puny = ($puny + (200 * 5)) - 500;
if ($punx < 0) {
$punx = 0;
}
if ($puny < 0) {
$puny = 0;
}
if ($punx > 3000) {
$punx = 3000;
}
if ($puny > 3000) {
$puny = 3000;
}
$p_dx = $punx;
$p_dy = $puny;
// Paso 3 y 4, Zooms 8 y 16
$punx = ($punx + (200 * 2.5)) - 250;
$p_ex = $punx - 250;
$puny = ($puny + (200 * 2.5)) - 250;
$p_ey = $puny - 250;
$punx = ($punx + (200 * 1.25)) - 250;
$puny = ($puny + (200 * 1.25)) - 250;
// Fin del Cálculo de CX y CY
$n_rel = 0;
foreach ($id_en_vista as $value) {
if ($value == $rid and $puntos_en_vista[$n_rel] == true) {
?>
<font size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong><font color="#999999"><?php echo $npoi; ?>.</font></strong>
<a href="reqmapcdr.php?id=<?php echo $rid; ?>&geo=1&x=200&y=200&bx=0&by=0&dx=<?php echo $p_dx; ?>&dy=<?php echo $p_dy; ?>&ex=<?php echo $p_ex; ?>&ey=<?php echo $p_ey; ?>&cx=<?php echo $punx; ?>&cy=<?php echo $puny; ?>&zm=16"><?php echo $rnom; ?></a></font><br>
<?php
$npoi++;
}
$n_rel++;
}
$pevc++;
} ?></p>
</div>
<p> </p>
<p><br>
</p>
<p> </p>
<img src="botones/atrib.gif" width="250" height="35"><br>
<?php
require('conexion2.php');
$stmt = ociparse($c1," select EO_ID,CORX,CORY,EO_NAME,EO_ENTITY_TYPE,DIRECCION,TELEFONO,BARRIO
from sia_objeto
where tipo_org='CDR' and locesp_id is not null order by eo_name");
$result = OCIExecute($stmt);
$pevc = 0;
$npoi = 1;
while (OCIFetchInto($stmt, $value)) {
$rid = $value[0];
$rnom = $value[3];
$rdes = $value[5];
$rlin = "http://point.php?id=";
$rx = $value[1];
$ry = $value[2];
$n_rel = 0;
foreach ($id_en_vista as $value) {
if ($value == $rid and $puntos_en_vista[$n_rel] == true) {
?>
<div id="Layerdes<?php echo $n_rel; ?>" style="position:absolute; width:200px; height:115px; z-index:6; visibility: hidden;">
<p><font color="#3366FF" size="1" face="Verdana, Arial, Helvetica, sans-serif"><strong><img src="botones/r.gif" width="10" height="10"><?php echo $rnom; ?><br>
</strong></font><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><?php echo $rdes; ?></font></p>
<p><font size="1" face="Verdana, Arial, Helvetica, sans-serif"> <strong>X:</strong>
<?php echo $rx; ?><br>
<strong>Y:</strong> <?php echo $ry; ?></font></p>
<p><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><a href="<?php echo $rlin; ?>">Ver
más atributos</a></font></p>
</div>
<?php
}
$n_rel++;
}
$pevc++;
} ?>
<p> </p></td>
</tr>
<tr>
<td width="15%"> </td>
<td width="420"> </td>
<td> </td>
<td> </td>
<td> </td>
</tr>
<tr>
<td width="15%"> <div align="right"><a href="reqmapcdr.php?dir=dl"><img src="botones/dol.gif" alt="Mover Sur-Occidente" width="10" height="10" border="0"></a></div></td>
<td width="420"> <table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td><div align="center"><a href="reqmapcdr.php?dir=d"><img src="botones/d.gif" alt="Mover Sur" width="10" height="10" border="0"></a></div>
<div align="right"></div></td>
</tr>
</table></td>
<td><a href="reqmapcdr.php?dir=dr"><img src="botones/dor.gif" alt="Mover Sur-Oriente" width="10" height="10" border="0"></a></td>
<td> </td>
<td> </td>
</tr>
<tr>
<td width="15%"> </td>
<?php
if ($zm < 10) {
$zm_add = $zm * 2;
}
if ($zm == 16) {
$zm_add = 32;
}
?>
<td width="420"> <form name="form1" method="post" action="reqmapcdr.php">
<div align="center"><font color="#A8CDFF" size="2" face="Verdana, Arial, Helvetica, sans-serif">X:
<input name="x" type="text" id="X3" size="10">
Y:
<input name="y" type="text" id="Y2" size="10">
<input type="submit" name="Submit" value="Ampliar">
<input name="zm" type="hidden" value="<?php echo $zm_add; ?>">
<input name="cx" type="hidden" id="cx" value="<?php echo $x; ?>">
<input name="cy" type="hidden" id="cy" value="<?php echo $y; ?>">
<?php if ($zm == 2 and $bx == 0) {
$bx = $cx;
$by = $cy;
} ?>
<input name="bx" type="hidden" id="bx" value="<?php echo $bx; ?>">
<input name="by" type="hidden" id="by" value="<?php echo $by; ?>">
<?php if ($zm == 4 and $dx == 0) {
$dx = $cx;
$dy = $cy;
} ?>
<input name="dx" type="hidden" id="dx" value="<?php echo $dx; ?>">
<input name="dy" type="hidden" id="dy" value="<?php echo $dy; ?>">
<?php if ($zm == 8 and $ex == 0) {
$ex = $cx;
$ey = $cy;
} ?>
<input name="ex" type="hidden" id="ex" value="<?php echo $ex; ?>">
<input name="ey" type="hidden" id="ey" value="<?php echo $ey; ?>">
</font></div>
</form></td>
<td> </td>
<td> </td>
<td> </td>
</tr>
</table>
</body>
</html>
|