<?php

ob_start
("ob_gzhandler");

if( isset( 
$_GET['source'] ))
{
    
highlight_file__FILE__ );
    exit();
}

?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <title>English / Al Bhed Translator</title>
    </head>
    <body>
        <form action="albhed.php" method="post">
            <div style="text-align: center; width: 100%;">
                <table cellspacing="1" style="margin-left: auto; margin-right: auto;">
                    <tr>
                        <th>English / Al Bhed Translator</th>
                    </tr>
                    <tr>
                        <td align="center">
                            <textarea name="text" cols="50" rows="10"><?php
if ( isset( $_POST['action'] ) )
{
    
$EnglishAlphabet 'ABCDEFGHIJKLMNOPQRSTUVWXYZ abcdefghijklmnopqrstuvwxyz';
    
$AlBhedAlphabet  'YPLTAVKREZGMSHUBXNCDIJFQOW ypltavkrezgmshubxncdijfqow';

    
$tmp $_POST['text'];
    
    if ( 
get_magic_quotes_gpc() )
        
$tmp stripslashes$tmp );

    if ( 
$_POST['action'] == 'To Al Bhed' )
    {
        
$tmp strtr$tmp$EnglishAlphabet$AlBhedAlphabet );
    }
    elseif ( 
$_POST['action'] == 'To English' )
    {
        
$tmp strtr$tmp$AlBhedAlphabet$EnglishAlphabet );
    }

    echo 
htmlentities$tmp );
}
?></textarea>
                            <br/>
                            <input type="submit" name="action" value="To Al Bhed" />
                            <input type="submit" name="action" value="To English" />
                        </td>
                    </tr>
                </table>
            </div>
        </form>
    </body>
</html>