⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.19
Server IP:
41.128.143.86
Server:
Linux host.raqmix.cloud 6.8.0-1025-azure #30~22.04.1-Ubuntu SMP Wed Mar 12 15:28:20 UTC 2025 x86_64
Server Software:
Apache
PHP Version:
8.3.23
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
usr
/
share
/
psa-pear
/
pear
/
php
/
Horde
/
Form
/
Action
/
View File Name :
ConditionalSetValue.php
* @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL * @package Form */ /** * Horde_Form_Action_ConditionalSetValue is a Horde_Form_Action that * sets the value of one Horde_Form variable based on the value of the * variable the action is attached to. * * @author Chuck Hagenbuch
* @category Horde * @copyright 2002-2017 Horde LLC * @license http://www.horde.org/licenses/lgpl21 LGPL * @package Form */ class Horde_Form_Action_ConditionalSetValue extends Horde_Form_Action { /** * Which JS events should trigger this action? * * @var array */ var $_trigger = array('onchange', 'onload'); function getActionScript($form, $renderer, $varname) { return 'map(\'' . $renderer->_genID($varname, false) . "', '" . $renderer->_genID($this->getTarget(), false) . '\');'; } function setValues(&$vars, $sourceVal, $arrayVal = false) { $map = $this->_params['map']; $target = $this->getTarget(); if ($arrayVal) { $i = 0; if (is_array($sourceVal)) { foreach ($sourceVal as $val) { if (!empty($map[$val])) { $vars->set($target, $map[$val], $i); } $i++; } } } else { if (!empty($map[$sourceVal])) { $vars->set($target, $map[$sourceVal]); } } } function printJavaScript() { $this->_printJavaScriptStart(); $map = $this->_params['map']; ?> var _map = [ 0) { echo ', '; } echo '"' . $val . '"'; $i++; }?>]; function map(sourceId, targetId) { var newval; var source = document.getElementById(sourceId); var element = document.getElementById(targetId); if (element) { if (_map[source.selectedIndex]) { newval = _map[source.selectedIndex]; replace = true; } else { newval = ''; replace = false; for (i = 0; i < _map.length; i++) { if (element.value == _map[i]) { replace = true; break; } } } if (replace) { element.value = newval; } } }_printJavaScriptEnd(); } }