Просмотр файла index.php

Размер файла: 1.86Kb
<!------------------------------------------------------------------------------------------------------------------------
Автор: SHuRiK
WmId:287602174032
WMR:R338551915279
WMZ:Z850050838586
ICQ: 377 24[восемь] 037
MAIL: [email protected]
Скрипт: перераскладчик v.1.0
Цена: бесплатно)
------------------------------------------------------------------------------------------------------------------------>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />
<title>Перераскладчик клавиатуры</title>
</head>
<body>

<?
if(!isset($_POST['text'])){
echo '
<form action="" method="post">
<textarea name="text" cols="25" rows="5"></textarea><br>

<label>
<input type="radio" name="lang" value="1" />
ЙЦУК > QWERT</label>
<br />
<label>
<input type="radio" name="lang" value="2" />
QWERT > ЙЦУКT</label>
<br />

<input name="" type="submit" value="Переверсти" /></form>';}


else
{
$text=$_POST['text'];

$search=array(
"q","w","e","r","t","y","u","i","o","p","[","]", "a","s","d","f","g","h","j","k","l",";","'", "z","x","c","v","b","n","m",",",".","/",
"Q","W","E","R","T","Y","U","I","O","P","{","}", "A","S","D","F","G","H","J","K","L",":","\"", "Z","X","C","V","B","N","M","<",">","?");

$replace=array(
"й","ц","у","к","е","н","г","ш","щ","з","х","ъ", "ф","ы","в","а","п","р","о","л","д","ж","э", "я","ч","с","м","и","т","ь","б","ю",".",
"Й","Ц","У","К","Е","Н","Г","Ш","Щ","З","Х","Ъ", "Ф","Ы","В","А","П","Р","О","Л","Д","Ж","Э", "Я","Ч","С","М","И","Т","Ь","Б","Ю",",");


if($_POST['lang']==1)$text =str_replace($replace, $search, $text);
if($_POST['lang']==2)$text =str_replace($search, $replace, $text);
echo $text;


}
?>

</body>
</html>