<?php
require("includes/dbconnect.php");

$project_title = 'SIS DESC';
$project_name  = 'SIS DESC';

$zheadroot = $_SESSION['zheadroot'] = "mysoft365_sisdesc_root";


$redirect = explode('.', $_SERVER['HTTP_HOST'])[0];
//echo $redirect;
$getdbname = mysqli_query($conn, "SELECT `dbroot` FROM $zheadroot.`usermain` WHERE `redirect`='$redirect'") or die(mysqli_error($conn));
$fdbname = mysqli_fetch_array($getdbname);

$dbname = $fdbname['dbroot'];
$_SESSION["zdbroot"] = $dbname;
$_SESSION["zdir"] = $dbname;
$_SESSION["redirect"] = $redirect;
$zsuperflag = '';

ini_set("display_errors", 1);
error_reporting(E_ERROR);

?>