Qui è dove si può scaricare: http://www.gdr-online.com/download/traimo.zip
Il file da modificare è "ChatMainFrame.php", questo è il codice della pagina:
Codice PHP:
<?PHP
session_start();
include "../controlla_login.php";
include "../config.inc.php";
$LOCAZIONE=$_GET['LOCAZIONE'];
?>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta HTTP-EQUIV="Refresh" CONTENT="17" >
<link rel="stylesheet" href="../stile.css" type="text/css">
<title>ChatMainFrame</title>
<script language="javascript">
function gotoBottom(){
window.scrollBy(0,99999);
}
window.onload = gotoBottom;
if(self.name==top.name){location.href="ChatMainFrame.php"}
</script>
</head>
<body topmargin="5" bottommargin="5" leftmargin="5" rightmargin="5">
<table width="90%" height="100%" border="0" align="center" cellpadding="1" cellspacing="0">
<tr>
<td valign="top">
<?PHP
$sql = "SELECT ID_CHAT,USER_CHAT,MSG_CHAT,SESSO_CHAT,URLSESSO_CHA T,DATA_CHAT,TIPO_CHAT,SIMB_CHAT,URLCORP_CHAT,DESTI NATARIO,CARICA_CHAT,CASATA_CHAT FROM CHAT WHERE LUOGO_CHAT='$LOCAZIONE' ORDER BY ID_CHAT";
$query = mysql_query ($sql, $connessione) or die(mysql_error());
{
while ($row=mysql_fetch_array($query)){
$ID_CHAT=$row["ID_CHAT"];
$USER_CHAT=$row["USER_CHAT"];
$MSG_CHAT=$row["MSG_CHAT"];
$DATA_CHAT=$row["DATA_CHAT"];
$SESSO_CHAT=$row["SESSO_CHAT"];
$URLSESSO_CHAT=$row["URLSESSO_CHAT"];
$TIPO_CHAT=$row["TIPO_CHAT"];
$URLCORP_CHAT=$row["URLCORP_CHAT"];
$SIMB_CHAT=$row["SIMB_CHAT"];
$CARICA_CHAT=$row["CARICA_CHAT"];
$CASATA_CHAT=$row["CASATA_CHAT"];
$DESTINATARIO=$row["DESTINATARIO"];
if ($TIPO_CHAT==Messaggio){
?>
<table width='100%' border='0' cellspacing='0' cellpadding='0'>
<tr>
<td valign='top' class='ChatMsg'><?=$DATA_CHAT?> <img src=<?=$URLSESSO_CHAT?> alt='<?=$SESSO_CHAT?> - <?=$CASATA_CHAT?>' width="10" height="10" border='0' align="absmiddle"> <font class='ChatMsgB'><?=$USER_CHAT?></font> <img src=grafica/<?=$URLCORP_CHAT?> alt='<?=$SIMB_CHAT?> - <?=$CARICA_CHAT?>' width="20" height="20" border='0' align="absmiddle"> <?=$MSG_CHAT?></td>
</tr>
</table>
<?PHP
}
else if ($TIPO_CHAT==Azione){
?>
<div class='ChatAct'><?=$USER_CHAT?> <?=$MSG_CHAT?></div>
<?PHP
}
else if ($TIPO_CHAT==Dadi){
?>
<div class='ChatDadi'><?=$MSG_CHAT?></div>
<?PHP
}
else if ($TIPO_CHAT==Narra){
?>
<p align=center class='ChatFato'><img src=who.gif alt='<?=$USER_CHAT?>' width='18' height='18' align="absmiddle" aligna='absmiddle'><?=$MSG_CHAT?></p>
<?PHP
}
else if ($TIPO_CHAT==Immagine){
?>
<p align=center><img src=<?=$MSG_CHAT?> alt='Immagine di supporto'></p>
<?PHP
}
else if ($TIPO_CHAT==Sussurro){
/*Inviante sussurro*/
if(strtoupper($DESTINATARIO) !="Tutti" AND strtoupper($USER_CHAT) == strtoupper($_SESSION['USERNAME'])){
?>
<table width=100% border=0 cellspacing=0 cellpadding=0>
<tr><td align=center class='ChatSussurro2'>Hai sussurrato a <b><?=$DESTINATARIO?></b>:</td></tr>
<tr><td align=left class='ChatSussurro'> <?=$MSG_CHAT?></td></tr></table>
<?PHP
/*Ricevente sussurro*/
}elseif(strtoupper($DESTINATARIO)==strtoupper($_SE SSION['USERNAME'])){
?>
<table width=100% border=0 cellspacing=0 cellpadding=0>
<tr><td align=center class='ChatSussurro2'><b><?=$USER_CHAT?></b> ti ha sussurrato:</td></tr>
<tr><td align=left class='ChatSussurro'> <?=$MSG_CHAT?></td></tr></table>
<?PHP
}
}
}
}
@mysql_close ($connessione);
?>
</td>
</tr>
</table>
</body>
</html>