Schede postato il 11/05/2009 14:30:07 nel forum programmazione, gdrcd, open source, hosting
Scusate se vi disturbo ancora con questo problema ma č da qualche settimana che ci stň lavorando e non riesco a risolvere il problema e stň impazzendo!!!
Praticamente io vado in modifica, provo a modificare e mi dŕ l'errore nella modifica sloggandomi, invece se sono master, mi fŕ modificare le note importanti ma poi mi fŕ sloggare!!
Siccome il sito su netsons lo tenuto come beta test ho provato li le schede e li funzionano, tranne per il fatto che un master non puň modificare le sue note importanti!! ^^!
Qualcuno avrebbe qualche idea sul perchč funziona su netsons e su aruba no??? ^^!!
<? session_start();
include ('inc/parametri.inc.php');
include ('inc/open2.php');
$Login=$_GET['pg'];
$op=$_POST['op'];
if($op == 1)
{
$cognome=$_POST['Cognome'];
$pass=$_POST['Pass'];
$img=$_POST['URLImg'];
$imgmini=$_POST['URLmini'];
$profilo=$_POST['profilo'];
$note=$_POST['note'];
$pv=$_POST['pv'];
$chakra=$_POST['chakra'];
$pg=$_POST['pg'];
$pg2=$_SESSION['Login'];
$master=$_SESSION['Master'];
if($pg == $pg2)
{
$query = "UPDATE Personaggio SET Cognome='$cognome', Pass='$pass', URLImg='$img', URLmini='$imgmini', Descrizione='$profilo' WHERE Nome='$pg'";
$Result =mysql_query($query);
if (mysql_affected_rows() == 1) {
echo '<b><font color=red>Scheda di '.htmlspecialchars(stripslashes($pg)).' modificata!</font></b>';
} else {
error_log(mysql_error());
echo '<P> Qualcosa è andato storto nel tentativo di modifica';
}
}
if(($pg != $pg2) && ($master == 1))
{
$query = "UPDATE Personaggio SET Capacita='$note', Chakranow='$chakra', MaxMente='$pv' WHERE Nome='$pg'";
$Result =mysql_query($query);
if (mysql_affected_rows() == 1) {
echo '<b><font color=red>Scheda di '.htmlspecialchars(stripslashes($pg)).' modificata!</font></b>';
} else {
error_log(mysql_error());
echo '<P> Qualcosa è andato storto nel tentativo di modifica';
}
}
exit();
}
//estrapolo dati dal db
$query = "SELECT * FROM `Personaggio` WHERE Nome='$Login'";
$tab = mysql_query($query);
$riga = mysql_fetch_array($tab);
?>
<html>
<head>
<title>Modifica Scheda <?= $pg ?></title>
<link href="<?= $_SESSION['CSS'] ?>" rel="stylesheet" type="text/css">
</head>
<body>
<center>
<div id="modificascheda"><br><br>
<form name="modifica" action="scheda3.php" method="post">
<table class="table2" width="90%" height="85%">
<tr>
<td colspan="2">
<center><font class="testata">Modifica Scheda</font></center>
</td>
</tr>
<?
if($Login == $_SESSION['Login'])
{
?>
<tr>
<td>
<center>Cognome: <input type="text" value="<?= $riga['Cognome'] ?>" name="Cognome"></center>
</td>
<td>
<center>Password: <input type="password" value="<?= $riga['Pass'] ?>" name="Pass"></center>
</td>
</tr>
<tr>
<td>
<center>Immagine: <input type="text" value="<?= $riga['URLImg'] ?>" name="URLImg"></center>
</td>
<td>
<center>Immagine mini: <input type="text" value="<?= $riga['URLmini'] ?>" name="URLmini"></center>
</td>
</tr>
<tr>
<td colspan="2">
<center><font class="testata">Profilo:</font><br><br><textarea cols=60 rows=5 name="profilo"><?= $riga['Descrizione'] ?></textarea></center>
</td>
</tr>
<?
}
if($_SESSION['Master']==1)
{
?>
<tr>
<td colspan="2">
<center><font class="testata">Note:</font><br><br><textarea cols=60 rows=5 name="note"><?= $riga['Capacita'] ?></textarea></center>
</td>
</tr>
<tr>
<td>
<center>Punti vita attuali: <input type="text" name="pv" value="<?= $riga['MaxMente'] ?>"></center>
</td>
<td>
<center>Punti chakra attuali: <input type="text" name="chakra" value="<?= $riga['Chakranow'] ?>"></center>
</td>
</tr>
<?
}
?>
<tr>
<td colspan="2">
<input type="hidden" value="1" name="op">
<input type="hidden" value="<?= $Login ?>" name="pg">
<center><input type="submit" value="Invia Modifiche!"></center>
</td>
</tr>
</table>
</form>
</div>
</center>
</body>
</html>
Il file della scheda della modifica del pg
Pagine → 1
11/05/2009 15:50:42
di solito accade sempre il contrario xd comunque non saprei.. dovresti vedere le phpinfo() su rauba e confrontarle con quelle di netsons cosi da vedere in cosa differisce xd (scherzo.. sarebbe un alvoraccio).. sinceramente non saprei.. hai fatto qualche modifica? perchč di solito funzia..
11/05/2009 16:03:00
Unica modifica che ho fatto č stata quella di aggiungere nella tabella del personaggio IDGilda2 che corrisponderebbe alla Gilda on del Gdr!! ^^!
Discussione seguita da
Pagine → 1
Rispondi alla Discussione Aggiungi ai Preferiti Inoltra Discussione Forum Programmazione, GDRCD, Open Source, Hosting Elenco Forum
Il gestore di Naruto x Boruto GDR - New Rebirth ha risposto alla recensione di tafferuglio