1
0
mirror of https://github.com/e107inc/e107.git synced 2025-07-31 20:00:37 +02:00

new module creation

This commit is contained in:
mcfly
2006-12-02 04:36:16 +00:00
commit e149b35fcc
2196 changed files with 182987 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/search/advanced_comment.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:34:04 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
if (!defined('e107_INIT')) { exit; }
$advanced['type']['type'] = 'dropdown';
$advanced['type']['text'] = LAN_SEARCH_57.':';
$advanced['type']['list'][] = array('id' => 'all', 'title' => LAN_SEARCH_58);
$advanced_caption['id'] = 'type';
$advanced_caption['title']['all'] = LAN_SEARCH_59;
foreach ($search_prefs['comments_handlers'] as $h_key => $value) {
if (check_class($value['class'])) {
$path = ($value['dir'] == 'core') ? e_HANDLER.'search/comments_'.$h_key.'.php' : e_PLUGIN.$value['dir'].'/search/search_comments.php';
require_once($path);
$advanced['type']['list'][] = array('id' => 's_'.$value['id'], 'title' => $comments_title);
$advanced_caption['title']['s_'.$value['id']] = LAN_SEARCH_60.' '.$comments_title;
}
}
$advanced['date']['type'] = 'date';
$advanced['date']['text'] = LAN_SEARCH_50.':';
$advanced['author']['type'] = 'author';
$advanced['author']['text'] = LAN_SEARCH_61.':';
?>

View File

@@ -0,0 +1,47 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/search/advanced_download.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:34:04 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
if (!defined('e107_INIT')) { exit; }
$advanced['cat']['type'] = 'dropdown';
$advanced['cat']['text'] = LAN_SEARCH_63.':';
$advanced['cat']['list'][] = array('id' => 'all', 'title' => LAN_SEARCH_51);
$advanced_caption['id'] = 'cat';
$advanced_caption['title']['all'] = LAN_SEARCH_64;
if ($sql -> db_Select_gen("SELECT download_category_id, download_category_name FROM #download_category WHERE download_category_parent != 0 AND download_category_class IN (".USERCLASS_LIST.")")) {
while ($row = $sql -> db_Fetch()) {
$advanced['cat']['list'][] = array('id' => $row['download_category_id'], 'title' => $row['download_category_name']);
$advanced_caption['title'][$row['download_category_id']] = LAN_SEARCH_65.' -> '.$row['download_category_name'];
}
}
$advanced['date']['type'] = 'date';
$advanced['date']['text'] = LAN_SEARCH_66.':';
$advanced['author']['type'] = 'author';
$advanced['author']['text'] = LAN_SEARCH_61.':';
$advanced['match']['type'] = 'dropdown';
$advanced['match']['text'] = LAN_SEARCH_52.':';
$advanced['match']['list'][] = array('id' => 0, 'title' => LAN_SEARCH_67);
$advanced['match']['list'][] = array('id' => 1, 'title' => LAN_SEARCH_54);
?>

View File

@@ -0,0 +1,44 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/search/advanced_news.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:34:04 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
if (!defined('e107_INIT')) { exit; }
$advanced['cat']['type'] = 'dropdown';
$advanced['cat']['text'] = LAN_SEARCH_55.':';
$advanced['cat']['list'][] = array('id' => 'all', 'title' => LAN_SEARCH_51);
$advanced_caption['id'] = 'cat';
$advanced_caption['title']['all'] = LAN_SEARCH_56;
if ($sql -> db_Select("news_category", "category_id, category_name")) {
while($row = $sql -> db_Fetch()) {
$advanced['cat']['list'][] = array('id' => $row['category_id'], 'title' => $row['category_name']);
$advanced_caption['title'][$row['category_id']] = 'News -> '.$row['category_name'];
}
}
$advanced['date']['type'] = 'date';
$advanced['date']['text'] = LAN_SEARCH_50.':';
$advanced['match']['type'] = 'dropdown';
$advanced['match']['text'] = LAN_SEARCH_52.':';
$advanced['match']['list'][] = array('id' => 0, 'title' => LAN_SEARCH_53);
$advanced['match']['list'][] = array('id' => 1, 'title' => LAN_SEARCH_54);
?>

