1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44
|
<?php
/**
* External search plugin
*
* Copyright 2004 (c) Guillaume Smet
*
* http://gforge.org
*
*/
require_once $gfwww.'search/include/renderers/SearchRenderer.class.php';
class ExternalHtmlSearchRenderer extends SearchRenderer {
/**
* name of the external site
*
* @var string $name
*/
var $name;
/**
* url of the external site
*
* @var string $url
*/
var $url;
/**
* Constructor
*
* @param string $words words we are searching for
*/
function ExternalHtmlSearchRenderer($type, $name, $url, $words) {
$this->name = $name;
$this->url = $url;
$this->SearchRenderer($type, $words, true, false);
}
function flush() {
header('Location: '.$this->url.urlencode($this->query['words']));
exit();
}
}
|