当前位置: 首页>>代码示例>>PHP>>正文


PHP search_globalarray函数代码示例

本文整理汇总了PHP中search_globalarray函数的典型用法代码示例。如果您正苦于以下问题:PHP search_globalarray函数的具体用法?PHP search_globalarray怎么用?PHP search_globalarray使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了search_globalarray函数的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: search_navigation

function search_navigation($rows)
{
    global $site_search_count, $composevars;
    $site_search_count += $rows;
    $navigation_result = "<div align='center' style='margin-top:5px;'>\n" . makePageNav($_GET['rowstart'], 10, $site_search_count > 100 || search_globalarray("") ? 100 : $site_search_count, 3, FUSION_SELF . "?stype=" . $_GET['stype'] . "&amp;stext=" . urlencode($_GET['stext']) . "&amp;" . $composevars) . "\n</div>\n";
    return $navigation_result;
}
开发者ID:roniwahyu,项目名称:AKEUDA,代码行数:7,代码来源:search.php

示例2: dbquery

    }
    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);
}
开发者ID:WuChEn,项目名称:PHP-Fusion,代码行数:31,代码来源:search_forums_include.php


注:本文中的search_globalarray函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。