Ejemplo n.º 1
0
            while ($iter <= $nr) {
                if (in_array($iter + $img_add, $picholes)) {
                    $mov_holes++;
                    $nr++;
                }
                $iter++;
            }
        }
        for ($r = 1; $r <= $item['rows'] && $inum <= $item['quantity']; $r++) {
            $content .= '<tr valign="middle">';
            for ($c = 1; $c <= $item['cols'] && $inum <= $item['quantity']; $c++) {
                if (count($picholes)) {
                    while (in_array($inum + $img_add + $mov_holes, $picholes)) {
                        $img_add++;
                    }
                }
                $icon_num = $inum + $img_add + $mov_holes;
                $href_num = in_array('LI', $group_options) ? $icon_num : $inum;
                $icon_thumb = sprintf($item['thumbtemp'], $icon_num);
                $content .= UpdateTemplate($icon_temp, array('href' => sprintf($href, $href_num), 'icon' => is_file($absidir . $icon_thumb) ? $icondir . $icon_thumb : DEFAULT_THUMB_ICON));
                $inum++;
            }
            $content .= '</tr>' . "\n";
        }
    } else {
        $content = 'Jesteśmy na stronie index';
    }
}
$catdir = PICMAN_IMAGE . GetDirForCat(0, $page_id);
$grpdir = $catdir . '/' . $item['coldir'] . '/';
echo UpdateTemplate($group_temp, array('prevhref' => $prev_href, 'prevname' => $prev_name, 'nexthref' => $next_href, 'nextname' => $next_name, 'title' => $item['title'], 'header' => $item['header'], 'desc' => $item['description'], 'cols' => $item['cols'], 'rows' => $item['rows'], 'dateupdate' => date('Y-m-d', strtotime($item['date_create'])), 'quantity' => $item['quantity'], 'indeximg' => $indeximg, 'topcat' => GetTopCatsForCollection($page_id, $page_num), 'pagesel' => $pagesel, 'content' => $content, 'imgdir' => PICMAN_TEMPLATE_IMG . $TemplateDir, 'catdir' => $catdir, 'grpdir' => $grpdir));
Ejemplo n.º 2
0
            }
            if ($cat['rnum'] > $max_num) {
                $max_num = $cat['rnum'];
            }
            $tree->AddNode($cat['lnum'] + $add_num, array($cat['rnum'] + $add_num, NTTREE_DOT, $cat['id'], $cat['name']));
        }
        if ($default == 0 || $id == 0) {
            $tree->AddNode(1, array($max_num + 1, NTTREE_DOT, 0, ''));
        }
        return $tree->GetOptions();
    }
    return '';
}
// -------------------------------------------------------------------------
SetPageParams();
$PICMAN_INFO = array('dircat' => GetDirForCat($page_id), 'dirgrp' => '');
include PICMAN_INCLUDE . ParsePage();
// -------------------------------------------------------------------------
db_close();
class TreeDraw
{
    var $content;
    /*
     * Czy ma rysować kropkę-root
     */
    var $draw_root;
    /*
     * For draw:
     *   array ( lnum => array (rnum, image, auth, text, subnodes), ... )
     * For options:
     *   array ( lnum => array (rnum, image, id, text, subnodes), ... )
Ejemplo n.º 3
0
            }
        }
    }
    if (count($cond) > 3) {
        $qid = db_query("\n\t\tSELECT DISTINCT\n\t\t\tC.id AS cid, C.name AS catname, C.catdir AS catdir, P.name AS parent,\n\t\t\tG.id AS id, G.name AS name, G.coldir AS coldir, G.icoindex AS icoindex,\n\t\t\tG.thumbsubdir AS thumbsubdir, G.thumbtemp AS thumbtemp,\n\t\t\tG.quantity AS quantity, G.date_create AS date_create\n\t\tFROM {collections} G, {categories} C, {categories} P\n\t\tWHERE " . join(" AND ", $cond) . "\n\t\tORDER BY G.date_create DESC\n\t\t");
        echo '<table border="0">';
        if (db_num_rows($qid) > 200) {
            echo '<tr><td>More then 200 results!</td></tr>';
        } else {
            $o = array();
            while ($out = db_fetch_array($qid)) {
                $o[] = $out;
                printf("\n<!-- %d:%d: %s -->\n", $out['cid'], $out['id'], $out['catname']);
            }
            foreach ($o as $out) {
                $icon = GetDirForCat($out['cid']) . $out['coldir'] . '/';
                $icoarr = split(':', $out['icoindex']);
                if ($icoarr[0] == 'T') {
                    $icon .= sprintf($out['thumbsubdir'] . '/' . $out['thumbtemp'], $icoarr[1]);
                } else {
                    $icon .= $out['icoindex'];
                }
                echo '<tr valign="top">' . '<td>' . '<a href="' . sprintf(PICMAN_COLLECTION . "i%03d.html", $out['id']) . '">' . '<img src="' . PICMAN_IMAGE . $icon . '" border="1" />' . '</a>' . '</td>' . '<td>' . '<b>' . $out['parent'] . ' / ' . $out['catname'] . '</b><br />' . 'Name: ' . $out['name'] . '<br />' . 'Pictures: ' . $out['quantity'] . '<br />' . 'Date: ' . date('Y-m-d', strtotime($out['date_create'])) . '<br />' . '</td>' . '</tr>';
            }
        }
        echo '</table>';
    }
}
echo FramedTable2();
?>
</DIV>