| | Copyright: copyright (C) 2004 by Mike de Boer | | Description: zOOm Image Gallery, a multi-gallery component for | | Mambo based on RSGallery by Ronald Smit. It's the most | | feature-rich gallery component for Mambo! | | Filename: view.php | | Version: 2.1.4 | | | ----------------------------------------------------------------------- **/ if(array_key_exists('popup', $_REQUEST)) $popup = $_REQUEST['popup']; if(array_key_exists('isAdmin', $_REQUEST)) $isAdmin = $_REQUEST['isAdmin']; $catid = $_REQUEST['catid']; $key = $_REQUEST['key']; $PageNo = $_REQUEST['PageNo']; $hit = $_REQUEST['hit']; if($popup){ define( "_VALID_MOS", 1 ); include('../../configuration.php'); if (file_exists($mosConfig_absolute_path."/version.php")) { include($mosConfig_absolute_path."/version.php"); }else{ include($mosConfig_absolute_path."/includes/version.php"); } if (file_exists( $mosConfig_absolute_path."/components/com_zoom/language/".$mosConfig_lang.".php" ) ) { include_once( $mosConfig_absolute_path."/components/com_zoom/language/".$mosConfig_lang.".php" ); } else { include_once( $mosConfig_absolute_path."/components/com_zoom/language/english.php" ); } // redefine the mambo database object to use the comment function... require($mosConfig_absolute_path.'/includes/database.php'); $database = new database( $mosConfig_host, $mosConfig_user, $mosConfig_password, $mosConfig_db, $mosConfig_dbprefix ); // Create zOOm Image Gallery object require('classes/zoom.class.php'); require('classes/editmon.class.php'); //like a common session-monitor... require('classes/gallery.class.php'); require('classes/image.class.php'); require('classes/comment.class.php'); // Load configuration file... include('zoom_config.php'); $zoom = new zoom(); $zoom->setGallery($catid); if($isAdmin) $zoom->_isAdmin = true; if($zoom->isWin()){ include($mosConfig_absolute_path.'/components/com_zoom/classes/fs_win32.php'); }else{ include($mosConfig_absolute_path.'/components/com_zoom/classes/fs_unix.php'); } } // MOS Intruder Alerts defined( '_VALID_MOS' ) or die( 'Direct Access to this location is not allowed.' ); // get the file-data for display $zoom->_gallery->_images[$key]->getInfo(); if($zoom->_gallery->_images[$key]->isMember($popup)){ if (isset($submit)) { $uname = $_REQUEST['uname']; $comment = $_REQUEST['comment']; $zoom->_gallery->_images[$key]->addComment($uname,$comment); } if (isset($delComment)) { $zoom->_gallery->_images[$key]->delComment($delComment); } if (isset($vote)){ $zoom->_gallery->_images[$key]->rateImg($vote); } // update hitcounter for this image... if (isset($hit)){ $zoom->_gallery->_images[$key]->hitPlus(); } if($zoom->_CONFIG['popUpImages']){ ?> "; ?> <?php echo $zoom->_CONFIG['zoom_title']." - ".$zoom->_gallery->_images[$key]->_filename;?> _CONFIG['readEXIF']) { include($mosConfig_absolute_path."/components/com_zoom/classes/iptc/JPEG.php"); include($mosConfig_absolute_path."/components/com_zoom/classes/iptc/EXIF.php"); include($mosConfig_absolute_path."/components/com_zoom/classes/iptc/JFIF.php"); include($mosConfig_absolute_path."/components/com_zoom/classes/iptc/Photoshop_IRB.php"); include($mosConfig_absolute_path."/components/com_zoom/classes/iptc/PictureInfo.php"); include($mosConfig_absolute_path."/components/com_zoom/classes/iptc/XMP.php"); ?> _CONFIG['imagepath'].$zoom->_gallery->_dir."/".$zoom->_gallery->_images[$key]->_viewsize; $img_loc = $mosConfig_absolute_path."/".$zoom->_CONFIG['imagepath'].$zoom->_gallery->_dir."/".$zoom->_gallery->_images[$key]->_viewsize; $dir_prefix = $mosConfig_live_site."/components/com_zoom/"; if ($zoom->_CONFIG['popUpImages']){ $url_prefix = "view.php?popup=1&catid=".$zoom->_gallery->_id; }else{ $url_prefix = "index.php?option=com_zoom&Itemid=".$Itemid."&page=view&catid=".$zoom->_gallery->_id; } $size = getimagesize($img_loc); if ($zoom->isThumbnailable($zoom->_gallery->_images[$key]->_type)) { if(max($size[0], $size[1]) > $zoom->_CONFIG['maxsize']){ // height/width $srcWidth = $size[0]; $srcHeight = $size[1]; $ratio = max($srcWidth, $srcHeight) / $zoom->_CONFIG['maxsize']; $ratio = max($ratio, 1.0); $destWidth = (int)($srcWidth / $ratio); $destHeight = (int)($srcHeight / $ratio); } } $first_img = 0; $last_img = count($zoom->_gallery->_images) - 1; if ($key == $first_img){ $pid = $last_img; }else{ if ($key == $last_img){ $pid = ($key == count($zoom->_gallery->_images)) ? $key : $key-1; }else{ $pid = ($key == (count($zoom->_gallery->_images) - 1)) ? $key : $key-1; } } if ($key == $last_img){ $nid = $first_img; }else{ $nid = ($key == (count($zoom->_gallery->_images) - 1)) ? $key : $key+1; } if ($zoom->_CONFIG['slideshow']) $zoom->createSlideshow($key); if ($zoom->_CONFIG['zoomOn']) $zoom->createZoomJavascript($size); if($zoom->_CONFIG['popUpImages']){ ?>


