<?PHP 

namespace SitePage;

use Classe\Page;

if(!isset($v_idPage))
    $v_idPage="";



switch ($v_typePage){
    case "a":
        $pageClass= new Page($conn);
        $pageClass->ajoutModifPage("ajout"); 
        break;
    case "m":
       
        $pageClass= new Page($conn, $v_idPage);
        $pageClass->ajoutModifPage("modif");
        break;
    case "ajoutCommit":
        $pageClass= new Page($conn);
        $pageClass->ajoutModifPageCommit("ajout");
        break;
    case "modifCommit":
        $pageClass= new Page($conn, $v_idPage);
        $pageClass->ajoutModifPageCommit("modif");
        break;
    case "suppCommit":
        $pageClass= new Page($conn, $v_idPage);
        $pageClass->ajoutModifPageCommit("supp");
        break;
    case "pv":
        $pageClass= new Page($conn, $v_idPage);
        $pageClass->affichePageView();
        break;
    default:
        $pageClass= new Page($conn);
        $pageClass->affichePage();
}

?>


