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/html/freecams1.com/public_html/admin/delMob.php
<?
//deletes mobile versions of all videos
include_once('db.php'); 
$result = dbQuery("SELECT * FROM content WHERE mobile != ''",false);
foreach($result as $row) { 
	echo "Processing $row[record_num]\n"; 
	$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.'/'; 
	$mobFile = $row['mobile'];
	$filepath = "$video_path/$subdir".$mobFile;
	if(is_file($filepath)) { 
		if(unlink($filepath)) {
			dbQuery("UPDATE content SET mobile = '' WHERE record_num = '$row[record_num]'");
		}
	}
}
exit("Done");