<?php 
     session_start();
    
           @$usuario = $_POST['login_usuario'];
		     
            if (!isset($_SESSION['login_usuario'])) {
            	
            	//header("location: index.html");
            }
?>
<?php

// Incluimos la configuracion y conexion a la MySQL.
include('config.php');
// Definimos el ID de la persona a editar.
$id = htmlentities($_GET['codigo']);
// Mostramos los datos
$sql = "SELECT * FROM ingresos WHERE codigo='".$id."' LIMIT 1";
$query = mysql_query($sql,$link);
$row = mysql_fetch_assoc($query);
?>

<!DOCTYPE html>
<html lang="en">
<head>
<title>I.MUNICIPALIDAD DE ALHUÉ</title>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<link rel="stylesheet" href="css/bootstrap.min.css" />
<link rel="stylesheet" href="css/bootstrap-responsive.min.css" />
<link rel="stylesheet" href="css/fullcalendar.css" />
<link rel="stylesheet" href="css/matrix-style.css" />
<link rel="stylesheet" href="css/matrix-media.css" />
<link href="font-awesome/css/font-awesome.css" rel="stylesheet" />
<link href='http://fonts.googleapis.com/css?family=Open+Sans:400,700,800' rel='stylesheet' type='text/css'>
</head>
<body>

<!--Header-part-->
<div id="header"></div>
<!--close-Header-part--><!--top-Header-menu-->
<div id="user-nav" class="navbar navbar-inverse">
  <ul class="nav">
    <li class=""><a title="" href="index.html"><i class="icon icon-share-alt"></i> <span class="text">Salir</span></a></li>
  </ul>
</div>

<!--start-top-serch-->

<!--close-top-serch--> 

<!--sidebar-menu-->

<div id="sidebar"><a href="#" class="visible-phone"><i class="icon icon-home"></i> Dashboard2</a>
  <ul>
    
    
   
    
    
    
   
    
  </ul>
</div>
<div id="content">
  <div id="content-header">
    <div id="breadcrumb"> <a href="indexadmin.php" title="Go to Home" class="tip-bottom"><i class="icon-home"></i> Home</a> <img src="http://municipalidadalhue.cl/actividades/Logo-Municipio-Actualizado-01-1-1.png" width="190" height="190"></div>
  </div>
  <div  class="quick-actions_homepage">
  <center>
    <ul class="quick-actions">
      <li class="bg_lb"> <a href="ciudadanos.php"> <i class="icon-dashboard"></i> Ingresos </a> </li>    
<li class="bg_lo"> <a href="listadociudadanos.php"> <i class="icon-group"></i> Ciudadanos </a> </li>
 <li class="bg_lo"> <a href="usuarios.php"> <i class="icon-group"></i> Usuarios </a> </li>
 <li class="bg_ls">  <a href="reporteingresos.php" onClick="window.open(this.href, this.target, 'toolbar=si, location=si, directories=si, status=si, menubar=si, scrollbars=yes, resizable=yes, width=1000, height=580, top=100, left=100'); return false;"> <i class="icon-signal"></i> Reportes</a> </li>
    </ul>
	</center>
  </div>
  <div align="center"></div>
  <div class="container-fluid">
    <div class="row-fluid">
      <div class="span6"></div>
      <div class="span6"></div>
    </div>
    <hr>
    <div class="row-fluid">
      <div class="span12"><div class="widget-content">
          <div class="widget-box">
            <div class="widget-title"> <span class="icon"> <i class="icon-pencil"></i> </span>
                <h5>Detalle Ingreso N° <?=$row['codigo']?></h5>
            </div>
            <div class="widget-content nopadding">
              <form id="form-wizard" class="form-horizontal" method="post">
                <div id="form-wizard-1" class="step">
                  <div class="control-group">
                    <label class="control-label">Rut </label>
                    <div class="controls">
                      <input id="rut" type="text" name="rut" value="<?=$row['rut']?>" /> 
                      Nombre 
                      <input id="nombre" type="text" name="nombre" value="<?=$row['nombre']?>" />
                    </div>
                  </div>
                  <div class="control-group">
                    <label class="control-label">Fecha </label>
                    <div class="controls">
                      <input id="fecha" type="date" name="fecha" value="<?=$row['fecha']?>"  />
                    </div>
                  </div>
                  <div class="control-group">
                    <label class="control-label">Concepto ingreso</label>
                    <div class="controls">
                      <input type="text" name="cancela_por" id="cancela_por" value="<?=$row['cancela_por']?>">
                     
                    </div>
                  </div>
                </div>
                <div id="form-wizard-2" class="step">
                  <div class="control-group">
                    <label class="control-label">Detalle</label>
                    <div class="controls"><span class="form-group">
                      <textarea name="detalle" cols="300" rows="10" class="contacts-list-name" id="detalle"><?=$row['detalle']?></textarea>
                    </span></div>
                  </div>
                  <div class="control-group">
                    <label class="control-label">Descargar reporte </label>
                    <div class="controls">
					<?php echo '<td><a href="reporte.php?codigo='.$row['codigo'].'" target="_blank"><img src="http://icons.iconarchive.com/icons/custom-icon-design/flatastic-5/32/Business-info-icon.png"</a></td></tr>';?>           </div>
                  </div>
                </div>
                <div class="form-actions">
				<a href="ciudadanos.php" class="btn btn-primary"> <i class="icon-dashboard"></i> Volver </a>
                  
                 <div id="status"></div>
                </div>
                <div id="submitted"></div>
              </form>
            </div>
          </div>
      </div>
    </div>
      </div>
    </div>
  </div>
</div>
<!--Footer-part-->
<div class="row-fluid">
  <div id="footer" class="span12"> 2017 &copy;MTO / I.Municipalidad de Alhué  </div>
</div>
<!--end-Footer-part-->
<script src="js/excanvas.min.js"></script> 
<script src="js/jquery.min.js"></script> 
<script src="js/jquery.ui.custom.js"></script> 
<script src="js/bootstrap.min.js"></script> 
<script src="js/jquery.flot.min.js"></script> 
<script src="js/jquery.flot.resize.min.js"></script> 
<script src="js/jquery.peity.min.js"></script> 
<script src="js/matrix.js"></script> 
<script src="js/fullcalendar.min.js"></script> 
<script src="js/matrix.calendar.js"></script> 
<script src="js/matrix.chat.js"></script> 
<script src="js/jquery.validate.js"></script> 
<script src="js/matrix.form_validation.js"></script> 
<script src="js/jquery.wizard.js"></script> 
<script src="js/jquery.uniform.js"></script> 
<script src="js/select2.min.js"></script> 
<script src="js/matrix.popover.js"></script> 
<script src="js/jquery.dataTables.min.js"></script> 
<script src="js/matrix.tables.js"></script> 
<script src="js/matrix.interface.js"></script> 
<script type="text/javascript">
  // This function is called from the pop-up menus to transfer to
  // a different page. Ignore if the value returned is a null string:
  function goPage (newURL) {

      // if url is empty, skip the menu dividers and reset the menu selection to default
      if (newURL != "") {
      
          // if url is "-", it is this page -- reset the menu:
          if (newURL == "-" ) {
              resetMenu();            
          } 
          // else, send page to designated URL            
          else {  
            document.location.href = newURL;
          }
      }
  }

// resets the menu selection upon entry to this page:
function resetMenu() {
   document.gomenu.selector.selectedIndex = 2;
}
</script>
</body>
</html>
