<?php include_once '../core/Funciones.php'; include_once '../app/constantes.php'; if ($_POST['n'] > 0) { $data = ["accion" => "list"]; $result = Funciones::CallAPI("GET", "http://" . IP_SERVER . PORT_SERVER . "/" . API_NAME . "/" . API_VERSION . "/pedidos/pedidos.php", $data); $result = json_decode($result); $num = count($result); $ind = $_POST['indice'] == -1 ? 0 : $_POST['indice'] + 1; for ($i = $ind; $i < $num; $i++) { ?> <li id="fila_<?php echo $result[$i]->id_order; ?> " > <div class="task-checkbox"> <label name="order" class="list-child"><?php echo $i + 1; ?> </label> </div> <div class="task-title"> <span name="name" class="task-title-sp"><?php echo $result[$i]->song; ?> </span> | <span name="rute" class="task-title-sp"><?php echo $result[$i]->ruta; ?> </span>