Ver Mensaje Individual
  #1 (permalink)  
Antiguo 22/12/2005, 19:13
iarrieta
 
Fecha de Ingreso: noviembre-2002
Ubicación: Colombia
Mensajes: 278
Antigüedad: 21 años, 4 meses
Puntos: 0
Ayuda... solo un detalle por modificar este whois

hola:

este es un codigo de whois que he usado por mucho tiempo, pero originalmente siempre la consulta ha abierto en una ventana emergente y alli se realiza todo lo que conpete al whois como tal.

esta vez me dio por "empotrar" mi whois dentro del sitio y no en una ventana y ya lo he logrado en su totalidad. lo que si me interesa mantener en una ventana emergente es la informacion del dueño del dominio que esta ocupado (mi diseño es muy corto (no es pagina larga) y no me cabe la informacion del registro dentro de la misma).

el problema es que al hacer click en "ver detalles" me abre la ventanita pero con el fondo y las animaciones incluidas en la pagina original.

quizas no se comprenda mucho pero con el codigo de seguro se entiende:

Código PHP:
<?php

///primero algunos parametros que no me cabian en el post


    
if ($_POST['type']!=""define('TYPE'$_POST['type']); else define('TYPE''');
    if (
$_POST['ddomain']!=""define('DDOMAIN'$_POST['ddomain']); else define('DDOMAIN''');

    
// This function displays an available domain
    
function dispav($what)
    {
        echo 
'<tr><td nowrap align="center">';
        if (
REG_LINK)
        {
            echo 
'<a href="'.REG_URL.'" target="_blank" onMouseOver="window.status=\''.STATUS_BAR_REGISTER_TEXT.' '.$what.'\';return true" onMouseOut="window.status=\'\';return true">'.LINK_REGISTER_TEXT.'</a>';
        }
        else
            echo 
'&nbsp;';
        echo 
'</td>
        <td nowrap align="center">'
.$what.'</td><td colspan=3>&nbsp;</td></tr>';
   }

   
// Function to display an unavailable domain with additional links
   
function dispun($what,$where)
   {
      echo 
'<tr>
                  <td colspan="2">&nbsp;</td>
                <td align="center" nowrap class="nonavailable">'
.$what.'</td>
            <td nowrap align="center">
            <a href="'
.FILE_NAME.'?action=details&ddomain='.$what.'&server='.$where.'" onMouseOver="window.status=\''.STATUS_BAR_DETAILS.' '.$what.'\';return true" onMouseOut="window.status=\'\';return true" onClick="NewWindow(this.href,\'details\',\'620\',\'400\',\'yes\');return false;">
            '
.LINK_TAKEN_DETAILS.'</a></td>
            <td nowrap align="center"><a href="http://www.'
.$what.'" target="_blank">'.LINK_TAKEN_GOTO.'</a></td>
            </tr>'
;
   }

   function 
startborder()
   {
      echo 
'<table align="center" width="600" border="0" cellspacing="0" cellpadding="0">
            <tr><td width="100%">
            <table width="600" border="0" cellspacing="1" cellpadding="2">
            <tr><td>'
;
   }


   function 
endborder()
   {
      echo 
'</td></tr></table></td></tr></table>';
   }

   function 
disperror($text)
   {
      
startborder();
      echo 
'<center><b>'.$text.'</b></center>';
      
endborder();
   }

   function 
main()
   {
      echo 
'<br>';
      
startborder();
      echo 
'
      <table width="100%" align="center" cellspacing="0" cellpadding="1">
      <tr>
      <td align="center">
         <form method="POST" action="'
.FILE_NAME.'">
         <input type="hidden" name="action" value="checkdom">
         <input type="hidden" name="type" value="'
.TYPE.'">
         <input type="text" name="ddomain" size="30" maxlength="63" class="form" value="'
.DDOMAIN.'">&nbsp;
         <input type="submit" name="button" class="boton" value="'
.CHECK_BUTTON.'">
      </td>
      </tr>
      </table><br>
      <table width="100%" align="center" cellspacing="0" cellpadding="1">
      <tr>
      <td align="center">'
;

    if (
COM_INCLUDE) { echo '<INPUT TYPE="radio" '; if(TYPE=='com') { echo 'CHECKED '; } echo ' NAME="type" VALUE="com"> .com &nbsp;'; }
    if (
NET_INCLUDE) { echo '<INPUT TYPE="radio" '; if(TYPE=='net') { echo 'CHECKED '; } echo ' NAME="type" VALUE="net"> .net &nbsp;'; }
    if (
ORG_INCLUDE) { echo '<INPUT TYPE="radio" '; if(TYPE=='org') { echo 'CHECKED '; } echo ' NAME="type" VALUE="org"> .org &nbsp;';    }
    if (
INFO_INCLUDE){ echo '<INPUT TYPE="radio" '; if(TYPE=='info') { echo 'CHECKED '; } echo ' NAME="type" VALUE="info"> .info &nbsp;'; }
    if (
BIZ_INCLUDE) { echo '<INPUT TYPE="radio" '; if(TYPE=='biz') { echo 'CHECKED '; } echo ' NAME="type" VALUE="biz"> .biz &nbsp;'; }
    echo 
'<INPUT TYPE="radio" '; if(TYPE=='all')  { echo 'CHECKED '; } echo ' NAME="type" VALUE="all"> &nbsp;'.ALL_TEXT.'';
    echo 
'</form>
      </td>
      </tr>
      </table>'
;
      
endborder();
   }

    function 
pageheader()
    {
        echo 
'
        <html>
        <head>
            <meta http-equiv="Content-Type" content="text/html; charset='
.META_CHARSET.'">
            <meta http-equiv="Content-Language" content="'
.META_LANGUAGE.'">
            <title>'
.PAGE_TITLE_META.'</title>
            <script type=text/javascript>
            var win= null;
            function NewWindow(mypage,myname,w,h,scroll)
            {
                var winl = (screen.width-w)/2;
                  var wint = (screen.height-h)/2;
                var settings  ="height="+h+",";
                settings +="width="+w+",";
                settings +="top="+wint+",";
                settings +="left="+winl+",";
                settings +="scrollbars="+scroll+",";
                settings +="resizable=yes";
                win=window.open(mypage,myname,settings);
                if(parseInt(navigator.appVersion) >= 4){win.window.focus();}
            }
            </script>
        </head>
        <body>'
;
    }
    function 
pagefooter()
    {
        echo 
'</body></html>';
    }


if (
$_GET['action'] == "details")
{
    
$server $_GET['server'];
    
$ddomain $_GET['ddomain'];
    
pageheader();
    echo 
'<pre>';
    
$fp fsockopen($server,43);
    
fputs($fp"$ddomain\r\n");
    while(!
feof($fp))
    {
        echo 
fgets($fp,128);
    }
    
fclose($fp);
    echo 
'</pre>';
    echo 
'<p align="center"><form><input type="button" class="boton" value="'.CLOSE_BUTTON_TEXT.'" onclick="window.close()"></form>';
    
pagefooter();
    exit;
}

elseif (
$_POST['action']=='checkdom')
{
    if (
WAIT_LAYER_ENABLED)
    {
        echo 
'
        <script language=javascript>
        var ie4 = (document.all) ? true : false;
        var ns4 = (document.layers) ? true : false;
        var ns6 = (document.getElementById && !document.all) ? true : false;
        
        function hidelayer(lay) {
            if (ie4) {document.all[lay].style.visibility = "hidden";}
            if (ns4) {document.layers[lay].visibility = "hide";}
            if (ns6) {document.getElementById([lay]).style.display = "none";}
        }

        function showlayer(lay) {
            if (ie4) {document.all[lay].style.visibility = "visible";}
            if (ns4) {document.layers[lay].visibility = "show";}
            if (ns6) {document.getElementById([lay]).style.display = "block";}
        }
        </script>'
;

        echo 
'
        <script language="javascript">
        var laywidth  = screen.width/2;
        var layheight = screen.height/2;
        var layl   = (screen.width-laywidth)/2;
          var layt   = (screen.height-layheight)/2;
        document.write("<div id=\'waitlayer\' align=\'center\' style=\'position:absolute; width:"+laywidth+"px; height:"+layheight+"px; z-index:-1; left:"+layl+"px; top:"+layt+"px; visibility: visible;\'>");
        </script>'
;

          echo 
'<center><b>'.WAIT_TITLE.'</b><br><br>
        <a href="'
.FILE_NAME.'" target="_self">'.WAIT_MESSAGE.'</a>
        </div>'
;
    }

///y continua con mas parametros que no me cabian en el post
                  
?>
de mas esta decir que el codigo original es bastante visto por aqui.

con mi poca experiencia, pienso que el detalle esta en estas lineas:

Código PHP:
<?
echo '<tr>
                  <td colspan="2">&nbsp;</td>
                <td align="center" nowrap class="nonavailable">'
.$what.'</td>
            <td nowrap align="center">
            <a href="'
.FILE_NAME.'?action=details&ddomain='.$what.'&server='.$where.'" onMouseOver="window.status=\''.STATUS_BAR_DETAILS.' '.$what.'\';return true" onMouseOut="window.status=\'\';return true" onClick="NewWindow(this.href,\'details\',\'620\',\'400\',\'yes\');return false;">
            '
.LINK_TAKEN_DETAILS.'</a></td>
            <td nowrap align="center"><a href="http://www.'
.$what.'" target="_blank">'.LINK_TAKEN_GOTO.'</a></td>
            </tr>'
;
?>
exactamente aqui...

onClick="NewWindow(this.href,\'details\',\'620\',\ '400\',\'yes\')

this.href imagino me abre la misma pagina que esta abierta pero en la ventanita.

cree una pagina html cualquiera y sustitui this.href por el enlace y nada, me sale la info pero en la pagina original, ya ni siquiera en la ventanita.

si coloco el el enlace dentro de \' \' , me abre la ventanita pero vacia

alguien me ayuda?