<?php
/*************************
Coppermine Photo Gallery
************************
Copyright (c) 2003-2006 Coppermine Dev Team
v1.1 originally written by Gregory DEMAR
This program 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.
********************************************
Coppermine version: 1.4.9
$Source$
$Revision: 3125 $
$Author: gaugau $
$Date: 2006-06-16 08:48:03 +0200 (Fr, 16 Jun 2006) $
**********************************************/
// ------------------------------------------------------------------------- //
// The theme "Fruity" has been done by GauGau (http://gaugau.de/) based on //
// the framed template of studicasa.nl (their website has gone down, so I //
// guess no one will care). The usage of this theme is free for personal //
// use, not for commercial use (according to the disclaimer of studiocasa)! //
// ------------------------------------------------------------------------- //
define('THEME_HAS_RATING_GRAPHICS', 1);
define('THEME_HAS_NAVBAR_GRAPHICS', 1);
define('THEME_IS_XHTML10_TRANSITIONAL',1); // Remove this if you edit this template until
// you have validated it. See docs/theme.htm.
// HTML template for main menu
$template_sys_menu = <<<EOT
<div class="topmenu">
{BUTTONS}
</div>
EOT;
// HTML template for template sys_menu spacer
$template_sys_menu_spacer ='';
// Display the full size image
function theme_display_fullsize_pic()
{
global $CONFIG, $THEME_DIR, $ALBUM_SET;
global $lang_errors, $lang_fullsize_popup, $lang_charset;
if (isset($_GET['picfile']))
{
if (!GALLERY_ADMIN_MODE) cpg_die(ERROR, $lang_errors['access_denied'], __FILE__, __LINE__);
$picfile = $_GET['picfile'];
$picname = $CONFIG['fullpath'] . $picfile;
$imagesize = @getimagesize($picname);
$imagedata = array('name' => $picfile, 'path' => path2url($picname), 'geometry' => $imagesize[3]);
}
elseif (isset($_GET['pid']))
{
$pid = (int)$_GET['pid'];
$sql = "SELECT * " . "FROM {$CONFIG['TABLE_PICTURES']} " . "WHERE pid='$pid' $ALBUM_SET";
$result = cpg_db_query($sql);
if (!mysql_num_rows($result)) cpg_die(ERROR, $lang_errors['non_exist_ap'], __FILE__, __LINE__);
$row = mysql_fetch_array($result);
$pic_url = get_pic_url($row, 'fullsize');
$geom = 'width="' . $row['pwidth'] . '" height="' . $row['pheight'] . '"';
$imagedata = array('name' => $row['filename'], 'path' => $pic_url, 'geometry' => $geom);
}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=<?php echo $CONFIG['charset'] == 'language file' ? $lang_charset : $CONFIG['charset'] ?>" />
<title><?php echo $CONFIG['gallery_name'] ?>: <?php echo $lang_fullsize_popup['click_to_close'];
?></title>
<script type="text/javascript" src="scripts.js"></script>
<style type="text/css">
body { margin: 0; padding: 0; background-color: gray; }
img { margin:0; padding:0; border:0; }
#content { margin:0 auto; padding:0; border:0; }
table { border:0; height:100%; width:100%; border-collapse:collapse}
td { vertical-align: middle; text-align:center; }
</style>
</head>
<body>
<script language="JavaScript" type="text/JavaScript">
adjust_popup();
</script>
<table>
<tr>
<td>
<div id="content">
<?php echo '<a href="javascript: window.close()"><img src="'
. htmlspecialchars($imagedata['path']) . '" '
. $imagedata['geometry']
. 'alt="'
. htmlspecialchars($imagedata['name'])
. '" title="'
. htmlspecialchars($imagedata['name'])
. "\n" . $lang_fullsize_popup['click_to_close']
. '" /></a><br />' ."\n";
?>
</div>
</td>
</tr>
</table>
</body>
</html>
<?php
}
?>