<?php
ini_set('error_reporting', 0);

date_default_timezone_set('Asia/Kolkata');
$dbhost = 'localhost';
$dbname = 'geniusgr_gold_billing';
$dbuser = 'geniusgr_gold_billing';
$dbpass = 'geniusgr_gold_billing';
try {
	$pdo = new PDO("mysql:host={$dbhost};dbname={$dbname}", $dbuser, $dbpass);
	$pdo->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
	$statement = $pdo->prepare("SET SESSION sql_mode = 'NO_ENGINE_SUBSTITUTION';");
	$statement->execute();
}
catch( PDOException $exception ) {
	echo "Connection error :" . $exception->getMessage();
 	header("location: ../db-connection-error.php");
}

$statement_settings = $pdo->prepare("SELECT * FROM `tbl_settings`");
$statement_settings->execute();
$setting = $statement_settings->fetchAll(PDO::FETCH_ASSOC); 
$settings_totals = $statement_settings->rowCount();
if($settings_totals==0){ 
    header("location: create-panel-info.php"); 
}else{
    $site_name = $setting[0]['name'];
    $site_logo = $setting[0]['logo'];
    $site_favicon = $setting[0]['favicon'];
    $site_short_name = $setting[0]['short_name'];
}

?>