⚝
One Hat Cyber Team
⚝
Your IP:
216.73.217.4
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-horde
/
turba
/
lib
/
Form
/
View File Name :
ContactBase.php
driver->map; $fields = array_keys($contact->driver->getCriteria()); foreach ($fields as $field) { if (is_array($map[$field])) { foreach ($map[$field]['fields'] as $action_field) { if (!isset($actions[$action_field])) { $actions[$action_field] = array(); } $actions[$action_field]['fields'] = $map[$field]['fields']; $actions[$action_field]['format'] = $map[$field]['format']; $actions[$action_field]['target'] = $field; } } } // Now run through and add the form variables. $tabs = $contact->driver->tabs; if (!count($tabs)) { $tabs = array('' => $fields); } $i = 0; foreach ($tabs as $tab => $tab_fields) { if (!empty($tab)) { if ($useTabs) { $this->setSection($i++, $tab); } else { $this->addVariable($tab, '', 'header', false); } } foreach ($tab_fields as $field) { if (!in_array($field, $fields) || !isset($attributes[$field])) { continue; } $attribute = $attributes[$field]; $params = isset($attribute['params']) ? $attribute['params'] : array(); $desc = isset($attribute['desc']) ? $attribute['desc'] : null; if (is_array($map[$field])) { $v = $this->addVariable($attribute['label'], 'object[' . $field . ']', $attribute['type'], false, false, $desc, $params); $v->disable(); } else { $readonly = isset($attribute['readonly']) ? $attribute['readonly'] : null; $v = $this->addVariable($attribute['label'], 'object[' . $field . ']', $attribute['type'], $attribute['required'], $readonly, $desc, $params); if (!empty($actions[$field])) { $actionfields = array(); foreach ($actions[$field]['fields'] as $f) { $actionfields[] = $this->_getId('object[' . $f . ']'); } $a = Horde_Form_Action::factory('updatefield', array('format' => $actions[$field]['format'], 'target' => $this->_getId('object[' . $actions[$field]['target'] . ']'), 'fields' => $actionfields)); $v->setAction($a); } } if (isset($attribute['default'])) { $v->setDefault($attribute['default']); } } } /* Add tags. */ if (isset($map['__uid']) && ($tagger = $injector->getInstance('Turba_Tagger')) && !($tagger instanceof Horde_Core_Tagger_Null)) { $this->addVariable( _("Tags"), 'object[__tags]', 'Turba:TurbaTags', false ); } } /** * Converts a field name into an element ID as used in Horde_Form. * * @param string $id A form field name. * * @return string The ID for the form field. */ protected function _getId($id) { return preg_replace('/[^A-Za-z0-9-_:.]+/', '_', $id); } /** * Returns a custom renderer. * * @param array $params A hash of renderer-specific parameters. * * @return object Horde_Form_Renderer The form renderer. */ public function getRenderer($params = array()) { $params['varrenderer_driver'] = array('turba', 'turba'); return new Horde_Form_Renderer($params); } }