--------------------------------------------------------------------------------
PhpDig Version 1.8.6 is provided WITHOUT warranty under the GNU/GPL license.
See the LICENSE file for more information about the GNU/GPL license.
Contributors are listed in the CREDITS and CHANGELOG files in this package.
Developer from inception to and including PhpDig v.1.6.2: Antoine Bajolet
Developer from PhpDig v.1.6.3 to and including current version: Charter
Copyright (C) 2001 - 2003, Antoine Bajolet, http://www.toiletoine.net/
Copyright (C) 2003 - current, Charter, http://www.phpdig.net/
Contributors hold Copyright (C) to their code submissions.
Do NOT edit or remove this copyright or licence information upon redistribution.
If you modify code and redistribute, you may ADD your copyright to this notice.
--------------------------------------------------------------------------------
*/
/**
==============================================================================
* Dokeos Metadata: search Dokeos course objects via PhpDig 1.8.6
*
* customized search.php 1.8.6 for Dokeos 1.6 assumes $template == "array"
*
* @package dokeos.metadata
==============================================================================
*/
// name of the language file that needs to be included
$language_file = "md_mix";
include('../../../main/inc/global.inc.php');
if (! $is_allowed_in_course) api_not_allowed();
// start of part copied (with some changes) from standard PhpDig search.php
$relative_script_path = '.';
$no_connect = 0;
if (is_file("$relative_script_path/includes/config.php")) {
include "$relative_script_path/includes/config.php";
}
else {
die("Cannot find config.php file.\n");
}
if (is_file("$relative_script_path/libs/search_function.php")) {
include "$relative_script_path/libs/search_function.php";
}
else {
die("Cannot find PhpDig search_function.php file.\n");
}
// extract vars
extract(phpdigHttpVars(
array('query_string'=>'string',
'mdsc'=>'string', 'kwdswere_string'=>'string', // Dokeos
'refine'=>'integer',
'refine_url'=>'string',
'site'=>'string', // set to integer later
'limite'=>'integer',
'option'=>'string',
'lim_start'=>'integer',
'browse'=>'integer',
'path'=>'string'
)
),EXTR_SKIP);
$adlog_flag = 0;
$rssdf = "";
// end of part copied (with some changes) from standard PhpDig search.php
// Course keywords
$_course = api_get_course_info(); $ckw = $_course['path'] . '/CourseKwds.js';
define('KEYWORDS_CACHE', api_get_path(SYS_COURSE_PATH) . $ckw);
if (file_exists(KEYWORDS_CACHE)) $kcdt =
htmlspecialchars(date('Y/m/d H:i:s', filemtime(KEYWORDS_CACHE)));
$keywordscache = $kcdt ?
'' .
'
(CourseKwds cache: ' . $kcdt . ')' : '';
// Dokeos header
$nameTools = get_lang('Search');
$htmlHeadXtra[] = '';
$htmlHeadXtra[] = '';
$htmlHeadXtra[] = '
';
Display::display_header($nameTools); echo "\n";
echo '
', get_lang('Search'), ' | ',
'![]() |
| ', $searchResult['link_title'],
' ', $searchResult['text'], ' |