- Created restricted.tpl for displaying restricted access messages with customizable background options. - Added index.php files in hook and main template directories to prevent direct access and ensure proper redirection. - Implemented info.tpl to provide module information and support links, enhancing user experience with promotional content. - Included necessary CSS styles for the new templates to ensure proper layout and responsiveness.
36 lines
993 B
PHP
36 lines
993 B
PHP
<?php
|
|
/**
|
|
* DISCLAIMER.
|
|
*
|
|
* Do not edit or add to this file.
|
|
* You are not authorized to modify, copy or redistribute this file.
|
|
* Permissions are reserved by FME Modules.
|
|
*
|
|
* @author FMM Modules
|
|
* @copyright FME Modules 2021
|
|
* @license Single domain
|
|
*/
|
|
if (!defined('_PS_VERSION_')) {
|
|
exit;
|
|
}
|
|
class AdminPrivatePagesController extends ModuleAdminController
|
|
{
|
|
public function init()
|
|
{
|
|
parent::init();
|
|
if (!$this->ajax) {
|
|
Tools::redirectAdmin(Context::getContext()->link->getAdminLink('AdminModules') . '&configure=' . $this->module->name);
|
|
}
|
|
}
|
|
|
|
public function ajaxProcessGetProducts()
|
|
{
|
|
$query = Tools::replaceAccentedChars(urldecode(Tools::getValue('q')));
|
|
$searchResults = '';
|
|
if (!empty($query) && $query) {
|
|
$searchResults = Search::find((int) Tools::getValue('id_lang'), $query, 1, 10, 'position', 'desc', true);
|
|
}
|
|
exit(json_encode($searchResults));
|
|
}
|
|
}
|