From: Davide Franco Date: Fri, 15 Jul 2011 13:58:36 +0000 (+0200) Subject: bacula-web: New classes files CDBError and CDBResult in includes/db X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=be9c30647fe2adcb923a80b19431c285e69e6017;p=bacula%2Fbacula bacula-web: New classes files CDBError and CDBResult in includes/db --- 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