function _editcolumns() { global $_CAMILA; $form = new CHAW_form($_SERVER['PHP_SELF']); foreach ($_REQUEST as $key => $value) { if (!is_array($value)) { $myInput = new CHAW_hidden($key, $value); if ($key == 'camila_editcols' || substr($key, 0, 1) == 'f' && $value == 'y') { $export_format = $key; } else { $form->add_input($myInput); } } else { foreach ($value as $k => $v) { $myInput = new CHAW_hidden($key . '[' . $k . ']', $v); $form->add_input($myInput); } } } $select_all = new CHAW_js('<div class="camilacheckall" id="camilacheckall"><a id="CheckAll_' . $this->key . '" href="">' . camila_get_translation('camila.form.checkall') . '</a> ' . camila_get_translation('camila.form.checkallseparator') . ' <a id="UncheckAll_' . $this->key . '" href="">' . camila_get_translation('camila.form.uncheckall') . '</a></div>'); $form->add_userdefined($select_all); $arr = unserialize($_COOKIE[$this->editcolumscookiename]); if ($_COOKIE[$this->editcolumscookiename] == '' || count($arr) > 0 && $arr[$b] == 'f' . $b) { $new_stmt .= $this->stmtfields[$a] . ','; $count++; } for ($a = 0; $a < $this->stmtnumoffields; $a++) { $b = $a + 1; if ($_COOKIE[$this->editcolumscookiename] == '') { if (isset($_REQUEST['f' . $b]) && $_REQUEST['f' . $b] == 'y' || in_array('f' . $b, $_REQUEST['camila_f']) || isset($_REQUEST['camila_f' . $b]) && $_REQUEST['camila_f' . $b] == 'y') { $myCheckbox = new CHAW_checkbox('camila_f' . '[' . $b . ']', 'f' . $b, $this->map($this->stmtfields[$a]), HAW_SELECTED); } else { $myCheckbox = new CHAW_checkbox('camila_f' . '[' . $b . ']', 'f' . $b, $this->map($this->stmtfields[$a])); } if ($b % 2 != 0) { $myCheckbox->set_br(0); } $myCheckbox->cols = 2; } else { $arr = unserialize($_COOKIE[$this->editcolumscookiename]); if ($arr[$b] == 'f' . $b) { $myCheckbox = new CHAW_checkbox('camila_f' . '[' . $b . ']', 'f' . $b, $this->map($this->stmtfields[$a]), HAW_SELECTED); } else { $myCheckbox = new CHAW_checkbox('camila_f' . '[' . $b . ']', 'f' . $b, $this->map($this->stmtfields[$a])); } if ($b % 2 != 0) { $myCheckbox->set_br(0); } $myCheckbox->cols = 2; } $form->add_checkbox($myCheckbox); } $myHidden = new CHAW_hidden('count', $count); $form->add_hidden($myHidden); $text = new CHAW_text(''); $text->set_br(2); $form->add_text($text); $theSubmission = new CHAW_submit('Ok', 'camila_save'); $form->add_submit($theSubmission); $_CAMILA['page']->add_form($form); }
if (CAMILA_CHALLENGE_LOGIN) { if (isset($_REQUEST['surname'])) { $cognome = new CHAW_input('surname', $_REQUEST['surname'], camila_get_translation('camila.login.surname') . ': '); } else { $cognome = new CHAW_input('surname', '', camila_get_translation('camila.login.surname') . ': '); } $cognome->set_size(20); $cognome->set_maxlength(20); if (isset($_REQUEST['name'])) { $nome = new CHAW_input('name', $_REQUEST['name'], camila_get_translation('camila.login.name') . ': '); } else { $nome = new CHAW_input('name', '', camila_get_translation('camila.login.name') . ': '); } $nome->set_size(20); $nome->set_maxlength(20); $myForm->add_input($nome); $myForm->add_input($cognome); $thePW1 = new CHAW_input('p1', '', camila_get_translation('camila.login.cipher.pre') . ' ' . $c1 . camila_get_translation('camila.login.cipher.post'), '*N'); $thePW1->set_size(1); $thePW1->set_maxlength(1); $thePW1->set_type(HAW_INPUT_PASSWORD); $myForm->add_input($thePW1); $thePW2 = new CHAW_input('p2', '', camila_get_translation('camila.login.cipher.pre') . ' ' . $c2 . camila_get_translation('camila.login.cipher.post'), '*N'); $thePW2->set_size(1); $thePW2->set_maxlength(1); $thePW2->set_type(HAW_INPUT_PASSWORD); $myForm->add_input($thePW2); $thePW3 = new CHAW_input('p3', '', camila_get_translation('camila.login.cipher.pre') . ' ' . $c3 . camila_get_translation('camila.login.cipher.post'), '*N'); $thePW3->set_size(1); $thePW3->set_maxlength(1); $thePW3->set_type(HAW_INPUT_PASSWORD);
$text->set_br(0); $myForm->add_text($text); $myForm->add_select($mySelect3); $text = new CHAW_text(''); $text->set_br(2); $myForm->add_text($text); $text = new CHAW_text(camila_get_translation('camila.prefs.tables.fontsize')); $text->set_br(0); $myForm->add_text($text); $myForm->add_select($mySelect2); $text = new CHAW_text(''); $text->set_br(2); $myForm->add_text($text); if (!intval($_CAMILA['user_preferences']['c_rp'])) { $_CAMILA['user_preferences']['c_rp'] = CAMILA_REPORT_RPP; } $myInput = new CHAW_input('camila_rows_per_page', $_CAMILA['user_preferences']['c_rp'], camila_get_translation('camila.prefs.tables.rowsperpage')); $myInput->set_br(2); $myForm->add_input($myInput); $url = $_SERVER['PHP_SELF'] . "?" . $_SERVER['QUERY_STRING']; $url = ereg_replace("&" . "camila_preferences", "", $url); $url = ereg_replace("\\?" . "camila_preferences", "", $url); $myInput = new CHAW_hidden('camila_redirect', $url); $myForm->add_input($myInput); $theSubmission = new CHAW_submit(camila_get_translation('camila.save'), 'submit'); $myForm->add_submit($theSubmission); $_CAMILA['page']->add_form($myForm); $_CAMILA['page']->use_simulator(CAMILA_CSS_DIR . 'skin0.css'); require CAMILA_DIR . 'deck_settings.php'; require CAMILA_DIR . 'footer.php'; exit;