<?php

if(core::ifPost("event") AND core::ifPost("salarie")){
    
    if(event::subscribe() == TRUE){
        alert::recSuccess("Inscription de ". core::getPost("texte"));
        alert::recTab("salaries-tab");
    } else {
        alert::recError("ERRREUR : Inscription de ". core::getPost("texte"));
    }
    
    header("Location: /evenement-" . core::getPost("event").".html");
    exit();
}
