| | |
| | | */ |
| | | |
| | | $a_save_cols = array('name', 'email', 'organization', 'reply-to', 'bcc', 'standard', 'signature'); |
| | | $a_html_cols = array('signature'); |
| | | |
| | | |
| | | // check input |
| | |
| | | if (!isset($_POST[$fname])) |
| | | continue; |
| | | |
| | | $a_write_sql[] = sprintf("%s=%s", $DB->quoteIdentifier($col), $DB->quote(strip_tags($_POST[$fname]))); |
| | | $a_write_sql[] = sprintf("%s=%s", |
| | | $DB->quoteIdentifier($col), |
| | | $DB->quote(get_input_value($fname, RCUBE_INPUT_POST, in_array($col, $a_html_cols)))); |
| | | } |
| | | |
| | | if (sizeof($a_write_sql)) |
| | |
| | | $updated = $DB->affected_rows(); |
| | | } |
| | | |
| | | if ($updated) |
| | | if ($updated && !empty($_POST['_standard'])) |
| | | { |
| | | show_message('successfullysaved', 'confirmation'); |
| | | |
| | |
| | | // ... |
| | | } |
| | | } |
| | | else |
| | | else if ($DB->is_error()) |
| | | { |
| | | // show error message |
| | | show_message('errorsaving', 'error'); |
| | |
| | | continue; |
| | | |
| | | $a_insert_cols[] = $DB->quoteIdentifier($col); |
| | | $a_insert_values[] = $DB->quote(strip_tags($_POST[$fname])); |
| | | $a_insert_values[] = $DB->quote(get_input_value($fname, RCUBE_INPUT_POST, in_array($col, $a_html_cols))); |
| | | } |
| | | |
| | | if (sizeof($a_insert_cols)) |