Example #1
0
<table>
    <tbody>
        <tr>
            <td id="logotipo">
                <a href="<?php 
echo PROY_URL;
?>
">
                    <img src="IMG/portada/logo.png" alt="Logotipo Flor360.com"/>
                </a>
		<img id="mariposa"src="IMG/stock/butterfly-mini.gif" />
            </td>
	    <td id="centro">
		<a href="<?php 
echo opcion('portada_enlace_imagen_superior_central', '');
?>
"><img src="IMG/portada/superior_central.jpg" alt="<?php 
echo PROY_NOMBRE;
?>
" title="<?php 
echo PROY_NOMBRE;
?>
"/></a>
	    </td>
            <td id="telefonos">
                    <img src="IMG/stock/bandera_SLV.gif" alt="Bandera de El Salvador" /><br />
                    El Salvador
                    <p class="medio-oculto">
                        <span style="color:#F00;font-weight:bolder;">Tel.: (+503) 2243-6017</span><br />
                        <?php 
if (!S_iniciado()) {
Example #2
0
$bELEMENTOS = '';
$FROM = sprintf('FROM flores_producto_contenedor AS pc LEFT JOIN (SELECT * FROM flores_producto_variedad ORDER BY precio ASC) AS pv USING(codigo_producto) LEFT JOIN flores_productos_categoria AS pcat USING(codigo_producto) LEFT JOIN flores_categorias AS cat USING(codigo_categoria)');
$GROUP_BY = 'GROUP BY pv.codigo_producto';
$c = 'SELECT ' . join(', ', $CAMPOS) . ' ' . $FROM . $GROUP_BY . ' ORDER BY RAND("20100219")';
$r = db_consultar($c);
if (!mysql_num_rows($r)) {
    echo '<div style="display:block">Lo sentimos, por el momento se nos han agotado las existencias de estos productos.</div>';
    return;
}
/* Workhorse */
$nElementos = mysql_num_rows($r);
$nFilas = ceil($nElementos / opcion('categoria_articulos_por_fila', 4));
$bELEMENTOS .= '<table style="width:100%;table-layout:fixed;border-collapse:collapse;margin:0;border:none;padding:0">';
for ($i = 0; $i < $nFilas; $i++) {
    $bELEMENTOS .= '<tr>';
    for ($j = 0; $j < opcion('categoria_articulos_por_fila', 4); $j++) {
        $bELEMENTOS .= '<td style="text-align:center;vertical-align:top;">';
        if ($f = mysql_fetch_assoc($r)) {
            if (empty($f['variedad_foto'])) {
                $f['variedad_foto'] = 'IMG/stock/sin_imagen_133_200.jpg';
            } else {
                $f['variedad_foto'] = 'imagen_133_200_' . $f['variedad_foto'];
            }
            $bELEMENTOS .= '<div class="categoria-elemento">
                <a href="' . PROY_URL . 'arreglos-florales-floristerias-en-el-salvador-' . SEO($f['contenedor_titulo'] . '-' . $f['codigo_producto']) . '">
                <img style="width:133px;height:200px;" title="' . $f['contenedor_descripcion'] . '" src="' . $f['variedad_foto'] . '" />
                </a>';
            $bELEMENTOS .= '<div class="titulo">' . $f['contenedor_titulo'] . '</div>';
            $bELEMENTOS .= '<div class="precio">' . $f['precio_combinado'] . '</div>';
            if (isset($_GET['no_cantidad'])) {
                $f['variedad_receta'] = preg_replace(array('/[^\\w,\\s]/', '/\\d\\s{0,1}/'), '', $f['variedad_receta']);
Example #3
0
$bFiltro .= '</table>';
/* COLOR */
$c = 'SELECT COUNT(DISTINCT pc.codigo_producto) AS cuenta, pc.color ' . $FROM . ' GROUP BY pc.color ORDER BY CAST(pc.color AS CHAR) ASC';
$r = db_consultar($c);
$bFiltro .= '<h2>Color</h2>';
$bFiltro .= '<table>';
while ($f = mysql_fetch_array($r)) {
    $bFiltro .= '<tr><td><a rel="nofollow" href="' . PROY_URL_ACTUAL . '?refinado=color&valor=' . $f['color'] . '">' . $f['color'] . '</a></td><td>[' . $f['cuenta'] . ']</td></tr>' . "\n";
}
$bFiltro .= '</table>';
$bFiltro .= '</div>';
/* SALIDA */
if (_F_usuario_cache('nivel') == _N_administrador) {
    echo '<div style="display:block;clear:both;width:100%;">' . ui_input('js_admin', 'Mostrar/Ocultar opciones de administración', "button") . '</div>';
    echo JS_onload('$(".admin360").hide();$("#js_admin").click(function () {$(".admin360").toggle();});');
    echo '<div class="admin360" style="display:block;width:100%;text-align:center">';
    echo '<hr />';
    echo '<form action="' . PROY_URL_ACTUAL . '" method="POST" enctype="multipart/form-data"/>';
    echo '<h1>Opciones de administración</h1>';
    echo 'Número de elementos por fila: ' . ui_input('txt_nElementos_por_fila', opcion('categoria_articulos_por_fila', 4)) . ' ' . ui_input('btn_nElementos_por_fila', 'Establecer', 'submit', 'btnlnk');
    '</form>';
    echo '<hr />';
    echo '</div>';
}
echo '<h1>' . PROY_NOMBRE . '</h1>';
echo '<table style="width:100%;border-collapse:collapse;margin:0;border:none;padding:0">';
echo '<tr>';
echo '<td style="width:170px;vertical-align:top;">' . $bFiltro . '</td>';
echo '<td style="width:800px;vertical-align:top;">' . $bELEMENTOS . '</td>';
echo '</tr>';
echo '</table>';
Example #4
0
function BUSCAR_mostrar_resultados($r)
{
    global $modo;
    if ($modo == 'iconos') {
        $nElementos = mysql_num_rows($r);
        $nFilas = ceil($nElementos / opcion('categoria_articulos_por_fila', 4));
        $bELEMENTOS = '<table style="width:100%;table-layout:fixed;border-collapse:collapse;margin:0;border:none;padding:0">';
        for ($i = 0; $i < $nFilas; $i++) {
            $bELEMENTOS .= '<tr>';
            for ($j = 0; $j < opcion('categoria_articulos_por_fila', 4); $j++) {
                $bELEMENTOS .= '<td style="text-align:center;vertical-align:top;">';
                if ($f = mysql_fetch_assoc($r)) {
                    $bELEMENTOS .= '<div class="categoria-elemento">
                    <a href="' . PROY_URL . 'arreglos-florales-floristerias-en-el-salvador-' . SEO($f['contenedor_titulo'] . '-' . $f['codigo_producto']) . '">
                    <img style="height:200px;" title="' . $f['contenedor_descripcion'] . '" src="' . imagen_URL($f['variedad_foto'], 0, 200) . '" />
                    </a>';
                    $bELEMENTOS .= '<div class="titulo">' . $f['contenedor_titulo'] . '</div>';
                    $bELEMENTOS .= '<div class="precio">' . $f['precio_combinado'] . '</div>';
                    $bELEMENTOS .= '</div>';
                }
                $bELEMENTOS .= '</td>';
            }
            $bELEMENTOS .= '</tr>';
        }
        $bELEMENTOS .= '</table>';
        echo $bELEMENTOS;
    } else {
        echo '<table class="ancha">';
        echo '<tr><th>Fotografía</th><th>Título</th><th>Descripción</th><th>Color</th><th>Precio</th></tr>';
        while ($f = mysql_fetch_assoc($r)) {
            echo sprintf('<tr><td>%s</td><td nowrap="nowrap">%s</td><td>%s</td><td>%s</td><td nowrap="nowrap">%s</td></tr>', '<img style="height:100px" src="' . imagen_URL($f['variedad_foto'], 0, 100) . '" />', '<a href="' . PROY_URL . 'arreglos-florales-floristerias-en-el-salvador-' . SEO($f['contenedor_titulo'] . '-' . $f['codigo_producto']) . '">' . $f['contenedor_titulo'] . '</a>', nl2br($f['contenedor_descripcion']), $f['color'], $f['precio_combinado']);
        }
        echo '</table>';
    }
}
Example #5
0
        $contenido .= '<img class="bloque" title="' . $f['titulo_categoria'] . '" alt="' . $f['titulo_categoria'] . '" src="' . imagen_URL($f['foto'], 133, 200, 'img0.') . '" />';
        $contenido .= '</a><div class="titulo-categoria">' . $f['titulo_categoria'] . '</div>';
    }
    $contenido .= '</div>';
    $contenido .= SI_ADMIN('<FORM class="admin360" action="' . PROY_URL_ACTUAL . '" method="POST">' . ui_input('hdd_posicion', $i, 'hidden') . ui_combobox("txt_nuevo_contenedor", flores_db_ui_obtener_categorias_y_contenedores_cmb(), $f['codigo_categoria'] . ',' . $f['codigo_producto'], '', 'width:100%') . ui_input('btn_cambiar_contenedor_portada', 'Cambiar', 'submit') . '</form>');
    $var = 'COL' . $i % 2;
    ${$var} .= $contenido;
}
$COL0 = preg_replace('/<\\/div><div /', '</div><div class="portada-divisor"></div><div ', $COL0, 1);
$COL1 = preg_replace('/<\\/div><div /', '</div><div class="portada-divisor"></div><div ', $COL1, 1);
$IMG_CENTRAL = '<a href="' . opcion('portada_enlace_imagen_principal', '') . '"><img title="Floristerias en El Salvador" alt="Floristerias en El Salvador" src="IMG/portada/principal.jpg" /></a>';
// Fila inferior
$conpor = "select `fprocat`.`codigo_categoria` AS `codigo_categoria`,`fprocat`.`codigo_producto` AS `codigo_producto`,`op`.`campo` AS `campo`,`op`.`subvalor2` AS `subvalor2` from (`flores_productos_categoria` `fprocat` left join `flores_opciones` `op` on(((`fprocat`.`codigo_categoria` = `op`.`valor`) and (`fprocat`.`codigo_producto` = `op`.`subvalor`)))) where (`op`.`campo` like 'portada_top10_posicion_%')";
$c = sprintf('SELECT CONCAT("$",(IF(MIN(pv.precio)=MAX(pv.precio),pv.precio,CONCAT(MIN(pv.precio), " - $",MAX(pv.precio))))) AS "precio_combinado", pv.foto AS "variedad_foto", IF(pc.titulo="","sin titulo",pc.titulo) AS "contenedor_titulo", pc.descripcion AS "contenedor_descripcion", pc.codigo_producto, cat.titulo AS "categoria_titulo", cat.codigo_categoria, conpor.subvalor2  AS "filtro", fil.descripcion_filtro FROM (%s) AS conpor LEFT JOIN flores_filtros AS fil ON (conpor.subvalor2 = fil.nombre_filtro) LEFT JOIN flores_producto_contenedor AS pc USING(codigo_producto) LEFT JOIN flores_categorias AS cat USING(codigo_categoria) LEFT JOIN flores_producto_variedad AS pv USING(codigo_producto) GROUP BY pv.codigo_producto ORDER BY right(conpor.campo,length(conpor.campo)-length("portada_top10_posicion_")) ASC', $conpor);
$r = db_consultar($c);
$nFilas = opcion('portada_nFilas_inferior', 1);
$TOP10 = '<table id="top10">';
for ($i = 0; $i < $nFilas; $i++) {
    $TOP10 .= '<tr>';
    for ($j = 0; $j < 5; $j++) {
        $TOP10 .= '<td style="text-align:center;vertical-align:top;">';
        $TOP10 .= '<div class="categoria-elemento">';
        if ($f = mysql_fetch_assoc($r)) {
            if (empty($f['filtro'])) {
                $TOP10 .= '<div class="titulo" style="font-size:1.4em;font-weight:bolder;">' . $f['categoria_titulo'] . '</div>';
                $TOP10 .= '<a href="' . PROY_URL . 'categoria-' . SEO($f['categoria_titulo'] . '-' . $f['codigo_categoria']) . '"><img title="' . $f['categoria_titulo'] . '" alt="' . $f['categoria_titulo'] . '" src="' . imagen_URL($f['variedad_foto'], 0, 200, 'img0.') . '" /></a>';
                $checked = '';
            } else {
                $TOP10 .= '<div class="titulo" style="font-size:1.4em;font-weight:bolder;">' . $f['descripcion_filtro'] . '</div>';
                $TOP10 .= '<a href="' . PROY_URL . 'categoria-' . $f['filtro'] . '-especial.html"><img title="' . $f['categoria_titulo'] . '" alt="' . $f['categoria_titulo'] . '" src="' . imagen_URL($f['variedad_foto'], 0, 200, 'img0.') . '" /></a>';
                $checked = 'checked="checked"';