source: branches/2.2/jabberit_messenger/inc/class.uiconfig.inc.php @ 3102

Revision 3102, 4.4 KB checked in by amuller, 14 years ago (diff)

Ticket #986 - Efetuado merge para o Branch 2.2( atualizacao do modulo)

  • Property svn:executable set to *
Line 
1<?php
2
3  /***************************************************************************\
4  *  Expresso - Expresso Messenger                                            *
5  *     - Alexandre Correia / Rodrigo Souza                                                               *
6  * ------------------------------------------------------------------------- *
7  *  This program is free software; you can redistribute it and/or modify it  *
8  *  under the terms of the GNU General Public License as published by the    *
9  *  Free Software Foundation; either version 2 of the License, or (at your   *
10  *  option) any later version.                                               *
11  \***************************************************************************/
12 
13class uiconfig
14{
15        private $uimodule;
16       
17        public $public_functions = array(
18                'configAudit'  => True,
19                'configPermission'  => True,           
20                'configServer'  => True,
21                'css' => True
22        );
23       
24        function __construct()
25        {
26                $GLOBALS['phpgw']->common->phpgw_header();
27        }       
28
29        public final function configPermission()
30        {
31                if( !$GLOBALS['phpgw']->acl->check('run',1,'admin') )
32                {
33                        $GLOBALS['phpgw']->redirect_link('/admin/index.php');
34                }
35
36                $GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin') .' - ' . 'Permissões de Acesso';
37                echo parse_navbar();
38
39                $GLOBALS['phpgw']->template->set_file(array('jabberit_messenger'=>'configItens.tpl'));
40                $GLOBALS['phpgw']->template->set_block('jabberit_messenger','configPermission');       
41                $GLOBALS['phpgw']->template->set_var(array(
42                                                                                                        'action_url_back' => "./admin",
43                                                                                                        'label_config1' => lang("Enable the Expresso Messenger inside of the modules"),
44                                                                                                        'label_config2' => "Habilitar adição de novos contatos somente por grupos",
45                                                                                                        'label_config3' => lang("Restrict group"),                                                                                                     
46                                                                                                        'label_config4' => lang("Free organization for group"),
47                                                                                                        'label_config5' => "Habilitar módulo SEM Java para os grupos",
48                                                                                                        'value_config1' => $GLOBALS['phpgw']->link('/index.php','menuaction=jabberit_messenger.uimodule.edit_conf'),                                                                                           
49                                                                                                        'value_config2' => $GLOBALS['phpgw']->link('/index.php','menuaction=jabberit_messenger.uigroupsldap.edit'),
50                                                                                                        'value_config3' => $GLOBALS['phpgw']->link('/index.php','menuaction=jabberit_messenger.uigroupslocked.editGroups'),
51                                                                                                        'value_config4' => $GLOBALS['phpgw']->link('/index.php','menuaction=jabberit_messenger.uienabledgroups.getGroups'),
52                                                                                                        'value_config5' => $GLOBALS['phpgw']->link('/index.php','menuaction=jabberit_messenger.uijmessenger.getGroups'),
53                                                                                                        'value_display_jmessenger' => ( (is_dir('./jabberit_messenger/jmessenger') ) ? "block" : "none"),
54                                                                                                        'value_image1'  => "./jabberit_messenger/templates/default/images/app.gif",
55                                                                                                        'value_image2'  => "./jabberit_messenger/templates/default/images/group.gif",
56                                                                                                        'value_image3'  => "./jabberit_messenger/templates/default/images/group_deny.gif",                                                                                                     
57                                                                                                        'value_image4'  => "./jabberit_messenger/templates/default/images/group_add.gif",
58                                                                                                        'value_image5'  => "./jabberit_messenger/templates/default/images/sem_java.png"                                                                                         
59                                                                                                        ));
60       
61                $GLOBALS['phpgw']->template->pparse('out','configPermission');
62               
63        }
64
65        public final function configServer()
66        {
67                if( !$GLOBALS['phpgw']->acl->check('run',1,'admin') )
68                {
69                        $GLOBALS['phpgw']->redirect_link('/admin/index.php');
70                }
71
72                $GLOBALS['phpgw_info']['flags']['app_header'] = lang('Admin') .' - ' . 'Configurações do Servidor';
73                echo parse_navbar();
74               
75                $GLOBALS['phpgw']->template->set_file(array('jabberit_messenger'=>'configItens.tpl'));
76                $GLOBALS['phpgw']->template->set_block('jabberit_messenger','configServer');   
77                $GLOBALS['phpgw']->template->set_var(array(
78                                                                                                        'action_url_back' => "./admin",
79                                                                                                        'label_config1' => lang("Site Configuration Jabber"),
80                                                                                                        'label_config2' => lang("Map organization for realm jabber"),
81                                                                                                        'value_config1' => $GLOBALS['phpgw']->link('/index.php','menuaction=admin.uiconfig.index&appname=jabberit_messenger'),                                                                                         
82                                                                                                        'value_config2' => $GLOBALS['phpgw']->link('/index.php','menuaction=jabberit_messenger.uihostsjabber.edit_conf'),
83                                                                                                        'value_image1'  => "jabberit_messenger/templates/default/images/navbar.png",
84                                                                                                        'value_image2'  => "jabberit_messenger/templates/default/images/gear.png",
85                                                                                                        ));
86       
87                $GLOBALS['phpgw']->template->pparse('out','configServer');
88        }
89
90}
91
92?>
Note: See TracBrowser for help on using the repository browser.