Smarty
[ class tree: Smarty ] [ index: Smarty ] [ all elements ]

Source for file function.gallery.php

Documentation is available at function.gallery.php

  1. <?php
  2. /**
  3.  * Smarty plugin
  4.  * @package Smarty
  5.  * @subpackage plugins
  6.  */
  7.  
  8. /**
  9.  * smarty_function_gallery
  10.  */
  11. function smarty_function_gallery($params&$gBitSmarty)
  12. {
  13.     global $gBitSystem;
  14.     include_onceIMAGEGALS_PKG_PATH.'imagegal_lib.php' );
  15.     extract($params);
  16.     // Param = id
  17.  
  18.     if (empty($id)) {
  19.         $gBitSmarty->trigger_error("assign: missing 'id' parameter");
  20.         return;
  21.     }
  22.     $img $gBitSystem->get_random_image($id);
  23.     print('<center>');
  24.     print('<table  border="0" cellpadding="0" cellspacing="0">');
  25.     print('<tr>');
  26.     print('<td align=center>');
  27.     print('<a href="'.IMAGEGALS_PKG_URL.'browse_image.php?gallery_id='.$img['gallery_id'].'&amp;image_id='.$img['image_id'].'"><img alt="thumbnail" class="athumb" src="show_image.php?id='.$img['image_id'].'&amp;thumb=1" /></a><br/>');    
  28.     print('<b>'.$img['name'].'</b><br>');
  29.     if ($showgalleryname == 1
  30.     print('<small>From <a href="'.IMAGEGALS_PKG_URL.'browse_gallery.php?gallery_id='.$img['gallery_id'].'">'.$img['gallery'].'</a></small>');
  31.     
  32.     print('</td></tr></table></center>');
  33. }    
  34. ?>
  35. <!--
  36. <center>
  37. <table  border="0" cellpadding="0" cellspacing="0">
  38. <tr>
  39. <td align=center>
  40. <a href="'.IMAGEGALS_PKG_URL.'browse_image.php?gallery_id=<?php echo $img['gallery_id']?>&amp;image_id=<?php echo $img['image_id']?>"><img alt="thumbnail" class="athumb" src="show_image.php?id=<?php echo $img['image_id']?>&amp;thumb=1" /></a><br/>
  41. <b><?php echo $img['name']?></b><br>
  42. <?php if ($showgalleryname == 1?><small>From <a href="'.IMAGEGALS_PKG_URL.'browse_gallery.php?gallery_id=<?php echo $img['gallery_id']?>"><?php echo $img['gallery']?></a></small><?php ?>
  43. </td>
  44. </tr>
  45. </table>
  46. </center>
  47. -->

Documentation generated on Wed, 29 Jul 2015 13:56:38 +0000 by phpDocumentor 1.5.0-lsces