{
foreach ($installed_extensions as $ext)
{
- $s = $applications['system'];
- array_pop($applications);
- $applications[$ext['name']] = $ext['title'];;
- $applications['system'] = $s;
include_once("applications/".$ext['app_file']);
$class = $ext['name']."_app";
$this->add_application(new $class());
<?php
-
+/**********************************************************************
+ Copyright (C) FrontAccounting, LLC.
+ Released under the terms of the GNU Affero General Public License,
+ AGPL, as published by the Free Software Foundation, either version
+ 3 of the License, or (at your option) any later version.
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+ See the License here <http://www.gnu.org/licenses/agpl-3.0.html>.
+***********************************************************************/
include_once($path_to_root . "/includes/db/connect_db.inc");
include_once($path_to_root . "/includes/reserved.inc");
include_once($path_to_root . "/admin/db/users_db.inc");
include_once($path_to_root . "/includes/ui/ui_view.inc");
include_once($path_to_root . "/includes/ui/ui_controls.inc");
+ include_once($path_to_root . "/installed_extensions.php");
function page($title, $no_menu=false, $is_index=false, $onload="", $js="", $script_only=false)
{
- global $path_to_root;
+ global $path_to_root, $installed_extensions;
$hide_menu = $no_menu;
+ if ($no_menu==false && count($installed_extensions))
+ {
+ global $applications;
+ foreach ($installed_extensions as $ext)
+ {
+ $s = $applications['system'];
+ array_pop($applications);
+ $applications[$ext['name']] = $ext['title'];;
+ $applications['system'] = $s;
+ }
+ }
+
include($path_to_root . "/includes/page/header.inc");
page_header($title, $no_menu, $is_index, $onload, $js);
$installed_extensions = array ();
-/* example
+// example
+/*
$installed_extensions = array (
- 0 => array ('app_file' => 'organizer.php', 'name' => 'organizer', 'title' => 'Organizer', 'folder' => 'organizer')
+ 0 => array ('app_file' => 'organizer.php', 'name' => 'organizer', 'title' => 'Organizer', 'folder' => 'organizer'),
array ('app_file' => 'payroll.php', 'name' => 'payroll', 'title' => 'Payroll', 'folder' => 'payroll')
);
*/