Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if ($handle = opendir('.')) {
- print ("<form action='' method='post' id='deleteFiles' name='deleteFiles' > <table border=1 cellpadding=5 cellspacing=0>
- <TR><TH>File Name</TH><th>File Size</th><th>Delete File?</th></TR>");
- while (false !== ($file = readdir($handle))) {
- if ($file != "." && $file != ".." && (!(is_dir($file)))) {
- print("<TR><Td>");
- if ((pathinfo($file, PATHINFO_EXTENSION)) == "mp4")
- {
- $_SESSION['videoFile'] = $_SESSION['user']."/".$file;
- echo "<a href='../../video/play.php' target='_blank'>$file</a>\n\n";
- }
- else
- {
- echo "<a href='$file\'>$file</a>\n";
- }
- print("</td><td>");
- $fileSize = round(((filesize($file))/1024/1024),4);
- echo $fileSize." MB <br>";
- $count += 1;
- $usedStorage = $fileSize + $usedStroage;
- print("</td>");
- print ("<td align='center'><input name='\' type='checkbox' value='$file' /></td>");
- }
- print("</tr></table>");
- }
- closedir($handle);
- }
- print("<input name='submitDeletedFiles' type='button' value='Submit' /></form>");
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement