3 // ----------------------------------------------------------------------
4 // POST-NUKE Content Management System
5 // Copyright (C) 2001 by the Post-Nuke Development Team.
6 // http://www.postnuke.com/
7 // ----------------------------------------------------------------------
9 // PHP-NUKE Web Portal System - http://phpnuke.org/
10 // Thatware - http://thatware.org/
11 // ----------------------------------------------------------------------
14 // This program is free software; you can redistribute it and/or
15 // modify it under the terms of the GNU General Public License (GPL)
16 // as published by the Free Software Foundation; either version 2
17 // of the License, or (at your option) any later version.
19 // This program is distributed in the hope that it will be useful,
20 // but WITHOUT ANY WARRANTY; without even the implied warranty of
21 // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 // GNU General Public License for more details.
24 // To read the license please visit http://www.gnu.org/copyleft/gpl.html
25 // ----------------------------------------------------------------------
26 // Original Author of this file: Francisco Burzi
27 // Purpose of this file: Directs to the start page as defined in config.php
28 // ----------------------------------------------------------------------
34 include_once("../../globals.php");
35 include_once("$srcdir/calendar.inc");
36 include_once("$srcdir/patient.inc");
37 include "includes/pnre.inc.php";
38 include 'includes/pnAPI.php';
40 // From Michael Brinson 2006-09-19:
41 if ($_POST['pc_username']) $_SESSION['pc_username'] = $_POST['pc_username'];
43 // bug fix to allow default selection of a provider
44 if ($_GET['pc_username']) $_SESSION['pc_username'] = $_GET['pc_username'];
46 // FACILITY FILTERING (lemonsoftware)
47 $_SESSION['pc_facility'] = ( $_POST['pc_facility'] ) ?
$_POST['pc_facility'] : '0';
49 //if (empty($_GET['no_nav'])) {
50 // $_SESSION['last_calendar_page'] = $_SERVER['PHP_SELF'] . "?" . $_SERVER['QUERY_STRING'];
63 $type,) = pnVarCleanFromInput('module',
70 // Defaults for variables
72 pnVarCleanFromInput('catid');
75 // check requested module and set to start module if not present
77 $name = pnConfigGetVar('startpage');
78 // fixed for the new style of loading modules and set start page for them [class007]
84 // get module information
85 $modinfo = pnModGetInfo(pnModGetIDFromName($module));
87 if ($modinfo['type'] == 2)
89 // New-new style of loading modules
97 // it should be $module not $name [class007]
98 if (pnModAvailable($module)) {
99 if (pnModLoad($module, $type)) {
101 $return = pnModFunc($module, $type, $func);
112 // Sort out return of function. Can be
114 // false - display error msg
115 // text - return information
116 if ((empty($return)) ||
($return == false)) {
117 // Failed to load the module
118 $output = new pnHTML();
119 $output->StartPage();
120 $output->Text('Failed to load module ' . $module .' ( At function: "'.$func.'" )');
122 $output->PrintPage();
124 } elseif (strlen($return) > 1) {
126 $output = new pnHTML();
127 //$output->StartPage();
128 $output->SetInputMode(_PNH_VERBATIMINPUT
);
129 $output->Text($return);
130 $output->SetInputMode(_PNH_PARSEINPUT
);
131 //$output->EndPage();
132 $output->PrintPage();
140 // Old-old style of loading modules
148 include 'includes/legacy.php';
152 define("LOADED_AS_MODULE","1");
153 // added for the module/system seperation [class007]
154 if (file_exists('modules/' . pnVarPrepForOS($name) . '/' . pnVarPrepForOS($file) . '.php')) {
155 include 'modules/' . pnVarPrepForOS($name) . '/' . pnVarPrepForOS($file) . '.php';
157 // Failed to load the module
158 $output = new pnHTML();
159 //$output->StartPage();
160 $output->Text('Failed to load module ' . $module);
162 $output->PrintPage();
167 // Failed to load the module
168 $output = new pnHTML();
169 //$output->StartPage();
170 $output->Text('Sorry, you cannot access this file directly...');
172 $output->PrintPage();