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 Segui Discussione Inoltra Discussione Forum Programmazione, GDRCD, Open Source, Hosting Elenco Forum

leftbehindgdr ha risposto alla discussione: Left Behind
RAID Shadow Legends: Infoguida per niubbi!
The Coven → Negli scorci di luce delle paludi della Louisiana fioriscono nuove ombre. Estend e la Congrega ti aspettano per vivere emozionanti avventure!
seirburuk i rabasi ha risposto alla discussione: Far tornare di moda il PBC
FragPunk: Tuffati e unisciti al caos di Halloween! 👻
I dati del generatore di rank sono stati aggiornati!
Cyberpunk NbG Re-Coded: Nuova Documentazione: Crew
Lineage II → Entra in uno sconfinato mondo fantasy dominato da razze in contrasto tra loro. Scatena i tuoi poteri in uno dei Mmo più famosi al mondo!
Le Cronache di Raja Dunia: Personalizzazione Colore in Chat
Il gestore di Black Sails Chronicles ha risposto alla recensione di camiciaambrata
Il gestore di Black Sails Chronicles ha risposto alla recensione di camiciaambrata
World of Tanks: Nuovo rilascio - The Card Game
Enlisted → Guida la tua squadra di soldati in combattimenti su larga scala, con fanteria, veicoli corazzati e aerei della IIa Guerra Mondiale!
Portus: Harry Potter Gioco di Ruolo: Pubblicati i ranghi Reputazione di ottobre!
davemaster95 ha recensito Il Grande Blu
RAID Shadow Legends: Percorso di Halloween 🕷️
Another Year Of Disaster: 👾 Backwire & Spooky Week 🎃
CRSED: F.O.A.D. → Brutale sparatutto MMO in cui vince l'ultimo giocatore che resta in vita! Il giocatore sarà accompagnato da armi realistiche e magie!
L'Io e l'Avatar - L'Io e l'Avatar - Proiezione e archetipo nei giochi di ruolo online
Power Player - Scopri chi sono i temuti Power Player e quali sono le loro caratteristiche! Articolo spassosissimo!
LGSWD - Intervista al creatore del play by blog fantasy parodistico Loot of GateScrollWizard Dungeon
Mostri D&D - I miei 10 mostri preferiti in D&D! Scopriamoli insieme e consigliami i tuoi!
Hogwarts Mystery GdR - Intervista alla gestrice del play by forum potteriano Hogwarts Mystery GdR
Dal gioco alla scrittura - Quante volte vi è venuta voglia di trasportare un'avventura giocata col vostro personaggio in un racconto? Ecco come farlo in 5 facili step!
Terre Invisibili Boardgame - Terre Invisibili: dal play by chat al tavolo da gioco, l'avventura fantasy per conquistare un regno!
