Просмотр файла mobilechat_v1.04/privkirj.php

Размер файла: 2.27Kb
<?php
header("Content-type: text/vnd.wap.wml");
echo "<?xml version=\"1.0\"?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"
\"http://www.wapforum.org/DTD/wml_1.1.xml\">";

$swe_from = array("ГҐ","Г¤","Г¶","Г…","Г„","Г–","$","&"); 
$swe_to = array("е", "д", "ц", "Е", "Д", "Ц","d","j"); 

for ($t=0; $t<count($swe_from); $t++) 
{ 
$nimi = str_replace ($swe_from[$t], $swe_to[$t], $nimi); 
$salasana = str_replace ($swe_from[$t], $swe_to[$t], $salasana);
} 


$salasana=crypt($salasana,'password');
$privanimet=file('privnims.txt');
$privaviestit=file('privnea.txt');
$salnim=file('nims.txt');
$salsan=file('sals.txt');
if ($kenelle==''){$kenelle='?';}
for ($i=0; $i<count($salnim); $i++) 
{ if (rtrim($salsan[$i])==$salasana && rtrim($salnim[$i])==$nimi){$a="1";}}
if ($a !="1"){
echo "<wml>";
echo"<head>";
echo "<meta http-equiv=\"Cache-Control\" content=\"no-cache\"/>";
echo "</head>";
echo "<card newcontext=\"true\" title=\"New message\">";
echo "<p>";
echo "<a href=\"home.php\">Home</a>";
echo "</p>";
echo "</card>";
echo "</wml>";
exit();
}
echo "<wml>";
echo "<card title=\"New message\">";
echo "<p>";
echo "To user:<input name=\"kenelle\" type=\"text\" value=\"".$kenelle."\" format=\"*x\" maxlength=\"12\" emptyok=\"true\"/><br/>";
echo "Msg:<input name=\"viesti\" value=\"\" type=\"text\" maxlength=\"128\" emptyok=\"true\"/><br/>";
echo "<anchor>Send";
echo "<go method=\"post\" href=\"prividis.php?time=";
;echo date('ymHis');echo "\">";
echo "<postfield name=\"nimi\" value=\"$(nimi)\"/>";
echo "<postfield name=\"salasana\" value=\"$(salasana)\"/>";
echo "<postfield name=\"viesti\" value=\"$(viesti)\"/>";
echo "<postfield name=\"kenelle\" value=\"$(kenelle)\"/>";
echo "</go>";
echo "</anchor> ";
echo "<anchor>Chat";
echo "<go method=\"post\" href=\"chat.php\">";
echo "<postfield name=\"salasana\" value=\"$(salasana)\"/>";

echo "<postfield name=\"nimi\" value=\"$(nimi)\"/>";
echo "</go>";
echo "</anchor>";
echo " <anchor>Pvt";
echo "<go method=\"post\" href=\"prividis.php?time=";
;echo date('ymHis');echo "\">";
echo "<postfield name=\"salasana\" value=\"$(salasana)\"/>";

echo "<postfield name=\"nimi\" value=\"$(nimi)\"/>";
echo "</go>";
echo "</anchor><br/>";
echo "</p>";
echo "</card>";
echo "</wml>";
?>