[mod_search] в нужном месте вашего шаблона сайта.'; $modul['ModuleAutor'] = 'AVE.CMS Team'; $modul['ModuleCopyright'] = '© 2007-2016 AVE.CMS'; $modul['ModuleIsFunction'] = 1; $modul['ModuleTemplate'] = 1; $modul['ModuleAdminEdit'] = 1; $modul['ModuleFunction'] = 'mod_search'; $modul['ModuleTag'] = '[mod_search]'; $modul['ModuleTagLink'] = null; $modul['ModuleAveTag'] = '#\\\[mod_search]#'; $modul['ModulePHPTag'] = ''; } function mod_search() { global $AVE_Template; if (isset($_REQUEST['module']) && $_REQUEST['module'] == 'search') $AVE_Template->assign('hide', 1); $AVE_Template->display(BASE_DIR . '/modules/search/templates/form.tpl'); } if (!defined('ACP') && (isset($_REQUEST['module']) && $_REQUEST['module'] == 'search')) { global $stemmer; if (! @require_once(BASE_DIR . '/modules/search/class.search.php')) module_error(); if (! @require_once(BASE_DIR . '/modules/search/class.porter.php')) module_error(); $tpl_dir = BASE_DIR . '/modules/search/templates/'; $lang_file = BASE_DIR . '/modules/search/lang/' . $_SESSION['user_language'] . '.txt'; $search = new Search; $stemmer = new Lingua_Stem_Ru(); $search->searchResultGet($tpl_dir, $lang_file); } if (defined('ACP') && !empty($_REQUEST['moduleaction'])) { if (! (is_file(BASE_DIR . '/modules/search/class.search.php') && @require_once(BASE_DIR . '/modules/search/class.search.php'))) module_error(); $tpl_dir = BASE_DIR .'/modules/search/templates/'; $lang_file = BASE_DIR .'/modules/search/lang/' . $_SESSION['admin_language'] . '.txt'; $search = new Search; $AVE_Template->config_load($lang_file); switch ($_REQUEST['moduleaction']) { case '1': $search->searchWordsShow($tpl_dir); break; case 'delwords': $search->searchWordsDelete(); break; } } ?>