3 $site = 'http://'.$_SERVER['SERVER_NAME'].str_ireplace('index.php', '', $_SERVER['SCRIPT_NAME']);
4 $file = "cache/wowd.xml";
5 // Create if need open search script for client
6 if (time() - @filemtime
($file) > 24*60*60) // Check for update requirest
8 $open=@fopen
($file, "w");
12 '<?xml version="1.0" encoding="UTF-8" ?>
13 <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
14 <ShortName>C.S. Wowd</ShortName>
15 <Description>Search by use C.S. Wowd</Description>
16 <Url type="text/html" method="GET" template="'.$site.'index.php?s=all&name={searchTerms}" />
17 <Url type="application/x-suggestions+json" method="GET" template="'.$site.'ajax.php?os=all&name={searchTerms}" />
18 <Image width="16" height="16">data:image/x-icon;base64,AAABAAQAICAAAAEACACoCAAARgAAABAQAAABAAgAaAUAAO4IAAAgIBAAAQAEAOgCAABWDgAAEBAQAAEABAAoAQAAPhEAACgAAAAgAAAAQAAAAAEACAAAAAAAgAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACAAACAAAAAgIAAgAAAAIAAgACAgAAAwMDAAMDcwADwyqYA1PD/ALHi/wCO1P8Aa8b/AEi4/wAlqv8AAKr/AACS3AAAerkAAGKWAABKcwAAMlAA1OP/ALHH/wCOq/8Aa4//AEhz/wAlV/8AAFX/AABJ3AAAPbkAADGWAAAlcwAAGVAA1NT/ALGx/wCOjv8Aa2v/AEhI/wAlJf8AAAD+AAAA3AAAALkAAACWAAAAcwAAAFAA49T/AMex/wCrjv8Aj2v/AHNI/wBXJf8AVQD/AEkA3AA9ALkAMQCWACUAcwAZAFAA8NT/AOKx/wDUjv8Axmv/ALhI/wCqJf8AqgD/AJIA3AB6ALkAYgCWAEoAcwAyAFAA/9T/AP+x/wD/jv8A/2v/AP9I/wD/Jf8A/gD+ANwA3AC5ALkAlgCWAHMAcwBQAFAA/9TwAP+x4gD/jtQA/2vGAP9IuAD/JaoA/wCqANwAkgC5AHoAlgBiAHMASgBQADIA/9TjAP+xxwD/jqsA/2uPAP9Ic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AAFiwC4hQAAAAGHAHhQAAAAAIcAeAAAAAEzhwB7ExAAGHEQAAEXMAAYAzMzMwCBAAAAiHeIAAAAAAAAAAAAAAAAAAAAAAAAD//wAA8AcAAOADAADgAwAA4AMAAOADAADgAwAA4AMAAMADAACAAQAAgAEAAIABAACAAQAAkAkAALgdAAD//wAA</Image>
19 <OutputEncoding>UTF-8</OutputEncoding>
20 <InputEncoding>UTF-8</InputEncoding>
21 </OpenSearchDescription>');
24 // Allow add open search in browser add search
25 echo '<link rel="search" type="application/opensearchdescription+xml" href="'.$file.'" title="Wowd">';
26 // Allow simly click on link to add plugin
28 '<script type="text/javascript">
33 window.external.AddSearchProvider(\''.$site.$file.'\');
37 alert(\'This feature requires either Firefox 2 or Internet Explorer 7.\');
41 $langfile = 'module/livesearch/text_'.$config['lang'].'.php';
42 if (file_exists($langfile)) include($langfile);
43 else include('module/livesearch/text_en.php');