<?php if (!isset($_POST['convert'])) { echo "\n<html>\n <head><title>lat2cyr test form</title></head>\n\t<body>\n\t <form action=forms_test.php method=POST>\n\t <textarea name=input rows=10 cols=60>Pro Scheloch'</textarea><br>\n\t <input name=how type=radio value=0 checked>lat2cyr test<br>\n\t <input name=how type=radio value=1>cyr2lat test<br> \n\t <input type=submit name=convert value='GO!'>\n\t </form>\n\t</body>\n</html>"; exit; } require_once "../cyrlat.class.php"; $cyrlat = new CyrLat(); $input = $_POST['input']; $how = $_POST['how']; switch ($how) { case 0: $result = $cyrlat->lat2cyr($input); break; case 1: $result = $cyrlat->cyr2lat($input); break; } echo "\n<html>\n <head><title>latr2cyr test result</title></head>\n\t<body>\n\t<h1>Result:</h1>\n\t <form action=forms_test.php method=POST>\n\t <textarea rows=10 cols=60 disabled=true>{$result}</textarea><br>\n\t<h1>Try Again?</h1>\n \t <textarea name=input rows=10 cols=60>{$input}</textarea><br>\n\t <input name=how type=radio value=0 checked>lat2cyr test<br>\n\t <input name=how type=radio value=1>cyr2lat test<br> \n\t <input type=submit name=convert value='GO!'>\t \n\t </form>\n\t</body>\n</html>";
<?php require_once "cyrlat.class.php"; $text = new CyrLat(); $input = "Привет, Мир!"; echo $text->cyr2lat($input); echo "<hr>\n"; $input = "Privet, Mir!"; echo $text->lat2cyr($input);
<?php if (!isset($_POST['convert'])) { echo "\n<html>\n <head><title>lat2cyr test form</title></head>\n\t<body>\n\t <form action=cyr2lat_test.php method=POST>\n\t <textarea name=input>Pro Scheloch'</textarea><br>\n\t <input type=submit name=convert value='GO!'>\n\t </form>\n\t</body>\n</html>"; exit; } require_once "../cyrlat.class.php"; $cyrlat = new CyrLat(); $input = $_POST['input']; $result = $cyrlat->cyr2lat($input); echo "\n<html>\n <head><title>latr2cyr test result</title></head>\n\t<body>\n\t<h1>Result:</h1>\n\t <form action=cyr2lat_test.php method=POST>\n\t <textarea>{$result}</textarea><br>\n\t<h1>Try Again?</h1>\n \t <textarea name=input>{$input}</textarea><br>\n\t <input type=submit name=convert value='GO!'>\t \n\t </form>\n\t</body>\n</html>";
<?php require_once "lib/config.php"; require_once "lib/Php.php"; require_once "../../cyrlat.class.php"; $JsHttpRequest = new Subsys_JsHttpRequest_Php("windows-1251"); $q = $_REQUEST['q']; $text = new CyrLat(); $_RESULT = array("q" => $q, "cyr" => $text->lat2cyr($q));
<?php if (!isset($_POST['convert'])) { echo "\n<html>\n <head><title>lat2cyr test form</title></head>\n\t<body>\n\t <form action=lat2cyr_test.php method=POST>\n\t <textarea name=input>Pro Scheloch'</textarea><br>\n\t <input type=submit name=convert value='GO!'>\n\t </form>\n\t</body>\n</html>"; exit; } require_once "../cyrlat.class.php"; $cyrlat = new CyrLat(); $input = $_POST['input']; $result = $cyrlat->lat2cyr($input); echo "\n<html>\n <head><title>latr2cyr test result</title></head>\n\t<body>\n\t<h1>Result:</h1>\n\t <form action=lat2cyr_test.php method=POST>\n\t <textarea>{$result}</textarea><br>\n\t<h1>Try Again?</h1>\n \t <textarea name=input>{$input}</textarea><br>\n\t <input type=submit name=convert value='GO!'>\t \n\t </form>\n\t</body>\n</html>";