opensearch.xml.php 1.2 KB

12345678910111213141516
  1. <?php
  2. $sFullUrl = 'http'.(empty($_SERVER['HTTPS']) ? '' : 's').'://'.$_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'].dirname($_SERVER['SCRIPT_NAME']).'/UI.php';
  3. $sICOFullUrl = 'http'.(empty($_SERVER['HTTPS']) ? '' : 's').'://'.$_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'].dirname($_SERVER['SCRIPT_NAME']).'/../images/iTop-icon.ico';
  4. $sPNGFullUrl = 'http'.(empty($_SERVER['HTTPS']) ? '' : 's').'://'.$_SERVER['SERVER_NAME'].':'.$_SERVER['SERVER_PORT'].dirname($_SERVER['SCRIPT_NAME']).'/../images/iTop-icon.png';
  5. header('Content-type: text/xml');
  6. ?>
  7. <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
  8. <ShortName>iTop</ShortName>
  9. <Contact>webmaster@itop.com</Contact>
  10. <Description>Search in iTop</Description>
  11. <InputEncoding>ISO-8859-1</InputEncoding>
  12. <Url type="text/html" method="get" template="<?php echo $sFullUrl;?>?text={searchTerms}&amp;operation=full_text"/>
  13. <moz:SearchForm><?php echo $sFullUrl;?></moz:SearchForm>
  14. <Image height="16" width="16" type="image/x-icon"><?php echo $sICOFullUrl;?></Image>
  15. <Image height="64" width="64" type="image/png"><?php echo $sPNGFullUrl;?></Image>
  16. </OpenSearchDescription>