phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] admin/index.php, 1.37


From: nomail
Subject: [Phpgroupware-cvs] admin/index.php, 1.37
Date: Thu, 30 Dec 2004 08:38:14 +0100

Update of /admin
Modified Files:
        Branch: 
          index.php

date: 2004/12/30 07:38:14;  author: skwashd;  state: Exp;  lines: +88 -15

Log Message:
new HEAD admin - sans GIFs
=====================================================================
Index: admin/index.php
diff -u admin/index.php:1.36 admin/index.php:1.37
--- admin/index.php:1.36        Wed Apr 23 01:08:31 2003
+++ admin/index.php     Thu Dec 30 07:38:14 2004
@@ -2,23 +2,96 @@
        
/**************************************************************************\
        * phpGroupWare - administration                                         
   *
        * http://www.phpgroupware.org                                           
   *
-       * Written by coreteam <address@hidden>                    *
-       *               & Stephen Brown <address@hidden>                    *
-       * to distribute admin across the application directories                
   *
-       * ------------------------------------------------------                
   *
-       * This program is free software; you can redistribute it and/or modify 
it  *
-       * under the terms of the GNU General Public License as published by the 
   *
-       * Free Software Foundation; either version 2 of the License, or (at 
your   *
-       * option) any later version.                                            
   *
+       * Written by Joseph Engo <address@hidden>                          *
+       * Modified by Stephen Brown <address@hidden>                        *
+       *  to distribute admin across the application directories               
   *
+       * --------------------------------------------                          
   *
+       *  This program is free software; you can redistribute it and/or modify 
it *
+       *  under the terms of the GNU General Public License as published by 
the   *
+       *  Free Software Foundation; either version 2 of the License, or (at 
your  *
+       *  option) any later version.                                           
   *
        
\**************************************************************************/
+
        /* $Id$ */
 
-       $GLOBALS['phpgw_info']['flags'] = array
-       (
-               'currentapp' => 'admin'
-       );
+       $GLOBALS['phpgw_info'] = array();
+       $GLOBALS['phpgw_info']['flags']['currentapp'] = 'admin';
        include('../header.inc.php');
 
-       header('Location: '. 
$GLOBALS['phpgw']->link('/index.php','menuaction=admin.uimainscreen.mainscreen'));
-       exit;
+       $GLOBALS['admin_tpl'] = CreateObject('phpgwapi.Template',PHPGW_APP_TPL);
+       $GLOBALS['admin_tpl']->set_file(
+               Array(
+                       'admin' => 'index.tpl'
+               )
+       );
+
+       $GLOBALS['admin_tpl']->set_block('admin','list');
+       $GLOBALS['admin_tpl']->set_block('admin','app_row');
+       $GLOBALS['admin_tpl']->set_block('admin','app_row_noicon');
+       $GLOBALS['admin_tpl']->set_block('admin','link_row');
+       $GLOBALS['admin_tpl']->set_block('admin','spacer_row');
+
+       $GLOBALS['admin_tpl']->set_var('title',lang('Administration'));
+
+       // This func called by the includes to dump a row header
+       function section_start($appname='',$icon='')
+       {
+               
$GLOBALS['admin_tpl']->set_var('icon_backcolor',$GLOBALS['phpgw_info']['theme']['row_off']);
+               
$GLOBALS['admin_tpl']->set_var('link_backcolor',$GLOBALS['phpgw_info']['theme']['row_off']);
+               
$GLOBALS['admin_tpl']->set_var('app_name',$GLOBALS['phpgw_info']['apps'][$appname]['title']);
+               $GLOBALS['admin_tpl']->set_var('a_name',$appname);
+               $GLOBALS['admin_tpl']->set_var('app_icon',$icon);
+               if ($icon)
+               {
+                       $GLOBALS['admin_tpl']->parse('rows','app_row',True);
+               }
+               else
+               {
+                       
$GLOBALS['admin_tpl']->parse('rows','app_row_noicon',True);
+               }
+       }
+
+       function section_item($pref_link='',$pref_text='')
+       {
+               $GLOBALS['admin_tpl']->set_var('pref_link',$pref_link);
+               $GLOBALS['admin_tpl']->set_var('pref_text',$pref_text);
+               $GLOBALS['admin_tpl']->parse('rows','link_row',True);
+       }
+
+       function section_end()
+       {
+               $GLOBALS['admin_tpl']->parse('rows','spacer_row',True);
+       }
+
+       function display_section($appname,$file,$file2=False)
+       {
+               if ($file2)
+               {
+                       $file = $file2;
+               }
+               if(is_array($file))
+               {
+                       section_start($appname,
+                               $GLOBALS['phpgw']->common->image(
+                                       $appname,
+                                       Array(
+                                               'navbar',
+                                               $appname,
+                                               'nonav'
+                                       )
+                               )
+                       );
+
+                       while(list($text,$url) = each($file))
+                       {
+                               section_item($url,lang($text));
+                       }
+                       section_end();
+               }
+       }
+
+       $GLOBALS['phpgw']->hooks->process('admin');
+       $GLOBALS['admin_tpl']->pparse('out','list');
+
+       $GLOBALS['phpgw']->common->phpgw_footer();
 ?>




reply via email to

[Prev in Thread] Current Thread [Next in Thread]