| 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/dev/xfcadmin/ |
Upload File : |
<?php
function modelListSelect($urlPrefix, $curSelectID) {
$get_sql = mysql_query("SELECT * FROM cms_models ORDER BY name") or die(mysql_error());
if (mysql_num_rows($get_sql) > 0) {
while ($row = mysql_fetch_object($get_sql)) {
if ($urlPrefix == "") {
$option = $row -> model_id;
} else {
$option = $urlPrefix . $row -> model_id;
}
echo '<option value="' . $option . '"' . ($row -> model_id == $curSelectID ? " selected" : "") . '>' . $row -> name . '</option>';
}
}
}
function memberListSelect($urlPrefix, $curSelectID) {
$get_sql = mysql_query("SELECT * FROM cms_members WHERE status = '1' ORDER BY email") or die(mysql_error());
if (mysql_num_rows($get_sql) > 0) {
while ($row = mysql_fetch_object($get_sql)) {
if ($urlPrefix == "") {
$option = $row -> member_id;
} else {
$option = $urlPrefix . $row -> member_id;
}
echo '<option value="' . $option . '"' . ($row -> member_id == $curSelectID ? " selected" : "") . '>' . $row -> email . '</option>';
}
}
}
function contentDirSelect($hide, $directory, $model) {
$dirHandle = opendir($directory);
while ($file = readdir($dirHandle)) {
if (is_dir($directory . $file . "/") && $file != '.' && $file != '..' && $model == 1) {
$cleanDir = str_replace($hide, "", $directory);
$check_sql = mysql_query("SELECT directory FROM cms_content WHERE directory = '" . $cleanDir . "'") or die(mysql_error());
if (mysql_num_rows($check_sql) == 0) {
echo '<option value="' . $cleanDir . $file . '">' . $cleanDir . $file . '</option>';
}
} elseif (is_dir($directory . $file . "/") && $file != '.' && $file != '..') {
contentDirSelect($hide, $directory . $file . "/", 1);
}
}
//return $dirArr;
}
function generateImage($originalImage, $newImage, $new_w, $new_h, $quality) {
$src_img = imagecreatefromjpeg($originalImage);
$old_x = imageSX($src_img);
$old_y = imageSY($src_img);
if ($old_x > $old_y) {
$thumb_w = $new_w;
$thumb_h = $old_y * ($new_h / $old_x);
}
if ($old_x < $old_y) {
$thumb_w = $old_x * ($new_w / $old_y);
$thumb_h = $new_h;
}
if ($old_x == $old_y) {
$thumb_w = $new_w;
$thumb_h = $new_h;
}
$dst_img = ImageCreateTrueColor($thumb_w, $thumb_h);
imagecopyresampled($dst_img, $src_img, 0, 0, 0, 0, $thumb_w, $thumb_h, $old_x, $old_y);
imagejpeg($dst_img, $newImage, $quality);
imagedestroy($dst_img);
imagedestroy($src_img);
}
function buildAdminMenu($userDetails) {
/*
*
*
*
*
TAMMY ONLY * USERS (ADD/EDIT/DISABLE/DELETE) -> OFFER FREE CONTENT?
* MODELS (ADD/EDIT/DISABLE/DELETE)
* CONTENT (Custom Videos, Special Requests, Private Video)
* MESSAGES - INTEGRATED WITH CONTENT OR?
*
* BLOGS
*
* SETTINGS (Enable/Disable Custom Videos, Special Requests, Private Video)
* -- COMMENTS control?
*
* ACCOUNT - SALES & PAYOUTS
* PROFILE SETTINGS
* SUPPORT / CONTACT / ISSUES
*
* STORE?
*
* CATEGORY ADMINISTRATION?
*
*/
if ($userDetails -> xfcadmin == 9) {
// SITE WIDE ADMIN
} elseif ($userDetails -> xfcadmin == 1) {
// MODEL ADMIN
}
}
function uploadProfileImage($type, $model_id, $width, $height) {
include_once 'class.upload.php';
$foo = new upload($_FILES[$type]['tmp_name']);
if ($foo -> uploaded) {
$filename = $model_id . "_" . $type;
$foo -> file_new_name_body = $filename;
$foo -> image_resize = true;
$foo -> image_x = $width;
$foo -> image_y = $height;
$foo -> image_convert = 'jpg';
$foo -> file_new_name_ext = 'jpg';
$foo -> jpeg_quality = 90;
$foo -> image_ratio_crop = true;
$foo -> file_auto_rename = FALSE;
$foo -> file_overwrite = TRUE;
$foo -> Process('../content/models/');
if ($foo -> processed) {
return msgSystem('Image Uploaded Successfully', 'success');
} else {
return msgSystem('There was a problem uploading that image. (' . $foo -> error . ')', 'error');
}
} else {
return msgSystem('There was a problem uploading that image. (200)', 'error');
}
}
function createArchive($fullPath,$fileName) {
$zipFileName = $fullPath . $fileName;
if (is_file($zipFileName)) {
unlink($zipFileName);
}
$zip = new ZipArchive();
if ($zip -> open($zipfilename, ZIPARCHIVE::CREATE) !== TRUE) {
//return msgSystem("An archive was not able to be created.", "error");
}
$allFiles = array_map('basename', glob($fullPath . '/*'));
$images = preg_grep('/\.(jpg|jpeg|png|gif)$/i', $allFiles);
if (count($images) > 0) {
foreach ($images as $image) {
$explodedImage = explode("/", $image);
$imageFilename = end($explodedImage);
$zip -> addFile($fullPath . '/' . $image, $imageFilename);
}
if (is_file($zipFileName)) {
$zip -> close();
//return msgSystem("Archive was created.", "success");
}
}
$zip -> close();
}
?>