
<?php
 
    /* CADASTROS RECENTES */
	$select_db->ExeRead("*",  'fid_clientes', " ORDER BY fid_id desc", "");


?>	   
    
<div class="col-md-12">
<div class="row" style="background-color: #e8e8e8; margin-bottom: 15px">
            <div class="col-md-9">
                <h3 style="margin: 0">
                    <i class="fa fa-user color1"></i>
                     Adicionar pontos ao cliente 
                </h3>
            </div>
            	<div class="col-md-3" style="margin-top:10px">
			<button type="button" class="simple-btn" onclick="TerminalAdmin.dashboard();">Voltar para Dashboard</button>
		</div>
     </div>
</div>
              
<div class="widgets-holder">
        <div class="row">
            <div class="masonary" style="position: relative; height: 121.8px;">
               
                 <form action="" id="formPontos">
                  <div class="col-md-4">

          <label>Valor consumido:</label>
            <input name="valor" id="valor" placeholder="R$ 0,00" onkeyup="Pontos.check_cliente()" maxlength="11" class="form-control" type="text">

                </div>
               
               
                <div class="col-md-4">

           <label>CPF:</label>
<select name="cpf" id="estado" class="form-control">
<?php 
						
for($i=0;$i<count($select_db->getResult());$i++){

	echo '<option value="'.$select_db->getResult()[$i]['fid_cpf'].'" title="'.$select_db->getResult()[$i]['fid_nome'].'">'.$select_db->getResult()[$i]['fid_cpf'].'</option>';

} 
						
 ?>   
</select>

                </div>

   
      <input type="hidden" name="cadastrar-pontos" />
      
       </form>
           
                <div class="col-md-12">

                    <button type="button" class="btn btn-success btn-lg" onclick="TerminalAdmin.cadastrarPontos();">
                        <i class="fa fa-plus"></i> Adicionar Pontos
                    </button>

                </div>

            </div><!-- Masonary -->
        </div>
    </div>

<script type="text/javascript">


$("#estado").select2({

        formatResult : function(item) {
            var markup = '<div class="row">' +
                 '<div class="col-lg-12">' + item.text + '</div>' +
                 '</div>' +
                 '<div class="row">' +
                 '<div class="col-lg-12">' + item.element[0].title + '</div>' +
                 '</div>';

              return markup;
			
                }
});

</script>
    
      