File: /home/httpd/html/nyloncams.com/public_html/admin/header.popup.php
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<link rel="stylesheet" href="//fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,800&subset=latin,latin-ext">
<link rel="stylesheet" href="<? echo $basehttp; ?>/admin/public/css/jquery.ui.css" media="all">
<link rel="stylesheet" href="<? echo $basehttp; ?>/admin/public/css/app.css?<? echo filemtime("$basepath/admin/public/css/app.css"); ?>" media="all">
<script src="<? echo $basehttp; ?>/admin/public/js/libs/jquery.js"></script>
<script src="<? echo $basehttp; ?>/admin/public/js/libs/jquery.ui.js"></script>
<script src="<? echo $basehttp; ?>/admin/public/js/libs/jquery.uniform.min.js"></script>
<script src="<? echo $basehttp; ?>/admin/public/js/app/app.js?<? echo filemtime("$basepath/admin/public/js/app/app.js"); ?>"></script>
<script src="<? echo $basehttp; ?>/admin/public/js/app/main.js?<? echo filemtime("$basepath/admin/public/js/app/main.js"); ?>"></script>
<? if ($success) { ?>
<script>
$().ready(function () {
parent.$.fn.colorbox.close();
});
</script>
<? } ?>
<script>
var basehttp = '<? echo $basehttp; ?>';
var current_url = '<? echo $basehttp . $_SERVER['SCRIPT_NAME']; ?>';
var current_query = '<? echo str_replace($_SERVER['SCRIPT_NAME'], '', $_SERVER['REQUEST_URI']); ?>';
$().ready(function () {
$('.window-head .close, .action-cancel').on('click', function (e) {
e.preventDefault();
parent.$.fn.colorbox.close();
return false;
});
$('.lang-selection a').on('click', function (e) {
e.preventDefault();
$('.lang-selection').find('a.active').removeClass('active');
$(this).addClass('active');
var activeItems = $(this).attr('href').replace("#", "");
$('#languages').find('.langInput').hide();
$('#languages').find('.' + activeItems).show();
return false;
});
$(document).on('click', '.changeThumb', function (e) {
e.preventDefault();
var id = $(this).attr('data');
$.get('swap_thumb.php?id=<? echo $row['record_num']; ?>&thumb=' + id);
parent.$.fn.colorbox.close();
return false;
}).on('click', '.changeThumbTrigger', function () {
parent.$.fn.colorbox.resize({
width: '600px',
height: 'auto'
});
}).on('click', '#addCategoryOpener', function (e) {
e.preventDefault();
var addBox = $('#addCategoryBox');
if (addBox.is(":visible")) {
$(this).removeClass('ion-minus').addClass('ion-plus');
} else {
$(this).removeClass('ion-plus').addClass('ion-minus');
}
addBox.slideToggle(200);
$("html, body").animate({ scrollTop: addBox.offset().top });
}).on('click', '#addModelOpener', function (e) {
e.preventDefault();
var addBox = $('#addModelBox');
if (addBox.is(":visible")) {
$(this).removeClass('ion-minus').addClass('ion-plus');
} else {
$(this).removeClass('ion-plus').addClass('ion-minus');
}
addBox.slideToggle(200);
$("html, body").animate({ scrollTop: addBox.offset().top });
});
//Add new category and assign to this content.
$(document).on('click', '#addCategoryBox .action-save', function (e) {
e.preventDefault();
var nBox = $('#addCategoryBox').find('.notification');
var contentId = $('input[name="id"]').val();
var categoryName = $('#addCategoryBox').find('input[name="add_category"]').val();
$.ajax({
type: 'POST',
url: basehttp + '/admin/ajax/ajax.add_category.php',
data: {
content_id: contentId,
category_name: categoryName
},
dataType: 'json',
success: function (data) {
if (data.status == 'success') {
nBox.addClass('success').html(data.message).fadeIn(500, function () {
$('#categoriesList').load(basehttp + '/admin/ajax/ajax.load_categories_list.php?id=' + contentId);
$('#addCategoryBox').find('input[name="add_category"]').val('');
setTimeout(function () {
nBox.fadeOut(500).removeClass('success');
}, 1500);
});
} else if (data.status == 'error') {
nBox.addClass('error').html(data.message).fadeIn(500, function () {
setTimeout(function () {
nBox.fadeOut(500).removeClass('error');
}, 1500);
});
}
}
});
});
//Add new model and assign to this content.
$(document).on('click', '#addModelBox .action-save', function (e) {
e.preventDefault();
var nBox = $('#addModelBox').find('.notification');
var contentId = $('input[name="id"]').val();
var modelName = $('#addModelBox').find('input[name="add_model"]').val();
$.ajax({
type: 'POST',
url: basehttp + '/admin/ajax/ajax.add_model.php',
data: {
content_id: contentId,
model_name: modelName
},
dataType: 'json',
success: function (data) {
if (data.status == 'success') {
nBox.addClass('success').html(data.message).fadeIn(500, function () {
$('#modelsList').load(basehttp + '/admin/ajax/ajax.load_models_list.php?id=' + contentId);
$('#addModelBox').find('input[name="add_model"]').val('');
setTimeout(function () {
nBox.fadeOut(500).removeClass('success');
}, 1500);
});
} else if (data.status == 'error') {
nBox.addClass('error').html(data.message).fadeIn(500, function () {
setTimeout(function () {
nBox.fadeOut(500).removeClass('error');
}, 1500);
});
}
}
});
});
});
function deleteImage(id) {
$("#image" + id).css('opacity', 0.4);
$.get('<? echo $basehttp ?>/admin/delete_image.php?id=' + id, function () {
$("#image" + id).fadeOut('slow', function () {
$(this).remove();
});
});
}
</script>
</head>
<body>
<div>