2 /*=====================================================================*\
3 || ###################################################################
4 || # Blue Static ISSO Framework
5 || # Copyright (c)2005-2008 Blue Static
7 || # This program is free software; you can redistribute it and/or modify
8 || # it under the terms of the GNU General Public License as published by
9 || # the Free Software Foundation; version 2 of the License.
11 || # This program is distributed in the hope that it will be useful, but
12 || # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13 || # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
16 || # You should have received a copy of the GNU General Public License along
17 || # with this program; if not, write to the Free Software Foundation, Inc.,
18 || # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
19 || ###################################################################
20 \*=====================================================================*/
23 * ISSO Application Root (App.php)
28 // we need PHP 5.2.0 to run
29 if (!function_exists('array_fill_keys'))
31 print('You need PHP version 5.2.0 or newer to run ISSO');
35 // get rid of register_globals
36 if ((bool
)ini_get('register_globals') === true
)
38 $superglobals = array('_GET', '_COOKIE', '_FILES', '_POST', '_SERVER', '_ENV');
39 foreach ($superglobals as $global)
41 if (is_array($
{$global}))
43 foreach ($
{$global} as $_key => $_val)
54 require_once(ISSO
. '/Functions.php');
59 * This is an ISSO application class. It holds all of the ISSO system variables as well
60 * as serving as an object registry that is avaliable in the global scope to prevent
61 * globalization of variables. There can only be one instance of this existing
65 * @copyright Copyright (c)2005 - 2008, Blue Static
75 private static $debug = false
;
78 * An array of debug messages
81 private static $debugInfo = array();
86 private function __construct()
89 // ###################################################################
91 * Sets the debug state
93 * @param bool Debug mode on?
95 public static function set_debug($debug)
97 self
::$debug = $debug;
100 // ###################################################################
102 * Gets the debug mode state
104 * @return bool Debug mode on?
106 public static function get_debug()
111 // ###################################################################
113 * Adds a debug message to the array. This only works when debug mode
116 * @param string Debug message
118 public static function debug($msg)
122 self
::$debugInfo[] = $msg;
126 // ###################################################################
128 * Returns a <select> menu of all the debug notices
130 * @return string Debug list
132 public static function get_debug_list()
134 $output = '<select><option>Debug Notices (' . sizeof(self
::$debugInfo) . ')</option>';
135 foreach (self
::$debugInfo as $notice)
137 $output .= "<option>--- $notice</option>";
139 return "$output</select>";
142 // ###################################################################
161 public static $input;
167 public static $template;