FTP -> GIT (SYNC)
This commit is contained in:
		
							
								
								
									
										34
									
								
								app/views/Log.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								app/views/Log.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,34 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
 | 
			
		||||
class Log extends Template
 | 
			
		||||
{
 | 
			
		||||
	function __construct()
 | 
			
		||||
	{
 | 
			
		||||
		global $userManager;
 | 
			
		||||
		global $lang;
 | 
			
		||||
 | 
			
		||||
		if (!$userManager->isLogin()){
 | 
			
		||||
			header('Location: ./login');
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		$template = new Template('log');
 | 
			
		||||
		$template->prepare('title', 'Log');
 | 
			
		||||
 | 
			
		||||
		$result = array();
 | 
			
		||||
		$cdir = scandir('./app/logs/');
 | 
			
		||||
		foreach ($cdir as $key => $value)
 | 
			
		||||
		{
 | 
			
		||||
			if (!in_array($value,array(".","..")))
 | 
			
		||||
			{
 | 
			
		||||
				$result[$value] = $value;
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
		$template->prepare('logsFiles', $result);
 | 
			
		||||
		$template->prepare('lang', $lang);
 | 
			
		||||
 | 
			
		||||
		$template->render();
 | 
			
		||||
 | 
			
		||||
	}
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user