anyone have code and data set JohnCMS wapbuilder with no source. Give me sir. Guided possible. thanks a lot.
Demo: vni.mobi
http://saoviet.vni.mobi
<?
{
global $user_id;
$set_forum = $datauser['set_forum'] ? unserialize($datauser['set_forum']) : array();
$settings = $set['lastThemes'] ? unserialize($set['lastThemes']) : array('totalThemes' => 3, 'timeCache' => 30);
if($settings['totalThemes'] > 0 && !$set_forum['viewThemes']) {
$themesOut = '';
$file_cache = 'files/cache/lastThemes.dat';
/*echo '<div class="phdr"><b>Последние темы форума</b></div>';*/
$req = mysql_query("SELECT * FROM `forum` WHERE `type`='t'" . ($rights >= 7 ? '' : " AND `close`!='1'") . " ORDER BY `time` DESC LIMIT " . $settings['totalThemes']);
while (($res = mysql_fetch_assoc($req)) !== false) {
if ($res['close']) $themesOut .= '<div class="rmenu">';
else $themesOut .= $i % 2 ? '<div class="mainpagebubble2">' : '<div class="mainpagebubble1">';
$nickUser = mysql_fetch_assoc(mysql_query("SELECT `from` FROM `forum` WHERE `type` = 'm' AND `close` != '1' AND `refid` = '" . $res['id'] . "' ORDER BY `time` DESC LIMIT 1"));
$totalPosts = mysql_result(mysql_query("SELECT COUNT(*) FROM `forum` WHERE `type`='m' AND `refid`='" . $res['id'] . "'" . ($rights >= 7 ? '' : " AND `close` != '1'")), 0);
$endPage = ceil($totalPosts / $kmess);
$icons = array(
(!$res['vip'] ? '<img src="../theme/' . $set_user['skin'] . '/images/op.gif" alt=""/>' : ''),
($res['vip'] ? '<img src="../theme/' . $set_user['skin'] . '/images/pt.gif" alt=""/>' : ''),
($res['realid'] ? '<img src="../theme/' . $set_user['skin'] . '/images/rate.gif" alt=""/>' : ''),
($res['edit'] ? '<img src="../theme/' . $set_user['skin'] . '/images/tz.gif" alt=""/>' : '')
);
$themesOut .= functions::display_menu($icons, ' ', ' ') .
'<a href="forum/index.php?id=' . $res['id'] . '">' . $res['text'] . '</a> [' . $totalPosts . ']';
if ($endPage > 1) $themesOut .= '<a href="index.php?id=' . $res['id'] . '&page=' . $endPage . '"> >></a>';
$themesOut .= '<div class="sub">' . $res['from'];
if (!empty($nickUser['from'])) $themesOut .= ' / ' . $nickUser['from'];
$themesOut .= ' <span class="gray">(' . functions::display_date($res['time']) . ')</span></div></div>';
++$i;
}
if ($settings['timeCache'] > 0 && time() < (filemtime($file_cache) + $settings['timeCache'])) {
echo file_get_contents($file_cache);
} else {
echo $themesOut;
if($settings['timeCache'] > 0)
file_put_contents($file_cache, $themesOut);
}
}
}
?>
require_once ('../incfiles/showforum.php');