Initial commit as release 1.1.0
This commit is contained in:
42
db.php.template
Normal file
42
db.php.template
Normal file
@@ -0,0 +1,42 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
db.php
|
||||
OpenDRS Online Discrepancy Reporting System
|
||||
Copyright (C) 2018 Rod Wright
|
||||
|
||||
SPDX-License-Identifier: GPL-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
************************************************************************
|
||||
** WARNING! This file is automatically generated during installation **
|
||||
** DO NOT EDIT **
|
||||
************************************************************************
|
||||
*/
|
||||
$dbname="DBNAME";
|
||||
$username="DBUSER";
|
||||
$dbpass="DBPASS";
|
||||
|
||||
function dberrmsg($dbname) {
|
||||
echo "
|
||||
<html>
|
||||
<head>
|
||||
<title>Database Error!</title>
|
||||
</head>
|
||||
<body>
|
||||
Could not connect to the $dbname database. Please ensure the MySQL server is running. If this is
|
||||
the first time you have used OpenMTS, please consult the INSTALL file included in the distribution.
|
||||
</body>
|
||||
</html>
|
||||
";
|
||||
exit();
|
||||
}
|
||||
|
||||
$drs_db=@mysqli_connect("localhost",$username,$dbpass,$dbname);
|
||||
if (mysqli_errno($drs_db)) {
|
||||
dberrmsg($dbname);
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user