Hi, Guest! Mendaftar Masuk

Last activity

  Modif Johncms V7
Hari terakhir : 08.03.2017 / 21:09#TOP

hazzama98 
hazzama98
//* Recent Topic by Ryxion *//

$rexq = $db->query("SELECT * FROM `forum` WHERE `type` = 't' AND `close`!='1' ")->fetch();
$rexs = $db->query("SELECT `from` FROM `forum` WHERE `type` = 'm' AND `close` != '1' AND `refid` = '" . $rexq['id'] . "'");
$semloc = $rexs->rowCount();

if ($systemUser->rights == 9) {
$reqx = $db->query("SELECT COUNT(*) FROM `forum` WHERE `type`='t' AND $semloc > '50'");
} else {
$reqx = $db->query("SELECT COUNT(*) FROM `forum` WHERE `type`='t' AND $semloc > '50' AND `close` != '1'");
}

$count = $reqx->fetchColumn();
echo '
' . _t('Forum') . ' | Hot Topik!!
';
if ($count) {
if ($systemUser->rights == 9) {
$req = $db->query("SELECT * FROM `forum` WHERE `type`='t' ORDER BY $semloc DESC LIMIT 4");
} else {
$req = $db->query("SELECT * FROM `forum` WHERE `type`='t' AND `close` != '1' ORDER BY $semloc DESC LIMIT 4");
}

for ($i = 0; $res = $req->fetch(); ++$i) {
echo $i % 2 ? '
' : '
';
$razd = $db->query("SELECT `id`, `refid`, `text` FROM `forum` WHERE `type`='r' AND `id`='" . $res['refid'] . "'")->fetch();
$frm = $db->query("SELECT `text` FROM `forum` WHERE `type`='f' AND `id`='" . $razd['refid'] . "'")->fetch();
$colmes = $db->query("SELECT * FROM `forum` WHERE `refid` = '" . $res['id'] . "' AND `type` = 'm'" . ($systemUser->rights >= 7 ? '' : " AND `close` != '1'") . " ORDER BY `time` DESC");
$colmes1 = $colmes->rowCount();
$cpg = ceil($colmes1 / $kmess);
$nick = $colmes->fetch();

if ($res['edit']) {
echo $tools->image('tz.gif');
} elseif ($res['close']) {
echo $tools->image('dl.gif');
} else {
echo $tools->image('np.gif');
}

if ($res['realid'] == 1) {
echo $tools->image('rate.gif');
}

echo ' ' . (empty($res['text']) ? '-----' : $res['text']) .
'
 [' . $colmes1 . ']';
if ($cpg > 1) {
echo ' >>';
}

echo '
' . $frm['text'] . ' / ' . $razd['text'] . '
';
echo $res['from'];

if ($colmes1 > 1) {
echo ' / ' . $nick['from'];
}

echo ' ' . $tools->displayDate($nick['time']) . '';
echo '
';
}
} else {
echo '';
}

echo '
' . _t('Total') . ': ' . $count . '
';
Hari terakhir : 09.03.2017 / 02:11 #1

Bemo 
Bemo (Smod) Status : Special Staff
code di atas kayak pernah ane liat, oh iya itu new topik yg ada di jcms 7 yg ada di folder /forum.
Hari terakhir : 09.03.2017 / 07:31 #2

hazzama98 
hazzama98
iya gan
Hari terakhir : 09.03.2017 / 10:22 #3

putracayo 
putracayo
Taruh dimana?
Anda harus login untuk komentar
di kategori yang sama

  Total: 4

Filter by author
Download Topic

In forum

New at the top