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

Размер файла: 2.22Kb
<?php
header("Content-type: text/vnd.wap.wml; charset=ISO-8859-1");
echo "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"
\"http://www.wapforum.org/DTD/wml_1.1.xml\">\n";
echo "<!-- MobiiliChat v1.1 -->\n";
echo "<!-- Copyright (C) 2004-2005 Keijo Kangas ([email protected]) -->\n";

$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');

$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 "<small>To user:</small><input name=\"kenelle\" type=\"text\" value=\"".$kenelle."\" format=\"*x\" maxlength=\"15\" emptyok=\"true\"/><br/>";
echo "<small>Msg:</small><input name=\"viesti\" value=\"\" type=\"text\" maxlength=\"128\" emptyok=\"true\"/><br/>";
echo "<small>\n";
echo "<anchor>[Send/Back]";
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>[Chatroom]";
echo "<go method=\"post\" href=\"chat.php\">";
echo "<postfield name=\"salasana\" value=\"$(salasana)\"/>";
echo "<postfield name=\"nimi\" value=\"$(nimi)\"/>";
echo "</go>";
echo "</anchor>";
echo "</small>\n";
echo "</p>";
echo "</card>";
echo "</wml>";
?>