View File

@@ -0,0 +1,25 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/search/advanced_pages.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:34:04 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
if (!defined('e107_INIT')) { exit; }
$advanced['date']['type'] = 'date';
$advanced['date']['text'] = LAN_SEARCH_68.':';
?>

View File

@@ -0,0 +1,25 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/search/advanced_user.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:34:04 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
if (!defined('e107_INIT')) { exit; }
$advanced['date']['type'] = 'date';
$advanced['date']['text'] = LAN_SEARCH_62.':';
?>

View File

@@ -0,0 +1,38 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/search/comments_download.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:34:04 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
if (!defined('e107_INIT')) { exit; }
$comments_title = LAN_197;
$comments_type_id = '2';
$comments_return['download'] = "d.download_id, d.download_name";
$comments_table['download'] = "LEFT JOIN #download AS d ON c.comment_type=2 AND d.download_id = c.comment_item_id";
function com_search_2($row) {
global $con;
$datestamp = $con -> convert_date($row['comment_datestamp'], "long");
$res['link'] = "download.php?view.".$row['download_id'];
$res['pre_title'] = $row['download_name'] ? LAN_SEARCH_70.": " : "";
$res['title'] = $row['download_name'] ? $row['download_name'] : LAN_SEARCH_9;
$res['summary'] = $row['comment_comment'];
preg_match("/([0-9]+)\.(.*)/", $row['comment_author'], $user);
$res['detail'] = LAN_SEARCH_7."<a href='user.php?id.".$user[1]."'>".$user[2]."</a>".LAN_SEARCH_8.$datestamp;
return $res;
}
?>

View File

@@ -0,0 +1,38 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/search/comments_news.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:34:05 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
if (!defined('e107_INIT')) { exit; }
$comments_title = LAN_98;
$comments_type_id = 0;
$comments_return['news'] = "n.news_title";
$comments_table['news'] = "LEFT JOIN #news AS n ON c.comment_type=0 AND n.news_id = c.comment_item_id";
function com_search_0($row) {
global $con;
$datestamp = $con -> convert_date($row['comment_datestamp'], "long");
$res['link'] = "comment.php?comment.news.".$row['comment_item_id'];
$res['pre_title'] = $row['news_title'] ? LAN_SEARCH_71.": " : "";
$res['title'] = $row['news_title'] ? $row['news_title'] : LAN_SEARCH_9;
$res['summary'] = $row['comment_comment'];
preg_match("/([0-9]+)\.(.*)/", $row['comment_author'], $user);
$res['detail'] = LAN_SEARCH_7."<a href='user.php?id.".$user[1]."'>".$user[2]."</a>".LAN_SEARCH_8.$datestamp;
return $res;
}
?>

View File

@@ -0,0 +1,38 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/search/comments_page.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:34:05 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
if (!defined('e107_INIT')) { exit; }
$comments_title = LAN_418;
$comments_type_id = 'page';
$comments_return['page'] = "cp.page_id, cp.page_title";
$comments_table['page'] = "LEFT JOIN #page AS cp ON c.comment_type='page' AND cp.page_id = c.comment_item_id";
function com_search_page($row) {
global $con;
$datestamp = $con -> convert_date($row['comment_datestamp'], "long");
$res['link'] = "page.php?".$row['page_id'];
$res['pre_title'] = LAN_SEARCH_76.": ";
$res['title'] = $row['page_title'];
$res['summary'] = $row['comment_comment'];
preg_match("/([0-9]+)\.(.*)/", $row['comment_author'], $user);
$res['detail'] = LAN_SEARCH_7."<a href='user.php?id.".$user[1]."'>".$user[2]."</a>".LAN_SEARCH_8.$datestamp;
return $res;
}
?>

View File

