Exemplo n.º 1
0
   Camila PHP Framework is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.

   Camila PHP Framework is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with Camila PHP Framework; if not, write to the Free Software
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
$myDivOpen = new HAW_raw(HAW_HTML, '<div id=\'camilaloginbox\'>');
$_CAMILA['page']->add_raw($myDivOpen);
$myForm = new CHAW_form($_SERVER['PHP_SELF'], HAW_METHOD_POST);
$hidden = new CHAW_hidden('camila_pwloginbox', 'yes');
$myForm->add_hidden($hidden);
$hidden = new CHAW_hidden("camila_redirect", basename($_SERVER['PHP_SELF']));
if ($_SERVER['QUERY_STRING'] != '') {
    $hidden = new CHAW_hidden('camila_redirect', basename($_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING']));
}
if (basename($_SERVER['PHP_SELF']) != CAMILA_LOGIN_HOME) {
    $myForm->add_hidden($hidden);
}
$text = new CHAW_text(camila_get_translation('camila.login.authrequired'), HAW_TEXTFORMAT_SMALL | HAW_TEXTFORMAT_BOLD);
$text->set_br(2);
$myForm->add_text($text);
if (CAMILA_CHALLENGE_LOGIN) {
    if (isset($_REQUEST['surname'])) {
        $cognome = new CHAW_input('surname', $_REQUEST['surname'], camila_get_translation('camila.login.surname') . ': ');
Exemplo n.º 2
0
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
$_CAMILA['skin'] = $_CAMILA['user_preferences']['c_sk'];
if ($_CAMILA['javascript_enabled'] == 1 && $_CAMILA['skin'] == 0) {
    $_CAMILA['skin'] = CAMILA_DEFAULT_JS_SKIN;
}
$_CAMILA['page'] = new CHAW_deck(camila_get_translation('camila.prefs'), HAW_ALIGN_LEFT, HAW_OUTPUT_AUTOMATIC);
$export_deck_title = new CHAW_text(camila_get_translation('camila.prefs'), $_CAMILA["page_title_attributes"]);
$export_deck_title->set_br(2);
$export_deck_title->set_color($_CAMILA['page_title_color'], $_CAMILA['page_title_boxcolor']);
$_CAMILA['page']->add_text($export_deck_title);
if (CAMILA_USER_CAN_CHANGE_PWD) {
    $myLink = new CHAW_link(camila_get_translation('camila.login.changepwd'), 'cf_changepwd.php');
    $myLink->set_br(3);
    $_CAMILA['page']->add_link($myLink);
}
$myForm = new CHAW_form('cf_redirect.php');
$text = new CHAW_text(camila_get_translation('camila.prefs.js'));
$text->set_br(0);
$myForm->add_text($text);
$mySelect = new CHAW_select('camila_javascript');
if ($_CAMILA['javascript_enabled'] == 1) {
    $mySelect->add_option(camila_get_translation('camila.enabled2'), "on", HAW_SELECTED);
} else {
    $mySelect->add_option(camila_get_translation('camila.enabled2'), "on");
}
if ($_CAMILA['javascript_enabled'] != 1) {
    $mySelect->add_option(camila_get_translation('camila.disabled2'), "off", HAW_SELECTED);
} else {
    $mySelect->add_option(camila_get_translation('camila.disabled2'), "off");
}
$myForm->add_select($mySelect);
Exemplo n.º 3
0
 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);
 }
Exemplo n.º 4
0
   Copyright (C) 2006-2009 Umberto Bresciani

   Camila PHP Framework is free software; you can redistribute it and/or modify
   it under the terms of the GNU General Public License as published by
   the Free Software Foundation; either version 2 of the License, or
   (at your option) any later version.

   Camila PHP Framework is distributed in the hope that it will be useful,
   but WITHOUT ANY WARRANTY; without even the implied warranty of
   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
   GNU General Public License for more details.

   You should have received a copy of the GNU General Public License
   along with Camila PHP Framework; if not, write to the Free Software
   Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA */
$myForm = new CHAW_form($_SERVER['PHP_SELF'], HAW_METHOD_POST);
$hidden = new CHAW_hidden('camila_pwloginbox', 'yes');
$myForm->add_hidden($hidden);
$hidden = new CHAW_hidden("camila_redirect", basename($_SERVER['PHP_SELF']));
if ($_SERVER['QUERY_STRING'] != '') {
    $hidden = new CHAW_hidden('camila_redirect', basename($_SERVER['PHP_SELF'] . '?' . $_SERVER['QUERY_STRING']));
}
if (basename($_SERVER['PHP_SELF']) != CAMILA_LOGIN_HOME) {
    $myForm->add_hidden($hidden);
}
$text = new CHAW_text('');
$myForm->add_text($text);
$cognome = new CHAW_input('username', CAMILA_ANON_USER, camila_get_translation('camila.login.username'));
$cognome->set_size(20);
$cognome->set_maxlength(20);
$myForm->add_input($cognome);