Lukasz hat gesagt.:@sagg dann muss er aber auch eine for() Schleife definieren und das will er nicht. Aber jetzt weis ich was du machen willst.
Möglich, ich kenne ja seinen restlichen Code nicht. Da gibt es viel was man nehmen kann.
Folge dem Video um zu sehen, wie unsere Website als Web-App auf dem Startbildschirm installiert werden kann.
Anmerkung: Diese Funktion ist in einigen Browsern möglicherweise nicht verfügbar.
Lukasz hat gesagt.:@sagg dann muss er aber auch eine for() Schleife definieren und das will er nicht. Aber jetzt weis ich was du machen willst.
eben ich auch nichtsagg hat gesagt.:Möglich, ich kenne ja seinen restlichen Code nicht. Da gibt es viel was man nehmen kann.
<?php
include ("inc/config.php");
//Lesen aus DB
$topics = array(); $posts = array();
$res = mysql_query("SELECT * FROM nb_answers WHERE fid=\"".$_GET["fid"]."\" AND tid=".$_GET["tid"]."");
while($row = mysql_fetch_array($res)) $topics[] = $row;
$res = mysql_query("SELECT posts FROM nb_user WHERE autor=\"".$autor."\"");
while($row = mysql_fetch_array($res)) $posts[] = $row;
foreach ($topics AS $topic) {
$text = nl2br($topic["text"]);
$timestamp = $topic["created"];
$timestamp = sprintf("%02d.%02d.%04d %02d:%02d", substr($timestamp, 6, 2), substr($timestamp, 4, 2), substr($timestamp, 0, 4), substr($timestamp, 8, 2), substr($timestamp, 10, 2));
foreach ($posts AS $post) {
echo "<center><font face=\"arial\" <font size=\"2\">";
echo "<table class=\"forumline\" width=\"70%\" cellspacing=\"1\" cellpadding=\"3\" border=\"1\">";
echo "</tr>";
echo "<tr>";
echo " <th class=\"thLeft\" width=\"150\" height=\"26\" nowrap=\"nowrap\"><font face=\"arial\" <font size=\"2\">Autor</font></th>";
echo " <th class=\"thRight\" nowrap=\"nowrap\"><font face=\"arial\" <font size=\"2\">Nachricht</font></th>";
echo " </tr>";
echo " <tr>";
echo " <td width=\"150\" align=\"left\" valign=\"top\"><font size=\"2\">".$topic["name"]."<br>".$posts['posts']."</font><br><br><br><br><br><br><br></td>";
echo " <td width=\"100%\" height=\"28\" valign=\"top\"><table width=\"100%\" border=\"0\" cellspacing=\"0\" cellpadding=\"0\">";
echo " <tr>";
echo " <td width=\"100%\"><font size=\"1\">Titel: ".$topic["topic"]."</font></td>";
echo " <td valign=\"top\"></td>";
echo " </tr>";
echo " <tr>";
echo " <td colspan=\"2\"><hr /></td>";
echo " </tr>";
echo " <tr>";
echo " <td colspan=\"2\"><font size=\"2\">$text</td></font>";
echo " </tr>";
echo " </table></td>";
echo " </tr>";
echo " <tr>";
echo " <td width=\"150\" align=\"left\" valign=\"middle\"><i><font size=\"1\">$timestamp</i></font></td>";
echo " <td width=\"100%\" height=\"28\" valign=\"bottom\" nowrap=\"nowrap\"><table cellspacing=\"0\" cellpadding=\"0\" border=\"0\" height=\"18\" width=\"18\">";
echo " <tr>";
echo " <td valign=\"middle\" nowrap=\"nowrap\"><font size=\"2\">Private Nachricht</font></table></td>";
echo " </tr>";
echo "</table></font><br>";
}
}
echo "<font face=\"arial\" size=\"2\"><a href=\"newanswer.php?fid=".$_GET["fid"]."&tid=".$_GET["tid"]."\">Neue Antwort</a> | ";
echo "<a href=\"showthreads.php?fid=".$_GET["fid"]."\">Zurück zu den Threads</a> | ";
echo "<a href=\"index.php\">Zurück zu den Foren</a></center></font></center>";
?>