Lista corporazioni postato il 28/03/2007 15:23:37 nel forum programmazione, gdrcd, open source, hosting
sarò breve:
come faccio a fare visualizzare oltra alla lista dei presenti din una corporazione anche la lista delle cariche di ques'ultima.
cordialmente
Evil
Pagine → 1
01/04/2007 15:44:27
io ci sono riuscito, ma solo le cariche, ho provato con i simboli in tutti i modi ma non va.. comununque..
eccolo il pezzo di codice che ho fatto, per GDRCD:
<table>
<tr bgcolor=#800000>
<td align=left valign=center><FONT COLOR="#ffffff">Cariche di Gilda</font></td>
</tr>
<?
$rs->close;
mysql_free_result($Result);
$MySql = 'SELECT * FROM Gilda';
$MySql .= " WHERE IDGilda >= '$ID' AND IDGilda <= '".($ID + 99)."'";
$MySql .= ' ORDER BY IDGilda';
#echo $MySql;
$Result = mysql_query($MySql);
while ($rs = mysql_fetch_array($Result)) {
$MySql = "SELECT * FROM Gilda WHERE IDGilda = '".$rs['IDGilda']."' ORDER BY Gilda";
$Result1 = mysql_query($MySql);
while ($rsB = mysql_fetch_array($Result1)) { ?>
<tr bgcolor=#ffff99>
<td align=left><FONT COLOR="#800000"><?= $rsB["Gilda"] ?></td>
</tr>
<?
}
$rsB->close;
mysql_free_result($Result1);
}
$rs->close;
mysql_free_result($Result) ?>
</table>
se riesci a mettere i simboli fammi sapè ^__*
01/04/2007 22:23:10
grazie mille se ci riesco sarai il primo a saperlo
03/04/2007 19:37:53
<? session_start();
include ("inc/controllo.php");
Function Gilda($IDA) {
Global $db;
Global $Conn;
$IDA = 0 + $IDA;
if (!(is_int($IDA))) {exit();};
$MySql = "SELECT Count(Nome) AS Numero FROM Personaggio WHERE IDGilda >= $IDA AND IDGilda < ".($IDA + 99);
$Result2 = mysql_query($MySql);
$rs2 = mysql_fetch_array($Result2);
$Numero = 0+$rs2["Numero"];
$rs2->close;
mysql_free_result($Result2);
$MySql = "SELECT * FROM Gilda";
$MySql .= " WHERE IDGilda = '".$IDA."'";
#$MySql .= " ORDER BY IDGilda";
$Result2 = mysql_query($MySql);
$rs2 = mysql_fetch_array($Result2);
?>
<tr>
<td bgcolor=D8D8D8 align=center valign=center width=20><a href="corporazioni.php?ID=<?= $IDA ?>"><img src="img/stemmi/<?= $rs2['URLImg'] ?>" border=0></a></td>
<td align=left valign=center width=120><b><a href="corporazioni.php?ID=<?= $IDA ?>"><?= htmlspecialchars($rs2['NomeCorporazione']) ?></a></b></td>
<td align=left valign=center width=20><b><?= $Numero ?></b></td>
<td align=left valign=center width=200><b><?
if ($rs2["URL"] != "") {
?><a href="<?= $rs2["URL"] ?>" target=_new><?= htmlspecialchars($rs2["URL"]) ?></a><?
} ?></b></td>
</tr>
<? $rs2->close;
mysql_free_result($Result2);
}
include ("inc/parametri.inc.php");
include ("inc/open2.php");
include ("inc/header.html.inc.php");
?>
<title>Corporazioni</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<center>
<table class=tChiaro border=0 cellpadding=2 cellspacing=1 width="100%">
<tr class=tTitolo>
<td align=center><font class=titolo>Mestieri e Corporazioni</font></td>
</tr></table><br>
<?
$ID = 0 + $ID;
if ($ID > 0) {
$MySql = 'SELECT * FROM Gilda';
$MySql .= " WHERE IDGilda = '$ID' AND Visibile = 1";
$Result = mysql_query($MySql);
$rs = mysql_fetch_array($Result);
?>
<table cellpadding=2 cellspacing=1 border=0 class=tChiaro>
<tr class=tTitolo>
<td colspan=7 align=center><font class=Titolo><?= htmlspecialchars($rs['NomeCorporazione']) ?></font></td>
</tr>
<tr class=tTitolo>
<td colspan=2 align=left valign=center width=120>Personaggio</td>
<td align=left valign=center width=150>ruolo</td>
<td align=left valign=center width=10>Esp</td>
<td align=left valign=center width=10>Men</td>
<td align=left valign=center width=10>For</td>
<td align=left valign=center width=10>Mas</td>
</tr>
<?
$rs->close;
mysql_free_result($Result);
$MySql = 'SELECT * FROM Gilda';
$MySql .= " WHERE IDGilda >= '$ID' AND IDGilda <= '".($ID + 99)."'";
$MySql .= ' ORDER BY IDGilda';
#echo $MySql;
$Result = mysql_query($MySql);
while ($rs = mysql_fetch_array($Result)) {
$MySql = "SELECT * FROM Personaggio WHERE IDGilda = '".$rs['IDGilda']."' ORDER BY Nome";
$Result1 = mysql_query($MySql);
while ($rsA = mysql_fetch_array($Result1)) { ?>
<tr class=tScuro>
<td bgcolor=D8D8D8 align=center valign=center width=20><a href="scheda.php?pg=<?= $rsA["Nome"] ?>"><img src="img/stemmi/<?= $rs['URLImg'] ?>" border=0></a></td>
<td align=left valign=center width=100><b><a href="scheda.php?pg=<?= $rsA["Nome"] ?>"><?
if ($rsA["Esilio"] == '2037-12-31 00:00:00') {
echo "<font color=red>";
};
echo htmlspecialchars($rsA["Nome"]) ?></a></b></td>
<td align=left valign=center width=150><?= $rs["Gilda"] ?></td>
<td align=right valign=center width=10><?= $rsA["Esperienza"] ?></td>
<td align=right valign=center width=10><?= $rsA["Mente"] ?></td>
<td align=right valign=center width=10><?= $rsA["Forza"] ?></td>
<td align=center valign=center width=10><?
switch ($rsA["Master"]) {
case 1:
echo '<img src="img/gray-m.gif" Title="Master Fati">';
break;
case 2:
echo '<img src="img/gray-c.gif" Title="Master di Corporazione">';
break;
}
?></td>
</tr>
<?
}
$rsA->close;
mysql_free_result($Result1);
}
$rs->close;
mysql_free_result($Result) ?>
<hr size=1 color=gold>
<? } ?>
<br>
<br>
</center>
</body>
</html>
questo è il mio codice quendo vdo ad applicare il tuo mi da un botto di errori cerco di corregerli ma non ci riesco
potresti dirmi come devo fare?
03/04/2007 21:31:56
<? session_start();
include ("inc/controllo.php");
Function Gilda($IDA) {
Global $db;
Global $Conn;
$IDA = 0 + $IDA;
if (!(is_int($IDA))) {exit();};
$MySql = "SELECT Count(Nome) AS Numero FROM Personaggio WHERE IDGilda >= $IDA AND IDGilda < ".($IDA + 99);
$Result2 = mysql_query($MySql);
$rs2 = mysql_fetch_array($Result2);
$Numero = 0+$rs2["Numero"];
$rs2->close;
mysql_free_result($Result2);
$MySql = "SELECT * FROM Gilda";
$MySql .= " WHERE IDGilda = '".$IDA."'";
#$MySql .= " ORDER BY IDGilda";
$Result2 = mysql_query($MySql);
$rs2 = mysql_fetch_array($Result2);
?>
<tr>
<td bgcolor=D8D8D8 align=center valign=center width=20><a href="corporazioni.php?ID=<?= $IDA ?>"><img src="img/stemmi/<?= $rs2['URLImg'] ?>" border=0></a></td>
<td align=left valign=center width=120><b><a href="corporazioni.php?ID=<?= $IDA ?>"><?= htmlspecialchars($rs2['NomeCorporazione']) ?></a></b></td>
<td align=left valign=center width=20><b><?= $Numero ?></b></td>
<td align=left valign=center width=200><b><?
if ($rs2["URL"] != "") {
?><a href="<?= $rs2["URL"] ?>" target=_new><?= htmlspecialchars($rs2["URL"]) ?></a><?
} ?></b></td>
</tr>
<? $rs2->close;
mysql_free_result($Result2);
}
include ("inc/parametri.inc.php");
include ("inc/open2.php");
include ("inc/header.html.inc.php");
?>
<title>Corporazioni</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body>
<?
$ID = 0 + $ID;
if ($ID > 0) {
$MySql = 'SELECT * FROM Gilda';
$MySql .= " WHERE IDGilda = '$ID' AND Visibile = 1";
$Result = mysql_query($MySql);
$rs = mysql_fetch_array($Result);
?>
<table>
<tr bgcolor=#800000>
<td align=left valign=center><FONT COLOR="#ffffff">Cariche di Gilda</font></td>
</tr>
<?
$rs->close;
mysql_free_result($Result);
$MySql = 'SELECT * FROM Gilda';
$MySql .= " WHERE IDGilda >= '$ID' AND IDGilda <= '".($ID + 99)."'";
$MySql .= ' ORDER BY IDGilda';
#echo $MySql;
$Result = mysql_query($MySql);
while ($rs = mysql_fetch_array($Result)) {
$MySql = "SELECT * FROM Gilda WHERE IDGilda = '".$rs['IDGilda']."' ORDER BY Gilda";
$Result1 = mysql_query($MySql);
while ($rsB = mysql_fetch_array($Result1)) { ?>
<tr bgcolor=#ffff99>
<td align=left><FONT COLOR="#800000"><?= $rsB["Gilda"] ?></td>
</tr>
<?
}
$rsB->close;
mysql_free_result($Result1);
}
$rs->close;
mysql_free_result($Result) ?>
</table>
<table class=tChiaro border=0 cellpadding=2 cellspacing=1 width="100%">
<tr class=tTitolo>
<td align=center><font class=titolo>Mestieri e Corporazioni</font></td>
</tr></table><br>
<?
$ID = 0 + $ID;
if ($ID > 0) {
$MySql = 'SELECT * FROM Gilda';
$MySql .= " WHERE IDGilda = '$ID' AND Visibile = 1";
$Result = mysql_query($MySql);
$rs = mysql_fetch_array($Result);
?>
<table cellpadding=2 cellspacing=1 border=0 class=tChiaro>
<tr class=tTitolo>
<td colspan=7 align=center><font class=Titolo><?= htmlspecialchars($rs['NomeCorporazione']) ?></font></td>
</tr>
<tr class=tTitolo>
<td colspan=2 align=left valign=center width=120>Personaggio</td>
<td align=left valign=center width=150>ruolo</td>
<td align=left valign=center width=10>Esp</td>
<td align=left valign=center width=10>Men</td>
<td align=left valign=center width=10>For</td>
<td align=left valign=center width=10>Mas</td>
</tr>
<?
$rs->close;
mysql_free_result($Result);
$MySql = 'SELECT * FROM Gilda';
$MySql .= " WHERE IDGilda >= '$ID' AND IDGilda <= '".($ID + 99)."'";
$MySql .= ' ORDER BY IDGilda';
#echo $MySql;
$Result = mysql_query($MySql);
while ($rs = mysql_fetch_array($Result)) {
$MySql = "SELECT * FROM Personaggio WHERE IDGilda = '".$rs['IDGilda']."' ORDER BY Nome";
$Result1 = mysql_query($MySql);
while ($rsA = mysql_fetch_array($Result1)) { ?>
<tr class=tScuro>
<td bgcolor=D8D8D8 align=center valign=center width=20><a href="scheda.php?pg=<?= $rsA["Nome"] ?>"><img src="img/stemmi/<?= $rs['URLImg'] ?>" border=0></a></td>
<td align=left valign=center width=100><b><a href="scheda.php?pg=<?= $rsA["Nome"] ?>"><?
if ($rsA["Esilio"] == '2037-12-31 00:00:00') {
echo "<font color=red>";
};
echo htmlspecialchars($rsA["Nome"]) ?></a></b></td>
<td align=left valign=center width=150><?= $rs["Gilda"] ?></td>
<td align=right valign=center width=10><?= $rsA["Esperienza"] ?></td>
<td align=right valign=center width=10><?= $rsA["Mente"] ?></td>
<td align=right valign=center width=10><?= $rsA["Forza"] ?></td>
<td align=center valign=center width=10><?
switch ($rsA["Master"]) {
case 1:
echo '<img src="img/gray-m.gif" Title="Master Fati">';
break;
case 2:
echo '<img src="img/gray-c.gif" Title="Master di Corporazione">';
break;
}
?></td>
</tr>
<?
}
$rsA->close;
mysql_free_result($Result1);
}
$rs->close;
mysql_free_result($Result) ?>
<hr size=1 color=gold>
<? } ?>
<br>
<br>
</body>
</html>
vediamo se va così ^_*
05/04/2007 13:45:14
mi da lo stesso errore che dava a me in line 48 non riesce a prenderle $MySql = 'SELECT * FROM Gilda';
07/04/2007 13:43:15
non riesco, sempre il solito problema. Non riesce a prendere delle istruzione, cmq se qualcuno è già riuscito a pulire il codice può passarmi il file?
p.s io continuo a provarci se dovessi riuscirci posto tutto
Pagine → 1
Rispondi alla Discussione Aggiungi ai Preferiti Inoltra Discussione Forum Programmazione, GDRCD, Open Source, Hosting Elenco Forum
Planethos GdR: Una nuova profezia
Metin2: Informazioni sul server migliorate
Entropia Universe → Lascia che il tuo avatar esplori nuovi mondi e viaggi tra i pianeti in questo stupendo MmoRpg Sci-Fi Free to Play!
Age of Crystals: Rallentamenti estivi
dbzgdr ha risposto alla discussione: Dragon Ball Z Gdr
Titan Revenge: Calendario eventi fino a fine mese online!
Enlisted → Guida la tua squadra di soldati in combattimenti su larga scala, con fanteria, veicoli corazzati e aerei della IIa Guerra Mondiale!
Enlisted: Modifiche al sistema di aggiornamento
pyro72 ha aperto un annuncio di ricerca: World Without Heroes ricerca Giocatore
World Without Heroes: News GDR: Pubblicazione e Nuovo Inizio
World of Tanks → Lanciati in epiche battaglie spalla a spalla con altri giocatori. Conquista la supremazia nel mondo dei Carri Armati!
I dati del generatore di rank sono stati aggiornati!
Il gestore di Nexi Generation ha risposto alla recensione di deanna
Brightest Star: Che (dis)grazia questo campeggio!
War Thunder → Aviazione, veicoli corazzati e flotte militari della seconda guerra mondiale. Parteciperai a tutte le principali battaglie!
Aperture Play by Chat - Interessante grafico sul numero di Play By Chat aperti suddivisi per anno!
Saint Generation - Intervista ai gestori di Saint Generation il GdR play by chat sui Saint Seiya!
Absynthe - Intervista ai gestori del play by chat fantasy moderno Absynthe!
Tipologie Eroi - La tipologia dell'eroe ne "The Lord Of The Rings" di J.R.R. Tolkien
The Young Riders Italia - Intervista alla gestione del play by email western The Young Riders Italia
Tempora Sanguinis - Intervista con Dryden sull'andamento dello sviluppo del nuovo MUD Tempora Sanguinis 3