| 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/store.tiacyrusxxx.com/public_html/xfcadmin/ |
Upload File : |
<?php
ini_set('max_execution_time', '600');
set_time_limit(1800);
include_once ("adm.config.php");
if (!isset($_GET['id']) && !is_numeric($_GET['id'])) {
die("<br /><br />error 1<br /><br />");
}
if (isset($_GET['regen'])) {
$regen = 1;
} else {
$regen = 0;
}
$content_id = addslashes($_GET['id']);
if ($userDetails -> xfcadmin == 9) {
$sqlAdd = "";
} else {
$sqlAdd = " AND model_id = '" . $userDetails -> model_id . "'";
}
$get_sql = mysql_query("SELECT content_id, content_type, directory FROM cms_content WHERE content_id = '" . $content_id . "'" . $sqlAdd) or die(mysql_error());
if (mysql_num_rows($get_sql) == 0) {
die("<br /><br />error 2<br /><br />");
}
$contentInfo = mysql_fetch_object($get_sql);
$explodedDirectory = explode("/", $contentInfo -> directory);
$folderName = $explodedDirectory[1];
if (ob_get_level() == 0) { ob_start();
}
if ($contentInfo -> content_type == 2 || $contentInfo->content_type == 3) {
// VIDEO
$imageRootTN = $contentPathFree . $contentInfo -> directory;
if (!is_dir($imageRootTN)) {
mkdir($imageRootTN, 0777, true);
chmod($imageRootTN, 0777);
}
$videoRoot = $contentPath . $contentInfo -> directory;
$getVideos = array_map('basename', glob($videoRoot . '/*'));
$videoArr = preg_grep('/\.(wmv|mov|mp4|avi)$/i', $getVideos);
@mysql_query("DELETE FROM cms_content_items WHERE content_id = '" . $content_id . "'") or die(mysql_error());
foreach ($videoArr as $vid) {
@mysql_query("INSERT INTO cms_content_items SET content_id = '" . $content_id . "', filename = '" . $vid . "'") or die(mysql_error());
}
} elseif ($contentInfo -> content_type == 1 || $contentInfo -> content_type == 4) {
// PHOTOSET
$imageRoot = $contentPath . $contentInfo -> directory;
$imageRootTN = $contentPathFree . $contentInfo -> directory;
$imageRootMed = $imageRoot . '/med/';
$imageRootSmall = $imageRoot . '/small/';
if (!is_dir($imageRootTN)) {
mkdir($imageRootTN, 0777);
chmod($imageRootTN, 0777);
}
if (!is_dir($imageRootMed)) {
mkdir($imageRootMed, 0777);
chmod($imageRootMed, 0777);
}
if (!is_dir($imageRootSmall)) {
mkdir($imageRootSmall, 0777);
chmod($imageRootSmall, 0777);
}
$getImages = array_map('basename', glob($imageRoot . '/*'));
$imageArr = preg_grep('/\.(jpg|jpeg|png|gif)$/i', $getImages);
$imageArrTotal = count($imageArr);
mysql_query("DELETE FROM cms_content_items WHERE content_id = '" . $content_id . "'") or die(mysql_error());
mysql_query("UPDATE cms_content SET num_photos = '" . $imageArrTotal . "' WHERE content_id = '" . $content_id . "'") or die(mysql_error());
foreach ($imageArr as $img) {
echo $img . "...";
generateImage($imageRoot . '/' . $img, $imageRootTN . '/' . $img, 225, 225, 90);
echo "Thumbnail...";
generateImage($imageRoot . '/' . $img, $imageRootMed . '/' . $img, 1200, 1200, 75);
echo "Medium...";
generateImage($imageRoot . '/' . $img, $imageRootSmall . '/' . $img, 800, 800, 75);
echo "Small...<br />";
mysql_query("INSERT INTO cms_content_items SET content_id = '" . $content_id . "', filename = '" . $img . "'") or die(mysql_error());
ob_flush();
flush();
}
createZipArchive($imageRoot, $content_id . "_" . $folderName . '.zip');
}
ob_end_flush();
//printf("<meta http-equiv=\"Refresh\" content=\"0;url=./adm.content.modify.php?id=" . $content_id . "\">");
?>