Пример #1
0
<body>
<?php 
echo '<a href="frame_toc.php" target="_self">';
echo _AT('back_to_contents');
echo '</a>';
if ($_GET['query']) {
    $_GET['query'] = str_replace(',', ' ', $_GET['query']);
    $_GET['query'] = str_replace('"', '', $_GET['query']);
    if (strlen($_GET['query']) > 3) {
        $_GET['query'] = strtolower($_GET['query']);
        $search_terms = explode(' ', $_GET['query']);
        $results = array();
        $languageTextDAO = new LanguageTextDAO();
        $final_match_rows = array();
        foreach ($search_terms as $term) {
            $match_rows = $languageTextDAO->getHelpByMatchingText($addslashes($term), $_SESSION['lang']);
            if (is_array($match_rows)) {
                $final_match_rows = array_merge($final_match_rows, $match_rows);
            }
        }
        if (is_array($final_match_rows)) {
            foreach ($final_match_rows as $match) {
                if (is_array($result)) {
                    $all_match_terms = array_keys($result);
                } else {
                    $all_match_terms = array();
                }
                if (!in_array($match['term'], $all_match_terms)) {
                    $count = 0;
                    $contents = strtolower($match['text']);
                    foreach ($search_terms as $term) {
Пример #2
0
<body>
<?php 
echo '<a href="frame_toc.php" target="_self">';
echo _AC('back_to_contents');
echo '</a>';
if ($_GET['query']) {
    $_GET['query'] = str_replace(',', ' ', $_GET['query']);
    $_GET['query'] = str_replace('"', '', $_GET['query']);
    if (strlen($_GET['query']) > 3) {
        $_GET['query'] = strtolower($_GET['query']);
        $search_terms = explode(' ', $_GET['query']);
        $results = array();
        $languageTextDAO = new LanguageTextDAO();
        $final_match_rows = array();
        foreach ($search_terms as $term) {
            $match_rows = $languageTextDAO->getHelpByMatchingText($term, $_SESSION['lang']);
            if (is_array($match_rows)) {
                $final_match_rows = array_merge($final_match_rows, $match_rows);
            }
        }
        if (is_array($final_match_rows)) {
            foreach ($final_match_rows as $match) {
                if (is_array($result)) {
                    $all_match_terms = array_keys($result);
                } else {
                    $all_match_terms = array();
                }
                if (!in_array($match['term'], $all_match_terms)) {
                    $count = 0;
                    $contents = strtolower($match['text']);
                    foreach ($search_terms as $term) {