ho messo echo davanti, ora si vede, ma c'è un problema, il codice immagine lo messo nella parte dove mi interessa, ma l'immagine casuale va pure nelle altre stanze di sistema, invece dovrebbe andare solo nella stanza creata. Metto il pezzo di codice dove lo inserito..
[php]<?php
include("config.php");
include("core.php");
connectdb();
$color=$_POST;
$action=$_GET["action"];
$id=$_GET["id"];
$sid = $_GET["sid"];
$rid=$_GET["rid"];
$rpw=$_GET["rpw"];
$uid = getuid_sid($sid);
$uexist = isuser($uid);
$theme = mysql_fetch_array(mysql_query("SELECT theme FROM ibwf_users WHERE id='".$uid."'"));
$data = date("H:i");
if((islogged($sid)==false)||!$uexist)
{
echo "<head>";
echo "<title>Error!!!</title>";
echo "<link rel="stylesheet" type="text/css" href="../themes/white_medium.css">";
echo "</head>";
echo "<body>";
echo "<center>";
echo "Non sei loggato<br/>";
echo "O la tua sessione è scaduta<br/><br/>";
echo "<a href="index.php">Login</a>";
echo "</center>";
echo "</html>";
echo "</body>";
exit();
}
if(isbanned($uid))
{
echo "<head>";
echo "<title>Error!!!</title>";
echo "<link rel="stylesheet" type="text/css" href="../themes/$theme[0]">";
echo "</head>";
echo "<body>";
echo "<p align="center">";
echo "<img src="../images/notok.gif" alt="x"/><br/>";
echo "<b>Sei stato Bannato</b><br/><br/>";
$banto = mysql_fetch_array(mysql_query("SELECT timeto, pnreas, exid FROM ibwf_penalties WHERE uid='".$uid."' AND penalty='1' OR uid='".$uid."' AND penalty='2'"));
$banres = mysql_fetch_array(mysql_query("SELECT lastpnreas FROM ibwf_users WHERE id='".$uid."'"));
$remain = $banto[0]- time();
$rmsg = gettimemsg($remain);
echo "<b>Tempo rimasto: </b>$rmsg<br/>";
$nick = getnick_uid($banto[2]);
echo "<b>By: </b>$nick<br/>";
echo "<b>Motivo: </b>$banto[1]";
//echo "<a href="index.php">Login</a>";
echo "</p>";
echo "</body>";
echo "</html>";
exit();
}
$rooms = mysql_query("SELECT id, name, pass, pic FROM ibwf_rooms WHERE static='0'");
$ilink = $room[3];
if($ilink=="")
{
echo $ilink = "<img src="../images/logo.gif" alt=""/>";
}else{
echo $ilink = "<img src="$ilink" alt=""/>";
}
echo "<br/>";
$pic = mysql_escape_string($_POST["pic"]);
$pic = htmlspecialchars($pic);
$res = mysql_query("INSERT INTO ibwf_rooms SET name='".$rname."', pass='".$rpass."', censord='".$cns."', static='0', lastmsg='".time()."', pic='".$pic."'");
echo "<link rel="stylesheet" type="text/css" href="../themes/$theme[0]">";
echo "</head>";
echo "<body>";
echo "<center>";
echo "<b>La Room non esiste</b><br/><br/>";
echo "<a href="index.php?action=chat&sid=$sid">Chatrooms</a>";
echo "</center>";
echo "</body>";
echo "</html>";
exit();
}
$passworded = mysql_fetch_array(mysql_query("SELECT pass FROM ibwf_rooms WHERE id='".$rid."'"));
if($passworded[0]!="")
{
if($rpw!=$passworded[0])
{
echo "<head>";
echo "<title>Error!!!</title>";
echo "<link rel="stylesheet" type="text/css" href="../themes/$theme[0]">";
echo "</head>";
echo "<body>";
echo "<center>";
echo "<b>Password Errata!</b><br/>";
echo "Non è possibile entrare in questa stanza<br/><br/>";
echo "<a href="index.php?action=chat&sid=$sid">Chatrooms</a>";
echo "</center>";
echo "</body>";
echo "</html>";
exit();
}
}
if(!canenter($rid,$sid))
{
echo "<head>";
echo "<title>Error!!!</title>";
echo "<link rel="stylesheet" type="text/css" href="../themes/$theme[0]">";
echo "</head>";
echo "<body>";
echo "<center>";
echo "<b>Autorizzazione negata!</b><br/><br/>";
echo "<a href="index.php?action=chat&sid=$sid">Chatrooms</a>";
echo "</center>";
echo "</body>";
echo "</html>";
exit();
}
$mmsg = htmlspecialchars(getsetmood(getuid_sid($sid)));
addonline($uid,"Chatta in $rname ($mmsg)","chat.php?rid=$rid&rpw=$rpw");
//echo "<p>";
echo popup($sid);
echo "<b>1 </b><a name="top" id="top" accesskey="1" href="chat.php?action=say&sid=$sid&rid=$rid&rpw=$rpw">Scrivi</a><br/>";
echo "<b>2 </b><a accesskey="2" href="#opt">vai giu</a><br/>";
echo "<b>* </b><a accesskey="*" href="chat.php?time=";
echo "".date("dmHis")."";
echo "&sid=$sid&rid=$rid&rpw=$rpw">Aggiorna</a><br/>";