Пример #1
0
			
			if ( $debug ) echo "Redirection vers " . $page_redirection;
			else header( "Location: " . $page_redirection );
			exit();
		}
		// ---------------------------------------------- //
		
	} 
	// ------------------------------------------------------------------------ //
	
	
	// ---- GET GET GET ------------------------------------------------------- //
	elseif ( $_GET[ "action" ] == 'delete' ) {
		try {
			$produit = new Produit();
			$result = $produit->supprimer( $_GET[ "id" ], $debug );
			
			if ( !$debug ) header( "Location: /admin/produit/liste.php" );
		} 
		catch (Exception $e) {
			echo 'Erreur contactez votre administrateur <br> :',  $e->getMessage(), "\n";
			$goldbook = null;
			exit();
		}
	}
	// ------------------------------------------------------------------------ //
	
	
	// ---- ERREUR!!! --------------------------------------------------------- //
	else {
		header('Location: /admin/');