<?php
include('../../../configuracion.php');
include('../../inc/formulario.php');
include('config.php');
$id = isset($_GET['id']) ? $_GET['id'] : NULL;
$datos = $db->row(TABLA,"*","id='{$id}'");
?>
<!doctype html>
<html class="fixed">
    <div  id="progreso" style="display:none">
        <div class="mensaje_enviando_formulario">Procesando, por favor espera...</div>
        <div class="progreso_formulario">
            <div class="barra_formulario"></div >
            <div class="porcentaje_formulario">0%</div >
        </div>
    </div>
	<head>
		<?php include("../../inc/head.php")?>
		<!-- ESPACIO HEAD ADICIONALES -->

		<!-- FIN ESPACIO HEAD ADICIONALES -->
	</head>
	<body>
		<section class="body">
			<!-- start: header -->
			<?php include("../../inc/header.php")?>
			<!-- end: header -->
			<div class="inner-wrapper">
				<!-- start: sidebar -->
				<?php include("../../inc/side-left.php")?>
				<!-- end: sidebar -->
				
                    



                <div class="row">
							<div class="col">
								<section class="card">
									<header class="card-header">
										<div class="card-actions">
											<a href="#" class="card-action card-action-toggle" data-card-toggle></a>
											<a href="#" class="card-action card-action-dismiss" data-card-dismiss></a>
										</div>
						
										<h2 class="card-title">Editar</h2>
									</header>
									<div class="card-body">
										<form class="form-horizontal form-bordered" method="post" id="form" action="<?php echo MAGO?>c/<?php echo MODULO?>/modelos/editar.php?id=<?php echo $datos->id?>">
                                            
										<?php _input('Nombre','nombre','required','text',$datos->nombre,'Ingrese Frase')?>
										<?php _input('ZONA','zona','required-no','text',$datos->zona,'Ingrese Zona')?>
										<?php _input('Rango 0 a 3','rango_1','required-no','text',$datos->rango_1,'Ingrese Rango')?>
										<?php _input('Rango 3.1 a 6','rango_2','required-no','text',$datos->rango_2,'Ingrese Rango')?>
										<?php _input('Rango 6.1 a 10','rango_3','required-no','text',$datos->rango_3,'Ingrese Rango')?>
										<?php _input('Rango 10.1 a 20','rango_4','required-no','text',$datos->rango_4,'Ingrese Rango')?>
										<?php _input('Rango 20.1 ++','rango_5','required-no','text',$datos->rango_5,'Ingrese Rango')?>
										
									
                                        <footer class="panel-footer">
										<div class="row">
											<div class="col-sm-12 text-right">
												<a href="<?php echo MAGO?>c/<?php echo MODULO?>" class="btn btn-default">Cancelar</a >
                                                <button class="btn btn-primary">EDITAR</button>
											</div>
										</div>
									    </footer>
                                        
						
											
										</form>
									</div>
								</section>
							</div>
						</div>
						
                        <?php include("../../inc/publicado.php")?>


               
						








		
					

		<!-- NO TOCAR -->
		<?php include("../../inc/side-right.php")?>
		<?php include("../../inc/bottom.php")?>
		<!-- NO TOCAR -->

		
		<!-- ESPACIO JS ADICIONALES -->
	

		 <!-- http://plugins.krajee.com/file-input -->
		 <script>
        var urlimagen = "<?php echo WEB?>imagenes/<?php echo FOLDER?>/<?php echo $datos->imagen_back?>";  
        var listdelone = [{ url: '<?php echo MAGO?>/post/json-delete-on.php', key:'<?php echo $datos->id?>', extra: {id: '<?php echo $datos->id?>',tabla:'<?php echo TABLA?>',page:'<?php echo MODULO?>',folder:'<?php echo FOLDER?>'}}];   
        $("#imagen_back").fileinput({
            <?php if($datos->imagen_back){?>initialPreview: urlimagen,<?php }?>
            <?php if($datos->imagen_back){?>initialPreviewConfig: listdelone,<?php }?>
            language: "es",
            autoReplace: true,
             maxFileCount: 1,
            initialPreviewAsData: true,
            //deleteUrl: listdelone,
        });
        </script>


    </body>
</html>