HEX
Server: Apache
System: Linux msm5694.mjhst.com 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
User: camjab_ssh (1000)
PHP: 5.3.29
Disabled: NONE
Upload Files
File: //home/httpd/mech_ftp/baretube.com/admin/cli/checkForMissingVideoFiles.php
<?
//this script deletes local copies of hotlinked videos.
require("../../mb.php");

$result = mysqli_query($dbconn,"SELECT filename,record_num FROM content WHERE embed = '' AND hotlinked = '' AND plug_url = ''");
while($row = mysqli_fetch_assoc($result)) { 
	$first = $row['filename'][0];
	$second = $row['filename'][1]; 
	$third = $row['filename'][2];
	$forth = $row['filename'][3]; 
	$fifth = $row['filename'][4]; 	
	$subdir = $first.'/'.$second.'/'.$third.'/'.$forth.'/'.$fifth; 
	$filename = "$basepath/media/videos/$subdir/$row[filename]"; 
	if(!file_exists($filename)) { 
		echo str_replace($basepath."/","",$filename)."\r\n";
	}
}
?>