403Webshell
Server IP : 208.122.213.31  /  Your IP : 216.73.216.45
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 :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/httpd/html/store.tiacyrusxxx.com/public_html/xfcadmin/adm.content.modify.php
<?php
$requiredLevel = 9;
include ('adm.config.php');
include ('adm.header.php');

$msgSystem = '';

$pageAction = "Add";


if(!isset($content))
{
    $content = new \stdClass();
}


if ($_SERVER['REQUEST_METHOD'] == 'POST') {
	//NEW OR EDIT
	$content -> content_id = $_POST['content_id'];
     echo $content->content_id;
	if (isset($_POST['title']) && $_POST['title'] != "") {
		$content -> title = mysql_real_escape_string($_POST['title']);
	} else {
		$msgSystem .= msgSystem("Content Name was not provided.", "error");
	}

	if (isset($_POST['price']) && is_numeric($_POST['price'])) {
		$content -> price = $_POST['price'];
	} else {
		$msgSystem .= msgSystem("No Price was provided.", "error");
	}

	$content -> model_id = $_POST['model_id'];
	
	$content -> content_type = $_POST['content_type'];
	$content -> releasemonth = $_POST['releasemonth'];
	$content -> releaseday = $_POST['releaseday'];
	$content -> releaseyear = $_POST['releaseyear'];

	$content -> creationmonth = $_POST['creationmonth'];
	$content -> creationday = $_POST['creationday'];
	$content -> creationyear = $_POST['creationyear'];

	$content -> directory = mysql_real_escape_string($_POST['directory']);

	$content -> categories = mysql_real_escape_string($_POST['categories']);
	$content -> description = mysql_real_escape_string($_POST['description']);
	$content->status = mysql_real_escape_string($_POST['status']);
	
	
	$content->customID = mysql_real_escape_string($_POST['customID']);
	$content->contentLength = mysql_real_escape_string($_POST['contentLength']);
	
	
	if ($msgSystem == "") {

		$releaseDate = $content -> releaseyear . '-' . $content -> releasemonth . '-' . $content -> releaseday;
		$creationDate = $content -> creationyear . '-' . $content -> creationmonth . '-' . $content -> creationday;
		
		if($userDetails->xfcadmin == 9){
			$content -> pay_type = addslashes($_POST['pay_type']);
			$sqlAdd = ", `pay_type` = '".$content->pay_type."'";
		} else {
			$sqlAdd = "";
		}
		
		if (is_numeric($content -> content_id) && $content -> content_id > 0) {
			// UPDATE
			$existingCheck_sql = mysql_query("SELECT * FROM `cms_content` WHERE `content_id` = '" . $content -> content_id . "'") or die(mysql_error());
			if (mysql_num_rows($existingCheck_sql) == 1) {
				$pageAction = "Edit";
				$query = mysql_query("UPDATE cms_content SET 
						`content_type` =  '" . $content -> content_type . "', 
						`releasedate` =  '" . $releaseDate . "', 
						`shootdate` =  '" . $creationDate . "', 
						`title` =  '" . $content -> title . "', 
						`price` =  '" . $content -> price . "', 
						`customID` =  '" . $content -> customID . "', 
						`status` = '".$content->status."',
						`description` =  '" . $content -> description . "', 
						`contentLength` = '".$content->contentLength."',
						`categories` =  '" . $content -> categories . "', 
						`model_id` =  '" . $content -> model_id . "' ".$sqlAdd."
					WHERE `content_id` = '" . $content -> content_id . "'");
					printf("<meta http-equiv=\"Refresh\" content=\"0;url=./adm.content.php\">");
					exit;

			}
		} else {
			// INSERT
			$pageAction = "Add";
			$query = mysql_query("INSERT INTO cms_content SET
					content_type = '" . $content -> content_type . "',
					releasedate = '" . $releaseDate . "',
					shootdate = '" . $creationDate . "',
					title = '" . $content -> title . "',
					price = '" . $content -> price . "',
					status = '".$content->status."',
					customID =  '" . $content -> customID . "', 
					directory = '" . $content -> directory . "',
					description = '" . $content -> description . "',
					contentLength = '".$content->contentLength."',
					categories = '" . $content -> categories . "',
					model_id = '" . $content -> model_id . "'  ".$sqlAdd." ");
					$content_id = mysql_insert_id();
					
					if($content->customID > 0) {
						//?
					}
					
					printf("<meta http-equiv=\"Refresh\" content=\"0;url=./adm.content.generate.php?id=".$content_id."\">");
					exit;
		}
	}
} elseif (isset($_GET['id']) && is_numeric($_GET['id'])) {
	// EDIT
	$pageAction = "Edit";
	$content_id = mysql_real_escape_string($_GET['id']);
	$content_sql = mysql_query("SELECT * FROM cms_content WHERE content_id = '" . $content_id . "'") or die(mysql_error());
	if (mysql_num_rows($content_sql) == 1) {
		$content = mysql_fetch_object($content_sql);

		$releasedate = explode("-", $content -> releasedate);
		$content -> releasemonth = $releasedate[1];
		$content -> releaseday = $releasedate[2];
		$content -> releaseyear = $releasedate[0];

		$shootdate = explode("-", $content -> shootdate);
		$content -> creationmonth = $shootdate[1];
		$content -> creationday = $shootdate[2];
		$content -> creationyear = $shootdate[0];

		$content -> creationDate = $shootdate[1] . $shootdate[2] . substr($shootdate[0], 2);
		
	} else {
		die("not a valid content id");
		$content = new stdClass;
		$content->content_id = 0;
		$content->model_id = 0;
	}
} else {
	$content = new stdClass;
	$content->content_id = 0;
	$content->model_id = 0;
	$content->pay_type = 0;
}

?>
<h3><?php echo $pageAction; ?> Content</h3>
<form action="" id="mainForm" method="POST" class="form-horizontal">

<?php if($pageAction == "Edit"){
	$imageTN = $contentPathFree.$content->directory."/tn.jpg";
	$imageMain = $contentPathFree.$content->directory."/main.jpg";
?>

<?php if($content->content_type == 1 || $content->content_type == 4) { ?>
		<tr>
			<td colspan="2"><a href="adm.content.generate.php?id=<?php echo $content->content_id; ?>&regen=1">REGENERATE IMAGES & ZIP</a><br />
			</td>
		</tr>
<?php } ?>		
		<tr>
			<td colspan="2">THUMBNAIL<br />
				<?php if (is_file($imageTN)) {
					echo '<a href="adm.content.browse.php?id='.$content->content_id.'&cropType=tn"><img src="../'.$webPathFree .$content->directory .'/tn.jpg?v=' . uniqid() . '"></a>';
				} else {
					echo '<a href="adm.content.browse.php?id='.$content->content_id.'&cropType=tn">SELECT IMAGE</a>';
				}
				?>
			</td>
		</tr>
		<tr>
			<td colspan="2">MAIN IMAGE<br />
				<?php if (is_file($imageMain)) {
					echo '<a href="adm.content.browse.php?id='.$content->content_id.'&cropType=main"><img src="../'.$webPathFree .$content->directory .'/main.jpg?v=' . uniqid() . '"></a>';
				} else {
					echo '<a href="adm.content.browse.php?id='.$content->content_id.'&cropType=main">SELECT IMAGE</a>';
				}
				?>
			</td>
		</tr>
        <?php
		 
			$pre1 = '../content/models/' . $content->directory . '/pre1.jpg';
			$pre2 = '../content/models/' . $content->directory . '/pre2.jpg';
			$pre3 = '../content/models/' . $content->directory . '/pre3.jpg';
			$pre4 = '../content/models/' . $content->directory . '/pre4.jpg';
			$pre5 = '../content/models/' . $content->directory . '/pre5.jpg';
			$pre6 = '../content/models/' . $content->directory . '/pre6.jpg';
			$pre7 = '../content/models/' . $content->directory . '/pre7.jpg';
if($content->content_type == 1) {
?>
<div class="row no-gutters" align="center">
    <div class="col-md-4"><a href="adm.content.browse.php?id=<?php echo $content->content_id; ?>&cropType=pre1"><?php if(is_file($pre1)) { ?><img src="<?php echo $pre1; ?>"><?php } else { ?>SELECT IMAGE<?php } ?></a></div>
    <div class="col-md-4">
        <div class="row no-gutters">
            <div class="col-md-6"><a href="adm.content.browse.php?id=<?php echo $content->content_id; ?>&cropType=pre2"><?php if(is_file($pre2)) { ?><img src="<?php echo $pre2; ?>"><?php } else { ?>SELECT IMAGE<?php } ?></a></div>
            <div class="col-md-6"><a href="adm.content.browse.php?id=<?php echo $content->content_id; ?>&cropType=pre3"><?php if(is_file($pre3)) { ?><img src="<?php echo $pre3; ?>"><?php } else { ?>SELECT IMAGE<?php } ?></a></div>
            <div class="col-md-6"><a href="adm.content.browse.php?id=<?php echo $content->content_id; ?>&cropType=pre4"><?php if(is_file($pre4)) { ?><img src="<?php echo $pre4; ?>"><?php } else { ?>SELECT IMAGE<?php } ?></a></div>
            <div class="col-md-6"><a href="adm.content.browse.php?id=<?php echo $content->content_id; ?>&cropType=pre5"><?php if(is_file($pre5)) { ?><img src="<?php echo $pre5; ?>"><?php } else { ?>SELECT IMAGE<?php } ?></a></div>
            <div class="col-md-12"><a href="adm.content.browse.php?id=<?php echo $content->content_id; ?>&cropType=pre6"><?php if(is_file($pre6)) { ?><img src="<?php echo $pre6; ?>"><?php } else { ?>SELECT IMAGE<?php } ?></a></div>
        </div>
    </div>
    <div class="col-md-4"><a href="adm.content.browse.php?id=<?php echo $content->content_id; ?>&cropType=pre7"><?php if(is_file($pre7)) { ?><img src="<?php echo $pre7; ?>"><?php } else { ?>SELECT IMAGE<?php } ?></a></div>
</div>
<?php
} elseif ($content->content_type == 2) {
?>
<div class="row no-gutters" align="center">
    <div class="col-md-12">
            <div class="col-md-3"><a href="adm.content.browse.php?id=<?php echo $content->content_id; ?>&cropType=pre1"><?php if(is_file($pre1)) { ?><img src="<?php echo $pre1; ?>"><?php } else { ?>SELECT IMAGE<?php } ?></a></div>
            <div class="col-md-3"><a href="adm.content.browse.php?id=<?php echo $content->content_id; ?>&cropType=pre2"><?php if(is_file($pre2)) { ?><img src="<?php echo $pre2; ?>"><?php } else { ?>SELECT IMAGE<?php } ?></a></div>
            <div class="col-md-3"><a href="adm.content.browse.php?id=<?php echo $content->content_id; ?>&cropType=pre3"><?php if(is_file($pre3)) { ?><img src="<?php echo $pre3; ?>"><?php } else { ?>SELECT IMAGE<?php } ?></a></div>
            <div class="col-md-3"><a href="adm.content.browse.php?id=<?php echo $content->content_id; ?>&cropType=pre4"><?php if(is_file($pre4)) { ?><img src="<?php echo $pre4; ?>"><?php } else { ?>SELECT IMAGE<?php } ?></a></div>
    </div>
</div>
<?php		
}

	
}
?>

<?php if($userDetails->xfcadmin == 9){ ?>
 <div class="form-group">
	<label class="col-lg-2 control-label">Pay Type:</label>
    <div class="col-lg-4">
			<select name="pay_type"  class="form-control">
						<option value="0"<?php echo(isset($content ->pay_type) && $content ->pay_type == 0 ? " selected" : ""); ?>>PERCENTAGE</option>
						<option value="1"<?php echo(isset($content ->pay_type) && $content ->pay_type == 1 ? " selected" : ""); ?>>REVENUE SHARE (XFC)</option>
			</select>
    </div>
</div>		
<?php	
}
?>



 <div class="form-group">
	<label class="col-lg-2 control-label">Status:</label>
    <div class="col-lg-4">
			<select name="status"  class="form-control">
						<option value="0"<?php echo(isset($content ->status) && $content ->status == 0 ? " selected" : ""); ?>>DISABLED</option>
						<option value="1"<?php echo(isset($content ->status) && $content ->status == 1 ? " selected" : ""); ?>>ENABLED</option>
			</select>
    </div>
</div>		


 <div class="form-group">
	<label class="col-lg-2 control-label">Folder Location:</label>
    <div class="col-lg-4">
			<?php
			if(isset($content->directory) && $content->directory != "") {
				echo $content->directory;
			} else {					
			?>
			<select name="directory"  class="form-control">
				<?php
					contentDirSelect($contentPath,$contentPath,0);
					//contentDirSelect($contentPath,$contentPath.<<MODELNAME>>,1);
				?>
			</select>
			<?php
			}
			?>
    </div>
</div>

 <div class="form-group">
	<label class="col-lg-2 control-label">Content type:</label>
    <div class="col-lg-4">
					<select id="contentType" name="content_type"  class="form-control">
						<option>Select Content Type</option>
						<option value="1"<?php echo(isset($content -> content_type) && $content -> content_type == 1 ? " selected" : ""); ?>>Photoset</option>
						<option value="2"<?php echo(isset($content -> content_type) && $content -> content_type == 2 ? " selected" : ""); ?>>Video</option>
                        <option value="3"<?php echo(isset($content -> content_type) && $content -> content_type == 3 ? " selected" : ""); ?>>Custom Video</option>
                        <option value="4"<?php echo(isset($content -> content_type) && $content -> content_type == 4 ? " selected" : ""); ?>>Custom Photoset</option>
					</select>
    </div>
</div>
 <div class="form-group">
	<label class="col-lg-2 control-label">IF CUSTOM:</label>
    <div class="col-lg-4">
			<select name="customID"  class="form-control">
            <option value="0">NOT CUSTOM CONTENT</option>
				<?php
					getPendingCustom($userDetails->xfcadmin, $userDetails->model_id, $content->customID);
					//getPendingCustom($xfcadmin, $modelID, $curSelectID)
				?>
			</select>
    </div>
</div>

 <div class="form-group">
	<label class="col-lg-2 control-label">Content name:</label>
    <div class="col-lg-4">
			<input type="text" id="contentName" name="title" class="form-control" size="50" value="<?php echo(isset($content -> title) ? $content -> title : ""); ?>">
    </div>
</div>
 <div class="form-group">
	<label class="col-lg-2 control-label">Model:</label>
    <div class="col-lg-4">
					<select id="model_id" name="model_id" class="form-control">
						<?php
							modelListSelect("",$content->model_id);
						?>
					</select>
    </div>
</div>
 <div class="form-group">
	<label class="col-lg-2 control-label">Date of Production:</label>
    <div class="col-lg-2">
					<select id="creationmonth" name="creationmonth" class="form-control">
						<option value="0">Month</option>
						<option value="01"<?php echo(isset($content -> creationmonth) && $content -> creationmonth == "01" ? " selected" : ""); ?>>January</option>
						<option value="02"<?php echo(isset($content -> creationmonth) && $content -> creationmonth == "02" ? " selected" : ""); ?>>February</option>
						<option value="03"<?php echo(isset($content -> creationmonth) && $content -> creationmonth == "03" ? " selected" : ""); ?>>March</option>
						<option value="04"<?php echo(isset($content -> creationmonth) && $content -> creationmonth == "04" ? " selected" : ""); ?>>April</option>
						<option value="05"<?php echo(isset($content -> creationmonth) && $content -> creationmonth == "05" ? " selected" : ""); ?>>May</option>
						<option value="06"<?php echo(isset($content -> creationmonth) && $content -> creationmonth == "06" ? " selected" : ""); ?>>June</option>
						<option value="07"<?php echo(isset($content -> creationmonth) && $content -> creationmonth == "07" ? " selected" : ""); ?>>July</option>
						<option value="08"<?php echo(isset($content -> creationmonth) && $content -> creationmonth == "08" ? " selected" : ""); ?>>August</option>
						<option value="09"<?php echo(isset($content -> creationmonth) && $content -> creationmonth == "09" ? " selected" : ""); ?>>September</option>
						<option value="10"<?php echo(isset($content -> creationmonth) && $content -> creationmonth == "10" ? " selected" : ""); ?>>October</option>
						<option value="11"<?php echo(isset($content -> creationmonth) && $content -> creationmonth == "11" ? " selected" : ""); ?>>November</option>
						<option value="12"<?php echo(isset($content -> creationmonth) && $content -> creationmonth == "12" ? " selected" : ""); ?>>December</option>
					</select>
				</div>
				<div class="col-lg-2">
					<select id="creationday" name="creationday" class="form-control">
						<option value="0">Day</option>
						<?php
						$dayCounter = 1;

						while ($dayCounter < 32) {

							if ($dayCounter < 10) {
								$formattedDay = "0" . $dayCounter;
							} else {
								$formattedDay = $dayCounter;
							}

							echo '<option value="' . $formattedDay . '"' . (isset($content -> creationday) && $content -> creationday == $formattedDay ? " selected" : "") . '>' . $dayCounter . '</option>';

							$dayCounter++;

						}
						?>
					</select>
				</div>
				<div class="col-lg-2">
					<select id="creationyear" name="creationyear" class="form-control">
						<option value="0">Year</option>
						<?php

						$yearCounter = date("Y") + 2;

						while ($yearCounter >= 2009) {

							echo '<option value="' . $yearCounter . '"' . (isset($content -> creationyear) && $content -> creationyear == $yearCounter ? " selected" : "") . '>' . $yearCounter . '</option>';

							$yearCounter--;

						}
						?>
					</select>
    </div>
</div>
 <div class="form-group">
	<label class="col-lg-2 control-label">Price:</label>
    <div class="col-lg-4">
					<input type="text" name="price" size="6" class="form-control" value="<?php echo(isset($content -> price) ? $content -> price : "0"); ?>">
    </div>
</div>
 <div class="form-group">
	<label class="col-lg-2 control-label">Content Length (video ex: 4m 24s):</label>
    <div class="col-lg-4">
			<input type="text" id="contentLength" name="contentLength" class="form-control" size="50" value="<?php echo(isset($content -> contentLength) ? $content -> contentLength : ""); ?>">
    </div>
</div>

 <div class="form-group">
	<label class="col-lg-2 control-label">Release date:</label>
    <div class="col-lg-2">
					<select id="releasemonth" name="releasemonth" class="form-control">
						<option value="0">Month</option>
						<option value="01"<?php echo(isset($content -> releasemonth) && $content -> releasemonth == "01" ? " selected" : ""); ?>>January</option>
						<option value="02"<?php echo(isset($content -> releasemonth) && $content -> releasemonth == "02" ? " selected" : ""); ?>>February</option>
						<option value="03"<?php echo(isset($content -> releasemonth) && $content -> releasemonth == "03" ? " selected" : ""); ?>>March</option>
						<option value="04"<?php echo(isset($content -> releasemonth) && $content -> releasemonth == "04" ? " selected" : ""); ?>>April</option>
						<option value="05"<?php echo(isset($content -> releasemonth) && $content -> releasemonth == "05" ? " selected" : ""); ?>>May</option>
						<option value="06"<?php echo(isset($content -> releasemonth) && $content -> releasemonth == "06" ? " selected" : ""); ?>>June</option>
						<option value="07"<?php echo(isset($content -> releasemonth) && $content -> releasemonth == "07" ? " selected" : ""); ?>>July</option>
						<option value="08"<?php echo(isset($content -> releasemonth) && $content -> releasemonth == "08" ? " selected" : ""); ?>>August</option>
						<option value="09"<?php echo(isset($content -> releasemonth) && $content -> releasemonth == "09" ? " selected" : ""); ?>>September</option>
						<option value="10"<?php echo(isset($content -> releasemonth) && $content -> releasemonth == "10" ? " selected" : ""); ?>>October</option>
						<option value="11"<?php echo(isset($content -> releasemonth) && $content -> releasemonth == "11" ? " selected" : ""); ?>>November</option>
						<option value="12"<?php echo(isset($content -> releasemonth) && $content -> releasemonth == "12" ? " selected" : ""); ?>>December</option>
					</select>
				</div>
				<div class="col-lg-2">
					<select id="releaseday" name="releaseday" class="form-control">
						<option value="0">Day</option>
						<?php
						$dayCounter = 1;

						while ($dayCounter < 32) {

							if ($dayCounter < 10) {
								$formattedDay = "0" . $dayCounter;
							} else {
								$formattedDay = $dayCounter;
							}

							echo '<option value="' . $formattedDay . '"' . (isset($content -> releaseday) && $content -> releaseday == $formattedDay ? " selected" : "") . '>' . $dayCounter . '</option>';

							$dayCounter++;

						}
						?>
					</select>
				</div>
				<div class="col-lg-2">
					<select id="releaseyear" name="releaseyear" class="form-control">
						<option value="0">Year</option>
						<?php

						$yearCounter = date("Y") + 2;

						while ($yearCounter >= 2009) {

							echo '<option value="' . $yearCounter . '"' . (isset($content -> releaseyear) && $content -> releaseyear == $yearCounter ? " selected" : "") . '>' . $yearCounter . '</option>';

							$yearCounter--;

						}
						?>
					</select>
    </div>
</div>
 <div class="form-group">
	<label class="col-lg-2 control-label">Categories:</label>
    <div class="col-lg-4">
			<input id="tag_cloud" type="text" class="form-control" name="categories" value="<?php echo(isset($content -> categories) && $content -> categories != "" ? $content -> categories : ""); ?>">
    </div>
</div>
 <div class="form-group">
	<label class="col-lg-2 control-label">Description:</label>
    <div class="col-lg-4">
    <textarea name="description" cols="70" rows="7" class="form-control"><?php echo(isset($content -> description) && $content -> description != "" ? $content -> description : ""); ?></textarea>
    </div>
</div>

  <div class="form-group">
    <div class="col-sm-offset-2 col-sm-10">
      <button name="post" type="submit"  class="form-control">     <?php echo $pageAction; ?> Content     </button>
    </div>
  </div>
  
  
		<input type="hidden" name="content_id" value="<?php echo $content -> content_id; ?>">

</form>
</table>

Youez - 2016 - github.com/yon3zu
LinuXploit