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.
| 1. / 2. / ...
<?php
$where = 'threads_id = ';
$select = cs_sql_select(__FILE__,'comments','DISTINCT threads_id, comments_id','users_id = \''.$account['users_id'].'\'','comments_id DESC',0,$account['users_limit'] + 10);
if (!empty($select)) {
$x = 0;
foreach ($select AS $thread) {
$x++;
$check = cs_sql_count(__FILE__,'comments','threads_id = \''.$thread['threads_id'].'\' AND comments_id > \''.$thread['comments_id'].'\'');
if (!empty($check)) {
if ($x != 1) {
$where .= ' OR threads_id = ';
}
$where .= '\''.$thread['threads_id'].'\'';
}
}
$select = cs_sql_select(__FILE__,'threads','threads_name, threads_id',$where,'threads_date',0,$account['users_limit']);
echo cs_html_table(1,'forum',1);
echo cs_html_roco(1,'headb');
echo 'thread'; // wehe du lässt das so und baust keine lang datei ein :-)
echo cs_html_roco(0);
foreach ($select AS $thread) {
echo cs_html_roco(1,'leftb');
echo cs_link($thread['threads_name'],'board','thread','id='.$thread['threads_id']);
echo cs_html_roco(0);
}
echo cs_html_table(0);
}
?> |