| Server IP : 208.122.213.31 / Your IP : 216.73.216.185 Web Server : Apache System : Linux msd6191.mjhst.com 4.18.0-553.137.1.el8_10.x86_64 #1 SMP Wed Jun 24 11:40:24 UTC 2026 x86_64 User : WHMCS_MIA_382 ( 1001) PHP Version : 7.4.33 Disable Function : NONE MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /home/httpd/html/www.superporner.com/porn/admin/ |
Upload File : |
<?
include_once('db.php');
include_once('getid3/getid3.php');
//BOF YOU PROBABLY SHOULDN'T EDIT THIS
$result = mysql_query("SELECT * FROM status");
$row = mysql_fetch_array($result);
if($row[encoder_running] == 1) {
exit("Encoding already marked running!");
}
$counter = 0;
if(is_odd($thumbwidth)) {
$thumbwidth++;
}
if(is_odd($thumbheight)) {
$thumbheight++;
}
//EOF
$rresult = mysql_query("SELECT record_num FROM content WHERE approved = 1 AND photos = 0") or die(mysql_error());
if(mysql_num_rows($rresult) < 1) {
echo "No videos to encode!";
}
$encoderTotal = mysql_num_rows($rresult);
mysql_query("UPDATE status SET encoder_running = 1, encoder_total = '$encoderTotal'");
$result = mysql_query("SELECT * FROM content WHERE approved = 1 AND photos = 0");
while($row = mysql_fetch_array($result)) {
if($forceEncodeAll) {
if(eregi('\.flv',$row[filename]) || eregi('\.mp4',$row[filename])) {
$row[filename] = uniqid().'.mp4';
mysql_query("UPDATE content SET filename = '$row[filename]' WHERE record_num = '$row[record_num]'");
}
}
$replace = array("#"," ");
$row[filename] = str_replace($replace,'',$row[filename]);
mysql_query("UPDATE content SET filename = '$row[filename]' WHERE record_num = '$row[record_num]'");
$rrow[id] = $row['record_num'];
$first = $row['filename'][0];
$second = $row['filename'][1];
$third = $row['filename'][2];
$forth = $row['filename'][3];
$fifth = $row['filename'][4];
@mkdir($video_path.'/'.$first);
@mkdir($video_path.'/'.$first.'/'.$second);
@mkdir($video_path.'/'.$first.'/'.$second.'/'.$third);
@mkdir($video_path.'/'.$first.'/'.$second.'/'.$third.'/'.$forth);
@mkdir($video_path.'/'.$first.'/'.$second.'/'.$third.'/'.$forth.'/'.$fifth);
@mkdir($thumb_path.'/'.$first);
@mkdir($thumb_path.'/'.$first.'/'.$second);
@mkdir($thumb_path.'/'.$first.'/'.$second.'/'.$third);
@mkdir($thumb_path.'/'.$first.'/'.$second.'/'.$third.'/'.$forth);
@mkdir($thumb_path.'/'.$first.'/'.$second.'/'.$third.'/'.$forth.'/'.$fifth);
$subdir = $first.'/'.$second.'/'.$third.'/'.$forth.'/'.$fifth.'/';
if(!$forceEncodeAll) {
if(stripos($row['orig_filename'],'.mp4') || stripos($row['orig_filename'],'.flv') || stripos($row['orig_filename'],'.f4v') || stripos($row['orig_filename'],'.m4v')) {
//file is FLV/MP4 so we just copy instead of encoding
$q = "cp \"".$content_path."/".$row['orig_filename']."\" \"$video_path/$subdir".$row['filename']."\"";
echo "Copying... ".$row['orig_filename']." -> ".$row[filename]."\n";
echo "Command: ".$q."\n";
shell_exec($q);
if(stripos($row[orig_filename],'.mp4') !== false) {
shell_exec("$mp4box_path -inter 500 \"$video_path/$subdir".$row['filename']."\"");
}
if(stripos($row[orig_filename],'.flv') !== false) {
shell_exec("$yamdi_path -i \"$video_path/$subdir".$row['filename']."\" -o \"$video_path/$subdir".$row['filename'].".new\"");
if(file_exists("$video_path/$subdir".$row['filename'].".new") && filesize("$video_path/$subdir".$row['filename'].".new") > 48) {
shell_exec("rm \"$video_path/$subdir".$row['filename']."\"");
shell_exec("mv \"$video_path/$subdir".$row['filename'].".new\" \"$video_path/$subdir".$row['filename']."\"");
}
}
}
else {
//file is not flv/mp4 so we must encode.
$q = "$ffmpeg_path -i \"".$content_path."/".$row['orig_filename']."\" $ffmpeg_command \"$video_path/$subdir".$row['filename']."\"";
echo "Encoding... ".$row['orig_filename']." -> ".$row['filename']."\n";
echo "Command: ".$q."\n";
shell_exec($q);
shell_exec("$mp4box_path -inter 500 \"$video_path/$subdir".$row[filename]."\"");
}
} else {
$q = "$ffmpeg_path -i \"".$content_path."/".$row['orig_filename']."\" $ffmpeg_command \"$video_path/$subdir".$row['filename']."\"";
echo "Encoding... ".$row['orig_filename']." -> ".$row['filename']."\n";
echo "Command: ".$q."\n";
shell_exec($q);
shell_exec("$mp4box_path -inter 500 \"$video_path/$subdir".$row[filename]."\"");
}
if($encodeMobile) {
//encode mobile if it's on
$mobFile = uniqid().'.mp4';
$q = "$ffmpeg_path -i \"".$content_path."/".$row['orig_filename']."\" $ffmpeg_mobile_command \"$video_path/$subdir"."$mobFile\"";
echo "Encoding... ".$row['orig_filename']." -> ".$row['filename']."\n";
echo "Command: ".$q."\n";
shell_exec($q);
shell_exec("$mp4box_path -inter 500 \"$video_path/$subdir"."$mobFile\"");
if(file_exists($video_path."/$subdir".$mobFile) && filesize($video_path."/$subdir".$mobFile) > 0) {
dbReconnect();
mysql_query("UPDATE content SET mobile = '$mobFile' WHERE record_num = '$rrow[id]'");
}
}
if($encodeTrailer) {
//encode trailer if it's on
$trailer = uniqid().'.mp4';
$q = "$ffmpeg_path -i \"".$content_path."/".$row['orig_filename']."\" -ss $trailerFrom -t $trailerDuration $ffmpeg_command \"$video_path/$subdir".$trailer."\"";
echo "Encoding... ".$row['orig_filename']." -> ".$trailer."\n";
echo "Command: ".$q."\n";
shell_exec($q);
shell_exec("$mp4box_path -inter 500 \"$video_path/$subdir"."$trailer\"");
if(file_exists($video_path."/$subdir".$mobFile) && filesize($video_path."/$subdir".$trailer) > 0) {
dbReconnect();
mysql_query("UPDATE content SET trailer_filename = '$trailer' WHERE record_num = '$rrow[id]'");
}
}
if(file_exists($video_path."/$subdir".$row['filename']) && filesize($video_path."/$subdir".$row['filename']) > 0) {
$target_movie = $video_path."/$subdir".$row['filename'];
if(1) {
$getID3 = new getID3;
$ThisFileInfo = $getID3->analyze("$video_path/$subdir".$row['filename']);
$reallengthid3 = $ThisFileInfo['playtime_string'];
$thisarray = explode(':',$reallengthid3);
$length = ($thisarray[0]*60)+$thisarray[1];
$movie_width = $ThisFileInfo['video']['resolution_x'];
$movie_height = $ThisFileInfo['video']['resolution_y'];
if($numFrames == 0) {
$numFrames = $length*15;
}
dbReconnect();
mysql_query("UPDATE content SET length = '$length' WHERE record_num = '$rrow[id]'");
$dirname = str_replace('.flv','',$row['orig_filename']);
@mkdir('../media/thumbs/'.$subdir.$dirname);
//create thumbnails
echo "Total Length: $length\n";
$interval = floor($length/13);
$first = 1;
for($i = 0; $i <11; $i++) {
if($first) {
$target_image = "$thumb_path/$subdir$dirname/".$row['orig_filename']."-$i.jpg";
$target_imageb = "$thumb_path/$subdir$dirname/".$row['orig_filename']."-$i"."b.jpg";
if($length) {
echo "Creating thumb #$i at second: $first...";
shell_exec("$ffmpeg_path -ss $first -i \""."$video_path/$subdir".$row['filename']."\" -vcodec mjpeg -vframes 1 -an -f rawvideo -s ".$thumbwidth."x".$thumbheight." \"$target_image\"");
shell_exec("$ffmpeg_path -ss $first -i \""."$video_path/$subdir".$row['filename']."\" -vcodec mjpeg -vframes 1 -an -f rawvideo -s 640x480 \"$target_imageb\"");
if(file_exists($target_image)) {
echo "Success!\n";
}
else {
echo "Failure! Unable to create thumbnail!\n";
}
if(file_exists("/usr/local/bin/mogrify")) {
shell_exec("/usr/local/bin/mogrify $imagick_command $target_image");
}
else {
shell_exec("/usr/bin/mogrify $imagick_command $target_image");
}
}
$first = $first+$interval;
}
}
if($row['source_thumb_url']) {
$fileSource = file_get_contents($row['source_thumb_url']);
if(strlen($fileSource) > 48) {
$target_image = "$thumb_path/$subdir$dirname/".$row[orig_filename]."-1.jpg";
file_put_contents($target_image,$fileSource);
shell_exec("$mogrify_path -resize ".($thumbwidth)."x".($thumbheight)."^ -gravity Center -extent ".$thumbwidth."x".$thumbheight." \"$target_image\"");
dbReconnect();
mysql_query("UPDATE content SET main_thumb = 1 WHERE record_num = '$rrow[id]'") or die(mysql_error());
}
}
dbReconnect();
mysql_query("UPDATE content SET approved = 2, encoded_date = NOW(), movie_width = '$movie_width', movie_height = '$movie_height' WHERE record_num = '$rrow[id]'") or die(mysql_error());
mysql_query("UPDATE status SET encoder_done = encoder_done+1") or die(mysql_error());
//check and insert CRC
if($row['orig_filename']) {
$origFileCRC = md5_file("$content_path/".$row['orig_filename']);
$newFileCRC = md5_file("$video_path/$subdir".$row['filename']);
dbReconnect();
mysql_query("INSERT INTO content_crc32 (checksum, content) VALUES ('$origFileCRC','$rrow[id]')");
if($newFileCRC != $origFileCRC) {
mysql_query("INSERT INTO content_crc32 (checksum, content) VALUES ('$newFileCRC','$rrow[id]')");
}
}
//add to appropriate categories.
if($row[keywords]) {
$parray = explode(',',$row[keywords]);
foreach($parray as $p) {
$p = trim($p);
$tresult = mysql_query("SELECT record_num FROM niches WHERE name LIKE '$p' OR (csv_match != '' AND csv_match LIKE '%$p%')");
if(mysql_num_rows($tresult) > 0) {
$trow = mysql_fetch_array($tresult);
mysql_query("INSERT INTO content_niches (niche, content) VALUES ($trow[record_num], $rrow[id])");
unset($trow, $tresult);
}
}
}
//delete source
unlink("$content_path/".$row['orig_filename']);
if($deleteHotlinkedVideos && $row['hotlinked']) {
unlink("$video_path/$subdir".$row['filename']);
}
echo "Success!\n\n";
$counter++;
}
}
else {
dbReconnect();
echo "Failure!\n\n";
}
}
echo "\n----------------------\nEncoding Complete - $counter videos converted";
dbReconnect();
mysql_query("UPDATE status SET encoder_running = 0, encoder_total = 0, encoder_done = 0");
?>