Example #1
0
function dt_result($print = true)
{
    $result = get_search_result();
    $hasil = '';
    foreach ($result as $id => $post) {
        $hasil .= '<a href="' . $post['url'] . '"><div class="search-result" id="result_' . $id . '">' . $post['title'] . '</div></a>';
    }
    if ($print) {
        print $hasil;
    } else {
        return $hasil;
    }
}
function search_rss()
{
    $args = func_get_args();
    $cate = $args[2];
    $key = $args[3];
    if (!$key) {
        die("Invalid argument!");
    }
    $data = get_search_result($key, 10, $cate, "", "");
    $GLOBALS['search'] = $key;
    theme('rss', $data);
}
Example #3
0
		}
	} else {
		if ($_GET['find_in'] == 'my') {
			$my_courses = get_my_courses($_SESSION['member_id']);
		} else { // $_GET['find_in'] == 'all' (or other). always safe to perform.
			$my_courses = get_all_courses($_SESSION['member_id']);
		}

		foreach ($my_courses as $tmp_course_id) {
			if ($_GET['display_as'] == 'pages') {
				// merge all the content results together
				$search_results = array_merge($search_results, get_search_result($_GET['words'], $predicate, $tmp_course_id, $num_found, $total_score));
			} else {
				// group by Course
				$total_score = 0;
				$search_results[$tmp_course_id] = get_search_result($_GET['words'], $predicate, $tmp_course_id, $num_found, $total_score);
				if ($total_score) {
					$search_totals[$tmp_course_id]  = $total_score;
				} // else: no content found in this course.
			}
		}
	}

	if ($_GET['display_as'] == 'summaries') {
		$num_found = count($search_totals);
	}

	echo '<a name="search_results"></a><h3>'.$num_found.' '._AT('search_results').'</h3>';

	if (!$num_found) {
		$msg->printInfos('NO_SEARCH_RESULTS');
Example #4
0
?>
    </div>
    <!--END: DO NOT DELETE THIS BLOCK -->

    <div data-ng-app="atmf" data-ng-cloak>
        <div data-ng-controller="AtmfFrontEnd">
            <div class="container">
                <div class="row">

                    <!-- start of main  -->
                    <div class="col-md-12 col-sm-12 col-xs-12" rel="sidebar">
                        <?php 
get_search_sidebar();
?>
                    </div>
                    <!-- end of sidebar  -->
                    <!-- Start of main  -->	
                    <div class="col-md-12 col-sm-12 col-xs-12 mb30" rel="main">
                        <?php 
get_search_result();
?>
                    </div>	
                    <!-- end of main  -->

                </div> <!--  end row  -->
            </div><!--   end container  -->
        </div>
    </div>
</div>
<?php 
get_footer();