source: subversion/branches/devel-vnext/program/steps/settings/identities.inc @ 624

Last change on this file since 624 was 624, checked in by till, 6 years ago

+ changes (registry, cs, bugfixing, ...)

File size: 2.2 KB
Line 
1<?php
2
3/*
4 +-----------------------------------------------------------------------+
5 | program/steps/settings/identities.inc                                 |
6 |                                                                       |
7 | This file is part of the RoundCube Webmail client                     |
8 | Copyright (C) 2005-2007, RoundCube Dev. - Switzerland                 |
9 | Licensed under the GNU GPL                                            |
10 |                                                                       |
11 | PURPOSE:                                                              |
12 |   Manage identities of a user account                                 |
13 |                                                                       |
14 +-----------------------------------------------------------------------+
15 | Author: Thomas Bruederli <roundcube@gmail.com>                        |
16 +-----------------------------------------------------------------------+
17
18 $Id: identities.inc 543 2007-04-28 18:07:12Z thomasb $
19
20*/
21$registry = rc_registry::getInstance();
22$DB       = $registry->get('DB', 'core');
23$OUTPUT   = $registry->get('OUTPUT', 'core');
24
25if ($USER_DATA = $DB->fetch_assoc($sql_result)) {
26    $OUTPUT->set_pagetitle(
27                sprintf(
28                    '%s (%s@%s)',
29                    rcube_label('identities'),
30                    $USER_DATA['username'],
31                    $USER_DATA['mail_host']
32                )
33    );
34}
35$OUTPUT->include_script('list.js');
36
37
38// similar function as /steps/addressbook/func.inc::rcmail_contact_frame()
39function rcmail_identity_frame($attrib)
40{
41    global $OUTPUT;
42
43    if (!$attrib['id']) {
44        $attrib['id'] = 'rcmIdentityFrame';
45    }
46    $attrib['name'] = $attrib['id'];
47
48    $OUTPUT->set_env('contentframe', $attrib['name']);
49
50    $attrib_str = rc_main::create_attrib_string(
51                        $attrib,
52                        array(
53                            'name', 'id', 'class', 'style',
54                            'src', 'width', 'height', 'frameborder'
55                        )
56    );
57    $out = '<iframe'. $attrib_str . '></iframe>';
58
59    return $out;
60}
61
62$OUTPUT->add_handler('identityframe', 'rcmail_identity_frame');
63
64rc_main::parse_template('identities');
65?>
Note: See TracBrowser for help on using the repository browser.