HEX
Server: Apache
System: Linux v38079.2is.nl 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: democfellows (10015)
PHP: 8.1.34
Disabled: opcache_get_status
Upload Files
File: /var/www/vhosts/creativefellows.nl/jhtaxatie.creativefellows.nl/src/middleware.php
<?php
	
	/*
	 * Login authentication
	 */
	$user 			= $_SESSION['session_id'];
	$role 			= $_SESSION['role'];
	$access			= $_SESSION['user_access'];	
	$password_reset	= $_SESSION['reset_password'];
	$authentication = new Authentication($user,$role,$access,$password_reset);

	
	/*
	 * Add Static header and footer to request, not in view pdf
	 */
	$app->add( function($request,$response,$next){

		$renderer 	= $this->get('renderer');	
		$route 		= $request->getAttribute('route');
		$no_header_footer = ["pdf.view","admin.export","inspection.pdf","inspection.viewupload","taxation.viewupload","enquiry.viewupload","inspection.bmwtstatus","request.catalog","request.functions","request.pdf","taxation.get.jh","request.export.cron"];
		
		if($route)
		{
			$routeName 	= $route->getName();
			$methods 	= $route->getMethods();			
			
		}
		
		if(!in_array($routeName,$no_header_footer))
		{	
					
			$response = $renderer->render($response, 'inc/header.php',array("router" => $this->router, "active" => $routeName ));
			$response = $next($request, $response);
			$response = $renderer->render($response, 'inc/footer.php');
		}
		else $response = $next($request, $response);
		
		return $response;
		
	});


?>