<!-- Bootstrap Modals -->
<!-- Modal - Add New Record/User -->
<div class="modal fade" id="add_new_record_modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="myModalLabel">Agregar prestacion o pago</h4>
            </div>
            <div class="modal-body">
                <div class="form-group">
                    <input type="hidden" id="first_name" placeholder="Fecha" class="form-control" required="true"/>
                </div>
                <div class="form-group">
                    <label for="last_name">Pieza</label>
                    <input type="text" id="last_name" placeholder="Pieza" class="form-control" maxlength="2"/>
                </div>
                <div class="form-group">
                    <label for="dni">Prestacion</label>
                    <textarea rows="2" cols="50" type="text" id="dni" placeholder="Prestacion" class="form-control"/></textarea>
                </div>
                <div class="form-group">
                    <label for="email">Observaciones</label>
                    <textarea rows="2" cols="50" type="text" id="email" placeholder="Observaciones" class="form-control"/></textarea>
                </div>
                <div class="form-group">
                    <label for="doc">Predet</label>
                    <select type="text" id="doc" class="form-control"/>
		<option value="------" selected >------</option>
		<option value="extra" >EXTRACCION</option> 
		<option value="perno" >PERNO</option> 
		<option value="circu" >CORONA</option> 
		<option value="tc" >T. CONDUCTO</option> 
		<option value="implante" >IMPLANTE</option> 
		<option value="inc" >INCRUSTACION</option> 
					</select>
                </div>
                <div class="form-group">
                    <label for="vesti">Vestibular</label>
		<select type="text" id="vesti" class="form-control"/>
		<option value="no" selected>no</option> 
		<option value="si" >si</option> 
					</select>
                </div>
				
				<div class="form-group">
                    <label for="profesional">Profesional</label>
                    <select type="text" id="profesional" class="form-control"/>
	<?php 
	$query_rs_todos = "SELECT doc FROM `ingreso` WHERE `clinica` like '$clinica'";
	$rs_ingresobb = mysqli_query($odonto_connection,$query_rs_todos) or die(mysqli_error());
	$row_rs_ingresobb = mysqli_fetch_assoc($rs_ingresobb);
	$doc_actual=$row_rs_ingresobb['doc'];
	
	$query_rs_todos = "SELECT usuario FROM `tabla1` WHERE `id_pac` like '$id_pac'";
	$rs_ingresobb1 = mysqli_query($odonto_connection,$query_rs_todos) or die(mysqli_error());
	$row_rs_ingresobb1 = mysqli_fetch_assoc($rs_ingresobb1);
	$doc_actual=$row_rs_ingresobb1['usuario'];
	  do{ ?>
		<option value="<?php echo $row_rs_ingresobb['doc'];?>" <?php if($row_rs_ingresobb['doc']==$doc_actual){echo "selected";}?>><?php echo $row_rs_ingresobb['doc'];?></option> 
		<?php }  
        while($row_rs_ingresobb = mysqli_fetch_assoc($rs_ingresobb)); ?>
					</select>
                </div>
			</div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
                <button type="button" class="btn btn-primary" onclick="addRecord()">Agregar Item</button>
            </div>
        </div>
    </div>
</div>
<!-- // Modal -->

