1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
| <?php
include("bbcode.php");
if (!include("confign.php")) die("Fehler! Config.php nicht gefunden!");
$query ="SELECT `Kommentar_News_ID`, COUNT(`Kommentar_ID`) AS `Anzahl`
FROM `_kommentare`
GROUP BY `Kommentar_News_ID`";
$result=mysql_query($query);
$counts=array();
while($kommentar=mysql_fetch_assoc($result)){
$counts[$kommentar['Kommentar_News_ID']]=$kommentar['Anzahl'];
}
$ResultPointer = @mysql_query("SELECT News_ID, News_Titel, News_Text, News_URL, News_Autor, News_Erstellt FROM ".$DatabaseTable."_news ORDER BY News_Erstellt DESC LIMIT ".$MaximaleAnzahlNews, $DatabasePointer);
if(@mysql_num_rows($ResultPointer)>0){
for($i=0; $i<@mysql_num_rows($ResultPointer); $i++)
{
$Result = mysql_fetch_object($ResultPointer);
echo"<div algin=\"center\">",
"<center>","<table border=\"0\" cellpadding=\"2\" cellspacing=\"0\" width=\"550\">",
"<tr>",
"<td bgcolor=\"#D1D1D1\"><b><img border=\"0\" src=\"iconpics/news.gif\" align=\"absbottom\" width=\"14\" height=\"19\"> ",
$Result->News_Titel,
"</b></td>",
"<td align=\"right\" bgcolor=\"#D1D1D1\"><b><i>",
substr($Result->News_Erstellt, 8, 2) . "." . substr($Result->News_Erstellt, 5, 2) . "." . substr($Result->News_Erstellt, 0, 4) . " " . substr($Result->News_Erstellt, 10, 6),
"</i></b></td>",
"</tr>",
"<tr>",
"<td colspan=\"2\" height=\"70\" valign=\"top\" bgcolor=\"#DADADA\">";
echo substr(nl2br(smilie(bbcode($Result->News_Text))), 0, 1000);
if (strlen($Result->News_Text) > 1000) echo "...<a class=\"plain1\" href=\"newsfull.php?id=".$Result->News_ID."\">[mehr]</a>";
else echo "";
echo "</td>",
"</tr>",
"<tr>",
"<td bgcolor=\"#D1D1D1\">";
if(!Empty($Result->News_URL))
{
echo"<a class=\"plain1\" href=\"",
$Result->News_URL,
"\">Link</a>";
}
else
{
echo" ";
}
echo"</td>",
"<td align=\"right\" bgcolor=\"#D1D1D1\"><i>von ",
$Result->News_Autor,
"</i></td>",
"</tr>",
"<tr>";
echo $counts[$kommentar],
"<td align=\"right\" colspan=\"2\" bgcolor=\"#D1D1D1\">",
"<a class=\"plain1\" href=\"comments.php?id=".$Result->News_ID."\">Kommentare</a>",
"</td>",
"</tr>",
"<tr>",
"<td width=\"550\" colspan=\"2\" height=\"15\">",
"<hr color=\"#D1D1D1\" size=\"1\">",
"</td>",
"</tr>",
"<tr>",
"<td width=\"550\" colspan=\"2\" height=\"19\">",
" ",
"</td>",
"</tr>",
"</table>",
"</center>",
"</div>";
}
}
else{
echo"Es wurden leider keine aktuellen News gefunden.";
}
?> |