File: ExternalHtmlSearchRenderer.class.php

package info (click to toggle)
fusionforge 5.3.2%2B20141104-3
  • links: PTS, VCS
  • area: main
  • in suites: jessie-kfreebsd
  • size: 60,472 kB
  • sloc: php: 271,846; sql: 36,817; python: 14,575; perl: 6,406; sh: 5,980; xml: 4,294; pascal: 1,411; makefile: 911; cpp: 52; awk: 27
file content (44 lines) | stat: -rw-r--r-- 741 bytes parent folder | download | duplicates (3)
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();
	}
}