<?php
    $cible = isset($_GET['cible'])? $_GET['cible'] : "load";
    
    switch($cible){
		case 'caracteristique':
			$action = isset($_GET['action'])? trim($_GET['action']) : "load";
			switch($action){
				case 'load':{
					$page_title = "caracteristique";                  
					include("views/header.php");				
					include("views/caracteristique/home.php");
					include("views/footer.php");
					break;
				}
				case 'add':{
					$page_title = "Faire une caracteristique";
					include("views/caracteristique/ajouter.php");
					break;
				}
				case 'update':{
					$page_title = "Modifier une caracteristique";
					include("views/caracteristique/modifier.php");
					break;
				}
				case 'ajouter':{
					$page_title = "Ajouter une caracteristique";
					Caracteristique::ajouter();
					break;
				}
				case 'modifier':{
					$page_title = "Modifier caracteristique";
					Caracteristique::modifier();
					break;
				}

				case 'delete':{
					$page_title = "Supprimer caracteristique";
					Caracteristique::delete();
					break;
				}

			}
		break;
        case 'load':{
			$page_title = "Type Paiement";                    
			include("views/header.php");				
			include("views/categorie/home.php");
			include("views/footer.php");
			break;
		}
		case 'add':{
			include("views/categorie/ajouter.php");
			break;
		}
		case 'update':{
			include("views/categorie/modifier.php");
			break;
		}
		case 'ajouter':{
			$page_title = "Type biens";
			Categorie::ajouter();
			break;
		}	
		case 'modifier':{
			$page_title = "Type biens";
			Categorie::modifier();
			break;
		}	
		case 'delete':{
			$page_title = "Type biens";
			Categorie::delete();
			break;
		}
       		
        default:{
            header('location: ../home');
        }
            
    }

?>