Файл: inc/tools/html_encoder/index.php
Строк: 25
<form id="form1" name="form1" method="post" action="">
<table width="100%" border="0" align="center" class="ttable">
<tr>
<td bgcolor="#D4D0C8"><strong>HTML / JavaScript Encoder </strong></td>
</tr>
<tr>
<td align="center">HTML код :
<label></label><div align="center"></div></td>
</tr>
<tr>
<td align="center"><textarea name="html_code" cols="70" rows="10" id="html_code"></textarea></td>
</tr>
<tr>
<td align="center"><input type="submit" name="Submit" value="Закодировать" /></td>
</tr>
<tr>
<td><?php
if($_POST['html_code'])
{
$scripttext=bin2hex(trim(stripslashes($_POST['html_code'])));
for($g=0; $g<strlen($scripttext); $g=$g+3)
{
$scripttext=substr_replace($scripttext, "%".substr($scripttext, $g, $g), $g, $g);
}
$scripttext="<script type="text/javascript">document.write(unescape('".$scripttext."'));</script>";
echo '<center><textarea cols="70" rows="10">'.htmlspecialchars($scripttext).'</textarea></center>';
}
?></td>
</tr>
</table>
</form>