source: trunk/expressoAdmin1_2/index.php @ 8017

Revision 8017, 6.0 KB checked in by angelo, 8 years ago (diff)

Ticket #3390 - Falha na verificacao da sessao ao entrar no modulo Expresso Admin

  • 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        $GLOBALS['phpgw_info'] = array();
12        $GLOBALS['phpgw_info']['flags']['currentapp'] = 'expressoAdmin1_2';
13        include('../header.inc.php');
14   
15        echo '
16            <link rel="Stylesheet" type="text/css" href="../prototype/plugins/jquery/jquery-ui.css" />                                 
17   
18            <script type="text/javascript" src="../prototype/plugins/jquery/jquery.min.js"></script>
19       
20            <script type="text/javascript" src="../prototype/plugins/jquery/jquery-ui.min.js"></script>
21            <script type="text/javascript" src="../prototype/plugins/jquery/jquery-ui.custom.min.js"></script>
22            <script src="../prototype/plugins/json2/json2.js" language="javascript"></script>
23            <script src="../prototype/plugins/ejs/ejs.js" language="javascript"></script>
24            <script src="../prototype/plugins/store/jquery.store.js" language="javascript"></script>
25           
26            <script src="../prototype/api/datalayer.js" language="javascript"></script>
27           
28            <link rel="stylesheet" type="text/css" href="../prototype/plugins/zebradialog/css/zebra_dialog.css"></link>
29
30            <script type="text/javascript" src="../prototype/plugins/zebradialog/javascript/zebra_dialog.js"></script>
31            <script language="javascript">DataLayer.dispatchPath = "../prototype/";</script>
32            <script type="text/javascript" src="../prototype/plugins/datejs/date-pt-BR.js"></script>
33            <script type="text/javascript" src="../prototype/plugins/datejs/sugarpak.js"></script>
34            <script type="text/javascript" src="../prototype/plugins/datejs/parser.js"></script>
35
36            <script type="text/javascript" src="../prototype/modules/calendar/js/timezone.js"></script>
37           
38            <script type="text/javascript" src="../prototype/modules/calendar/js/calendar.codecs.js"></script>
39            <script type="text/javascript" src="../prototype/modules/calendar/js/load.js"></script>
40           
41            <script type="text/javascript" src="js/jscode/assing_calendar.js"></script>
42            <script type="text/javascript" src="../prototype/plugins/scrollto/jquery.scrollTo.js"></script>
43
44            <link rel="stylesheet" type="text/css" href="../prototype/modules/calendar/css/layout.css" />
45            <link rel="stylesheet" type="text/css" href="../prototype/modules/calendar/css/style.css" />
46            <link rel="stylesheet" type="text/css" href="templates/default/assing_calendar.css" />
47        ';
48
49    $debug = false;     
50        $time_start = microtime(true);
51        $c = CreateObject('phpgwapi.config','expressoAdmin1_2');
52        $c->read_repository();
53       
54        $current_config = $c->config_data;
55                 
56        $ldap_manager = CreateObject('contactcenter.bo_ldap_manager');
57        $boemailadmin   = CreateObject('emailadmin.bo');
58        $emailadmin_profile = $boemailadmin->getProfileList();
59        $_SESSION['phpgw_info']['expresso']['email_server'] = $boemailadmin->getProfile($emailadmin_profile[0]['profileID']);
60        $_SESSION['phpgw_info']['expresso']['user'] = $GLOBALS['phpgw_info']['user'];
61        $_SESSION['phpgw_info']['expresso']['server'] = $GLOBALS['phpgw_info']['server'];
62        $_SESSION['phpgw_info']['expresso']['cc_ldap_server'] = $ldap_manager ? $ldap_manager->srcs[1] : null;
63        $_SESSION['phpgw_info']['expresso']['expressoAdmin'] = $current_config;
64        $_SESSION['phpgw_info']['expresso']['global_denied_users'] = $GLOBALS['phpgw_info']['server']['global_denied_users'];
65        $_SESSION['phpgw_info']['expresso']['global_denied_groups'] = $GLOBALS['phpgw_info']['server']['global_denied_groups'];
66       
67        $template = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
68        $template->set_file(Array('expressoAdmin' => 'index.tpl'));
69        $template->set_block('expressoAdmin','body');
70       
71        $var = Array(
72        'lang_configurations'   => lang('Configurations'),
73                'lang_user_accounts'    => lang('User Accounts'),
74                'lang_shared_accounts'  => lang('Shared Accounts'),
75                'lang_messages_size'    => lang('Messages Size'),
76                'lang_institutional_accounts'=> lang('Institutional Accounts'),
77                'lang_assing_calendar' => lang('Assign default calendar for user'),
78                'lang_user_groups'              => lang('User Groups'),
79                'lang_email_lists'              => lang('Email Lists'),
80                'lang_computers'                => lang('Computers'),
81                'lang_organizations'    => lang('Organizations'),
82                'lang_sambadomains'             => lang('Samba Domains'),
83                'lang_sectors'                  => lang('Sectors'),
84                'lang_show_sessions'    => lang('Show Sessions'),
85                'display_samba_suport'  => $current_config['expressoAdmin_samba_support'] == 'true' ? '' : 'display:none',
86                'lang_logs'                             => lang('Logs')
87        );
88        $template->set_var($var);
89        $template->pfp('out','body');
90       
91        /* save lang and session */
92        if (empty($_SESSION['phpgw_info']['expressoAdmin']['lang']))
93        {
94                $_SESSION['phpgw_info']['expressoAdmin']['user']['preferences']['common']['lang'] = $GLOBALS['phpgw_info']['user']['preferences']['common']['lang'];
95                $fn = './setup/phpgw_'.$_SESSION['phpgw_info']['expressoAdmin']['user']['preferences']['common']['lang'].'.lang';
96                if (file_exists($fn))
97                {
98                        $fp = fopen($fn,'r');
99                        while ($data = fgets($fp,16000))
100                        {
101                                list($message_id,$app_name,$null,$content) = explode("\t",substr($data,0,-1));
102                                $_SESSION['phpgw_info']['expressoAdmin']['lang'][$message_id] = $content;
103                        }
104                        fclose($fp);
105                }
106        }
107
108        $GLOBALS['phpgw']->common->phpgw_footer();
109       
110        if($debug)
111                echo lang('Page was generated in %1 seconds',microtime(true) - $time_start);   
112?>
Note: See TracBrowser for help on using the repository browser.