<!-- PANEL ADMINISTRATIVO -->
<script src="js/jquery.min.js"></script>  
<script src="js/bootstrap.min_busqueda.js"></script>
<?php
// REGISTRO DE VEHICULOS			
		if($_GET['proceso']=="3DIT4R"){
			$id_control=strip_tags($_GET['token']);

				mysql_query("UPDATE  tabla_clintes_xls SET placas='".$_POST['placas']."',cod_sunagro='".$_POST['cod_sunagro']."' where  id='$id_control'",$link);
				//echo "UPDATE  tabla_almacen SET nombre='".$_POST['nombre']."',descripcion='".$_POST['descripcion']."',ubicacion='".$_POST['ubicacion']."' where  id='$id_control'";
			 
			 echo'
                <div class="alert alert-success fade in">
                    <i class="fa-fw fa fa-success"></i>
                        <strong>Enhorabuena !</strong>Los Datos fueron editados 
                </div>
			';
		}			
			
			?>					
<div class="contentpanel">
<div class="row row-stat">
	<div class="col-md-12">
        <div class="panel panel-default">
            <div class="panel-heading">
                <div class="panel-btns">
                    <a href="#" class="panel-minimize tooltips" data-toggle="tooltip" title="Minimize Panel"><i class="fa fa-minus"></i></a>
                    <a href="#" class="panel-close tooltips" data-toggle="tooltip" title="Close Panel"><i class="fa fa-times"></i></a>
                </div>
                <h4 class="panel-title"><?php echo $ver_cpanel_sub_menu['titulo']; ?></h4>
                <p><?php echo $ver_cpanel_sub_menu['descripcion']; ?>.</p>
            </div>
            <div class="panel-body nopadding">

				<div class="col-md-12">
				

                    <div class="table-responsive"><br>
						<!--BOTONES DE EXPORTACION-->

						<div class="pull-left">
							<div class="btn-group">
                                <button class="btn btn-default btn-sm " type="button"><i class="fa fa-print mr5"></i> Imprimir</button>
								<a href='' TARGET="_BLANK"  class="btn btn-default btn-sm " type="submit" id="export_data" name='export_data'><i class="fa fa-file-excel-o mr5"></i> Descargar XLS</a>
								<!-- <button class="btn btn-default btn-sm " type="button"><i class="fa fa-file-pdf-o mr5"></i> Descargar PDF</button>-->
							</div>
						</div>
						<!--BOTONES DE EXPORTACION-->	
					<br>
					<br>
					<br>

					<div class="input-group mb15 has-warning">
                            <span class="input-group-addon"><b>BUSCAR</b></span>
                            <input type="text" autofocus="autofocus" placeholder="Buscar vehiculos..." id="search" class="form-control" />
                    </div>
<table  id="employee_table" class="table table-striped table-bordered responsive">
                                <thead class="">
                                    <tr>
                                        <th>RIF</th>
                                        <th>RAZON SOCIAL</th>
                                        <!--<th>DIRECCION</th>-->
                                        <th>PLACA</th>
                                        <th><b>SUNAGRO</b></th>
                                        <th>Opcion</th>
                                    </tr>
                                </thead>
                                <tbody>	
								<?php
									$consultar_sql_verxs=mysql_query("select * from   tabla_clintes_xls where eliminar='0' ORDER BY id DESC  ",$link);
									while($ver_consultar_sql_ver_xx1=mysql_fetch_array($consultar_sql_verxs)){
									$id_control_edit=$ver_consultar_sql_ver_xx1['id']; 
									if($_GET['proceso']=='C0N5ULT4R' and $_GET['token']=="$id_control_edit"){ 	
										?>	
										<form action="<?php echo $url_global.'&proceso=3DIT4R&token='.$id_control_edit; ?>" method="POST" class="form-bordered" name='formulario'>
								<?php } ?>
									<tr>
											<td><?php echo $ver_consultar_sql_ver_xx1['rif']; ?></td>		
										<td><?php echo $ver_consultar_sql_ver_xx1['descripcion']; ?></td>		
											<!--	<td><?php echo $ver_consultar_sql_ver_xx1['direccion']; ?></td>		-->
											<td>
											<?php
												if($_GET['proceso']=='C0N5ULT4R' and $_GET['token']=="$id_control_edit"){
													echo '<input name="placas"  value="'.$ver_consultar_sql_ver_xx1['placas'].'" class="form-control" type="text" required="required" onChange="javascript:this.value=this.value.toUpperCase();" />';
												} else {
													echo $ver_consultar_sql_ver_xx1['placas'];
												}	
											 ?>
											</td>
											<td>
											<?php
												if($_GET['proceso']=='C0N5ULT4R' and $_GET['token']=="$id_control_edit"){
													echo '<input name="cod_sunagro"  value="'.$ver_consultar_sql_ver_xx1['cod_sunagro'].'" class="form-control" type="text" required="required" onChange="javascript:this.value=this.value.toUpperCase();" />';
												} else {
													echo $ver_consultar_sql_ver_xx1['cod_sunagro'];
												}	
											 ?>
											</td>		
											<td>
													<?php if($_GET['proceso']=='C0N5ULT4R' and $_GET['token']=="$id_control_edit"){ ?>
														<button type="submit" name="submit" value='Guardar' class="btn btn-success btn-sm"> <i class="fa fa-floppy-o ml5"></i></button>	
													<?php } else { ?>
														<a href="<?php echo $url_global;?>&proceso=C0N5ULT4R&token=<?php echo $ver_consultar_sql_ver_xx1['id']; ?>"   title="Editar"  class=" btn-primary btn-sm" ><i class="fa fa-pencil"></i></a>
													<?php }	?>								
											
											
											</td>
									</tr>
									<?php if($_GET['proceso']=='C0N5ULT4R' and $_GET['token']=="$id_control_edit"){ ?>
										</form>
																		
									<?php } ?>
								<?php } ?>
                                </tbody>			  
                               </table>	
<script>  
								  $(document).ready(function(){  
									   $('#search').keyup(function(){  
											search_table($(this).val());  
									   });  
									   function search_table(value){  
											$('#employee_table tr').each(function(){  
												 var found = 'false';  
												 $(this).each(function(){  
													  if($(this).text().toLowerCase().indexOf(value.toLowerCase()) >= 0)  
													  {  
														   found = 'true';  
													  }  
												 });  
												 if(found == 'true')  
												 {  
													  $(this).show();  
												 }  
												 else  
												 {  
													  $(this).hide();  
												 }  
											});  
									   }  
								  });  
							 </script>
							   
					</div>
                </div>								
            </div>     
            </div>
        </div>
	</div>
</div>
<!--MODAL -->	 
