Mister Spy Say ="Hello Kids ... :D"
___ ____ _ _____
| \/ (_) | | / ___|
| . . |_ ___| |_ ___ _ __ \ `--. _ __ _ _
| |\/| | / __| __/ _ \ '__| `--. \ '_ \| | | |
| | | | \__ \ || __/ | /\__/ / |_) | |_| |
\_| |_/_|___/\__\___|_| \____/| .__/ \__, |
| | __/ |
|_| |___/
Bot Mister Spy V3
Mister Spy
Mister Spy
<?php
require_once("../inc_library_front.php");
/* verificamos si posee permisos */
if (!Session::CheckPerm(Modulo::Eventos))
Session::NoPerm();
?>
<!DOCTYPE html>
<html>
<head>
<?php include("ssi_head_inc.php"); ?>
<link href="css/cropper.css" rel="stylesheet">
</head>
<body class="fixed-left">
<!-- Begin page -->
<div id="wrapper">
<?php include("ssi_header.php"); ?>
<?php include("ssi_menu.php"); ?>
<!-- ============================================================== -->
<!-- Start right Content here -->
<!-- ============================================================== -->
<div class="content-page">
<!-- Start content -->
<div class="content">
<div class="container">
<div class="row">
<div class="col-sm-12">
<h4 class="page-title">Banners</h4>
<ol class="breadcrumb">
<li>
<a href="index.php">Home</a>
</li>
<li class="active">
Banners
</li>
</ol>
</div>
</div>
<div class="row">
<div class="col-xs-12">
<div class="card-box">
<div class="col-sm-8">
</div>
<div class="col-sm-4 text-right">
<a href="#custom-modal" class="btn btn-default btn-md waves-effect waves-light m-b-30" data-animation="fadein" data-plugin="custommodal"
data-overlaySpeed="200" data-overlayColor="#36404a"><i class="md md-add"></i> Agregar Banner</a>
</div>
<div id="jsGrid"></div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- Modal -->
<div id="custom-modal" class="modal-demo">
<button type="button" class="close" onclick="ClosePopup();">
<span>×</span><span class="sr-only">Cerrar</span>
</button>
<h4 class="custom-modal-title">Agregar Banner</h4>
<div class="custom-modal-text text-left">
<form id="form-add-banner" role="form" method="post" action="json-banners-add.php" class="form-horizontal resize-image" enctype="multipart/form-data">
<input type="hidden" id="Submitted" name="Submitted" value="1" />
<div class="form-group">
<label class="col-sm-12" for="Nombre">Nombre</label>
<div class="col-sm-12">
<input type="text" class="form-control" required name="Nombre" id="Nombre" placeholder="Nombre" required parsley-trigger="change" data-parsley-required-message="Por favor ingrese el nombre" />
</div>
</div>
<div class="form-group">
<label class="col-sm-12" for="Link">Link</label>
<div class="col-sm-12">
<input type="text" class="form-control" id="Link" name="Link" placeholder="Link">
</div>
</div>
<div class="form-group">
<label class="col-sm-12" for="FechaHasta">Fecha Hasta</label>
<div class="col-sm-12">
<input type="text" class="form-control datepicker" id="FechaHasta" name="FechaHasta" placeholder="Fecha Hasta" >
</div>
</div>
<div class="form-group">
<label class="col-sm-12" for="IdEstado">Estado</label>
<div class="col-sm-12">
<select class="form-control" id="IdEstado" name="IdEstado">
<option value="1">Activo</option>
<option value="3">Oculto</option>
</select>
</div>
</div>
<div class="form-group">
<label class="col-sm-12" for="Orden">Orden</label>
<div class="col-sm-12">
<input type="text" class="form-control" id="Orden" name="Orden" placeholder="Orden">
</div>
</div>
<div class="form-group">
<label class="col-sm-12" for="Imagen">Imagen</label>
<div class="col-sm-6 col-sm-12">
<div class="panel-body">
<div class="file-selector">
<input type="file" name="Imagen" id="Imagen" />
</div>
</div>
</div>
</div>
<div class="text-right">
<button type="submit" class="btn btn-default waves-effect waves-light">Guardar</button>
<button type="button" class="btn btn-danger waves-effect waves-light m-l-10" onclick="ClosePopup();">Cancelar</button>
</div>
</form>
</div>
</div>
<!-- Modal -->
<!-- Modal Update -->
<?php include('ssi_banner_modal_mod.php'); ?>
<div class="modal fade" id="imagemodal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="z-index: 99999">
<input type="hidden" id="imgId" name="imgId" value="">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-body">
<button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">×</span><span class="sr-only">Cerrar</span></button>
<img src="" class="imagepreview" style="width: 100%;" >
<div class="m-t-20 text-right">
<button class="btn btn-default" onclick="RotateRight();"><i class="fa fa-rotate-right"></i></button>
<button class="btn btn-default" onclick="RotateLeft();"><i class="fa fa-rotate-left"></i></button>
<a class="btn btn-primary" id="btn-img-save">Recortar imágen</a>
</div>
</div>
</div>
</div>
</div>
</div>
<?php include("ssi_scripts.php"); ?>
<!-- jsgris table js -->
<script src="<?= Config::UrlFiles ?>assets/plugins/jsgrid/js/jsgrid.min.js"></script>
<script src="js/jquery.jsgrid.banners.init.js"></script>
<script src="js/jquery.jsgrid.init.js"></script>
<script type="text/javascript" src="<?= Config::UrlFiles ?>assets/plugins/autocomplete/jquery.mockjax.js"></script>
<script type="text/javascript" src="<?= Config::UrlFiles ?>assets/plugins/autocomplete/jquery.autocomplete.min.js"></script>
<script type="text/javascript" src="js/resize_img.js"></script>
<script src="js/cropper.js"></script><!-- Cropper.js is required -->
<script src="js/jquery-cropper.min.js"></script>
<script src="js/modal_crop.js"></script>
<script src="<?= Config::UrlFiles ?>assets/plugins/tinymce/tinymce.min.js"></script>
<script type="text/javascript">
var ratio = 6.1;
maxSize = 2000;
function ClosePopup() {
$('#Nombre').val('');
$('#Link').val('');
$('#Orden').val('');
$('#FechaHasta').val('');
$('#IdEstado').val('1');
$('#image-1').attr('src', 'images/upload-icon.png');
$('#hd-1').remove();
$('#btn-rm-1').attr('disabled', 'disabled');
$('#Imagen').val('');
$('#NombreU').val('');
$('#LinkU').val('');
$('#OrdenU').val('');
$('#FechaHastaU').val('');
$('#IdEstadoU').val('1');
$('#image-1').attr('src', 'images/upload-icon.png');
$('#hd-1').remove();
$('#modal-update #EliminarImagen').val(0);
$('#btn-rm-2').attr('disabled', 'disabled');
$('#ImagenU').val('');
Custombox.close();
}
$(document).ready(function () {
$('form').parsley({
excluded: "input[type=button], input[type=submit], input[type=reset], input[type=hidden], [disabled], :hidden"
});
$('#btn-rm-2').click(function() {
$('#EliminarImagen').val(1);
});
$('#form-add-banner, #form-mod-banner').submit(function(e) {
tinyMCE.triggerSave()
var data = new FormData(this);
var count = 1;
$('.hi-url').each(function() {
var id = $(this).attr('data-id');
var blob = dataURLToBlob($(this).val());
data.append('Imagen-' + count, blob);
count++;
});
data.append('Cantidad', count);
$.ajax({
url: $(this).attr('action'),
data: data,
cache: false,
contentType: false,
processData: false,
type: 'POST',
success: function(data){
if (data.Success)
{
ClosePopup();
$("#jsGrid").jsGrid("loadData");
}
else
swal({
title: "Error!",
text: data.Error,
type: "error",
timer: 2000,
showConfirmButton: false
});
}
});
e.preventDefault();
return false;
});
});
</script>
</body>
</html>
Mr. DellatioNx196 GaLers xh3LL Backd00r 1.0, Coded By Mr. DellatioNx196 - Bogor BlackHat