Location: PHPKode > projects > Buzzword > buzzword-0.8.12/gallery/gallery.php
<?php

/*
 * buzzword
 * Copyright (c) 2003 Jon Tai
 *
 * $Id: gallery.php,v 1.15 2003/12/13 07:43:33 jon Exp $
 *
 * This file is part of buzzword.
 *
 * buzzword is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * buzzword is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with buzzword; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

require_once './config.inc';

$gallery = new gallery_gallery(import_gallery_gallery_key());
if (!$gallery->exists())
    display_error('gallery does not exist');

$BUZZWORD_BREADCRUMBS = get_gallery_breadcrumbs($gallery);
include_once '../includes/header.inc';

?>
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr>
<td id="content">
<h1><?php echo $gallery->get_display_title(); ?></h1>
<div class="content-container">
<?php echo $gallery->get_display_description(); ?>
<?php

$images = get_gallery_images($gallery->gallery_key);
foreach ($images as $image) {

?>
<a href="image.php?i=<?php echo $image->image_key; ?>"><img 
 src="thumb.php?i=<?php echo $image->image_key; ?>" <?php echo $image->get_alt(); ?> 
 border="0" <?php echo $image->get_thumb_size(); ?>></a>
<?php

}

?>
</div>
</td>
<td id="sidebar">
<h1>this gallery</h1>
<div class="sidebar-container">
<p>
<?php

if ($gallery->gallery_key != 0) {
    echo 'created '.$gallery->get_display_date_created().' at '.$gallery->get_display_time_created()."<br>\n";
    if ($gallery->created != $gallery->modified)
        echo 'updated '.$gallery->get_display_date_modified().' at '.$gallery->get_display_time_modified()."<br>\n";
}

?>
</p>
<p>
<?php

echo str_plural(count($images), 'image', 'images')." in this gallery<br>\n";
echo "<br>\n";
echo "<a href=\"#\" onClick=\"gallery_slideshow_popup({$gallery->gallery_key}); return false;\">view slideshow</a>\n";

?>
</p>
</div>
<h1>other galleries</h1>
<div class="sidebar-container">
<p>
<?php 

echo get_sidebar_gallery_galleries($gallery);

?>
</p>
</div>
<?php

echo relevance_hook('gallery_gallery', $gallery->gallery_key);

?>
<?php if (defined('ADMIN_LOGGED_IN')) { ?>
<h1>administration</h1>
<div class="sidebar-container">
<p>
<a href="editgallery.php?g=<?php echo $gallery->gallery_key; ?>">edit gallery</a><br>
<a href="../admin/preferences.php">preferences</a><br>
<a href="../admin/index.php?admin-logout=1">log out</a><br>
</p>
</div>
<?php } ?>
</td>
</tr>
</table>
<?php

include_once '../includes/footer.inc';

?>
Return current item: Buzzword