Migrazione da PHP4 a PHP5

Levian

Utente Attivo
30 Set 2008
51
0
0
Certo.

Dato che alcune pagine sono superiori ai 15000 caratteri massimi consentiti dai messaggi del forum ti invierò le pagine "spezzettate". ^^

Prima parte profilol.php:

PHP:
<? session_start();
include ('inc/variabile1.php');
include ('inc/variabile2.php');
If (($HTTP_GET_VARS["Login"] != "") or ($HTTP_POST_VARS["Login"] != "")) {$Login = "";};
$pg = trim(urldecode($pg));
$Modifica = trim($Modifica);
$upd = ((strtoupper($pg) == strtoupper($Login)) and (trim($pg) != "") and (strtoupper($Modifica) == strtoupper($pg)));

if (($_SESSION['Admin_S']=='1') AND ($par_Flag_AdminExt=='1')) {
	$_SESSION['AdminExt_S'] = $_GET['AdminExt'];
}

function BottoneGestione($Gst_Titolo, $Gst_Sigla, $Gst_Link) {
	return '<tr><td colspan=6 align=left Title="'.htmlspecialchars($Gst_Titolo).'"><a href="'.$Gst_Link.'"><img border=0 src="_altervista_ht/trattino.gif"> <font color=black>'.htmlspecialchars($Gst_Titolo).'</font></a></font></td></tr>';
}

function formattadata($tim)
{
	return strftime("%d/%m/%Y", strtotime($tim));
}

function barra($valore, $maxvalore)
{
$colore = "black";
$colore1 = "black";

$bar = '<table cellpadding=0 cellspacing=0 border=0 width="'.$valore.'" height=10>';
$bar .= '<tr><td align=right bgcolor="'.$colore.'" width=';
if ($valore > 100) {
    $bar .= '100><font color=black>+</font>';
}
else
{
    $bar .= $valore.'><img src=\'\' width='.$valore.' height=1>';
};
$bar .= "</td>";
if (($maxvalore - $valore) > 0) {
$bar .= '<td align=right bgcolor="'.$colore1.'" width=';
$bar .= ($maxvalore - $valore).'><img src=\'\' width='.($maxvalore-$valore).' height=1>';
$bar .= "</td>";
};
$bar .= "</tr>";
$bar .= "</table>\n";
return $bar;
};

#----- pulisci avatar -----

If (($_SESSION['Ban_S'] == 1) && ($_POST['Pulisci'] != '')) {
	$Msg = "<b></b>";
	
	$MySql = "UPDATE Personaggio SET URLImg = '_altervista_ht/trasparente.gif', Descrizione='', ICQ='', Affetti='', Rivali='', Capacita='', Allineamento='', Background='' WHERE Nome = '$pg'";
	mysql_query($MySql);

	$MySql = "INSERT INTO Chat (Stanza, Mittente, Destinatario, Ora, Testo, Sesso, ImgGilda, DescGilda, ImgRazza, DescRazza, Tipo)";
	$MySql .= "VALUES ('$Stanza', '???', '$Login', NOW(), '".addslashes($Msg)."', '$Sesso_S', '$ImgGilda_S', '$DescGilda_S', '$ImgRazza_S', '$DescRazza_S', 'S')";
	mysql_query($MySql);
	echo $MySql;
	$BanP = "";

	echo "<font color=black>$Msg</font>";

}

#----- inizio prigione e ban -----

$BanP = "";

If (($_SESSION['Ban_S'] == 1) && ($_POST['BAN'] != '')) {
	$Motivo = $_POST['Motivo_Ban'];
	$BanP = "'2040-01-01 00:00:00'";
	if ($_POST['IP'] == 'on') {
		$Msg = "<b></b>";

		$MySql = "SELECT * FROM LogEntrate WHERE Nome = '$pg' ORDER BY DataEvento DESC";
		$Result = mysql_query($MySql);
		$rs = mysql_fetch_array($Result);
		$IPEscluso = $rs["IP"];
		$rs->close;
		
		$MySql = "INSERT INTO BlackList (IP, Nota, Ora) VALUES ";
		$MySql .= "('$IPEscluso', '$pg (escluso da $Login)', Now())";
		$Result = mysql_query($MySql);

	} else {
		$Msg = "<b></b>";
	}
	if ($_POST['Grazia'] == 'on') {
		$BanP = "'".strftime("%Y-%m-%d %H:%M:%S")."'";
		$Msg = "<b></b>";
	}
}

If (($_SESSION['Prigione_S'] == 1) && ($_POST['Arresta'] != '')) {
	$Motivo = $_POST['Motivo_Arresto'];
	
	$MySql = "SELECT Ban From Personaggio WHERE Nome = '$pg'";
	$Result = mysql_query($MySql);
	$rs = mysql_fetch_array($Result);
	
	if ($rs["Ban"] == '2040-01-01 00:00:00') {
		$Msg = "<b></b>";
		$MySql = "INSERT INTO Chat (Stanza, Mittente, Destinatario, Ora, Testo, Sesso, ImgGilda, DescGilda, ImgRazza, DescRazza, Tipo)";
		$MySql .= "VALUES ('$Stanza', '???', '$Login', NOW(), '$Msg', '$Sesso_S', '$ImgGilda_S', '$DescGilda_S', '$ImgRazza_S', '$DescRazza_S', 'S')";
		$Result = mysql_query($MySql);
		$BanP = "";
		
		echo "<font color=black>$msg</font>";
		
	} else {
	    $BanP = "DATE_ADD(NOW(), INTERVAL '$gg' DAY)";
		$Msg = "<b></b>";

	$MySql = "INSERT INTO LogPunizioni (Nome, Motivo, Giorni, Data, EseguitoDa)";
	$MySql .= "VALUES ('$pg', '$Motivo', '$gg', NOW(), '$Login')";
	$Result = mysql_query($MySql);

	}
}

if ($BanP != "") {
	
	$MySql = "UPDATE Personaggio SET Ban = $BanP";
	$MySql .= ", ConfermaDataBan = NOW()";
    $MySql .= ", Motivo = '$Motivo'";
    $MySql .= ", AutoreBan = '$Login'";
    $MySql .= " WHERE Nome = '$pg'";
	$Result = mysql_query($MySql);

	$MySql = "INSERT INTO Chat (Stanza, Mittente, Destinatario, Ora, Testo, Sesso, ImgGilda, DescGilda, ImgRazza, DescRazza, Tipo)";
	$MySql .= "VALUES ('$Stanza', '???', '$Login', NOW(), '$Msg', '$Sesso_S', '$ImgGilda_S', '$DescGilda_S', '$ImgRazza_S', '$DescRazza_S', 'S')";
	$Result = mysql_query($MySql);
	
	echo "<font color=black>$Msg</font>";
}

If ((trim($pass) != "") AND (strtoupper($pg) == strtoupper($Login)))
{
 echo('');
# $pass = pars($pass);
# $background = substr($background, 0, 255);
# $background = trim($background);
 $email = trim($email);
 $urlimg = trim($urlimg);
 $urlimg = substr($urlimg, 0, 255);
 #$urlimg = pars($urlimg);

 	$DataNascita = '';
	$gg = 0 + $gg;
	$mm = 0 + $mm;
	$aaaa = 0 + $aaaa;
    
if (($rs["DataNascita"] == "") || ($rs["DataNascita"] == "0000-00-00")) {
	 
	if (($gg>0) && ($mm>0) && ($aaaa>0)) {
		if ($gg < 10) {
			$gg = "0".$gg;
		}
		if ($gg > 31) {
			$gg = 0;
		}
		if ($mm < 10) {
			$mm = "0".$mm;
		}
		if ($mm > 12) {
			$mm = 0;
		}
		if ($aaaa < 100) {
			$aaaa = "19".$aaaa;
		}
		if (($aaaa > 2000) || ($aaaa < 1900)) {
			$aaaa = 0;
		}
		$DataNascita = "".$aaaa."-".$mm."-".$gg;
	}
}
 
	if ($background == "") {$background = "Nessuna Informazione.";};
	if ($email == "") {$email = "nessuna";};

	$MySql = "UPDATE Personaggio";
	$MySql .= " SET Pass = '".$pass."',";
	$MySql .= " Background = '".$background."',";
	$MySql .= " UrlImg = '".$urlimg."'";
	If ($DataNascita != "") {
		$MySql .= ", DataNascita = '".$DataNascita."'";
	}
	$MySql .= " WHERE Nome = '".$pg."'";

	$Result = mysql_query($MySql);
#	mysql_fetch_array($Result);
}

$MySql = "SELECT Personaggio.*, Razza.Razza, Razza.URLImg AS URLImgRazza, Gilda.Gilda, Gilda.URLImg AS URLImgGilda
         FROM Personaggio
         LEFT JOIN Razza
         ON Personaggio.IDRazza = Razza.IDRazza
         LEFT JOIN Gilda
         ON Personaggio.IDGilda = Gilda.IDGilda
         WHERE Nome = '$pg'";
		$result = mysql_query($MySql);

#echo $MySql;

$rs = mysql_fetch_array($result);

if ((trim($pg) == "") or !($rs)) {
   $rs->close;
   mysql_close;
   echo("<script><!--\nhistory.back();\n//-->\n</script>");
   exit();
};
    #########################################
    # Il Recordset non è vuoto              #
    #########################################

$UrlImg = trim($rs["URLImg"]."");
If ($UrlImg == "")
   $UrlImg = "_altervista_ht/trasparente.gif";
$UrlImgRazza = trim($rs["URLImgRazza"]."");
If ($UrlImgRazza == "")
   $UrlImgRazza = "";
$UrlImgGilda = trim($rs["URLImgGilda"]."");
If ($UrlImgGilda == "")
   $UrlImgGilda = "niente.gif";
   
$Gilda = trim($rs["Gilda"]."");
if ($Gilda == "") {
	if (strtolower($rs["Sesso"]) == "f") {
		$Gilda = "Nessuno";
	} else {
		$Gilda = "Nessuno";
	}
}
$DataUltimaGilda = $rs['DataUltimaGilda'];

include ('inc/variabile4.php');
?>
<html>
<head>
<title>Comunity</title>
<style type="text/css">
<!--
.Stile7 {font-size: 9}
body,td,th {
	color: #000000;
	font-weight: Bold;
	font-family: Verdana;
	font-size: 9px;
}
a:link {
	color: #000000;
	text-decoration: none;
}
a:visited {
	text-decoration: none;
	color: #000000;
}
a:hover {
	text-decoration: none;
	color: #000000;
}
a:active {
	text-decoration: none;
	color: #000000;
}
.style1 {font-size: 16px}
-->
</style>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head>
<body bgcolor="fbf4e4">    
    <div align="center">
      <table border=1 width="200" cellspacing=1 cellpadding=1 align="left">
        <tr>
          <td ><div align="center"><span class="Stile7">Nome</span></div></td>
        <td><div align="center"><span class="Stile7">
          <?= $rs["Nome"] ?>
          </span></div></td>
      </tr>
        <tr>
          <td><div align="center"><span class="Stile7">Registrazione</span></div></td>
        <td><div align="center"><span class="Stile7">
          <?=formattadata($rs["DataIscrizione"])?>
          </span></div></td>
      </tr>
        <tr>
          <td><div align="center"><span class="Stile7">Provenienza</span></div></td>
        <td><div align="center"><span class="Stile7">
          <?= $rs["Razza"] ?>
          </span></div></td>
      </tr>
        <tr>
          <td><div align="center"><span class="Stile7">Ubicazione</span></div></td>
        <td><div align="center"><span class="Stile7">
          <?= $rs["Ubicazione"] ?>
          </span></div></td>
      </tr>
        <tr>
          <td><div align="center"><span class="Stile7">Clan</span></div></td>
        <td><div align="center"><span class="Stile7">
          <?	if(intval($rs['IDGilda']) >= 100){
			echo '<a href="corporazioni.php?ID='.intval($rs['IDGilda']/100)*100 .'">';
		} ?> 
          <?= htmlspecialchars($Gilda) ?>
          </span> </div></td>
      </tr>
        <tr>
          <td><div align="center"><span class="Stile7">Specializzazione</span></div></td>
        <td><div align="center"><span class="Stile7">
          <?= $rs["Specializzazione"] ?>
          </span></div></td>
      </tr>
        <tr>
          <td><div align="center"><span class="Stile7">Corrente</span></div></td>
        <td><div align="center"><span class="Stile7">
          <?= $rs["Corrente"] ?>
          </span></div></td>
      </tr>
        <tr>
          <td><div align="center"><span class="Stile7">Jeny</span></div></td>
        <td><div align="center"><span class="Stile7">
          <?= $rs["Soldi"] ?>
          </span></div></td>
      <tr>
        <td><div align="center"><span class="Stile7">Gold Jeny</span></div></td>
        <td><div align="center"><span class="Stile7">
          <?= $rs["GoldJeny"] ?>
        </span></div></td>
      </tr><tr>
        <?
if (isset($Login)) {
   if ($Login == $pg) {
      echo('<td><div align="center">'.$par_FedeltaName.'</div></td><td><div align="center">'.htmlspecialchars($rs["Fedelta"]."").'</div></td>');
	  }
};
?>
        </tr><tr>
          <td><div align="center"><span class="Stile7">Forza</span></div></td>
        <td><div align="center"><span class="Stile7">
          <?= $rs["Forza"] ?>
          </span></div></td>
      </tr>
        <tr>
          <td><div align="center"><span class="Stile7">Destrezza</span></div></td>
        <td><div align="center"><span class="Stile7">
          <?= $rs["Destrezza"] ?>
          </span></div></td>
      </tr>
        <tr>
          <td><div align="center"><span class="Stile7">Costituzione</span></div></td>
        <td><div align="center"><span class="Stile7">
          <?= $rs["Costituzione"] ?>
          </span></div></td>
      </tr>
        <tr>
          <td><div align="center"><span class="Stile7">Intelligenza</span></div></td>
        <td><div align="center"><span class="Stile7">
          <?= $rs["Intelligenza"] ?>
          </span></div></td>
      </tr>
        <tr>
          <td><div align="center"><span class="Stile7">Saggezza</span></div></td>
        <td><div align="center"><span class="Stile7">
          <?= $rs["Saggezza"] ?>
          </span></div></td>
      </tr>
        <tr>
          <td><div align="center"><span class="Stile7">Carisma</span></div></td>
        <td><div align="center"><span class="Stile7">
          <?= $rs["Carisma"] ?>
          </span></div></td>
      </tr>
        <tr>
          <td><div align="center"><span class="Stile7">Tempra</span></div></td>
        <td><div align="center"><span class="Stile7">
          <?= $rs["Tempra"] ?>
          </span></div></td>
      </tr>
        <tr>
          <td><div align="center"><span class="Stile7">Volont&agrave;</span></div></td>
        <td><div align="center"><span class="Stile7">
          <?= $rs["Volonta"] ?>
          </span></div></td>
      </tr>
        <tr>
          <td><div align="center"><span class="Stile7">Unit&agrave; di Esperienza</span></div></td>
        <td><div align="center"><span class="Stile7">
          <?= $rs["Esperienza"] ?>
          </span></div></td>
      </tr>
        <tr>
          <td><div align="center"><span class="Stile7">Nen</span></div></td>
        <td><div align="center"><span class="Stile7">
          <?= $rs["Nen"] ?>
          %</span></div></td>
      </tr><tr><td ><div align="center">Status:</div></td>
        <td><div align="center">
          <?
