COÑO!, ahora necesito el calculo para la dirección de arriba-abajo y abajo-arriba
Esta sección te permite ver todos los mensajes escritos por este usuario. Ten en cuenta que sólo puedes ver los mensajes escritos en zonas a las que tienes acceso en este momento.
Mostrar Mensajes Menú<script>
function disable() {
if( document.form1.Ninguno_pro.checked) {
document.form1.Antivirus.disabled = true;
}
}
</script>
<form name="form1" id = "form1">
<td width="167">
<input type="checkbox" name="Ninguno_pro" onclick="disable()">
<span class="Estilo12">Ninguno</span></p></td>
<td width="133">
<input type="checkbox" name="Antivirus">
<span class="Estilo12">Antivirus</span></p></td>
</form>
function connection($host = "127.0.0.1", $db = "dbGoogleMaps", $user = "postgres", $pass = "root"){
/**
* Función para conectar a la base de datos.
*
* @param $host Servidor.
* @param $db Base de datos.
* @param $user Usuario.
* @param $pass Contraseña.
*
* @Autor Alex Jurado - Shell Root.
**/
try{
$cnn = new PDO("pgsql:host= '$host' port=5432 dbname='$db' user='$user' password='$pass'");
$cnn->setAttribute( PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION );
return $cnn;
}catch(PDOException $ex){
print $ex->getMessage();
return NULL;
}
}
function execQuery($sql, $return = TRUE){
/**
* Función para ejecutar una query con o sin
* retorno de datos.
*
* @param $sql Sentencia SQL para ejecutar.
* @param $return FALSE: Ejecución directa.
* TRUE : Con retorno de datos.
* ONE : Existencia de registro.
*
* @Autor Alex Jurado - Shell Root.
**/
$cnn = connection();
try{
$query = $cnn->query($sql);
}catch(PDOException $ex){
print $ex->getMessage();
return FALSE;
}
if($return){
while ($rows = $query->fetch(PDO::FETCH_ASSOC)){
$dataReturn[] = $rows;
}
return $dataReturn;
}elseif(!$return){
return TRUE;
}elseif($return == "ONE"){
return ($query->fetchColumn())? TRUE : FALSE;
}else{
print "WTF! :D";
return FALSE;
}
}
Cita de: Shell Root en 28 Junio 2011, 20:52 PM.., aunque lo estaba haciendo alrevez :/,
<html>
<head>
<title>PoC</title>
<style type="text/css">
#bot1 input[type='submit']{
background-image : url('http://www.frikipedia.es/images/thumb/8/8f/Normal.png.PNG/120px-Normal.png.PNG');
height : 44px;
width : 144px;
background-position : center top;
display : block;
color : #FFF;
text-decoration : none;
padding-top : 5px;
background-repeat : no-repeat;
font-weight : bold;
font-size : 11px;
}
</style>
</head>
<body>
<span id="bot1">
<input type = 'submit' id = 'btnEnviar' name = 'btnEnviar' value = 'Enviar' />
</span>
</body>
</html>
#bot1 input[type='submit']{
background-image : url(images/normal.png);
height : 44px;
width : 144px;
background-position : center top;
display : block;
color : #FFF;
text-decoration : none;
padding-top : 5px;
background-repeat : no-repeat;
font-weight : bold;
font-size : 11px;
}
<span id="bot1">
<input type = 'submit' id = 'btnEnviar' name = 'btnEnviar' value = 'Enviar' />
</span>
resLat = inicio[0] - fin[0];
resLon = inicio[1] - fin[1];
if( (resLat < 0) && ( resLon < 0) ){
return "--->";
}else if( (resLat > 0) && ( resLon < 0) ){
return "Diag-->";
}else if( (resLat < 0) && ( resLon > 0) ){
return "<--Diag";
}else if( (resLat > 0) && ( resLon > 0) ){
return "<---";
}
1. ---> "Izq-Der"
2. <--- "Der-Izq"
3. -
-
-> "Diagonal Izq-Der"
4. - "Diagonal Der-Izq"
-
<-