_CONFIG['lightbox']){ echo ("\t\t\n"); } if($zoom->_CONFIG['ecards']){ ?>
  \n" . "\t\t\n" . "\t\t \n" . "\t\t
_CONFIG['lightbox']){ echo ("\t\t\n"); } if($zoom->_CONFIG['ecards']){ ?>
  <?php echo _ZOOM_MAINSCREEN;?>   > _gallery->_name;?> > _gallery->_images[$key]->_filename;?> \n" . "\t\t_gallery->_id."&key=".$key."&PageNo=".$PageNo."\" onmouseover=\"return overlib('"._ZOOM_LIGHTBOX_ITEM."');\" onmouseout=\"return nd();\">\n" . "\t\t \n" . "\t\t _gallery->_id."&key=".$key;?>" onmouseover="return overlib('');" onmouseout="return nd();">
_CONFIG['slideshow'] && $zoom->isImage($zoom->_gallery->_images[$key]->_type)){ ?>
_CONFIG['slideshow'] && $zoom->isImage($zoom->_gallery->_images[$key]->_type)){ //Display play & stop buttons? ?>
isImage($zoom->_gallery->_images[$key]->_type)){ if (isset($destWidth) && isset($destHeight)){ ?> _CONFIG['popUpImages']) ? " onClick=\"javscript:window.close()\"" : "";?>> _CONFIG['popUpImages']) ? " onClick=\"javscript:window.close()\"" : "";?>> isDocument($zoom->_gallery->_images[$key]->_type)){ ?> _CONFIG['popUpImages']) ? " onClick=\"javscript:window.close()\"" : "";?>> isMovie($zoom->_gallery->_images[$key]->_type)){ if($zoom->isRealMedia($zoom->_gallery->_images[$key]->_type)){ ?> isQuicktime($zoom->_gallery->_images[$key]->_type)){ ?> _CONFIG['zoomOn'] && $zoom->isImage($zoom->_gallery->_images[$key]->_type)){ ?>
_CONFIG['showName']){?> _CONFIG['showFilename']){?> _CONFIG['showKeywords']){?> _CONFIG['showDate']){?> _CONFIG['showDescr']){?> _CONFIG['showHits']){ ?> _CONFIG['ratingOn']){ ?>
 
: _gallery->_images[$key]->_name;?>
: isDocument($zoom->_gallery->_images[$key]->_type)) echo "".$zoom->_gallery->_images[$key]->_filename." "._ZOOM_CLICKDOCUMENT; else echo $zoom->_gallery->_images[$key]->_filename; ?>
: _gallery->_images[$key]->getKeywords(2);?>
: convertDate($zoom->_gallery->_images[$key]->_date); ?>
: _gallery->_images[$key]->_descr; ?>
: _gallery->_images[$key]->_hits; ?>
_gallery->_images[$key]->_votenum!=0){ if($zoom->_gallery->_images[$key]->_votesum!=0){ $rating = round($zoom->_gallery->_images[$key]->_votesum / $zoom->_gallery->_images[$key]->_votenum); }else{ $rating = 0; } echo ' ('.$zoom->_gallery->_images[$key]->_votenum.' '; if($zoom->_gallery->_images[$key]->_votenum==1) echo _ZOOM_VOTE.')'; else echo _ZOOM_VOTES.')'; }else{ echo ""._ZOOM_NOTRATED.""; } ?>
_CONFIG['readEXIF']){ // $exif = $zoom->_gallery->_images[$key]->exif_parse_file($img_loc); ?>
_CONFIG['commentsOn']) { ?> _isAdmin==true){ print ""; } ?> _gallery->_images[$key]->_comments)){ echo ("\n" . "\t\n" . "\t\n" . "\n"); }else{ // Display comments found in the database. $smilies = $zoom->getSmiliesTable(); foreach($zoom->_gallery->_images[$key]->_comments as $comment){ if($count>1){ $colour=$zoom->_tabclass[0]; $count=0; }else{ $colour=$zoom->_tabclass[1]; } $theComment = $comment->processSmilies($comment->_comment,$dir_prefix,$smilies); $cmtrow = ""; if ($zoom->_isAdmin==true){ // the adminstrator is able to delete comments directly through the hyperlink... $cmtrow = ""; }else{ $cmtrow = ""; } echo $cmtrow; $count++; } } ?>
  Admin
 "._ZOOM_NO_COMMENTS."
".$comment->_name.": ".$theComment." (".$comment->_date.")"; if (!$zoom->_CONFIG['popUpImages']) $cmtrow .= "_gallery->_id."&key=".$key."&isAdmin=".$isAdmin."&delComment=".$comment->_id."\">
".$comment->_name.": ".$theComment." (".$comment->_date.")
username)){ ?> username;?>
:
 
  Very Happy Smile Sad Surprised Shocked Confused Cool Laughing Mad Razz Embarassed Crying or Very sad Evil or Very Mad Twisted Evil Rolling Eyes Wink Exclamation Question Idea Arrow
_CONFIG['ratingOn']){ ?>
 
_CONFIG['popUpImages']){ ?>