if ($rs["Ban"] == '2040-01-01 00:00:00') {
	#gmdate("d M Y H:i:s", mktime (0,0,0,12,31,9999))) {
    echo '<div align="center">- PG BANNATO -</div>';
} elseif ($rs["Ban"] > date("Y-m-d H:i:s")) {
	#gmdate("d M Y H:i:s", mktime (0,0,0,12,31,9999))) {
    echo '<div align="center">Pg Bannato.</div>';
}
 ?>
 

Levian

Utente Attivo
30 Set 2008
51
0
0
Seconda parte del file profilol.php:

PHP:
<?= $rs["Status"] ?>
          </div></td>
      </tr>
        <tr>
          <td><div align="center">Sesso:</div></td>
        <td><div align="center">
          <?= $rs["Sesso"] ?>
          </div></td>
      </tr>
        <tr>
          <td colspan="2"><div align="center"><span class="Stile7"><a href="creature/<? if ($rs['Creature'] == '1') {
      echo(''.($rs["Nome"].'').'');
} else {
    echo('nessuna_creatura');
}
?>l.php">Le Creature del PG</a></span></div></td>
      </tr>
        <?
if ($rs['BuonRuolista'] == '1') {
      echo('<tr>
    <td colspan="2"><div align="center"><span class="Stile7">Il Gestore Hisoka gradisce particolarmente lo stile del soggetto: Buon Ruolista</span></div></td>
  </tr>');
};
 ?>
        <?
if ($rs['Hunter'] == '1') {
      echo('<tr>
    <td colspan="2"><div align="center">Il PG &egrave; un Hunter</div></td>
  </tr>');
};
 ?>
        <?
if ($rs['IdeogrammaNen'] == '1') {
      echo('<tr>
    <td colspan="2"><div align="center"><span class="Stile7">Il PG &egrave; un utilizzatore di Nen</span></div></td>');
};
 ?>  
        <?
if ($rs['SerbatoioAura'] == '1') {
      echo('<tr>
    <td colspan="2"><div align="center">Il PG è in grado di sfruttare il Serbatoio Aura');
};
 ?>
        
		</td>
        </tr>
        <tr>
          <td colspan="2"><div align="center">
            <?
	echo('<a href="comunicazioneavviatal.php?Dest='.urlencode($rs["Nome"].'').'">');
    echo('Manda Messaggio');
    echo('</a>');
    ?>
          </div></td>
      </tr>
      </table>
	  <div style="position: absolute; width: 260px; height: 132px; z-index: 1; left: 553px; top: 426px; overflow: auto">
	    <div align="center">
  <table width="200" border="1" align="center">
    <tr>
      <td width="100" align="center"><div align="center"><a href="profilol.php?pg=<?= urlencode($pg) ?>"><strong><font face="Verdana"><strong><font size="5">Profilo</font></strong></font></strong></a></div></td></tr>
      <tr><td width="100" align="center"><div align="center"><a href="profilo2l.php?pg=<?= urlencode($pg) ?>"><strong><font face="Verdana"><strong><font size="5">Proprietà</font></strong></font></strong></a></div></td></tr>
        <tr><td width="100" align="center"><div align="center">
          <?
if (isset($Login)) {
   if ($Login == $pg) {
      echo('<a href="profilo3l.php?pg='.urlencode($pg).'"><font size="5">Aggiorna</font></a></td>');
   }
};
 ?>
        </div>        </tr>
  </table>
<?
if ($rs["Ban"] == '2040-01-01 00:00:00') {
	#gmdate("d M Y H:i:s", mktime (0,0,0,12,31,9999))) {
    echo '<tr><td colspan="6" align="center"><font color=black></font></td></tr>';
} elseif ($rs["Ban"] > date("Y-m-d H:i:s")) {
	#gmdate("d M Y H:i:s", mktime (0,0,0,12,31,9999))) {
    echo '<tr><td colspan="6" align="center"><font color=black></font></td></tr>';
}
#----- Strumenti di Ban o Prigione -----
if ($_SESSION['Ban_S']) {
	echo '<form onSubmit="return Conferma();" action="profilol.php" method=Post><td align="center"><tr><input name="Motivo_Ban" size=10 maxlength=255> <input type=checkbox Name="BAN" Style="font-weight:bold;font-family:Verdana;font-size:8pt"> BAN <input type=checkbox Name=IP Style="font-weight:bold;font-family:Verdana;font-size:8pt"> IP <input Name="Grazia" type=checkbox Style="font-weight:bold;font-family:Verdana;font-size:8pt"> Revoca <input Name="Aggiorna" type=submit value="Aggiorna" Style="font-weight:bold;font-family:Verdana;font-size:8pt"></td></tr><input type=hidden Name=pg value="'.$pg.'"></form></td></tr>';
}
if ($_SESSION['Prigione_S']) {
	echo '<form onSubmit="return Conferma();" action="profilol.php" method=Post></form>';	
}
 ?>
</div>      </div>
</div>
<div style="position: absolute; width: 600px; height: 180px; z-index: 1; left: 217px; top: 17px; overflow: auto">
<table border=1 width="580" height="100">
<tr><td align=justify>
<div align="center"><?
	if ((trim($rs["Note"]."") == "") and !($upd)) {
		echo("Note del Fato:");
         } else {
		echo(str_replace("\n", "<br>", htmlspecialchars($rs["Note"])));
	} ?></div></td></tr>
</table></div>
<div style="position: absolute; width: 320px; height: 171px; z-index: 1; left: 218px; top: 389px; overflow: auto">
<table border=1 width="100%">
<tr><td align=justify>
<table width="100%" border="0">
  <tr><td colspan="4"><div align="center">Skill</div></td></tr>
    <tr><td colspan="4"><div align="center">PRIMARIE</div></td>
    </tr>
  <tr>
    <td>01</td>
    <td>Agilit&agrave;</td>
    <td><div align="center">(<?= $rs["Destrezza"] ?>/8)</div></td>
    <td><div align="right">LV <font size="4">
      <?= $rs["Agilita"] ?>
    </font> su 5 </div></td>
  </tr>
  <tr>
    <td>02</td>
    <td>Ambidestria</td>
    <td><div align="center">(<?= $rs["Costituzione"] ?>/10)</div></td>
    <td><div align="right">LV <font size="4">
      <?= $rs["Ambidestria"] ?>
    </font> su 5 </div></td>
  </tr>
  <tr>
    <td>03</td>
    <td>Armi Bianche </td>
    <td><div align="center">(<?= $rs["Forza"] ?>/8)</div></td>
    <td><div align="right">LV <font size="4">
      <?= $rs["ArmiBianche"] ?>
    </font> su 5</div></td>
  </tr>
  <tr>
    <td>04</td>
    <td>Armi Da Fuoco </td>
    <td><div align="center">(<?= $rs["Destrezza"] ?>/8)</div></td>
    <td><div align="right">LV <font size="4">
      <?= $rs["ArmiDaFuoco"] ?>
    </font> su 5</div></td>
  </tr>
  <tr>
    <td>05</td>
    <td>Conoscenze Mediche </td>
    <td><div align="center">(<?= $rs["Intelligenza"] ?>/8)</div></td>
    <td><div align="right">LV <font size="4">
      <?= $rs["ConoscenzeMediche"] ?>
    </font> su 5</div></td>
  </tr>
  <tr>
    <td>06</td>
    <td>Conoscenze Naturali </td>
    <td><div align="center">(<?= $rs["Tempra"] ?>/6)</div></td>
    <td><div align="right">LV <font size="4">
      <?= $rs["ConoscenzeNaturali"] ?>
    </font> su 5</div></td>
  </tr>
  <tr>
    <td>07</td>
    <td>Conoscenze Scientifiche </td>
    <td><div align="center">(<?= $rs["Intelligenza"] ?>/8)</div></td>
    <td><div align="right">LV <font size="4">
      <?= $rs["ConoscenzeScientifiche"] ?>
    </font> su 5</div></td>
  </tr>
  <tr>
    <td>08</td>
    <td>Diplomazia</td>
    <td><div align="center">(<?= $rs["Carisma"] ?>/10)</div></td>
    <td><div align="right">LV <font size="4">
      <?= $rs["Diplomazia"] ?>
    </font> su 5 </div></td>
  </tr>
  <tr>
    <td>09</td>
    <td>Empatia Animale </td>
    <td><div align="center">(<?= $rs["Tempra"] ?>/6)</div></td>
    <td><div align="right">LV <font size="4">
      <?= $rs["EmpatiaAnimale"] ?>
    </font> su 5 </div></td>
  </tr>
  <tr>
    <td>10</td>
    <td>Furtivit&agrave;</td>
    <td><div align="center">(<?= $rs["Saggezza"] ?>/6)</div></td>
    <td><div align="right">LV <font size="4">
      <?= $rs["Furtivita"] ?>
    </font> su 5 </div></td>
  </tr>
  <tr>
    <td>11</td>
    <td>Guidare</td>
    <td><div align="center">(<?= $rs["Volonta"] ?>/12)</div></td>
    <td><div align="right">LV <font size="4">
      <?= $rs["Guidare"] ?>
    </font> su 5 </div></td>
  </tr>
  <tr>
    <td>12</td>
    <td>Lottare</td>
    <td><div align="center">(<?= $rs["Forza"] ?>/8)</div></td>
    <td><div align="right">LV <font size="4">
      <?= $rs["Lottare"] ?>
    </font> su 5</div></td>
  </tr>
  <tr>
    <td>13</td>
    <td>Schivare</td>
    <td><div align="center">(<?= $rs["Costituzione"] ?>/10)</div></td>
    <td><div align="right">LV <font size="4">
      <?= $rs["Schivare"] ?>
    </font> su 5 </div></td>
  </tr>
  <tr>
    <td>14</td>
    <td>Sensi Sopraffini</td>
    <td><div align="center">(<?= $rs["Saggezza"] ?>/6)</div></td>
    <td><div align="right">LV <font size="4">
      <?= $rs["SensiSopraffini"] ?>
    </font> su 5</div></td>
  </tr>
  <tr>
    <td>15</td>
    <td>Sotterfugio</td>
    <td><div align="center">(<?= $rs["Carisma"] ?>/10)</div></td>
    <td><div align="right">LV <font size="4">
      <?= $rs["Sotterfugio"] ?>
    </font> su 5</div></td>
  </tr>
 

Levian

Utente Attivo
30 Set 2008
51
0
0
Terza parte del file profilol.php:

PHP:
<tr>
    <td colspan="4"><div align="center">SECONDARIE</div></td>
    </tr>
  <tr>
    <td>16</td>
    <td>Afferrare Frecce</td>
    <td><div align="center">(<?= $rs["Destrezza"] ?>/8)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["AfferrareFrecce"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>17</td>
    <td>Affondo Poderoso</td>
    <td><div align="center">(<?= $rs["Forza"] ?>/8)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["AffondoPoderoso"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>18</td>
    <td>Alimentazione Corporea</td>
    <td><div align="center">(<?= $rs["Costituzione"] ?>/10)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["AlimentazioneCorporea"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>19</td>
    <td>Anima Forte</td>
    <td><div align="center">(<?= $rs["Volonta"] ?>/12)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["AnimaForte"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>20</td>
    <td>Arciere Zen</td>
    <td><div align="center">(<?= $rs["Destrezza"] ?>/8)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["ArciereZen"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>21</td>
    <td>Arma Focalizzata</td>
    <td><div align="center">(0/0)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["ArmaFocalizzata"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>22</td>
    <td>Artigianato</td>
    <td><div align="center">(<?= $rs["Destrezza"] ?>/8)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["Artigianato"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>23</td>
    <td>Artista</td>
    <td><div align="center">(<?= $rs["Carisma"] ?>/10)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["Artista"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>24</td>
    <td>Attacco Poderoso</td>
    <td><div align="center">(<?= $rs["Forza"] ?>/8)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["AttaccoPoderoso"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>25</td>
    <td>Attacco Rapido</td>
    <td><div align="center">(0/0)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["AttaccoRapido"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>26</td>
    <td>Autorit&agrave;</td>
    <td><div align="center">(<?= $rs["Intelligenza"] ?>/8)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["Autorita"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>27</td>
    <td>Buttare A Terra</td>
    <td><div align="center">(<?= $rs["Costituzione"] ?>/10)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["ButtareATerra"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>28</td>
    <td>Cacciatore Di Bestie Demoniache</td>
    <td><div align="center">(<?= $rs["Tempra"] ?>/6)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["CacciatoreDiBestieDemoniache"] ?>
    </font> su 3 </div></td>
  </tr>
  <tr>
    <td>29</td>
    <td>Cacciatore Di Bestie Selvagge</td>
    <td><div align="center">(<?= $rs["Tempra"] ?>/6)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["CacciatoreDiBestieSelvagge"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>30</td>
    <td>Cavallerizzo</td>
    <td><div align="center">(<?= $rs["Saggezza"] ?>/6)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["Cavallerizzo"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>31</td>
    <td>Colpo Critico</td>
    <td><div align="center">(<?= $rs["Forza"] ?>/8)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["ColpoCritico"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>32</td>
    <td>Combattere Alla Cieca</td>
    <td><div align="center">(<?= $rs["Saggezza"] ?>/6)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["CombattereAllaCieca"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>33</td>
    <td>Combattere Con Due Armi</td>
    <td><div align="center">(<?= $rs["Costituzione"] ?>/10)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["CombattereConDueArmi"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>34</td>
    <td>Correre</td>
    <td><div align="center">(<?= $rs["Costituzione"] ?>/10)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["Correre"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>35</td>
    <td>Corsa Sulle Pareti</td>
    <td><div align="center">(<?= $rs["Destrezza"] ?>/8)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["CorsaSullePareti"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>36</td>
    <td>Deviare Frecce</td>
    <td><div align="center">(<?= $rs["Destrezza"] ?>/8)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["DeviareFrecce"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>37</td>
    <td>Disciplina</td>
    <td><div align="center">(<?= $rs["Saggezza"] ?>/6)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["Disciplina"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>38</td>
    <td>Esperienza Mercantile</td>
    <td><div align="center">(<?= $rs["Carisma"] ?>/10)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["EsperienzaMercantile"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>39</td>
    <td>Estrazione Rapida</td>
    <td><div align="center">(<?= $rs["Destrezza"] ?>/8)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["EstrazioneRapida"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>40</td>
    <td>Falsificazione</td>
    <td><div align="center">(<?= $rs["Volonta"] ?>/12)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["Falsificazione"] ?>
    </font> su 3 </div></td>
  </tr>
  <tr>
    <td>41</td>
    <td>Finzione</td>
    <td><div align="center">(<?= $rs["Volonta"] ?>/12)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["Finzione"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>42</td>
    <td>Fortuna</td>
    <td><div align="center">(0/0)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["Fortuna"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>43</td>
    <td>Forza Interiore</td>
    <td><div align="center">(<?= $rs["Volonta"] ?>/12)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["ForzaInteriore"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>44</td>
    <td>Furtivo</td>
    <td><div align="center">(0/0)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["Furtivo"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>45</td>
    <td>Galateo</td>
    <td><div align="center">(<?= $rs["Carisma"] ?>/10)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["Galateo"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>46</td>
    <td>Incalzare</td>
    <td><div align="center">(<?= $rs["Forza"] ?>/8)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["Incalzare"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>47</td>
    <td>Incidere</td>
    <td><div align="center">(0/0)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["Incidere"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>48</td>
    <td>Iniziativa</td>
    <td><div align="center">(<?= $rs["Volonta"] ?>/12)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["Iniziativa"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>49</td>
    <td>Inquisitore</td>
    <td><div align="center">(0/0)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["Inquisitore"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>50</td>
    <td>Istruzione</td>
    <td><div align="center">(<?= $rs["Volonta"] ?>/12)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["Istruzione"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>51</td>
    <td>Metabolismo Rapido</td>
    <td><div align="center">(<?= $rs["Tempra"] ?>/6)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["MetabolismoRapido"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>52</td>
    <td>Metacreativo</td>
    <td><div align="center">(0/0)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["Metacreativo"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>53</td>
    <td>Milizia</td>
    <td><div align="center">(0/0)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["Milizia"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>54</td>
    <td>Mira</td>
    <td><div align="center">(0/0)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["Mira"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>55</td>
    <td>Mobilit&agrave;</td>
    <td><div align="center">(0/0)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["Mobilita"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>56</td>
    <td>Navigare</td>
    <td><div align="center">(0/0)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["Navigare"] ?>
    </font> su 3 </div></td>
  </tr>
  <tr>
    <td>57</td>
    <td>Nomade</td>
    <td><div align="center">(0/0)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["Nomade"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>58</td>
    <td>Nuotare</td>
    <td><div align="center">(<?= $rs["Costituzione"] ?>/10)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["Nuotare"] ?>
    </font> su 3 </div></td>
  </tr>
  <tr>
    <td>59</td>
    <td>Occhi Aperti</td>
    <td><div align="center">(<?= $rs["Intelligenza"] ?>/8)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["OcchiAperti"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>60</td>
    <td>Psicoanalista</td>
    <td><div align="center">(<?= $rs["Saggezza"] ?>/6)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["Psicoanalista"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>61</td>
    <td>Riflessi</td>
    <td><div align="center">(<?= $rs["Destrezza"] ?>/8)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["Riflessi"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>62</td>
    <td>Robustezza</td>
    <td><div align="center">(<?= $rs["Costituzione"] ?>/10)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["Robustezza"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>63</td>
    <td>Sangue Freddo</td>
    <td><div align="center">(<?= $rs["Volonta"] ?>/12)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["SangueFreddo"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>64</td>
    <td>Sbilanciare</td>
    <td><div align="center">(<?= $rs["Saggezza"] ?>/6)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["Sbilanciare"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>65</td>
    <td>Scagliare Arma</td>
    <td><div align="center">(<?= $rs["Forza"] ?>/8)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["ScagliareArma"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>66</td>
    <td>Scalatore</td>
    <td><div align="center">(<?= $rs["Costituzione"] ?>/10)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["Scalatore"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>67</td>
    <td>Schernire</td>
    <td><div align="center">(<?= $rs["Carisma"] ?>/10)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["Schernire"] ?>
    </font> su 3 </div></td>
  </tr>
  <tr>
    <td>68</td>
    <td>Seguire Tracce</td>
    <td><div align="center">(<?= $rs["Saggezza"] ?>/6)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["SeguireTracce"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>69</td>
    <td>Sensi Acuti</td>
    <td><div align="center">(0/0)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["SensiAcuti"] ?>
    </font> su 3</div></td>
  </tr>
 

Levian

Utente Attivo
30 Set 2008
51
0
0
Quarta ed ultima parte del file profilol.php:

PHP:
<tr>
    <td>70</td>
    <td>Sicario</td>
    <td><div align="center">(0/0)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["Sicario"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>71</td>
    <td>Sopravvissuto</td>
    <td><div align="center">(0/0)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["Sopravvissuto"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>72</td>
    <td>Sostituzione</td>
    <td><div align="center">(0/0)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["Sostituzione"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>73</td>
    <td>Spinta</td>
    <td><div align="center">(<?= $rs["Forza"] ?>/8)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["Spinta"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>74</td>
    <td>Tempra Possente</td>
    <td><div align="center">(<?= $rs["Tempra"] ?>/6)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["TempraPossente"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>75</td>
    <td>Testa Dura</td>
    <td><div align="center">(<?= $rs["Costituzione"] ?>/10)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["TestaDura"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>76</td>
    <td>Trappola</td>
    <td><div align="center">(<?= $rs["Saggezza"] ?>/6)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["Trappola"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>77</td>
    <td>Travolgere</td>
    <td><div align="center">(<?= $rs["Forza"] ?>/8)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["Travolgere"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>78</td>
    <td>Vista Al Buio</td>
    <td><div align="center">(<?= $rs["Volonta"] ?>/12)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["VistaAlBuio"] ?>
    </font> su 3 </div></td>
  </tr>
  <tr>
    <td>79</td>
    <td>Vita Della Strada</td>
    <td><div align="center">(<?= $rs["Tempra"] ?>/6)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["VitaDellaStrada"] ?>
    </font> su 3</div></td>
  </tr>
  <tr>
    <td>80</td>
    <td>Volont&agrave; Di Ferro </td>
    <td><div align="center">(<?= $rs["Volonta"] ?>/12)</div></td>
    <td><div align="right">LV <font size="3">
      <?= $rs["VolontaDiFerro"] ?>
    </font> su 3</div></td>
  </tr>
</table>
</td></tr>
</table></div>
<div style="position: absolute; width: 600px; height: 180px; z-index: 1; left: 217px; top: 203px; overflow: auto">
<table border=1 width="580"  height="100">
<tr><td align=justify>
  <div align="left">
    <?
	if ((trim($rs["Background"]."") == "") and !($upd)) {
		echo("Nessuna Informazione.");
         } else {
		echo(str_replace("\n", "<br>", htmlspecialchars($rs["Background"])));
	} ?>
  </div></td></tr>
</table></div>
</body>
</html>
 

Levian

Utente Attivo
30 Set 2008
51
0
0
Prima parte del file datiinternil.php:

PHP:
<? session_start();
include ('inc/variabile1.php');
include ('inc/variabile2.php');
include ('inc/variabile3.php');
### prendo le info del pg ###
$Login = $_SESSION['Login'];

$pagemax = 50;


$IDAraldo = 0 + $ID;
$IDMsgPadre = 0 + $IDMsgPadre;

if ($IDAraldo == "") {
    echo("Crash del Sistema.");
	exit;
}

function Tempo($tim) {
	return(strftime("%d/%m/%Y %H:%M", strtotime($tim)));
}
include ('inc/variabile4.php');
?>
<title>Comunity</title>
<style type="text/css">
<!--
a:link {
	color: #000000;
	text-decoration: none;
}
a:visited {
	text-decoration: none;
	color: #000000;
}
a:hover {
	text-decoration: none;
	color: #000000;
}
a:active {
	text-decoration: none;
	color: #000000;
}
.Stile1 {color: #000000}
.Stile2 {font-size: 9px}
-->
</style>
</head>
<body bgcolor="fbf4e4" text="#000000" link="#000000" vlink="#000000" alink="#000000">
<p align="center">&nbsp;</p>
<div align="center"></div>
<table border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="20" height="20"></td>
    <td width="600" height="20"></td>
    <td width="20" height="20"></td>
  </tr>
  <tr>
    <td width="20"></td>
    <td>
<table width="600" border="0" align="center">
      <tr>
        <td width="600">
            <?
    $MySql = "SELECT * FROM Araldo WHERE IDAraldo = $IDAraldo";

	$Result = mysql_query($MySql);
	$rs = mysql_fetch_array($Result);
    
    $IDAraldo = $rs['IDAraldo'];
	$Bacheca = $rs['Descrizione'];
	$Master_Araldo = $rs['Master'];
    $Capo = $rs['Capo'];
    $CapoRazza = $rs['CapoRazza'];
    $Punti = $rs['Punti'];
    $Gilda = $rs['Gilda'];
    $Razza = $rs['Razza'];
    $rs->close;
    mysql_free_result($Result);
    If (($Master_Araldo== 1) && ($Master < 1) ) {
        echo '';
        exit();
    }
    If ((($Capo==1) && ($Master_Araldo != 1)) && ($Master != 2))
{
        echo '';
        exit();
    }
    If ((($Capo!=1) && ($Master_Araldo == 1)) && ($Master != 1))
{
        echo '';
        exit();
    }
    If (($Gilda==1) && (0 + $IDGilda_S -100 < 0)) {
        echo '';
        exit();
    }

    If (($Razza==1) && (((0 + $IDRazza_S) % 1000) -10 < 0)) {
	    echo '';
    	exit();
    }
    
    If (($CapoRazza==1) && ((((0 + $IDRazza_S) % 10) != 0) || (((0 + $IDRazza_S) % 1000) == 0))) {
        echo '';
        exit();
    }
    
$Messaggio = trim($Messaggio);
$Titolo = trim($Titolo);
$Titolo = substr($Titolo, 0, max(255, strlen($Titolo)));

If ($Titolo == '') {
	$Titolo = 'Comunicazione';
}

If ($Messaggio != '') {
    #I controlli Master + Capo sono impliciti nel codice precedente
    #Effettuare controllo PG Esistente
    If ($IDMsg == '') {
        #----- nuovo messaggio! -----
        $MySql = 'INSERT INTO MessaggioAraldo (IDAraldo, IDMessaggioPadre, Tag, Titolo, Messaggio, Autore, IDGilda, Img, Corporazione, IDRazza, DataMessaggio)';
        $MySql .=" VALUES ($IDAraldo,";
        $MySql .=" '$IDMsgPadre',";
		$MySql .=" '$Tag',";
        $MySql .=" '$Titolo',";
        $MySql .=" '$Messaggio',";
        $MySql .=" '".pars($Login)."',";
        $MySql .=" '".pars($IDGilda_S)."',";
        $MySql .=" '".pars($ImgGilda_S)."',";
        $MySql .=" '".pars($DescGilda_S)."',";
        $MySql .=" '".pars($IDRazza_S)."',";
        $MySql .=" NOW())";
#echo $MySql;
		$Result = mysql_query($MySql);
		
		$MySql = "SELECT * FROM MessaggioAraldo WHERE IDAraldo = '$IDAraldo' ORDER BY Benvisibile DESC, IDMessaggio DESC";
		$Result = mysql_query($MySql);
		$rs1 = mysql_fetch_array($Result);
		$IDMsg = $rs1['IDMessaggio'];
		$rs1->close;
		
    } else {
        #----- correzione messaggio! -----
        $MySql = "UPDATE MessaggioAraldo SET ";
		$MySql .=" Tag = '$Tag',";
        $MySql .=" Titolo = '$Titolo',";
        $MySql .=" Messaggio = '$Messaggio'";
        $MySql .=" WHERE IDAraldo = '$IDAraldo'";
        $MySql .=" AND IDMessaggio = '$IDMsg'";
		if ($Ban_S != '1') {
			$MySql .=" AND Autore = '".pars($Login)."'";
		}
#echo $MySql;
        $Result = mysql_query($MySql);
    }
#----- CASO IN CUI SONO INSERITI PUNTI ESPERIENZA -----
	if ($Punti == 1) {
		
		# Passo 1 ---> Aggiornare al contrario i punti esperienza relativi al messaggio
		
		$MySql = "SELECT * FROM Punti WHERE IDMessaggioAraldo = '$IDMsg'";
		$Result1 = mysql_query($MySql);
		#echo $MySql.'<br>';
		
		while ($rs1 = mysql_fetch_array($Result1)) {
			$MySql = "UPDATE Personaggio SET Esperienza = Esperienza - '".$rs1['Esperienza']."' WHERE Nome = '".pars($rs1['Nome'])."'";
			$Result2 = mysql_query($MySql);
			#echo $MySql.'<br>';
			
		}
		$rs1->close;
		
		# Passo 2 ---> Cancellare tutti i punti registrati relativi al messaggio
		
		$MySql = "DELETE FROM Punti WHERE IDMessaggioAraldo = '$IDMsg'";
		$Result = mysql_query($MySql);
		#echo $MySql.'<br>';
		
		# Passo 3 ---> Aggiungere i punti esperienza relativi al messaggio in input
		
		for ($i = 1; $i <= 20; $i++) {
			if (($_POST["Nome$i"] != '') && ($_POST["Esperienza$i"] != 0)) {
				$MySql = "INSERT INTO Punti (Nome, Esperienza, DataEvento, IDMessaggioAraldo)";
				$MySql .= " VALUES ('".$_POST["Nome$i"]."', '".$_POST["Esperienza$i"]."', '".strftime("%Y-%m-%d %H:%M:%S")."', '$IDMsg')";
				$Result = mysql_query($MySql);
				#echo $MySql.'<br>';
				
				$MySql = "UPDATE Personaggio SET Esperienza = Esperienza + '".$_POST["Esperienza$i"]."' WHERE Nome = '".$_POST["Nome$i"]."'";
				$Result = mysql_query($MySql);
				#echo $MySql.'<br>';
			}			
		}
	}
}

If ($op == 'cancella') {
    
#----- CASO IN CUI SONO INSERITI PUNTI ESPERIENZA -----
	if ($Punti == 1) {
		
		# Passo 1 ---> Aggiornare al contrario i punti esperienza relativi al messaggio
		
		$MySql = "SELECT * FROM Punti WHERE IDMessaggioAraldo = '$IDMsg'";
		$Result = mysql_query($MySql);
		#echo $MySql.'<br>';
		
		while ($rs1 = mysql_fetch_array($Result)) {
			$MySql = "UPDATE Personaggio SET Esperienza = Esperienza - '".$rs1['Esperienza']."' WHERE Nome = '".pars($rs1['Nome'])."'";
			$Result1 = mysql_query($MySql);
			#echo $MySql.'<br>';
		}
		$rs1->close;
		
		# Passo 2 ---> Cancellare tutti i punti registrati relativi al messaggio
		
		$MySql = "DELETE FROM Punti WHERE IDMessaggioAraldo = '$IDMsg'";
		$Result = mysql_query($MySql);
		#echo $MySql.'<br>';
		
		# Passo 3 ---> Aggiungere i punti esperienza relativi al messaggio in input
	}
	
    $MySql = 'DELETE FROM MessaggioAraldo ';
    $MySql .=" WHERE IDAraldo = '$IDAraldo'";
    $MySql .=" AND IDMessaggio = '$IDMsg'";
	if ($Ban_S != '1') {
		$MySql .=" AND Autore = '".pars($Login)."'";
	}
    $Result = mysql_query($MySql);

}



if ($IDMsgPadre == 0) {
?>
            <TABLE align="center" cellpadding="0" cellspacing="2">
              <tr class="table2" >
                <td class="table2" valign=top><TABLE align="center">
                    <TBODY>
                      <TR>
                        <td colspan=3 align="center"><font face="Verdana" color="#800000"><strong>
                          <?= htmlspecialchars($Bacheca) ?>
                          </strong></font><br><br><a href="codicil.php" target="_blank"><strong>Codici</strong></a>
                          <? if (($Master_Araldo==1) and ($Capo == 1)) { ?>
                          <? }  elseif ($Master_Araldo==1) { ?>
                          <? } elseif ($Capo==1) { ?>
                          <? } elseif ($CapoRazza==1) { ?>
                          <? } elseif ($Gilda==1) { ?>
                          <? } elseif ($Razza==1) { ?>
                          <? }
#$p = $_GET['p'];
$p = 0 + $p;
if (($p <= 0) || (!(is_int($p)))) {
    $p = 1;
}
$p1 = $p - 1;
?></td>
                      </tr>
                    </table></td>
              </tr>
              <tr>
                <td><div align="center"> <br>
                        <table width="600"  border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td align=left><? if ($p1 > 0) { ?>
                                <a href="datiinternil.php?ID=<?= $IDAraldo ?>&IDMsgPadre=<?= $IDMsgPadre ?>&p=<?= $p1 ?>&Query=<?= $Query ?>"><font face="Verdana"><strong>< sfoglia</strong></font></a>
                                <? }

$Sql = "SELECT count(IDMessaggio) AS NumeroMex FROM MessaggioAraldo WHERE IDAraldo = '$IDAraldo' AND IDMessaggioPadre = 0";
	$Result3 = mysql_query($Sql);
	$rs3 = mysql_fetch_array($Result3);
$NumeroMex = $rs3['NumeroMex'];
$NumMaxMex = ($p*$pagemax);
 ?></td>
                            <td align=right><? if ($NumeroMex > $NumMaxMex) { ?>
                                <a href="datiinternil.php?ID=<?= $IDAraldo ?>&IDMsgPadre=<?= $IDMsgPadre ?>&p=<?= $p+1 ?>&Query=<?= $Query ?>"><font face="Verdana"><strong>sfoglia ></strong></font></a>
                                <? } ?>
                          </tr>
                        </table>
                </div>
                    </a>
                    </div></td>
              </tr>
              <tr>
                <td><TABLE width="600" class="table2">
                    <TBODY>
                      <TR>
                        <td width="20%"><p align="center"><font size="1" color="black" align="center">Utente</font></p></td>
                        <td width="20%" ><p align="center"><font size="1" color="black" align="center">Tag</font></p></td>
                        <td width="40%" ><p align="center"><font size="1" color="black" align="center">Comunicazione</font></p></td>
                        <td width="10%" ><p align="center"><font size="1" color="black" align="center">Intervento</font></p></td>
                        <td width="10%"><p align="center"><font size="1" color="black" align="center">Nuovo Intervento</font></p></td>
                      </tr>
                    </TBODY>
                </TABLE></TD>
              </TR>
              <? #INSERIRE DATI PER VeDERE I MESSAGGI ?>
              <? 

$MySql = "SELECT * FROM MessaggioAraldo WHERE IDAraldo = '$IDAraldo' AND IDMessaggioPadre = '$IDMsgPadre'";
    

if ($Gilda==1) {
	$MySql .= " AND (IDGilda >= $IDGilda_S - ".($IDGilda_S % 100).") AND (IDGilda < 100 + $IDGilda_S - ".($IDGilda_S % 100).")";
}
if ($Razza==1) {
	$MySql .= " AND (IDRazza >= $IDRazza_S - ".($IDRazza_S % 10).") AND (IDRazza < 10 + $IDRazza_S - ".($IDRazza_S % 10).")";
}

$MySql2 = "SELECT * FROM Personaggio WHERE Nome = '$Login'";

$Result = mysql_query($MySql2);
$rs = mysql_fetch_array($Result);
    
$Admin = $rs['Admin'];

$rs->close;
mysql_free_result($Result);

if($Admin==1){
	$MySql = "SELECT * FROM MessaggioAraldo WHERE IDAraldo = '$IDAraldo' AND IDMessaggioPadre = '$IDMsgPadre'";
}

$MySql .= " ORDER BY Benvisibile DESC, IDMessaggio";
if ($IDMsgPadre == 0) {
	$MySql.=" DESC LIMIT ".((($p-1)*$pagemax)).", ".$pagemax;
}
#echo " ";
$Result = mysql_query($MySql);
#$rs = mysql_fetch_array($Result);

#echo $MySql;


while($rs = mysql_fetch_array($Result)) { ?>
              <tr>
                <td><TABLE width="600" class="table3">
                    <TBODY>
                      <TR>
                        <td width="20%" ><div align="center"><b><a href="profilol.php?pg=<?= $rs["Autore"] ?>" target="_blank">
                            <?= htmlspecialchars($rs["Autore"]) ?>
                            </a></b><br>
                            <?= Tempo($rs["DataMessaggio"]) ?>
                        </div></td>
                        <td width="20%"><div align="center">
                           <?= htmlspecialchars($rs["Tag"]) ?>
                        </div></td>
                        <td width="40%"><div align="center"><? 
if ($rs["Benvisibile"]==1)
{ echo "♣ ♦ ♥ ♠<br>";
}?><a href="datiinternil.php?ID=<?= $IDAraldo ?>&IDMsgPadre=<?= $rs["IDMessaggio"] ?>&p=<?= $p 
?>"> <?= htmlspecialchars($rs["Titolo"]) ?><? if ($rs["Benvisibile"]==1){ echo "<br>";}?>
  		    </a></div></td>
                        <td width="10%" ><? 	
$Login = $_SESSION['Login'];
$MySql5 = 'SELECT * FROM `LogEntrate` WHERE Nome = "'.$Login.'" ORDER BY `DataEvento` DESC LIMIT 1, 1';
$Result5 = mysql_query($MySql5);
$rs5 = mysql_fetch_array($Result5);
$DataEvento = $rs5["DataEvento"];
$MySql = "SELECT count(IDMessaggio) AS NumeroMessaggi FROM MessaggioAraldo WHERE IDAraldo = '$IDAraldo' AND IDMessaggioPadre = '".$rs["IDMessaggio"]."'";
	#echo $MySql;
	$Result1 = mysql_query($MySql);
	$rs1 = mysql_fetch_array($Result1);
	#$newmsg = $rs1["NumeroMessaggi"]; ?>
                            <? 	$MySql2 = "SELECT count(IDMessaggio) AS NumeroNuovi FROM MessaggioAraldo WHERE IDAraldo = '$IDAraldo' AND IDMessaggioPadre = '".$rs['IDMessaggio']."' AND DataMessaggio > '".$DataEvento."' ";
	$Result2 = mysql_query($MySql2);
	$rs2 = mysql_fetch_array($Result2);
	$newmsg = $rs2["NumeroNuovi"]; 
?>
<? 	$MySql3 = "SELECT * FROM MessaggioAraldo WHERE IDAraldo = '$IDAraldo' AND IDMessaggioPadre = '".$rs['IDMessaggio']."' ORDER by Benvisibile DESC, DataMessaggio desc LIMIT 0,1";
	$Result3 = mysql_query($MySql3);
	$rs3 = mysql_fetch_array($Result3);
	$ultimomessaggio = Tempo($rs3["DataMessaggio"]);
	$ultimoautore = $rs3["Autore"];
?>
                            <p align="center"><b><font size="1" color="black" align="center">
                                  <?= $rs1["NumeroMessaggi"] ?>
                          </b> </font></p></td>
                        <td width="10%"><div align="center">
                            <strong>
                            <span class="Stile2">
                            <? 
if ($newmsg > 0) {

    	echo "".$rs2['NumeroNuovi'].""; } ?></span></strong>
                        </div></td>
                      </tr>
                    </TBODY>
                </TABLE></TD>
              </TR>
              <? }
 ?>
            </table>
 

Levian

Utente Attivo
30 Set 2008
51
0
0
Seconda parte del file datiinternil.php:

PHP:
<br><br><table border="0" align="center">
                          <tr>
            <td width="50%" align=left><form action="centrodatil.php" target="chat" method="post">
                <div align="center">
                  <input name="submit2" type="submit" Style="font-weight:bold;font-family:Verdana;font-size:8pt" value="Lista">
                </div>
            </form></td>
            <td width="50%" align=right>
                            <form action="datinuovil.php?ID<?= $IDAraldo ?>&IDMsgPadre=<?= $IDMsgPadre ?>" target="chat" method="post">
                                <div align="center">
                                  <input type="hidden" value="<?= $IDAraldo ?>" name="ID">
                                  <input name="submit" type="submit" Style="font-weight:bold;font-family:Verdana;font-size:8pt" value="Inserisci">
                                </div>
                            </form></td>
                          </tr>
            </table>
       <div align="center">   <? }
else { 
   
    $MySql = "SELECT * FROM MessaggioAraldo WHERE IDAraldo = $IDAraldo AND IDMessaggioPadre = $IDMsgPadre";

	$Result = mysql_query($MySql);
	$rs = mysql_fetch_array($Result);
 
    $MySql1 = "SELECT * FROM MessaggioAraldo WHERE IDAraldo = $IDAraldo AND IDMessaggioPadre = 0 AND IDMessaggio = $IDMsgPadre";
	$Result1 = mysql_query($MySql1);
	$rs1 = mysql_fetch_array($Result1);

	$Titoloint = ($rs1['Titolo']);   
$Letto = ($rs1['Letto'] + 1);
$MySql9 ="UPDATE `MessaggioAraldo` SET `Letto` = '".$Letto."', `Ultima Lettura` = NOW( )  WHERE IDAraldo = $IDAraldo AND IDMessaggioPadre = 0 AND IDMessaggio = $IDMsgPadre";
mysql_query($MySql9);
?></div>
            <TABLE align="center" cellpadding="0" cellspacing="0">
              <tr class="table2" >
                <td class="table2" valign=top><TABLE>
                    <TBODY>
                      <TR>
                        <td colspan=3 align=center><font face="Verdana" color="#800000"><strong>
                          <?= htmlspecialchars($Titoloint) ?>
                          </strong></font>
                          <? if (($Master_Araldo==1) and ($Capo == 1)) { ?>
                          <? }  elseif ($Master_Araldo==1) { ?>
                          <? } elseif ($Capo==1) { ?>
                          <? } elseif ($CapoRazza==1) { ?>
                          <? } elseif ($Gilda==1) { ?>
                          <? } elseif ($Razza==1) { ?>
                          <? }
#$p = $_GET['p'];
$p = 0 + $p;
if (($p <= 0) || (!(is_int($p)))) {
    $p = 1;
}
$p1 = $p - 1;
?></td>
                      </tr>
                    </table></td>
              </tr>
          </table></td>
      </tr>
    </table></td>
    <td width="20"></td>
  </tr>
  <tr>
    <td width="20" height="20"></td>
    <td height="20"></td>
    <td width="20" height="20"></td>
  </tr>
</table>
 

Levian

Utente Attivo
30 Set 2008
51
0
0
Terza parte del file datiinternil.php:

PHP:
<br>
<table border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="10" height="20"></td>
    <td width="600" height="20"></td>
    <td width="10" height="20"></td>
  </tr>
  <tr>
    <td width="20"></td>
    <td><table border="0" align="center">
      <tr>
      <td>
      <table width="500" align="center" border="0">
        <tr>
        </tr>
      </table>
      <div align="center"> </div>
      <table width="500" border="0" cellpadding="0">
        <tr>
          <? 		$convtesto = htmlspecialchars($rs1["Messaggio"]);
        $convtesto = (str_replace("\n", "<br>", $convtesto));
		$convtesto = (str_replace("[capo]", "<br>", $convtesto));
		$convtesto = (str_replace("[grassetto]", "<b>", $convtesto));
		$convtesto = (str_replace("[/grassetto]", "</b>", $convtesto));
		$convtesto = (str_replace("[corsivo]", "<i>", $convtesto));
		$convtesto = (str_replace("[/corsivo]", "</i>", $convtesto));
		$convtesto = (str_replace("[sottolineato]", "<u>", $convtesto));
		$convtesto = (str_replace("[/sottolineato]", "</u>", $convtesto));
		$convtesto = (str_replace("[barrato]", "<s>", $convtesto));
		$convtesto = (str_replace("[/barrato]", "</s>", $convtesto));
		$convtesto = (str_replace("[apice]", "<sup>", $convtesto));
		$convtesto = (str_replace("[/apice]", "</sup>", $convtesto));
		$convtesto = (str_replace("[pendice]", "<sub>", $convtesto));
		$convtesto = (str_replace("[/pendice]", "</sub>", $convtesto));
		$convtesto = (str_replace("[tastiera]", "<kbd>", $convtesto));
		$convtesto = (str_replace("[/tastiera]", "</kbd>", $convtesto));
		$convtesto = (str_replace("[lampeggiante]", "<span style='text-decoration: blink'>", $convtesto));
		$convtesto = (str_replace("[/lampeggiante]", "</span>", $convtesto));
		$convtesto = (str_replace("[linea]", "<span style='text-decoration: overline'>", $convtesto));
		$convtesto = (str_replace("[/linea]", "</span>", $convtesto));
		$convtesto = (str_replace("[scandito]", "<span style='letter-spacing: 2pt'>", $convtesto));
		$convtesto = (str_replace("[/scandito]", "</span>", $convtesto));
		$convtesto = (str_replace("[scanditomax]", "<span style='letter-spacing: 5pt'>", $convtesto));
		$convtesto = (str_replace("[/scanditomax]", "</span>", $convtesto));
		$convtesto = (str_replace("[+-]", "&plusmn;", $convtesto));
		$convtesto = (str_replace("[picche]", "♠", $convtesto));
		$convtesto = (str_replace("[fiori]", "♣", $convtesto));
		$convtesto = (str_replace("[cuori]", "♥", $convtesto));
		$convtesto = (str_replace("[quadri]", "♦", $convtesto));
		$convtesto = (str_replace("[maschio]", "♂", $convtesto));
		$convtesto = (str_replace("[femmina]", "♀", $convtesto));
		$convtesto = (str_replace("[notamusicale]", "♪", $convtesto));
		$convtesto = (str_replace("[alfa]", "α", $convtesto));
		$convtesto = (str_replace("[beta]", "β", $convtesto));
		$convtesto = (str_replace("[gamma]", "γ", $convtesto));
		$convtesto = (str_replace("[delta]", "δ", $convtesto));
		$convtesto = (str_replace("[epsilon]", "ε", $convtesto));
		$convtesto = (str_replace("[zeta]", "ζ", $convtesto));
		$convtesto = (str_replace("[eta]", "η", $convtesto));
		$convtesto = (str_replace("[theta]", "θ", $convtesto));
		$convtesto = (str_replace("[iota]", "ι", $convtesto));
		$convtesto = (str_replace("[kappa]", "κ", $convtesto));
		$convtesto = (str_replace("[lambda]", "λ", $convtesto));
		$convtesto = (str_replace("[mu]", "μ", $convtesto));
		$convtesto = (str_replace("[nu]", "ν", $convtesto));
		$convtesto = (str_replace("[xi]", "ξ", $convtesto));
		$convtesto = (str_replace("[omicron]", "ο", $convtesto));
		$convtesto = (str_replace("[pi]", "π", $convtesto));
		$convtesto = (str_replace("[rho]", "ρ", $convtesto));
		$convtesto = (str_replace("[sigma]", "σ", $convtesto));
		$convtesto = (str_replace("[tau]", "τ", $convtesto));
		$convtesto = (str_replace("[upsilon]", "υ", $convtesto));
		$convtesto = (str_replace("[phi]", "φ", $convtesto));
		$convtesto = (str_replace("[chi]", "χ", $convtesto));
		$convtesto = (str_replace("[psi]", "ψ", $convtesto));
		$convtesto = (str_replace("[omega]", "ω", $convtesto));
		$convtesto = (str_replace("[thetasym]", "ϑ", $convtesto));
		$convtesto = (str_replace("[upsih]", "ϒ", $convtesto));
		$convtesto = (str_replace("[piv]", "ϖ", $convtesto));
		$convtesto = (str_replace("[centrale]", "<div align='center'>", $convtesto));
		$convtesto = (str_replace("[/centrale]", "</div>", $convtesto));
		$convtesto = (str_replace("[destro]", "<div align='right'>", $convtesto));
		$convtesto = (str_replace("[/destro]", "</div>", $convtesto));
		
		$Messaggio = $convtesto;

$autore1 = ($rs1["Autore"]);

    $MySql6 = "SELECT * FROM Personaggio WHERE Nome = '$autore1'";
	$Result6 = mysql_query($MySql6);
	$rs6 = mysql_fetch_array($Result6);

$imgsesso = $rs6['IDRazza'].strtolower($rs6["Sesso"]);
				
 ?>
          <td width="500" align="justify"><br>
              <a href="profilol.php?pg=<?= $rs1["Autore"] ?>" target="_blank"><strong><font size="2">
              <?= htmlspecialchars($rs1["Autore"]) ?>
              </font></strong></a> * | <font size="2">
              <?= Tempo($rs1["DataMessaggio"]) ?>
              </font><br>
              <br>
            Oggetto: <strong>
              <?= htmlspecialchars($Titoloint) ?>
              </strong><br>
            <br>
            <?= $Messaggio ?>
            <div  align="center">
              <?	if (($Login == $rs1["Autore"]) || ($Ban_S == '1')) { ?>
              <br>
              <a href="datinuovil.php?op=modifica&ID=<?= $IDAraldo ?>&IDMsg=<?= $rs1['IDMessaggio'] ?>&IDMsgPadre=<?= $rs1['IDMessaggioPadre'] ?>&p=<?= $p ?>"><strong><font color=black>Aggiorna</font></strong></a>
              <? 
$MySql2 = "SELECT count(IDMessaggio) AS Risposte FROM MessaggioAraldo WHERE IDAraldo = '$IDAraldo' AND IDMessaggioPadre = '".$rs['IDMessaggio']."' ";
	$Result2 = mysql_query($MySql2);
	$rs2 = mysql_fetch_array($Result2);
	$risposte = $rs2["Risposte"]; 

if ($risposte != 0) {
?>
              <a href="datiinternil.php?op=cancella&ID=<?= $IDAraldo ?>&IDMsg=<?= $rs1['IDMessaggio'] ?>&IDMsgPadre=<?= $rs1['IDMessaggioPadre'] ?>&p=<?= $p ?>" onClick="return Conferma();"><strong><font color=black>Distruggi</font></strong></a><br>
              <br>
              <? } else { ?>
              <br>
              <br>
              <? } } 
	if ($Punti == 1) {
		echo '<table><tr><td colspan=3>';
		$MySql = "SELECT * FROM Punti WHERE IDMessaggioAraldo = '".$rs1['IDMessaggio']."'";
		$Result1 = mysql_query($MySql);
		while ($rs1 = mysql_fetch_array($Result1)) {
			echo '<table width=160><tr>';
			echo '<td width=120><a Title="Vedi Profilo" href="profilol.php?pg='.htmlspecialchars($rs1['Nome']).'" target="_blank"><font color=white><b>'.htmlspecialchars($rs1['Nome']).'</b></font></a></td>';
			echo '<td width=30 align=right>';
			if ($rs1['Esperienza'] < 0) {
				echo '<font color=black><b>'.$rs1['Esperienza'].'</b></font>';
			} else {
				echo '<b> '.$rs1['Esperienza'].'</b>';
			}
			echo '</td>';
			
			# Controlla se il Personaggio esiste!
			$MySql = "SELECT Nome FROM Personaggio WHERE Nome = '".pars($rs1['Nome'])."'";


			$Result2 = mysql_query($MySql);
			
			
			if (!$rs2 = mysql_fetch_array($Result2)) {
				echo '<td><font color=black>X</font></td>';
			}
			$rs2->close;
			
			echo '</tr></table>';
		}
		$rs1->close;
		echo '</td></tr></table>';
	}

?>
            </div>
            <br>
          </td>
        </tr>
        <? #INSERIRE DATI PER VeDERE I MESSAGGI ?>
        <? 
$pagemax = 50;
$MySql = "SELECT * FROM MessaggioAraldo WHERE IDAraldo = '$IDAraldo' AND IDMessaggioPadre = '$IDMsgPadre' ORDER BY Benvisibile DESC, `IDMessaggio` ASC ";

$Result = mysql_query($MySql);
while($rs = mysql_fetch_array($Result)) {
        $convtesto = htmlspecialchars($rs["Messaggio"]);
        $convtesto = (str_replace("\n", "<br>", $convtesto));
		$convtesto = (str_replace("[capo]", "<br>", $convtesto));
		$convtesto = (str_replace("[grassetto]", "<b>", $convtesto));
		$convtesto = (str_replace("[/grassetto]", "</b>", $convtesto));
		$convtesto = (str_replace("[corsivo]", "<i>", $convtesto));
		$convtesto = (str_replace("[/corsivo]", "</i>", $convtesto));
		$convtesto = (str_replace("[sottolineato]", "<u>", $convtesto));
		$convtesto = (str_replace("[/sottolineato]", "</u>", $convtesto));
		$convtesto = (str_replace("[barrato]", "<s>", $convtesto));
		$convtesto = (str_replace("[/barrato]", "</s>", $convtesto));
		$convtesto = (str_replace("[apice]", "<sup>", $convtesto));
		$convtesto = (str_replace("[/apice]", "</sup>", $convtesto));
		$convtesto = (str_replace("[pendice]", "<sub>", $convtesto));
		$convtesto = (str_replace("[/pendice]", "</sub>", $convtesto));
		$convtesto = (str_replace("[tastiera]", "<kbd>", $convtesto));
		$convtesto = (str_replace("[/tastiera]", "</kbd>", $convtesto));
		$convtesto = (str_replace("[lampeggiante]", "<span style='text-decoration: blink'>", $convtesto));
		$convtesto = (str_replace("[/lampeggiante]", "</span>", $convtesto));
		$convtesto = (str_replace("[linea]", "<span style='text-decoration: overline'>", $convtesto));
		$convtesto = (str_replace("[/linea]", "</span>", $convtesto));
		$convtesto = (str_replace("[scandito]", "<span style='letter-spacing: 2pt'>", $convtesto));
		$convtesto = (str_replace("[/scandito]", "</span>", $convtesto));
		$convtesto = (str_replace("[scanditomax]", "<span style='letter-spacing: 5pt'>", $convtesto));
		$convtesto = (str_replace("[/scanditomax]", "</span>", $convtesto));
		$convtesto = (str_replace("[+-]", "&plusmn;", $convtesto));
		$convtesto = (str_replace("[picche]", "♠", $convtesto));
		$convtesto = (str_replace("[fiori]", "♣", $convtesto));
		$convtesto = (str_replace("[cuori]", "♥", $convtesto));
		$convtesto = (str_replace("[quadri]", "♦", $convtesto));
		$convtesto = (str_replace("[maschio]", "♂", $convtesto));
		$convtesto = (str_replace("[femmina]", "♀", $convtesto));
		$convtesto = (str_replace("[notamusicale]", "♪", $convtesto));
		$convtesto = (str_replace("[alfa]", "α", $convtesto));
		$convtesto = (str_replace("[beta]", "β", $convtesto));
		$convtesto = (str_replace("[gamma]", "γ", $convtesto));
		$convtesto = (str_replace("[delta]", "δ", $convtesto));
		$convtesto = (str_replace("[epsilon]", "ε", $convtesto));
		$convtesto = (str_replace("[zeta]", "ζ", $convtesto));
		$convtesto = (str_replace("[eta]", "η", $convtesto));
		$convtesto = (str_replace("[theta]", "θ", $convtesto));
		$convtesto = (str_replace("[iota]", "ι", $convtesto));
		$convtesto = (str_replace("[kappa]", "κ", $convtesto));
		$convtesto = (str_replace("[lambda]", "λ", $convtesto));
		$convtesto = (str_replace("[mu]", "μ", $convtesto));
		$convtesto = (str_replace("[nu]", "ν", $convtesto));
		$convtesto = (str_replace("[xi]", "ξ", $convtesto));
		$convtesto = (str_replace("[omicron]", "ο", $convtesto));
		$convtesto = (str_replace("[pi]", "π", $convtesto));
		$convtesto = (str_replace("[rho]", "ρ", $convtesto));
		$convtesto = (str_replace("[sigma]", "σ", $convtesto));
		$convtesto = (str_replace("[tau]", "τ", $convtesto));
		$convtesto = (str_replace("[upsilon]", "υ", $convtesto));
		$convtesto = (str_replace("[phi]", "φ", $convtesto));
		$convtesto = (str_replace("[chi]", "χ", $convtesto));
		$convtesto = (str_replace("[psi]", "ψ", $convtesto));
		$convtesto = (str_replace("[omega]", "ω", $convtesto));
		$convtesto = (str_replace("[thetasym]", "ϑ", $convtesto));
		$convtesto = (str_replace("[upsih]", "ϒ", $convtesto));
		$convtesto = (str_replace("[piv]", "ϖ", $convtesto));
		$convtesto = (str_replace("[centrale]", "<div align='center'>", $convtesto));
		$convtesto = (str_replace("[/centrale]", "</div>", $convtesto));
		$convtesto = (str_replace("[destro]", "<div align='right'>", $convtesto));
		$convtesto = (str_replace("[/destro]", "</div>", $convtesto));
		
		$Messaggio = $convtesto;

$autore2 = ($rs["Autore"]);

    $MySql7 = "SELECT * FROM Personaggio WHERE Nome = '$autore2'";
	$Result7 = mysql_query($MySql7);
	$rs7 = mysql_fetch_array($Result7);

$imgsesso2 = $rs7['IDRazza'].strtolower($rs7["Sesso"]);
 ?>
        <tr></tr>
 

Levian

Utente Attivo
30 Set 2008
51
0
0
Quarta ed ultima parte del file datiinternil.php:

PHP:
  <td width="88%" align="justify"><br>
          <a href="profilol.php?pg=<?= $rs["Autore"] ?>" target="_blank"><strong><font size="2">
          <?= htmlspecialchars($rs["Autore"]) ?>
          </font></strong></a> | <font size="2">
          <?= Tempo($rs["DataMessaggio"]) ?>
          </font><br>
          <br>
    Oggetto: <strong>
      <?= htmlspecialchars($Titoloint) ?>
      </strong><br>
    <br>
    <?= $Messaggio ?>
    <div align="center">
    <?	if (($Login == $rs["Autore"]) || ($Ban_S == '1')) { ?></div>
    <div align="center"><br>
        <a href="datinuovil.php?op=modifica&ID=<?= $IDAraldo ?>&IDMsg=<?= $rs['IDMessaggio'] ?>&IDMsgPadre=<?= $rs1['IDMessaggioPadre'] ?>&p=<?= $p ?>"><strong><font color=black>Aggiorna</font></strong></a> <a href="datiinternil.php?op=cancella&ID=<?= $IDAraldo ?>&IDMsg=<?= $rs['IDMessaggio'] ?>&IDMsgPadre=<?= $rs['IDMessaggioPadre'] ?>&p=<?= $p ?>" onClick="return Conferma();"><strong><font color=black>Distruggi</font></strong></a><br>
        <br>
        <?   }  

	if ($Punti == 1) { 
		echo '<table><tr><td colspan=3>';
		$MySql = "SELECT * FROM Punti WHERE IDMessaggioAraldo = '".$rs['IDMessaggio']."'";
		$Result1 = mysql_query($MySql);
		while ($rs1 = mysql_fetch_array($Result1)) {
			echo '<table width=160><tr>';
			echo '<td width=120><a Title="Vedi Profilo" href="profilol.php?pg='.htmlspecialchars($rs1['Nome']).'" target="_blank"><font color=white><b>'.htmlspecialchars($rs1['Nome']).'</b></font></a></td>';
			echo '<td width=30 align=right>';
			if ($rs1['Esperienza'] < 0) {
				echo '<font color=red><b>'.$rs1['Esperienza'].'</b></font>';
			} else {
				echo '<b> '.$rs1['Esperienza'].'</b>';
			}
			echo '</td>';
			
			# Controlla se il Personaggio esiste!
			$MySql = "SELECT Nome FROM Personaggio WHERE Nome = '".pars($rs1['Nome'])."'";
			$Result2 = mysql_query($MySql);
			
			
			if (!$rs2 = mysql_fetch_array($Result2)) {
				echo '<td><font color=black>X</font></td>';
			}
			$rs2->close;
			
			echo '</tr></table>';
		}
		$rs1->close;
		echo '</td></tr></table>';
	}
}
?>
      </div>
  </table>
      <table width="50%" align="center">
        <table width="500" align="center" border="0">
          <tr>
            <td width="50%" align=left><form action="datiinternil.php?ID=<?= $IDAraldo ?>" target="chat" method="post">
                <div align="center">
                  <input name="submit2" type="submit" Style="font-weight:bold;font-family:Verdana;font-size:8pt" value="Lista">
                </div>
            </form></td>
            <td width="50%" align=right><form action="datinuovil.php?ID=<?= $IDAraldo ?>&IDMsgPadre=<?= $IDMsgPadre ?>" target="chat" method="post">
                <div align="center">
                  <input type="hidden" value="<?= $IDAraldo ?>" name="ID2">
                  <input name="submit2" type="submit" Style="font-weight:bold;font-family:Verdana;font-size:8pt" value="Aggiungi">
                </div>
            </form></td>
          </tr>
		  <?
$MySql2 = "SELECT * FROM Personaggio WHERE Nome = '$Login'";

$Result = mysql_query($MySql2);
$rs = mysql_fetch_array($Result);
    
$Admin = $rs['Admin'];

$rs->close;
if($Admin==1){?><tr><td colspan="2" align="center"><div align="center">
<form action="benvisibilemod.php" target="chat"  method="post">
        <input type="hidden" value="<?= $IDMsgPadre ?>" name="ID">
	<input type="submit" Style="font-weight:bold;font-family:Verdana;font-size:8pt" value="Rilievo" />
	</form>
	<form action="nonvisibilemod.php" target="chat"  method="post">
        <input type="hidden" value="<?= $IDMsgPadre ?>" name="ID">
	<input type="submit" Style="font-weight:bold;font-family:Verdana;font-size:8pt" value="Comune" />
	</form></div>
</td></tr>
<?
}
?>
        </table>
        <p>
          <? }
?>
        </p>
        <p></p>
        
  
      </table></td>
    <td width="20"></td>
  </tr>
  <tr>
    <td width="20" height="20"></td>
    <td height="20"></td>
    <td width="20" height="20"></td>
  </tr>
</table>
</body>
</html>
 

Trogo

Utente Attivo
11 Gen 2008
370
0
0
43
Sanremo
Senza leggere tutto... Ho visto parti tipo questa:
PHP:
       $MySql = 'INSERT INTO MessaggioAraldo (IDAraldo, IDMessaggioPadre, Tag, Titolo, Messaggio, Autore, IDGilda, Img, Corporazione, IDRazza, DataMessaggio)';
        $MySql .=" VALUES ($IDAraldo,";
        $MySql .=" '$IDMsgPadre',";
        $MySql .=" '$Tag',";
        $MySql .=" '$Titolo',";
        $MySql .=" '$Messaggio',";
        $MySql .=" '".pars($Login)."',";
        $MySql .=" '".pars($IDGilda_S)."',";
        $MySql .=" '".pars($ImgGilda_S)."',";
        $MySql .=" '".pars($DescGilda_S)."',";
        $MySql .=" '".pars($IDRazza_S)."',";
        $MySql .=" NOW())";
Anche in queste parti bisogna usare la addslashes sulle variabili interessate dalle query, come per gli altri script!
 

Levian

Utente Attivo
30 Set 2008
51
0
0
Sistemato in questo modo, a mio avviso corretto, ma la situazione è rimasta invariata:

Prima parte datiinternil.php:

PHP:
<? session_start();
include ('inc/variabile1.php');
include ('inc/variabile2.php');
include ('inc/variabile3.php');
### prendo le info del pg ###
$Login = $_SESSION['Login'];

$pagemax = 50;


$IDAraldo = 0 + $ID;
$IDMsgPadre = 0 + $IDMsgPadre;

if ($IDAraldo == "") {
    echo("Crash del Sistema.");
	exit;
}

function Tempo($tim) {
	return(strftime("%d/%m/%Y %H:%M", strtotime($tim)));
}
include ('inc/variabile4.php');
?>
<title>Comunity</title>
<style type="text/css">
<!--
a:link {
	color: #000000;
	text-decoration: none;
}
a:visited {
	text-decoration: none;
	color: #000000;
}
a:hover {
	text-decoration: none;
	color: #000000;
}
a:active {
	text-decoration: none;
	color: #000000;
}
.Stile1 {color: #000000}
.Stile2 {font-size: 9px}
-->
</style>
</head>
<body bgcolor="fbf4e4" text="#000000" link="#000000" vlink="#000000" alink="#000000">
<p align="center">&nbsp;</p>
<div align="center"></div>
<table border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="20" height="20"></td>
    <td width="600" height="20"></td>
    <td width="20" height="20"></td>
  </tr>
  <tr>
    <td width="20"></td>
    <td>
<table width="600" border="0" align="center">
      <tr>
        <td width="600">
            <?
    $MySql = "SELECT * FROM Araldo WHERE IDAraldo = $IDAraldo";

	$Result = mysql_query($MySql);
	$rs = mysql_fetch_array($Result);
    
    $IDAraldo = $rs['IDAraldo'];
	$Bacheca = $rs['Descrizione'];
	$Master_Araldo = $rs['Master'];
    $Capo = $rs['Capo'];
    $CapoRazza = $rs['CapoRazza'];
    $Punti = $rs['Punti'];
    $Gilda = $rs['Gilda'];
    $Razza = $rs['Razza'];
    $rs->close;
    mysql_free_result($Result);
    If (($Master_Araldo== 1) && ($Master < 1) ) {
        echo '';
        exit();
    }
    If ((($Capo==1) && ($Master_Araldo != 1)) && ($Master != 2))
{
        echo '';
        exit();
    }
    If ((($Capo!=1) && ($Master_Araldo == 1)) && ($Master != 1))
{
        echo '';
        exit();
    }
    If (($Gilda==1) && (0 + $IDGilda_S -100 < 0)) {
        echo '';
        exit();
    }

    If (($Razza==1) && (((0 + $IDRazza_S) % 1000) -10 < 0)) {
	    echo '';
    	exit();
    }
    
    If (($CapoRazza==1) && ((((0 + $IDRazza_S) % 10) != 0) || (((0 + $IDRazza_S) % 1000) == 0))) {
        echo '';
        exit();
    }
    
$Messaggio = trim($Messaggio);
$Titolo = trim($Titolo);
$Titolo = substr($Titolo, 0, max(255, strlen($Titolo)));

If ($Titolo == '') {
	$Titolo = 'Comunicazione';
}

If ($Messaggio != '') {
    #I controlli Master + Capo sono impliciti nel codice precedente
    #Effettuare controllo PG Esistente
    If ($IDMsg == '') {
        #----- nuovo messaggio! -----
        $MySql = 'INSERT INTO MessaggioAraldo (IDAraldo, IDMessaggioPadre, Tag, Titolo, Messaggio, Autore, IDGilda, Img, Corporazione, IDRazza, DataMessaggio)';
        $MySql .=" VALUES ($IDAraldo,";
        $MySql .=" '$IDMsgPadre',";
		$MySql .=" '$Tag',";
        $MySql .=" '$Titolo',";
        $MySql .=" '$Messaggio',";
        $MySql .=" '".addslashes(pars($Login))."',";
        $MySql .=" '".addslashes(pars($IDGilda_S))."',";
        $MySql .=" '".addslashes(pars($ImgGilda_S))."',";
        $MySql .=" '".addslashes(pars($DescGilda_S))."',";
        $MySql .=" '".addslashes(pars($IDRazza_S))."',";
        $MySql .=" NOW())";
#echo $MySql;
		$Result = mysql_query($MySql);
		
		$MySql = "SELECT * FROM MessaggioAraldo WHERE IDAraldo = '$IDAraldo' ORDER BY Benvisibile DESC, IDMessaggio DESC";
		$Result = mysql_query($MySql);
		$rs1 = mysql_fetch_array($Result);
		$IDMsg = $rs1['IDMessaggio'];
		$rs1->close;
		
    } else {
        #----- correzione messaggio! -----
        $MySql = "UPDATE MessaggioAraldo SET ";
		$MySql .=" Tag = '$Tag',";
        $MySql .=" Titolo = '$Titolo',";
        $MySql .=" Messaggio = '$Messaggio'";
        $MySql .=" WHERE IDAraldo = '$IDAraldo'";
        $MySql .=" AND IDMessaggio = '$IDMsg'";
		if ($Ban_S != '1') {
			$MySql .=" AND Autore = '".addslashes(pars($Login))."'";
		}
#echo $MySql;
        $Result = mysql_query($MySql);
    }
#----- CASO IN CUI SONO INSERITI PUNTI ESPERIENZA -----
	if ($Punti == 1) {
		
		# Passo 1 ---> Aggiornare al contrario i punti esperienza relativi al messaggio
		
		$MySql = "SELECT * FROM Punti WHERE IDMessaggioAraldo = '$IDMsg'";
		$Result1 = mysql_query($MySql);
		#echo $MySql.'<br>';
		
		while ($rs1 = mysql_fetch_array($Result1)) {
			$MySql = "UPDATE Personaggio SET Esperienza = Esperienza - '".$rs1['Esperienza']."' WHERE Nome = '".addslashes(pars($rs1['Nome']))."'";
			$Result2 = mysql_query($MySql);
			#echo $MySql.'<br>';
			
		}
		$rs1->close;
		
		# Passo 2 ---> Cancellare tutti i punti registrati relativi al messaggio
		
		$MySql = "DELETE FROM Punti WHERE IDMessaggioAraldo = '$IDMsg'";
		$Result = mysql_query($MySql);
		#echo $MySql.'<br>';
		
		# Passo 3 ---> Aggiungere i punti esperienza relativi al messaggio in input
		
		for ($i = 1; $i <= 20; $i++) {
			if (($_POST["Nome$i"] != '') && ($_POST["Esperienza$i"] != 0)) {
				$MySql = "INSERT INTO Punti (Nome, Esperienza, DataEvento, IDMessaggioAraldo)";
				$MySql .= " VALUES ('".$_POST["Nome$i"]."', '".$_POST["Esperienza$i"]."', '".strftime("%Y-%m-%d %H:%M:%S")."', '$IDMsg')";
				$Result = mysql_query($MySql);
				#echo $MySql.'<br>';
				
				$MySql = "UPDATE Personaggio SET Esperienza = Esperienza + '".$_POST["Esperienza$i"]."' WHERE Nome = '".$_POST["Nome$i"]."'";
				$Result = mysql_query($MySql);
				#echo $MySql.'<br>';
			}			
		}
	}
}

If ($op == 'cancella') {
    
#----- CASO IN CUI SONO INSERITI PUNTI ESPERIENZA -----
	if ($Punti == 1) {
		
		# Passo 1 ---> Aggiornare al contrario i punti esperienza relativi al messaggio
		
		$MySql = "SELECT * FROM Punti WHERE IDMessaggioAraldo = '$IDMsg'";
		$Result = mysql_query($MySql);
		#echo $MySql.'<br>';
		
		while ($rs1 = mysql_fetch_array($Result)) {
			$MySql = "UPDATE Personaggio SET Esperienza = Esperienza - '".$rs1['Esperienza']."' WHERE Nome = '".addslashes(pars($rs1['Nome']))."'";
			$Result1 = mysql_query($MySql);
			#echo $MySql.'<br>';
		}
		$rs1->close;
		
		# Passo 2 ---> Cancellare tutti i punti registrati relativi al messaggio
		
		$MySql = "DELETE FROM Punti WHERE IDMessaggioAraldo = '$IDMsg'";
		$Result = mysql_query($MySql);
		#echo $MySql.'<br>';
		
		# Passo 3 ---> Aggiungere i punti esperienza relativi al messaggio in input
	}
	
    $MySql = 'DELETE FROM MessaggioAraldo ';
    $MySql .=" WHERE IDAraldo = '$IDAraldo'";
    $MySql .=" AND IDMessaggio = '$IDMsg'";
	if ($Ban_S != '1') {
		$MySql .=" AND Autore = '".addslashes(pars($Login))."'";
	}
    $Result = mysql_query($MySql);

}



if ($IDMsgPadre == 0) {
?>
 

Levian

Utente Attivo
30 Set 2008
51
0
0
Seconda parte datiinternil.php:

PHP:
            <TABLE align="center" cellpadding="0" cellspacing="2">
              <tr class="table2" >
                <td class="table2" valign=top><TABLE align="center">
                    <TBODY>
                      <TR>
                        <td colspan=3 align="center"><font face="Verdana" color="#800000"><strong>
                          <?= htmlspecialchars($Bacheca) ?>
                          </strong></font><br><br><a href="codicil.php" target="_blank"><strong>Codici</strong></a>
                          <? if (($Master_Araldo==1) and ($Capo == 1)) { ?>
                          <? }  elseif ($Master_Araldo==1) { ?>
                          <? } elseif ($Capo==1) { ?>
                          <? } elseif ($CapoRazza==1) { ?>
                          <? } elseif ($Gilda==1) { ?>
                          <? } elseif ($Razza==1) { ?>
                          <? }
#$p = $_GET['p'];
$p = 0 + $p;
if (($p <= 0) || (!(is_int($p)))) {
    $p = 1;
}
$p1 = $p - 1;
?></td>
                      </tr>
                    </table></td>
              </tr>
              <tr>
                <td><div align="center"> <br>
                        <table width="600"  border="0" cellspacing="0" cellpadding="0">
                          <tr>
                            <td align=left><? if ($p1 > 0) { ?>
                                <a href="datiinternil.php?ID=<?= $IDAraldo ?>&IDMsgPadre=<?= $IDMsgPadre ?>&p=<?= $p1 ?>&Query=<?= $Query ?>"><font face="Verdana"><strong>< sfoglia</strong></font></a>
                                <? }

$Sql = "SELECT count(IDMessaggio) AS NumeroMex FROM MessaggioAraldo WHERE IDAraldo = '$IDAraldo' AND IDMessaggioPadre = 0";
	$Result3 = mysql_query($Sql);
	$rs3 = mysql_fetch_array($Result3);
$NumeroMex = $rs3['NumeroMex'];
$NumMaxMex = ($p*$pagemax);
 ?></td>
                            <td align=right><? if ($NumeroMex > $NumMaxMex) { ?>
                                <a href="datiinternil.php?ID=<?= $IDAraldo ?>&IDMsgPadre=<?= $IDMsgPadre ?>&p=<?= $p+1 ?>&Query=<?= $Query ?>"><font face="Verdana"><strong>sfoglia ></strong></font></a>
                                <? } ?>
                          </tr>
                        </table>
                </div>
                    </a>
                    </div></td>
              </tr>
              <tr>
                <td><TABLE width="600" class="table2">
                    <TBODY>
                      <TR>
                        <td width="20%"><p align="center"><font size="1" color="black" align="center">Utente</font></p></td>
                        <td width="20%" ><p align="center"><font size="1" color="black" align="center">Tag</font></p></td>
                        <td width="40%" ><p align="center"><font size="1" color="black" align="center">Comunicazione</font></p></td>
                        <td width="10%" ><p align="center"><font size="1" color="black" align="center">Intervento</font></p></td>
                        <td width="10%"><p align="center"><font size="1" color="black" align="center">Nuovo Intervento</font></p></td>
                      </tr>
                    </TBODY>
                </TABLE></TD>
              </TR>
              <? #INSERIRE DATI PER VeDERE I MESSAGGI ?>
              <? 

$MySql = "SELECT * FROM MessaggioAraldo WHERE IDAraldo = '$IDAraldo' AND IDMessaggioPadre = '$IDMsgPadre'";
    

if ($Gilda==1) {
	$MySql .= " AND (IDGilda >= $IDGilda_S - ".($IDGilda_S % 100).") AND (IDGilda < 100 + $IDGilda_S - ".($IDGilda_S % 100).")";
}
if ($Razza==1) {
	$MySql .= " AND (IDRazza >= $IDRazza_S - ".($IDRazza_S % 10).") AND (IDRazza < 10 + $IDRazza_S - ".($IDRazza_S % 10).")";
}

$MySql2 = "SELECT * FROM Personaggio WHERE Nome = '$Login'";

$Result = mysql_query($MySql2);
$rs = mysql_fetch_array($Result);
    
$Admin = $rs['Admin'];

$rs->close;
mysql_free_result($Result);

if($Admin==1){
	$MySql = "SELECT * FROM MessaggioAraldo WHERE IDAraldo = '$IDAraldo' AND IDMessaggioPadre = '$IDMsgPadre'";
}

$MySql .= " ORDER BY Benvisibile DESC, IDMessaggio";
if ($IDMsgPadre == 0) {
	$MySql.=" DESC LIMIT ".((($p-1)*$pagemax)).", ".$pagemax;
}
#echo " ";
$Result = mysql_query($MySql);
#$rs = mysql_fetch_array($Result);

#echo $MySql;


while($rs = mysql_fetch_array($Result)) { ?>
              <tr>
                <td><TABLE width="600" class="table3">
                    <TBODY>
                      <TR>
                        <td width="20%" ><div align="center"><b><a href="profilol.php?pg=<?= $rs["Autore"] ?>" target="_blank">
                            <?= htmlspecialchars($rs["Autore"]) ?>
                            </a></b><br>
                            <?= Tempo($rs["DataMessaggio"]) ?>
                        </div></td>
                        <td width="20%"><div align="center">
                           <?= htmlspecialchars($rs["Tag"]) ?>
                        </div></td>
                        <td width="40%"><div align="center"><? 
if ($rs["Benvisibile"]==1)
{ echo "♣ ♦ ♥ ♠<br>";
}?><a href="datiinternil.php?ID=<?= $IDAraldo ?>&IDMsgPadre=<?= $rs["IDMessaggio"] ?>&p=<?= $p 
?>"> <?= htmlspecialchars($rs["Titolo"]) ?><? if ($rs["Benvisibile"]==1){ echo "<br>";}?>
  		    </a></div></td>
                        <td width="10%" ><? 	
$Login = $_SESSION['Login'];
$MySql5 = 'SELECT * FROM `LogEntrate` WHERE Nome = "'.$Login.'" ORDER BY `DataEvento` DESC LIMIT 1, 1';
$Result5 = mysql_query($MySql5);
$rs5 = mysql_fetch_array($Result5);
$DataEvento = $rs5["DataEvento"];
$MySql = "SELECT count(IDMessaggio) AS NumeroMessaggi FROM MessaggioAraldo WHERE IDAraldo = '$IDAraldo' AND IDMessaggioPadre = '".$rs["IDMessaggio"]."'";
	#echo $MySql;
	$Result1 = mysql_query($MySql);
	$rs1 = mysql_fetch_array($Result1);
	#$newmsg = $rs1["NumeroMessaggi"]; ?>
                            <? 	$MySql2 = "SELECT count(IDMessaggio) AS NumeroNuovi FROM MessaggioAraldo WHERE IDAraldo = '$IDAraldo' AND IDMessaggioPadre = '".$rs['IDMessaggio']."' AND DataMessaggio > '".$DataEvento."' ";
	$Result2 = mysql_query($MySql2);
	$rs2 = mysql_fetch_array($Result2);
	$newmsg = $rs2["NumeroNuovi"]; 
?>
<? 	$MySql3 = "SELECT * FROM MessaggioAraldo WHERE IDAraldo = '$IDAraldo' AND IDMessaggioPadre = '".$rs['IDMessaggio']."' ORDER by Benvisibile DESC, DataMessaggio desc LIMIT 0,1";
	$Result3 = mysql_query($MySql3);
	$rs3 = mysql_fetch_array($Result3);
	$ultimomessaggio = Tempo($rs3["DataMessaggio"]);
	$ultimoautore = $rs3["Autore"];
?>
                            <p align="center"><b><font size="1" color="black" align="center">
                                  <?= $rs1["NumeroMessaggi"] ?>
                          </b> </font></p></td>
                        <td width="10%"><div align="center">
                            <strong>
                            <span class="Stile2">
                            <? 
if ($newmsg > 0) {

    	echo "".$rs2['NumeroNuovi'].""; } ?></span></strong>
                        </div></td>
                      </tr>
                    </TBODY>
                </TABLE></TD>
              </TR>
              <? }
 ?>
            </table>
<br><br><table border="0" align="center">
                          <tr>
            <td width="50%" align=left><form action="centrodatil.php" target="chat" method="post">
                <div align="center">
                  <input name="submit2" type="submit" Style="font-weight:bold;font-family:Verdana;font-size:8pt" value="Lista">
                </div>
            </form></td>
            <td width="50%" align=right>
                            <form action="datinuovil.php?ID<?= $IDAraldo ?>&IDMsgPadre=<?= $IDMsgPadre ?>" target="chat" method="post">
                                <div align="center">
                                  <input type="hidden" value="<?= $IDAraldo ?>" name="ID">
                                  <input name="submit" type="submit" Style="font-weight:bold;font-family:Verdana;font-size:8pt" value="Inserisci">
                                </div>
                            </form></td>
                          </tr>
            </table>
       <div align="center">   <? }
else { 
   
    $MySql = "SELECT * FROM MessaggioAraldo WHERE IDAraldo = $IDAraldo AND IDMessaggioPadre = $IDMsgPadre";

	$Result = mysql_query($MySql);
	$rs = mysql_fetch_array($Result);
 
    $MySql1 = "SELECT * FROM MessaggioAraldo WHERE IDAraldo = $IDAraldo AND IDMessaggioPadre = 0 AND IDMessaggio = $IDMsgPadre";
	$Result1 = mysql_query($MySql1);
	$rs1 = mysql_fetch_array($Result1);

	$Titoloint = ($rs1['Titolo']);   
$Letto = ($rs1['Letto'] + 1);
$MySql9 ="UPDATE `MessaggioAraldo` SET `Letto` = '".$Letto."', `Ultima Lettura` = NOW( )  WHERE IDAraldo = $IDAraldo AND IDMessaggioPadre = 0 AND IDMessaggio = $IDMsgPadre";
mysql_query($MySql9);
?></div>
            <TABLE align="center" cellpadding="0" cellspacing="0">
              <tr class="table2" >
                <td class="table2" valign=top><TABLE>
                    <TBODY>
                      <TR>
                        <td colspan=3 align=center><font face="Verdana" color="#800000"><strong>
                          <?= htmlspecialchars($Titoloint) ?>
                          </strong></font>
                          <? if (($Master_Araldo==1) and ($Capo == 1)) { ?>
                          <? }  elseif ($Master_Araldo==1) { ?>
                          <? } elseif ($Capo==1) { ?>
                          <? } elseif ($CapoRazza==1) { ?>
                          <? } elseif ($Gilda==1) { ?>
                          <? } elseif ($Razza==1) { ?>
                          <? }
#$p = $_GET['p'];
$p = 0 + $p;
if (($p <= 0) || (!(is_int($p)))) {
    $p = 1;
}
$p1 = $p - 1;
?></td>
                      </tr>
                    </table></td>
              </tr>
          </table></td>
      </tr>
    </table></td>
    <td width="20"></td>
  </tr>
  <tr>
    <td width="20" height="20"></td>
    <td height="20"></td>
    <td width="20" height="20"></td>
  </tr>
</table>
 

Levian

Utente Attivo
30 Set 2008
51
0
0
Terza parte datiinternil.php:

PHP:
<br>
<table border="0" align="center" cellpadding="0" cellspacing="0">
  <tr>
    <td width="10" height="20"></td>
    <td width="600" height="20"></td>
    <td width="10" height="20"></td>
  </tr>
  <tr>
    <td width="20"></td>
    <td><table border="0" align="center">
      <tr>
      <td>
      <table width="500" align="center" border="0">
        <tr>
        </tr>
      </table>
      <div align="center"> </div>
      <table width="500" border="0" cellpadding="0">
        <tr>
          <? 		$convtesto = htmlspecialchars($rs1["Messaggio"]);
        $convtesto = (str_replace("\n", "<br>", $convtesto));
		$convtesto = (str_replace("[capo]", "<br>", $convtesto));
		$convtesto = (str_replace("[grassetto]", "<b>", $convtesto));
		$convtesto = (str_replace("[/grassetto]", "</b>", $convtesto));
		$convtesto = (str_replace("[corsivo]", "<i>", $convtesto));
		$convtesto = (str_replace("[/corsivo]", "</i>", $convtesto));
		$convtesto = (str_replace("[sottolineato]", "<u>", $convtesto));
		$convtesto = (str_replace("[/sottolineato]", "</u>", $convtesto));
		$convtesto = (str_replace("[barrato]", "<s>", $convtesto));
		$convtesto = (str_replace("[/barrato]", "</s>", $convtesto));
		$convtesto = (str_replace("[apice]", "<sup>", $convtesto));
		$convtesto = (str_replace("[/apice]", "</sup>", $convtesto));
		$convtesto = (str_replace("[pendice]", "<sub>", $convtesto));
		$convtesto = (str_replace("[/pendice]", "</sub>", $convtesto));
		$convtesto = (str_replace("[tastiera]", "<kbd>", $convtesto));
		$convtesto = (str_replace("[/tastiera]", "</kbd>", $convtesto));
		$convtesto = (str_replace("[lampeggiante]", "<span style='text-decoration: blink'>", $convtesto));
		$convtesto = (str_replace("[/lampeggiante]", "</span>", $convtesto));
		$convtesto = (str_replace("[linea]", "<span style='text-decoration: overline'>", $convtesto));
		$convtesto = (str_replace("[/linea]", "</span>", $convtesto));
		$convtesto = (str_replace("[scandito]", "<span style='letter-spacing: 2pt'>", $convtesto));
		$convtesto = (str_replace("[/scandito]", "</span>", $convtesto));
		$convtesto = (str_replace("[scanditomax]", "<span style='letter-spacing: 5pt'>", $convtesto));
		$convtesto = (str_replace("[/scanditomax]", "</span>", $convtesto));
		$convtesto = (str_replace("[+-]", "&plusmn;", $convtesto));
		$convtesto = (str_replace("[picche]", "♠", $convtesto));
		$convtesto = (str_replace("[fiori]", "♣", $convtesto));
		$convtesto = (str_replace("[cuori]", "♥", $convtesto));
		$convtesto = (str_replace("[quadri]", "♦", $convtesto));
		$convtesto = (str_replace("[maschio]", "♂", $convtesto));
		$convtesto = (str_replace("[femmina]", "♀", $convtesto));
		$convtesto = (str_replace("[notamusicale]", "♪", $convtesto));
		$convtesto = (str_replace("[alfa]", "α", $convtesto));
		$convtesto = (str_replace("[beta]", "β", $convtesto));
		$convtesto = (str_replace("[gamma]", "γ", $convtesto));
		$convtesto = (str_replace("[delta]", "δ", $convtesto));
		$convtesto = (str_replace("[epsilon]", "ε", $convtesto));
		$convtesto = (str_replace("[zeta]", "ζ", $convtesto));
		$convtesto = (str_replace("[eta]", "η", $convtesto));
		$convtesto = (str_replace("[theta]", "θ", $convtesto));
		$convtesto = (str_replace("[iota]", "ι", $convtesto));
		$convtesto = (str_replace("[kappa]", "κ", $convtesto));
		$convtesto = (str_replace("[lambda]", "λ", $convtesto));
		$convtesto = (str_replace("[mu]", "μ", $convtesto));
		$convtesto = (str_replace("[nu]", "ν", $convtesto));
		$convtesto = (str_replace("[xi]", "ξ", $convtesto));
		$convtesto = (str_replace("[omicron]", "ο", $convtesto));
		$convtesto = (str_replace("[pi]", "π", $convtesto));
		$convtesto = (str_replace("[rho]", "ρ", $convtesto));
		$convtesto = (str_replace("[sigma]", "σ", $convtesto));
		$convtesto = (str_replace("[tau]", "τ", $convtesto));
		$convtesto = (str_replace("[upsilon]", "υ", $convtesto));
		$convtesto = (str_replace("[phi]", "φ", $convtesto));
		$convtesto = (str_replace("[chi]", "χ", $convtesto));
		$convtesto = (str_replace("[psi]", "ψ", $convtesto));
		$convtesto = (str_replace("[omega]", "ω", $convtesto));
		$convtesto = (str_replace("[thetasym]", "ϑ", $convtesto));
		$convtesto = (str_replace("[upsih]", "ϒ", $convtesto));
		$convtesto = (str_replace("[piv]", "ϖ", $convtesto));
		$convtesto = (str_replace("[centrale]", "<div align='center'>", $convtesto));
		$convtesto = (str_replace("[/centrale]", "</div>", $convtesto));
		$convtesto = (str_replace("[destro]", "<div align='right'>", $convtesto));
		$convtesto = (str_replace("[/destro]", "</div>", $convtesto));
		
		$Messaggio = $convtesto;

$autore1 = ($rs1["Autore"]);

    $MySql6 = "SELECT * FROM Personaggio WHERE Nome = '$autore1'";
	$Result6 = mysql_query($MySql6);
	$rs6 = mysql_fetch_array($Result6);

$imgsesso = $rs6['IDRazza'].strtolower($rs6["Sesso"]);
				
 ?>
          <td width="500" align="justify"><br>
              <a href="profilol.php?pg=<?= $rs1["Autore"] ?>" target="_blank"><strong><font size="2">
              <?= htmlspecialchars($rs1["Autore"]) ?>
              </font></strong></a> * | <font size="2">
              <?= Tempo($rs1["DataMessaggio"]) ?>
              </font><br>
              <br>
            Oggetto: <strong>
              <?= htmlspecialchars($Titoloint) ?>
              </strong><br>
            <br>
            <?= $Messaggio ?>
            <div  align="center">
              <?	if (($Login == $rs1["Autore"]) || ($Ban_S == '1')) { ?>
              <br>
              <a href="datinuovil.php?op=modifica&ID=<?= $IDAraldo ?>&IDMsg=<?= $rs1['IDMessaggio'] ?>&IDMsgPadre=<?= $rs1['IDMessaggioPadre'] ?>&p=<?= $p ?>"><strong><font color=black>Aggiorna</font></strong></a>
              <? 
$MySql2 = "SELECT count(IDMessaggio) AS Risposte FROM MessaggioAraldo WHERE IDAraldo = '$IDAraldo' AND IDMessaggioPadre = '".$rs['IDMessaggio']."' ";
	$Result2 = mysql_query($MySql2);
	$rs2 = mysql_fetch_array($Result2);
	$risposte = $rs2["Risposte"]; 

if ($risposte != 0) {
?>
              <a href="datiinternil.php?op=cancella&ID=<?= $IDAraldo ?>&IDMsg=<?= $rs1['IDMessaggio'] ?>&IDMsgPadre=<?= $rs1['IDMessaggioPadre'] ?>&p=<?= $p ?>" onClick="return Conferma();"><strong><font color=black>Distruggi</font></strong></a><br>
              <br>
              <? } else { ?>
              <br>
              <br>
              <? } } 
	if ($Punti == 1) {
		echo '<table><tr><td colspan=3>';
		$MySql = "SELECT * FROM Punti WHERE IDMessaggioAraldo = '".$rs1['IDMessaggio']."'";
		$Result1 = mysql_query($MySql);
		while ($rs1 = mysql_fetch_array($Result1)) {
			echo '<table width=160><tr>';
			echo '<td width=120><a Title="Vedi Profilo" href="profilol.php?pg='.addslashes(pars($rs1['Nome'])).'" target="_blank"><font color=white><b>'.addslashes(pars($rs1['Nome'])).'</b></font></a></td>';
			echo '<td width=30 align=right>';
			if ($rs1['Esperienza'] < 0) {
				echo '<font color=black><b>'.$rs1['Esperienza'].'</b></font>';
			} else {
				echo '<b> '.$rs1['Esperienza'].'</b>';
			}
			echo '</td>';
			
			# Controlla se il Personaggio esiste!
			$MySql = "SELECT Nome FROM Personaggio WHERE Nome = '".addslashes(pars($rs1['Nome']))."'";


			$Result2 = mysql_query($MySql);
			
			
			if (!$rs2 = mysql_fetch_array($Result2)) {
				echo '<td><font color=black>X</font></td>';
			}
			$rs2->close;
			
			echo '</tr></table>';
		}
		$rs1->close;
		echo '</td></tr></table>';
	}

?>
            </div>
            <br>
          </td>
        </tr>
        <? #INSERIRE DATI PER VeDERE I MESSAGGI ?>
        <? 
$pagemax = 50;
$MySql = "SELECT * FROM MessaggioAraldo WHERE IDAraldo = '$IDAraldo' AND IDMessaggioPadre = '$IDMsgPadre' ORDER BY Benvisibile DESC, `IDMessaggio` ASC ";

$Result = mysql_query($MySql);
while($rs = mysql_fetch_array($Result)) {
        $convtesto = htmlspecialchars($rs["Messaggio"]);
        $convtesto = (str_replace("\n", "<br>", $convtesto));
		$convtesto = (str_replace("[capo]", "<br>", $convtesto));
		$convtesto = (str_replace("[grassetto]", "<b>", $convtesto));
		$convtesto = (str_replace("[/grassetto]", "</b>", $convtesto));
		$convtesto = (str_replace("[corsivo]", "<i>", $convtesto));
		$convtesto = (str_replace("[/corsivo]", "</i>", $convtesto));
		$convtesto = (str_replace("[sottolineato]", "<u>", $convtesto));
		$convtesto = (str_replace("[/sottolineato]", "</u>", $convtesto));
		$convtesto = (str_replace("[barrato]", "<s>", $convtesto));
		$convtesto = (str_replace("[/barrato]", "</s>", $convtesto));
		$convtesto = (str_replace("[apice]", "<sup>", $convtesto));
		$convtesto = (str_replace("[/apice]", "</sup>", $convtesto));
		$convtesto = (str_replace("[pendice]", "<sub>", $convtesto));
		$convtesto = (str_replace("[/pendice]", "</sub>", $convtesto));
		$convtesto = (str_replace("[tastiera]", "<kbd>", $convtesto));
		$convtesto = (str_replace("[/tastiera]", "</kbd>", $convtesto));
		$convtesto = (str_replace("[lampeggiante]", "<span style='text-decoration: blink'>", $convtesto));
		$convtesto = (str_replace("[/lampeggiante]", "</span>", $convtesto));
		$convtesto = (str_replace("[linea]", "<span style='text-decoration: overline'>", $convtesto));
		$convtesto = (str_replace("[/linea]", "</span>", $convtesto));
		$convtesto = (str_replace("[scandito]", "<span style='letter-spacing: 2pt'>", $convtesto));
		$convtesto = (str_replace("[/scandito]", "</span>", $convtesto));
		$convtesto = (str_replace("[scanditomax]", "<span style='letter-spacing: 5pt'>", $convtesto));
		$convtesto = (str_replace("[/scanditomax]", "</span>", $convtesto));
		$convtesto = (str_replace("[+-]", "&plusmn;", $convtesto));
		$convtesto = (str_replace("[picche]", "♠", $convtesto));
		$convtesto = (str_replace("[fiori]", "♣", $convtesto));
		$convtesto = (str_replace("[cuori]", "♥", $convtesto));
		$convtesto = (str_replace("[quadri]", "♦", $convtesto));
		$convtesto = (str_replace("[maschio]", "♂", $convtesto));
		$convtesto = (str_replace("[femmina]", "♀", $convtesto));
		$convtesto = (str_replace("[notamusicale]", "♪", $convtesto));
		$convtesto = (str_replace("[alfa]", "α", $convtesto));
		$convtesto = (str_replace("[beta]", "β", $convtesto));
		$convtesto = (str_replace("[gamma]", "γ", $convtesto));
		$convtesto = (str_replace("[delta]", "δ", $convtesto));
		$convtesto = (str_replace("[epsilon]", "ε", $convtesto));
		$convtesto = (str_replace("[zeta]", "ζ", $convtesto));
		$convtesto = (str_replace("[eta]", "η", $convtesto));
		$convtesto = (str_replace("[theta]", "θ", $convtesto));
		$convtesto = (str_replace("[iota]", "ι", $convtesto));
		$convtesto = (str_replace("[kappa]", "κ", $convtesto));
		$convtesto = (str_replace("[lambda]", "λ", $convtesto));
		$convtesto = (str_replace("[mu]", "μ", $convtesto));
		$convtesto = (str_replace("[nu]", "ν", $convtesto));
		$convtesto = (str_replace("[xi]", "ξ", $convtesto));
		$convtesto = (str_replace("[omicron]", "ο", $convtesto));
		$convtesto = (str_replace("[pi]", "π", $convtesto));
		$convtesto = (str_replace("[rho]", "ρ", $convtesto));
		$convtesto = (str_replace("[sigma]", "σ", $convtesto));
		$convtesto = (str_replace("[tau]", "τ", $convtesto));
		$convtesto = (str_replace("[upsilon]", "υ", $convtesto));
		$convtesto = (str_replace("[phi]", "φ", $convtesto));
		$convtesto = (str_replace("[chi]", "χ", $convtesto));
		$convtesto = (str_replace("[psi]", "ψ", $convtesto));
		$convtesto = (str_replace("[omega]", "ω", $convtesto));
		$convtesto = (str_replace("[thetasym]", "ϑ", $convtesto));
		$convtesto = (str_replace("[upsih]", "ϒ", $convtesto));
		$convtesto = (str_replace("[piv]", "ϖ", $convtesto));
		$convtesto = (str_replace("[centrale]", "<div align='center'>", $convtesto));
		$convtesto = (str_replace("[/centrale]", "</div>", $convtesto));
		$convtesto = (str_replace("[destro]", "<div align='right'>", $convtesto));
		$convtesto = (str_replace("[/destro]", "</div>", $convtesto));
		
		$Messaggio = $convtesto;

$autore2 = ($rs["Autore"]);

    $MySql7 = "SELECT * FROM Personaggio WHERE Nome = '$autore2'";
	$Result7 = mysql_query($MySql7);
	$rs7 = mysql_fetch_array($Result7);

$imgsesso2 = $rs7['IDRazza'].strtolower($rs7["Sesso"]);
 ?>
        <tr></tr>
  <td width="88%" align="justify"><br>
          <a href="profilol.php?pg=<?= $rs["Autore"] ?>" target="_blank"><strong><font size="2">
          <?= htmlspecialchars($rs["Autore"]) ?>
          </font></strong></a> | <font size="2">
          <?= Tempo($rs["DataMessaggio"]) ?>
          </font><br>
          <br>
    Oggetto: <strong>
      <?= htmlspecialchars($Titoloint) ?>
      </strong><br>
    <br>
    <?= $Messaggio ?>
    <div align="center">
    <?	if (($Login == $rs["Autore"]) || ($Ban_S == '1')) { ?></div>
    <div align="center"><br>
        <a href="datinuovil.php?op=modifica&ID=<?= $IDAraldo ?>&IDMsg=<?= $rs['IDMessaggio'] ?>&IDMsgPadre=<?= $rs1['IDMessaggioPadre'] ?>&p=<?= $p ?>"><strong><font color=black>Aggiorna</font></strong></a> <a href="datiinternil.php?op=cancella&ID=<?= $IDAraldo ?>&IDMsg=<?= $rs['IDMessaggio'] ?>&IDMsgPadre=<?= $rs['IDMessaggioPadre'] ?>&p=<?= $p ?>" onClick="return Conferma();"><strong><font color=black>Distruggi</font></strong></a><br>
 

Levian

Utente Attivo
30 Set 2008
51
0
0
Quarta ed ultima parte datiinternil.php:

PHP:
        <br>
        <?   }  

	if ($Punti == 1) { 
		echo '<table><tr><td colspan=3>';
		$MySql = "SELECT * FROM Punti WHERE IDMessaggioAraldo = '".$rs['IDMessaggio']."'";
		$Result1 = mysql_query($MySql);
		while ($rs1 = mysql_fetch_array($Result1)) {
			echo '<table width=160><tr>';
			echo '<td width=120><a Title="Vedi Profilo" href="profilol.php?pg='.addslashes(pars($rs1['Nome'])).'" target="_blank"><font color=white><b>'.addslashes(pars($rs1['Nome'])).'</b></font></a></td>';
			echo '<td width=30 align=right>';
			if ($rs1['Esperienza'] < 0) {
				echo '<font color=red><b>'.$rs1['Esperienza'].'</b></font>';
			} else {
				echo '<b> '.$rs1['Esperienza'].'</b>';
			}
			echo '</td>';
			
			# Controlla se il Personaggio esiste!
			$MySql = "SELECT Nome FROM Personaggio WHERE Nome = '".addslashes(pars($rs1['Nome']))."'";
			$Result2 = mysql_query($MySql);
			
			
			if (!$rs2 = mysql_fetch_array($Result2)) {
				echo '<td><font color=black>X</font></td>';
			}
			$rs2->close;
			
			echo '</tr></table>';
		}
		$rs1->close;
		echo '</td></tr></table>';
	}
}
?>
      </div>
  </table>
      <table width="50%" align="center">
        <table width="500" align="center" border="0">
          <tr>
            <td width="50%" align=left><form action="datiinternil.php?ID=<?= $IDAraldo ?>" target="chat" method="post">
                <div align="center">
                  <input name="submit2" type="submit" Style="font-weight:bold;font-family:Verdana;font-size:8pt" value="Lista">
                </div>
            </form></td>
            <td width="50%" align=right><form action="datinuovil.php?ID=<?= $IDAraldo ?>&IDMsgPadre=<?= $IDMsgPadre ?>" target="chat" method="post">
                <div align="center">
                  <input type="hidden" value="<?= $IDAraldo ?>" name="ID2">
                  <input name="submit2" type="submit" Style="font-weight:bold;font-family:Verdana;font-size:8pt" value="Aggiungi">
                </div>
            </form></td>
          </tr>
		  <?
$MySql2 = "SELECT * FROM Personaggio WHERE Nome = '$Login'";

$Result = mysql_query($MySql2);
$rs = mysql_fetch_array($Result);
    
$Admin = $rs['Admin'];

$rs->close;
if($Admin==1){?><tr><td colspan="2" align="center"><div align="center">
<form action="benvisibilemod.php" target="chat"  method="post">
        <input type="hidden" value="<?= $IDMsgPadre ?>" name="ID">
	<input type="submit" Style="font-weight:bold;font-family:Verdana;font-size:8pt" value="Rilievo" />
	</form>
	<form action="nonvisibilemod.php" target="chat"  method="post">
        <input type="hidden" value="<?= $IDMsgPadre ?>" name="ID">
	<input type="submit" Style="font-weight:bold;font-family:Verdana;font-size:8pt" value="Comune" />
	</form></div>
</td></tr>
<?
}
?>
        </table>
        <p>
          <? }
?>
        </p>
        <p></p>
        
  
      </table></td>
    <td width="20"></td>
  </tr>
  <tr>
    <td width="20" height="20"></td>
    <td height="20"></td>
    <td width="20" height="20"></td>
  </tr>
</table>
</body>
</html>

P.s. - Ho controllato il file profilol.php ma non ho trovato nessuna parte che richiedesse la addslashes sulle variabili.
 

Trogo

Utente Attivo
11 Gen 2008
370
0
0
43
Sanremo
In questa parte:

PHP:
    If ($IDMsg == '') {
        #----- nuovo messaggio! -----
        $MySql = 'INSERT INTO MessaggioAraldo (IDAraldo, IDMessaggioPadre, Tag, Titolo, Messaggio, Autore, IDGilda, Img, Corporazione, IDRazza, DataMessaggio)';
        $MySql .=" VALUES ($IDAraldo,";
        $MySql .=" '$IDMsgPadre',";
        $MySql .=" '$Tag',";
        $MySql .=" '$Titolo',";
        $MySql .=" '$Messaggio',";
        $MySql .=" '".addslashes(pars($Login))."',";
        $MySql .=" '".addslashes(pars($IDGilda_S))."',";
        $MySql .=" '".addslashes(pars($ImgGilda_S))."',";
        $MySql .=" '".addslashes(pars($DescGilda_S))."',";
        $MySql .=" '".addslashes(pars($IDRazza_S))."',";
        $MySql .=" NOW())";

$Messaggio e $Titolo non vengono passati sotto addslashes. Come mai?
Se poi vuoi postare i file interi, credo sia meglio inserirli come allegati che non in linea nel post!
 

Levian

Utente Attivo
30 Set 2008
51
0
0
Ho sistemato in questo modo, senza risultato:

PHP:
If ($IDMsg == '') {
        #----- nuovo messaggio! -----
        $MySql = 'INSERT INTO MessaggioAraldo (IDAraldo, IDMessaggioPadre, Tag, Titolo, Messaggio, Autore, IDGilda, Img, Corporazione, IDRazza, DataMessaggio)';
        $MySql .=" VALUES ".addslashes(pars($IDAraldo))."',";
        $MySql .=" '".addslashes(pars($IDMsgPadre))."',";
		$MySql .=" '".addslashes(pars($Tag))."',";
        $MySql .=" '".addslashes(pars($Titolo))."',";
        $MySql .=" '".addslashes(pars($Messaggio))."',";
        $MySql .=" '".addslashes(pars($Login))."',";
        $MySql .=" '".addslashes(pars($IDGilda_S))."',";
        $MySql .=" '".addslashes(pars($ImgGilda_S))."',";
        $MySql .=" '".addslashes(pars($DescGilda_S))."',";
        $MySql .=" '".addslashes(pars($IDRazza_S))."',";
        $MySql .=" NOW())";

Inizio a prendere in considerazione l'idea che forse, per me, sarà meglio cercare qualche spazio web che supporti pienamente php4 (anche se la vedo difficile). Mi sto lentamente demoralizzando dopo questa mia sfilza di fallimenti. ._.'
 

Trogo

Utente Attivo
11 Gen 2008
370
0
0
43
Sanremo
Ancora una cosa, metti un echo per far stampare tutte le query che esegui limitatamente ai file che sono interessati all'invio di un messaggio?
E me le posti?
 

Levian

Utente Attivo
30 Set 2008
51
0
0
Non ho ben capito, vorresti la struttura della Query inerente ai messaggi della bacheca? (insomma del file datiinternil.php)?

In quel caso non ho problemi a darteli direttamente, senza dover stampare attraverso un echo (te l'ho inviata per pm).
 

Trogo

Utente Attivo
11 Gen 2008
370
0
0
43
Sanremo
Anche quella può essere d'aiuto, ma io intendevo una cosa tipo questa, facendo riferimento al tuo post del 07-10-2008 13.15.27:

PHP:
If ($IDMsg == '') {
        #----- nuovo messaggio! -----
        $MySql = 'INSERT INTO MessaggioAraldo (IDAraldo, IDMessaggioPadre, Tag, Titolo, Messaggio, Autore, IDGilda, Img, Corporazione, IDRazza, DataMessaggio)';
        $MySql .=" VALUES ".addslashes(pars($IDAraldo))."',";
        $MySql .=" '".addslashes(pars($IDMsgPadre))."',";
        $MySql .=" '".addslashes(pars($Tag))."',";
        $MySql .=" '".addslashes(pars($Titolo))."',";
        $MySql .=" '".addslashes(pars($Messaggio))."',";
        $MySql .=" '".addslashes(pars($Login))."',";
        $MySql .=" '".addslashes(pars($IDGilda_S))."',";
        $MySql .=" '".addslashes(pars($ImgGilda_S))."',";
        $MySql .=" '".addslashes(pars($DescGilda_S))."',";
        $MySql .=" '".addslashes(pars($IDRazza_S))."',";
        $MySql .=" NOW())";
        echo "<p>" . $MySql . "</p>";

Da aggiungere anche sulle altre query
 

Levian

Utente Attivo
30 Set 2008
51
0
0
Sono tornato dopo alcuni giorni di ferie passati piacevolmente altrove. ^^

Allora, l'echo risultante è questo:

INSERT INTO MessaggioAraldo (IDAraldo, IDMessaggioPadre, Tag, Titolo, Messaggio, Autore, IDGilda, Img, Corporazione, IDRazza, DataMessaggio) VALUES 3', '0', '[Altro]', 'Test', 'Testo \\\'*\\\" di prova.', 'Hisoka', '8', 'gestore.gif', 'Genei Ryodan', '8000', NOW())
 
Discussioni simili
Autore Titolo Forum Risposte Data
G migrazione Joomla 3.10 a 4.x Joomla 2
J migrazione da php 5.3 a 7.0 PHP 1
bubino8 [PHP] Gestionale Migrazione DB PHP 0
P Migrazione sito da http a https per rispettare linee guida google SEO e Posizionamento 12
booklisa Migrazione da Hosting Condiviso a Cloud CMS (Content Management System) 0
M windows 7 - Errore in migrazione a windows 10 Windows e Software 1
P Problemi migrazione da Apache 2.2.9 ad Apache2 Apache 0
felino [Cerco / Retribuito] Virtuemart: migrazione da 1.x a 3 Offerte e Richieste di Lavoro e/o Collaborazione 1
G Migrazione dominio e cambiamento DNS Domini 1
T Consigli migrazione da Phpbb a VBulletin CMS (Content Management System) 0
F problema migrazione sito joomla ad altro provider - non parte configurazione Joomla 3
F migrazione commenti jcomment 1.5 alla 2.5 Joomla 0
B Creazione Forum e migrazione di quello vecchio. PHP 1
P joomla: potrei riscontrare problemi migrazione dalla versione 1x alla 1.5 Joomla 13
T Migrazione blog Hosting 0
S AIUTOOOOOOOOOOOO!!!!!!!Migrazione da ASP a PHP PHP 1
E problemi migrazione script php su vers 4.1 PHP 0
S [MsSQL > MySQL] Migrazione struttura e dati e' possibile? MySQL 0
Z Migrazione da MySQL 3.23.58 a MySQL 4.0.18 Database 0
Z PHP4 e PHP5 PHP 18
L Pagina di registrazione (php4 -> php5) PHP 26
P Funzione "http_build_query" per PHP4 PHP 0
V Problema form da PHP4 a PHP5 PHP 0
L [gratuito] cerco sistema news xml in php5 Offerte e Richieste di Lavoro e/o Collaborazione 1
Monital Contare il numero di righe con php5 PHP 10
L Cerco esempio con classi php5 PHP 3
I PHP5, or not PHP5: that is the question PHP 5
M abilitare zip in php5 su linux PHP 1
H add videoplayer in php5/Mysql PHP 11
N problemi con le date in PHP5 PHP 3
M Script PHP5 PHP 0
peppoweb Php5: novità importanti PHP 0

Discussioni simili