Problema Esilio e Arresto
Problema Esilio e Arresto postato il 28/11/2009 13:31:24 nel forum programmazione, open source e hosting
Salve a tutti, ho un problema con la scheda del mio gdr, avendola modificata con una versione diversa da quella base del gdrcd extreme(quello vecchio però) non riesco più ad esiliare o mettere in prigione i pg.
Potete dirmi se c'è qualche errore nel codice che purtroppo io non vedo?
Allego il codice
<? 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 AvatarBacheche = 'img/spacer.gif', 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, ImgStirpe, DescStirpe, Tipo)";
$MySql .= "VALUES ('$Stanza', 'System Op', '$Login', NOW(), '$Msg', '$Sesso_S', '$ImgGilda_S', '$DescGilda_S', '$ImgRazza_S', '$DescRazza_S', '$ImgStirpe_S', '$DescStirpe_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, ImgStirpe, DescStirpe, Tipo)";
$MySql .= "VALUES ('$Stanza', 'System Op', '$Login', NOW(), '$Msg', '$Sesso_S', '$ImgGilda_S', '$DescGilda_S', '$ImgRazza_S', '$DescRazza_S','$ImgStirpe_S', '$DescStirpe_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, 1000);
$descrizione = trim($descrizione);
$affetti = substr($affetti, 0, 500);
$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, Stirpe.Stirpe, Stirpe.URLImg AS URLImgStirpe, Nazionalita.Nazionalita, Nazionalita.URLImg AS URLImgNazionalita, Eta.Eta, Eta.URLImg AS URLImgEta, Gilda.Gilda, Gilda.URLImg AS URLImgGilda, Associazioni.Associazioni, Associazioni.URLImg AS URLImgAssociazioni
FROM Personaggio
LEFT JOIN Razza
ON Personaggio.IDRazza = Razza.IDRazza
LEFT JOIN Stirpe
ON Personaggio.IDStirpe = Stirpe.IDStirpe
LEFT JOIN Nazionalita
ON Personaggio.IDNazionalita = Nazionalita.IDNazionalita
LEFT JOIN Eta
ON Personaggio.IDEta = Eta.IDEta
LEFT JOIN Gilda
ON Personaggio.IDGilda = Gilda.IDGilda
LEFT JOIN Associazioni
ON Personaggio.IDAssociazioni = Associazioni.IDAssociazioni
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";
$UrlImgStirpe = trim($rs["URLImgStirpe"]."");
If ($UrlImgStirpe == "")
$UrlImgStirpe = "inglese.png";
$UrlImgNazionalita = trim($rs["URLImgNazionalita"]."");
If ($UrlImgNazionalita == "")
$UrlImgNazionalita = "mezzosangue.jpg";
$UrlImgEta = trim($rs["URLImgEta"]."");
If ($UrlImgEta == "")
$UrlImgEta = "mezzosangue.jpg";
$UrlImgGilda = trim($rs["URLImgGilda"]."");
If ($UrlImgGilda == "")
$UrlImgGilda = "nessuno.gif";
$UrlImgAssociazioni = trim($rs["URLImgAssociazioni"]."");
If ($UrlImgAssociazioni == "")
$UrlImgAssociazioni = "nessuno.gif";
$Gilda = trim($rs["Gilda"]."");
if ($Gilda == "") {
if (strtolower($rs["Sesso"]) == "f") {
$Gilda = "Libera cittadina";
} else {
$Gilda = "Libero cittadino";
}
}
$DataUltimaAssociazioni = $rs['DataUltimaAssociazioni'];
$Associazioni = trim($rs["Associazioni"]."");
if ($Associazioni == "") {
if (strtolower($rs["Sesso"]) == "f") {
$Associazioni = "Senza Ordine";
} else {
$Associazioni = "Senza Ordine";
}
}
$DataUltimaAssociazioni = $rs['DataUltimaAssociazioni'];
include ('inc/header.html.inc.php');
?>
<title>Scheda <?= $pg ?></title>
<style type="text/css">
<!--
body,td,th {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #000000;
}
body {
background-color: #000000;
}
a {
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 10px;
color: #FFFFFF;
}
a:link {
text-decoration: none;
color: #0000FF;
}
a:visited {
text-decoration: none;
color: #0000FF;
}
a:hover {
text-decoration: none;
color: #0000FF;
}
a:active {
text-decoration: none;
color: #0000FF;
}
.Stile1 {color: #000000}
.Stile2 {color: #FFFFFF}
-->
</style></head>
<body>
<table border=0 align="center" cellpadding=2 cellspacing=2 class=tChiaro>
<tr>
<td><span class="Stile2">Scheda Personaggio</span></td>
<td class=tScuro><a href="scheda2.php?pg=<?= urlencode($pg) ?>" class="Stile2"><span class="Stile2">Oggetti</span></a></td>
<td class=tScuro><a href="incantesimi.php?pg=<?= urlencode($pg) ?>" class="Stile2"><span class="Stile2">Incantesimi</span></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>');
}
};
?>
</tr></table>
<div align="center"><br>
<br>
<table width="220" border="0" cellpadding="0" cellspacing="15" background="http://img407.imageshack.us/img407/580/hgv.jpg">
<tr>
<td><table width="220" border="0" cellpadding="0" cellspacing="2" background="http://img8.imageshack.us/img8/125/luvmidstripjjk.jpg">
<tr>
<td><table width="600" border="0" cellpadding="0" cellspacing="0" background="http://img407.imageshack.us/img407/580/hgv.jpg">
<tr>
<td><div align="center"><img src="http://img8.imageshack.us/img8/632/neoneo.png" width="400" height="105"></div></td>
</tr>
</table>
<table width=600 border=0 align="center" cellpadding=2 cellspacing=0 background="http://img407.imageshack.us/img407/580/hgv.jpg" class=tChiaro>
<tr class=tTitolo>
<td>
</tr>
<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=14 colspan=2 align=left valign=top><img width=200 src="<?= $UrlImg ?>" border="0"></td>
<td width=144><span class="Stile1">Iscrizione</span></td>
<td colspan=2><span class="Stile1">
<?=formattadata($rs["DataIscrizione"])?>
</span></td>
</tr>
<tr class=tScuro>
<td width=144><span class="Stile1">Esperienza</span></td>
<td width=17><span class="Stile1">
<?= $rs["Esperienza"] ?>
</span></td>
<td width=213><span class="Stile1">
<?= barra($rs["Esperienza"], 0) ?>
</span></td>
</tr>
<tr class=tScuro>
<td width=144><span class="Stile1">Mente</span></td>
<td width=17><span class="Stile1">
<?= $rs["Mente"]."/".$rs["MaxMente"] ?>
</span></td>
<td width=213><span class="Stile1">
<?= barra($rs["Mente"], $rs["maxmente"]) ?>
</span></td>
</tr>
<tr class=tScuro>
<td width=144><span class="Stile1">Forza</span></td>
<td width=17><span class="Stile1">
<?= $rs["Forza"]."/".$rs["MaxForza"] ?>
</span></td>
<td width=213><span class="Stile1">
<?= barra($rs["Forza"], $rs["maxforza"]) ?>
</span></td>
</tr>
<tr class=tScuro>
<td width=144><span class="Stile1">Magia</span></td>
<td width=17><span class="Stile1">
<?= $rs["Spirito"]."/".$rs["MaxSpirito"] ?>
</span></td>
<td width=213><span class="Stile1">
<?= barra($rs["Forza"], $rs["maxforza"]) ?>
</span></td>
<tr class=tScuro>
<td width=144><span class="Stile1">Volo</span></td>
<td width=17><span class="Stile1">
<?= $rs["Arte"]."/".$rs["MaxSpirito"] ?>
</span></td>
<td width=213><span class="Stile1">
<?= barra($rs["Forza"], $rs["maxforza"]) ?>
</span></td>
</tr>
<tr class=tScuro>
<td width=144><span class="Stile1">Razza</span></td>
<td colspan="2"><span class="Stile1">
<? if(intval($rs['IDRazza'])%1000 != 0){
echo '<a href="razza.php?ID='.intval($rs['IDRazza']/10)*10 .'">';
} ?>
<img src="img/razze/<?=$UrlImgRazza?>" border=0>
<?= htmlspecialchars($rs["Razza"]."") ?>
<? if(intval($rs['IDRazza'])%1000 != 0){
echo '</a>';
} ?>
<?
$MySql = 'SELECT * FROM Razza WHERE IDRazza = '.intval($rs['IDRazza']/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;
?>
</span></td>
</tr>
<tr class=tScuro>
<td width=144 valign=top><span class="Stile1">Corporazione o Mestiere</span></td>
<td colspan="2" valign=top><span class="Stile1">
<? 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>
<i>dal
<?= formattadata($DataUltimaGilda) ?>
</i>
<? if(intval($rs['IDGilda']) >= 100){
echo '</a>';
} ?>
</span></td>
</tr>
<tr class=tScuro>
<td width=144 valign=top><span class="Stile1">Setta o Ordine</span></td>
<td colspan="2" valign=top><span class="Stile1">
<? if(intval($rs['IDAssociazioni']) >= 100){
echo '<a href="associazioni.php?ID='.intval($rs['IDAssociazioni']/100)*100 .'">';
} ?>
<img src="img/stemmi/<?= $UrlImgAssociazioni ?>" border=0>
<?= htmlspecialchars($Associazioni) ?>
<br>
<i>dal
<?= formattadata($DataUltimaAssociazioni) ?>
</i>
<? if(intval($rs['IDAssociazioni']) >= 100){
echo '</a>';
} ?>
</span></td>
</tr>
<tr class=tScuro>
<td width=144 valign=top><span class="Stile1">Nazionalità</span></td>
<td colspan="2" valign=top><span class="Stile1">
<? if(intval($rs['IDStirpe'])%1000 != 0){
echo '<a href="razza.php?Id='.intval($rs['IDStirpe']/10)*10 .'">';
} ?>
<img src="img/nazionalita/<?=$UrlImgStirpe?>" border=0>
<?= htmlspecialchars($rs["Stirpe"]."") ?>
<? if(intval($rs['IDStirpe'])%1000 != 0){
echo '</a>';
} ?>
<?
$MySql = 'SELECT * FROM Razza WHERE IDStirpe = '.intval($rs['IDRazza']/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;
?>
</span></td>
</tr>
<tr class=tScuro>
<td width=144 valign=top><span class="Stile1">Linea di sangue</span></td>
<td colspan="2" valign=top><span class="Stile1">
<? if(intval($rs['IDNazionalita'])%1000 != 0){
echo '<a href="razza.php?Id='.intval($rs['IDNazionalita']/10)*10 .'">';
} ?>
<img src="img/sangue/<?=$UrlImgNazionalita?>" border=0>
<?= htmlspecialchars($rs["Nazionalita"]."") ?>
<? if(intval($rs['IDNazionalita'])%1000 != 0){
echo '</a>';
} ?>
<?
$MySql = 'SELECT * FROM Razza WHERE IDNazionalita = '.intval($rs['IDRazza']/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;
?>
</span></td>
</tr>
<tr class=tScuro>
<td width=144 valign=top><span class="Stile1">Età</span></td>
<td colspan="2" valign=top><span class="Stile1">
<? if(intval($rs['IDEta'])%1000 != 0){
echo '<a href="razza.php?Id='.intval($rs['IDEta']/10)*10 .'">';
} ?>
<img src="img/eta/<?=$UrlImgEta?>" border=0>
<?= htmlspecialchars($rs["Eta"]."") ?>
<? if(intval($rs['IDEta'])%1000 != 0){
echo '</a>';
} ?>
<?
$MySql = 'SELECT * FROM Eta WHERE IDEta = '.intval($rs['IDEta']/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;
?>
</span></td>
</tr>
<tr class=tScuro>
<td width=144 valign=top><span class="Stile1">Riconoscimenti e Altro</span></td>
<td colspan="2" align=left valign=top><span class="Stile1">
<?
switch ($rs["Master"]) {
case 1:
echo '<img src="img/gray-m.gif">';
break;
case 2:
echo '<img src="img/gray-c.gif">';
break;
case 3:
echo'<img src="img/gray-r.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;
?>
</span></td>
<tr class=tPersonal>
<td width=144 valign=top><span class="Stile1">Note del Fato:</span></td>
<td colspan="2" valign=top><span class="Stile1">
<?
if (($rs["Note"]."") == "" and !$upd) {
echo(" - ");
} else {
echo(str_replace("
", "<br>", htmlspecialchars($rs["Note"])));
} ?>
</span></td>
</tr>
<tr class=tScuro>
<td colspan="5" align=center><img src="http://img25.imageshack.us/img25/2849/dice.png" width="400" height="56"></td>
<tr>
<td colspan="5" valign=top><?
if ((trim($rs["Descrizione"]."") == "") and !($upd)) {
echo(" - ");
} else {
echo(str_replace("
", "<br>", $rs["Descrizione"]));
} ?></td>
</tr>
</tr>
<tr class=tScuro>
<td colspan="5" align=center><img src="http://img257.imageshack.us/img257/3655/affetti.png" width="400" height="56"></td>
<tr>
<td colspan="5" valign=top><?
if ((trim($rs["Affetti"]."") == "") and !$upd) {
echo(" - ");
} else {
echo(str_replace("
", "<br>", $rs["Affetti"]));
} ?></td>
</tr>
</tr>
<tr class=tScuro>
<td align="center" colspan="5"><img src="http://img25.imageshack.us/img25/2852/capacit.png" width="400" height="56"></td>
<tr>
<td colspan="5" valign=top><?
if (($rs["Capacita"]."") == "" and !$upd) {
echo(" - ");
} else {
echo(str_replace("
", "<br>", $rs["Capacita"]));
} ?></td>
</tr>
</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=199>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['Admin_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['Admin_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>
<table width="601" border="0" cellpadding="0" cellspacing="0" background="http://img407.imageshack.us/img407/580/hgv.jpg">
<tr>
<td><div align="center"><img src="http://img188.imageshack.us/img188/9531/55965868.png" width="400" height="105"></div></td>
</tr>
</table></td>
</tr>
</table></td>
</tr>
</table>
<? $rs->close; ?>
<script language="JavaScript">
function Conferma(){
if (confirm('Sei sicuro?'))
return true;
else
return false;
}
</script>
</div>
</body>
</html>
Pagine → 1
28/11/2009 15:27:51
Potete dirmi se c'è qualche errore nel codice che purtroppo io non vedo?
Con tutto il rispetto, io non ho neppure letto qual'è il tuo problema, sono stato ipnotizzato dalla lunghezza del codice O_O
Ma come fai a trovare qualcosa li in mezzo? Io mi perderei, non riuscirei mai a modificare gdrcd! E' mostruoso... ripeto, non parlo della qualità del codice, dato che non ho letto una sola virgola... ma della quantità.... ma sono tutte così lunghe le pagine del tuo gdr??? Io un anno fa (o forse due) avevo dato una rapida occhiata a gdrcd e avevo visto delle pagine lunghissime... ma non le ricordavo così lunghe maledizione! Come diavolo fate a lavorarci?? Occorre molto meno tempo a scriverla da capo una pagina!
28/11/2009 16:11:34
No, la pagina base del gdr cd è molto più piccola, sono io che ci ho aggiunto altre parti e sopratutto modificata un pò la struttura(a livello grafico)
Quella base base è + piccola
28/11/2009 16:47:33 e modificato da lela il 28/11/2009 16:47:58
hai cambiato nome al file? per caso? o si chiama sempre scheda.php?
28/11/2009 17:46:20
no, si chiama sempre scheda.php
ho controllato da per tutto, ma proprio non riesco a capire perchè non funzioni più
28/11/2009 17:49:03
hai modificato le tabelle per l'esilio? o hai toccato qualcosa in main.php o login.php
28/11/2009 18:04:42
del main php ho cambiato solo la disposizione dei frame, e il login non è stato modificato
29/11/2009 16:52:48
sicuro di non aver cancellato o omesso qualche parte? comunque hai i vecchi file prima della modifica prendili e paragonali, è un processo lungo ma se hai cancellato qualcosa per errore poi lo trovi.
La pazienza è la virtu dei forti!
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!
Crossout ↗
Imperion ↗
Enlisted ↗
State of Survival ↗
Fallen Gods ↗
CRSED: F.O.A.D. ↗