$token = 0;
}
//print $token;
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
    if ($ROUTE[$_POST['function']]['method'] === 'POST') {
        if ($ROUTE[$_POST['function']]['url'] === 'deleteProduct') {
            $cont = new controllers();
            $cont->deleteProduct($_POST, $token);
        } else {
            if ($ROUTE[$_POST['function']]['url'] === 'addProduct') {
                $cont = new controllers();
                $cont->addProduct($_POST, $token);
            } else {
                if ($ROUTE[$_POST['function']]['url'] === 'searchProduct') {
                    $cont = new controllers();
                    $cont->searchProduct($_POST, $token);
                } else {
                    if ($ROUTE[$_POST['function']]['url'] === 'registration') {
                        $cont = new controllers();
                        $cont->registration($_POST);
                    } else {
                        if ($ROUTE[$_POST['function']]['url'] === 'login') {
                            $cont = new controllers();
                            $cont->login($_POST);
                        } else {
                            if ($ROUTE[$_POST['function']]['url'] === 'logout') {
                                $cont = new controllers();
                                $cont->logout($token);
                            } else {
                                if ($ROUTE[$_POST['function']]['url'] === 'viewAll') {
                                    $cont = new controllers();