X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fdb%2Flib.php;h=a75102395302e5b0ffdeb9967423968169374016;hb=c2e17d983fcbc0c3bd1dd37908d87c678f0367df;hp=6bc4e7397186c0398adb11eb27ef14e86c4c8f45;hpb=75ad748a68473ace540251427a74fb781b1145e9;p=mailer.git diff --git a/inc/db/lib.php b/inc/db/lib.php index 6bc4e73971..a751023953 100644 --- a/inc/db/lib.php +++ b/inc/db/lib.php @@ -10,9 +10,14 @@ * -------------------------------------------------------------------- * * Kurzbeschreibung : SQL-Typ auswaehlen * * -------------------------------------------------------------------- * - * * + * $Revision:: $ * + * $Date:: $ * + * $Tag:: 0.2.1-FINAL $ * + * $Author:: $ * + * Needs to be in all Files and every File needs "svn propset * + * svn:keywords Date Revision" (autoprobset!) at least!!!!!! * * -------------------------------------------------------------------- * - * Copyright (c) 2003 - 2008 by Roland Haeder * + * Copyright (c) 2003 - 2009 by Roland Haeder * * For more information visit: http://www.mxchange.org * * * * This program is free software; you can redistribute it and/or modify * @@ -32,28 +37,23 @@ ************************************************************************/ // Some security stuff... -if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) -{ - $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php"; - require($INC); -} +if (!defined('__SECURITY')) { + die(); +} // END - if -// Select MySQL 3 as default database type -if (_DB_TYPE == "_DB_TYPE") define('_DB_TYPE', "mysql3"); +// Is it not set? +if (!isConfigEntrySet('_DB_TYPE')) setConfigEntry('_DB_TYPE', 'mysql3'); // Create include file name -$INC = PATH."inc/db/lib-"._DB_TYPE.".php"; +$inc = sprintf("inc/db/lib-%s.php", getConfig('_DB_TYPE')); -if (file_exists($INC)) -{ +if (isIncludeReadable($inc)) { // Include abstraction layer - require_once($INC); -} - else -{ + loadIncludeOnce($inc); +} else { // Bye, bye... - die("Cannot load database abstraction layer! R.I.P."); + die('Cannot load database abstraction layer ' . getConfig('_DB_TYPE') . ' -> R.I.P.'); } -// +// [EOF] ?>