<div class="modal <?php echo !isset($open_modal) ? 'open-modal' : ''; ?> " id="<?php echo !isset($id_modal) ? 'myModal' : $id_modal; ?>">

  <div class="modal-dialog">

    <div class="modal-content">



      <!-- Modal Header -->

      <div class="modal-header bg-<?php echo $bg; ?>" >

        <h4 class="modal-title <?php echo $txt; ?>"><?php echo $title; ?></h4>

        <button type="button" class="close" data-dismiss="modal">&times;</button>

      </div>



      <!-- Modal body -->

      <div class="modal-body ">

        <?php echo $message; ?>

      </div>



      <!-- Modal footer -->

      <div class="modal-footer">

          

           <?php if(isset($btnacao[0]) && !empty($btnacao[0])){ ?> <!--primeiro array de modal-->

                <a  href="#"  class="btn btn-<?php echo $btnacao[0]['color']; ?> btn-sm action_modal"><?php echo $btnacao[0]['title'];?></a>

           <?php } if(isset($btnacao[1]) && !empty($btnacao[1])){ ?><!-- segundo array de modal -->

                <button type="button" class="btn btn-<?php echo $btnacao[1]['color']; ?> btn-sm" data-dismiss="modal"><?php echo $btnacao[1]['title'];?></button>

            <?php } else{ ?>

               <button type="button" class="btn btn-<?php echo $bg; ?>" data-dismiss="modal">Fechar</button>

            <?php } ?>

      </div>



    </div>

  </div>

</div>