示例#1
0
        $rows = dbcount("(news_id)", DB_NEWS, groupaccess('news_visibility') . " AND " . $fieldsvar . " AND (news_start='0'||news_start<=" . time() . ") AND (news_end='0'||news_end>=" . time() . ") " . ($_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.*, tu.user_id, tu.user_name, tu.user_status FROM " . DB_NEWS . " tn\r\n\t\t\tLEFT JOIN " . DB_USERS . " tu ON tn.news_name=tu.user_id\r\n\t\t\tWHERE " . groupaccess('news_visibility') . " AND (news_start='0'||news_start<=" . time() . ")\r\n\t\t\tAND (news_end='0'||news_end>=" . time() . ") AND " . $fieldsvar . "\r\n\t\t\t" . ($_GET['datelimit'] != 0 ? " AND news_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 = $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'] . "'>" . $data['news_subject'] . "</a>" . "<br /><br />\n";
            // $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'] . profile_link($data['user_id'], $data['user_name'], $data['user_status']) . "\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);
}
    }
    if ($fieldsvar) {
        $result = dbquery("SELECT tp.forum_id, tp.thread_id, tp.post_id, tp.post_message, tt.thread_subject,\r\n\t\t\ttf.forum_access FROM " . DB_POSTS . " tp\r\n\t\t\tLEFT JOIN " . DB_FORUMS . " tf ON tf.forum_id = tp.forum_id\r\n\t\t\tLEFT JOIN " . DB_THREADS . " tt ON tt.thread_id = tp.thread_id\t\t\t\r\n\t\t\tWHERE " . groupaccess('forum_access') . ($_GET['forum_id'] != 0 ? " AND tf.forum_id=" . $_GET['forum_id'] : "") . "\r\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,\r\n\t\t\ttt.thread_sticky, tf.forum_access, tu.user_id, tu.user_name, tu.user_status FROM " . DB_POSTS . " tp\r\n\t\t\tLEFT JOIN " . DB_THREADS . " tt ON tp.thread_id = tt.thread_id\r\n\t\t\tLEFT JOIN " . DB_FORUMS . " tf ON tp.forum_id = tf.forum_id\r\n\t\t\tLEFT JOIN " . DB_USERS . " tu ON tp.post_author=tu.user_id\r\n\t\t\tWHERE " . groupaccess('forum_access') . ($_GET['forum_id'] != 0 ? " AND tf.forum_id=" . $_GET['forum_id'] : "") . "\r\n\t\t\tAND " . $fieldsvar . ($_GET['datelimit'] != 0 ? " AND post_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(iADMIN ? $data['post_message'] : preg_replace("#\\[hide\\](.*)\\[/hide\\]#si", "", $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'] . "'>" . $data['thread_subject'] . "</a>" . "<br  /><br  />\n";
            // $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'] . profile_link($data['user_id'], $data['user_name'], $data['user_status']) . "\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);
}
        }
    }
    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);
}
        $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'] . "'>" . $data['page_title'] . "</a>" . "<br /><br />\n";
            // $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);
}
 if ($rows != 0) {
     $items_count .= THEME_BULLET . "&nbsp;<a href='" . FUSION_SELF . "?stype=photos&amp;stext=" . $_GET['stext'] . "&amp;" . $composevars . "'>" . $rows . " " . ($rows == 1 ? $locale['p401'] : $locale['p402']) . " " . $locale['522'] . "</a><br />\n";
     $result = dbquery("SELECT tp.*,ta.* FROM " . DB_PHOTOS . " tp\r\n\t\t\tINNER JOIN " . DB_PHOTO_ALBUMS . " ta ON tp.album_id=ta.album_id\r\n\t\t\tWHERE " . groupaccess('album_access') . " AND " . $fieldsvar . "\r\n\t\t\t" . ($_GET['datelimit'] != 0 ? " AND (photo_datestamp>=" . (time() - $_GET['datelimit']) . " OR album_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['photo_datestamp'] + 604800 > time() + $settings['timeoffset'] * 3600) {
             $new = " <span class='small'>" . $locale['p403'] . "</span>";
         } else {
             $new = "";
         }
         $text_all = $data['photo_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['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'] . "'>" . $data['photo_title'] . "</a>" . $new . " (" . $locale['p404'] . " <a href='photogallery.php?album_id=" . $data['album_id'] . "'>" . $data['album_title'] . "</a>)" . "<br /><br />\n";
         // $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 ($rows != 0) {
     $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\r\n\t\t\tINNER JOIN " . DB_DOWNLOAD_CATS . " tdc ON td.download_cat=tdc.download_cat_id\r\n\t\t\tWHERE " . groupaccess('download_cat_access') . " AND " . $fieldsvar . "\r\n\t\t\t" . ($_GET['datelimit'] != 0 ? " AND download_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['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'>" . $data['download_title'] . "</a> - " . $data['download_filesize'] . " " . $new . "<br /><br />\n";
         // $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";
    } 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 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=" . $_POST['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='infusions/faq/faq.php?cat_id=" . $data['faq_cat_id'] . "'>" . $data['faq_question'] . "</a>" . "<br /><br />\n";
                // $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("(blog_id)", DB_BLOG, groupaccess('blog_visibility') . " AND " . $fieldsvar . " AND (blog_start='0'||blog_start<=" . time() . ") AND (blog_end='0'||blog_end>=" . time() . ") " . ($_POST['datelimit'] != 0 ? " AND blog_datestamp>=" . (time() - $_POST['datelimit']) : ""));
        } else {
            $rows = 0;
        }
        if ($rows != 0) {
            $items_count .= THEME_BULLET . "&nbsp;<a href='" . FUSION_SELF . "?stype=blog&amp;stext=" . $_POST['stext'] . "&amp;" . $composevars . "'>" . $rows . " " . ($rows == 1 ? $locale['n401'] : $locale['n402']) . " " . $locale['522'] . "</a><br />\n";
            $result = dbquery("SELECT tn.*, tu.user_id, tu.user_name, tu.user_status FROM " . DB_BLOG . " tn\n\t\t\tLEFT JOIN " . DB_USERS . " tu ON tn.blog_name=tu.user_id\n\t\t\tWHERE " . groupaccess('blog_visibility') . " AND (blog_start='0'||blog_start<=" . time() . ")\n\t\t\tAND (blog_end='0'||blog_end>=" . time() . ") AND " . $fieldsvar . "\n\t\t\t" . ($_POST['datelimit'] != 0 ? " AND blog_datestamp>=" . (time() - $_POST['datelimit']) : "") . "\n\t\t\tORDER BY " . $sortby . " " . ($_POST['order'] == 1 ? "ASC" : "DESC") . ($_GET['stype'] != "all" ? " LIMIT " . $_POST['rowstart'] . ",10" : ""));
            while ($data = dbarray($result)) {
                $search_result = "";
                $text_all = $data['blog_blog'] . " " . $data['blog_extended'];
                $text_all = search_striphtmlbbcodes($text_all);
                $text_frag = search_textfrag($text_all);
                $subj_c = search_stringscount($data['blog_subject']);
                $text_c = search_stringscount($data['blog_blog']);
                $text_c2 = search_stringscount($data['blog_extended']);
                $search_result .= "<a href='" . INFUSIONS . "blog/blog.php?readmore=" . $data['blog_id'] . "'>" . $data['blog_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['blog_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);
    }
}