<?php

/*
 * @name        JMY CMS
 * @link        https://jmy.su/
 * @copyright   Copyright (C) 2012-2025 JMY LTD
 * @license     LICENSE.txt (see attached file)
 * @version     VERSION.txt (see attached file)
 * @author      Komarov Ivan
 * @edited      Orlov Alexsey
 */

if (!defined('ACCESS')) {
    header('Location: /');
    exit;
}
loadConfigBLOCK('search');
global $core, $lang, $search_conf;
$core->loadblockLang('search');
if ($search_conf['on']) {
    if ($search_conf['old']) {
        echo '<form role="search" method="post" name="search_form" class="search-form" action="search">
   <label>
   <span class="screen-reader-text">' . $lang['search'] . ':</span>
   <input type="text" class="search-field" placeholder="' . $lang['search'] . ' …" value="" name="query" title="' . $lang['search'] . ':">
   </label>
   <input type="submit" class="search-submit" value="' . $lang['search'] . '">
</form>';
    } else {
        $core->tpl->loadFile('blocks/search');
        $core->tpl->end();
    }
} else {
    if ($search_conf['info_off']) $core->tpl->info($lang['search_off']);
}