Esempio n. 1
0
 public static function getInstance() { //metodo Singleton
     if (!isset(self::$instance)) {
         $c = __CLASS__;
         self::$instance = new $c;
     }
     return self::$instance;
 }
Esempio n. 2
0
                            </ul>
                        </div>
                        <!-- fin #menu -->
                        <div id="contenido">
                            <h2 class="title"><a href="a">Albumes </a></h2>
                            <div class="post">
                                <?php
                                session_start();
                                $_SESSION["k_username"] = "******";
                                $_SESSION["entidad"] = "perfil"; // Por ahora
                                $_SESSION["clave_entidad"] = "yo";
                                //$lista= $_SESSION["fotos"];
                                // Si ente = "perfil" y $_SESSION["k_username"]= "******" != $_SESSION["clave_ente"]= "yo" y admin==false
                                // verificar la seguridad
                                require_once("../Fachadas/FotosFachada.php");
                                $F = FotosFachada::getInstance();
                                $lista = $F->getNombresAlbum($_SESSION["entidad"], $_SESSION['clave_entidad']);

                                $tam = count($lista);

                                if ($tam == 0) {
                                    echo "No existen albumes para mostrar.";
                                } else {



                                    echo "<table>";
                                    $j = 1;
                                    foreach ($lista as $id => $nombre) {
                                        if ($j == 1)
                                            echo "<tr>"; // fila general{