| | |
| | | * @param int Source to get value from (GPC) |
| | | * @return array Hash array with all request parameters |
| | | */ |
| | | function request2param($mode = RCUBE_INPUT_GPC) |
| | | function request2param($mode = RCUBE_INPUT_GPC, $ignore = 'task|action') |
| | | { |
| | | $out = array(); |
| | | $src = $mode == RCUBE_INPUT_GET ? $_GET : ($mode == RCUBE_INPUT_POST ? $_POST : $_REQUEST); |
| | | foreach ($src as $key => $value) { |
| | | $fname = $key[0] == '_' ? substr($key, 1) : $key; |
| | | $out[$fname] = get_input_value($key, $mode); |
| | | if ($ignore && !preg_match("/($ignore)/", $fname)) |
| | | $out[$fname] = get_input_value($key, $mode); |
| | | } |
| | | |
| | | return $out; |
| | |
| | | * @return string HTML table code |
| | | */ |
| | | function rcube_table_output($attrib, $table_data, $a_show_cols, $id_col) |
| | | { |
| | | { |
| | | global $RCMAIL; |
| | | |
| | | |
| | | $table = new html_table(/*array('cols' => count($a_show_cols))*/); |
| | | |
| | | |
| | | // add table header |
| | | if (!$attrib['noheader']) |
| | | foreach ($a_show_cols as $col) |
| | | $table->add_header($col, Q(rcube_label($col))); |
| | | |
| | | |
| | | $c = 0; |
| | | if (!is_array($table_data)) |
| | | if (!is_array($table_data)) |
| | | { |
| | | $db = $RCMAIL->get_dbh(); |
| | | while ($table_data && ($sql_arr = $db->fetch_assoc($table_data))) |
| | | { |
| | | $zebra_class = $c % 2 ? 'even' : 'odd'; |
| | | $table->add_row(array('id' => 'rcmrow' . html_identifier($sql_arr[$id_col]), 'class' => $zebra_class)); |
| | | $table->add_row(array('id' => 'rcmrow' . html_identifier($sql_arr[$id_col]))); |
| | | |
| | | // format each col |
| | | foreach ($a_show_cols as $col) |
| | | $table->add($col, Q($sql_arr[$col])); |
| | | |
| | | |
| | | $c++; |
| | | } |
| | | } |
| | | else |
| | | { |
| | | else { |
| | | foreach ($table_data as $row_data) |
| | | { |
| | | $zebra_class = $c % 2 ? 'even' : 'odd'; |
| | | if (!empty($row_data['class'])) |
| | | $zebra_class .= ' '.$row_data['class']; |
| | | $class = !empty($row_data['class']) ? $row_data['class'] : ''; |
| | | |
| | | $table->add_row(array('id' => 'rcmrow' . html_identifier($row_data[$id_col]), 'class' => $zebra_class)); |
| | | $table->add_row(array('id' => 'rcmrow' . html_identifier($row_data[$id_col]), 'class' => $class)); |
| | | |
| | | // format each col |
| | | foreach ($a_show_cols as $col) |
| | | $table->add($col, Q(is_array($row_data[$col]) ? $row_data[$col][0] : $row_data[$col])); |
| | | |
| | | |
| | | $c++; |
| | | } |
| | | } |
| | | |
| | | return $table->show($attrib); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | |
| | | if (empty($ts)) |
| | | return ''; |
| | | |
| | | // get user's timezone |
| | | // get user's timezone offset |
| | | $tz = $RCMAIL->config->get_timezone(); |
| | | |
| | | // convert time to user's timezone |
| | |
| | | $p['folder_name'] = '*'; |
| | | |
| | | if ($p['unsubscribed']) |
| | | $list = $RCMAIL->imap->list_unsubscribed('', $p['folder_name'], $p['folder_filter']); |
| | | $list = $RCMAIL->imap->list_unsubscribed('', $p['folder_name'], $p['folder_filter'], $p['folder_rights']); |
| | | else |
| | | $list = $RCMAIL->imap->list_mailboxes('', $p['folder_name'], $p['folder_filter']); |
| | | $list = $RCMAIL->imap->list_mailboxes('', $p['folder_name'], $p['folder_filter'], $p['folder_rights']); |
| | | |
| | | $delimiter = $RCMAIL->imap->get_hierarchy_delimiter(); |
| | | |
| | |
| | | $idx = 0; |
| | | $out = ''; |
| | | foreach ($arrFolders as $key => $folder) { |
| | | $zebra_class = (($nestLevel+1)*$idx) % 2 == 0 ? 'even' : 'odd'; |
| | | $title = null; |
| | | |
| | | if (($folder_class = rcmail_folder_classname($folder['id'])) && !$realnames) { |
| | |
| | | $classes[] = 'inbox'; |
| | | else |
| | | $classes[] = '_'.asciiwords($folder_class ? $folder_class : strtolower($folder['id']), true); |
| | | |
| | | $classes[] = $zebra_class; |
| | | |
| | | if ($folder['id'] == $mbox_name) |
| | | $classes[] = 'selected'; |
| | |
| | | |
| | | $RCMAIL->output->set_env('autocomplete_max', (int)$RCMAIL->config->get('autocomplete_max', 15)); |
| | | $RCMAIL->output->set_env('autocomplete_min_length', $RCMAIL->config->get('autocomplete_min_length')); |
| | | $RCMAIL->output->add_label('autocompletechars'); |
| | | $RCMAIL->output->add_label('autocompletechars', 'autocompletemore'); |
| | | } |