20 defined(
'XOOPS_ROOT_PATH') or die('Restricted access');
22 trigger_error("Functions in " . __FILE__ . " are deprecated, should not be used any more", E_USER_WARNING);
37 if ($side ==
"left") {
39 }
else if ($side ==
"right") {
44 if (is_object($xoopsUser)) {
45 $block_arr = $xoopsblock->getAllBlocksByGroup($xoopsUser->getGroups(),
true, $side,
XOOPS_BLOCK_VISIBLE);
47 $block_arr = $xoopsblock->getAllBlocksByGroup(XOOPS_GROUP_ANONYMOUS,
true, $side,
XOOPS_BLOCK_VISIBLE);
50 $block_count = count($block_arr);
52 include_once
$GLOBALS[
'xoops']->path(
'class/template.php');
58 for(
$i = 0;
$i < $block_count;
$i++) {
59 $bcachetime = intval($block_arr[
$i]->getVar(
'bcachetime'));
60 if (empty($bcachetime)) {
66 $btpl = $block_arr[
$i]->getVar(
'template');
68 if (empty($bcachetime) || !
$xoopsTpl->is_cached(
'db:' . $btpl)) {
70 $bresult =& $block_arr[
$i]->buildBlock();
74 $xoopsTpl->assign_by_ref(
'block', $bresult);
75 $bcontent =&
$xoopsTpl->fetch(
'db:' . $btpl);
78 $xoopsLogger->addBlock($block_arr[
$i]->getVar(
'name'),
true, $bcachetime);
79 $bcontent =&
$xoopsTpl->fetch(
'db:' . $btpl);
82 $bid = $block_arr[
$i]->getVar(
'bid');
83 if (empty($bcachetime) || !
$xoopsTpl->is_cached(
'db:system_dummy.html',
'blk_' . $bid)) {
85 $bresult = & $block_arr[
$i]->buildBlock();
89 $xoopsTpl->assign_by_ref(
'dummy_content', $bresult[
'content']);
90 $bcontent =&
$xoopsTpl->fetch(
'db:system_dummy.html',
'blk_' . $bid);
93 $xoopsLogger->addBlock($block_arr[
$i]->getVar(
'name'),
true, $bcachetime);
94 $bcontent =&
$xoopsTpl->fetch(
'db:system_dummy.html',
'blk_' . $bid);
97 switch ($block_arr[
$i]->getVar(
'side')) {
99 themesidebox($block_arr[
$i]->getVar(
'title'), $bcontent);
102 if (function_exists(
"themesidebox_right")) {
103 themesidebox_right($block_arr[
$i]->getVar(
'title'), $bcontent);
105 themesidebox($block_arr[
$i]->getVar(
'title'), $bcontent);
120 $cc_block = $cl_block = $cr_block =
"";
122 if ($xoopsOption[
'theme_use_smarty'] == 0) {
124 include_once
$GLOBALS[
'xoops']->path(
'class/template.php');
129 if (is_object($xoopsUser)) {
134 $block_count = count($block_arr);
136 for(
$i = 0;
$i < $block_count;
$i++) {
137 $bcachetime = intval($block_arr[
$i]->getVar(
'bcachetime'));
138 if (empty($bcachetime)) {
144 $btpl = $block_arr[
$i]->getVar(
'template');
146 if (empty($bcachetime) || !
$xoopsTpl->is_cached(
'db:' . $btpl)) {
148 $bresult =& $block_arr[
$i]->buildBlock();
152 $xoopsTpl->assign_by_ref(
'block', $bresult);
153 $bcontent =&
$xoopsTpl->fetch(
'db:' . $btpl);
156 $xoopsLogger->addBlock($block_arr[
$i]->getVar(
'name'),
true, $bcachetime);
157 $bcontent =&
$xoopsTpl->fetch(
'db:' . $btpl);
160 $bid = $block_arr[
$i]->getVar(
'bid');
161 if (empty($bcachetime) || !
$xoopsTpl->is_cached(
'db:system_dummy.html',
'blk_' . $bid)) {
163 $bresult =& $block_arr[
$i]->buildBlock();
167 $xoopsTpl->assign_by_ref(
'dummy_content', $bresult[
'content']);
168 $bcontent =&
$xoopsTpl->fetch(
'db:system_dummy.html',
'blk_' . $bid);
171 $xoopsLogger->addBlock($block_arr[
$i]->getVar(
'name'),
true, $bcachetime);
172 $bcontent =&
$xoopsTpl->fetch(
'db:system_dummy.html',
'blk_' . $bid);
175 $title = $block_arr[
$i]->getVar(
'title');
176 switch ($block_arr[
$i]->getVar(
'side')) {
179 $cc_block .=
'<tr valign="top"><td colspan="2"><strong>' .
$title .
'</strong><hr />' . $bcontent .
'<br /><br /></td></tr>' .
"\n";
181 $cc_block .=
'<tr><td colspan="2">' . $bcontent .
'<br /><br /></td></tr>' .
"\n";
186 $cl_block .=
'<p><strong>' .
$title .
'</strong><hr />' . $bcontent .
'</p>' .
"\n";
188 $cl_block .=
'<p>' . $bcontent .
'</p>' .
"\n";
193 $cr_block .=
'<p><strong>' .
$title .
'</strong><hr />' . $bcontent .
'</p>' .
"\n";
195 $cr_block .=
'<p>' . $bcontent .
'</p>' .
"\n";
203 echo
'<table width="100%">' . $cc_block .
'<tr valign="top"><td width="50%">' . $cl_block .
'</td><td width="50%">' . $cr_block .
'</td></tr></table>' .
"\n";
213 echo
"<table border='0' cellpadding='0' cellspacing='0' align='center' width='$width'><tr><td class='bg2'><table border='0' cellpadding='4' cellspacing='1' width='100%'><tr class='bg3' align='left'><td class='bg3' width='20%'>" .
_CM_POSTER .
"</td><td class='bg3'>" .
_CM_THREAD .
"</td></tr>";
244 function showThread($color_number, $subject_image, $subject, $text, $post_date, $ip_image, $reply_image, $edit_image, $delete_image, $username =
"", $rank_title =
"", $rank_image =
"", $avatar_image =
"", $reg_date =
"", $posts =
"", $user_from =
"", $online_image =
"", $profile_image =
"", $pm_image =
"", $email_image =
"", $www_image =
"", $icq_image =
"", $aim_image =
"", $yim_image =
"", $msnm_image =
"")
246 if ($color_number == 1) {
251 echo
"<tr align='left'><td valign='top' class='$bg' nowrap='nowrap'><strong>$username</strong><br />$rank_title<br />$rank_image<br />$avatar_image<br /><br />$reg_date<br />$posts<br />$user_from<br /><br />$online_image</td>";
252 echo
"<td valign='top' class='$bg'><table width='100%' border='0'><tr><td valign='top'>$subject_image <strong>$subject</strong></td><td align='right'>" . $ip_image .
"" . $reply_image .
"" . $edit_image .
"" . $delete_image .
"</td></tr>";
253 echo
"<tr><td colspan='2'><p>$text</p></td></tr></table></td></tr>";
254 echo
"<tr align='left'><td class='$bg' valign='middle'>$post_date</td><td class='$bg' valign='middle'>" . $profile_image .
"" . $pm_image .
"" . $email_image .
"" . $www_image .
"" . $icq_image .
"" . $aim_image .
"" . $yim_image .
"" . $msnm_image .
"</td></tr>";
262 echo
'</table></td></tr></table>';