| | |
| | | 'ANSIX31101983' => 'WINDOWS-1252', |
| | | 'ANSIX341968' => 'WINDOWS-1252', |
| | | 'UNKNOWN8BIT' => 'ISO-8859-15', |
| | | 'XUNKNOWN' => 'ISO-8859-15', |
| | | 'XUSERDEFINED' => 'ISO-8859-15', |
| | | 'UNKNOWN' => 'ISO-8859-15', |
| | | 'USERDEFINED' => 'ISO-8859-15', |
| | | 'KSC56011987' => 'EUC-KR', |
| | | 'GB2312' => 'GBK', |
| | | 'GB231280' => 'GBK', |
| | | 'UNICODE' => 'UTF-8', |
| | | 'UTF7IMAP' => 'UTF7-IMAP', |
| | | 'XXBIG5' => 'BIG5', |
| | | 'TIS620' => 'WINDOWS-874', |
| | | 'ISO88599' => 'WINDOWS-1254', |
| | | 'ISO885911' => 'WINDOWS-874', |
| | | ); |
| | | |
| | | $str = preg_replace('/[^a-z0-9]/i', '', $charset); |
| | | // allow a-z and 0-9 only and remove X- prefix (e.g. X-ROMAN8 => ROMAN8) |
| | | $str = preg_replace(array('/[^a-z0-9]/i', '/^x+/i'), '', $charset); |
| | | |
| | | if (isset($aliases[$str])) |
| | | return $aliases[$str]; |
| | |
| | | * @return string Field value or NULL if not available |
| | | */ |
| | | function get_input_value($fname, $source, $allow_html=FALSE, $charset=NULL) |
| | | { |
| | | { |
| | | global $OUTPUT; |
| | | $value = NULL; |
| | | |
| | |
| | | return rcube_charset_convert($value, $OUTPUT->get_charset(), $charset); |
| | | else |
| | | return $value; |
| | | } |
| | | |
| | | /** |
| | | * Convert array of request parameters (prefixed with _) |
| | | * to a regular array with non-prefixed keys. |
| | | * |
| | | * @param int Source to get value from (GPC) |
| | | * @return array Hash array with all request parameters |
| | | */ |
| | | function request2param($mode = RCUBE_INPUT_GPC) |
| | | { |
| | | $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); |
| | | } |
| | | |
| | | return $out; |
| | | } |
| | | |
| | | /** |
| | | * Remove all non-ascii and non-word chars |
| | |
| | | while ($table_data && ($sql_arr = $db->fetch_assoc($table_data))) |
| | | { |
| | | $zebra_class = $c % 2 ? 'even' : 'odd'; |
| | | $table->add_row(array('id' => 'rcmrow' . $sql_arr[$id_col], 'class' => "contact $zebra_class")); |
| | | $table->add_row(array('id' => 'rcmrow' . $sql_arr[$id_col], 'class' => $zebra_class)); |
| | | |
| | | // format each col |
| | | foreach ($a_show_cols as $col) |
| | |
| | | foreach ($table_data as $row_data) |
| | | { |
| | | $zebra_class = $c % 2 ? 'even' : 'odd'; |
| | | $table->add_row(array('id' => 'rcmrow' . $row_data[$id_col], 'class' => "contact $zebra_class")); |
| | | $table->add_row(array('id' => 'rcmrow' . $row_data[$id_col], 'class' => $zebra_class)); |
| | | |
| | | // format each col |
| | | foreach ($a_show_cols as $col) |
| | |
| | | { |
| | | $args = func_get_args(); |
| | | |
| | | if (class_exists('rcmail', false)) |
| | | rcmail::get_instance()->plugins->exec_hook('console', $args); |
| | | if (class_exists('rcmail', false)) { |
| | | $rcmail = rcmail::get_instance(); |
| | | if (is_object($rcmail->plugins)) |
| | | $rcmail->plugins->exec_hook('console', $args); |
| | | } |
| | | |
| | | $msg = array(); |
| | | foreach ($args as $arg) |