<?php
$filename
=
"archiv.php"
;
####################################################################################################
$sql
[
'user'
] =
"***"
;
$sql
[
'passwort'
] =
"***"
;
$sql
[
'host'
] =
"***"
;
$sql
[
'db'
] =
"***"
;
$n
=
"1"
;
$forenid
[] =
"19"
;
$forenid
[] =
"33"
;
$anzahl
=
"20"
;
$ng
=
""
;
$boardurl
=
"./wbb2/"
;
####################################################################################################
function
changetext(
$str
)
{
$folder
=
"/wbb2/images/smilies"
;
$str
= trim(
$str
);
$str
= preg_replace(
'/\S{60}/'
,
'\0 '
,
$str
);
$str
= htmlspecialchars(
$str
);
$str
= preg_replace(
'/(\s{2})\s+/'
,
'\1'
,
$str
);
$str
= preg_replace(
'=\[b\](.*)\[/b\]=Uis'
,
'<b>\1</b>'
,
$str
);
$str
= preg_replace(
'=\[i\](.*)\[/i\]=Uis'
,
'<i>\1</i>'
,
$str
);
$str
= preg_replace(
'=\[u\](.*)\[/u\]=Uis'
,
'<u>\1</u>'
,
$str
);
$str
= preg_replace(
'=\[list\](.*)\[/list\]=Uis'
,
'<list>\1</list>'
,
$str
);
$str
= preg_replace(
'=\[img\](.*)\[/img\]=Uis'
,
'<img src=\1>'
,
$str
);
$str
= preg_replace(
'=\[url\](.*)\[/url\]=Uis'
,
'<a href="\1" target=\"_blank\">\1</a>'
,
$str
);
$str
= preg_replace(
'#\[url=(.*)\](.*)\[/url\]#Uis'
,
'<a href="\1" target=\"_blank\">\2</a>'
,
$str
);
$str
= preg_replace(
'#(^|[^"=]{1})(http://|ftp://|mailto:|news:)([^\s<>]+)([\s\n<>]|$)#sm'
,
'\1<a href="\2\3" target=\"_blank\">\2\3</a>\4'
,
$str
);
$str
=
str_replace
(
"[*]"
,
"<li>"
,
$str
);
$str
=
str_replace
(
':)'
,
'<img src=".$folder."/smile.gif alt=":)" />'
,
$str
);
$str
=
str_replace
(
';)'
,
'<img src=".$folder."/wink.gif alt=";)" />'
,
$str
);
$str
=
str_replace
(
':D'
,
'<img src=".$folder."/biggrin.gif alt=":D" />'
,
$str
);
$str
=
str_replace
(
';('
,
'<img src=".$folder."/crying.gif alt=":)" />'
,
$str
);
$str
=
str_replace
(
'=('
,
'<img src=".$folder."/crying.gif alt=";)" />'
,
$str
);
$str
=
str_replace
(
':('
,
'<img src=".$folder."/crying.gif alt=":D" />'
,
$str
);
$str
=
nl2br
(
$str
);
return
$str
;
}
####################################################################################################
@mysql_connect(
$sql
[
'host'
],
$sql
[
'user'
],
$sql
[
'passwort'
])
or
die
(
"Verbindung zur Datenbank konnte nicht aufgebaut werden!"
);
@mysql_select_db(
$sql
[
'db'
])
or
die
(
"Datenbank konnte nicht selektiert werden"
);
$forenid
=
array_unique
(
$forenid
);
sort(
$forenid
);
foreach
(
$forenid
as
$boardid
)
$boards
.=
","
.
$boardid
;
$query1
= mysql_query(
"SELECT * FROM bb"
.
$n
.
"_threads WHERE boardid IN (0"
.
$boards
.
") ORDER BY starttime DESC LIMIT "
.
$anzahl
);
echo
"<table width=
'100%'
border=
'0'
cellspacing=
'0'
cellpadding=
'0'
>
<tr>
</tr>
<tr>
<div
class
=
'header'
align=
'left'
>";
while
(
$thread
= mysql_fetch_array(
$query1
, MYSQL_ASSOC)) {
$topicid
=
$thread
[
'threadid'
];
$topic
=
$thread
[
'topic'
];
$topiclink
=
"<a href=\""
.
$boardurl
.
"thread.php?threadid="
.
$topicid
.
"\" target=\"_blank\">"
.
$thread
[
'topic'
].
"</a>"
;
$threadn
=
$thread
[
'threadid'
];
$query2
= mysql_query(
"SELECT message FROM bb"
.
$n
.
"_posts WHERE threadid='$threadn' ORDER BY postid ASC LIMIT 1"
);
$query3
= mysql_fetch_array(
$query2
, MYSQL_ASSOC);
if
(
$ng
==
""
)
$message
=
$query3
[
'message'
];
else
$message
=
substr
(
$query3
[
'message'
],
"0"
,
$ng
);
$starternews
=
$thread
[
'starter'
];
$poster
=
""
.
$thread
[
'lastposter'
].
""
;
$kategorie
=
""
.
$thread
[
'prefix'
].
""
;
$replys
=
$thread
[
'replycount'
];
$showreply
=
"<a title='last comment by $poster' href=\""
.
$boardurl
.
"thread.php?threadid="
.
$topicid
.
"\" target=\"_blank\">Kommentare ("
.
$replys
.
")</a>"
;
$comment
=
"<a title='Kommentar schreiben' href=\""
.
$boardurl
.
"addreply.php?threadid="
.
$topicid
.
"\" target=\"_blank\">Kommentar schreiben</a>"
;
$time
=
$thread
[
'starttime'
];
####################################################################################################
####################################################################################################
";
}
echo
"</div>
<td width=
'23%'
align=
'right'
valign=
'bottom'
><div
class
=
'header'
></div></td>
</tr>
<tr>
<td colspan=
'2'
align=
'left'
></td>
<td width=
'23%'
align=
'right'
valign=
'bottom'
><div
class
=
'header'
></div></td>
</tr>
<tr><td colspan=
'5'
align=
'left'
><font color=
'#333333'
size=
'-2'
face=
'Tahoma'
></font>
</tr>
</table>
</td>
</tr>
<tr>
</tr>
</table>";
?>