Example #1
0
 echo showWarning($data['user_id']);
 echo "<br /></td>";
 echo "<td valign='top' class='tbl2' style='height:1px; margin-top:2px; padding:10px;' colspan='2'><div style='float:right' class='small'><a href='#post_" . $data['post_id'] . "' name='post_" . $data['post_id'] . "' id='post_" . $data['post_id'] . "'>#" . ($current_row + $_GET['rowstart']) . "</a></div>\n";
 echo "<span style='font-size:18px; font-weight:bold;'><a href='" . BASEDIR . "profile.php?lookup=" . $data['user_id'] . "'>" . showLabel($data['user_id'], false, "post") . "</a>";
 renderAwards($data['user_id']);
 echo "</span>";
 echo $title;
 renderMods(false, true);
 echo "</span>";
 echo "</td></tr><tr><td class='tbl1' colspan='2' valign='top' style='padding:8px;'>\n";
 if (iMOD) {
     echo "<div style='float:right'><input type='checkbox' name='delete_post[]' value='" . $data['post_id'] . "' /></div>\n";
 }
 if (isset($_GET['highlight'])) {
     $words = explode(" ", urldecode($_GET['highlight']));
     $message = parseubb(highlight_words($words, $message));
 } else {
     $message = parseubb($message);
 }
 if ($current_row == 1) {
     add_to_title($locale['global_201'] . $fdata['thread_subject']);
     $post_res = dbquery("select * from " . DB_PREFIX . "fb_posts where post_id='" . $data['post_id'] . "'");
     if (dbrows($post_res)) {
         $post_data = dbarray($post_res);
         if ($post_data['post_icon']) {
             $ficon = "<img src='" . INFUSIONS . "fusionboard4/images/post_icons/" . $post_data['post_icon'] . "' alt='' style='vertical-align:middle;'>&nbsp;";
         } else {
             $ficon = "<img src='" . INFUSIONS . "fusionboard4/images/post_icons/page_white.png' alt='' style='vertical-align:middle;'>&nbsp;";
         }
     } else {
         $ficon = "<img src='" . INFUSIONS . "fusionboard4/images/post_icons/page_white.png' alt='' style='vertical-align:middle;'>&nbsp;";
    } else {
        $rows = 0;
    }
    if ($rows != 0) {
        $items_count .= THEME_BULLET . "&nbsp;<a href='" . FUSION_SELF . "?stype=weblinks&amp;stext=" . $_GET['stext'] . "&amp;" . $composevars . "'>" . $rows . " " . ($rows == 1 ? $locale['w401'] : $locale['w402']) . " " . $locale['522'] . "</a><br />\n";
        $result = dbquery("SELECT tw.*,twc.* FROM " . DB_WEBLINKS . " tw\r\n\t\t\tINNER JOIN " . DB_WEBLINK_CATS . " twc ON tw.weblink_cat=twc.weblink_cat_id\r\n\t\t\tWHERE " . groupaccess('weblink_cat_access') . " AND " . $fieldsvar . "\r\n\t\t\t" . ($_GET['datelimit'] != 0 ? " AND weblink_datestamp>=" . (time() - $_GET['datelimit']) : "") . "\r\n\t\t\tORDER BY " . $sortby . " " . ($_GET['order'] == 1 ? "ASC" : "DESC") . ($_GET['stype'] != "all" ? " LIMIT " . $_GET['rowstart'] . ",10" : ""));
        while ($data = dbarray($result)) {
            $search_result = "";
            if ($data['weblink_datestamp'] + 604800 > time() + $settings['timeoffset'] * 3600) {
                $new = " <span class='small'>" . $locale['w403'] . "</span>";
            } else {
                $new = "";
            }
            $text_all = $data['weblink_description'];
            $text_all = search_striphtmlbbcodes($text_all);
            $text_frag = search_textfrag($text_all);
            $text_frag = highlight_words($swords, $text_frag);
            $subj_c = search_stringscount($data['weblink_name']) + search_stringscount($data['weblink_url']);
            $text_c = search_stringscount($data['weblink_description']);
            $search_result .= "<a href='weblinks.php?cat_id=" . $data['weblink_cat'] . "&amp;weblink_id=" . $data['weblink_id'] . "' target='_blank'>" . highlight_words($swords, $data['weblink_name']) . "</a>{$new}" . "<br /><br />\n";
            if ($text_frag != "") {
                $search_result .= "<div class='quote' style='width:auto;height:auto;overflow:auto'>" . $text_frag . "</div><br />";
            }
            $search_result .= "<span class='small'><font class='alt'>" . $locale['w404'] . "</font> " . showdate("%d.%m.%y", $data['weblink_datestamp']) . " | <span class='alt'>" . $locale['w405'] . "</span> " . $data['weblink_count'] . "</span><br /><br />\n";
            search_globalarray($search_result);
        }
    } else {
        $items_count .= THEME_BULLET . "&nbsp;0 " . $locale['w402'] . " " . $locale['522'] . "<br />\n";
    }
    $navigation_result = search_navigation($rows);
}
        }
    }
    if ($fieldsvar) {
        $result = dbquery("SELECT ta.*,tac.* FROM " . DB_ARTICLES . " ta\r\n\t\t\tINNER JOIN " . DB_ARTICLE_CATS . " tac ON ta.article_cat=tac.article_cat_id\r\n\t\t\tWHERE " . groupaccess('article_cat_access') . " AND " . $fieldsvar . "\r\n\t\t\t" . ($_GET['datelimit'] != 0 ? " AND article_datestamp>=" . (time() - $_GET['datelimit']) : ""));
        $rows = dbrows($result);
    } else {
        $rows = 0;
    }
    if ($rows != 0) {
        $items_count .= THEME_BULLET . "&nbsp;<a href='" . FUSION_SELF . "?stype=articles&amp;stext=" . $_GET['stext'] . "&amp;" . $composevars . "'>" . $rows . " " . ($rows == 1 ? $locale['a401'] : $locale['a402']) . " " . $locale['522'] . "</a><br />\n";
        $result = dbquery("SELECT ta.*,tac.*, tu.user_id, tu.user_name, tu.user_status FROM " . DB_ARTICLES . " ta\r\n\t\t\tINNER JOIN " . DB_ARTICLE_CATS . " tac ON ta.article_cat=tac.article_cat_id\r\n\t\t\tLEFT JOIN " . DB_USERS . " tu ON ta.article_name=tu.user_id\r\n\t\t\tWHERE " . groupaccess('article_cat_access') . " AND " . $fieldsvar . "\r\n\t\t\t" . ($_GET['datelimit'] != 0 ? " AND article_datestamp>=" . (time() - $_GET['datelimit']) : "") . "\r\n\t\t\tORDER BY " . $sortby . " " . ($_GET['order'] != 1 ? "ASC" : "DESC") . ($_GET['stype'] != "all" ? " LIMIT " . $_GET['rowstart'] . ",10" : ""));
        while ($data = dbarray($result)) {
            $search_result = "";
            $text_all = search_striphtmlbbcodes($data['article_snippet'] . " " . $data['article_article']);
            $text_frag = search_textfrag($text_all);
            $subj_c = search_stringscount($data['article_subject']);
            $text_c = search_stringscount($data['article_snippet'] . " " . $data['article_article']);
            $text_frag = highlight_words($swords, $text_frag);
            $search_result .= "<a href='articles.php?article_id=" . $data['article_id'] . "'>" . highlight_words($swords, $data['article_subject']) . "</a>" . "<br /><br />\n";
            $search_result .= "<div class='quote' style='width:auto;height:auto;overflow:auto'>" . $text_frag . "</div><br />";
            $search_result .= "<span class='small2'>" . $locale['global_070'] . profile_link($data['user_id'], $data['user_name'], $data['user_status']) . "\n";
            $search_result .= $locale['global_071'] . showdate("longdate", $data['article_datestamp']) . "</span><br />\n";
            $search_result .= "<span class='small'>" . $subj_c . " " . ($subj_c == 1 ? $locale['520'] : $locale['521']) . " " . $locale['522'] . " " . $locale['a404'] . ", ";
            $search_result .= $text_c . " " . ($text_c == 1 ? $locale['520'] : $locale['521']) . " " . $locale['522'] . " " . $locale['a405'] . "</span><br /><br />\n";
            search_globalarray($search_result);
        }
    } else {
        $items_count .= THEME_BULLET . "&nbsp;0 " . $locale['a402'] . " " . $locale['522'] . "<br />\n";
    }
    $navigation_result = search_navigation($rows);
}
        $items_count .= THEME_BULLET . "&nbsp;<a href='" . FUSION_SELF . "?stype=downloads&amp;stext=" . $_GET['stext'] . "&amp;" . $composevars . "'>" . $rows . " " . ($rows == 1 ? $locale['d401'] : $locale['d402']) . " " . $locale['522'] . "</a><br />\n";
        $result = dbquery("SELECT td.*,tdc.* FROM " . DB_DOWNLOADS . " td\n\t\t\tINNER JOIN " . DB_DOWNLOAD_CATS . " tdc ON td.download_cat=tdc.download_cat_id\n\t\t\tWHERE " . groupaccess('download_cat_access') . " AND " . $fieldsvar . "\n\t\t\t" . ($_GET['datelimit'] != 0 ? " AND download_datestamp>=" . (time() - $_GET['datelimit']) : "") . "\n\t\t\tORDER BY " . $sortby . " " . ($_GET['order'] == 1 ? "ASC" : "DESC") . ($_GET['stype'] != "all" ? " LIMIT " . $_GET['rowstart'] . ",10" : ""));
        while ($data = dbarray($result)) {
            $search_result = "";
            if ($data['download_datestamp'] + 604800 > time() + $settings['timeoffset'] * 3600) {
                $new = " <span class='small'>" . $locale['d403'] . "</span>";
            } else {
                $new = "";
            }
            $text_all = $data['download_description'];
            $text_all = search_striphtmlbbcodes($text_all);
            $text_frag = search_textfrag($text_all);
            $subj_c = search_stringscount($data['download_title']);
            $text_c = search_stringscount($data['download_description']);
            $text_frag = highlight_words($swords, $text_frag);
            $search_result .= "<a href='downloads.php?cat_id=" . $data['download_cat'] . "&amp;download_id=" . $data['download_id'] . "' target='_blank'>" . highlight_words($swords, $data['download_title']) . "</a> - " . $data['download_filesize'] . " {$new}" . "<br /><br />\n";
            if ($text_frag != "") {
                $search_result .= "<div class='quote' style='width:auto;height:auto;overflow:auto'>" . $text_frag . "</div><br />";
            }
            $search_result .= "<span class='small'><span class='alt'>" . $locale['d404'] . "</span> " . $data['download_license'] . " |\n";
            $search_result .= "<span class='alt'>" . $locale['d405'] . "</span> " . $data['download_os'] . " |\n";
            $search_result .= "<span class='alt'>" . $locale['d406'] . "</span> " . $data['download_version'] . "<br />\n";
            $search_result .= "<span class='alt'>" . $locale['d407'] . "</span> " . showdate("%d.%m.%y", $data['download_datestamp']) . " |\n";
            $search_result .= "<span class='alt'>" . $locale['d408'] . "</span> " . $data['download_count'] . "</span><br /><br />\n";
            search_globalarray($search_result);
        }
    } else {
        $items_count .= THEME_BULLET . "&nbsp;0 " . $locale['d402'] . " " . $locale['522'] . "<br />\n";
    }
    $navigation_result = search_navigation($rows);
}
        }
    }
    if ($fieldsvar) {
        $result = dbquery("SELECT tp.forum_id, tp.thread_id, tp.post_id, tp.post_message, tt.thread_subject,\n\t\t\ttf.forum_access FROM " . DB_POSTS . " tp\n\t\t\tLEFT JOIN " . DB_FORUMS . " tf ON tf.forum_id = tp.forum_id\n\t\t\tLEFT JOIN " . DB_THREADS . " tt ON tt.thread_id = tp.thread_id\t\t\t\n\t\t\tWHERE " . groupaccess('forum_access') . ($_GET['forum_id'] != 0 ? " AND tf.forum_id=" . $_GET['forum_id'] : "") . "\n\t\t\tAND " . $fieldsvar . ($_GET['datelimit'] != 0 ? " AND post_datestamp>=" . (time() - $_GET['datelimit']) : ""));
        $rows = dbrows($result);
    } else {
        $rows = 0;
    }
    if ($rows) {
        $items_count .= THEME_BULLET . "&nbsp;<a href='" . FUSION_SELF . "?stype=forums&amp;stext=" . $_GET['stext'] . "&amp;" . $composevars . "'>" . $rows . " " . ($rows == 1 ? $locale['f402'] : $locale['f403']) . " " . $locale['522'] . "</a><br  />\n";
        $result = dbquery("SELECT tp.forum_id, tp.thread_id, tp.post_id, tp.post_message, tp.post_datestamp, tt.thread_subject,\n\t\t\ttt.thread_sticky, tf.forum_access, tu.user_id, tu.user_name FROM " . DB_POSTS . " tp\n\t\t\tLEFT JOIN " . DB_THREADS . " tt ON tp.thread_id = tt.thread_id\n\t\t\tLEFT JOIN " . DB_FORUMS . " tf ON tp.forum_id = tf.forum_id\n\t\t\tLEFT JOIN " . DB_USERS . " tu ON tp.post_author=tu.user_id\n\t\t\tWHERE " . groupaccess('forum_access') . ($_GET['forum_id'] != 0 ? " AND tf.forum_id=" . $_GET['forum_id'] : "") . "\n\t\t\tAND " . $fieldsvar . ($_GET['datelimit'] != 0 ? " AND post_datestamp>=" . (time() - $_GET['datelimit']) : "") . "\n\t\t\tORDER BY " . $sortby . " " . ($_GET['order'] == 1 ? "ASC" : "DESC") . ($_GET['stype'] != "all" ? " LIMIT " . $_GET['rowstart'] . ",10" : ""));
        while ($data = dbarray($result)) {
            $search_result = "";
            $text_all = search_striphtmlbbcodes($data['post_message']);
            $text_frag = search_textfrag($text_all);
            $subj_c = search_stringscount($data['thread_subject']);
            $text_c = search_stringscount($data['post_message']);
            $text_frag = highlight_words($swords, $text_frag);
            $search_result .= ($data['thread_sticky'] == 1 ? "<strong>" . $locale['f404'] . "</strong> " : "") . "<a href='" . FORUM . "viewthread.php?thread_id=" . $data['thread_id'] . "&amp;highlight=" . urlencode($_GET['stext']) . "&amp;pid=" . $data['post_id'] . "#post_" . $data['post_id'] . "'>" . highlight_words($swords, $data['thread_subject']) . "</a>" . "<br  /><br  />\n";
            $search_result .= "<div class='quote' style='width:auto;height:auto;overflow:auto'>" . $text_frag . "</div><br  />";
            $search_result .= "<span class='small2'>" . $locale['global_070'] . "<a href='profile.php?lookup=" . $data['user_id'] . "'>" . $data['user_name'] . "</a>\n";
            $search_result .= $locale['global_071'] . showdate("longdate", $data['post_datestamp']) . "</span><br  />\n";
            $search_result .= "<span class='small'>" . $subj_c . " " . ($subj_c == 1 ? $locale['520'] : $locale['521']) . " " . $locale['f406'] . " " . $locale['f407'] . ", ";
            $search_result .= $text_c . " " . ($text_c == 1 ? $locale['520'] : $locale['521']) . " " . $locale['f406'] . " " . $locale['f408'] . "</span><br  /><br  />\n";
            search_globalarray($search_result);
        }
    } else {
        $items_count .= THEME_BULLET . "&nbsp;0 " . $locale['f403'] . " " . $locale['522'] . "<br  />\n";
    }
    $navigation_result = search_navigation($rows);
}
Example #6
0
     $post['avatar'] .= "\n";
 }
 if ($post['username'] == '') {
     $post['username'] == '(N/A)';
 }
 if (defined('ENABLE_VOTING')) {
     if ($post['userrating'] != 0) {
         $post['userrating'] = sprintf("%.1f", $post['userrating'] / 10);
     } else {
         $post['userrating'] = "-";
     }
 } else {
     $post['userrating'] = "";
 }
 if (isset($highlight)) {
     $post['posttext'] = highlight_words($post['posttext'], $a_highword);
 }
 // show a signature?
 if ($post['usersignature']) {
     if (isset($g_user['userhidesig']) && $g_user['userhidesig'] != 1) {
         $post['posttext'] .= "<br/>--<br/>" . parse_code($post['usersignature'], 1, $config['imageslevel'] ? 0 : 1, 1, $config['smilies']);
     }
 }
 if ($post['postlastedittime']) {
     $post['posteditnotes'] = "<hr size=\"1\">{$style['smallfont']}Dieser Post wurde am " . date("d.m.Y", $post['postlastedittime'] + $config['timeoffset'] * 3600) . " um " . date("H:i", $post['postlastedittime'] + $config['timeoffset'] * 3600) . " Uhr von {$post['postlasteditby']} editiert.{$style['smallfontend']}";
 } else {
     $post['posteditnotes'] = "";
 }
 if (!--$count) {
     $lastpost = '<a name="bottom"></a>';
 }
            $text_all = search_striphtmlbbcodes($text_all);
            $text_frag = search_textfrag($text_all);
            $text_frag = highlight_words($swords, $text_frag);
            $subj_c = search_stringscount($data['photo_title']) + search_stringscount($data['album_title']);
            $text_c = search_stringscount($data['photo_description']) + search_stringscount($data['album_description']);
            $search_result .= "<table width='100%'>";
            $search_result .= "<tr><td width='" . $settings['thumb_w'] . "'>";
            $photodir = PHOTOS . (!SAFEMODE ? "album_" . $data['album_id'] . "/" : "");
            if ($data['photo_thumb1'] != "" && file_exists($photodir . $data['photo_thumb1'])) {
                $search_result .= "<a href='photogallery.php?photo_id=" . $data['photo_id'] . "'><img src='" . $photodir . $data['photo_thumb1'] . "' style='border:none' alt='" . $data['photo_title'] . "' /></a>";
            } else {
                if ($data['photo_thumb2'] != "" && file_exists($photodir . $data['photo_thumb2'])) {
                    $search_result .= "<a href='photogallery.php?photo_id=" . $data['photo_id'] . "'><img src='" . $photodir . $data['photo_thumb2'] . "' style='border:none' alt='" . $data['photo_title'] . "' /></a>";
                } else {
                    $search_result .= "<a href='photogallery.php?photo_id=" . $data['photo_id'] . "'><img src='" . get_image("imagenotfound") . "' style='border:none' alt='" . $data['photo_title'] . "' /></a>";
                }
            }
            $search_result .= "</td><td>";
            $search_result .= "<a href='photogallery.php?photo_id=" . $data['photo_id'] . "'>" . highlight_words($swords, $data['photo_title']) . "</a>{$new} (" . $locale['p404'] . " <a href='photogallery.php?album_id=" . $data['album_id'] . "'>" . highlight_words($swords, $data['album_title']) . "</a>)" . "<br /><br />\n";
            if ($text_frag != "") {
                $search_result .= "<div class='quote' style='width:auto;height:auto;overflow:auto'>" . $text_frag . "</div><br />\n";
            }
            $search_result .= "<span class='small'><font class='alt'>" . $locale['p405'] . "</font> " . showdate("%d.%m.%y", $data['photo_datestamp']) . " | <span class='alt'>" . $locale['p406'] . "</span> " . $data['photo_views'] . "</span>";
            $search_result .= "</td></tr></table><br /><br />\n";
            search_globalarray($search_result);
        }
    } else {
        $items_count .= THEME_BULLET . "&nbsp;0 " . $locale['p402'] . " " . $locale['522'] . "<br />\n";
    }
    $navigation_result = search_navigation($rows);
}
                $fieldsvar = "";
            }
        }
    }
    if ($fieldsvar) {
        $result = dbquery("SELECT fq.*, fc.* FROM " . DB_FAQS . " fq\n\t\t\tLEFT JOIN " . DB_FAQ_CATS . " fc ON fq.faq_cat_id=fc.faq_cat_id\n\t\t\tWHERE " . $fieldsvar);
        $rows = dbrows($result);
    } else {
        $rows = 0;
    }
    if ($rows != 0) {
        $items_count .= THEME_BULLET . "&nbsp;<a href='" . FUSION_SELF . "?stype=faqs&amp;stext=" . $_GET['stext'] . "&amp;" . $composevars . "'>" . $rows . " " . ($rows == 1 ? $locale['fq401'] : $locale['fq402']) . " " . $locale['522'] . "</a><br />\n";
        while ($data = dbarray($result)) {
            $search_result = "";
            $text_all = $data['faq_answer'];
            $text_all = search_striphtmlbbcodes($text_all);
            $text_frag = search_textfrag($text_all);
            $text_frag = highlight_words($swords, $text_frag);
            $subj_c = search_stringscount($data['faq_question']);
            $text_c = search_stringscount($data['faq_answer']);
            $search_result .= "<a href='faq.php?cat_id=" . $data['faq_cat_id'] . "'>" . highlight_words($swords, $data['faq_question']) . "</a>" . "<br /><br />\n";
            $search_result .= "<div class='quote' style='width:auto;height:auto;overflow:auto'>" . $text_frag . "</div><br />";
            $search_result .= "<span class='small'>" . $subj_c . " " . ($subj_c == 1 ? $locale['520'] : $locale['521']) . " " . $locale['fq403'] . " " . $locale['fq404'] . ", ";
            $search_result .= $text_c . " " . ($text_c == 1 ? $locale['520'] : $locale['521']) . " " . $locale['fq403'] . " " . $locale['fq405'] . "</span><br /><br />\n";
            search_globalarray($search_result);
        }
    } else {
        $items_count .= THEME_BULLET . "&nbsp;0 " . $locale['fq402'] . " " . $locale['522'] . "<br />\n";
    }
    $navigation_result = search_navigation($rows);
}
    if ($fieldsvar) {
        $rows = dbcount("(news_id)", DB_NEWS, groupaccess('news_visibility') . " AND " . $fieldsvar . ($_GET['datelimit'] != 0 ? " AND news_datestamp>=" . (time() - $_GET['datelimit']) : ""));
    } else {
        $rows = 0;
    }
    if ($rows != 0) {
        $items_count .= THEME_BULLET . "&nbsp;<a href='" . FUSION_SELF . "?stype=news&amp;stext=" . $_GET['stext'] . "&amp;" . $composevars . "'>" . $rows . " " . ($rows == 1 ? $locale['n401'] : $locale['n402']) . " " . $locale['522'] . "</a><br />\n";
        $result = dbquery("SELECT tn.*, user_id, user_name FROM " . DB_NEWS . " tn\n\t\t\tLEFT JOIN " . DB_USERS . " tu ON tn.news_name=tu.user_id\n\t\t\tWHERE " . groupaccess('news_visibility') . " AND (news_start='0'||news_start<=" . time() . ")\n\t\t\tAND (news_end='0'||news_end>=" . time() . ") AND " . $fieldsvar . "\n\t\t\t" . ($_GET['datelimit'] != 0 ? " AND news_datestamp>=" . (time() - $_GET['datelimit']) : "") . "\n\t\t\tORDER BY " . $sortby . " " . ($_GET['order'] == 1 ? "ASC" : "DESC") . ($_GET['stype'] != "all" ? " LIMIT " . $_GET['rowstart'] . ",10" : ""));
        while ($data = dbarray($result)) {
            $search_result = "";
            $text_all = $data['news_news'] . " " . $data['news_extended'];
            $text_all = search_striphtmlbbcodes($text_all);
            $text_frag = search_textfrag($text_all);
            $text_frag = highlight_words($swords, $text_frag);
            $subj_c = search_stringscount($data['news_subject']);
            $text_c = search_stringscount($data['news_news']);
            $text_c2 = search_stringscount($data['news_extended']);
            $search_result .= "<a href='news.php?readmore=" . $data['news_id'] . "'>" . highlight_words($swords, $data['news_subject']) . "</a>" . "<br /><br />\n";
            $search_result .= "<div class='quote' style='width:auto;height:auto;overflow:auto'>" . $text_frag . "</div><br />";
            $search_result .= "<span class='small2'>" . $locale['global_070'] . "<a href='profile.php?lookup=" . $data['user_id'] . "'>" . $data['user_name'] . "</a>\n";
            $search_result .= $locale['global_071'] . showdate("longdate", $data['news_datestamp']) . "</span><br />\n";
            $search_result .= "<span class='small'>" . $subj_c . " " . ($subj_c == 1 ? $locale['520'] : $locale['521']) . " " . $locale['n403'] . " " . $locale['n404'] . ", ";
            $search_result .= $text_c . " " . ($text_c == 1 ? $locale['520'] : $locale['521']) . " " . $locale['n403'] . " " . $locale['n405'] . ", ";
            $search_result .= $text_c2 . " " . ($text_c2 == 1 ? $locale['520'] : $locale['521']) . " " . $locale['n403'] . " " . $locale['n406'] . "</span><br /><br />\n";
            search_globalarray($search_result);
        }
    } else {
        $items_count .= THEME_BULLET . "&nbsp;0 " . $locale['n402'] . " " . $locale['522'] . "<br />\n";
    }
    $navigation_result = search_navigation($rows);
}
        $result = dbquery("SELECT * FROM " . DB_CUSTOM_PAGES . " WHERE " . groupaccess('page_access') . " AND " . $fieldsvar);
        $rows = dbrows($result);
    } else {
        $rows = 0;
    }
    if ($rows != 0) {
        $items_count .= THEME_BULLET . "&nbsp;<a href='" . FUSION_SELF . "?stype=custompages&amp;stext=" . $_GET['stext'] . "&amp;" . $composevars . "'>" . $rows . " " . ($rows == 1 ? $locale['c401'] : $locale['c402']) . " " . $locale['522'] . "</a><br />\n";
        $result = dbquery("SELECT * FROM " . DB_CUSTOM_PAGES . "\n\t\t\tWHERE " . groupaccess('page_access') . " AND " . $fieldsvar . "\n\t\t\tORDER BY " . $sortby . " " . ($_GET['order'] == 1 ? "ASC" : "DESC") . ($_GET['stype'] != "all" ? " LIMIT " . $_GET['rowstart'] . ",10" : ""));
        while ($data = dbarray($result)) {
            $search_result = "";
            $text_all = stripslashes($data['page_content']);
            ob_start();
            eval("?>" . $text_all . "<?php ");
            $text_all = ob_get_contents();
            ob_end_clean();
            $text_all = search_striphtmlbbcodes($text_all);
            $text_frag = search_textfrag($text_all);
            $subj_c = search_stringscount($data['page_title']);
            $text_c = search_stringscount($text_all);
            $text_frag = highlight_words($swords, $text_frag);
            $search_result .= "<a href='viewpage.php?page_id=" . $data['page_id'] . "'>" . highlight_words($swords, $data['page_title']) . "</a>" . "<br /><br />\n";
            $search_result .= "<div class='quote' style='width:auto;height:auto;overflow:auto'>" . $text_frag . "</div><br />\n";
            $search_result .= "<span class='small'>" . $subj_c . " " . ($subj_c == 1 ? $locale['520'] : $locale['521']) . " " . $locale['c403'] . " " . $locale['c404'] . ", ";
            $search_result .= $text_c . " " . ($text_c == 1 ? $locale['520'] : $locale['521']) . $locale['c403'] . " " . $locale['c405'] . "</span><br /><br />\n";
            search_globalarray($search_result);
        }
    } else {
        $items_count .= THEME_BULLET . "&nbsp;0 " . $locale['c402'] . " " . $locale['522'] . "<br />\n";
    }
    $navigation_result = search_navigation($rows);
}