Hey,
ich habe folgendes Problem:
Ich wollte in einem Spry-Akkordeon (Dreamweaver CS4) eine MySQL-Tabelle anzeigen lassen, aber iwie kriege ich das nicht hin. Habe schon so einiges versucht, aber erfolglos.
Ich möchte die komplette Tabelle von Hier:
PHP-Code:
<?php
session_start();
require("config.inc.php");
if (isset($_GET['hello'])) {
echo 'Hello Master!';
die;
}
$nummer = 1;
$abfrage=mysql_query("select * from dieb_user_".$digit." order by geld DESC limit ".$topnumber."");
$inhalt .= '<center><table width="80%" border="0" cellspacing="0" cellpadding="3"><tr><td colspan="3"><center>
<img src="/diebgame/images/US_Top100.png" alt="Top100" width="199" height="37" />
</center></td><td align="right" colspan="2"><a href="../diebgame/index.php?seite=winner"><img src="/diebgame/images/UUS_LastWinner.png" alt="Last Winner" width="199" height="37" border=""/></a></td></tr><tr><td width="15%"><B>Platznr.</B></td><td width="45%"><B>Name</B></td><td width="15%"><B>Refs</B></td><td width="15%"><B>Punkte</B></td><td width="5%"><B>Benötigt</B></td></tr>';
while ($row = mysql_fetch_array($abfrage))
{
$name = htmlspecialchars($row["user"]);
$punkte = $row["geld"];
$werber = $row["werber"];
if($nummer <= 10){
$inhalt .= "<tr><td style=\"color: #F781BE\">$nummer</td><td style=\"color: #F781BE\">$name</td><td style=\"color: #F781BE\">$werber</td><td style=\"color: #F781BE\"><b>$punkte</b></td>";
}else{
$inhalt .= "<tr ><td style=\"color: #CCCCCC\">$nummer</td><td style=\"color: #CCCCCC\">$name</td><td style=\"color: #CCCCCC\">$werber</td><td style=\"color: #CCCCCC\"><b>$punkte</b></td>";
}
if($nummer == 1){
$inhalt .= "<td style=\"color: #F781BE\"><b>600</b></td>";
}else if($nummer >= 2 && $nummer <= 5){
$inhalt .= "<td style=\"color: #F781BE\"><b>400</b></td>";
}else if($nummer >= 6 && $nummer <= 10){
$inhalt .= "<td style=\"color: #F781BE\"><b>200</b></td>";
}else{
$inhalt .= "<td style=\"color: #CCCCCC\"></td>";
}
$inhalt .= "</tr>";
$nummer++;
}
$inhalt .= "</table><p></p></center>";
$inhalt .= '<center></center>
';
$template = implode("",file("template/style.html"));
$template = str_replace("<?inhalt?>", $inhalt, $template);
echo ($template);
?>
In diesem Script (Zeile 17 "Inhalt 1") darstellen:
PHP-Code:
<?php
session_start();
require("config.inc.php");
if (isset($_GET['hello'])) {
echo 'Hello Master!';
die;
}
$inhalt .='
<center>
<img src="images/US_Statistiken.png" alt="Statistiken" width="199" height="37" />
</center>
<script src="SpryAssets/SpryAccordion.js" type="text/javascript"></script>
<link href="SpryAssets/SpryAccordion.css" rel="stylesheet" type="text/css" />
<div id="Accordion1" class="Accordion" tabindex="0">
<div class="AccordionPanel">
<div class="AccordionPanelTab"><center><img src="images/UUS_Top100_Spry.png" alt="Top 100" width="199" height="17" /></center></div>Inhalt 1<div class="AccordionPanelContent">
</div>
</div>
<div class="AccordionPanel">
<div class="AccordionPanelTab"><center><img src="images/UUS_RefRally_Spry.png" alt="RefRally" width="199" height="17" /></center></div>
<div class="AccordionPanelContent">Inhalt 2</div>
</div>
<div class="AccordionPanel">
<div class="AccordionPanelTab"><center><img src="images/UUS_Spender_Spry.png" alt="Spender" width="199" height="17" /></center></div>
<div class="AccordionPanelContent">Inhalt 3</div>
</div>
<div class="AccordionPanel">
<div class="AccordionPanelTab"><center><img src="images/UUS_Guthaben_Spry.png" alt="Guthaben" width="199" height="17" /></center></div>
<div class="AccordionPanelContent">Inhalt 4</div>
</div>
</div>
<script type="text/javascript">
<!--
var Accordion1 = new Spry.Widget.Accordion("Accordion1");
//-->
</script>
';
$template = implode("",file("template/style.html"));
$template = str_replace("<?inhalt?>", $inhalt, $template);
echo ($template);
?>
Kann sich jmd. die Zeit nehmen um es mir zu erklären? Weil ich schon 2 Tage dran sitze und das nicht schaffe.
Vielen Dank
