From be9c30647fe2adcb923a80b19431c285e69e6017 Mon Sep 17 00:00:00 2001 From: Davide Franco Date: Fri, 15 Jul 2011 15:58:36 +0200 Subject: [PATCH] bacula-web: New classes files CDBError and CDBResult in includes/db --- gui/bacula-web/includes/db/cdberror.class.php | 24 +++++++++++++++++++ .../includes/db/cdbresult.class.php | 11 +++++++++ 2 files changed, 35 insertions(+) create mode 100644 gui/bacula-web/includes/db/cdberror.class.php create mode 100644 gui/bacula-web/includes/db/cdbresult.class.php diff --git a/gui/bacula-web/includes/db/cdberror.class.php b/gui/bacula-web/includes/db/cdberror.class.php new file mode 100644 index 0000000000..d3ea3906ba --- /dev/null +++ b/gui/bacula-web/includes/db/cdberror.class.php @@ -0,0 +1,24 @@ +debug_level = $debug; + $this->message = $message; + + $this->raiseError(); + die(); + } + + public function raiseError() + { + echo '

Dabase error:

'; + echo 'Message: ' . $this->getMessage() . '
'; + echo 'Code: ' . $this->getCode() . '
'; + echo 'Line: ' . $this->getLine() . '
'; + echo 'File: ' . $this->getFile() . '
'; + } +} + +?> \ No newline at end of file diff --git a/gui/bacula-web/includes/db/cdbresult.class.php b/gui/bacula-web/includes/db/cdbresult.class.php new file mode 100644 index 0000000000..1d6a67395b --- /dev/null +++ b/gui/bacula-web/includes/db/cdbresult.class.php @@ -0,0 +1,11 @@ +setFetchMode( PDO::FETCH_ASSOC ); + } +} + +?> \ No newline at end of file -- 2.39.5