<?php
require_once($_SERVER['DOCUMENT_ROOT'] . "/include/config.php");
require_once($_SERVER['DOCUMENT_ROOT'] . "/include/Function/userClass.php");
require_once($_SERVER['DOCUMENT_ROOT'] . "/include/Function/Function.php");

$conn = dbConnect();
$message = new message();

$sql = "SELECT * FROM settings WHERE id ='1'";
$stmt = $conn->prepare($sql);
$stmt->execute();
$page = $stmt->fetch(PDO::FETCH_ASSOC);


$viesConn = "SELECT * FROM users WHERE acct_email=:acct_email";
$stmt = $conn->prepare($viesConn);
$stmt->execute([
    ':acct_email' => $_SESSION['acct_email']
]);
$row = $stmt->fetch(PDO::FETCH_ASSOC);


//USER STATUS
function userStatus($row)
{
    if ($row['acct_status'] == 'active') {
        return 'ACTIVE';
    }

    if ($row['acct_status'] == 'hold') {
        return 'ON HOLD';
    }
}


$userStatus = userStatus($row);
