<?php
if ($_POST)
{
require "talkleet.class.php";
$leet = new Talkleet();
$leet->encode($_POST['string1']);
$leet->decode($_POST['string2']);
if ($_POST['string1'] && !$_POST['string2'])
{
echo "<center><font color=\"#c0c0c0\">",$leet->encode(htmlspecialchars($_POST['string1'])),"</font></center>";
}
elseif (!$_POST['string1'] && $_POST['string2'])
{
echo "<center><font color=\"#c0c0c0\">",$leet->decode(htmlspecialchars($_POST['string2'])),"</font></center>";
}
else
{
echo "<center><font color=\"#c0c0c0\">Only fill one option (encode or decode).</font></center>";
}
}
?>
<form action="example.php" method="post">
<table>
<tr>
<td>L33t Encode</td>
<td><input type="text" name="string1"></td>
</tr>
<tr>
<td>L33t Decode</td>
<td><input type="text" name="string2"></td>
</tr>
<tr>
<td></td>
<td><input type="submit" value="L33t!" name="submit"></td>
</tr>
</table>
</form>
|