-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
81 lines (72 loc) · 2.18 KB
/
index.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<?php
include("connect.php");?>
<!DOCTYPE html>
<html lang="en">
<head>
<?php include('head.php');?>
</head>
<body class="" id="top">
<?php
$select_cat="SELECT * FROM category order by cat_name";
$rs_cat = mysql_query($select_cat);
while($row_cat = mysql_fetch_assoc($rs_cat))
{
echo '<div class="grid_4" id="'.$row_cat['cid'].'">
<a href="category/'.$row_cat['url_rewrite'].'/'.$row_cat['cat_image'].'" class="gal_item">
<img src="category/'.$row_cat['url_rewrite'].'/'.$row_cat['cat_image'].'" alt="">
<div class="gal_caption">'.$row_cat['cat_name'].'</div>
<span class="gal_magnify"></span>
</a>
</div>';
}
?>
<script>
$(document).ready(function(){
$("div.grid_4").click(function(e) {
var id=$(this).attr('id');
e.preventDefault();
$.ajax({
type : "POST",
cache : false,
url : "demo.php",
data : {'gal' : id},
success: function(data) {
var dataX = data;
var dataXsplit = dataX.split(',');
var dataXarrayObj = new Array(), i;
for(i in dataXsplit){
dataXarrayObj[i] = jQuery.parseJSON(dataXsplit[i]);
}
var img = dataXarrayObj;
var opts = {
prevEffect : 'none',
nextEffect : 'none',
'fitToView': true,
'autoSize': true,
helpers : {
thumbs : {
width: 75,
height: 50
}
}
};
$.fancybox(img, opts);
}
});
});
$(".iframe").colorbox({iframe:true, width:"85%", height:"101%"});
$('.bxslider').bxSlider({
mode: 'horizontal',
useCSS: true,
infiniteLoop: true,
hideControlOnEnd: false,
easing: 'easeOutElastic',
speed: 1000,
auto: true,
pager: false,
controls: false,
});
});
</script>
</body>
</html>