This repository has been archived by the owner on Oct 7, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 27
/
opensearch.php
39 lines (36 loc) · 1.94 KB
/
opensearch.php
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
<?php
//-------------------------------------------------------------------------//
// Nuked-KlaN - PHP Portal //
// http://www.nuked-klan.org //
//-------------------------------------------------------------------------//
// This program is free software. you can redistribute it and/or modify //
// it under the terms of the GNU General Public License as published by //
// the Free Software Foundation; either version 2 of the License. //
//-------------------------------------------------------------------------//
header('Content-type: text/html; charset=iso-8859-1');
define ('INDEX_CHECK', 1);
ini_set('default_charset', 'ISO8859-1');
include('globals.php');
include('conf.inc.php');
include('nuked.php');
include('Includes/constants.php');
$sitename = utf8_encode($nuked['name']);
$sitedesc = utf8_encode($nuked['slogan']);
$sitename = nkHtmlEntityDecode($nuked['name']);
$sitedesc = nkHtmlEntityDecode($nuked['slogan']);
$sitename = str_replace('&', '&', $sitename);
$sitedesc = str_replace('&', '&', $sitedesc);
$sitename = nkHtmlSpecialChars($sitename);
$sitedesc = nkHtmlSpecialChars($sitedesc);
echo '<?xml version="1.0" ?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
<ShortName>' . $sitename . '</ShortName>
<Description>' . $sitedesc . '</Description>
<Url type="text/html" method="get" template="' . $nuked['url'] . '/index.php?file=Search&op=mod_search&main={searchTerms}"/>
<Image width="16" height="16">' . $nuked['url'] . '/images/favicon.ico</Image>
<InputEncoding>ISO-8859-1</InputEncoding>
<moz:SearchForm></moz:SearchForm>
<Url type="application/opensearchdescription+xml" rel="self" template="http://mycroft.mozdev.org/updateos.php/id0/.xml"/>
<moz:UpdateUrl>http://mycroft.mozdev.org/updateos.php/id0/.xml</moz:UpdateUrl>
</OpenSearchDescription>';
?>