Server IP : 51.89.169.208 / Your IP : 3.148.107.92 Web Server : Apache System : Linux ns3209505.ip-198-244-202.eu 4.18.0-553.27.1.el8_10.x86_64 #1 SMP Tue Nov 5 04:50:16 EST 2024 x86_64 User : yellowleaf ( 1019) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /home/yellowleaf/public_html/_git/ |
Upload File : |
<? include_once 'accesscontrol.php'; $p = addslashes($_GET['p']); $ftp_server = "ftp.yellowdev.co.uk";$ftp_user_name = "staff@yellowdev.co.uk";$ftp_user_pass = "sumon455!T"; $ftp = ftp_connect($ftp_server); $login_result = ftp_login($ftp, $ftp_user_name, $ftp_user_pass); $path = '/'.$p.'/'; $files = ftp_mlsd($ftp, $path); foreach ($files as $file){ if ($file["type"] == "dir"){ $dir[] = $file["name"]; }elseif($file["type"] == "file"){ $fi[] = array("name"=>$file["name"],"size"=>$file["size"]); //$fi[] = $file["name"]; } } if (isset($dir)) { sort($dir); foreach($dir as $eachdirectory){ $destpath = '/home/postcode/public_html/yellowleaf.co.uk/'.$p.$eachdirectory; if (!file_exists($destpath)) { echo '<div style="line-height:35px"><p style="line-height:11px;"><a href="?p='.$p.$eachdirectory.'/">'.$eachdirectory.'</a> ❌ [folder does not exist on live server]</p></div>'; } else {echo '<p style="line-height:11px;"><a href="?p='.$p.$eachdirectory.'/">'.$eachdirectory.'</a></p>'; } } } //echo dirname(__FILE__); if (isset($fi)) { sort($fi); foreach($fi as $eachfiles){ $destpath = '/home/postcode/public_html/yellowleaf.co.uk/'.$p.$eachfiles["name"]; $filesize = @filesize($destpath); //$buff = ftp_mdtm($ftp, $eachfiles["name"]); if ($buff != -1) { // somefile.txt was last modified on: March 26 2003 14:16:41. //$lastmod = date("d F Y", $buff); } if(!$filesize){ $folder_files.= '<div style="line-height:35px;">'.$eachfiles["name"].' - <a href="get.php?p='.$p.'&f='.$eachfiles["name"].'">Check file ></a> ❌ [file does not exist on live server]</div>'; }elseif( $filesize == $eachfiles["size"]){ $folder_files.='<div style="line-height:35px;background-color:#e8ffea">'.$eachfiles["name"].' <a href="get.php?p='.$p.'&f='.$eachfiles["name"].'">Check file ></a> '.$lastmod.'</div>'; }else{ $folder_files.='<div style="line-height:35px;background-color:#ffeae8">'.$eachfiles["name"].' - <a href="get.php?p='.$p.'&f='.$eachfiles["name"].'">Check file ></a> '.$lastmod.'</div>'; } } } echo '<style>body{padding-top:65px;}</style>'; echo '<div style="width:50%;position:absolute;top:0;right:0;padding:10px;border-left:solid 1px #ddd;">'.$folder_files.'</div>' ?>