Ignore:
Timestamp:
Dec 1, 2010 1:04:23 PM (3 years ago)
Author:
thomasb
Message:

Render contact data groups as fieldsets w. legend; show vcard photos in UI (not yet editable)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/devel-addressbook/program/steps/addressbook/show.inc

    r4242 r4297  
    2424if (($cid = get_input_value('_cid', RCUBE_INPUT_GPC)) && ($record = $CONTACTS->get_record($cid, true))) { 
    2525    $OUTPUT->set_env('cid', $record['ID']); 
     26} 
     27 
     28// return raw photo of the given contact 
     29if ($RCMAIL->action == 'photo') { 
     30    if ($record['photo']) { 
     31        // assume image/jpg base64 encoded 
     32        $data = base64_decode(is_array($record['photo']) ? $record['photo'][0] : $record['photo'], true); 
     33    } 
     34     
     35    header('Content-Type: image/jpeg'); 
     36    echo $data ? $data : file_get_contents('program/blank.gif'); 
     37    exit; 
    2638} 
    2739 
Note: See TracChangeset for help on using the changeset viewer.