} } } $skins_raw = scandir('css'); if (is_array($skins_raw)) { foreach ($skins_raw as $skin) { $skins[$skin] = $skin; } } $settings = new Form('new_settings', false, false, false, 'settings', true); $settings->record_id = 1; $settings->info = Settings::getStructured(); $settings->show_errors(); $settings->show_messages(); $settings->startFieldset('Appearance'); $settings->fileInput('logo', 'Logo', false, false, false, false, array('logo' => array('width' => 190, 'height' => 55)), 1, false, false, false, false, 1, 1); $settings->autoComplete('skin', 'Skin', false, false, false, $skins); $settings->endFieldset(); $settings->startFieldset('URL Rewriting'); $settings->checkBox('url_rewrite', 'Url Rewrite'); $settings->endFieldset(); $settings->startFieldset('Locale'); $settings->textInput('locale', 'Locale'); $settings->endFieldset(); $settings->startFieldset('Form Behavior'); $settings->textInput('pass_regex', 'Pass Regex'); $settings->textInput('verify_default_error', 'Default Verify Error'); $settings->textInput('verify_email_error', 'Email Error'); $settings->textInput('verify_phone_error', 'Phone Error'); $settings->textInput('verify_file_type_error', 'File Type Error'); $settings->textInput('verify_file_size_error', 'File Size Error');
} db_commit(); fclose($handle); if ($transactions > 0) { $upload->messages[] = $transactions . ' new transactions were credited.'; } if ($cancelled > 0) { $upload->errors[] = $cancelled . ' transactions could not be credited because of an information mismatch.'; } } unlink($CFG->dirroot . $CFG->temp_file_location . $CFG->temp_files[$key]); unset($CFG->temp_files); } $upload->show_errors(); $upload->show_messages(); $upload->fileInput('deposits', 'Deposits Export File', 1, array('csv'), false, false, false, 1, false, false, false, false, false, 1); $upload->submitButton('Upload', 'Upload'); $upload->display(); $CFG->form_legend = 'Export Fiat Withdrawals'; $download = new Form('withadrawals', false, false, 'form1'); $download->verify(); if ($_REQUEST['withadrawals'] && !is_array($download->errors)) { if ($download->info['currency'] > 0) { $currency_info = DB::getRecord('currencies', $download->info['currency'], 0, 1, false, false, false, 1); if (!$currency_info) { $download->errors[] = 'Invalid currency.'; } else { $sql = "SELECT * FROM requests WHERE currency = {$download->info['currency']} AND request_status = {$CFG->request_pending_id} AND request_type = {$CFG->request_withdrawal_id}"; $result = db_query_array($sql); if ($result) { $_SESSION['export_withdrawals'] = false;
/** * this method is the underpinning of the front end form - it checks the state and displays either the input or the result (if form is submitted) * @param string $name - the name of this element, also it's ID. We need ID for the label click to transfer focus to the input, and a name for JS. * @param string $value - Optional. The default value attribute for the element. Default: "" * @param string $attributes - writes HTML attributes. Optional. Defaults to null * @param string $selected - Optional - This should be set to the key that will be selected by default (If null then the first element is selected). Default: null */ public function getElementState($name, $type, $value = "", $attributes = null, $selcted = null) { $type = strtolower(trim($type)); if ($this->defaultState()) { switch ($type) { case "text": parent::textInput($name, $value, $attributes); break; case "textarea": parent::textArea($name, $value, $attributes); break; case "hidden": parent::hiddenInput($name, $value, $attributes); break; case "file": parent::fileInput($name, $value, $attributes); break; case "select": parent::select($name, $value, $selected, $attributes); break; case "reset": parent::resetButton($name, $value, $attributes); break; case "button": parent::button($name, $value, $attributes); break; default: parent::input($name, $type, $value, $attributes); break; } } else { if ($this->outputOnStateChange($type)) { echo $this->getConfirmationElement($this->selectedValueOf($name)); } } }