| Server IP : 162.214.74.102 / Your IP : 216.73.216.59 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/imobles/application/plugins/module_imobles/controllers/ |
Upload File : |
<?php
class Controller
{
/** @var $ui */
protected $ui;
/** @var $user */
protected $user;
/** @var array $config */
protected $config;
/** @var array $routes */
protected $routes;
/** @var string $dir */
protected $dir = 'module_helpdesk';
/** @var $_L */
protected $_L;
/** @var array $data */
protected $data;
protected $_pd;
protected $isAdminOrManager = true;
/**
* Controller constructor.
* @param $ui
*/
public function __construct($ui, $_L, $config, $_pd, $client_id = null)
{
$this->ui = $ui;
$this->_L = $_L;
$this->_pd = $_pd;
$this->config = $config;
$this->ui->assign('_application_menu', $this->dir);
$this->client_id = $client_id;
if ($this->client_id != null) {
$d = ORM::for_table('crm_accounts_groups')
->table_alias('c')
->select('c.*');
// ->where('c.gname', 'manager');
// ->where('g.default', 1);
$d->where("crm_accounts_id", $this->client_id);
$crms = $d->find_many();
if (count($crms) == 0) {
$this->isAdminOrManager = false;
}
}
$this->ui->assign('isAdminOrManager', $this->isAdminOrManager);
$this->ui->assign('client_id', $this->client_id);
}
/**
* @return mixed
*/
public function getUi()
{
return $this->ui;
}
/**
* @param mixed $ui
* @return $this
*/
public function setUi($ui)
{
$this->ui = $ui;
return $this;
}
/**
* @return mixed
*/
public function getUser()
{
return $this->user;
}
/**
* @param mixed $user
* @return $this
*/
public function setUser($user)
{
$this->user = $user;
$this->ui->assign('user', $this->user);
return $this;
}
/**
* @return array
*/
public function getConfig()
{
return $this->config;
}
/**
* @param array $config
* @return $this
*/
public function setConfig($config)
{
$this->config = $config;
return $this;
}
/**
* @return array
*/
public function getRoutes()
{
return $this->routes;
}
/**
* @param array $routes
* @return $this
*/
public function setRoutes($routes)
{
$this->routes = $routes;
return $this;
}
/**
* @return string
*/
public function getDir()
{
return $this->dir;
}
/**
* @param string $dir
* @return $this
*/
public function setDir($dir)
{
$this->dir = $dir;
return $this;
}
/**
* @return mixed
*/
public function getL()
{
return $this->_L;
}
/**
* @param mixed $L
* @return $this
*/
public function setL($L)
{
$this->_L = $L;
return $this;
}
}