@@ -0,0 +1,38 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/search/comments_user.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:34:05 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
if (!defined('e107_INIT')) { exit; }
$comments_title = LAN_98;
$comments_type_id = 'profile';
$comments_return['user'] = "u.user_name";
$comments_table['user'] = "LEFT JOIN #user AS u ON c.comment_type='profile' AND u.user_id = c.comment_item_id";
function com_search_profile($row) {
global $con;
$datestamp = $con -> convert_date($row['comment_datestamp'], "long");
$res['link'] = "user.php?id.".$row['comment_item_id'];
$res['pre_title'] = LAN_SEARCH_77.": ";
$res['title'] = $row['user_name'];
$res['summary'] = $row['comment_comment'];
preg_match("/([0-9]+)\.(.*)/", $row['comment_author'], $user);
$res['detail'] = LAN_SEARCH_7."<a href='user.php?id.".$user[1]."'>".$user[2]."</a>".LAN_SEARCH_8.$datestamp;
return $res;
}
?>

View File

View File

@@ -0,0 +1,70 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/search/search_comment.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:34:05 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
if (!defined('e107_INIT')) { exit; }
// advanced
$advanced_where = "";
if (isset($_GET['type']) && $_GET['type'] != 'all') {
$advanced_where .= " c.comment_type='".(str_replace('s_', '', $tp -> toDB($_GET['type'])))."' AND";
}
if (isset($_GET['time']) && is_numeric($_GET['time'])) {
$advanced_where .= " c.comment_datestamp ".($_GET['on'] == 'new' ? '>=' : '<=')." '".(time() - $_GET['time'])."' AND";
}
if (isset($_GET['author']) && $_GET['author'] != '') {
$advanced_where .= " c.comment_author LIKE '%".$tp -> toDB($_GET['author'])."%' AND";
}
//basic
$return_fields = 'c.comment_item_id, c.comment_author, c.comment_datestamp, c.comment_comment, c.comment_type';
foreach ($search_prefs['comments_handlers'] as $h_key => $value) {
if (check_class($value['class'])) {
$path = ($value['dir'] == 'core') ? e_HANDLER.'search/comments_'.$h_key.'.php' : e_PLUGIN.$value['dir'].'/search/search_comments.php';
if (is_readable($path)) {
require_once($path);
$in[] = "'".$value['id']."'";
$join[] = $comments_table[$h_key];
$return_fields .= ', '.$comments_return[$h_key];
}
}
}
$search_fields = array('c.comment_comment', 'c.comment_author');
$weights = array('1.2', '0.6');
$no_results = LAN_198;
$where = "comment_type IN (".implode(',', $in).") AND".$advanced_where;
$order = array('comment_datestamp' => DESC);
$table = "comments AS c ".implode(' ', $join);
$ps = $sch -> parsesearch($table, $return_fields, $search_fields, $weights, 'search_comment', $no_results, $where, $order);
$text .= $ps['text'];
$results = $ps['results'];
function search_comment($row) {
if (is_callable('com_search_'.$row['comment_type'])) {
$res = call_user_func('com_search_'.$row['comment_type'], $row);
return $res;
}
}
?>

View File

