=5) { // OBtener IP if($_SERVER["HTTP_X_FORWARDED_FOR"]) { if($pos=strpos($_SERVER["HTTP_X_FORWARDED_FOR"]," ")) { ;//echo "IP local: ".substr($_SERVER["HTTP_X_FORWARDED_FOR"],0,$pos)." - IP Pública: ".substr($_SERVER["HTTP_X_FORWARDED_FOR"],$pos+1); $hostlocal=substr($_SERVER["HTTP_X_FORWARDED_FOR"],$pos+1); }else{ ;//echo "IP Pública: ".$_SERVER["HTTP_X_FORWARDED_FOR"]; $hostlocal=$_SERVER["HTTP_X_FORWARDED_FOR"]; } if($_SERVER["REMOTE_ADDR"]) ;//echo " - Proxy: ".$_SERVER["REMOTE_ADDR"]; } else{ ;//echo "IP Pública: ".$_SERVER["REMOTE_ADDR"]; $hostlocal=$_SERVER["REMOTE_ADDR"]; if($hostlocal!=$_SERVER["REMOTE_ADDR"]) ;//echo " - Hostname: ".$hostlocal; } $hostname=gethostbyaddr($hostlocal); if($hostlocal!=$hostname) ;//echo "
Hostname: ".$hostname; // Obtener IP } else { include("../datos/CLIENTES_T.inc.php"); $error=FALSE; if( empty( $_POST['user'] ) or empty($_POST['pass'] ) ) { $error=TRUE; $msg_error = 'No puede haber campos vacios'; } else { $str = "SELECT COUNT(".$ccUSER.") AS total FROM ".$TABLA." WHERE ".$ccUSER."='".RellenarCampo("user")."' AND ".$ccPASS."='".md5(strip_tags($_POST['pass']))."'"; $sql = mysql_query($str) or die(mysql_error()); $encontrado= mysql_fetch_row($sql); if (!$encontrado[0] >= 1) { $error=TRUE; // $msg_error = ($str . '
' . $encontrado[0]); $msg_error = ('El usuario no existe o la contraseña no es valida'); } else { $_SESSION['user'] = codificar(RellenarCampo("user")); $_SESSION['pass'] = md5(RellenarCampo("pass")); /* if (isset($_COOKIE['UltimaURL'])) $relink = $_COOKIE['UltimaURL']; else */ $relink = 'http://'.$_SERVER['HTTP_HOST'].'/SSmailing/user/'.'res_nw.php'; header('Location: '.$relink); } } } } ?> Login - MailingFacil


  " />
  "/>