| | |
| | | $class_name .= ' selected'; |
| | | if ($source['readonly']) |
| | | $class_name .= ' readonly'; |
| | | if ($source['class']) |
| | | $class_name .= ' ' . $source['class']; |
| | | if ($source['class_name']) |
| | | $class_name .= ' ' . $source['class_name']; |
| | | |
| | | $out .= sprintf($line_templ, |
| | | html_identifier($id), |
| | |
| | | |
| | | function rcmail_contact_photo($attrib) |
| | | { |
| | | global $CONTACTS, $CONTACT_COLTYPES, $RCMAIL, $CONFIG; |
| | | global $SOURCE_ID, $CONTACTS, $CONTACT_COLTYPES, $RCMAIL, $CONFIG; |
| | | |
| | | if (!$CONTACT_COLTYPES['photo']) |
| | | return ''; |
| | |
| | | if (strpos($record['photo'], 'http:') === 0) |
| | | $photo_img = $record['photo']; |
| | | else if ($record['photo']) |
| | | $photo_img = $RCMAIL->url(array('_action' => 'photo', '_cid' => $record['ID'], '_source' => $_REQUEST['_source'])); |
| | | $photo_img = $RCMAIL->url(array('_action' => 'photo', '_cid' => $record['ID'], '_source' => $SOURCE_ID)); |
| | | else |
| | | $ff_value = '-del-'; // will disable delete-photo action |
| | | |
| | |
| | | // containing contact ID and source name in form: <ID>-<SOURCE> |
| | | |
| | | $cid = get_input_value('_cid', RCUBE_INPUT_GPC); |
| | | $source = get_input_value('_source', RCUBE_INPUT_GPC); |
| | | $source = (string) get_input_value('_source', RCUBE_INPUT_GPC); |
| | | |
| | | if (!preg_match('/^[a-zA-Z0-9\+\/=_-]+(,[a-zA-Z0-9\+\/=_-]+)*$/', $cid)) { |
| | | return array(); |
| | |
| | | if (!$got_source) { |
| | | list ($c, $s) = explode('-', $id, 2); |
| | | if (strlen($s)) { |
| | | $result[$s][] = $c; |
| | | } |
| | | else if (strlen($source)) { |
| | | $result[$source][] = $c; |
| | | $result[(string)$s][] = $c; |
| | | } |
| | | } |
| | | else { |