Killed one more global var + log logins to a separate file (not console)
| | |
| | | // include environment |
| | | require_once 'program/include/iniset.php'; |
| | | |
| | | // define global vars |
| | | $OUTPUT_TYPE = 'html'; |
| | | |
| | | // init application and start session with requested task |
| | | $RCMAIL = rcmail::get_instance(); |
| | | |
| | |
| | | $RCMAIL->authenticate_session(); |
| | | |
| | | // log successful login |
| | | if ($RCMAIL->config->get('log_logins') && $RCMAIL->config->get('debug_level') & 1) |
| | | console(sprintf('Successful login for %s (id %d) from %s', |
| | | trim(get_input_value('_user', RCUBE_INPUT_POST), ' '), |
| | | $_SESSION['user_id'], |
| | | if ($RCMAIL->config->get('log_logins')) { |
| | | write_log('userlogins', sprintf('Successful login for %s (id %d) from %s', |
| | | $RCMAIL->user->get_username(), |
| | | $RCMAIL->user->ID, |
| | | $_SERVER['REMOTE_ADDR'])); |
| | | } |
| | | |
| | | // send redirect |
| | | $OUTPUT->redirect(); |
| | |
| | | $is_iso_8859_1 = true; |
| | | } |
| | | if (!$enctype) |
| | | $enctype = $GLOBALS['OUTPUT_TYPE']; |
| | | $enctype = $OUTPUT->type; |
| | | |
| | | // encode for plaintext |
| | | if ($enctype=='text') |
| | |
| | | private $texts = array(); |
| | | private $commands = array(); |
| | | |
| | | public $type = 'js'; |
| | | public $ajax_call = true; |
| | | |
| | | |
| | |
| | | var $js_commands = array(); |
| | | var $object_handlers = array(); |
| | | |
| | | public $type = 'html'; |
| | | public $ajax_call = false; |
| | | |
| | | /** |
| | |
| | | |
| | | */ |
| | | |
| | | $OUTPUT_TYPE = 'js'; |
| | | // is there a sort type for this request? |
| | | if ($sort = get_input_value('_sort', RCUBE_INPUT_GET)) |
| | | { |