opensearch.xml.php 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. // Copyright (C) 2010-2012 Combodo SARL
  3. //
  4. // This file is part of iTop.
  5. //
  6. // iTop is free software; you can redistribute it and/or modify
  7. // it under the terms of the GNU Affero General Public License as published by
  8. // the Free Software Foundation, either version 3 of the License, or
  9. // (at your option) any later version.
  10. //
  11. // iTop is distributed in the hope that it will be useful,
  12. // but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. // GNU Affero General Public License for more details.
  15. //
  16. // You should have received a copy of the GNU Affero General Public License
  17. // along with iTop. If not, see <http://www.gnu.org/licenses/>
  18. /**
  19. * ???
  20. *
  21. * @copyright Copyright (C) 2010-2012 Combodo SARL
  22. * @license http://opensource.org/licenses/AGPL-3.0
  23. */
  24. require_once('../approot.inc.php');
  25. require_once(APPROOT.'/application/application.inc.php');
  26. require_once(APPROOT.'/application/startup.inc.php');
  27. $sFullUrl = utils::GetAbsoluteUrlAppRoot().'pages/UI.php';
  28. $sICOFullUrl = utils::GetAbsoluteUrlAppRoot().'/images/iTop-icon.ico';
  29. $sPNGFullUrl = utils::GetAbsoluteUrlAppRoot().'images/iTop-icon.png';
  30. header('Content-type: text/xml');
  31. ?>
  32. <OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
  33. <ShortName>iTop</ShortName>
  34. <Contact>webmaster@itop.com</Contact>
  35. <Description>Search in iTop</Description>
  36. <InputEncoding>UTF-8</InputEncoding>
  37. <Url type="text/html" method="get" template="<?php echo $sFullUrl;?>?text={searchTerms}&amp;operation=full_text"/>
  38. <moz:SearchForm><?php echo $sFullUrl;?></moz:SearchForm>
  39. <Image height="16" width="16" type="image/x-icon"><?php echo $sICOFullUrl;?></Image>
  40. <Image height="64" width="64" type="image/png"><?php echo $sPNGFullUrl;?></Image>
  41. </OpenSearchDescription>