<?php require_once "clases/AccesoDatos.php"; require_once "clases/datos.php"; if (isset($_SESSION['nombre'])) { $arrayDatos = datos::TraerDatos(); echo "<h2> Bienvenido: " . $_SESSION['nombre'] . "</h2>"; ?> <table class="table" style="background-color: beige;"> <thead> <tr> <th>Editar</th> <th>Borrar</th> <th>Ver</th> <th>id</th> <th>localidad</th> <th>num</th> <th>calle</th> </tr> </thead> <tbody> <?php foreach ($arrayDatos as $dato) { $l = '"' . $dato->localidad . '"' . ',"' . $dato->calle . '"' . ',"' . $dato->num . '"' . ',"' . $dato->id . '"'; //$l='"'.$dato->localidad. '"' . ',"' .$dato->num. '"' . ',"' .$dato->calle. '"' . ',"' .$dato->id. '"'; echo "<tr>\n\t\t\n\t\t<td><a onclick='EditarDATO({$dato->id})' class='btn btn-warning'> <span class='glyphicon glyphicon-pencil'> </span>Editar</a></td>\n\t\t<td><input type='button' value='Borrar' onclick='BorrarDATO({$dato->id})' class='btn btn-danger' href='location.partes/FormListado.php'></td>\n\t\t<td><a onclick='VerEnMapa({$l})' class='btn btn-info'>Ver mapa</a></td>\n\t\t\n <td>{$dato->id}</td>\n\t\t<td>{$dato->localidad}</td>\n\t\t<td>{$dato->num}</td>\n\t\t<td>{$dato->calle}</td>\n\t \n\n\t</tr>"; }