<?php

session_start();
    include_once '../config/database.php';
    include_once '../security/session_config.php';
    include_once '../security/csrf.php';
    include_once '../config/properties.php';
    require("../resources/offering.php");
    $csrf_token = $_POST['csrf_token'];
    validate_csrf_request($csrf_token);
    $offering = new Offering();
    switch ($_POST['mode']) {
        case "change": {
                $user_id = $_SESSION['uid'];
                $language_id = $_POST['language'];
                $offering->language_update($user_id, $language_id);
                break;
            }
        default:
            break;
    }

?>

