<?php
  /**
   * Copyright 2011 Zazavi - http://www.zazavi.com
   * Zazavi is free software released under the terms of the GNU General Public License.
   * You should have received a copy of the license.  If not, see <http://www.gnu.org/licenses/>.
   */
  
  if (!defined("_VALID_PHP"))
      die('Direct access to this location is not allowed.');
  
  require_once(ZAZAVILITE . "admin/modules/gallery/admin_class.php");
  require_once(ZAZAVILITE . "admin/modules/gallery/lang/" . $core->language . ".lang.php");
  
  $gallery = new Gallery($this->gallery_id);
  $galrow = $gallery->getGalleryImages($this->gallery_id); 
?>
<?php if($galrow == 0):?>
<div class="msgAlert"><?php echo MOD_GA_NOIMG;?></div>
<?php else:?>
<div>
  <ul id="galleryrow">
    <?php foreach($galrow as $row):?>
    <?php if($gallery->watermark):?>
    <?php $url = SITEURL.'/modules/gallery/getimage.php?folder='.$gallery->folder.'&amp;image='.$row['thumb'];?>
    <?php else:?>
    <?php $url = SITEURL.'/'.$gallery->galpath.$gallery->folder.'/'.$row['thumb'];?>
    <?php endif;?>
    <li style="width:<?php echo round(100 / $gallery->rows);?>%"><a href="<?php echo $url;?>" title="<?php echo $row['title'.$core->dblang];?>" rel="prettyPhoto[pp_gal]" class="tooltip"> <img src="<?php echo SITEURL.'/'.$gallery->galpath.$gallery->folder.'/thumbs/'.$row['thumb'];?>" alt="<?php echo $row['description'.$core->dblang];?>"/></a></li>
    <?php endforeach;?>
  </ul>
  <div class="clear"></div>
</div>
<?php endif;?>