Problema visualizzare scheda
Problema visualizzare scheda postato il 17/03/2008 19:56:15 nel forum programmazione, open source e hosting
ho questo problema.quando clicco su avatar di xxxx al posto di uscirmi la scheda, mi ricarica il luogo in cui mi trovo, nonostante nella barra appaia l'indirizzo alla scheda.es.login-->banca-->clicco su avatar--->riporto alla bancacome faccio a risolvere il problema?
Pagine → 1
17/03/2008 20:19:24
°-°Non so, posta il codiceSicuro che al link non sia associato qualche funzione ad un evento js come onClick?
17/03/2008 21:41:17
SCHEDA<? session_start();include ('inc/parametri.inc.php');include ('inc/open2.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 class=tScuro><td colspan=5 align=left Title="'.htmlspecialchars($Gst_Titolo).'"><a href="'.$Gst_Link.'"><img border=0 src="img/base.gif"> <font color=gold>'.htmlspecialchars($Gst_Titolo).'</font></a></font></td></tr>';}function formattadata($tim){ return strftime("%d/%m/%Y", strtotime($tim));}function barra($valore, $maxvalore){$colore = "55FF55";$colore1 = "FF4040";$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='img/spacer.gif' width='.$valore.' height=1>';};$bar .= "</td>";if (($maxvalore - $valore) > 0) {$bar .= '<td align=right bgcolor="'.$colore1.'" width=';$bar .= ($maxvalore - $valore).'><img src='img/spacer.gif' width='.($maxvalore-$valore).' height=1>';$bar .= "</td>";};$bar .= "</tr>";$bar .= "</table> ";return $bar;};#----- pulisci avatar -----If (($_SESSION['Esilio_S'] == 1) && ($_POST['Pulisci'] != '')) { $Msg = "<b>L'avatar di ".htmlspecialchars($pg)." è stato pulito!</b>"; $MySql = "UPDATE Personaggio SET URLImg = 'img/spacer.gif', Descrizione='Scheda pulita', ICQ='', Affetti='', Capacita='' WHERE Nome = '$pg'"; mysql_query($MySql); $MySql = "INSERT INTO Chat (Stanza, Mittente, Destinatario, Ora, Testo, Sesso, ImgGilda, DescGilda, ImgRazza, DescRazza, Tipo)"; $MySql .= "VALUES ('$Stanza', 'System Op', '$Login', NOW(), '".addslashes($Msg)."', '$Sesso_S', '$ImgGilda_S', '$DescGilda_S', '$ImgRazza_S', '$DescRazza_S', 'S')"; mysql_query($MySql); echo $MySql; $EsilioP = ""; echo "<font color=red>$Msg</font>";}#----- inizio prigione ed esilio -----$EsilioP = "";If (($_SESSION['Esilio_S'] == 1) && ($_POST['Esilia'] != '')) { $Motivo = $_POST['Motivo_Esilio']; $EsilioP = "'2037-12-31 00:00:00'"; if ($_POST['IP'] == 'on') { $Msg = "<b>".htmlspecialchars($pg)." è stato esiliato + IP escluso!</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>".htmlspecialchars($pg)." è stato esiliato!</b>"; } if ($_POST['Grazia'] == 'on') { $EsilioP = "'".strftime("%Y-%m-%d %H:%M:%S")."'"; $Msg = "<b>".htmlspecialchars($pg)." è stato graziato!</b>"; }}If (($_SESSION['Prigione_S'] == 1) && ($_POST['Arresta'] != '')) { $Motivo = $_POST['Motivo_Arresto']; $MySql = "SELECT Esilio From Personaggio WHERE Nome = '$pg'"; $Result = mysql_query($MySql); $rs = mysql_fetch_array($Result); if ($rs["Esilio"] == '2037-12-31 00:00:00') { $Msg = "<b>".htmlspecialchars($pg)." è esiliato e non può essere imprigionato!</b>"; $MySql = "INSERT INTO Chat (Stanza, Mittente, Destinatario, Ora, Testo, Sesso, ImgGilda, DescGilda, ImgRazza, DescRazza, Tipo)"; $MySql .= "VALUES ('$Stanza', 'System Op', '$Login', NOW(), '$Msg', '$Sesso_S', '$ImgGilda_S', '$DescGilda_S', '$ImgRazza_S', '$DescRazza_S', 'S')"; $Result = mysql_query($MySql); $EsilioP = ""; echo "<font color=red>$msg</font>"; } else { $EsilioP = "DATE_ADD(NOW(), INTERVAL '$gg' DAY)"; $Msg = "<b>".htmlspecialchars($pg)." è stato imprigionato per $gg giorni!</b>"; }}if ($EsilioP != "") { $MySql = "UPDATE Personaggio SET Esilio = $EsilioP"; $MySql .= ", DataEventoEsilio = NOW()"; $MySql .= ", Motivo = '$Motivo'"; $MySql .= ", AutoreEsilio = '$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', 'System Op', '$Login', NOW(), '$Msg', '$Sesso_S', '$ImgGilda_S', '$DescGilda_S', '$ImgRazza_S', '$DescRazza_S', 'S')"; $Result = mysql_query($MySql); echo "<font color=red>$Msg</font>";}If ((trim($pass) != "") AND (strtoupper($pg) == strtoupper($Login))){ echo('<font color=gold>SCHEDA MODIFICATA</font><hr size=1 color=gold>');# $pass = pars($pass); $descrizione = substr($descrizione, 0, 255); $descrizione = trim($descrizione); $affetti = substr($affetti, 0, 255); $affetti = trim($affetti); $capacita = substr($capacita, 0, 255); $capacita = trim($capacita); $email = trim($email); $icq = trim($icq); $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 ($icq == "") {$icq = "nessuno";}; if ($descrizione == "") {$descrizione = "niente";}; if ($affetti == "") {$affetti = "niente";}; if ($capacita == "") {$capacita = "niente";}; if ($email == "") {$email = "nessuna";}; $MySql = "UPDATE Personaggio"; $MySql .= " SET Pass = '".$pass."',"; $MySql .= " Descrizione = '".$descrizione."',"; $MySql .= " Affetti = '".$affetti."',"; $MySql .= " Capacita = '".$capacita."',"; $MySql .= " ICQ = '".$icq."',"; $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><!-- history.back(); //--> </script>"); exit();}; ######################################### # Il Recordset non è vuoto # #########################################$UrlImg = trim($rs["URLImg"]."");If ($UrlImg == "") $UrlImg = "img/sagoma".$rs["Sesso"].".gif";$UrlImgRazza = trim($rs["URLImgRazza"]."");If ($UrlImgRazza == "") $UrlImgRazza = "spacer.gif";$UrlImgGilda = trim($rs["URLImgGilda"]."");If ($UrlImgGilda == "") $UrlImgGilda = "nessuno.gif"; $Gilda = trim($rs["Gilda"]."");if ($Gilda == "") { if (strtolower($rs["Sesso"]) == "f") { $Gilda = "Cittadina delle Libere Terre"; } else { $Gilda = "Cittadino delle Libere Terre"; }}$DataUltimaGilda = $rs['DataUltimaGilda'];include ('inc/header.html.inc.php');?><title>Scheda <?= $pg ?></title></head><body><table border=0 cellpadding=2 cellspacing=2 class=tChiaro><tr> <td>Scheda Personaggio</td> <td class=tScuro><a href="scheda2.php?pg=<?= urlencode($pg) ?>">Oggetti</a></td><?if (isset($Login)) { if ($Login == $pg) { echo('<td class=tScuro><a href="scheda3.php?pg='.urlencode($pg).'">Modifica</a></td>'); echo('<td class=tScuro><a href="scheda4.php?pg='.urlencode($pg).'">Movimenti</a></td>'); echo('<td class=tScuro><a href="scheda5.php?pg='.urlencode($pg).'">Punti</a></td>'); echo('<td class=tScuro><a href="scheda6.php?pg='.urlencode($pg).'">Jutsu</a></td>'); echo('<td class=tScuro><a href="scheda7.php?pg='.urlencode($pg).'">Background</a></td>'); }}; ?></tr></table><br><br><table border=1 cellspacing=0 cellpadding=2 width=600 class=tChiaro><tr class=tTitolo> <? echo('<td colspan=3><font class=Titolo><img src="img/testamini'.strtolower($rs["Sesso"]).'.gif"> '.htmlspecialchars($rs["Nome"]).'</font></td>'); echo('<td colspan=2>'); echo('<a href="nuovomessaggio.php?Dest='.urlencode($rs["Nome"].'').'">'); echo('Scrivi a '.htmlspecialchars($rs["Nome"].'')); echo('</a>'); ?></td></tr><tr class=tScuro> <td rowspan=10 colspan=2 align=left valign=top width=200><img width=200 src="<?= $UrlImg ?>" border="0"></td> <td width=100>Iscrizione</td><td colspan=2> <?=formattadata($rs["DataIscrizione"])?></td></tr><tr class=tScuro> <td width=100>Esperienza</td><td width=20> <?= $rs["Esperienza"] ?></td><td width=300><?= barra($rs["Esperienza"], 0) ?></td></tr><tr class=tScuro> <td width=100>Mente</td><td width=20> <?= $rs["Mente"]."/".$rs["MaxMente"] ?></td><td width=300><?= barra($rs["Mente"], $rs["maxmente"]) ?></td></tr><tr class=tScuro> <td width=100>Forza</td><td width=20> <?= $rs["Forza"]."/".$rs["MaxForza"] ?></td><td width=300><?= barra($rs["Forza"], $rs["maxforza"]) ?></td></tr><td width=100>Resistenza</td><td width=20> <?= $rs["Resistenza"]."/".$rs["MaxResistenza"] ?></td><td width=300><?= barra($rs["Resistenza"], $rs["maxresistenza"]) ?></td></tr><tr class=tScuro><td width=100>Destrezza</td><td width=20> <?= $rs["Destrezza"]."/".$rs["MaxDestrezza"] ?></td><td width=300><?= barra($rs["Destrezza"], $rs["maxdestrezza"]) ?></td></tr><tr class=tScuro><td width=100>Genjutsu</td><td width=20> <?= $rs["Genjutsu"]."/".$rs["MaxGenjutsu"] ?></td><td width=300><?= barra($rs["Genjutsu"], $rs["maxgenjutsu"]) ?></td></tr><tr class=tScuro><td width=100>Ninjutsu</td><td width=20> <?= $rs["Ninjutsu"]."/".$rs["MaxNinjutsu"] ?></td><td width=300><?= barra($rs["Ninjutsu"], $rs["maxninjutsu"]) ?></td></tr><tr class=tScuro><td width=100>Taijutsu</td><td width=20> <?= $rs["Taijutsu"]."/".$rs["MaxTaijutsu"] ?></td><td width=300><?= barra($rs["Taijutsu"], $rs["maxtaijutsu"]) ?></td></tr><tr class=tScuro><td width=100>Chakra</td><td width=20> <?= $rs["Chakra"]."/".$rs["MaxChakra"] ?></td><td width=300><?= barra($rs["Chakra"], $rs["maxchakra"]) ?></td></tr><tr class=tScuro> <td width=100>Villaggio</td><td colspan="2"> <? if(intval($rs['IDVillaggio'])%1000 != 0){ echo '<a href="razza.php?ID='.intval($rs['IDVillaggio']/10)*10 .'">'; } ?> <img src="img/razze/<?=$UrlImgVillaggio?>" border=0> <?= htmlspecialchars($rs["Villaggio"]."") ?> <? if(intval($rs['IDVillaggio'])%1000 != 0){ echo '</a>'; } ?> <? $MySql = 'SELECT * FROM Villaggio WHERE IDVillaggio = '.intval($rs['IDVillaggio']/10)*10; $Result1 = mysql_query($MySql); $rs1 = mysql_fetch_array($Result1); $Disciplina = Array ( 1 => $rs1['Disciplina1'], 2 => $rs1['Disciplina2'], 3 => $rs1['Disciplina3'], 4 => $rs1['Disciplina4'] ); $rs1=''; for ($i=1; $i<=4; $i++) { if ($Disciplina[$i] != 0) { $MySql = 'SELECT * FROM Discipline WHERE ID = '.pars($Disciplina[$i]); $Result1 = mysql_query($MySql); $rs1 = mysql_fetch_array($Result1); echo('<br><li>'.htmlspecialchars($rs1['Nome'])); }; }; $rs1->close; ?></td></tr><tr class=tScuro> <td width=100>Rango</td><td colspan="2"> <? if(intval($rs['IDRango'])%1000 != 0){ echo '<a href="razza.php?ID='.intval($rs['IDRango']/10)*10 .'">'; } ?> <img src="img/razze/<?=$UrlImgRango?>" border=0> <?= htmlspecialchars($rs["Rango"]."") ?> <? if(intval($rs['IDRango'])%1000 != 0){ echo '</a>'; } ?> <? $MySql = 'SELECT * FROM Rango WHERE IDRango = '.intval($rs['IDRango']/10)*10; $Result1 = mysql_query($MySql); $rs1 = mysql_fetch_array($Result1); $Disciplina = Array ( 1 => $rs1['Disciplina1'], 2 => $rs1['Disciplina2'], 3 => $rs1['Disciplina3'], 4 => $rs1['Disciplina4'] ); $rs1=''; for ($i=1; $i<=4; $i++) { if ($Disciplina[$i] != 0) { $MySql = 'SELECT * FROM Discipline WHERE ID = '.pars($Disciplina[$i]); $Result1 = mysql_query($MySql); $rs1 = mysql_fetch_array($Result1); echo('<br><li>'.htmlspecialchars($rs1['Nome'])); }; }; $rs1->close; ?></td><tr class=tScuro> <td width=100 valign=top>Clan</td> <td colspan="2" valign=top> <? if(intval($rs['IDClan']) >= 100){ echo '<a href="corporazioni.php?ID='.intval($rs['IDClan']/100)*100 .'">'; } ?> <img src="img/stemmi/<?= $UrlImgClan ?>" border=0> <?= htmlspecialchars($Clan) ?><br> <? if(intval($rs['IDClan']) >= 100){ echo '</a>'; } ?> </td></tr>§<tr class=tScuro> <td width=100 valign=top>Corporazione </td> <td colspan="2" valign=top> <? if(intval($rs['IDGilda']) >= 100){ echo '<a href="corporazioni.php?ID='.intval($rs['IDGilda']/100)*100 .'">'; } ?> <img src="img/stemmi/<?= $UrlImgGilda ?>" border=0> <?= htmlspecialchars($Gilda) ?><br> </td></tr><tr class=tScuro> <td width=100 valign=top>Riconoscimenti </td> <td colspan="2" align=left valign=top><? switch ($rs["Master"]) { case 1: echo '<img src="img/gray-m.gif">'; break; case 2: echo '<img src="img/gray-c.gif">'; break; } ?> <? $MySql = "SELECT * FROM ClgPersonaggioMostrine"; $MySql .=" LEFT JOIN CodMostrina ON CodMostrina.IdMostrina = ClgPersonaggioMostrine.IdMostrina"; $MySql .=" WHERE ClgPersonaggioMostrine.Nome = '$pg' ORDER BY ClgPersonaggioMostrine.IdMostrina"; $Result1 = mysql_query($MySql); while ($rs1 = mysql_fetch_array($Result1)) { echo '<img src="img/mostrine/'.$rs1['ImgURL'].'" Title="'.$rs1['Descrizione'].'" baseline=top>'; } $rs1->close; ?></td></tr><tr class=tScuro> <td width=100 valign=top>Note del fato</td><td colspan="2" valign=top> <? if ((trim($rs["Descrizione"]."") == "") and !($upd)) { echo(" - "); } else { echo(str_replace(" ", "<br>", htmlspecialchars($rs["Descrizione"]))); } ?></td></tr><tr class=tScuro> <td width=100 valign=top>Affetti</td><td colspan="2" valign=top> <? if ((trim($rs["Affetti"]."") == "") and !$upd) { echo(" - "); } else { echo(str_replace(" ", "<br>", htmlspecialchars($rs["Affetti"]))); } ?></td></tr><tr class=tScuro> <td width=100 valign=top>Capacitá</td><td colspan="2" valign=top> <? if (($rs["Capacita"]."") == "" and !$upd) { echo(" - "); } else { echo(str_replace(" ", "<br>", htmlspecialchars($rs["Capacita"]))); } ?></td></tr><tr class=tScuro><? if (strtoupper($pg) == strtoupper($HTTP_SESSION_VARS['Login'])) { echo('<td>'.$par_CurrencyName.'</td><td> '.htmlspecialchars($rs["Soldi"]."").' </td>');} else { echo('<td colspan=2> </td>');}?><td width=100>ICQ/MSN</td><td colspan=2> <?= htmlspecialchars($rs["ICQ"]."") ?></td></tr><?if ($rs["Esilio"] == '2037-12-31 00:00:00') { #gmdate("d M Y H:i:s", mktime (0,0,0,12,31,9999))) { echo '<tr bgcolor=red><td colspan=5><font color=white>Cacciato il '.formattadata($rs['DataEventoEsilio']).' per sempre dalle libere terre.<br>Motivazione: '.htmlspecialchars($rs["Motivo"]).' ('.htmlspecialchars($rs["AutoreEsilio"]).')</font></td></tr>';} elseif ($rs["Esilio"] > date("Y-m-d H:i:s")) { #gmdate("d M Y H:i:s", mktime (0,0,0,12,31,9999))) { echo '<tr class=tTitolo><td colspan=5><font class=Warning>Imprigionato il '.formattadata($rs['DataEventoEsilio']).'.<br>Motivazione: '.htmlspecialchars($rs["Motivo"]).' ('.htmlspecialchars($rs["AutoreEsilio"]).')</font></td></tr>';}#----- Strumenti di Esilio o Prigione -----if ($_SESSION['Esilio_S']) { echo '<form onSubmit="return Conferma();" action="scheda.php" method=Post><tr><td colspan=5>Motivo Esilio <input name="Motivo_Esilio" size=40 maxlength=255> <input Name="Esilia" type=submit value="Esilia" style={color:white;background:red}> <input type=checkbox Name=IP style={background:red}> blocco IP <input Name="Grazia" type=checkbox style={background:green}> Grazia</td></tr><input type=hidden Name=pg value="'.$pg.'"></form></td></tr>'; echo '<form onSubmit="return Conferma();" action="scheda.php" method=Post><tr><td colspan=5>Pulisci Avatar <input Name="pg" type=hidden value="'.$pg.'"><input Name="Pulisci" type=submit value="Pulisci" style={color:black;background:white}></form>';}if ($_SESSION['Prigione_S']) { echo '<form onSubmit="return Conferma();" action="scheda.php" method=Post><tr><td colspan=5>Motivo Arresto <input name="Motivo_Arresto" size=40 maxlength=255> <input Name="Arresta" type=submit value="Arresta" style={background:yellow}> per giorni <select Name=gg><option>1</option><option>2</option><option>3</option><option>4</option><option>5</option></select></td></tr><input type=hidden Name=pg value="'.$pg.'"></form>'; }if ($_SESSION['LogDoppi_S']) { echo BottoneGestione('Log Doppi', 'D', 'gstLogDoppi.php?Nome='.urlencode($pg));}if ($_SESSION['LogFinanza_S'] == '1'){ echo BottoneGestione('Log Traffici Finanziari', 'F', 'gstLogFinanza.php?Nome='.urlencode($pg)); echo BottoneGestione('Log Oggetti', 'O', 'gst_LogOggetti.php?Nome='.urlencode($pg));}if (($_SESSION['Admin_S']=='1') AND ($_SESSION['AdminExt_S']=='1') AND ($par_Flag_AdminExt=='1')) { echo BottoneGestione('Chiudi Gestione Estesa', '', 'scheda.php?AdminExt=0&pg='.urlencode($pg)); #----- Controlla gli ultimi 10 IP di entrata echo BottoneGestione('Log Entrate', '', 'gstLogEntrate.php?Nome='.urlencode($pg)); echo '<tr class=tScuro><td colspan=5>'; $MySql = 'SELECT IP FROM LogEntrate WHERE Nome = ''.addslashes($pg).'' ORDER BY DataEvento DESC LIMIT 0,10'; $Result1 = mysql_query($MySql); while ($rs1 = mysql_fetch_array($Result1)) { echo '<a href="gstLogEntrate.php?IP='.$rs1['IP'].'">'.$rs1['IP'].'</a><br>'; } mysql_free_result($Result1); $rs1->close; echo '</td></tr>'; #----- Controlla gli ultimi 10 messaggi di chat ----- echo '<tr class=tScuro><td colspan=5>'; $MySql = 'SELECT Chat.*, Mappa.Breve FROM Chat LEFT JOIN Mappa ON Chat.Stanza=Mappa.ID WHERE Mittente=''.addslashes($pg).'' ORDER BY ID DESC LIMIT 0,10'; $Result1 = mysql_query($MySql); while ($rs1 = mysql_fetch_array($Result1)) { echo '<b>'.strftime("%H:%M", strtotime($rs1['Ora'])).' '.htmlspecialchars($rs1['Breve']).' ['.$rs1['Tipo'].'] ['.htmlspecialchars($rs1['Mittente']); if ($rs1['Destinatario'] != '') { echo '>><a href="scheda.php?pg='.urlencode($rs1['Destinatario']).'">'.htmlspecialchars($rs1['Destinatario']).'</a>'; } echo ']</b><br>'.$rs1['Testo'].'<br>'; } mysql_free_result($Result1); $rs1->close; echo '</td></tr>'; #----- Controlla le ultime 10 missive ----- echo '<tr class=tScuro><td colspan=5>'; $MySql = 'SELECT * FROM Messaggi WHERE Mittente=''.addslashes($pg).'' ORDER BY ID DESC LIMIT 0,10'; $Result1 = mysql_query($MySql); while ($rs1 = mysql_fetch_array($Result1)) { echo '</b></i><b>'.strftime("%d/%m/%Y %H:%M", strtotime($rs1['Spedito'])).' ['.htmlspecialchars($rs1['Mittente']).'>><a href="scheda.php?pg='.urlencode($rs1['Destinatario']).'">'.htmlspecialchars($rs1['Destinatario']).']</a></b><br>'; echo str_replace(" ", "<br>", substr($rs1['Testo'],0,200)).'<hr>'; } mysql_free_result($Result1); $rs1->close; echo '</td></tr>';}if (($_SESSION['Admin_S']=='1') AND ($_SESSION['AdminExt_S']!='1') AND ($par_Flag_AdminExt=='1')) { echo BottoneGestione('Apri Gestione Estesa', '', 'scheda.php?AdminExt=1&pg='.urlencode($pg));} ?></table><? $rs->close; ?><script language="JavaScript">function Conferma(){ if (confirm('Sei sicuro?')) return true; else return false; }</script></body></html>------------------------------------------SCHEDA 2<? session_start();include ('inc/parametri.inc.php');include ('inc/open2.php');If (($HTTP_GET_VARS["Login"] != "") or ($HTTP_POST_VARS["Login"] != "")) {$Login = "";};include ('inc/header.html.inc.php');?><title>Oggetti <?= $pg ?></title><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"></head><body bgcolor=#555555><?function formattadata($tim){ return strftime("%d/%m/%Y", strtotime($tim));}$pg = $_POST['pg'];if ($pg == '') { $pg = $_GET['pg'];}$pgDest = $_POST['pgDest'];$IDOggetto = 0 + $_POST['IDOggetto'];#*** COMMENTO OGGETTO: INSERIMENTO DESCRIZIONE ***If (($_POST['commenta'] == 'commenta') AND (strtoupper($pg) == strtoupper($Login))) { echo '<form action="scheda2.php" method=Post>'; echo "<input type=hidden name=pg value='$Login'>"; echo "<input type=hidden name=IDOggetto value='$IDOggetto'>"; $MySql = 'SELECT * FROM ClgPersonaggioOggetto'; $MySql .= ' LEFT JOIN Oggetto ON Oggetto.IDOggetto = ClgPersonaggioOggetto.IDOggetto'; $MySql .= ' WHERE ClgPersonaggioOggetto.Nome = ''.addslashes($pg).'''; $MySql .= ' AND Oggetto.IDOggetto = '.$IDOggetto; #echo $MySql; $Result = mysql_query($MySql); $rs = mysql_fetch_array($Result); ?> <center><font class=Titolo>Commenta l'oggetto</font></center><br> <center>Puoi usare fino a 255 caratteri</center><table cellpadding=0 cellspacing=1 border=0 width="100%" class=tTitolo><td><table cellpadding=2 cellspacing=0 border=0 width="100%"><tr class=tScuro> <td align=center valign=top width=150><?= htmlspecialchars($rs['Descrizione']) ?><? if ($rs["Numero"] > 1) { echo ("<br>x ".$rs["Numero"]); }; ?> </td> <td valign=top align=left rowspan=2><?= htmlspecialchars($rs['DescrizioneLunga'])?><br><textarea name=Commento rows=5 cols=40><?= htmlspecialchars($rs['Commento']) ?></textarea><br> <input type=submit Name="InviaCommento" value="Modifica Commento"></td></tr> <tr class=tScuro> <td width=150 align=center><table><tr class=tScuro> <td align=center valign=top width=70 bgcolor=white><img src="img/oggetti/<?= $rs['URLImg'] ?>" border=0 Title="<?= $rs['IDOggetto'].' - realizzato da '.$rs['Creatore'].' il '.formattadata($rs['DataInserimento']) ?>"></td> </tr></table></td></tr></table></td></tr></table></form><? $rs->close; exit();}#*** COMMENTO OGGETTO: MODIFICA DATABASE ***If (($_POST['InviaCommento'] != '') AND (strtoupper($pg) == strtoupper($Login))) { $MySql = "UPDATE ClgPersonaggioOggetto"; $MySql.= " SET Commento = '".$_POST['Commento']."'"; $MySql.= " WHERE Nome = '".addslashes($Login)."' AND IDOggetto=$IDOggetto"; mysql_query($MySql);}#*** CESSIONE OGGETTO: SCELTA DESTINATARIO ***If ($_POST['cedi'] == 'cedi') { If (stripslashes($pg) != $Login) { echo '<b>ERRORE: il personaggio che deve cedere gli oggetti non sei tu.</b>'; } else { ECHO "<font class=titolo>Seleziona il personaggio al quale cedere l'oggetto</font><br><hr size=1 color=gold>"; ECHO "<table>"; $MySql = "SELECT * FROM Presenti WHERE OraUscita = '2037-12-31' and Stanza = '".pars($Stanza)."' and Is_Invisibile = 0 order by Nome"; $result = mysql_query($MySql); while ($rs = mysql_fetch_array($result)) { echo "<form action='scheda2.php' method=Post>"; echo "<input type=hidden name=IDOggetto value='$IDOggetto'>"; echo "<input type=hidden name=pg value='$Login'>"; echo "<tr><td><IMG SRC='img/testamini".$rs["Sesso"].".gif' width=8 height=8 border=0 alt="".$rs["DescRazza"].""> <input type=submit name=pgDest value='".trim($rs["Nome"])."' style="background:gold"></td></tr>"; echo "</form> "; } echo '<tr><td><a href="scheda2.php?pg='.urlencode($Login).'">Non cedere l'oggetto</a></td></tr>'; echo "</table>"; exit(); }}#*** CESSIONE OGGETTO: cambio di destinatario! ***if (($_SESSION['Master'] == 1) && ($IDOggetto > 0) && ($_POST['prendi'] == 'prendi')) { $pgDest = $Login;}#*** CESSIONE OGGETTO: SPOSTAMENTO OGGETTO ***If ($pgDest != '') { $MySql = "SELECT * FROM Presenti WHERE Nome = '".$pgDest."' AND OraUscita = '2037-12-31 00:00:00' and Stanza = '".$Stanza."'"; $Result = mysql_query($MySql); if (!($rs = mysql_fetch_array($Result))) { echo "<script>alert('Spiacente, il personaggio non è più presente!')</script>"; $rs->close; } else { $rs->close; $MySql = "SELECT Numero FROM ClgPersonaggioOggetto WHERE Nome = '".pars($pg)."'"; $MySql .= " AND IDOggetto = '$IDOggetto'"; $Result = mysql_query($MySql); if (!($rs = mysql_fetch_array($Result))) { $rs->close; echo("<script>alert('Spiacente, non hai più questo oggetto!')</script>"); } else { if ($rs['Numero'] <= 1) { $rs->close; $MySql = "DELETE FROM ClgPersonaggioOggetto "; $MySql .= " WHERE Nome = '$pg'"; $MySql .= " AND IDOggetto = '$IDOggetto'"; $Result = mysql_query($MySql); } else { $rs->close; $MySql = "UPDATE ClgPersonaggioOggetto Set Numero = Numero - 1"; $MySql .= " WHERE Nome = '$pg'"; $MySql .= " AND IDOggetto = '$IDOggetto'"; $Result = mysql_query($MySql); } $MySql = "SELECT Numero FROM ClgPersonaggioOggetto"; $MySql .= " WHERE Nome = '$pgDest'"; $MySql .= " AND IDOggetto = '$IDOggetto'"; $Result = mysql_query($MySql); $rs = mysql_fetch_array($Result); if (!($rs)) { $MySql = "INSERT INTO ClgPersonaggioOggetto(IDOggetto, Nome, Numero)"; $MySql .= " VALUES('$IDOggetto', '$pgDest', 1)"; $Result = mysql_query($MySql); } else { $MySql = "UPDATE ClgPersonaggioOggetto Set Numero = Numero + 1"; $MySql .= " WHERE Nome = '$pgDest'"; $MySql .= " AND IDOggetto = '$IDOggetto'"; $Result = mysql_query($MySql); } $rs->close; $MySql = "SELECT * FROM Oggetto "; $MySql .= " WHERE IDOggetto = ".pars($IDOggetto); $Result = mysql_query($MySql); $rs = mysql_fetch_array($Result); $NomeOggetto = $rs['Descrizione']; $rs->close; $MySql = "SELECT Numero, PrezzoTotale FROM Mercato WHERE IDOggetto = '$IDOggetto'"; $Result = mysql_query($MySql); $rs = mysql_fetch_array($Result); $Num = $rs["Numero"]; $PT = $rs["PrezzoTotale"]; $rs->close; $Prezzo = round(($PT/($Num+10))*(2/3)); $MySql = "INSERT INTO LogFinanza (Nome, Somma, Tipo, DataEvento, Nota)"; $MySql .= " VALUES('".pars($pg)."', '-$Prezzo',"; $MySql .= "'-3', '".strftime("%Y-%m-%d %H:%M:%S")."',"; $MySql .= "'Ceduto ".pars($NomeOggetto)." a $pgDest')"; $Result = mysql_query($MySql); $MySql = "INSERT INTO LogFinanza (Nome, Somma, Tipo, DataEvento, Nota)"; $MySql .= " VALUES('$pgDest', '$Prezzo',"; $MySql .= "'3', NOW(),"; $MySql .= "'Preso ".pars($NomeOggetto)." da ".pars($pg)."')"; $Result = mysql_query($MySql); echo("<script>alert('Oggetto ceduto!')</script>"); } }};?><table border=0 cellpadding=2 cellspacing=2 class=tChiaro><tr> <td class=tScuro><a href="scheda.php?pg=<?= urlencode($pg) ?>">Scheda Personaggio</a></td> <td>Oggetti</td><? if (strtoupper($pg) == strtoupper($Login)) { ?> <td class=tScuro><a href="scheda3.php?pg=<?= urlencode($pg) ?>">Modifica</a></td> <td class=tScuro><a href="scheda4.php?pg=<?= urlencode($pg) ?>">Movimenti</a></td> <td class=tScuro><a href="scheda5.php?pg=<?= urlencode($pg) ?>">Punti</a></td> <td class=tScuro><a href="scheda6.php?pg=<?= urlencode($pg) ?>">Jutsu</a></td> <td class=tScuro><a href="scheda7.php?pg=<?= urlencode($pg) ?>">Background</a></td><? } ?></tr></table><br><br><table cellpadding=2 cellspacing=2 border=0 width="100%"><tr> <td align=center bgcolor=333333><font class=titolo>Oggetti<br> </font></td></tr></table><? #------------- OGGETTI --------------- $MySql = 'SELECT * FROM ClgPersonaggioOggetto'; $MySql .= ' LEFT JOIN Oggetto ON Oggetto.IDOggetto = ClgPersonaggioOggetto.IDOggetto'; $MySql .= ' WHERE ClgPersonaggioOggetto.Nome = ''.pars($pg).'''; #echo $MySql; $Result = mysql_query($MySql); while ($rs = mysql_fetch_array($Result)) { ?><table cellpadding=0 cellspacing=1 border=0 width="100%" class=tTitolo><td><table cellpadding=2 cellspacing=0 border=0 width="100%"><tr class=tScuro> <td align=center valign=top width=150><?= htmlentities($rs['Descrizione']); if ($rs["Numero"] > 1) { echo ("<br>x ".$rs["Numero"]); }; ?></td> <td valign=top align=left rowspan=2><?= htmlspecialchars($rs['DescrizioneLunga']) ?> <? if ($rs['Commento'].'' != '') { echo '<table border=0 width="100%" cellpadding=2 cellspacing=1><tr class=tChiaro><td>'.str_replace(" ", '<br>', htmlspecialchars($rs['Commento'])).'</td></tr></table>'; } ?> </td> <td valign=top align=left rowspan=2 width=120><? if (strtoupper($pg) == strtoupper($Login)) { ?><form action="scheda2.php" method="Post"><input type="hidden" name="IDOggetto" value="<?= $rs['IDOggetto'] ?>"> <input type="hidden" name="pg" value="<?= $pg ?>"> <input type="submit" name="cedi" value="cedi" style={background:gold;}> <input type="submit" name="commenta" value="commenta"> </form> <? #if ($rs["uso"]==1) {echo '<input type=submit value="usa" name="usa">';} } else { if ($_SESSION["Master"] == 1) { ?> <form action="scheda2.php" method="Post"><input type="hidden" name="IDOggetto" value="<?= $rs['IDOggetto'] ?>"> <input type="hidden" name="pg" value="<?= $pg ?>"> <input type="submit" name="prendi" value="prendi" style={background:gold;}> </form> <? } } ?></td></tr> <tr class=tScuro> <td width=150 align=center><table><tr class=tScuro> <td align=center width=70 bgcolor=white> <img src="img/oggetti/<?= $rs["URLImg"] ?>" border="0" Title="<?= $rs['IDOggetto'].' - realizzato da '.$rs['Creatore'].' il '.formattadata($rs['DataInserimento']) ?>" ?>" border=0 Title="<?= $rs['IDOggetto'].' - realizzato da '.$rs['Creatore'].' il '.formattadata($rs['DataInserimento']) ?>"></td> </tr></table></td></tr></table></td></tr></table><br><? };$rs->close;?></body></html>--------------------------------------------------------------SCHEDA 3<? session_start();include ('inc/parametri.inc.php');include ('inc/controllo.php');include ('inc/open2.php');$pg = trim($pg);$Modifica = trim($Login);$upd = ((strtoupper($pg) == strtoupper($Login)) and (trim($pg) != "") and (strtoupper($Modifica) == strtoupper($pg)));function barra($valore, $maxvalore){$colore = "55FF55";$colore1 = "FF4040";$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='img/spacer.gif' width='.$valore.' height=1>';};$bar .= "</td>";if (($maxvalore - $valore) > 0) {$bar .= '<td align=right bgcolor="'.$colore1.'" width=';$bar .= ($maxvalore - $valore).'><img src='img/spacer.gif' width='.($maxvalore-$valore).' height=1>';$bar .= "</td>";};$bar .= "</tr>";$bar .= "</table> ";return $bar;};$MySql = "SELECT Personaggio.*, Villaggio.Villaggio, Villaggio.URLImg AS URLImgVillaggio, Rango.Rango, Rango.URLImg AS URLImgRango, Gilda.Gilda, Gilda.URLImg AS URLImgGilda, Clan.Clan, Clan.URLImg AS URLImgClan FROM Personaggio LEFT JOIN Villaggio ON Personaggio.IDVillaggio = Villaggio.IDVillaggio LEFT JOIN Villaggio ON Personaggio.IDRango = Rango.IDRango LEFT JOIN Gilda ON Personaggio.IDGilda = Gilda.IDGilda LEFT JOIN Clan ON Personaggio.IDClan = Clan.IDClan WHERE Nome = '".pars($pg)."'";$result = mysql_query($MySql);$rs = mysql_fetch_array($result);if ((trim($pg) == "") or !($rs)) { $rs->close; mysql_close; echo("<script><!-- history.back(); //--> </script>"); exit();}; ######################################### # Il Recordset non è vuoto # #########################################$UrlImg = trim($rs["URLImg"]);If ($UrlImg == "") $UrlImg = "img/sagoma".$rs["Sesso"].".gif";$UrlImgVillaggio = trim($rs["URLImgVillaggio"]);If ($UrlImgVillaggio == "") $UrlImgVillaggio = "spacer.gif";$UrlImgRango = trim($rs["URLImgRango"]);If ($UrlImgRango == "") $UrlImgRango = "spacer.gif";$UrlImgGilda = trim($rs["URLImgGilda"]);If ($UrlImgGilda == "") $UrlImgGilda = "nessuno.gif"; $Gilda = trim($rs["Gilda"]);if ($Gilda == "") { if (strtolower($rs["Sesso"]) == "f") { $Gilda = "Cittadina delle Libere Terre"; } else { $Gilda = "Cittadino delle Libere Terre"; }$UrlImgClan = trim($rs["URLImgClan"]);If ($UrlImgClan == "") $UrlImgClan = "nessuno.gif"; $Clan = trim($rs["Clan"]);if ($Clan == "") { if (strtolower($rs["Sesso"]) == "f") { $Clan = "Cittadina delle Libere Terre"; } else { $Clan = "Cittadino delle Libere Terre";}include ('inc/header.html.inc.php');?><title>Modifica Scheda <?= $pg ?></title></head><body bgcolor=#555555><table border=0 cellpadding=2 cellspacing=2 class=tChiaro><tr> <td class=tScuro><a href="scheda.php?pg=<?= urlencode($pg) ?>">Scheda Personaggio</a></td> <td class=tScuro><a href="scheda2.php?pg=<?= urlencode($pg) ?>">Oggetti</a></td><? if (strtoupper($pg) == strtoupper($Login)) { ?> <td>Modifica</td> <td class=tScuro><a href="scheda4.php?pg=<?= urlencode($pg) ?>">Movimenti</a></td> <td class=tScuro><a href="scheda5.php?pg=<?= urlencode($pg) ?>">Punti</a></td> <td class=tScuro><a href="scheda6.php?pg=<?= urlencode($pg) ?>">Jutsu</a></td> <td class=tScuro><a href="scheda7.php?pg=<?= urlencode($pg) ?>">Background</a></td><? } ?></tr></table><br><br><? if (!($upd)) {exit();} ?><table border="1" bordercolor="#F8E9AA" cellspacing="0" cellpadding="2" width="420"><tr> <td colspan=4><font class=Titolo> <img src="img/testamini<?= strtolower($rs["Sesso"]) ?>.gif" ?>.gif" ?>.</font></td></tr><? if ($upd) { ?><form action="scheda.php" method="POST"><input type="hidden" name="pg" value="<?= urlencode($pg) ?>"><tr> <td>ATTENZIONE: nessuno può imporre di cambiare la password suggerendo quella nuova. Se accadesse, denunciatelo ai moschettieri.</td> <td width=100>Password</td><td colspan="2"> <input type="password" name="pass" maxlength="50" value="<?= htmlspecialchars($rs["Pass"]) ?>" ?>" ?></td></tr><? } if (($rs["DataNascita"] == "") || ($rs["DataNascita"] == "0000-00-00")) {?><tr> <td>ATTENZIONE: impostare la data di nascita per una migliore sicurezza nel recupero della password.</td> <td align=left>data di nascita (gg/mm/aaaa):</td> <td align=left colspan=2><input Name="gg" size=2 maxlength=2><input Name="mm" size=2 maxlength=2><input Name="aaaa" size=4 maxlength=4></td></tr><? } ?><tr> <td rowspan="10" align="left" valign="top" width="200"><img width="200" src="<?= $UrlImg ?>" border="0"></td> <td width=100>Esperienza</td><td width=20> <?= htmlspecialchars($rs["Esperienza"]) ?></td><td width=100><?= barra($rs["Esperienza"],$rs["MaxEsperienza"]) ?></td></tr><tr> <td width=100>Mente</td><td width=20> <?= htmlspecialchars($rs["Mente"]) ?></td><td width=100><?= barra($rs["Mente"],$rs["MaxMente"]) ?></td></tr><tr> <td width=100>Forza</td><td width=20> <?= htmlspecialchars($rs["Forza"]) ?></td><td width=100><?= barra($rs["Forza"],$rs["MaxForza"]) ?></td></tr><tr> <td width=100>Villaggio</td><td colspan="2"> <?= htmlspecialchars($rs["Villaggio"]) ?></td></tr><tr> <td width=100>Gilda</td><td colspan="2"> <?= htmlspecialchars($Gilda) ?></td><? if (($pg == $Login) && !(strtoupper($Modifica) == strtoupper($pg))) { ?></tr><td width=100>Clan</td><td colspan="2"> <?= htmlspecialchars($Clan) ?></td><? if (($pg == $Login) && !(strtoupper($Modifica) == strtoupper($pg))) { ?></tr><tr> <td width=100><?= $par_CurrencyName ?></td><td colspan="2"> <?= htmlspecialchars($rs["Soldi"]) ?></td><? } ?></tr><tr> <td width=100>Note del fato</td><td colspan="2"> <? if ((trim($rs["Descrizione"]) == "") && !($upd)) { echo "niente"; } else { if ($upd) { echo "<textarea cols=40 rows=4 name="descrizione">".htmlspecialchars($rs["Descrizione"])."</textarea>"; } else { echo htmlspecialchars($rs["Descrizione"]); } } ?></td></tr><tr> <td width=100>Affetti</td><td colspan="2"> <? if (trim($rs["Affetti"] == "") && !($upd)) { echo "niente"; } else { if ($upd) { echo "<textarea cols=40 rows=4 name="affetti">".htmlspecialchars($rs["Affetti"])."</textarea>"; } else { echo htmlspecialchars($rs["Affetti"]); } } ?></td></tr><tr> <td width=100>Background</td><td colspan="2"> <? if (trim($rs["Background"] == "") && !($upd)) { echo "niente"; } else { if ($upd) { echo "<textarea cols=40 rows=4 name="background">".htmlspecialchars($rs["Background"])."</textarea>"; } else { echo htmlspecialchars($rs["Background"]); } } ?></td></tr><tr> <td width=100>Capacitá</td><td colspan="2"> <? if ((trim($rs["Capacita"]) == "") && !($upd)) { echo "niente"; } else { if ($upd) { echo "<textarea cols=40 rows=4 name="capacita">".htmlspecialchars($rs["Capacita"])."</textarea>"; } else { echo htmlspecialchars($rs["Capacita"]); } } ?></td></tr><tr> <td width=100>ICQ/MSN</td><td colspan="3"> <? if ($upd) { echo "<input type="text" name="icq" value="".htmlspecialchars($rs["ICQ"])."" maxlength=50 size=50>"; } else { echo htmlspecialchars(rs("ICQ") & ""); } ?></td></tr><tr> <td width=100>Master</td><td colspan="3"> <? if ($rs["Master"] == 1) { echo "Sì"; } else { echo "No"; } ?></td></tr><? if ($upd) { ?><tr> <td>URL Immagine</td><td colspan="3"> <input type="text" name="urlimg" maxlength="255" value="<?= htmlspecialchars($rs["URLImg"]) ?>" size="40" ?>" size="40" ?></td></tr><tr> <td>Modifica</td><td colspan="3"> <input type="Submit" value="Modifica <?= $pg ?>"></td></tr></form><? } ?></table><? $rs->close; ?></body></html>-----------------------------------------------------------SCHEDA 4<? session_start();include("inc/parametri.inc.php");include("inc/open2.php");include("inc/controllo.php");$Login = $_SESSION['Login'];$pg = trim($pg);if ($pg == '') { $pg = $Login;}$Modifica = trim($Login);$upd = ((strtoupper($pg) == strtoupper($Login)) and (trim($pg) != "") and (strtoupper($Modifica) == strtoupper($pg)));function formattadata($tim){ return(strftime("%d/%m/%Y %H:%M", strtotime($tim)));}include ('inc/header.html.inc.php');#Impaginazione$Script = 'scheda4.php';$RecordPerPage = 30;$pag = 0 + $_GET['pag'];$MyQuery = "FROM LogFinanza LEFT JOIN CodTipoFinanza ON CodTipoFinanza.IdTipoFinanza = LogFinanza.Tipo WHERE Nome = '".pars($Login)."'";$Result = mysql_query("SELECT COUNT(*) As Numero $MyQuery");$rs = mysql_fetch_array($Result);$MaxRecord = $rs['Numero'];$rs->close;$BarraPaginazione .= '<table width="100%" class=tScuro cellpadding=1 cellspacing=0 border=0>';$BarraPaginazione .= '<tr class=tTitolo>';if ($pag > 0) { $BarraPaginazione .= '<td align=left width="25%">'; $BarraPaginazione .= '<a href="'.$Script.'?pag=0"><<< primo</a>'; $BarraPaginazione .= '</td>'; $BarraPaginazione .= '<td align=left width="25%">'; $BarraPaginazione .= '<a href="'.$Script.'?pag='.($pag-1).'"><< prec</a>'; $BarraPaginazione .= '</td>';} else { $BarraPaginazione .= '<td width="25%"> </td>'; $BarraPaginazione .= '<td width="25%"> </td>';}if ((($pag+1)*$RecordPerPage) <= $MaxRecord) { $BarraPaginazione .= '<td align=right width="25%">'; $BarraPaginazione .= '<a href="'.$Script.'?pag='.($pag+1).'">seg. >></a>'; $BarraPaginazione .= '</td>'; $BarraPaginazione .= '<td align=right width="25%">'; $BarraPaginazione .= '<a href="'.$Script.'?pag='.floor($MaxRecord/$RecordPerPage).'">ultimo >>></a>'; $BarraPaginazione .= '</td>';} else { $BarraPaginazione .= '<td width="25%"> </td>'; $BarraPaginazione .= '<td width="25%"> </td>';}$BarraPaginazione .= '</tr>';$BarraPaginazione .= '<tr class=tTitolo><td colspan=4 align=center>pagina '.($pag+1).'/'.(floor($MaxRecord/$RecordPerPage)+1).' - '.$MaxRecord.' record</td></tr>';$BarraPaginazione .= '</table>';?><title>Movimenti Economici <?= $pg ?></title></head><body bgcolor=#555555><table border=0 cellpadding=2 cellspacing=2 class=tChiaro><tr> <td class=tScuro><a href="scheda.php?pg=<?= urlencode($pg) ?>">Scheda Personaggio</a></td> <td class=tScuro><a href="scheda2.php?pg=<?= urlencode($pg) ?>">Oggetti</a></td><? if (strtoupper($pg) == strtoupper($Login)) { ?> <td class=tScuro><a href="scheda3.php?pg=<?= urlencode($pg) ?>">Modifica</a></td> <td>Movimenti</td> <td class=tScuro><a href="scheda5.php?pg=<?= urlencode($pg) ?>">Punti</a></td> <td class=tScuro><a href="scheda6.php?pg=<?= urlencode($pg) ?>">Jutsu</a></td> <td class=tScuro><a href="scheda7.php?pg=<?= urlencode($pg) ?>">Background</a></td><? } ?></tr></table><br><br><? if (!($upd)) {exit();} ?><table border="1" bordercolor="#F8E9AA" cellspacing="0" cellpadding="2" width="600"><tr> <td colspan=4 align=center><font class=Titolo>Movimenti economici di <?= htmlspecialchars($Login) ?></font></td></tr><tr> <td colspan=4 align=center><?= $BarraPaginazione ?></td></tr><tr> <td width=120 align=center>Movimento</td> <td width=120 align=center>Data/Ora</td> <td width=60 align=center>Somma</td> <td width=300 align=center>Nota</td></tr><? if ($upd) { $MySql = "SELECT (Soldi + Banca) AS Somma FROM Personaggio WHERE Nome = '".pars($Login)."'"; $Result = mysql_query($MySql); $rs = mysql_fetch_array($Result); echo "<tr bgcolor='black'>"; echo '<td valign=top>Saldo</td>'; echo '<td valign=top> </td>'; echo '<td valign=top align=right><b>'.$rs['Somma'].'</b></td>'; echo '<td valign=top>'.$par_CurrencyName.' posseduti + Denaro in Banca</td>'; echo '</tr>'; $rs->close; $MySql = "SELECT * $MyQuery ORDER BY LogFinanza.ID DESC LIMIT ".($pag*$RecordPerPage).", $RecordPerPage"; $Result = mysql_query($MySql); while($rs = mysql_fetch_array($Result)) { if ($rs['Tipo'] < 0) { $RowColor='#805555'; } else { $RowColor='#558055'; } echo "<tr bgcolor='$RowColor'>"; echo '<td valign=top><font color=white>'.htmlspecialchars($rs['DescrizioneFinanza']).'</font></td>'; echo '<td valign=top><font color=white>'.formattadata($rs['DataEvento']).'</font></td>'; echo '<td valign=top align=right><font color=white><b>'.$rs['Somma'].'</b></font></td>'; echo '<td valign=top><font color=white>'.htmlspecialchars($rs['Nota']).'</font></td>'; echo '</tr>'; }} $rs->close; ?><tr> <td colspan=4 align=center><?= $BarraPaginazione ?></td></tr></table><? $rs->close; ?></body></html>----------------------------------------------------------SCHEDA 5<? session_start();include ('inc/parametri.inc.php');include ('inc/controllo.php');include ('inc/open2.php');$pg = trim($pg);$Modifica = trim($Login);$upd = ((strtoupper($pg) == strtoupper($Login)) and (trim($pg) != "") and (strtoupper($Modifica) == strtoupper($pg)));function formattadata($tim){ return(strftime("%d/%m/%Y %H:%M", strtotime($tim)));}include ('inc/header.html.inc.php');?><title>Punti Esperienza <?= $pg ?></title></head><body bgcolor=#555555><table border=0 cellpadding=2 cellspacing=2 class=tChiaro><tr> <td class=tScuro><a href="scheda.php?pg=<?= urlencode($pg) ?>">Scheda Personaggio</a></td> <td class=tScuro><a href="scheda2.php?pg=<?= urlencode($pg) ?>">Oggetti</a></td><? if (strtoupper($pg) == strtoupper($Login)) { ?> <td class=tScuro><a href="scheda3.php?pg=<?= urlencode($pg) ?>">Modifica</a></td> <td class=tScuro><a href="scheda4.php?pg=<?= urlencode($pg) ?>">Movimenti</a></td> <td>Punti</td> <td class=tScuro><a href="scheda6.php?pg=<?= urlencode($pg) ?>">Jutsu</a></td> <td class=tScuro><a href="scheda7.php?pg=<?= urlencode($pg) ?>">Background</a></td><? } ?></tr></table><br><br><? if (!($upd)) {exit();} ?><table border="1" bordercolor="#F8E9AA" cellspacing="0" cellpadding="2" width="600"><tr> <td colspan=4 align=center><font class=Titolo>Punti assegnati a <?= htmlspecialchars($Login) ?></font></td></tr><tr> <td width=120 align=center>Data/Ora</td> <td width=120 align=center>Quest</td> <td width=60 align=center>Punti Esp.</td></tr><? if ($upd) { $MySql = "SELECT Punti.*, MessaggioAraldo.Titolo FROM Punti LEFT JOIN MessaggioAraldo ON MessaggioAraldo.IDMessaggio = Punti.IDMessaggioAraldo WHERE Nome = '".pars($Login)."' ORDER BY Punti.ID DESC LIMIT 0, 50"; $Result = mysql_query($MySql); while($rs = mysql_fetch_array($Result)) { if ($rs['Punti'] < 0) { $RowColor='#805555'; } else { $RowColor='#558055'; } echo "<tr bgcolor='$RowColor'>"; echo '<td valign=top><font color=white>'.formattadata($rs['DataEvento']).'</font></td>'; echo '<td valign=top><font color=white>'.htmlspecialchars($rs['Titolo']).'</font></td>'; echo '<td valign=top align=right><font color=white><b>'.$rs['Esperienza'].'</b></font></td>'; echo '</tr>'; } $rs->close; mysql_free_result($Result);}?></table></body></html>--------------------------------------------------------------------------Aggiunte SCHEDA 6<? session_start();include ('inc/parametri.inc.php');include ('inc/controllo.php');include ('inc/open2.php');$pg = trim($pg);$Modifica = trim($Login);$upd = ((strtoupper($pg) == strtoupper($Login)) and (trim($pg) != "") and (strtoupper($Modifica) == strtoupper($pg)));function formattadata($tim){ return(strftime("%d/%m/%Y %H:%M", strtotime($tim)));}include ('inc/header.html.inc.php');?><title>Jutsu <?= $pg ?></title></head><body bgcolor=#555555><table border=0 cellpadding=2 cellspacing=2 class=tChiaro><tr> <td class=tScuro><a href="scheda.php?pg=<?= urlencode($pg) ?>">Scheda Personaggio</a></td> <td class=tScuro><a href="scheda2.php?pg=<?= urlencode($pg) ?>">Oggetti</a></td><? if (strtoupper($pg) == strtoupper($Login)) { ?> <td class=tScuro><a href="scheda3.php?pg=<?= urlencode($pg) ?>">Modifica</a></td> <td class=tScuro><a href="scheda4.php?pg=<?= urlencode($pg) ?>">Movimenti</a></td> <td class=tScuro><a href="scheda5.php?pg=<?= urlencode($pg) ?>">Punti</a></td> <td>Jutsu</td> <td class=tScuro><a href="scheda7.php?pg=<?= urlencode($pg) ?>">Background</a></td><? } ?></tr></table><br><br><? if (!($upd)) {exit();} ?><table border="1" bordercolor="#F8E9AA" cellspacing="0" cellpadding="2" width="600"><tr> <td colspan=4 align=center><font class=Titolo>Jutsu assegnati a <?= htmlspecialchars($Login) ?></font></td></tr><tr> <td width=120 align=center>Base</td> <td width=120 align=center>Generici</td> <td width=120 align=center>Villaggio</td> <td width=60 align=center>Corporazione</td> <td width=120 align=center>Clan</td></tr><? if ($upd) { $MySql = "SELECT Jutsu.*, MessaggioAraldo.Titolo FROM Jutsu LEFT JOIN MessaggioAraldo ON MessaggioAraldo.IDMessaggio = Jutsu.IDMessaggioAraldo WHERE Nome = '".pars($Login)."' ORDER BY Jutsu.ID DESC LIMIT 0, 50"; $Result = mysql_query($MySql); while($rs = mysql_fetch_array($Result)) { if ($rs['Jutsu'] < 0) { $RowColor='#805555'; } else { $RowColor='#558055'; } echo "<tr bgcolor='$RowColor'>"; echo '<td valign=top><font color=white>'.htmlspecialchars($rs['Base']).'</font></td>'; echo '<td valign=top><font color=white>'.htmlspecialchars($rs['Generici']).'</font></td>'; echo '<td valign=top><font color=white>'.htmlspecialchars($rs['Villaggio']).'</font></td>'; echo '<td valign=top><font color=white>'.htmlspecialchars($rs['Corporazione']).'</font></td>'; echo '<td valign=top><font color=white>'.htmlspecialchars($rs['Clan']).'</font></td>'; echo '</tr>'; } $rs->close; mysql_free_result($Result);}?></table></body></html>-------------------------------------------------------SCHEDA 7<? session_start();include ('inc/parametri.inc.php');include ('inc/controllo.php');include ('inc/open2.php');$pg = trim($pg);$Modifica = trim($Login);$upd = ((strtoupper($pg) == strtoupper($Login)) and (trim($pg) != "") and (strtoupper($Modifica) == strtoupper($pg)));function formattadata($tim){ return(strftime("%d/%m/%Y %H:%M", strtotime($tim)));}include ('inc/header.html.inc.php');?><title>Background <?= $pg ?></title></head><body bgcolor=#555555><table border=0 cellpadding=2 cellspacing=2 class=tChiaro><tr> <td class=tScuro><a href="scheda.php?pg=<?= urlencode($pg) ?>">Scheda Personaggio</a></td> <td class=tScuro><a href="scheda2.php?pg=<?= urlencode($pg) ?>">Oggetti</a></td><? if (strtoupper($pg) == strtoupper($Login)) { ?> <td class=tScuro><a href="scheda3.php?pg=<?= urlencode($pg) ?>">Modifica</a></td> <td class=tScuro><a href="scheda4.php?pg=<?= urlencode($pg) ?>">Movimenti</a></td> <td class=tScuro><a href="scheda5.php?pg=<?= urlencode($pg) ?>">Punti</a></td> <td class=tScuro><a href="scheda6.php?pg=<?= urlencode($pg) ?>">Jutsu</a></td> <td>Background</td><? } ?></tr></table><br><br><? if (!($upd)) {exit();} ?><table border="1" bordercolor="#F8E9AA" cellspacing="0" cellpadding="2" width="600"><tr> <td colspan=4 align=center><font class=Titolo>Background di <?= htmlspecialchars($Login) ?></font></td></tr><tr> <td width=120 align=center> </td> </tr><? if ($upd) { $MySql = "SELECT Background.*, MessaggioAraldo.Titolo FROM Background LEFT JOIN MessaggioAraldo ON MessaggioAraldo.IDMessaggio = Background.IDMessaggioAraldo WHERE Nome = '".pars($Login)."' ORDER BY Background.ID DESC LIMIT 0, 50"; $Result = mysql_query($MySql); while($rs = mysql_fetch_array($Result)) { if ($rs['Background'] < 0) { $RowColor='#805555'; } else { $RowColor='#558055'; } echo "<tr bgcolor='$RowColor'>"; echo '<td valign=top><font color=white>'.htmlspecialchars($rs['Background']).'</font></td>'; echo '</tr>'; } $rs->close; mysql_free_result($Result);}?></table></body></html>---------------------------------------------------------naturalmente quando ho aggiunto le voci, es max genjutsu ect...oppure background ho sempre modificato il database.
17/03/2008 22:26:08
@_@ ma più che il codice della scheda, hai provato a controllare il link che che clikki per aprire l'avatar del pg?perchè quello che hai descritto è lo stesso effetto di quando cerchi di visualizzare l'avatar di un pg che non esiste, forse c'è un problema sul passaggio del parametro nome del pg..
17/03/2008 22:31:20
O_________________________________O!!!!Ma dacci il link e basta :-D
18/03/2008 13:54:24
il fatto è cheNON SO DOVE CI STA L'ERRORE!il link è giusto....ma non me la carica ugualmente la scheda!
18/03/2008 14:35:19 e modificato da alexandru il 18/03/2008 14:35:51
nel file scheda prelevi la variabile del pg in questo modo:
$pg = trim(urldecode($pg));
senza get, senza post... mi auguro che tu non stia usando PHP5, altrimenti c'è dubbio che funzioni.diamo per scontato che stai usando php4:il link a cui arrivi alla scheda sarà tipo<a href="scheda.php?pg=pincopallino">pincopallino</a>
se è così, e sei su PHP4, deve andare. altrimenti, facce vede er link.
18/03/2008 23:05:36
ecco il link che ho scritto a manohttp://leviatar.altervista.org/scheda.php?pg=Lucaed ecco la popup che mi esce se clicco col tasto destro-->proprietà sulla scritta "avatar di..."http://leviatar.altervista.org/errore.jpg ↗
Discussione seguita da
Pagine → 1
Rispondi alla Discussione Segui Discussione Inoltra Discussione Forum Programmazione, Open Source e Hosting Elenco Forum
Articoli, Interviste e altre Risorse!
World of the Sea Battle ↗
Exclusive Villa GdR ↗
Neverness to Everness ↗
Tibia ↗
Crossout ↗
Tiles Survive ↗