<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title><?= $titulo?></title>
	<?php
		$this->load->view('main/link');
		echo script_tag('js/modulos/xpn.js?'.$_SESSION['app.gxc_sesion_version']);
	?>
	<script type="text/javascript">
		$(function () {
			fn_xpn_listar();
			$('.date').datepicker({
                autoclose   : true,
                format      : 'mm/yyyy',
                startView 	: 1,
    			minViewMode : 1
            });
		});
	</script>
</head>
<body>
	<div class="container">
		<div class="panel panel-primary">
			<?= $cabecera?>
			<?= $menu?>
			<div class="panel-body" style="text-align: center;">
				<h3><b>LISTAR PROGRAMACIÓN</b></h3>
			</div>
			<div class="panel-body">
				<form class="form-inline" id="form_buscar" method="post" action="javascript:fn_xpn_listar();">
					<div class="form-group">
						<label for="cbo_xco">Consultorio: </label>
						<select name="cbo_xco" id="cbo_xco" class="form-control">
							<?= $xco?>
						</select>
					</div>
					<div class="form-group">
						<label for="txt_mes_anio">Mes - Año</label>
						<div class="input-group date">
							<input type="text" id="txt_mes_anio" name="txt_mes_anio" value="<?= date('m/Y')?>" readonly class="form-control" autocomplete="off">
							<span class="input-group-addon">
								<span class="glyphicon glyphicon-calendar"></span>
							</span>
						</div>
					</div>
					<button type="submit" class="btn btn-default">
						<span class="glyphicon glyphicon-search"></span>
					</button>
					<a href="<?= base_url('movimientos/xpn/programar')?>" class="btn btn-primary">
						<span class="glyphicon glyphicon-plus"></span> <b>Programar Fechas</b>
					</a>
				</form>
			</div>
			<div class="panel-body">
				<table id="xpn_data" class="display table table-hover table-bordered table-condensed table-stripped responsive nowrap">
					<thead>
						<tr>
							<th>Consultorio</th>
							<th>Personal</th>
							<th>Fecha</th>
							<th>Cupos</th>
							<th>Citados</th>
							<th>Acción</th>
						</tr>
					</thead>
					<tbody></tbody>
				</table>
			</div>
			<?= $pie?>
		</div>
	</div>
</body>
</html>