예제 #1
0
function galeria($dir, $lvl = '../', $fileTitle = '', $phptParams = array('w' => 138, 'q' => 50, 'h' => 74, 'zc' => 1), $footer = '')
{
    if (!is_dir($lvl . $dir)) {
        return;
    }
    $archivos = opendir($lvl . $dir);
    $all = array();
    while (($item = readdir($archivos)) !== false) {
        if ($item != '.' && $item != '..' && $item != 'Thumbs.db' && strlen($item) > 3) {
            $phpt = new PhpT();
            $phpt->fileName = $item;
            $phpt->fileTitle = $fileTitle;
            $phpt->fileSource = $footer;
            //$phpt->useTimThumb = true;
            $phpt->useLightbox = true;
            $phpt->lightboxCls = '';
            $phpt->params = $phptParams;
            $phpt->dir = $dir;
            $out[] = $phpt->getImgHtml();
        }
    }
    return join("", $out);
}
예제 #2
0
if ($items) {
    $out[] = '<h3>Productos</h3>';
    $x = 1;
    foreach ($items as $i) {
        $img = a("select * from files where item_id = " . $i['id'] . " and tabla = 'productos' and tipo = 'imagenes' order by orden");
        $imagen = '';
        if ($img) {
            $phpt = new PhpT();
            $phpt->fileName = $img['nombre'];
            $phpt->fileTitle = utf8_strtoupper($i['nombre']);
            //$phpt->useTimThumb = true;
            //$phpt->useLightbox = true;
            //$phpt->lightboxCls = 'ceebox';
            $phpt->params = array('w' => 161, 'h' => 123, 'zc' => 1);
            $phpt->folder = $img['tabla'];
            $imagen = $phpt->getImgHtml();
        } else {
            $imagen = '<img src="img/blank.gif" width="161" height="123" />';
        }
        $last = $x % 4 == 0 ? 'last' : '';
        $out[] = '<div class="prodHome ' . $last . '">';
        $out[] = '<a href="producto.php?id=' . $i['id'] . '">' . $imagen . '</a>';
        $out[] = '<div class="data">';
        $out[] = '<a href="producto.php?id=' . $i['id'] . '"><strong>' . cortar(utf8_strtoupper($i['nombre']), 24, array('ending' => '...')) . '</strong></a>';
        $out[] = '<p>' . cortar($i['resumen'], 80, array('ending' => '...')) . '</p>';
        $out[] = '</div>';
        $out[] = '</div>';
        $x++;
    }
}
?>
예제 #3
0
if ($img) {
    foreach ($img as $imm) {
        // IMG BIG
        $phpt = new PhpT();
        $phpt->fileName = $imm['nombre'];
        $phpt->fileTitle = utf8_strtoupper($producto['nombre']);
        $phpt->params = array('w' => 614, 'h' => 460, 'zc' => 1);
        $phpt->folder = $imm['tabla'];
        $imagenes[] = $phpt->getImgHtml();
        // THUMB FOR PAGER
        $phpt2 = new PhpT();
        $phpt2->fileName = $imm['nombre'];
        $phpt2->fileTitle = utf8_strtoupper($producto['nombre']);
        $phpt2->params = array('w' => 70, 'h' => 52, 'zc' => 1);
        $phpt2->folder = $imm['tabla'];
        $thumbs[] = $phpt2->getImgHtml();
    }
}
$highlight1 = new highlight(utf8_ucfirst(utf8_strtolower($producto['nombre'])), $words);
$hiTitulo = $highlight1->output_text;
$highlight2 = new highlight($producto['resumen'], $words);
$hiResumen = $highlight2->output_text;
$highlight3 = new highlight(fop($producto['descripcion']), $words);
$hiDescripcion = $highlight3->output_text;
$out[] = '<h4 class="small">» ' . $hiTitulo . '</h4>';
$out[] = '<div class="productoAmpliado">';
$out[] = '<div style="position: relative; float: left;">';
if ($imagenes) {
    $out[] = '<div class="cycleProducto">' . join("\n", $imagenes) . '</div>';
}
if ($thumbs) {
예제 #4
0
        $img = a("select nombre, tabla from files where item_id = " . $item['id'] . " AND tipo = 'imagenes' and tabla = 'productos' order by orden");
        $phpt = new PhpT();
        $phpt->fileName = $img['nombre'];
        $phpt->fileTitle = $item['nombre'];
        $phpt->params = array('w' => 37, 'h' => 37, 'zc' => 1);
        $phpt->folder = $img['tabla'];
        $highlight1 = new highlight(cortar($item['nombre'], 40), $_POST['termino']);
        $hiTitulo = $highlight1->output_text;
        $hiTituloWords = $highlight1->output_words;
        $hiTituloWords = fs($hiTituloWords, ' ', '');
        $highlight2 = new highlight(cortar($item['resumen'], 80, array('ending' => '...', 'exact' => true, 'html' => false)), $_POST['termino']);
        $hiResumen = $highlight2->output_text;
        $foto[] = '<li class="foto">';
        if ($img) {
            $foto[] = '<a href="producto.php?id=' . $item['id'] . '&words=' . $hiTituloWords . '" title="' . $item['nombre'] . '">';
            $foto[] = $phpt->getImgHtml();
            $foto[] = '</a></li>';
        }
        $foto[] = '</li>';
        $out[] = '<ul>';
        $out[] = join("\n", $foto);
        $out[] = '<li class="data"><strong><a href="producto.php?id=' . $item['id'] . '&words=' . $hiTituloWords . '" title="' . $item['nombre'] . '">' . $hiTitulo . '</a></strong><br />';
        $out[] = $hiResumen . '</li>';
        $out[] = '</ul>';
    }
    $out[] = '<div style="clear: both;"></div>';
    //$out .= '<h3><a href="artistas.php" style="text-align: right; border-bottom: 1px solid;">Ver todos los artistas</a></h3>';
} else {
    $out[] = '<h3>No se encontraron productos.</h3>';
    $out[] = '<p><a class="noResults" href="productos.php" title="Todos los productos">Ver todos los productos aquí</a></p>';
}
예제 #5
0
$gal = array();
if ($images) {
    $x = 0;
    foreach ($images as $img) {
        $phpt = new PhpT();
        $phpt->fileName = $img['nombre'];
        $phpt->fileTitle = utf8_strtoupper($noticia['titulo']);
        $phpt->useLightbox = true;
        $phpt->lightboxCls = '';
        if ($x != 0) {
            $phpt->lightboxShowImg = false;
        }
        //$phpt->lightboxShowLink = true;
        $phpt->params = array('w' => 300, 'h' => 225, 'zc' => 1);
        $phpt->folder = $img['tabla'];
        $gal[] = $phpt->getImgHtml();
        $x++;
    }
}
$out[] = '<div class="noticiaAmpliada">';
$out[] = '<h4>' . $noticia['titulo'] . '</h4>';
$out[] = '<div class="ceebox">' . join("\n", $gal) . '</div>';
$out[] = '<span class="date">' . $noticia['df'] . '</span>';
$out[] = '<i>' . $noticia['resumen'] . '</i>';
$out[] = fop($noticia['body']);
$out[] = '<div class="clear" style="padding: 20px 0 0 0;"></div>';
$out[] = '</div>';
if ($items) {
    $out[] = '<h3>Otras Noticias</h3>';
    $out[] = '<div style="float: left; width: 49%;">';
    foreach ($chunks[0] as $i) {