<div class="box">
             
	
	      <div class="box-body">
	          
			<div class="panel panel-success">
            <div class="panel-heading">
            <h3 class="panel-title"><i class="fa fa-dollar"></i> Editar Pagamentos</h3>
            </div>
             <div class="box-body">
<?php
$id = $_GET['id'];
$select = mysqli_query($link, "SELECT p.account_no, p.pay_date, p.amount_to_pay, p.referencia, p.conta, p.remarks, loan FROM payments as p WHERE id = '$id'") or die (mysqli_error($link));
while($get = mysqli_fetch_array($select))
{
    $account_no = $get['account_no'];
    $pay_date = $get['pay_date'];
    $amount_to_pay = $get['amount_to_pay'];
    $referencia = $get['referencia'];
    $conta = $get['conta'];
    $loan = $get['loan'];
    $remarks = $get['remarks'];
?>
			 <form class="form-horizontal" method="post" enctype="multipart/form-data" action="editar_pagamento.php">
			  <?php echo '<div class="alert alert-info fade in" >
			  <a href = "#" class = "close" data-dismiss= "alert"> &times;</a>
  				<strong>Note that&nbsp;</strong> &nbsp;&nbsp;Alguns Campos sao obrigatorios
				</div>'?>
				
				
				
             <div class="box-body">
				
                  </div>
                  <div class="form-group">
                <label for="" class="col-sm-2 control-label" style="color:#009900">Numero de Conta</label>
				 <div class="col-sm-10">
                <input type="number" class="form-control" value="<?php echo $account_no; ?>" name="account" required readonly>
              </div>
			  </div>
			  <div class="form-group">
				 <div class="col-sm-10">
                <input type="hidden" class="form-control" value="<?php echo $id; ?>" name="ida" required>
              </div>
			  </div>
			  <div class="form-group">
                <label for="" class="col-sm-2 control-label" style="color:#009900">Emprestimo</label>
				 <div class="col-sm-10">
                <input type="number" class="form-control" value="<?php echo $loan; ?>" name="loan" required step="0.01" readonly>
              </div>
			  </div>
			  <div class="form-group">
                <label for="" class="col-sm-2 control-label" style="color:#009900">Data de Pagamento</label>
			 <div class="col-sm-10">
              <div class="input-group date">
                  <div class="input-group-addon">
                    <i class="fa fa-calendar"></i>
                  </div>
                  <input type="date" class="form-control" value="<?php echo $pay_date; ?>" name="pay_date">
                </div>
              </div>
			  </div>
				  
		<div class="form-group">
                  <label for="" class="col-sm-2 control-label" style="color:#009900">Valor Pago</label>
                  <div class="col-sm-10">
                  <input name="amount_to_pay" type="text" class="form-control" value="<?php echo $amount_to_pay; ?>" required step="0.01">
                  </div>
                  </div>
				  
		  <div class="form-group">
                  	<label for="" class="col-sm-2 control-label" style="color:#009900">Referencia</label>
                  	<div class="col-sm-10">
					<input name="referencia" type="text" class="form-control" value="<?php echo $referencia; ?>" required>
           			 </div>
          </div>
          <div class="form-group">
                  	<label for="" class="col-sm-2 control-label" style="color:#009900">Conta de Deposito</label>
                  	<div class="col-sm-10">
                  	    <input name="conta" type="text" class="form-control" value="<?php echo $conta; ?>" required>
           			 </div>
          </div>
		 <div class="form-group">
                  	<label for="" class="col-sm-2 control-label" style="color:#009900">Comentários</label>
                  	<div class="col-sm-10">
					<textarea name="remarks" class="form-control" rows="4" cols="80"><?php echo $remarks; ?></textarea>
           			 </div>
          </div>

			 </div>
			 
			  <div align="right">
              <div class="box-footer">
                				<button type="reset" class="btn btn-primary btn-flat"><i class="fa fa-times">&nbsp;Limpar</i></button>
                				<button name="updatep" type="submit" class="btn btn-success"><i class="glyphicon glyphicon-edit">&nbsp;Actualizar</i></button>

              </div>
			  </div>
			  </form>
			  
<?php } ?>
           
</div>	
</div>
</div>
</div>
