Ver Mensaje Individual
  #2 (permalink)  
Antiguo 23/05/2005, 23:36
Avatar de Jorgemen
Jorgemen
 
Fecha de Ingreso: mayo-2005
Ubicación: Perú
Mensajes: 322
Antigüedad: 13 años, 1 mes
Puntos: 1
Código PHP:
//_______Class interfaz____________-
<?php
class interfaz
{
    function 
verIU($indice,$m,$k)
    {
            echo 
"
            <HTML>            <BODY                                                         "
;
                        if ((
$_SESSION['alfabeto']=="")or($_SESSION['palabra']==""))//es la primera vez que entra
                        
{
                            echo 
"</p>
                              <form name='form1' method='post' action='formales.php'>
                                        <p align='center'>
                                          <object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width='85' height='18'>
                                            <param name='BGCOLOR' value=''>
                                            <param name='movie' value='text1.swf'>
                                            <param name='quality' value='high'>
                                            <embed src='text1.swf' quality='high' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='85' height='18' ></embed>
                                          </object><br>                    
                                          <input type='text' name='edAlfabeto'><br>
                                    </p>
                                        <div align='center'>
                                      <object classid='clsid:D27CDB6E-AE6D-11cf-96B8-444553540000' codebase='http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=5,0,0,0' width='76' height='16'>
                                        <param name='BGCOLOR' value=''>
                                        <param name='movie' value='text2.swf'>
                                        <param name='quality' value='high'>
                                        <embed src='text2.swf' quality='high' pluginspage='http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash' type='application/x-shockwave-flash' width='76' height='16' ></embed>
                                      </object><br>
                                      <input type='text' name='edPalabra'> <br>
                                     <input name='imageField' type='image' src='aceptar.JPG' width='103' height='24' border='0'>        
                              </div>
                                  </form>"
;
                        }
                        else
                        {
                            if (
$indice==-1)
                            {
                                echo 
"<b><font face='Arial Narrow' size='3' color='#333366'>!!error
                                    , la PALABRA contiene un elemento que no esta en el ALFABETO, osea
                                    la PALABRA no pertenece al DICCIONARIO...!!!</font></b>"
;    
                            }
                            else
                            {
                                echo 
"<b><font face='Arial Narrow' size='3' color='#333366'>Alfabeto: </font></b>";
                                
$alfabeto=$_SESSION['alfabeto'];
                                
$n=count($alfabeto);
                                for(
$i=0;$i<$n;$i++)
                                {
                                    
$aux=$alfabeto[$i];
                                    
$o=$i+1;
                                    if(
$o==$n)
                                        echo 
"<b><font face='Arial Narrow' size='3' color='#FF0000'>$aux</font></b>";
                                    else
                                        echo 
"<b><font face='Arial Narrow' size='3' color='#FF0000'>$aux,</font></b>";
                                }
                                echo 
"<br><br>";
                                echo 
"<b><font face='Arial Narrow' size='3' color='#333366'>Palabra: </font></b>";
                                
$palabra=$_SESSION['palabra'];
                                
$n=count($palabra);
                                for(
$i=0;$i<$n;$i++)
                                {
                                    
$aux=$palabra[$i];
                                    echo 
"<b><font face='Arial Narrow' size='3' color='#FF0000'>$aux</font></b>";
                                }
                                echo 
"<br><br><b><font face='Arial Narrow' size='3' color='#333366'>m (nro de elementos del alfabeto) = <font color='#FF0000'>$m</font></font></b><br>
                                "
;
                                echo 
"<b><font face='Arial Narrow' size='3' color='#333366'>k (longitud de la palabra) = <font color='#FF0000'>$k</font></font></b><br>";
                                echo 
"<br><b><font face='Arial Narrow' size='3' color='#333366'>Indice = <font color='#FF0000'>$indice</font></font></b><br>";
                            }
//fin else
                        
}
                        echo 
"
                         </td>
                        </tr>
                        <tr>
                          <td height='27'>
                         </td>
                        </tr>
                      </table></TD>
                    </TR>
                           <TR>
                      <TD vAlign=top bgColor=#FFFFFF>&nbsp;                        </TD>
                      <TD vAlign=top bgColor=#ffffff>&nbsp;</TD></TR>
                    <TR>
                      <TD vAlign=top bgColor=#ffffff colSpan=2>
                        <P>
p colspan='2'>&nbsp;                      </TD>
                      </TR>
                    </TBODY></TABLE>
                </BODY>
            </HTML>
        "
;
    }
}
?>