Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.95 KB | None | 0 0
  1. <html>
  2.  
  3. <head>
  4. <link rel="stylesheet" type="text/css" href="css/basic.css">
  5. <link rel="stylesheet" type="text/css" href="css/galleriffic-2.css">
  6. <script src="../js/jquery-latest.pack.js" type="text/javascript"></script>
  7. <script type="text/javascript" src="../js/gallerific/jquery.galleriffic.js"></script>
  8. <script type="text/javascript" src="../js/gallerific/jquery.opacityrollover.js"></script>
  9. <script type="text/javascript">
  10. <!-- test -->
  11. jQuery(document).ready(function($) {
  12. $("#closegallery").click(function(){
  13. $("#pikachoose").hide();
  14. $("#gallery-bg").fadeOut('fast');
  15. });
  16. });
  17. <!-- test -->
  18. </script>
  19. </head>
  20. <body>
  21. <?php
  22. error_reporting(E_ALL);
  23. ini_set('display_errors', 1);
  24.  
  25. include('conf.php');
  26. //$category = $_GET['category'];
  27. //echo $category;
  28. $category = "portrai";
  29.  
  30. // connect to db
  31. $con = mysql_connect("localhost",$db_user,$db_pass);
  32. // on fail set error
  33. if (!$con) die('Could not connect: ' . mysql_error());
  34. // select database
  35. mysql_select_db($db, $con);
  36. // select thumbnails
  37. $pic_query = "SELECT * FROM ab_portfolio WHERE category = '".$category."' AND active = 1";
  38. // get results of query
  39. $pic_result = mysql_query($pic_query) or die(mysql_error());
  40. // close connection
  41. mysql_close($con);
  42. ?>
  43. <div id="pikachoose">
  44. <div style="width:100%; height:30px; text-align:right; float:right;"><a href="#"><img src="img/close.png" id="closegallery" alt="Schlie&szlig;en" title="Schlie&szlig;en"></a></div>
  45. <div id="gallery" class="content">
  46. <div class="slideshow-container">
  47. <div id="closegallery"></div>
  48. <div id="loading" class="loader"></div>
  49. <div id="slideshow" class="slideshow"></div>
  50. </div>
  51. </div>
  52.  
  53. <div id="thumbs" class="navigation">
  54.  
  55. <ul class="thumbs noscript">
  56.  
  57. <?php
  58. while ($pic_row = mysql_fetch_array($pic_result)){
  59. $title = $pic_row['title'];
  60. $description = $pic_row['description'];
  61. $category = $pic_row['category'];
  62. $active = $pic_row['active'];
  63. $pic = $pic_row['pic'];
  64. ?>
  65.  
  66. <li>
  67. <a class="thumb" href="img/portfolio/pic/<?php echo $pic; ?>" title="your image title">
  68. <img src="img/portfolio/pic/thumb-<?php echo $pic; ?>" alt="your image title again for graceful degradation" />
  69. </a>
  70. <div class="caption"></div>
  71. </li>
  72.  
  73.  
  74.  
  75. <?php
  76. }
  77. ?>
  78. </ul>
  79.  
  80. </div>
  81. <div style="clear: both;"></div>
  82. </div>
  83.  
  84. <script type="text/javascript">
  85. jQuery(document).ready(function($) {
  86. // We only want these styles applied when javascript is enabled
  87. $('div.navigation').css({'width' : '300px', 'float' : 'left'});
  88. $('div.content').css('display', 'block');
  89.  
  90. // Initially set opacity on thumbs and add
  91. // additional styling for hover effect on thumbs
  92. var onMouseOutOpacity = 0.67;
  93. $('#thumbs ul.thumbs li').opacityrollover({
  94. mouseOutOpacity: onMouseOutOpacity,
  95. mouseOverOpacity: 1.0,
  96. fadeSpeed: 'fast',
  97. exemptionSelector: '.selected'
  98. });
  99.  
  100. // Initialize Advanced Galleriffic Gallery
  101. var gallery = $('#thumbs').galleriffic({
  102. delay: 2500,
  103. numThumbs: 15,
  104. preloadAhead: 10,
  105. enableTopPager: true,
  106. enableBottomPager: true,
  107. maxPagesToShow: 7,
  108. imageContainerSel: '#slideshow',
  109. controlsContainerSel: '#controls',
  110. captionContainerSel: '#caption',
  111. loadingContainerSel: '#loading',
  112. renderSSControls: true,
  113. renderNavControls: true,
  114. playLinkText: 'Play Slideshow',
  115. pauseLinkText: 'Pause Slideshow',
  116. prevLinkText: '&lsaquo; Previous Photo',
  117. nextLinkText: 'Next Photo &rsaquo;',
  118. nextPageLinkText: 'Next &rsaquo;',
  119. prevPageLinkText: '&lsaquo; Prev',
  120. enableHistory: false,
  121. autoStart: false,
  122. syncTransitions: true,
  123. defaultTransitionDuration: 900,
  124. onSlideChange: function(prevIndex, nextIndex) {
  125. // 'this' refers to the gallery, which is an extension of $('#thumbs')
  126. this.find('ul.thumbs').children()
  127. .eq(prevIndex).fadeTo('fast', onMouseOutOpacity).end()
  128. .eq(nextIndex).fadeTo('fast', 1.0);
  129. },
  130. onPageTransitionOut: function(callback) {
  131. this.fadeTo('fast', 0.0, callback);
  132. },
  133. onPageTransitionIn: function() {
  134. this.fadeTo('fast', 1.0);
  135. }
  136. });
  137. });
  138. </script>
  139. </body></html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement