2018-07-13 13:25:33 +00:00
|
|
|
<?php
|
|
|
|
/**
|
|
|
|
* Implementation of OpensearchDesc view
|
|
|
|
*
|
|
|
|
* @category DMS
|
|
|
|
* @package SeedDMS
|
|
|
|
* @license GPL 2
|
|
|
|
* @version @version@
|
|
|
|
* @author Uwe Steinmann <uwe@steinmann.cx>
|
|
|
|
* @copyright Copyright (C) 2002-2005 Markus Westphal,
|
|
|
|
* 2006-2008 Malcolm Cowe, 2010 Matteo Lucarelli,
|
|
|
|
* 2010-2012 Uwe Steinmann
|
|
|
|
* @version Release: @package_version@
|
|
|
|
*/
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Include parent class
|
|
|
|
*/
|
2021-04-18 05:08:00 +00:00
|
|
|
//require_once("class.Bootstrap.php");
|
2018-07-13 13:25:33 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Class which outputs the html page for OpensearchDesc view
|
|
|
|
*
|
|
|
|
* @category DMS
|
|
|
|
* @package SeedDMS
|
|
|
|
* @author Uwe Steinmann <uwe@steinmann.cx>
|
|
|
|
* @copyright Copyright (C) 2010-2018 Uwe Steinmann
|
|
|
|
* @version Release: @package_version@
|
|
|
|
*/
|
2021-04-18 05:08:00 +00:00
|
|
|
class SeedDMS_View_OpensearchDesc extends SeedDMS_Theme_Style {
|
2018-07-13 13:25:33 +00:00
|
|
|
|
|
|
|
function show() { /* {{{ */
|
|
|
|
$dms = $this->params['dms'];
|
|
|
|
$sitename = $this->params['sitename'];
|
|
|
|
$settings = $this->params['settings'];
|
|
|
|
|
|
|
|
ob_get_clean();
|
|
|
|
header("Content-Disposition: attachment; filename=\"opensearch_desc.xml\"");
|
|
|
|
header('Content-Type: application/opensearchdescription+xml');
|
|
|
|
?>
|
|
|
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
|
|
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/" xmlns:moz="http://www.mozilla.org/2006/browser/search/">
|
|
|
|
<ShortName><?= $sitename ?></ShortName>
|
|
|
|
<Description><?= $sitename ?></Description>
|
2023-01-06 17:43:18 +00:00
|
|
|
<Image height="16" width="16" type="image/x-icon"><?= "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot ?>views/<?= $this->theme ?>/images/favicon.ico</Image>
|
2018-07-13 13:25:33 +00:00
|
|
|
<Url type="text/html" method="get" template="<?= "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.Search.php?query={searchTerms}" ?>" />
|
2023-01-06 17:43:18 +00:00
|
|
|
<Url type="application/x-suggestions+xml" rel="suggestions" method="get" template="<?= "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.Search.php?action=opensearchsuggestion&query={searchTerms}" ?>" />
|
2018-07-13 13:25:33 +00:00
|
|
|
<moz:SearchForm><?= "http".((isset($_SERVER['HTTPS']) && (strcmp($_SERVER['HTTPS'],'off')!=0)) ? "s" : "")."://".$_SERVER['HTTP_HOST'].$settings->_httpRoot."out/out.Search.php" ?></moz:SearchForm>
|
2020-12-14 06:08:48 +00:00
|
|
|
<OutputEncoding>UTF-8</OutputEncoding>
|
|
|
|
<InputEncoding>UTF-8</InputEncoding>
|
2018-07-13 13:25:33 +00:00
|
|
|
</OpenSearchDescription>
|
|
|
|
<?php
|
|
|
|
} /* }}} */
|
|
|
|
|
|
|
|
}
|