nella file index.php non ce il file logout. ora inserisco lo script index. lo devo mettere tra queste virgolette? "" è una chat per il wap
Codice PHP:
<?php
header("Content-type: text/vnd.wap.wml");
header("display_errors=0");
echo "<?xml version=\"1.0\"?>";
echo "<!DOCTYPE wml PUBLIC \"-//WAPFORUM//DTD WML 1.1//EN\"
\"http://www.wapforum.org/DTD/wml_1.1.xml\">";
echo "<!-- procore@waprave.net -->\n";
echo "<wml>\n";
echo "<head><meta http-equiv=\"Cache-Control\" content=\"no-cache\" forua=\"true\"/></head>";
echo "<card title=\"UNIVERSAL 3000\">\n";
echo "<p align=\"center\">";
echo "<small>";
echo "Benvenuti nella<br/><b>CHAT UNIVERSAL</b><br/>---<br/>";
$xfile = @file("random.txt");
$random_num = rand (0,count($xfile)-1);
$udata = explode("::",$xfile[$random_num]);
echo "$udata[1]<br/>---<br/>";
echo "".count(file('chatpaikalla.txt'))."\n";
echo " users chatting";
echo "<br/><br/>---<br/>";
echo "<b>";
include ("shout.php");
echo "</b>";
echo "</small>";
$fp = fopen("chk.txt","a+");
if(filesize("chk.txt")>0)
{
$dv = fread($fp,filesize("chk.txt"));
}else{
$dv = "";
}
fclose($fp);
$nd = date("d-m-Y");
if($nd!=$dv)
{
$fp = fopen("chk.txt","w");
fwrite($fp, $nd);
fclose($fp);
$fp = fopen("chat.txt","w+");
ftruncate($fp,0);
fclose($fp);
$fp = fopen("privnea.txt","w+");
ftruncate($fp,0);
fclose($fp);
}
echo "<br/><small>Username:<br/></small><input name=\"nimi\" type=\"text\" format=\"*x\" maxlength=\"15\" emptyok=\"true\"/><br/>";
echo "<small>Password:<br/></small><input name=\"salasana\" type=\"password\" format=\"*x\" maxlength=\"15\" emptyok=\"true\"/><br/>";
echo "<small><anchor>LOGIN\n";
echo "<go method=\"post\" href=\"login.php\">\n";
echo "<postfield name=\"nimi\" value=\"$(nimi)\"/>\n";
echo "<postfield name=\"salasana\" value=\"$(salasana)\"/>\n";
echo "</go>\n";
echo "</anchor></small><br/>";
echo "<small><a href=\"registerrules.php\">REGISTER</a></small><br/ >";
echo "<small>";
echo "<br/><a href=\"http://universal3000.altervista.org/inizio. html\">UNIVERSAL 3000</a><br/>Leviathan73";
echo "</small>";
echo "</p>";
echo "</card>\n";
echo "</wml>\n";
?>
Dove bisogna mettere il file logout?