| Server IP : 162.214.74.102 / Your IP : 216.73.217.114 Web Server : Apache System : Linux dedi-4363141.lrsys.com.br 3.10.0-1160.119.1.el7.tuxcare.els25.x86_64 #1 SMP Wed Oct 1 17:37:27 UTC 2025 x86_64 User : lrsys ( 1015) PHP Version : 5.6.40 Disable Function : exec,passthru,shell_exec,system MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/lrsys/www/lrsys_apps/leo/application/plugins/module_imobles/controllers/ |
Upload File : |
<?php
include_once "Controller.php";
include_once __DIR__ . "/../helpers/CrawlerHelper.php";
class ConfigsController extends Controller {
public function __construct($ui, $_L, $config, $_pd, $client_id = null) {
parent::__construct($ui, $_L, $config, $_pd, $client_id);
$this->ui->assign('_title', $this->_L['module imobles config'] . ' - ' . $this->config['CompanyName']);
$this->ui->assign('_st', $_L['module imobles config']);
}
public function index() {
$this->ui->assign('_include', 'configs/list');
$this->ui->display('wrapper.tpl');
}
public function clearCache() {
$js_path = ['/../../../application/plugins/module_imobles/assets/js/clear-cache'];
$asset_js = Asset::js($js_path, date('Y-m-d'));
$this->ui->assign('xfooter', $asset_js);
$this->ui->assign('_include', 'configs/clear_cache');
$this->ui->display('wrapper.tpl');
}
public function clearCachePost() {
if(isset($_POST['cache_url'])) {
$helper = new CrawlerHelper();
$response = $helper->purgeCache([$_POST['cache_url']]);
if($response === true)
{
_notify($this->_L['module_imobles_cache_refresh_success'], 's');
echo 'OK';
}
else
{
$msg = null;
foreach ($response as $erros)
{
if(isset($erros->message)){
$msg .= $erros->message."<br/>";
} else {
$msg .= $erros."<br/>";
}
}
_notify($msg);
echo 'OK';
}
}
}
}