source: trunk/expressoAdmin1_2/index.php @ 1913

Revision 1913, 3.5 KB checked in by valmir.sena, 11 years ago (diff)

Ticket #849 - Criacao de caixas compartilhadas pelo administrador, commit inicial com as principais mudancas

  • Property svn:eol-style set to native
  • Property svn:executable set to *
Line 
1<?php
2        /*************************************************************************************\
3        * Expresso Administração                                                                                                     *
4        * by Joao Alfredo Knopik Junior (joao.alfredo@gmail.com, jakjr@celepar.pr.gov.br)        *
5        * -----------------------------------------------------------------------------------*
6        *  This program is free software; you can redistribute it and/or modify it                       *
7        *  under the terms of the GNU General Public License as published by the                         *
8        *  Free Software Foundation; either version 2 of the License, or (at your                        *
9        *  option) any later version.                                                                                                            *
10        \*************************************************************************************/
11        $debug = false;
12        $time_start = microtime(true);
13
14        $GLOBALS['phpgw_info'] = array();
15        $GLOBALS['phpgw_info']['flags']['currentapp'] = 'expressoAdmin1_2';
16        include('../header.inc.php');
17
18        $c = CreateObject('phpgwapi.config','expressoAdmin1_2');
19        $c->read_repository();
20       
21        $current_config = $c->config_data;
22        $ldap_manager = CreateObject('contactcenter.bo_ldap_manager');
23        $boemailadmin   = CreateObject('emailadmin.bo');
24        $emailadmin_profile = $boemailadmin->getProfileList();
25        $_SESSION['phpgw_info']['expresso']['email_server'] = $boemailadmin->getProfile($emailadmin_profile[0]['profileID']);
26        $_SESSION['phpgw_info']['expresso']['user'] = $GLOBALS['phpgw_info']['user'];
27        $_SESSION['phpgw_info']['expresso']['server'] = $GLOBALS['phpgw_info']['server'];
28        $_SESSION['phpgw_info']['expresso']['cc_ldap_server'] = $ldap_manager ? $ldap_manager->srcs[1] : null;
29        $_SESSION['phpgw_info']['expresso']['expressoAdmin'] = $current_config;
30        $_SESSION['phpgw_info']['expresso']['global_denied_users'] = $GLOBALS['phpgw_info']['server']['global_denied_users'];
31        $_SESSION['phpgw_info']['expresso']['global_denied_groups'] = $GLOBALS['phpgw_info']['server']['global_denied_groups'];
32       
33        $template = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
34        $template->set_file(Array('expressoAdmin' => 'index.tpl'));
35        $template->set_block('expressoAdmin','body');
36       
37        $var = Array(
38                'lang_user_accounts'    => lang('User Accounts'),
39                'lang_shared_accounts'=> lang('Shared Accounts'),
40                'lang_institutional_accounts'=> lang('Institutional Accounts'),
41                'lang_user_groups'              => lang('User Groups'),
42                'lang_email_lists'              => lang('Email Lists'),
43                'lang_computers'                => lang('Computers'),
44                'lang_organizations'    => lang('Organizations'),
45                'lang_sambadomains'             => lang('Samba Domains'),
46                'lang_sectors'                  => lang('Sectors'),
47                'lang_show_sessions'    => lang('Show Sessions'),
48                'display_samba_suport'  => $current_config['expressoAdmin_samba_support'] == 'true' ? '' : 'display:none',
49                'lang_logs'                             => lang('Logs')
50        );
51        $template->set_var($var);
52        $template->pfp('out','body');
53       
54        /* save lang and session */
55        if (empty($_SESSION['phpgw_info']['expressoAdmin']['lang']))
56        {
57                $_SESSION['phpgw_info']['expressoAdmin']['user']['preferences']['common']['lang'] = $GLOBALS['phpgw_info']['user']['preferences']['common']['lang'];
58                $fn = './setup/phpgw_'.$_SESSION['phpgw_info']['expressoAdmin']['user']['preferences']['common']['lang'].'.lang';
59                if (file_exists($fn))
60                {
61                        $fp = fopen($fn,'r');
62                        while ($data = fgets($fp,16000))
63                        {
64                                list($message_id,$app_name,$null,$content) = explode("\t",substr($data,0,-1));
65                                $_SESSION['phpgw_info']['expressoAdmin']['lang'][$message_id] = $content;
66                        }
67                        fclose($fp);
68                }
69        }
70
71        $GLOBALS['phpgw']->common->phpgw_footer();
72       
73        if($debug)
74                echo lang('Page was generated in %1 seconds',microtime(true) - $time_start);   
75?>
Note: See TracBrowser for help on using the repository browser.