@@ -0,0 +1,66 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/search/search_download.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:34:05 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
if (!defined('e107_INIT')) { exit; }
// advanced
$advanced_where = "";
if (isset($_GET['cat']) && is_numeric($_GET['cat'])) {
$advanced_where .= " d.download_category='".$_GET['cat']."' AND";
}
if (isset($_GET['time']) && is_numeric($_GET['time'])) {
$advanced_where .= " d.download_datestamp ".($_GET['on'] == 'new' ? '>=' : '<=')." '".(time() - $_GET['time'])."' AND";
}
if (isset($_GET['author']) && $_GET['author'] != '') {
$advanced_where .= " (d.download_author = '".$tp -> toDB($_GET['author'])."') AND";
}
if (isset($_GET['match']) && $_GET['match']) {
$search_fields = array('d.download_name');
} else {
$search_fields = array('d.download_name', 'd.download_url', 'd.download_description', 'd.download_author', 'd.download_author_website');
}
// basic
$return_fields = 'd.download_id, d.download_category, download_category_id, d.download_name, d.download_description, d.download_author, d.download_author_website, d.download_datestamp, d.download_class, c.download_category_name, c.download_category_class';
$weights = array('1.2', '0.9', '0.6', '0.6', '0.4');
$no_results = LAN_198;
$where = "download_active = '1' AND d.download_visible IN (".USERCLASS_LIST.") AND c.download_category_class IN (".USERCLASS_LIST.") AND".$advanced_where;
$order = array('download_datestamp' => DESC);
$table = "download AS d LEFT JOIN #download_category AS c ON d.download_category = c.download_category_id";
$ps = $sch -> parsesearch($table, $return_fields, $search_fields, $weights, 'search_downloads', $no_results, $where, $order);
$text .= $ps['text'];
$results = $ps['results'];
function search_downloads($row) {
global $con;
$datestamp = $con -> convert_date($row['download_datestamp'], "long");
$res['link'] = "download.php?view.".$row['download_id'];
$res['pre_title'] = $row['download_category_name']." | ";
$res['title'] = $row['download_name'];
$res['pre_summary'] = "<div class='smalltext'><a href='download.php'>".LAN_197."</a> -> <a href='download.php?list.".$row['download_category_id']."'>".$row['download_category_name']."</a></div>";
$res['summary'] = $row['download_description'];
$res['detail'] = LAN_SEARCH_15." ".$row['download_author']." | ".LAN_SEARCH_66.": ".$datestamp;
return $res;
}
?>

View File

@@ -0,0 +1,66 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/search/search_event.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:34:05 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
if (!defined('e107_INIT')) { exit; }
$query = $tp -> toDB($query);
$results = $sql->db_Select("event", "*", "event_stake REGEXP('".$query."') OR event_ward REGEXP('".$query."') OR event_organisation REGEXP('".$query."') OR event_title REGEXP('".$query."')
OR event_location REGEXP('".$query."') OR event_details REGEXP('".$query."') OR event_thread REGEXP('".$query."') ");
while (list($event_id, $event_stake, $event_ward, $event_organisation, $event_start, $event_end, $event_allday, , , $event_title, $event_location, $event_details, $event_author, $event_contact, $event_category, $event_url ) = $sql->db_Fetch()) {
$sql2->db_select("event_cat", "event_cat_name, event_cat_icon", "event_cat_id='".$event_category."' ");
list($event_cat_name, $event_cat_icon ) = $sql2->db_Fetch();
$event_stake_ = parsesearch($event_stake, $query);
if (!$event_stake_) {
$event_stake_ = $event_stake;
}
$event_ward_ = parsesearch($event_ward, $query);
if (!$event_ward_) {
$event_ward_ = $event_ward;
}
$event_organisation_ = parsesearch($event_organisation, $query);
if (!$event_organisation_) {
$event_organisation_ = $event_organisation;
}
$event_title_ = parsesearch($event_title, $query);
if (!$event_title_) {
$event_title_ = $event_title;
}
$event_details_ = parsesearch($event_details, $query);
if (!$event_details_) {
$event_details_ = $event_details;
}
$event_cat_name_ = parsesearch($event_cat_name, $query);
if (!$event_cat_name_) {
$event_cat_name_ = $event_cat_name;
}
$event_threat_ = parsesearch($event_threat, $query);
if (!$event_url_) {
$event_threat_ = $event_threat;
}
$text .= "<img src='".THEME_ABS."images/bullet2.gif' alt='bullet' /> <a href=\"event.php?".$event_start."\">{$event_title}</a>{$event_details}<br />";
}
$qtype = LAN_911;
?>

View File

@@ -0,0 +1,62 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/search/search_news.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:34:05 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
if (!defined('e107_INIT')) { exit; }
// advanced
$advanced_where = "";
if (isset($_GET['cat']) && $_GET['cat'] != 'all') {
$advanced_where .= " c.category_id='".intval($_GET['cat'])."' AND";
}
if (isset($_GET['time']) && is_numeric($_GET['time'])) {
$advanced_where .= " n.news_datestamp ".($_GET['on'] == 'new' ? '>=' : '<=')." '".(time() - $_GET['time'])."' AND";
}
if (isset($_GET['match']) && $_GET['match']) {
$search_fields = array('news_title');
} else {
$search_fields = array('news_title', 'news_body', 'news_extended');
}
// basic
$return_fields = 'n.news_id, n.news_title, n.news_body, n.news_extended, n.news_allow_comments, n.news_datestamp, n.news_category, c.category_name';
$weights = array('1.2', '0.6', '0.6');
$no_results = LAN_198;
$time = time();
$where = "(news_start < ".$time.") AND (news_end=0 OR news_end > ".$time.") AND news_class IN (".USERCLASS_LIST.") AND".$advanced_where;
$order = array('news_datestamp' => DESC);
$table = "news AS n LEFT JOIN #news_category AS c ON n.news_category = c.category_id";
$ps = $sch -> parsesearch($table, $return_fields, $search_fields, $weights, 'search_news', $no_results, $where, $order);
$text .= $ps['text'];
$results = $ps['results'];
function search_news($row) {
global $con;
$res['link'] = $row['news_allow_comments'] ? "news.php?item.".$row['news_id'] : "comment.php?comment.news.".$row['news_id'];
$res['pre_title'] = $row['category_name']." | ";
$res['title'] = $row['news_title'];
$res['summary'] = $row['news_body'].' '.$row['news_extended'];
$res['detail'] = LAN_SEARCH_3.$con -> convert_date($row['news_datestamp'], "long");
return $res;
}
?>

View File

@@ -0,0 +1,52 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/search/search_pages.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:34:05 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
if (!defined('e107_INIT')) { exit; }
// advanced
$advanced_where = "";
if (isset($_GET['time']) && is_numeric($_GET['time'])) {
$advanced_where .= " page_datestamp ".($_GET['on'] == 'new' ? '>=' : '<=')." '".(time() - $_GET['time'])."' AND";
}
// basic
$return_fields = 'page_id, page_title, page_text, page_datestamp';
$search_fields = array('page_title', 'page_text');
$weights = array('1.2', '0.6');
$no_results = LAN_198;
$where = "page_class IN (".USERCLASS_LIST.") AND".$advanced_where;
$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;
$res['link'] = "page.php?".$row['page_id'];
$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;
}
?>

