function listaproyectores() { $result = array(false); include_once '/function/logic.php'; $proyector = get_allproyector(); $lista = array(); for ($i = 0; $i < sizeof($proyector); $i++) { array_push($lista, array(ID => $proyector[$i]['id'], Name => $proyector[$i]['name'])); } $result = array(PROYECTORES => $lista); return json_encode($result); }
<?php /* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ ?> <br><br> <?php if (!isset($_GET['id'])) { $proyector = get_allproyector(); //print_array($proyector); ?> <a href="#" class="btn btn-primary" role="button">Agregar</a> <table class="table"> <thead> <tr> <td>No.</td> <td>Nombre</td> <td>On</td> <td>Off</td> <td>HDMI1</td> <td>HDMI2</td> <td>VGA1</td> <td>VGA2</td> <td>Vol+</td> <td>Vol-</td> <td>VolMute</td> <td>Baud</td> <td>databits</td>