Variabili <body>

Leviathan73

Nuovo Utente
28 Apr 2008
13
0
0
Salve a tutti.. dovrei aggiungere le variabili <body></body> in questo codice, per mettere lo sfondo colore.. mi sapete dire dove bisogna aggiungerli esattamente? Grazie 1000!
PHP:
<? include("../tools/ipban.php"); ?>  
<? include("../tools/admin.php"); ?>  
<? include("../tools/ban.php"); ?>  
<?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";  

/**  
* @authors Ghost & DEViANCE (CODEMAFiA.ORG)  
* @copyright 2008-2009 Mobile Chat  
* @version 2.0.0 (wml 1.1 EN)  
*/  


$nimi      = $_REQUEST['nimi'];  
$salasana  = $_REQUEST['salasana'];  

$swe_from = array("","","","","","","$","&","");   
$swe_to = array("", "", "", "", "", "","[usd]","[and]","");   


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);  
$viesti = str_replace ($swe_from[$t], $swe_to[$t], $viesti);  
}   





$salasana=crypt($salasana,'password');  
$salnim=file('../text/nims.txt');  
$salsan=file('../text/sals.txt');  
for ($i=0; $i<count($salnim); $i++)   
{ if (rtrim($salsan[$i])==$salasana && rtrim($salnim[$i])==$nimi){$a="1";}}  
if ($a !="1"){  

echo "<wml>";  
echo "<card title=\"Chat\">";  
echo "<p align=\"center\">";  

echo "<small>System:<br/>---<br/><b>*</b>You are NOT logged in! please hit the login button if this matter persist please email one of the staff and we will try to sort the problem asap thanx :-)<br/>";  
echo "<a href=\"../index.php\">« Login page</a>";  

echo "<br/>---<br/>©powered by UNIVERSAL 3000 </small>";  
echo "</p>";  
echo "</card>";  
echo "</wml>";  
exit();  
}  

$aikanyt=time();  
$aika=file('../text/ajat.txt');  
$ero=$aikanyt-$aika[0];  
if ($ero>=120){  
$peke = fopen('../text/chatpaikalla.txt', 'r+');  
 ftruncate ($peke,0);  
 fclose($peke);  
}  
$tiedo = fopen('../text/ajat.txt', 'r+');  
 ftruncate ($tiedo,0);   
$tos=$aikanyt;  
  fputs($tiedo, $tos);  
  fclose($tiedo);  


$sama=0;  
$paikalla=file('../text/paikalla.txt');  
for ($u=0; $u<count($paikalla); $u++)   
{  
 if (rtrim($paikalla[$u])==$nimi)  
 {$sama="1";$u=count($paikalla)+1;}  
}  
if ($nimi != "hiddenname" && $sama != "1")   
{  
 $tie = fopen('../text/paikalla.txt', 'r+');  
  $ko=file_get_contents ('../text/paikalla.txt');  
  $to=$nimi .'  
'. $ko;  
  fputs($tie, $to);  
  fclose($tie);  
}  
$lis=0;$katsos=0;$tyhja='';  
$jepulio=file('../text/paikalla.txt');  
$privaviestit=file('../text/aaa.txt');  
$salasana=crypt($salasana,'password');  
$chatpaik=file('../text/chatpaikalla.txt');  
$sama=0;  
for ($u=0; $u<count($chatpaik); $u++)   
{  
$alio=explode("",$chatpaik[$u]);  
 if (rtrim($alio[0])==$nimi)  
 {$sama="1";$u=count($chatpaik)+1;}  
}  
if ($nimi != "hiddenname" && $sama != "1") {  

 $tie = fopen('../text/chatpaikalla.txt', 'r+');  
  $ko=file_get_contents ('../text/chatpaikalla.txt');  
  $to=$nimi .''.time().'  
'. $ko;  
  fputs($tie, $to);  
  fclose($tie);  
}  
if ($sama=="1"){  
$tie = fopen('../text/chatpaikalla.txt', 'r+');  
$jui=file('../text/chatpaikalla.txt');  
  $ko=file_get_contents ('../text/chatpaikalla.txt');  
 for ($i=0; $i<count($jui); $i++)   
{  
$alo=explode("",$jui[$i]);  
if ($nimi==$alo[0]){$hee=$jui[$i];}  
}  
 $ko = str_replace ($hee,$nimi.''.time().'  
', $ko);   
  fputs($tie, $ko);  
  fclose($tie);  
}  

$tie = fopen('../text/chatpaikalla.txt', 'r+');  
$jui=file('../text/chatpaikalla.txt');  
  $ko=file_get_contents ('../text/chatpaikalla.txt');  
 for ($i=0; $i<count($jui); $i++)   
{  
$hee=$jui[$i];  
$alo=explode("",$jui[$i]);  
$erotus=time()-$alo[1];  
if ($erotus>=120){$ko = str_replace ($hee,'',$ko);}  
}  
  ftruncate($tie,0);  


  fputs($tie, $ko);  
  fclose($tie);  



include("modtools.php");  

include ("admintools.php");  

include ("ownertools.php");  



$salsan=file('../text/sals.txt');  
$salnim=file('../text/nims.txt');  

echo "<wml>";  

echo "<head>";  
echo "<meta http-equiv=\"Cache-Control\" content=\"max-age=0\"/>";  
echo "</head>";
 
Ciao luke quello che ho messo è metà di codice del file chat.php, ovvero la stanza dove si chatta! E' solo per cellulari, e vorrei inserire uno sfondo (background) con un colore qualsiasi, e testo dei messaggi con colore. Mi hanno detto che per inserire colore ci vuole la variabile <body>, forse si deve modoficare il codice..sai come si puo' mettere il colre..o modificare questo codice per poter inserire il tag <body> ??
 
Ho fatto copia incolla come mi hai indicato, e mi compare questo..
Parse error: syntax error, unexpected T_STRING, expecting ',' or ';'in /membri/universal3000/chat_universal/room1/chat.php on line 160
 
Ho messo così
PHP:
echo "</head><body style=\"background-color: #FFFF66;\">";
e ora mi spunta ..
The Requested Page can not be displayed
 

Discussioni simili