Adaptations in the dashboard for the LF server
[pharos.git] / tools / infra-dashboard / utils / database.php
1 <?php
2     include '../../../../auth-db.php';
3     date_default_timezone_set('UTC');
4     function connectDB() {
5         global $username;
6         global $password;
7         global $hostname;
8         global $dbname;
9
10         $dbhandle = mysql_connect($hostname, $username, $password)
11             or die("Unable to connect to MySQL.".mysql_error());
12         $selected = mysql_select_db($dbname,$dbhandle)
13             or die("Could not select opnfv_pharos DB.");
14     }
15
16     function closeDB(){
17         mysql_connect($dbhandle);
18     }
19
20 ?>