*/
public function __construct()
{
- BSApp::RequiredModules(array('Db', 'Input'));
+ BSApp::required_modules(array('Db', 'Input'));
}
// ###################################################################
throw new Exception('Field "' . $field . '" is not valid');
}
- $this->values["$field"] = ($doclean ? BSApp::Registry()->getType('Input')->clean($value, $this->fields["$field"][F_TYPE]) : $value);
+ $this->values["$field"] = ($doclean ? BSApp::registry()->getType('Input')->clean($value, $this->fields["$field"][F_TYPE]) : $value);
$this->setfields["$field"] = $field;
$this->_runActionMethod('pre_fetch', $doPre);
- $result = BSApp::Registry()->getType('Db')->queryFirst("SELECT * FROM {$this->prefix}{$this->table} WHERE {$this->condition}");
+ $result = BSApp::registry()->getType('Db')->queryFirst("SELECT * FROM {$this->prefix}{$this->table} WHERE {$this->condition}");
if (!$result)
{
return false;
$values[] = $this->_prepareFieldForSql($field);
}
- BSApp::Registry()->getType('Db')->query("INSERT INTO {$this->prefix}{$this->table} (" . implode(',', $fields) . ") VALUES (" . implode(',', $values) . ")");
+ BSApp::registry()->getType('Db')->query("INSERT INTO {$this->prefix}{$this->table} (" . implode(',', $fields) . ") VALUES (" . implode(',', $values) . ")");
- if (BSApp::Registry()->getType('DbPostgreSql'))
+ if (BSApp::registry()->getType('DbPostgreSql'))
{
foreach ($this->fields AS $field => $info)
{
}
}
- $this->insertid = BSApp::Registry()->getType('Db')->insertId($this->prefix . $this->table, $autofield);
+ $this->insertid = BSApp::registry()->getType('Db')->insertId($this->prefix . $this->table, $autofield);
}
else
{
- $this->insertid = BSApp::Registry()->getType('Db')->insertId();
+ $this->insertid = BSApp::registry()->getType('Db')->insertId();
}
$this->_runActionMethod('post_insert', $doPost);
}
$updates = implode(', ', $updates);
- BSApp::Registry()->getType('Db')->query("UPDATE {$this->prefix}{$this->table} SET $updates WHERE {$this->condition}");
+ BSApp::registry()->getType('Db')->query("UPDATE {$this->prefix}{$this->table} SET $updates WHERE {$this->condition}");
$this->_runActionMethod('post_update', $doPost);
}
$this->_runActionMethod('pre_remove', $doPre);
- BSApp::Registry()->getType('Db')->query("DELETE FROM {$this->prefix}{$this->table} WHERE {$this->condition}");
+ BSApp::registry()->getType('Db')->query("DELETE FROM {$this->prefix}{$this->table} WHERE {$this->condition}");
$this->_runActionMethod('post_remove', $doPost);
}
if ($type == TYPE_NONE OR $type == TYPE_STR OR $type == TYPE_STRUN)
{
- return "'" . BSApp::Registry()->getType('Db')->escapeString($this->values["$name"]) . "'";
+ return "'" . BSApp::registry()->getType('Db')->escapeString($this->values["$name"]) . "'";
}
else if ($type == TYPE_BOOL)
{
}
else if ($type == TYPE_BIN)
{
- return "'" . BSApp::Registry()->getType('Db')->escapeBinary($this->values["$name"]) . "'";
+ return "'" . BSApp::registry()->getType('Db')->escapeBinary($this->values["$name"]) . "'";
}
else
{
*/
protected function _verifyIsNotUnique($field)
{
- $res = BSApp::Registry()->getType('Db')->queryFirst("SELECT $field FROM {$this->prefix}{$this->table} WHERE $field = " . $this->_prepareFieldForSql($field) . (empty($this->condition) ? "" : " AND !({$this->condition})"));
+ $res = BSApp::registry()->getType('Db')->queryFirst("SELECT $field FROM {$this->prefix}{$this->table} WHERE $field = " . $this->_prepareFieldForSql($field) . (empty($this->condition) ? "" : " AND !({$this->condition})"));
if ($res)
{
$this->_error(new FieldException(sprintf(_('The "%1$s" field must contain a unique value'), $field), $field));
*
* @return object BSApp instance
*/
- private static function _Instance()
+ private static function _instance()
{
if (!self::$instance)
{
*
* @param string Application name
*/
- public static function SetApplication($name)
+ public static function set_application($name)
{
- self::_Instance()->application = $name;
+ self::_instance()->application = $name;
}
// ###################################################################
*
* @return string Application name
*/
- public static function GetApplication()
+ public static function get_application()
{
- return self::_Instance()->application;
+ return self::_instance()->application;
}
// ###################################################################
*
* @param string Path
*/
- public static function SetAppPath($path)
+ public static function set_app_path($path)
{
- self::_Instance()->appPath = BSFunctions::FetchSourcePath($path);
+ self::_instance()->appPath = BSFunctions::fetch_source_path($path);
}
// ###################################################################
*
* @return string Application path
*/
- public static function GetAppPath()
+ public static function get_app_path()
{
- return self::_Instance()->appPath;
+ return self::_instance()->appPath;
}
// ###################################################################
*
* @param string Application version
*/
- public static function SetAppVersion($vers)
+ public static function set_app_version($vers)
{
- self::_Instance()->appVersion = $vers;
+ self::_instance()->appVersion = $vers;
}
// ###################################################################
*
* @return string Application version
*/
- public static function GetAppVersion()
+ public static function get_app_version()
{
- return self::_Instance()->appVersion;
+ return self::_instance()->appVersion;
}
// ###################################################################
*
* @param string Path
*/
- public static function SetWebPath($path)
+ public static function set_web_path($path)
{
- self::_Instance()->webPath = BSFunctions::FetchSourcePath($path);
+ self::_instance()->webPath = BSFunctions::fetch_source_path($path);
}
// ###################################################################
*
* @return string Application's web path
*/
- public static function GetWebPath()
+ public static function get_web_path()
{
- return self::_Instance()->webPath;
+ return self::_instance()->webPath;
}
// ###################################################################
*
* @param bool Debug mode on?
*/
- public static function SetDebug($debug)
+ public static function set_debug($debug)
{
- self::_Instance()->debug = $debug;
+ self::_instance()->debug = $debug;
}
// ###################################################################
*
* @return bool Debug mode on?
*/
- public static function GetDebug()
+ public static function get_debug()
{
- return self::_Instance()->debug;
+ return self::_instance()->debug;
}
// ###################################################################
*
* @return StdClass
*/
- public static function Registry()
+ public static function registry()
{
- return self::_Instance()->registry;
+ return self::_instance()->registry;
}
// ###################################################################
*
* @param string Debug message
*/
- public static function Debug($msg)
+ public static function debug($msg)
{
- if (self::_Instance()->debug)
+ if (self::_instance()->debug)
{
- self::_Instance()->debugInfo[] = $msg;
+ self::_instance()->debugInfo[] = $msg;
}
}
*
* @return string Debug list
*/
- public static function GetDebugList()
+ public static function get_debug_list()
{
- $output = '<select><option>Debug Notices (' . sizeof(self::_Instance()->debugInfo) . ')</option>';
- foreach (self::_Instance()->debugInfo AS $notice)
+ $output = '<select><option>Debug Notices (' . sizeof(self::_instance()->debugInfo) . ')</option>';
+ foreach (self::_instance()->debugInfo AS $notice)
{
$output .= "<option>--- $notice</option>";
}
*
* @return object Instantiated module
*/
- public static function LoadModule($name)
+ public static function load_module($name)
{
- if (self::GetDebug())
+ if (self::get_debug())
{
include_once(ISSO . "/$name.php");
}
*
* @param array Array of module names to check for loadedness
*/
- public static function RequiredModules($modules)
+ public static function required_modules($modules)
{
foreach ($modules AS $module)
{
- if (self::Registry()->getType($module) == null)
+ if (self::registry()->getType($module) == null)
{
throw new Exception('The ' . $module . ' module is required in order to use this framework module');
}
*
* @return array List of timezones
*/
- public static function FetchTimeZoneList()
+ public static function fetch_time_zone_list()
{
$opt = array();
throw new BSDbException($this->_errorString(), $this->_errorNumber(), $string);
}
- $this->history[] = $history = array('query' => $string, 'time' => BSFunctions::FetchMicrotimeDiff($time), 'trace' => BSFunctions::FormatBacktrace(debug_backtrace()));
+ $this->history[] = $history = array('query' => $string, 'time' => BSFunctions::fetch_microtime_diff($time), 'trace' => BSFunctions::format_backtrace(debug_backtrace()));
if (defined('ISSO_SHOW_QUERIES_LIVE'))
{
*
* @return object Shared instance
*/
- private function _Instance()
+ private function _instance()
{
if (!self::$instance)
{
*
* @param string New path
*/
- public static function SetCookiePath($path)
+ public static function set_cookie_path($path)
{
- self::_Instance()->cookiePath = $path;
+ self::_instance()->cookiePath = $path;
}
// ###################################################################
*
* @param string Cookie domain
*/
- public static function SetCookieDomain($domain)
+ public static function set_cookie_domain($domain)
{
- self::_Instance()->cookieDomain = $domain;
+ self::_instance()->cookieDomain = $domain;
}
// ###################################################################
*
* @param integer Cookie timeout
*/
- public static function SetCookieTimeout($timeout)
+ public static function set_cookie_timeout($timeout)
{
- self::_Instance()->cookieTimeout = intval($timeout);
+ self::_instance()->cookieTimeout = intval($timeout);
}
// ###################################################################
* @param string Value of the cookie, FALSE to clear
* @param bool Is the cookie permanent?
*/
- public static function Cookie($name, $value, $sticky = true)
+ public static function cookie($name, $value, $sticky = true)
{
// expire the cookie
if ($value === false)
{
- setcookie($name, $value, time() - (2 * self::_Instance()->cookieTimeout), self::_Instance()->cookiePath, self::_Instance()->cookieDomain);
+ setcookie($name, $value, time() - (2 * self::_instance()->cookieTimeout), self::_instance()->cookiePath, self::_instance()->cookieDomain);
}
// set the cookie
else
}
else
{
- $expire = time() + self::_Instance()->cookieTimeout;
+ $expire = time() + self::_instance()->cookieTimeout;
}
- setcookie($name, $value, $expire, self::_Instance()->cookiePath, self::_Instance()->cookieDomain);
+ setcookie($name, $value, $expire, self::_instance()->cookiePath, self::_instance()->cookieDomain);
}
}
*
* @return string Path with directory separator ending
*/
- public static function FetchSourcePath($source)
+ public static function fetch_source_path($source)
{
if (substr($source, strlen($source) - 1) != DIRECTORY_SEPARATOR)
{
* @param string File name of the new file
* @param bool Whether or not to die after stringeaming the file
*/
- public static function DownloadFile($file, $name, $exit = true)
+ public static function download_file($file, $name, $exit = true)
{
- if (self::IsBrowser('ie') OR self::IsBrowser('opera') OR self::IsBrowser('safari'))
+ if (self::is_browser('ie') OR self::is_browser('opera') OR self::is_browser('safari'))
{
$mime = 'application/octetstream';
}
*
* @return bool Validity of the email address
*/
- public static function IsValidEmail($email)
+ public static function is_valid_email($email)
{
if (preg_match('#^[a-z0-9\.\-\+_]+?@(.*?\.)*?[a-z0-9\-_]+?\.[a-z]{2,4}$#i', $email))
{
*
* @param mixed False if there is no match, the version if there is
*/
- public static function IsBrowser($check, $version = '')
+ public static function is_browser($check, $version = '')
{
$useragent = strtolower($_SERVER['HTTP_USER_AGENT']);
$browser = array();
*
* @return string A random string
*/
- public static function Random($length = 0)
+ public static function random($length = 0)
{
// custom high and lows
if (is_array($length))
*
* @return mixed Return the elelment of the array that we just put the counter to
*/
- public static function ArraySetCurrent(&$array, $key)
+ public static function array_set_current(&$array, $key)
{
reset($array);
while (current($array) !== false)
*
* @return float Microtime difference
*/
- public static function FetchMicrotimeDiff($mtstart)
+ public static function fetch_microtime_diff($mtstart)
{
$mtend = microtime();
list($startMicro, $startSec) = explode(' ', $mtstart);
*
* @return string The extension for the specifid file name
*/
- public static function FetchExtension($filename)
+ public static function fetch_extension($filename)
{
$array = explode('.', $filename);
*
* @return integer The maximum file upload size in bytes
*/
- public static function FetchMaxPhpFileSize()
+ public static function fetch_max_php_file_size()
{
if ($size = @ini_get('upload_max_filesize'))
{
*
* @return array A list of all the files in the specified path
*/
- public static function ScanDirectory($path, $recurse = true, $ignoreDot = true)
+ public static function scan_directory($path, $recurse = true, $ignoreDot = true)
{
- return self::_helpScanDirectory($path, $recurse, $ignoreDot, '');
+ return self::_helpscan_directory($path, $recurse, $ignoreDot, '');
}
// ###################################################################
*
* @return array A list of all the files in the specified path
*/
- private static function _helpScanDirectory($path, $recurse = true, $ignoreDot = true, $pathAdd = '')
+ private static function _help_scan_directory($path, $recurse = true, $ignoreDot = true, $pathAdd = '')
{
$filelist = array();
- $path = self::FetchSourcePath($path);
+ $path = self::fetch_source_path($path);
$dir = new DirectoryIterator($path);
foreach ($dir AS $file)
if ($file->isDir() AND $recurse)
{
- $filelist = array_merge($filelist, self::_helpScanDirectory($path . $name, $recurse, $ignoreDot, $pathAdd . BSFunctions::FetchSourcePath(str_replace($path, '', $file->getPathname()))));
+ $filelist = array_merge($filelist, self::_helpscan_directory($path . $name, $recurse, $ignoreDot, $pathAdd . BSFunctions::fetch_source_path(str_replace($path, '', $file->getPathname()))));
continue;
}
*
* @return string Text with one type of line break
*/
- public static function ConvertLineBreaks($text, $convert_to = "\n")
+ public static function convert_line_breaks($text, $convert_to = "\n")
{
$text = trim($text);
$text = str_replace(array("\r\n", "\r", "\n"), "\n", $text);
*
* @return array Full-valued array
*/
- public static function ArrayStripEmpty($array)
+ public static function array_strip_empty($array)
{
foreach ($array AS $key => $value)
{
if (is_array($array["$key"]))
{
- $array["$key"] = self::ArrayStripEmpty($array["$key"]);
+ $array["$key"] = self::array_strip_empty($array["$key"]);
}
else if (empty($value) OR is_null($value))
{
*
* @return string Formatted output
*/
- public static function FormatBacktrace($backtrace)
+ public static function format_backtrace($backtrace)
{
// Unset call to debug_print_backtrace
array_shift($backtrace);
*
* @return string Part of a string
*/
- public static function Substring($string, $start, $end)
+ public static function substring($string, $start, $end)
{
return substr($string, $start, $end - $start);
}
set_magic_quotes_runtime(0);
// some debug info that's always useful
- BSApp::Debug('magic_quotes_gpc = ' . $this->magicquotes);
- BSApp::Debug('register_globals = ' . ini_get('register_globals'));
+ BSApp::debug('magic_quotes_gpc = ' . $this->magicquotes);
+ BSApp::debug('register_globals = ' . ini_get('register_globals'));
$this->_sanitizeInputData();
*/
public function escape($str, $force = true)
{
- $db = BSApp::Registry()->getType('Db');
+ $db = BSApp::registry()->getType('Db');
if ($this->magicquotes AND !$force)
{
if ($db)
throw new Exception('No external hosts are allowed to POST to this application');
exit;
}
- BSApp::Debug('remote post check = ok');
+ BSApp::debug('remote post check = ok');
}
else
{
- BSApp::Debug('remote post check = FAILED');
+ BSApp::debug('remote post check = FAILED');
}
}
}
{
$this->fileName = $fileName;
- BSApp::RequiredModules(array('Input'));
+ BSApp::required_modules(array('Input'));
$methods = get_class_methods($this);
foreach ($methods AS $name)
}
natsort($this->steps);
- $this->_runStep(BSApp::Registry()->getType('Input')->inputClean('step', TYPE_UINT));
+ $this->_runStep(BSApp::registry()->getType('Input')->inputClean('step', TYPE_UINT));
}
// ###################################################################
}
// load the input sanitizer
- $input = BSApp::Registry()->getType('Input');
+ $input = BSApp::registry()->getType('Input');
if ($input == null)
{
- BSApp::Debug(ISSO . '/Input not loaded, so manually doing so');
- $input = BSApp::LoadModule('Input');
+ BSApp::debug(ISSO . '/Input not loaded, so manually doing so');
+ $input = BSApp::load_module('Input');
}
// make sure we have a mailer
// TODO - add support for SMTP
if (!@ini_get('sendmail_path'))
{
- BSApp::Debug("email: no sendmail -> not sending");
+ BSApp::debug("email: no sendmail -> not sending");
return false;
}
}
// sanitize the body
- $bodyText = BSFunctions::ConvertLineBreaks($this->bodyText, $this->delim);
+ $bodyText = BSFunctions::convert_line_breaks($this->bodyText, $this->delim);
$bodyText = trim($input->unsanitize($bodyText, true));
if (empty($bodyText))
{
}
// attach additional headers
- $headers = BSFunctions::ConvertLineBreaks($this->headers, $this->delim);
+ $headers = BSFunctions::convert_line_breaks($this->headers, $this->delim);
$headers .= ((!preg_match("#{$this->delim}$#", $headers) AND $headers != '') ? "\n" : '') . "From: \"{$fromName}\" <{$from}>" . $this->delim;
$headers .= "Return-Path: {$from}" . $this->delim;
$headers .= "X-Mailer: ISSO Mail Framework" . $this->delim;
$boundary = 'ISSO-MULTIPART-' . BSFunctions::Rand(10);
$headers .= "Content-Type: multipart/alternative; boundary=\"$boundary\"" . $this->delim;
- $bodyHtml = BSFunctions::ConvertLineBreaks($this->bodyHtml, $this->delim);
+ $bodyHtml = BSFunctions::convert_line_breaks($this->bodyHtml, $this->delim);
// first part of the message (plaintext)
$body = "--$boundary" . $this->delim;
// attempt to send the mail!
if (mail($tostring, $subject, $body, $headers, "-f {$from}"))
{
- BSApp::Debug("email: sent to $address");
+ BSApp::debug("email: sent to $address");
}
else
{
- BSApp::Debug("email: error sending to $address");
+ BSApp::debug("email: error sending to $address");
}
}
*/
private function _fetchFirstLine($string)
{
- $string = BSFunctions::ConvertLineBreaks($string);
+ $string = BSFunctions::convert_line_breaks($string);
$broken = explode("\n", $string);
return $broken[0];
}
$input = BSApp::GetType('Input');
if ($input == null)
{
- BSApp::Debug(ISSO . '/Input not loaded, so manually doing so');
- $input = BSApp::LoadModule('Input');
+ BSApp::debug(ISSO . '/Input not loaded, so manually doing so');
+ $input = BSApp::load_module('Input');
}
$this->page = $input->inputClean($this->pagevar, TYPE_INT);
*
* @return BSPrinter Singleton instance
*/
- private static function _Instance()
+ private static function _instance()
{
if (!self::$instance)
{
*
* @return string Realm
*/
- public static function GetRealm()
+ public static function get_realm()
{
- return self::_Instance()->realm;
+ return self::_instance()->realm;
}
// ###################################################################
*
* @param string Realm
*/
- public static function SetRealm($realm)
+ public static function set_realm($realm)
{
- self::_Instance()->realm = $realm;
+ self::_instance()->realm = $realm;
}
// ###################################################################
*
* @return array Language array
*/
- public static function GetLanguageInformation()
+ public static function get_language_information()
{
- return self::_Instance()->language;
+ return self::_instance()->language;
}
// ###################################################################
*
* @param array Language array
*/
- public static function SetLanguageInformation($lang)
+ public static function set_language_information($lang)
{
- self::_Instance()->language = $lang;
+ self::_instance()->language = $lang;
}
// ###################################################################
*
* @return string Stylesheet link
*/
- public static function GetStylesheet()
+ public static function get_stylesheet()
{
- return self::_Instance()->stylesheet;
+ return self::_instance()->stylesheet;
}
// ###################################################################
*
* @param string Path
*/
- public static function SetStylesheet($stylesheet)
+ public static function set_stylesheet($stylesheet)
{
- self::_Instance()->stylesheet = $stylesheet;
+ self::_instance()->stylesheet = $stylesheet;
}
}
}
$output .= "\n" . '<div id="toplinks">';
- $output .= "\n\t" . '<div>' . BSApp::GetApplicaiton . ' ' . BSPrinter::GetRealm() . '</div>';
+ $output .= "\n\t" . '<div>' . BSApp::get_application() . ' ' . BSPrinter::get_realm() . '</div>';
$output .= "\n\t" . '<div id="toplinks-links">' . implode(' • ', $output2) . '</div>';
$output .= "\n" . '</div>';
* @param string Redirect message to be shown
* @param array An aray of POST variables to send through on the redirect
*/
- public static function Redirect($controller, $action, $message = null, $postvars = array())
+ public static function redirect($controller, $action, $message = null, $postvars = array())
{
if (!defined('ISSO_PRINTER_NO_NAVIGATION'))
{
$override = true;
}
- $page->addChild(BSPrinterRootElementPage::Message(_('Redirect'), $showmessage));
+ $page->addChild(BSPrinterRootElementPage::message(_('Redirect'), $showmessage));
$page->paint();
exit;
*
* @return BSPrinterRootElementTable A table
*/
- public static function Message($title, $message)
+ public static function message($title, $message)
{
$table = new BSPrinterRootElementTable();
* @param string Action to pass
* @param array Hidden parameters to pass to the next page
*/
- public static function Confirm($message, $controller, $action, $params)
+ public static function confirm($message, $controller, $action, $params)
{
if (!defined('ISSO_PRINTER_NO_NAVIGATION'))
{
$table->addChild(new BSPrinterTableElement(new BSPrinterLabelElement("<blockquote>$message</blockquote>")));
$no = new BSPrinterBaseElement('button', '__no__', _('No'));
$no->setOnClick('history.back(1); return false;');
- $table->addChild(BSPrinterTableElement::RowSubmit(array($no), _('Yes'), null));
+ $table->addChild(BSPrinterTableElement::row_submit(array($no), _('Yes'), null));
$form->addChild($table);
*
* @param string Error string
*/
- public static function Error($message)
+ public static function error($message)
{
if (!defined('ISSO_PRINTER_NO_NAVIGATION'))
{
}
$page = new BSPrinterRootElementPage(_('Error'));
- $page->addChild(BSPrinterRootElementPage::Message(_('Error'), $message));
+ $page->addChild(BSPrinterRootElementPage::message(_('Error'), $message));
$page->paint();
exit;
*/
public function paint()
{
- $language = BSPrinter::GetLanguageInformation();
+ $language = BSPrinter::get_language_information();
echo "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n";
echo "<html xml:lang=\"" . $language['langcode'] . "\" lang=\"" . $language['langcode'] . "\" dir=\"" . $language['direction'] . "\">\n<head>";
- echo "\n\t<title>" . sprintf(_('%1$s - %2$s - %3$s'), BSApp::GetApplication(), BSPrinter::GetRealm(), $this->title) . "</title>";
+ echo "\n\t<title>" . sprintf(_('%1$s - %2$s - %3$s'), BSApp::get_application(), BSPrinter::get_realm(), $this->title) . "</title>";
echo "\n\t<meta http-equiv=\"Content-Type\" content=\"text/html; charset=" . $language['charset'] . "\" />";
- echo "\n\t<link rel=\"stylesheet\" href=\"" . BSPrinter::GetStylesheet() . "\" />";
+ echo "\n\t<link rel=\"stylesheet\" href=\"" . BSPrinter::get_stylesheet() . "\" />";
echo "\n</head>\n<body>\n";
if (BSApp::GetType('PrinterNavigation') AND (!defined('ISSO_PRINTER_NO_NAVIGATION') OR !constant('ISSO_PRINTER_NO_NAVIGATION')))
echo BSApp::GetType('PrinterNavigation')->constructFooterHtml();
}
- $copyright = "\n<br />\n<p align=\"center\" class=\"copyright\">\n\t<a href=\"http://www.bluestatic.org\" target=\"_blank\">" . BSApp::GetApplication() . ' ' . BSApp::GetAppVersion() . ", ©2002 - " . gmdate('Y') . " Blue Static</a>\n</p>";
+ $copyright = "\n<br />\n<p align=\"center\" class=\"copyright\">\n\t<a href=\"http://www.bluestatic.org\" target=\"_blank\">" . BSApp::get_application() . ' ' . BSApp::get_app_version() . ", ©2002 - " . gmdate('Y') . " Blue Static</a>\n</p>";
if (!defined('ISSO_PRINTER_HIDE_SETUP'))
{
echo "\n\n\n";
- if (BSApp::GetDebug())
+ if (BSApp::get_debug())
{
if (defined('SVN') AND preg_match('#^\$Id:?#', constant('SVN')))
{
if (defined('ISSO_MT_START'))
{
- echo "\n<div align=\"center\">Executed in " . round(BSFunctions::FetchMicrotimeDiff(ISSO_MT_START), 10) . ' seconds</div>';
+ echo "\n<div align=\"center\">Executed in " . round(BSFunctions::fetch_microtime_diff(ISSO_MT_START), 10) . ' seconds</div>';
}
- echo "\n<br /><div align=\"center\">" . BSApp::GetDebugList() . "</div>\n";
+ echo "\n<br /><div align=\"center\">" . BSApp::get_debug_list() . "</div>\n";
if (BSApp::GetType('Db'))
{
*
* @return BSPrinterTableElement Table row element
*/
- public static function RowLabel($label, $value)
+ public static function row_label($label, $value)
{
$tr = new BSPrinterTableElement();
*
* @return BPrinterTableElement Table row element
*/
- public static function RowText($label, $name, $value = null, $password = false)
+ public static function row_text($label, $name, $value = null, $password = false)
{
$tr = new BSPrinterTableElement();
*
* @return BSPrinterTableElement Table row element
*/
- public static function RowSubmit(Array $children = null, $save = ':submit:', $reset = ':reset:')
+ public static function row_submit(Array $children = null, $save = ':submit:', $reset = ':reset:')
{
$build = '';
if (sizeof($children) > 0)
*
* @return BSPrinterTableElement Table row
*/
- public static function RowList($label, $name, Array $options)
+ public static function row_list($label, $name, Array $options)
{
$build = '';
foreach ($options AS $option)
}
else
{
- throw new Exception('Only BSPrinterBaseElement\'s of type "option" are allowed in BSPrinterTableElement::RowList()');
+ throw new Exception('Only BSPrinterBaseElement\'s of type "option" are allowed in BSPrinterTableElement::row_list()');
}
}
*
* @return BSPrinterTableElement Table row
*/
- public static function RowCheckbox($label, $name, Array $boxes)
+ public static function row_checkbox($label, $name, Array $boxes)
{
$build = '';
foreach ($boxes AS $boxLabel => $box)
}
else
{
- throw new Exception('Only BSPrinterBaseElement\'s of type "checkbox" are allowed in BSPrinterTableElement::RowCheckbox()');
+ throw new Exception('Only BSPrinterBaseElement\'s of type "checkbox" are allowed in BSPrinterTableElement::row_checkbox()');
}
}
*
* @return BSPrinterTableElement Upload form
*/
- public static function RowUpload($label, $name)
+ public static function row_upload($label, $name)
{
$tr = new BSPrinterTableElement();
*
* @return BSPrinterTableElement Yes-No row
*/
- public static function RowYesNo($label, $name, $yes)
+ public static function row_yes_no($label, $name, $yes)
{
$elm = new BSPrinterBaseElement('radio', $name, 1);
$elm->setActive($yes);
*
* @return BSPrinterTableElement Table row
*/
- public static function RowTextarea($label, $name, $value = null)
+ public static function row_textarea($label, $name, $value = null)
{
$tr = new BSPrinterTableElement();
*/
public function setTemplateDirectory($dir)
{
- $this->templateDir = BSFunctions::FetchSourcePath($dir);
+ $this->templateDir = BSFunctions::fetch_source_path($dir);
}
// ###################################################################
$dbCache = array();
if ($this->dbCacheTable)
{
- $db =& BSApp::Registry()->getType('Db');
+ $db =& BSApp::registry()->getType('Db');
$cache = $db->query("SELECT * FROM {$this->dbCacheTable} WHERE filename IN ('" . implode("', '", $namearray) . "')");
while ($tpl = $cache->fetchArray())
{
else
{
$this->uncached[$name] = (isset($this->uncached[$name]) ? $this->uncached[$name] + 1 : 0);
- BSApp::Debug("Manually loading template '$name'");
+ BSApp::debug("Manually loading template '$name'");
$template = $this->_loadTemplate($name);
$template = $this->_parseTemplate($template);
}
}
$debugBlock = '';
- if (BSApp::GetDebug())
+ if (BSApp::get_debug())
{
- $debugBlock .= "\n<div align=\"center\">Executed in " . round(BSFunctions::FetchMicrotimeDiff('0 ' . $_SERVER['REQUEST_TIME']), 10) . ' seconds</div>';
- $debugBlock .= "\n<br /><div align=\"center\">" . BSApp::GetDebugList() . "</div>";
+ $debugBlock .= "\n<div align=\"center\">Executed in " . round(BSFunctions::fetch_microtime_diff('0 ' . $_SERVER['REQUEST_TIME']), 10) . ' seconds</div>';
+ $debugBlock .= "\n<br /><div align=\"center\">" . BSApp::get_debug_list() . "</div>";
if (sizeof($this->uncached) > 0)
{
$debugBlock .= "<br /><div style=\"color: red\" align=\"center\"><strong>Uncached Templates:</strong>" . implode(', ', $tpls) . " )</div>\n";
}
- if (BSApp::Registry()->getType('Db'))
+ if (BSApp::registry()->getType('Db'))
{
- $queries = BSApp::Registry()->getType('Db')->getHistory();
+ $queries = BSApp::registry()->getType('Db')->getHistory();
$debugBlock .= "<br />\n" . '<table cellpadding="4" cellspacing="1" border="0" align="center" width="30%" style="background-color: rgb(60, 60, 60); color: white">' . "\n\t" . '<tr><td><strong>Query Debug</strong></td></tr>';
if ($template[$backPos] == '"')
{
// startPosition + length(startTag) + length(=\")
- $varMap[intval($varNum)] = BSFunctions::Substring($template, $capturePos + 3, $backPos - 1);
+ $varMap[intval($varNum)] = BSFunctions::substring($template, $capturePos + 3, $backPos - 1);
// remove our old substitution from the capture
- $capture = BSFunctions::Substring($template, $backPos + 1, $i);
+ $capture = BSFunctions::substring($template, $backPos + 1, $i);
break;
}
$backPos--;
else if ($template[$i] == '>' AND $template[$i - 1] == '"')
{
// the final variable substitution
- $varMap[intval($varNum)] = BSFunctions::Substring($template, $capturePos + 3, $i - 2);
+ $varMap[intval($varNum)] = BSFunctions::substring($template, $capturePos + 3, $i - 2);
$varEnds = $i;
break;
}
}
// this is the string that gets variable replacement
- $str = BSFunctions::Substring($template, $varEnds + 1, $end);
+ $str = BSFunctions::substring($template, $varEnds + 1, $end);
// create the complete varmap