public static function getAlbums($object) { $sql = "SELECT * FROM albums WHERE idalbum in (SELECT DISTINCT idalbum FROM photos) "; $rs = DataBase::ExecuteQuery($sql, "ARRAY"); foreach ($rs as $row => $value) { $album = Album::getOneAlbum($value['idalbum']); $album->foto->getOnePhotoRandom($album->id); array_push($object, $album); } return $object; }
?> <html> <title> </title> <head> <link rel="stylesheet" href="../jQuery/jquery-ui.css" /> <script src="../jQuery/jquery-1.8.3.js"></script> <script src="../jQuery/jquery-ui.js"></script> <link href="../css/lightbox.css" rel="stylesheet" /> <script src="../javascript/lightbox.js"></script> </head> <body> <?php isset($_GET['id']) ? $album = $_GET['id'] : ($album = 0); //Obtiene informacion del album $ab = Album::getOneAlbum($album); // Obtiene las fotos que contiene el album $fotos = array(); $fotos = Photo::getPhotos($fotos, $album); //print_r($fotos); $f = count($fotos); $i = 1; //echo "<br>".$f; ?> <div id="content2"> <div class="box"> <h2><?php echo $ab->description; ?> </h2>