grthtrhthjhtyjytjytkergtrhtrjytjerhrfh4:24 29/09/2026module = $module;
$this->is_owner = $is_owner;
$this->form = $form;
}
/**
* @deprecated deprecated since version 7.6, PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code, use __construct instead
*/
public function ACLJSController($module, $form='', $is_owner=false)
{
$deprecatedMessage = 'PHP4 Style Constructors are deprecated and will be remove in 7.8, please update your code';
if (isset($GLOBALS['log'])) {
$GLOBALS['log']->deprecated($deprecatedMessage);
} else {
trigger_error($deprecatedMessage, E_USER_DEPRECATED);
}
self::__construct($module, $form, $is_owner);
}
public function getJavascript()
{
global $action;
if (!ACLController::moduleSupportsACL($this->module)) {
return '';
}
$script = "';
return $script;
}
public function getHTMLValues($def)
{
$return_array = array();
switch ($def['display_option']) {
case 'clear_link':
$return_array['href']= "#";
$return_array['className']= "nolink";
break;
default:
$return_array[$def['display_option']] = $def['display_option'];
break;
}
return $return_array;
}
public function getFieldByIdScript($name, $def)
{
$script = '';
if (!ACLController::checkAccess($def['module'], $def['action_option'], true)) {
foreach ($this->getHTMLValues($def) as $key=>$value) {
$script .= "\nif(document.getElementById('$name'))document.getElementById('$name')." . $key . '="' .$value. '";'. "\n";
}
}
return $script;
}
public function getFieldByNameScript($name, $def)
{
$script = '';
if (!ACLController::checkAccess($def['module'], $def['action_option'], true)) {
foreach ($this->getHTMLValues($def) as $key=>$value) {
$script .= <<getHTMLValues($def) as $key=>$value) {
$script .= "\nif(typeof(document.$form.$name.$key) != 'undefined')\n document.$form.$name.".$key . '="' .$value. '";';
}
}
return $script;
}
}