You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					19 lines
				
				417 B
			
		
		
			
		
	
	
					19 lines
				
				417 B
			| 
								 
											2 years ago
										 
									 | 
							
								<?php
							 | 
						||
| 
								 | 
							
								session_start();
							 | 
						||
| 
								 | 
							
								if ($_SESSION["userContext"] != "admin") {
							 | 
						||
| 
								 | 
							
									exit();
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								$real_path = realpath($_SERVER["DOCUMENT_ROOT"] . $_SERVER["QUERY_STRING"]);
							 | 
						||
| 
								 | 
							
								if (empty($real_path)) {
							 | 
						||
| 
								 | 
							
									exit();
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								$dir_name = dirname($real_path);
							 | 
						||
| 
								 | 
							
								$dir_name = dirname($dir_name);
							 | 
						||
| 
								 | 
							
								if ($dir_name != $_SERVER["DOCUMENT_ROOT"] . "/rrd") {
							 | 
						||
| 
								 | 
							
									exit();
							 | 
						||
| 
								 | 
							
								}
							 | 
						||
| 
								 | 
							
								header("X-Accel-Redirect: " . $_SERVER["QUERY_STRING"]);
							 | 
						||
| 
								 | 
							
								header("Content-Type: image/png");
							 | 
						||
| 
								 | 
							
								
							 | 
						||
| 
								 | 
							
								?>
							 |