<?php

require("includes/dbconnect.php");

$project_title = 'HUTFIT';
$project_name = 'HUTFIT';

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

$redirect = explode('.', $_SERVER['HTTP_HOST'])[0];
//echo $redirect;
$getdbname = mysqli_query($conn, "SELECT * FROM $zheadroot.`usermain` WHERE `redirect`='$redirect'") or die(mysqli_error($conn));
$fdbname = mysqli_fetch_array($getdbname);
$dbname = $fdbname['dbroot'];
//$menu = $fdbname['menu'];
//menu type 
//1 - All
//2 - Hut
//3 - Fit

$_SESSION["zdbroot"] = $dbname;
$_SESSION["zdir"] = $dbname;
$_SESSION["redirect"] = $redirect;
//$_SESSION["menutype"] = $menu;
$zsuperflag = '';


ini_set('display_errors', 1);
error_reporting(E_ERROR);
?>