source: trunk/admin/subversion.php @ 3480

Revision 3480, 3.5 KB checked in by rafaelraymundo, 13 years ago (diff)

Ticket #1344 - Informar na tela de login uma identificação da versão/revisao distribuida

Line 
1<?php
2        /**************************************************************************\
3        * eGroupWare - administration                                              *
4        * http://www.egroupware.org                                                *
5        * Written by Joseph Engo <jengo@phpgroupware.org>                          *
6        * Modified by Stephen Brown <steve@dataclarity.net>                        *
7        *  to distribute admin across the application directories                  *
8        * --------------------------------------------                             *
9        *  This program is free software; you can redistribute it and/or modify it *
10        *  under the terms of the GNU General Public License as published by the   *
11        *  Free Software Foundation; either version 2 of the License, or (at your  *
12        *  option) any later version.                                              *
13        \**************************************************************************/
14
15
16        $GLOBALS['phpgw_info'] = array();
17        $GLOBALS['phpgw_info']['flags']['currentapp'] = 'admin';
18        include('../header.inc.php');
19
20        $GLOBALS['admin_tpl'] = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
21        $GLOBALS['admin_tpl']->set_file(
22                Array(
23                        'admin' => 'index.tpl'
24                )
25        );
26
27        $GLOBALS['admin_tpl']->set_block('admin','list');
28        $GLOBALS['admin_tpl']->set_block('admin','app_row');
29        $GLOBALS['admin_tpl']->set_block('admin','app_row_noicon');
30        $GLOBALS['admin_tpl']->set_block('admin','link_row');
31        $GLOBALS['admin_tpl']->set_block('admin','spacer_row');
32
33        $GLOBALS['admin_tpl']->set_var('title',lang('Administration'));
34
35        // This func called by the includes to dump a row header
36        function section_start($appname='',$icon='')
37        {
38                $GLOBALS['admin_tpl']->set_var('icon_backcolor',$GLOBALS['phpgw_info']['theme']['row_off']);
39                $GLOBALS['admin_tpl']->set_var('link_backcolor',$GLOBALS['phpgw_info']['theme']['row_off']);
40                $GLOBALS['admin_tpl']->set_var('app_name',$GLOBALS['phpgw_info']['apps'][$appname]['title']);
41                $GLOBALS['admin_tpl']->set_var('a_name',$appname);
42                $GLOBALS['admin_tpl']->set_var('app_icon',$icon);
43                if ($icon)
44                {
45                        $GLOBALS['admin_tpl']->parse('rows','app_row',True);
46                }
47                else
48                {
49                        $GLOBALS['admin_tpl']->parse('rows','app_row_noicon',True);
50                }
51        }
52
53        function section_item($pref_link='',$pref_text='')
54        {
55                $GLOBALS['admin_tpl']->set_var('pref_link',$pref_link);
56                $GLOBALS['admin_tpl']->set_var('pref_text',$pref_text);
57                $GLOBALS['admin_tpl']->parse('rows','link_row',True);
58        }
59
60        function section_end()
61        {
62                $GLOBALS['admin_tpl']->parse('rows','spacer_row',True);
63        }
64
65        function display_section($appname,$file,$file2=False)
66        {
67                if ($file2)
68                {
69                        $file = $file2;
70                }
71                if(is_array($file))
72                {
73                        section_start($appname,
74                                $GLOBALS['phpgw']->common->image(
75                                        $appname,
76                                        Array(
77                                                'navbar',
78                                                $appname,
79                                                'nonav'
80                                        )
81                                )
82                        );
83
84                        while(list($text,$url) = each($file))
85                        {
86                                // If user doesn't have application configuration access, then don't show the configuration links
87                                if (strpos($url, 'admin.uiconfig') === False || !$GLOBALS['phpgw']->acl->check('site_config_access',1,'admin'))
88                                {
89                                        section_item($url,lang($text));
90                                }
91                        }
92                        section_end();
93                }
94        }
95        if (file_exists('../infodist/revisoes-svn.php'))
96          {
97               include('../infodist/revisoes-svn.php');
98          }
99        else
100          {
101               echo '<div><h4>Dados do subversion n&atilde;o foram localizados.</h4></div>';
102          }
103        $GLOBALS['phpgw']->common->phpgw_footer();
104?>
Note: See TracBrowser for help on using the repository browser.