? GR0V Shell

GR0V shell

Linux www.koreapackagetour.com 2.6.32-042stab145.3 #1 SMP Thu Jun 11 14:05:04 MSK 2020 x86_64

Path : /home/admin/public_html/old/
File Upload :
Current File : /home/admin/public_html/old/class.folders.php

<?
	/*
		this was developed to easily get the files/directory tree , not perfect for some but works for me :)
		
		developed by sab malik http://www.decodeit.biz
		you are free to use this code and distribute it but please keep the credits :)
	*/
	
	class folders{
		var $folders;

		function folderlist($folder_path = "" , $tree=true){	
			$handle = opendir($folder_path."/."); 	//-- open the directory to get all the files
			while (false !== ($file = readdir($handle))) { 
				if ($file != "." && $file != "..") { 
					if(is_dir($folder_path."/".$file)){
						$this->folders[] = $folder_path."/".$file;
						if($tree) $this->folderlist($folder_path."/".$file);
					}
				} 
			}
			return $this->folders;
		}	

		

		function filelist($folder_path){
			$files = array();
			$handle = opendir($folder_path."/."); 	//-- open the directory to get all the files
			while (false !== ($file = readdir($handle))) { 
				if ($file != "." && $file != "..") { 
					if(!is_dir($folder_path."/".$file)){
						$files[] = $folder_path."/".$file;	
					}
				} 
			}
			return $files;
		}
	}
?>

T1KUS90T
  root-grov@210.1.60.28:~$