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/dev/xfcadmin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

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

$msgSystem = '';

$pageAction = "Add";

if ($_SERVER['REQUEST_METHOD'] == 'POST') {
	//NEW OR EDIT
	$content -> content_id = $_POST['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']);

	if ($msgSystem == "") {

		$releaseDate = $content -> releaseyear . '-' . $content -> releasemonth . '-' . $content -> releaseday;
		$creationDate = $content -> creationyear . '-' . $content -> creationmonth . '-' . $content -> creationday;

		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 . "', 
						`description` =  '" . $content -> description . "', 
						`categories` =  '" . $content -> categories . "', 
						`model_id` =  '" . $content -> model_id . "', 
					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 . "',
					directory = '" . $content -> directory . "',
					description = '" . $content -> description . "',
					categories = '" . $content -> categories . "',
					model_id = '" . $content -> model_id . "'");
					$content_id = mysql_insert_id();
					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;
}

?>

<form action="" id="mainForm" enctype="multipart/form-data" method="POST">
	<table width="800" border="0" align="center" cellpadding="5" cellspacing="0">
		<tr>
			<td bgcolor="#CCCCCC" colspan="2"><span class="fourbold"><?php echo $pageAction; ?> Content</span></td>
		</tr>
		<tr>
			<td colspan="2">
			<?php
			if (isset($msgSystem)) {
				echo $msgSystem;
			}
			?></td>
		</tr>
<?php if($pageAction == "Edit"){
	$imageTN = $contentPathFree.$content->directory."/tn.jpg";
	$imageMain = $contentPathFree.$content->directory."/main.jpg";
?>
		<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>
		
		<tr>
			<td colspan="2">THUMBNAIL<br />
				<?php if (is_file($imageTN)) {
					echo '<a href="adm.content.browse.php?id='.$content->content_id.'&ct=tn"><img src="../../'.$webPathFree .$content->directory .'/tn.jpg"></a>';
				} else {
					echo '<a href="adm.content.browse.php?id='.$content->content_id.'&ct=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.'&ct=main"><img src="../../'.$webPathFree .$content->directory .'/main.jpg"></a>';
				} else {
					echo '<a href="adm.content.browse.php?id='.$content->content_id.'&ct=main">SELECT IMAGE</a>';
				}
				?>
			</td>
		</tr>
		
<?php	
	
}
?>
		<tr>
			<td width="115">
			<div align="right">
				Folder Location
			</div></td>
			<td>
			<?php
			if(isset($content->directory) && $content->directory != "") {
				echo $content->directory;
			} else {					
			?>
			<select name="directory" class="grey">
				<?php
					contentDirSelect($contentPath,$contentPath,0);
					//contentDirSelect($contentPath,$contentPath.<<MODELNAME>>,1);
				?>
			</select>
			<?php
			}
			?>
			</td>
		</tr>

		<tr>
			<td width="115">
			<div align="right">
				Content type
			</div></td>
			<td>
			<div class="row">
				<div class="large-4 columns">
					<select id="contentType" name="content_type" class="grey">
						<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>
					</select>
				</div>
			</div></td>

		</tr>
				<tr>
			<td width="115">
			<div align="right">
				Content name
			</div></td>
			<td>
			<input type="text" id="contentName" name="title" class="grey" size="50" value="<?php echo(isset($content -> title) ? $content -> title : ""); ?>">
			</td>
		</tr>
		<tr>
			<td>
			<div align="right">
				Model
			</div></td>
			<td>
			<div class="row">
				<div class="large-4 columns">
					<select id="model_id" name="model_id" class="grey">
						<?php
							modelListSelect("",$content->model_id);
						?>
					</select>
				</div>
			</div></td>
		</tr>		
		<tr>
			<td width="115">
			<div align="right">
				Date of Production
			</div></td>
			<td>
			<div class="row">

				<div class="large-3 columns">
					<select id="creationmonth" name="creationmonth" class="grey">
						<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="large-3 columns">
					<select id="creationday" name="creationday" class="grey">
						<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="large-3 columns">
					<select id="creationyear" name="creationyear" class="grey">
						<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></td>
		</tr>
		<tr>
			<td width="115">
			<div align="right">
				Price
			</div></td>
			<td>
			<div class="row">
				<div class="large-4 columns">
					<input type="text" name="price" size="6" class="grey" value="<?php echo(isset($content -> price) ? $content -> price : "0"); ?>">
				</div>
			</div></td>
		</tr>



		<tr>
			<td width="115">
			<div align="right">
				Release date
			</div></td>
			<td>
			<div class="row">

				<div class="large-3 columns">
					<select id="releasemonth" name="releasemonth" class="grey">
						<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="large-3 columns">
					<select id="releaseday" name="releaseday" class="grey">
						<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="large-3 columns">
					<select id="releaseyear" name="releaseyear" class="grey">
						<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 class="large-3 columns">

				</div>
			</div></td>
		</tr>
		<tr>
			<td width="115">
			<div align="right">
				&nbsp;
			</div></td>
		<tr>
			<td width="115">
			<div align="right">
				Categories
			</div></td>
			<td width="665">
			<input id="tag_cloud" type="text" class="tags" name="categories" value="<?php echo(isset($content -> categories) && $content -> categories != "" ? $content -> categories : ""); ?>">
			</td>
		</tr>
		<tr>
			<td width="115">
			<div align="right">
				&nbsp;
			</div></td>
		<tr>
			<td width="115">
			<div align="right">
				Description:
			</div></td>
			<td width="665">			<textarea name="description" cols="70" rows="7" class="grey"><?php echo(isset($content -> description) && $content -> description != "" ? $content -> description : ""); ?></textarea></td>
		</tr>
		<tr>
			<td colspan="2">
			<div align="center" style="padding: 20px;">
				<input name="post" type="submit" value="     <?php echo $pageAction; ?> Content     " class="grey">
			</div></td>
		</tr>

		<input type="hidden" name="content_id" value="<?php echo $content -> content_id; ?>">

</form>
</table>

Youez - 2016 - github.com/yon3zu
LinuXploit