View File

@@ -0,0 +1,50 @@
<?php
/*
+ ----------------------------------------------------------------------------+
| e107 website system
|
| <20>Steve Dunstan 2001-2002
| http://e107.org
| jalist@e107.org
|
| Released under the terms and conditions of the
| GNU General Public License (http://gnu.org).
|
| $Source: /cvs_backup/e107_0.8/e107_handlers/search/search_user.php,v $
| $Revision: 1.1.1.1 $
| $Date: 2006-12-02 04:34:05 $
| $Author: mcfly_e107 $
+----------------------------------------------------------------------------+
*/
if (!defined('e107_INIT')) { exit; }
// advanced
$advanced_where = "";
if (isset($_GET['time']) && is_numeric($_GET['time'])) {
$advanced_where .= " user_join ".($_GET['on'] == 'new' ? '>=' : '<=')." '".(time() - $_GET['time'])."' AND";
}
// basic
$return_fields = 'user_id, user_name, user_email, user_signature, user_join';
$search_fields = array('user_name', 'user_email', 'user_signature');
$weights = array('1.2', '0.6', '0.6', '0.6', '0.6');
$no_results = LAN_198;
$where = $advanced_where;
$order = array('user_join' => DESC);
$ps = $sch -> parsesearch('user', $return_fields, $search_fields, $weights, 'search_user', $no_results, $where, $order);
$text .= $ps['text'];
$results = $ps['results'];
function search_user($row) {
global $con;
$res['link'] = "user.php?id.".$row['user_id'];
$res['pre_title'] = $row['user_id']." | ";
$res['title'] = $row['user_name'];
$res['summary'] = $row['user_signature'] ? LAN_SEARCH_72.": ".$row['user_signature'] : LAN_SEARCH_73;
$res['detail'] = LAN_SEARCH_74.": ".$con -> convert_date($row['user_join'], "long");
return $res;
}
?>