1
0
mirror of https://github.com/e107inc/e107.git synced 2025-01-17 20:58:30 +01:00
php-e107/e107_handlers/search/search_pages.php

47 lines
1.3 KiB
PHP
Raw Normal View History

2006-12-02 04:36:16 +00:00
<?php
/*
2009-11-12 15:11:17 +00:00
* e107 website system
*
2012-02-24 13:22:29 +00:00
* Copyright (C) 2008-2012 e107 Inc (e107.org)
2009-11-12 15:11:17 +00:00
* Released under the terms and conditions of the
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
2012-02-24 13:22:29 +00:00
* $URL$
* $Id$
2009-11-12 15:11:17 +00:00
*/
2006-12-02 04:36:16 +00:00
if (!defined('e107_INIT')) { exit; }
// advanced
/*
2006-12-02 04:36:16 +00:00
$advanced_where = "";
if (isset($_GET['time']) && is_numeric($_GET['time'])) {
$advanced_where .= " page_datestamp ".($_GET['on'] == 'new' ? '>=' : '<=')." '".(time() - $_GET['time'])."' AND";
}
// basic
2012-02-24 13:22:29 +00:00
$return_fields = 'page_id, page_title, page_sef, page_text, page_datestamp';
2006-12-02 04:36:16 +00:00
$search_fields = array('page_title', 'page_text');
$weights = array('1.2', '0.6');
$no_results = LAN_198;
2013-03-09 14:53:01 -08:00
$where = "page_class IN (".USERCLASS_LIST.") AND `menu_name` = '' AND".$advanced_where;
2006-12-02 04:36:16 +00:00
$order = array('page_datestamp' => DESC);
$table = "page";
$ps = $sch -> parsesearch($table, $return_fields, $search_fields, $weights, 'search_pages', $no_results, $where, $order);
$text .= $ps['text'];
$results = $ps['results'];
function search_pages($row) {
global $con;
2012-02-24 13:22:29 +00:00
$res['link'] = e107::getUrl()->create('page/view', $row, array('allow' => 'page_sef,page_title,page_id'));//"page.php?".$row['page_id'];
2006-12-02 04:36:16 +00:00
$res['pre_title'] = "";
$res['title'] = $row['page_title'];
$res['summary'] = $row['page_text'];
$res['detail'] = LAN_SEARCH_3.$con -> convert_date($row['page_datestamp'], "long");
return $res;
}
*/
2006-12-02 04:36:16 +00:00
?>