Guest User

Untitled

a guest
Jul 19th, 2018
90
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.10 KB | None | 0 0
  1. <? if ($_GET['id'] == 27) {
  2. // Multiple Galleries
  3. ?>
  4. <form action="" method="get" name="galleries">
  5. <input type="hidden" name="id" value="<?=$_GET['id']?>" />
  6. <input type="hidden" name="view" value="gallery" />
  7. <select name="event" onchange="javascript: this.form.submit();">
  8. <?
  9. $result2 = mysql_query("SELECT * FROM galleries_categories gc, galleries g WHERE gc.id=g.gallery_category AND gc.id='3' ORDER BY g.gallery_rank ASC") or die(mysql_error());
  10. while($gal = mysql_fetch_array( $result2 )){
  11. ?>
  12. <option value="<?=$gal['gallery_id']?>" <? if($_GET['event']==$gal['gallery_id']){?>selected="selected"<? } ?>><?=$gal['gallery_title']?></option>
  13. <? } ?>
  14. </select>
  15. </form>
  16.  
  17. <?
  18. $result3 = mysql_query("SELECT * FROM galleries_categories gc, galleries g WHERE gc.id=g.gallery_category AND gc.id='3' ORDER BY g.gallery_rank ASC LIMIT 1") or die(mysql_error());
  19. $current_gal = mysql_fetch_array( $result3 );
  20. $gal_description = $current_gal['gallery_description'];
  21. $current_gal = $current_gal['gallery_id'];
  22.  
  23. $gal_id = (isset($_GET['event'])) ? $_GET['event'] : $current_gal;
  24. $rs5= mysql_query("SELECT filename, filepath, filepath_thumb, caption FROM files_galleries fg, galleries g, files f WHERE fg.file_id=f.id AND fg.galleries_id=g.gallery_id AND g.gallery_id = '$gal_id' ORDER BY g.gallery_rank ASC ") or die(mysql_error());
  25. ?>
  26. <div class="text">
  27. <div id="mainGallery">
  28. <div id="wrapper">
  29. <div id="img"><div class="caption"></div></div>
  30. <ul id="gallery" class="jcarousel-skin-tango">
  31. <? $i = 1;
  32. while(list($filename, $filepath, $thumb, $caption) = mysql_fetch_array($rs5)){?>
  33. <li><a href="<?=$server_file_url?><?=$filepath?>" title="<?=$caption?>" id="<?=$i?>"><img src="<?=$server_file_url?><?=$thumb?>" width="100" height="80" alt="" /></a><div class="thumb_caption"><?=$caption?></div></li>
  34. <? $i++; } ?>
  35. </ul>
  36. </div>
  37. </div>
  38. </div>
  39. <? }else{
Add Comment
Please, Sign In to add comment