Gallery Bank: WordPress Photo Gallery Plugin - Version 2.0.19

Version Description

  • Few Bugs Fixed
  • Introducing Jquery Masonry
  • Removed Timbthumb
Download this release

Release Info

Developer Gallery-Bank
Plugin Icon 128x128 Gallery Bank: WordPress Photo Gallery Plugin
Version 2.0.19
Comparing to
See all releases

Code changes from version 2.0.18 to 2.0.19

.project DELETED
@@ -1,12 +0,0 @@
1
- <?xml version="1.0" encoding="UTF-8"?>
2
- <projectDescription>
3
- <name>gallery-bank</name>
4
- <comment></comment>
5
- <projects>
6
- </projects>
7
- <buildSpec>
8
- </buildSpec>
9
- <natures>
10
- <nature>com.aptana.projects.webnature</nature>
11
- </natures>
12
- </projectDescription>
 
 
 
 
 
 
 
 
 
 
 
 
assets/css/frontend.css CHANGED
@@ -194,4 +194,29 @@ span.link_post:hover{
194
  overflow: hidden;
195
  float:none;
196
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
197
  }
194
  overflow: hidden;
195
  float:none;
196
  }
197
+ }
198
+
199
+ .imagecontainter {
200
+ background: #FFF;
201
+ padding: 5px;
202
+ margin-bottom: 20px;
203
+ border-radius: 5px;
204
+ clear: both;
205
+ -webkit-border-radius: 5px;
206
+ -moz-border-radius: 5px;
207
+ border-radius: 5px;
208
+ }
209
+
210
+ .centered { margin: 0 auto; }
211
+
212
+ .imgContainerSingle {
213
+ margin: 5px;
214
+ padding: 5px;
215
+ background: #D8D5D2;
216
+ font-size: 11px;
217
+ line-height: 1.4em;
218
+ float: left;
219
+ -webkit-border-radius: 5px;
220
+ -moz-border-radius: 5px;
221
+ border-radius: 5px;
222
  }
assets/js/jquery.masonry.min.js ADDED
@@ -0,0 +1,203 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+
2
+ (function(e, t, n) {"use strict";
3
+ var r = t.event, i;
4
+ r.special.smartresize = {
5
+ setup : function() {
6
+ t(this).bind("resize", r.special.smartresize.handler)
7
+ },
8
+ teardown : function() {
9
+ t(this).unbind("resize", r.special.smartresize.handler)
10
+ },
11
+ handler : function(e, t) {
12
+ var n = this, s = arguments;
13
+ e.type = "smartresize", i && clearTimeout(i), i = setTimeout(function() {
14
+ r.dispatch.apply(n, s)
15
+ }, t === "execAsap" ? 0 : 100)
16
+ }
17
+ }, t.fn.smartresize = function(e) {
18
+ return e ? this.bind("smartresize", e) : this.trigger("smartresize", ["execAsap"])
19
+ }, t.Mason = function(e, n) {this.element = t(n), this._create(e), this._init()
20
+ }, t.Mason.settings = {
21
+ isResizable : !0,
22
+ isAnimated : !1,
23
+ animationOptions : {
24
+ queue : !1,
25
+ duration : 500
26
+ },
27
+ gutterWidth : 0,
28
+ isRTL : !1,
29
+ isFitWidth : !1,
30
+ containerStyle : {
31
+ position : "relative"
32
+ }
33
+ }, t.Mason.prototype = {
34
+ _filterFindBricks : function(e) {
35
+ var t = this.options.itemSelector;
36
+ return t ? e.filter(t).add(e.find(t)) : e
37
+ },
38
+ _getBricks : function(e) {
39
+ var t = this._filterFindBricks(e).css({
40
+ position : "absolute"
41
+ }).addClass("masonry-brick");
42
+ return t
43
+ },
44
+ _create : function(n) {this.options = t.extend(!0, {}, t.Mason.settings, n), this.styleQueue = [];
45
+ var r = this.element[0].style;
46
+ this.originalStyle = {
47
+ height : r.height || ""
48
+ };
49
+ var i = this.options.containerStyle;
50
+ for(var s in i)
51
+ this.originalStyle[s] = r[s] || "";
52
+ this.element.css(i), this.horizontalDirection = this.options.isRTL ? "right" : "left";
53
+ var o = this.element.css("padding-" + this.horizontalDirection), u = this.element.css("padding-top");
54
+ this.offset = {
55
+ x : o ? parseInt(o, 10) : 0,
56
+ y : u ? parseInt(u, 10) : 0
57
+ }, this.isFluid = this.options.columnWidth && typeof this.options.columnWidth == "function";
58
+ var a = this;
59
+ setTimeout(function() {
60
+ a.element.addClass("masonry")
61
+ }, 0), this.options.isResizable && t(e).bind("smartresize.masonry", function() {
62
+ a.resize()
63
+ }), this.reloadItems()
64
+ },
65
+ _init : function(e) {this._getColumns(), this._reLayout(e)
66
+ },
67
+ option : function(e, n) {t.isPlainObject(e) && (this.options = t.extend(!0, this.options, e))
68
+ },
69
+ layout : function(e, t) {
70
+ for(var n = 0, r = e.length; n < r; n++)
71
+ this._placeBrick(e[n]);
72
+ var i = {};
73
+ i.height = Math.max.apply(Math, this.colYs);
74
+ if(this.options.isFitWidth) {
75
+ var s = 0;
76
+ n = this.cols;
77
+ while(--n) {
78
+ if(this.colYs[n] !== 0)
79
+ break;
80
+ s++
81
+ }
82
+ i.width = (this.cols - s) * this.columnWidth - this.options.gutterWidth
83
+ }
84
+ this.styleQueue.push({
85
+ $el : this.element,
86
+ style : i
87
+ });
88
+ var o = this.isLaidOut ? this.options.isAnimated ? "animate" : "css" : "css", u = this.options.animationOptions, a;
89
+ for( n = 0, r = this.styleQueue.length; n < r; n++) a = this.styleQueue[n], a.$el[o](a.style, u);this.styleQueue = [], t && t.call(e), this.isLaidOut = !0
90
+ },
91
+ _getColumns : function() {
92
+ var e = this.options.isFitWidth ? this.element.parent() : this.element, t = e.width();
93
+ this.columnWidth = this.isFluid ? this.options.columnWidth(t) : this.options.columnWidth || this.$bricks.outerWidth(!0) || t, this.columnWidth += this.options.gutterWidth, this.cols = Math.floor((t + this.options.gutterWidth) / this.columnWidth), this.cols = Math.max(this.cols, 1)
94
+ },
95
+ _placeBrick : function(e) {
96
+ var n = t(e), r, i, s, o, u;
97
+ r = Math.ceil(n.outerWidth(!0) / this.columnWidth), r = Math.min(r, this.cols);
98
+ if(r === 1)
99
+ s = this.colYs;
100
+ else { i = this.cols + 1 - r, s = [];
101
+ for( u = 0; u < i; u++) o = this.colYs.slice(u, u + r), s[u] = Math.max.apply(Math, o)
102
+ }
103
+ var a = Math.min.apply(Math, s), f = 0;
104
+ for(var l = 0, c = s.length; l < c; l++)
105
+ if(s[l] === a) {
106
+ f = l;
107
+ break
108
+ }
109
+ var h = {
110
+ top : a + this.offset.y
111
+ };
112
+ h[this.horizontalDirection] = this.columnWidth * f + this.offset.x, this.styleQueue.push({
113
+ $el : n,
114
+ style : h
115
+ });
116
+ var p = a + n.outerHeight(!0), d = this.cols + 1 - c;
117
+ for( l = 0; l < d; l++)
118
+ this.colYs[f + l] = p
119
+ },
120
+ resize : function() {
121
+ var e = this.cols;
122
+ this._getColumns(), (this.isFluid || this.cols !== e) && this._reLayout()
123
+ },
124
+ _reLayout : function(e) {
125
+ var t = this.cols;
126
+ this.colYs = [];
127
+ while(t--)
128
+ this.colYs.push(0);
129
+ this.layout(this.$bricks, e)
130
+ },
131
+ reloadItems : function() {
132
+ this.$bricks = this._getBricks(this.element.children())
133
+ },
134
+ reload : function(e) {this.reloadItems(), this._init(e)
135
+ },
136
+ appended : function(e, t, n) {
137
+ if(t) {
138
+ this._filterFindBricks(e).css({
139
+ top : this.element.height()
140
+ });
141
+ var r = this;
142
+ setTimeout(function() {
143
+ r._appended(e, n)
144
+ }, 1)
145
+ } else
146
+ this._appended(e, n)
147
+ },
148
+ _appended : function(e, t) {
149
+ var n = this._getBricks(e);
150
+ this.$bricks = this.$bricks.add(n), this.layout(n, t)
151
+ },
152
+ remove : function(e) {this.$bricks = this.$bricks.not(e), e.remove()
153
+ },
154
+ destroy : function() {
155
+ this.$bricks.removeClass("masonry-brick").each(function() {this.style.position = "", this.style.top = "", this.style.left = ""
156
+ });
157
+ var n = this.element[0].style;
158
+ for(var r in this.originalStyle)
159
+ n[r] = this.originalStyle[r];
160
+ this.element.unbind(".masonry").removeClass("masonry").removeData("masonry"), t(e).unbind(".masonry")
161
+ }
162
+ }, t.fn.imagesLoaded = function(e) {
163
+ function u() {
164
+ e.call(n, r)
165
+ }
166
+
167
+ function a(e) {
168
+ var n = e.target;
169
+ n.src !== s && t.inArray(n, o) === -1 && (o.push(n), --i <= 0 && (setTimeout(u), r.unbind(".imagesLoaded", a)))
170
+ }
171
+
172
+ var n = this, r = n.find("img").add(n.filter("img")), i = r.length, s = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==", o = [];
173
+ return i || u(), r.bind("load.imagesLoaded error.imagesLoaded", a).each(function() {
174
+ var e = this.src;
175
+ this.src = s, this.src = e
176
+ }), n
177
+ };
178
+ var s = function(t) {
179
+ e.console && e.console.error(t)
180
+ };
181
+ t.fn.masonry = function(e) {
182
+ if( typeof e == "string") {
183
+ var n = Array.prototype.slice.call(arguments, 1);
184
+ this.each(function() {
185
+ var r = t.data(this, "masonry");
186
+ if(!r) {
187
+ s("cannot call methods on masonry prior to initialization; attempted to call method '" + e + "'");
188
+ return
189
+ }
190
+ if(!t.isFunction(r[e]) || e.charAt(0) === "_") {
191
+ s("no such method '" + e + "' for masonry instance");
192
+ return
193
+ }
194
+ r[e].apply(r, n)
195
+ })
196
+ } else
197
+ this.each(function() {
198
+ var n = t.data(this, "masonry");
199
+ n ? (n.option(e || {}), n._init()) : t.data(this, "masonry", new t.Mason(e, this))
200
+ });
201
+ return this
202
+ }
203
+ })(window, jQuery);
gallery-bank.php CHANGED
@@ -4,7 +4,7 @@
4
  Plugin URI: http://gallery-bank.com
5
  Description: Gallery Bank is an interactive WordPress photo gallery plugin, best fit for creative and corporate portfolio websites.
6
  Author: Gallery-Bank
7
- Version: 2.0.18
8
  Author URI: http://gallery-bank.com
9
  */
10
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
4
  Plugin URI: http://gallery-bank.com
5
  Description: Gallery Bank is an interactive WordPress photo gallery plugin, best fit for creative and corporate portfolio websites.
6
  Author: Gallery-Bank
7
+ Version: 2.0.19
8
  Author URI: http://gallery-bank.com
9
  */
10
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
lib/front-view-album-class.php CHANGED
@@ -76,622 +76,137 @@
76
  $litebox_bg_color_substring = str_replace("rgb","rgba",substr($lightbox_bg_color[1], 0, -1));
77
  $litebox_bg_color_with_opacity = $litebox_bg_color_substring. "," . $overlay_opacity[1] . ")";
78
  $lightbox_bg_color_value= $overlay_border_size_value[1] . " solid " . $overlay_border_color[1];
79
-
80
- $slideshow_settings = explode(";", $content[3]);
81
- $auto_play = explode(":", $slideshow_settings[0]);
82
- $slide_interval = explode(":", $slideshow_settings[1]);
83
-
84
- $pagination = explode(":", $content[4]);
85
- $pagename = 'temp';
86
- $fileName = GALLERY_BK_PLUGIN_DIR.'/lib/cache/'.$pagename.".txt";
87
- if($auto_play[1] == "1")
88
- {
89
- $autoplay = true;
90
-
91
- }
92
- else {
93
- $autoplay = false;
94
- }
95
  ?>
96
- <div class="imgContainerSingle">
97
-
98
  <?php
99
- if($pagination[1] == 1)
100
- {
101
- ?>
102
- <table class='table table-striped' id='album_images_data_table<?php echo $unique_id;?>'>
103
- <?php
104
- }
105
- $count = 1;
106
- if(file_exists($fileName)!=false)
107
- {
108
- $default_height = 151 + ($image_border_size_value[1] * 2) . "px;" . "border-radius:" . $image_radius_value[1]. ";-moz-border-radius:" . $image_radius_value[1]. ";-webkit-border-radius:" . $image_radius_value[1]. ";-khtml-border-radius:" . $image_radius_value[1]. ";-o-border-radius:" . $image_radius_value[1] . ";";
109
- $default_width = 155 + ($image_border_size_value[1] * 2) . "px;" ."border-radius:" . $image_radius_value[1]. ";-moz-border-radius:" . $image_radius_value[1]. ";-webkit-border-radius:" . $image_radius_value[1]. ";-khtml-border-radius:" . $image_radius_value[1]. ";-o-border-radius:" . $image_radius_value[1] . ";";
110
- $custom_height = $image_height[1] + 1 + ($image_border_size_value[1] * 2) . "px;" . "border-radius:" . $image_radius_value[1]. ";-moz-border-radius:" . $image_radius_value[1]. ";-webkit-border-radius:" . $image_radius_value[1]. ";-khtml-border-radius:" . $image_radius_value[1]. ";-o-border-radius:" . $image_radius_value[1] . ";";
111
- $custom_width = $image_width[1] + 5 + ($image_border_size_value[1] * 2) . "px;" . "border-radius:" . $image_radius_value[1]. ";-moz-border-radius:" . $image_radius_value[1]. ";-webkit-border-radius:" . $image_radius_value[1]. ";-khtml-border-radius:" . $image_radius_value[1]. ";-o-border-radius:" . $image_radius_value[1] . ";";
112
- $radius_for_shutter = "border-radius:" . $image_radius_value[1]. ";-moz-border-radius:" . $image_radius_value[1]. ";-webkit-border-radius:" . $image_radius_value[1]. ";-khtml-border-radius:" . $image_radius_value[1]. ";-o-border-radius:" . $image_radius_value[1] . ";";
113
- }
114
- else
115
- {
116
- $default_height = 151 + (0) . "px;" . "border-radius:" . $image_radius_value[1]. ";-moz-border-radius:" . $image_radius_value[1]. ";-webkit-border-radius:" . $image_radius_value[1]. ";-khtml-border-radius:" . $image_radius_value[1]. ";-o-border-radius:" . $image_radius_value[1] . ";";
117
- $default_width = 155 + (0) . "px;" ."border-radius:" . $image_radius_value[1]. ";-moz-border-radius:" . $image_radius_value[1]. ";-webkit-border-radius:" . $image_radius_value[1]. ";-khtml-border-radius:" . $image_radius_value[1]. ";-o-border-radius:" . $image_radius_value[1] . ";";
118
- $custom_height = $image_height[1] + 1 + (0) . "px;" . "border-radius:" . $image_radius_value[1]. ";-moz-border-radius:" . $image_radius_value[1]. ";-webkit-border-radius:" . $image_radius_value[1]. ";-khtml-border-radius:" . $image_radius_value[1]. ";-o-border-radius:" . $image_radius_value[1] . ";";
119
- $custom_width = $image_width[1] + 5 + (0) . "px;" . "border-radius:" . $image_radius_value[1]. ";-moz-border-radius:" . $image_radius_value[1]. ";-webkit-border-radius:" . $image_radius_value[1]. ";-khtml-border-radius:" . $image_radius_value[1]. ";-o-border-radius:" . $image_radius_value[1] . ";";
120
- $radius_for_shutter = "border-radius:" . $image_radius_value[1]. ";-moz-border-radius:" . $image_radius_value[1]. ";-webkit-border-radius:" . $image_radius_value[1]. ";-khtml-border-radius:" . $image_radius_value[1]. ";-o-border-radius:" . $image_radius_value[1] . ";";
121
- }
122
  for ($flag = 0; $flag <count($pic_detail); $flag++)
123
  {
124
- if($pagination[1] == 1)
125
- {
126
- if($count == 1)
127
- {
128
- ?>
129
- <tr><td>
130
- <?php
131
- }
132
- }
133
  $css_image_thumbnail = "border:" . $image_border_size_value[1]. " solid " . $border_color[1] . ";border-radius:" . $image_radius_value[1]. ";-moz-border-radius:" . $image_radius_value[1]. ";-webkit-border-radius:" . $image_radius_value[1]. ";-khtml-border-radius:" . $image_radius_value[1]. ";-o-border-radius:" . $image_radius_value[1].";opacity:".$image_opacity[1].";filter:alpha(opacity=".$image_opacity[1] * 100 . ");-ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=".$image_opacity[1] * 100 . ")';-moz-opacity:" . $image_opacity[1] . ";-khtml-opacity:".$image_opacity[1]. ";";
134
  if($pic_detail[$flag]->description == "")
135
  {
136
  if(($flag % $images_in_row[1] == 0) && $flag != 0)
137
  {
138
- ?>
139
- </br>
140
- <?php
141
- if($image_content[1] == 1)
142
- {
143
- if($images_in_row[1] == 1)
144
- {
145
- ?>
146
- <div class="view da-thumbs" style="height:<?php echo $default_height; ?>;width:<?php echo $default_width; ?>;">
147
- <?php
148
-
149
- }
150
- else {
151
- ?>
152
- <div class="view da-thumbs" style="float:left;height:<?php echo $default_height; ?>;width:<?php echo $default_width; ?>;">
153
- <?php
154
- }
155
- }
156
- else
157
- {
158
- if($images_in_row[1] == 1)
159
- {
160
- ?>
161
- <div class="view da-thumbs" style="height:<?php echo $custom_height; ?>;width:<?php echo $custom_width; ?>;">
162
- <?php
163
- }
164
- else
165
- {
166
- ?>
167
- <div class="view da-thumbs" style="float:left;height:<?php echo $custom_height; ?>;width:<?php echo $custom_width; ?>;">
168
- <?php
169
- }
170
- }
171
  if($pic_detail[$flag]->check_url == 1)
172
  {
173
  if($image_content[1] == 1)
174
  {
175
  ?>
176
- <a href="<?php echo $pic_detail[$flag]->url;?>" target="_blank">
177
- <?php
178
- if(file_exists($fileName)!=false)
179
- {
180
- ?>
181
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h=150&w=150&zc=1&q=100';?>" style="margin-left:5px;<?php echo $css_image_thumbnail; ?>" />
182
- <?php
183
- }
184
- else
185
- {
186
- ?>
187
- <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:155px;height:155px;<?php echo $css_image_thumbnail; ?>" />
188
- <?php
189
- }
190
- ?>
191
-
192
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
193
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
194
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
195
- </p>
196
- <div class="forspan">
197
- <span class="zoom">
198
- </span>
199
- </div>
200
- </article>
201
- </a>
202
  </div>
203
  <?php
204
  }
205
- else
206
- {
207
- ?>
208
- <a href="<?php echo $pic_detail[$flag]->url;?>" target="_blank">
209
- <?php
210
- if(file_exists($fileName)!=false)
211
- {
212
- ?>
213
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin-left:5px;;<?php echo $css_image_thumbnail; ?>" />
214
- <?php
215
- }
216
- else
217
- {
218
- ?>
219
- <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
220
- <?php
221
- }
222
- ?>
223
-
224
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
225
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
226
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
227
- </p>
228
- <div class="forspan">
229
- <span class="zoom">
230
- </span>
231
- </div>
232
- </article>
233
- </a>
234
- </div>
235
- <?php
236
- }
237
  }
238
  else
239
  {
240
  ?>
241
- <a class="titan-lb_<?php echo $unique_id;?>" data-titan-lightbox="on" data-titan-group="gallery" href="<?php echo stripcslashes($pic_detail[$flag]->pic_path); ?>" title="<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>">
242
- <?php
243
- if($image_content[1] == 1)
244
- {
245
-
246
-
247
- if(file_exists($fileName)!=false)
248
  {
249
- if($pic_detail[$flag]->video == 1)
250
- {
251
  ?>
252
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg')).'&h=150&w=150&zc=1&q=100';?>" style="margin-left:5px;;<?php echo $css_image_thumbnail; ?>" />
253
  <?php
254
- }
255
- else
256
- {
257
- ?>
258
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h=150&w=150&zc=1&q=100';?>" style="margin-left:5px;;<?php echo $css_image_thumbnail; ?>" />
259
- <?php
260
- }
261
-
262
  }
263
- else
264
  {
265
- if($pic_detail[$flag]->video == 1)
266
- {
267
- ?>
268
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg');?>" style="margin-left:5px;width:155px;height:155px;<?php echo $css_image_thumbnail; ?>" />
269
- <?php
270
- }
271
- else
272
- {
273
- ?>
274
- <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:155px;height:155px;<?php echo $css_image_thumbnail; ?>" />
275
  <?php
276
- }
277
-
278
  }
279
  ?>
280
-
281
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
282
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
283
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
284
- </p>
285
- <div class="forspan">
286
- <span class="zoom"></span>
287
- </div>
288
- </article>
289
- </a>
290
- </div>
291
- <?php
292
- }
293
- else
294
- {
295
-
296
- if(file_exists($fileName)!=false)
297
- {
298
- if($pic_detail[$flag]->video == 1)
299
- {
300
- ?>
301
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg')).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin-left:5px;;<?php echo $css_image_thumbnail; ?>" />
302
- <?php
303
- }
304
- else
305
- {
306
- ?>
307
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin-left:5px;;<?php echo $css_image_thumbnail; ?>" />
308
- <?php
309
- }
310
-
311
- }
312
- else
313
- {
314
- if($pic_detail[$flag]->video == 1)
315
- {
316
- ?>
317
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg');?>" style="margin-left:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
318
- <?php
319
- }
320
- else
321
- {
322
- ?>
323
- <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
324
- <?php
325
- }
326
-
327
-
328
- }
329
- ?>
330
-
331
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
332
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
333
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
334
- </p>
335
- <div class="forspan">
336
- <span class="zoom">
337
- </span>
338
- </div>
339
- </article>
340
- </a>
341
- </div>
342
  <?php
 
343
  }
344
  }
345
- }
346
  else
347
  {
348
 
349
- if($image_content[1] == 1)
350
- {
351
- if($images_in_row[1] == 1)
352
- {
353
- ?>
354
- <div class="view da-thumbs" style="height:<?php echo $default_height; ?>;width:<?php echo $default_width; ?>;">
355
- <?php
356
-
357
- }
358
- else {
359
-
360
-
361
- if((($flag + 1) % $images_in_row[1] == 0) && $flag != 0)
362
- {
363
- ?>
364
- <div class="view da-thumbs" style="height:<?php echo $default_height; ?>;width:<?php echo $default_width; ?>;">
365
- <?php
366
- }
367
- else
368
- {
369
- ?>
370
- <div class="view da-thumbs" style="float:left;height:<?php echo $default_height; ?>;width:<?php echo $default_width; ?>;">
371
- <?php
372
- }
373
-
374
- }
375
- }
376
- else
377
- {
378
- if($images_in_row[1] == 1)
379
- {
380
- ?>
381
- <div class="view da-thumbs" style="height:<?php echo $custom_height; ?>;width:<?php echo $custom_width; ?>;">
382
- <?php
383
-
384
- }
385
- else
386
- {
387
- if((($flag + 1) % $images_in_row[1] == 0) && $flag != 0)
388
- {
389
- ?>
390
- <div class="view da-thumbs" style="height:<?php echo $custom_height; ?>;width:<?php echo $custom_width; ?>;">
391
- <?php
392
- }
393
- else
394
- {
395
- ?>
396
- <div class="view da-thumbs" style="float:left;height:<?php echo $custom_height; ?>;width:<?php echo $custom_width; ?>;">
397
- <?php
398
-
399
- }
400
- }
401
- }
402
  if($pic_detail[$flag]->check_url == 1)
403
  {
404
  if($image_content[1] == 1)
405
  {
406
  ?>
 
407
  <a href="<?php echo $pic_detail[$flag]->url;?>" target="_blank">
408
- <?php
409
- if(file_exists($fileName)!=false)
410
- {
411
- ?>
412
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h=150&w=150&zc=1&q=100';?>" style="margin-left:5px;<?php echo $css_image_thumbnail; ?>" />
413
- <?php
414
- }
415
- else
416
- {
417
- ?>
418
- <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:155px;height:155px;<?php echo $css_image_thumbnail; ?>" />
419
- <?php
420
- }
421
- ?>
422
 
423
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
424
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
425
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
426
- </p>
427
- <div class="forspan">
428
- <span class="zoom">
429
- </span>
430
- </div>
431
- </article>
432
- </a>
433
- </div>
434
- <?php
435
- }
436
- else
437
- {
438
- ?>
439
- <a href="<?php echo $pic_detail[$flag]->url;?>" target="_blank">
440
- <?php
441
- if(file_exists($fileName)!=false)
442
- {
443
- ?>
444
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin-left:5px;;<?php echo $css_image_thumbnail; ?>" />
445
- <?php
446
- }
447
- else
448
- {
449
- ?>
450
- <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
451
- <?php
452
- }
453
- ?>
454
 
455
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
456
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
457
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
458
- </p>
459
- <div class="forspan">
460
- <span class="zoom">
461
- </span>
462
- </div>
463
- </article>
464
  </a>
465
  </div>
466
- <?php
467
  }
468
  }
469
  else
470
  {
471
  ?>
 
472
  <a class="titan-lb_<?php echo $unique_id;?>" data-titan-lightbox="on" data-titan-group="gallery" href="<?php echo $pic_detail[$flag]->pic_path; ?>" title="<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>">
473
  <?php
474
  if($image_content[1] == 1)
475
  {
476
-
477
- if(file_exists($fileName)!=false)
478
- {
479
- if($pic_detail[$flag]->video == 1)
480
- {
481
- ?>
482
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg')).'&h=150&w=150&zc=1&q=100';?>" style="margin-left:5px;;<?php echo $css_image_thumbnail; ?>" />
483
- <?php
484
- }
485
- else
486
- {
487
- ?>
488
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h=150&w=150&zc=1&q=100';?>" style="margin-left:5px;;<?php echo $css_image_thumbnail; ?>" />
489
- <?php
490
- }
491
-
492
- }
493
- else
494
- {
495
- if($pic_detail[$flag]->video == 1)
496
- {
497
- ?>
498
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg');?>" style="margin-left:5px;width:155px;height:155px;<?php echo $css_image_thumbnail; ?>" />
499
- <?php
500
- }
501
- else
502
- {
503
- ?>
504
- <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:155px;height:155px;<?php echo $css_image_thumbnail; ?>" />
505
- <?php
506
- }
507
-
508
-
509
- }
510
- ?>
511
-
512
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
513
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
514
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
515
- </p>
516
- <div class="forspan">
517
- <span class="zoom">
518
- </span>
519
- </div>
520
- </article>
521
- </a>
522
- </div>
523
- <?php
524
- }
525
- else
526
- {
527
-
528
- if(file_exists($fileName)!=false)
529
- {
530
- if($pic_detail[$flag]->video == 1)
531
- {
532
- ?>
533
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg')).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin-left:5px;;<?php echo $css_image_thumbnail; ?>" />
534
- <?php
535
- }
536
- else
537
- {
538
- ?>
539
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin-left:5px;;<?php echo $css_image_thumbnail; ?>" />
540
- <?php
541
- }
542
-
543
- }
544
- else
545
- {
546
- if($pic_detail[$flag]->video == 1)
547
- {
548
- ?>
549
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg');?>" style="margin-left:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
550
- <?php
551
- }
552
- else
553
- {
554
- ?>
555
- <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
556
- <?php
557
- }
558
-
559
- }
560
- ?>
561
-
562
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
563
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
564
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
565
- </p>
566
- <div class="forspan">
567
- <span class="zoom">
568
-
569
- </span>
570
- </div>
571
- </article>
572
- </a>
573
- </div>
574
- <?php
575
-
576
- }
577
- }
578
- }
579
- }
580
- else
581
- {
582
- if(($flag % $images_in_row[1] == 0) && $flag != 0)
583
- {
584
- ?>
585
- </br>
586
- <?php
587
- if($image_content[1] == 1)
588
- {
589
- if($images_in_row[1] == 1)
590
  {
591
  ?>
592
- <div class="view da-thumbs" style="height:<?php echo $default_height; ?>;width:<?php echo $default_width; ?>;">
593
  <?php
594
-
595
  }
596
- else {
597
- ?>
598
- <div class="view da-thumbs" style="float:left;height:<?php echo $default_height; ?>;width:<?php echo $default_width; ?>;">
599
- <?php
600
- }
601
- }
602
- else
603
- {
604
- if($images_in_row[1] == 1)
605
- {
606
  ?>
607
- <div class="view da-thumbs" style="height:<?php echo $custom_height; ?>;width:<?php echo $custom_width; ?>;">
608
- <?php
609
-
610
  }
611
- else {
612
  ?>
613
- <div class="view da-thumbs" style="float:left;height:<?php echo $custom_height; ?>;width:<?php echo $custom_width; ?>;">
 
614
  <?php
615
- }
616
  }
 
 
 
 
 
 
 
 
 
617
  if($pic_detail[$flag]->check_url == 1)
618
  {
619
  if($image_content[1] == 1)
620
  {
621
  ?>
 
622
  <a href="<?php echo $pic_detail[$flag]->url;?>" target="_blank">
623
- <?php
624
- if(file_exists($fileName)!=false)
625
- {
626
- ?>
627
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h=150&w=150&zc=1&q=100';?>" style="margin-left:5px;<?php echo $css_image_thumbnail; ?>" />
628
- <?php
629
- }
630
- else
631
- {
632
- ?>
633
- <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:155px;height:155px;<?php echo $css_image_thumbnail; ?>" />
634
- <?php
635
- }
636
- ?>
637
-
638
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
639
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
640
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
641
- </p>
642
- <div class="forspan">
643
- <span class="zoom">
644
- </span>
645
- </div>
646
- </article>
647
  </a>
648
  </div>
649
  <?php
650
  }
651
- else
652
- {
653
- ?>
654
- <a href="<?php echo $pic_detail[$flag]->url;?>" target="_blank">
655
- <?php
656
- if(file_exists($fileName)!=false)
657
- {
658
- ?>
659
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin-left:5px;;<?php echo $css_image_thumbnail; ?>" />
660
- <?php
661
- }
662
- else
663
- {
664
- ?>
665
- <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
666
- <?php
667
- }
668
- ?>
669
-
670
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
671
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
672
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
673
- </p>
674
- <div class="forspan">
675
- <span class="zoom">
676
- </span>
677
- </div>
678
- </article>
679
- </a>
680
- </div>
681
- <?php
682
- }
683
  }
684
  else
685
  {
686
  if($pic_detail[$flag]->description == "")
687
  {
688
  ?>
 
689
  <a class="titan-lb_<?php echo $unique_id;?>" data-titan-lightbox="on" data-titan-group="gallery" href="<?php echo stripcslashes($pic_detail[$flag]->pic_path); ?>" title="<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>">
690
  <?php
691
  }
692
  else
693
  {
694
  ?>
 
695
  <a class="titan-lb_<?php echo $unique_id;?>" data-titan-lightbox="on" data-titan-group="gallery" href="<?php echo stripcslashes($pic_detail[$flag]->pic_path); ?>" title="<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?> (<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->description)); ?>)">
696
  <?php
697
  }
@@ -699,310 +214,79 @@
699
  if($image_content[1] == 1)
700
  {
701
 
702
- if(file_exists($fileName)!=false)
703
- {
704
- ?>
705
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h=150&w=150&zc=1&q=100';?>" style="margin-left:5px;;<?php echo $css_image_thumbnail; ?>" />
706
- <?php
707
- }
708
- else
709
- {
710
- ?>
711
- <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:155px;height:155px;<?php echo $css_image_thumbnail; ?>" />
712
- <?php
713
- }
714
- ?>
715
-
716
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
717
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
718
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
719
- </p>
720
- <div class="forspan">
721
- <span class="zoom">
722
- </span>
723
- </div>
724
- </article>
725
- </a>
726
- </div>
727
- <?php
728
 
729
- }
730
- else
731
- {
732
-
733
- if(file_exists($fileName)!=false)
734
- {
735
  ?>
736
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin-left:5px;;<?php echo $css_image_thumbnail; ?>" />
737
- <?php
738
- }
739
- else
740
- {
741
- ?>
742
- <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
743
- <?php
744
- }
745
- ?>
746
-
747
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
748
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
749
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
750
- </p>
751
- <div class="forspan">
752
- <span class="zoom">
753
- </span>
754
- </div>
755
- </article>
756
  </a>
757
- </div>
758
  <?php
759
 
760
  }
 
761
  }
762
  }
763
  else
764
  {
765
- if($image_content[1] == 1)
766
- {
767
- if($images_in_row[1] == 1)
768
- {
769
- ?>
770
- <div class="view da-thumbs" style="height:<?php echo $default_height; ?>;width:<?php echo $default_width; ?>;">
771
- <?php
772
-
773
- }
774
- else {
775
-
776
-
777
- if((($flag + 1) % $images_in_row[1] == 0) && $flag != 0)
778
- {
779
- ?>
780
- <div class="view da-thumbs" style="height:<?php echo $default_height; ?>;width:<?php echo $default_width; ?>;">
781
- <?php
782
- }
783
- else
784
- {
785
- ?>
786
- <div class="view da-thumbs" style="float:left;height:<?php echo $default_height; ?>;width:<?php echo $default_width; ?>;">
787
- <?php
788
- }
789
-
790
- }
791
- }
792
- else
793
- {
794
- if($images_in_row[1] == 1)
795
- {
796
- ?>
797
- <div class="view da-thumbs" style="height:<?php echo $custom_height; ?>;width:<?php echo $custom_width; ?>;">
798
- <?php
799
-
800
- }
801
- else
802
- {
803
- if((($flag + 1) % $images_in_row[1] == 0) && $flag != 0)
804
- {
805
- ?>
806
- <div class="view da-thumbs" style="height:<?php echo $custom_height; ?>;width:<?php echo $custom_width; ?>;">
807
- <?php
808
- }
809
- else
810
- {
811
- ?>
812
- <div class="view da-thumbs" style="float:left;height:<?php echo $custom_height; ?>;width:<?php echo $custom_width; ?>;">
813
- <?php
814
-
815
- }
816
- }
817
- }
818
  if($pic_detail[$flag]->check_url == 1)
819
  {
820
  if($image_content[1] == 1)
821
  {
822
  ?>
 
823
  <a href="<?php echo $pic_detail[$flag]->url;?>" target="_blank">
824
- <?php
825
- if(file_exists($fileName)!=false)
826
- {
827
- ?>
828
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h=150&w=150&zc=1&q=100';?>" style="margin-left:5px;<?php echo $css_image_thumbnail; ?>" />
829
- <?php
830
- }
831
- else
832
- {
833
- ?>
834
- <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:155px;height:155px;<?php echo $css_image_thumbnail; ?>" />
835
- <?php
836
- }
837
- ?>
838
 
839
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
840
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
841
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
842
- </p>
843
- <div class="forspan">
844
- <span class="zoom">
845
- </span>
846
- </div>
847
- </article>
848
  </a>
849
  </div>
850
  <?php
851
  }
852
- else
853
- {
854
- ?>
855
- <a href="<?php echo $pic_detail[$flag]->url;?>" target="_blank">
856
- <?php
857
- if(file_exists($fileName)!=false)
858
- {
859
- ?>
860
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin-left:5px;;<?php echo $css_image_thumbnail; ?>" />
861
- <?php
862
- }
863
- else
864
- {
865
- ?>
866
- <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
867
- <?php
868
- }
869
- ?>
870
-
871
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
872
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
873
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
874
- </p>
875
- <div class="forspan">
876
- <span class="zoom">
877
- </span>
878
- </div>
879
- </article>
880
- </a>
881
- </div>
882
- <?php
883
- }
884
  }
885
  else
886
  {
887
  if($pic_detail[$flag]->description == "")
888
  {
889
  ?>
 
890
  <a class="titan-lb_<?php echo $unique_id;?>" data-titan-lightbox="on" data-titan-group="gallery" href="<?php echo stripcslashes($pic_detail[$flag]->pic_path); ?>" title="<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>">
891
  <?php
892
  }
893
  else
894
  {
895
  ?>
 
896
  <a class="titan-lb_<?php echo $unique_id;?>" data-titan-lightbox="on" data-titan-group="gallery" href="<?php echo stripcslashes($pic_detail[$flag]->pic_path); ?>" title="<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?> (<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->description)); ?>)">
897
  <?php
898
  }
899
 
900
  if($image_content[1] == 1)
901
  {
902
-
903
- if(file_exists($fileName)!=false)
904
- {
905
- ?>
906
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h=150&w=150&zc=1&q=100';?>" style="margin-left:5px;;<?php echo $css_image_thumbnail; ?>" />
907
- <?php
908
- }
909
- else
910
- {
911
- ?>
912
- <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:155px;height:155px;<?php echo $css_image_thumbnail; ?>" />
913
- <?php
914
- }
915
- ?>
916
-
917
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
918
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
919
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
920
- </p>
921
- <div class="forspan">
922
- <span class="zoom">
923
- </span>
924
- </div>
925
- </article>
926
- </a>
927
- </div>
928
- <?php
929
- }
930
- else
931
- {
932
-
933
- if(file_exists($fileName)!=false)
934
- {
935
- ?>
936
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin-left:5px;;<?php echo $css_image_thumbnail; ?>" />
937
- <?php
938
- }
939
- else
940
- {
941
- ?>
942
- <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
943
- <?php
944
- }
945
- ?>
946
-
947
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
948
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
949
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
950
- </p>
951
- <div class="forspan">
952
- <span class="zoom">
953
- </span>
954
- </div>
955
- </article>
956
  </a>
957
  </div>
958
  <?php
959
-
960
  }
 
961
  }
962
  }
963
  }
964
- if($pagination[1] == 1)
965
- {
966
- if($count == $images_in_row[1])
967
- {
968
- ?>
969
- </td></tr>
970
- <?php
971
- $count = 1;
972
- }
973
- else
974
- {
975
- $count++;
976
- }
977
- }
978
- }
979
- if($pagination[1] == 1)
980
- {
981
- ?>
982
- </table>
983
- <?php
984
  }
 
985
  ?>
986
  </div>
987
- <?php
988
- $interval = $slide_interval[1];
989
- ?>
990
  <script type="text/javascript">
991
- <?php
992
- if($slide_interval[1] == 0)
993
- {
994
- $interval = 10000 * 1000 ;
995
- }
996
- else
997
- {
998
- $interval = $slide_interval[1] * 1000;
999
- }
1000
- ?>
1001
  jQuery(document).ready(function(){
1002
  jQuery("div.da-thumbs").hoverdir();
1003
  jQuery(".titan-lb_<?php echo $unique_id;?>").lightbox({
1004
- //interval : "<php echo $interval; ?>",
1005
- //autoPlay: "<php echo $autoplay; ?>",
1006
  beforeShow: function(){
1007
  jQuery(".lightbox-skin").css("background","<?php echo $lightbox_inline_bg_color[1]; ?>");
1008
  jQuery(".lightbox-overlay").css("background","<?php echo $litebox_bg_color_with_opacity; ?>");
@@ -1018,25 +302,23 @@
1018
  jQuery(".lightbox-title").css("color","<?php echo $lightbox_text_color[1]; ?>");
1019
  }
1020
  });
1021
- oTable = jQuery('#album_images_data_table<?php echo $unique_id;?>').dataTable
1022
- ({
1023
- "bJQueryUI": false,
1024
- "bAutoWidth": true,
1025
- "sPaginationType": "full_numbers",
1026
- "sDom": '<"datatable-header"fl>t<"datatable-footer"ip>',
1027
- "oLanguage":
1028
- {
1029
- "sLengthMenu": "_MENU_"
1030
- },
1031
- "aaSorting": [[ 0, "desc" ]],
1032
- "aoColumnDefs": [{ "bSortable": false, "aTargets": [0] },{ "bSortable": false, "aTargets": [0] }],
1033
- "bSort": false
1034
- });
1035
  });
1036
 
1037
- function change_class()
1038
- {
1039
- }
 
 
 
 
 
 
 
 
 
 
 
1040
  </script>
1041
  <?php
1042
  die();
76
  $litebox_bg_color_substring = str_replace("rgb","rgba",substr($lightbox_bg_color[1], 0, -1));
77
  $litebox_bg_color_with_opacity = $litebox_bg_color_substring. "," . $overlay_opacity[1] . ")";
78
  $lightbox_bg_color_value= $overlay_border_size_value[1] . " solid " . $overlay_border_color[1];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
  ?>
80
+ <div id="view_bank_album_<?php echo $unique_id;?>">
 
81
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
82
  for ($flag = 0; $flag <count($pic_detail); $flag++)
83
  {
 
 
 
 
 
 
 
 
 
84
  $css_image_thumbnail = "border:" . $image_border_size_value[1]. " solid " . $border_color[1] . ";border-radius:" . $image_radius_value[1]. ";-moz-border-radius:" . $image_radius_value[1]. ";-webkit-border-radius:" . $image_radius_value[1]. ";-khtml-border-radius:" . $image_radius_value[1]. ";-o-border-radius:" . $image_radius_value[1].";opacity:".$image_opacity[1].";filter:alpha(opacity=".$image_opacity[1] * 100 . ");-ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=".$image_opacity[1] * 100 . ")';-moz-opacity:" . $image_opacity[1] . ";-khtml-opacity:".$image_opacity[1]. ";";
85
  if($pic_detail[$flag]->description == "")
86
  {
87
  if(($flag % $images_in_row[1] == 0) && $flag != 0)
88
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
89
  if($pic_detail[$flag]->check_url == 1)
90
  {
91
  if($image_content[1] == 1)
92
  {
93
  ?>
94
+ <div class="imgContainerSingle">
95
+ <a href="<?php echo $pic_detail[$flag]->url;?>" target="_blank">
96
+ <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:155px;<?php echo $css_image_thumbnail; ?>" />
97
+ </a>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
98
  </div>
99
  <?php
100
  }
101
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
102
  }
103
  else
104
  {
105
  ?>
106
+ <div class="imgContainerSingle">
107
+ <a class="titan-lb_<?php echo $unique_id;?>" data-titan-lightbox="on" data-titan-group="gallery" href="<?php echo stripcslashes($pic_detail[$flag]->pic_path); ?>" title="<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>">
108
+ <?php
109
+ if($image_content[1] == 1)
110
+ {
111
+ if($pic_detail[$flag]->video == 1)
 
112
  {
 
 
113
  ?>
114
+ <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg');?>" style="margin-left:5px;width:155px;<?php echo $css_image_thumbnail; ?>" />
115
  <?php
 
 
 
 
 
 
 
 
116
  }
117
+ else
118
  {
119
+ ?>
120
+ <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:155px;<?php echo $css_image_thumbnail; ?>" />
 
 
 
 
 
 
 
 
121
  <?php
 
 
122
  }
123
  ?>
124
+ </a>
125
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
126
  <?php
127
+ }
128
  }
129
  }
 
130
  else
131
  {
132
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
133
  if($pic_detail[$flag]->check_url == 1)
134
  {
135
  if($image_content[1] == 1)
136
  {
137
  ?>
138
+ <div class="imgContainerSingle">
139
  <a href="<?php echo $pic_detail[$flag]->url;?>" target="_blank">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
140
 
141
+ <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:155px;<?php echo $css_image_thumbnail; ?>" />
142
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
143
 
 
 
 
 
 
 
 
 
 
144
  </a>
145
  </div>
146
+ <?php
147
  }
148
  }
149
  else
150
  {
151
  ?>
152
+ <div class="imgContainerSingle">
153
  <a class="titan-lb_<?php echo $unique_id;?>" data-titan-lightbox="on" data-titan-group="gallery" href="<?php echo $pic_detail[$flag]->pic_path; ?>" title="<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>">
154
  <?php
155
  if($image_content[1] == 1)
156
  {
157
+ if($pic_detail[$flag]->video == 1)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
158
  {
159
  ?>
160
+ <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg');?>" style="margin-left:5px;width:155px;<?php echo $css_image_thumbnail; ?>" />
161
  <?php
 
162
  }
163
+ else
164
+ {
 
 
 
 
 
 
 
 
165
  ?>
166
+ <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:155px;<?php echo $css_image_thumbnail; ?>" />
167
+ <?php
 
168
  }
 
169
  ?>
170
+ </a>
171
+ </div>
172
  <?php
 
173
  }
174
+
175
+ }
176
+ }
177
+ }
178
+ else
179
+ {
180
+ if(($flag % $images_in_row[1] == 0) && $flag != 0)
181
+ {
182
+
183
  if($pic_detail[$flag]->check_url == 1)
184
  {
185
  if($image_content[1] == 1)
186
  {
187
  ?>
188
+ <div class="imgContainerSingle">
189
  <a href="<?php echo $pic_detail[$flag]->url;?>" target="_blank">
190
+ <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:155px;<?php echo $css_image_thumbnail; ?>" />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
191
  </a>
192
  </div>
193
  <?php
194
  }
195
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
196
  }
197
  else
198
  {
199
  if($pic_detail[$flag]->description == "")
200
  {
201
  ?>
202
+ <div class="imgContainerSingle">
203
  <a class="titan-lb_<?php echo $unique_id;?>" data-titan-lightbox="on" data-titan-group="gallery" href="<?php echo stripcslashes($pic_detail[$flag]->pic_path); ?>" title="<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>">
204
  <?php
205
  }
206
  else
207
  {
208
  ?>
209
+ <div class="imgContainerSingle">
210
  <a class="titan-lb_<?php echo $unique_id;?>" data-titan-lightbox="on" data-titan-group="gallery" href="<?php echo stripcslashes($pic_detail[$flag]->pic_path); ?>" title="<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?> (<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->description)); ?>)">
211
  <?php
212
  }
214
  if($image_content[1] == 1)
215
  {
216
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
217
 
 
 
 
 
 
 
218
  ?>
219
+ <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:155px;<?php echo $css_image_thumbnail; ?>" />
220
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
221
  </a>
222
+ </div>
223
  <?php
224
 
225
  }
226
+
227
  }
228
  }
229
  else
230
  {
231
+
232
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
233
  if($pic_detail[$flag]->check_url == 1)
234
  {
235
  if($image_content[1] == 1)
236
  {
237
  ?>
238
+ <div class="imgContainerSingle">
239
  <a href="<?php echo $pic_detail[$flag]->url;?>" target="_blank">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
240
 
241
+ <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:155px;<?php echo $css_image_thumbnail; ?>" />
242
+
 
 
 
 
 
 
 
243
  </a>
244
  </div>
245
  <?php
246
  }
247
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
248
  }
249
  else
250
  {
251
  if($pic_detail[$flag]->description == "")
252
  {
253
  ?>
254
+ <div class="imgContainerSingle">
255
  <a class="titan-lb_<?php echo $unique_id;?>" data-titan-lightbox="on" data-titan-group="gallery" href="<?php echo stripcslashes($pic_detail[$flag]->pic_path); ?>" title="<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>">
256
  <?php
257
  }
258
  else
259
  {
260
  ?>
261
+ <div class="imgContainerSingle">
262
  <a class="titan-lb_<?php echo $unique_id;?>" data-titan-lightbox="on" data-titan-group="gallery" href="<?php echo stripcslashes($pic_detail[$flag]->pic_path); ?>" title="<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?> (<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->description)); ?>)">
263
  <?php
264
  }
265
 
266
  if($image_content[1] == 1)
267
  {
268
+ ?>
269
+ <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:155px;<?php echo $css_image_thumbnail; ?>" />
270
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
271
  </a>
272
  </div>
273
  <?php
 
274
  }
275
+
276
  }
277
  }
278
  }
279
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
280
  }
281
+
282
  ?>
283
  </div>
284
+
 
 
285
  <script type="text/javascript">
286
+
 
 
 
 
 
 
 
 
 
287
  jQuery(document).ready(function(){
288
  jQuery("div.da-thumbs").hoverdir();
289
  jQuery(".titan-lb_<?php echo $unique_id;?>").lightbox({
 
 
290
  beforeShow: function(){
291
  jQuery(".lightbox-skin").css("background","<?php echo $lightbox_inline_bg_color[1]; ?>");
292
  jQuery(".lightbox-overlay").css("background","<?php echo $litebox_bg_color_with_opacity; ?>");
302
  jQuery(".lightbox-title").css("color","<?php echo $lightbox_text_color[1]; ?>");
303
  }
304
  });
305
+
 
 
 
 
 
 
 
 
 
 
 
 
 
306
  });
307
 
308
+ var $container_<?php echo $unique_id;?> = jQuery('#view_bank_album_<?php echo $unique_id;?>');
309
+ $container_<?php echo $unique_id;?>.imagesLoaded( function(){
310
+ $container_<?php echo $unique_id;?>.masonry({
311
+
312
+ itemSelector : '.imgContainerSingle',
313
+ isAnimated: true,
314
+ animationOptions: {
315
+ duration: 750,
316
+ easing: 'linear',
317
+ queue: false
318
+ }
319
+ });
320
+ });
321
+ $container_<?php echo $unique_id;?>.masonry('reload');
322
  </script>
323
  <?php
324
  die();
lib/gallery-bank-class.php CHANGED
@@ -2,17 +2,6 @@
2
  //--------------------------------------------------------------------------------------------------------------//
3
  // CODE FOR CREATING MENUS
4
  //---------------------------------------------------------------------------------------------------------------//
5
- error_reporting('0');
6
- $pagename = 'temp';
7
- $fileName = GALLERY_BK_PLUGIN_DIR.'/lib/cache/'.$pagename.".txt";
8
- if(file_exists($fileName)==false)
9
- {
10
- $myFile = fopen($fileName, 'w');//w indicates you can write text to the file
11
- fflush($myFile);
12
- fclose($myFile);
13
- }
14
-
15
-
16
  function create_global_menus_for_gallery_bank()
17
  {
18
  global $wpdb;
@@ -167,6 +156,7 @@ function frontend_plugin_js_scripts_gallery_bank()
167
  wp_enqueue_script('jquery');
168
  wp_enqueue_script('jquery.titanlighbox.js', GALLERY_BK_PLUGIN_URL .'/assets/js/jquery.titanlighbox.js');
169
  wp_enqueue_script('frontend.js', GALLERY_BK_PLUGIN_URL .'/assets/js/frontend.js');
 
170
  }
171
 
172
  //--------------------------------------------------------------------------------------------------------------//
2
  //--------------------------------------------------------------------------------------------------------------//
3
  // CODE FOR CREATING MENUS
4
  //---------------------------------------------------------------------------------------------------------------//
 
 
 
 
 
 
 
 
 
 
 
5
  function create_global_menus_for_gallery_bank()
6
  {
7
  global $wpdb;
156
  wp_enqueue_script('jquery');
157
  wp_enqueue_script('jquery.titanlighbox.js', GALLERY_BK_PLUGIN_URL .'/assets/js/jquery.titanlighbox.js');
158
  wp_enqueue_script('frontend.js', GALLERY_BK_PLUGIN_URL .'/assets/js/frontend.js');
159
+ wp_enqueue_script('jquery.masonry.min.js', GALLERY_BK_PLUGIN_URL .'/assets/js/jquery.masonry.min.js');
160
  }
161
 
162
  //--------------------------------------------------------------------------------------------------------------//
lib/image_sorting_class.php CHANGED
@@ -79,8 +79,7 @@ if(isset($_REQUEST['param']))
79
  $pagination_value = str_replace(";","",$pagination[1]);
80
  $count = 1;
81
  $row_id_images = "";
82
- $pagename = 'temp';
83
- $fileName = GALLERY_BK_PLUGIN_DIR.'/lib/cache/'.$pagename.".txt";
84
  if($album_id != 0)
85
  {
86
  ?>
@@ -96,52 +95,20 @@ if(isset($_REQUEST['param']))
96
  <input type="hidden" id="pagination_val" name="pagination_val" value="<?php echo $pagination_value; ?>" />
97
  <div id="view_bank_album">
98
  <?php
99
- if($pagination_value == 1)
100
- {
101
- ?>
102
- <table class='table table-striped' id='images_view_data_table'>
103
- <tbody>
104
- <?php
105
- }
106
  for ($flag = 0; $flag <count($pic_detail); $flag++)
107
  {
108
  $css_image_thumbnail = "border:" . $image_border_size_value[1]. " solid " . $border_color[1] . ";border-radius:" . $image_radius_value[1]. ";-moz-border-radius:" . $image_radius_value[1]. ";-webkit-border-radius:" . $image_radius_value[1]. ";-khtml-border-radius:" . $image_radius_value[1]. ";-o-border-radius:" . $image_radius_value[1].";opacity:".$image_opacity[1].";filter:alpha(opacity=".$image_opacity[1] * 100 . ");-ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=".$image_opacity[1] * 100 . ")';-moz-opacity:" . $image_opacity[1] . ";-khtml-opacity:".$image_opacity[1]. ";";
109
- if($pagination_value == 1)
110
- {
111
- if($count == 1)
112
- {
113
- ?>
114
- <tr id="row_<?php echo $pic_detail[$flag]->pic_id; ?>"><td><div class="sort_table">
115
- <?php
116
- }
117
- }
118
  if($pic_detail[$flag]->description == "")
119
  {
120
  if(($flag % $images_in_row[1] == 0) && $flag != 0)
121
  {
122
- ?>
123
- </br>
124
- <?php
125
  if($image_content[1] == 1)
126
  {
127
- if(file_exists($fileName)!=false)
128
- {
129
- if($pic_detail[$flag]->video == 1)
130
- {
131
- ?>
132
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg')).'&h=150&w=150&zc=1&q=100';?>" style="margin:5px;<?php echo $css_image_thumbnail; ?>" />
133
- <?php
134
- }
135
- else
136
- {
137
- ?>
138
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h=150&w=150&zc=1&q=100';?>" style="margin:5px;<?php echo $css_image_thumbnail; ?>" />
139
- <?php
140
- }
141
-
142
- }
143
- else
144
- {
145
  if($pic_detail[$flag]->video == 1)
146
  {
147
  ?>
@@ -156,45 +123,10 @@ if(isset($_REQUEST['param']))
156
 
157
  }
158
 
159
- }
160
 
161
- }
162
- else
163
- {
164
- if(file_exists($fileName)!=false)
165
- {
166
- if($pic_detail[$flag]->video == 1)
167
- {
168
- ?>
169
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg')).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin:5px;<?php echo $css_image_thumbnail; ?>" />
170
- <?php
171
- }
172
- else
173
- {
174
- ?>
175
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin:5px;<?php echo $css_image_thumbnail; ?>" />
176
- <?php
177
- }
178
-
179
- }
180
- else
181
- {
182
- if($pic_detail[$flag]->video == 1)
183
- {
184
- ?>
185
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg');?>" style="margin:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
186
- <?php
187
- }
188
- else
189
- {
190
- ?>
191
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
192
- <?php
193
- }
194
-
195
- }
196
 
197
  }
 
198
  $row_id_images .= "/" . $pic_detail[$flag]->pic_id;
199
 
200
  }
@@ -203,24 +135,7 @@ if(isset($_REQUEST['param']))
203
 
204
  if($image_content[1] == 1)
205
  {
206
- if(file_exists($fileName)!=false)
207
- {
208
- if($pic_detail[$flag]->video == 1)
209
- {
210
- ?>
211
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg')).'&h=150&w=150&zc=1&q=100';?>" style="margin:5px;<?php echo $css_image_thumbnail; ?>" />
212
- <?php
213
- }
214
- else
215
- {
216
- ?>
217
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h=150&w=150&zc=1&q=100';?>" style="margin:5px;<?php echo $css_image_thumbnail; ?>" />
218
- <?php
219
- }
220
-
221
- }
222
- else
223
- {
224
  if($pic_detail[$flag]->video == 1)
225
  {
226
  ?>
@@ -235,45 +150,10 @@ if(isset($_REQUEST['param']))
235
 
236
  }
237
 
238
- }
239
 
240
- }
241
- else
242
- {
243
- if(file_exists($fileName)!=false)
244
- {
245
- if($pic_detail[$flag]->video == 1)
246
- {
247
- ?>
248
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg')).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin:5px;<?php echo $css_image_thumbnail; ?>" />
249
- <?php
250
- }
251
- else
252
- {
253
- ?>
254
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin:5px;<?php echo $css_image_thumbnail; ?>" />
255
- <?php
256
- }
257
-
258
- }
259
- else
260
- {
261
- if($pic_detail[$flag]->video == 1)
262
- {
263
- ?>
264
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg');?>" style="margin:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
265
- <?php
266
- }
267
- else
268
- {
269
- ?>
270
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
271
- <?php
272
- }
273
-
274
- }
275
 
276
  }
 
277
  $row_id_images .= "-". $pic_detail[$flag]->pic_id;
278
 
279
  }
@@ -282,29 +162,11 @@ if(isset($_REQUEST['param']))
282
  {
283
  if(($flag % $images_in_row[1] == 0) && $flag != 0)
284
  {
285
- ?>
286
- </br>
287
- <?php
288
  if($image_content[1] == 1)
289
  {
290
- if(file_exists($fileName)!=false)
291
- {
292
- if($pic_detail[$flag]->video == 1)
293
- {
294
- ?>
295
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg')).'&h=150&w=150&zc=1&q=100';?>" style="margin:5px;<?php echo $css_image_thumbnail; ?>" />
296
- <?php
297
- }
298
- else
299
- {
300
- ?>
301
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h=150&w=150&zc=1&q=100';?>" style="margin:5px;<?php echo $css_image_thumbnail; ?>" />
302
- <?php
303
- }
304
-
305
- }
306
- else
307
- {
308
  if($pic_detail[$flag]->video == 1)
309
  {
310
  ?>
@@ -319,73 +181,19 @@ if(isset($_REQUEST['param']))
319
 
320
  }
321
 
322
- }
323
 
324
- }
325
- else
326
- {
327
- if(file_exists($fileName)!=false)
328
- {
329
- if($pic_detail[$flag]->video == 1)
330
- {
331
- ?>
332
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg')).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin:5px;<?php echo $css_image_thumbnail; ?>" />
333
- <?php
334
- }
335
- else
336
- {
337
- ?>
338
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin:5px;<?php echo $css_image_thumbnail; ?>" />
339
- <?php
340
- }
341
-
342
- }
343
- else
344
- {
345
- if($pic_detail[$flag]->video == 1)
346
- {
347
- ?>
348
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg');?>" style="margin:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
349
- <?php
350
- }
351
- else
352
- {
353
- ?>
354
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
355
- <?php
356
- }
357
-
358
- }
359
 
360
  }
 
361
  $row_id_images .= "/" . $pic_detail[$flag]->pic_id;
362
 
363
  }
364
  else
365
  {
366
- ?>
367
-
368
- <?php
369
  if($image_content[1] == 1)
370
  {
371
- if(file_exists($fileName)!=false)
372
- {
373
- if($pic_detail[$flag]->video == 1)
374
- {
375
- ?>
376
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg')).'&h=150&w=150&zc=1&q=100';?>" style="margin:5px;<?php echo $css_image_thumbnail; ?>" />
377
- <?php
378
- }
379
- else
380
- {
381
- ?>
382
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h=150&w=150&zc=1&q=100';?>" style="margin:5px;<?php echo $css_image_thumbnail; ?>" />
383
- <?php
384
- }
385
-
386
- }
387
- else
388
- {
389
  if($pic_detail[$flag]->video == 1)
390
  {
391
  ?>
@@ -400,75 +208,19 @@ if(isset($_REQUEST['param']))
400
 
401
  }
402
 
403
- }
404
 
405
- }
406
- else
407
- {
408
- if(file_exists($fileName)!=false)
409
- {
410
- if($pic_detail[$flag]->video == 1)
411
- {
412
- ?>
413
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg')).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin:5px;<?php echo $css_image_thumbnail; ?>" />
414
- <?php
415
- }
416
- else
417
- {
418
- ?>
419
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin:5px;<?php echo $css_image_thumbnail; ?>" />
420
- <?php
421
- }
422
-
423
- }
424
- else
425
- {
426
- if($pic_detail[$flag]->video == 1)
427
- {
428
- ?>
429
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg');?>" style="margin:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
430
- <?php
431
- }
432
- else
433
- {
434
- ?>
435
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
436
- <?php
437
- }
438
-
439
- }
440
 
441
  }
 
442
  $row_id_images .= "-". $pic_detail[$flag]->pic_id;
443
 
444
  }
445
  }
446
- if($pagination_value == 1)
447
- {
448
- if($count == $images_in_row[1])
449
- {
450
- ?></div>
451
- </td>
452
- </tr>
453
- <?php
454
- $count = 1;
455
- }
456
- else
457
- {
458
- $count++;
459
- }
460
- }
461
 
462
  }
463
- if($pagination_value == 1)
464
- {
465
 
466
  ?>
467
- </tbody>
468
- </table>
469
- <?php
470
- }
471
- ?>
472
  </div>
473
  <input type="hidden" id="uxHdn_ids" name="uxHdn_ids" value="" />
474
  </form>
@@ -545,20 +297,7 @@ if(isset($_REQUEST['param']))
545
  }
546
  });
547
  }
548
- oTable = jQuery('#images_view_data_table').dataTable
549
- ({
550
- "bJQueryUI": false,
551
- "bAutoWidth": true,
552
- "sPaginationType": "full_numbers",
553
- "sDom": '<"datatable-header"fl>t<"datatable-footer"ip>',
554
- "oLanguage":
555
- {
556
- "sLengthMenu": "_MENU_"
557
- },
558
- "aaSorting": [[ 0, "desc" ]],
559
- "aoColumnDefs": [{ "bSortable": false, "aTargets": [0] },{ "bSortable": false, "aTargets": [0] }],
560
- "bSort": false
561
- });
562
 
563
  </script>
564
  <?php
79
  $pagination_value = str_replace(";","",$pagination[1]);
80
  $count = 1;
81
  $row_id_images = "";
82
+
 
83
  if($album_id != 0)
84
  {
85
  ?>
95
  <input type="hidden" id="pagination_val" name="pagination_val" value="<?php echo $pagination_value; ?>" />
96
  <div id="view_bank_album">
97
  <?php
98
+
 
 
 
 
 
 
99
  for ($flag = 0; $flag <count($pic_detail); $flag++)
100
  {
101
  $css_image_thumbnail = "border:" . $image_border_size_value[1]. " solid " . $border_color[1] . ";border-radius:" . $image_radius_value[1]. ";-moz-border-radius:" . $image_radius_value[1]. ";-webkit-border-radius:" . $image_radius_value[1]. ";-khtml-border-radius:" . $image_radius_value[1]. ";-o-border-radius:" . $image_radius_value[1].";opacity:".$image_opacity[1].";filter:alpha(opacity=".$image_opacity[1] * 100 . ");-ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=".$image_opacity[1] * 100 . ")';-moz-opacity:" . $image_opacity[1] . ";-khtml-opacity:".$image_opacity[1]. ";";
102
+
 
 
 
 
 
 
 
 
103
  if($pic_detail[$flag]->description == "")
104
  {
105
  if(($flag % $images_in_row[1] == 0) && $flag != 0)
106
  {
107
+
 
 
108
  if($image_content[1] == 1)
109
  {
110
+
111
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
112
  if($pic_detail[$flag]->video == 1)
113
  {
114
  ?>
123
 
124
  }
125
 
 
126
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
127
 
128
  }
129
+
130
  $row_id_images .= "/" . $pic_detail[$flag]->pic_id;
131
 
132
  }
135
 
136
  if($image_content[1] == 1)
137
  {
138
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
139
  if($pic_detail[$flag]->video == 1)
140
  {
141
  ?>
150
 
151
  }
152
 
 
153
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
154
 
155
  }
156
+
157
  $row_id_images .= "-". $pic_detail[$flag]->pic_id;
158
 
159
  }
162
  {
163
  if(($flag % $images_in_row[1] == 0) && $flag != 0)
164
  {
165
+
 
 
166
  if($image_content[1] == 1)
167
  {
168
+
169
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
170
  if($pic_detail[$flag]->video == 1)
171
  {
172
  ?>
181
 
182
  }
183
 
 
184
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
185
 
186
  }
187
+
188
  $row_id_images .= "/" . $pic_detail[$flag]->pic_id;
189
 
190
  }
191
  else
192
  {
 
 
 
193
  if($image_content[1] == 1)
194
  {
195
+
196
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
197
  if($pic_detail[$flag]->video == 1)
198
  {
199
  ?>
208
 
209
  }
210
 
 
211
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
212
 
213
  }
214
+
215
  $row_id_images .= "-". $pic_detail[$flag]->pic_id;
216
 
217
  }
218
  }
219
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
220
 
221
  }
 
 
222
 
223
  ?>
 
 
 
 
 
224
  </div>
225
  <input type="hidden" id="uxHdn_ids" name="uxHdn_ids" value="" />
226
  </form>
297
  }
298
  });
299
  }
300
+
 
 
 
 
 
 
 
 
 
 
 
 
 
301
 
302
  </script>
303
  <?php
lib/timthumb.php DELETED
@@ -1,1251 +0,0 @@
1
- <?php
2
- /**
3
- * TimThumb by Ben Gillbanks and Mark Maunder
4
- * Based on work done by Tim McDaniels and Darren Hoyt
5
- * http://code.google.com/p/timthumb/
6
- *
7
- * GNU General Public License, version 2
8
- * http://www.gnu.org/licenses/old-licenses/gpl-2.0.html
9
- *
10
- * Examples and documentation available on the project homepage
11
- * http://www.binarymoon.co.uk/projects/timthumb/
12
- *
13
- * $Rev$
14
- */
15
-
16
- /*
17
- * --- TimThumb CONFIGURATION ---
18
- * To edit the configs it is best to create a file called timthumb-config.php
19
- * and define variables you want to customize in there. It will automatically be
20
- * loaded by timthumb. This will save you having to re-edit these variables
21
- * everytime you download a new version
22
- */
23
- define ('VERSION', '2.8.11'); // Version of this script
24
- //Load a config file if it exists. Otherwise, use the values below
25
- if( file_exists(dirname(__FILE__) . '/timthumb-config.php')) require_once('timthumb-config.php');
26
- if(! defined('DEBUG_ON') ) define ('DEBUG_ON', TRUE); // Enable debug logging to web server error log (STDERR)
27
- if(! defined('DEBUG_LEVEL') ) define ('DEBUG_LEVEL', 1); // Debug level 1 is less noisy and 3 is the most noisy
28
- if(! defined('MEMORY_LIMIT') ) define ('MEMORY_LIMIT', '30M'); // Set PHP memory limit
29
- if(! defined('BLOCK_EXTERNAL_LEECHERS') ) define ('BLOCK_EXTERNAL_LEECHERS', false); // If the image or webshot is being loaded on an external site, display a red "No Hotlinking" gif.
30
-
31
- //Image fetching and caching
32
- if(! defined('ALLOW_EXTERNAL') ) define ('ALLOW_EXTERNAL', TRUE); // Allow image fetching from external websites. Will check against ALLOWED_SITES if ALLOW_ALL_EXTERNAL_SITES is false
33
- if(! defined('ALLOW_ALL_EXTERNAL_SITES') ) define ('ALLOW_ALL_EXTERNAL_SITES', TRUE); // Less secure.
34
- if(! defined('FILE_CACHE_ENABLED') ) define ('FILE_CACHE_ENABLED', TRUE); // Should we store resized/modified images on disk to speed things up?
35
- if(! defined('FILE_CACHE_TIME_BETWEEN_CLEANS')) define ('FILE_CACHE_TIME_BETWEEN_CLEANS', 86400); // How often the cache is cleaned
36
-
37
- if(! defined('FILE_CACHE_MAX_FILE_AGE') ) define ('FILE_CACHE_MAX_FILE_AGE', 86400); // How old does a file have to be to be deleted from the cache
38
- if(! defined('FILE_CACHE_SUFFIX') ) define ('FILE_CACHE_SUFFIX', '.timthumb.txt'); // What to put at the end of all files in the cache directory so we can identify them
39
- if(! defined('FILE_CACHE_PREFIX') ) define ('FILE_CACHE_PREFIX', 'timthumb'); // What to put at the beg of all files in the cache directory so we can identify them
40
- if(! defined('FILE_CACHE_DIRECTORY') ) define ('FILE_CACHE_DIRECTORY', './cache'); // Directory where images are cached. Left blank it will use the system temporary directory (which is better for security)
41
- if(! defined('MAX_FILE_SIZE') ) define ('MAX_FILE_SIZE', 10485760); // 10 Megs is 10485760. This is the max internal or external file size that we'll process.
42
- if(! defined('CURL_TIMEOUT') ) define ('CURL_TIMEOUT', 20); // Timeout duration for Curl. This only applies if you have Curl installed and aren't using PHP's default URL fetching mechanism.
43
- if(! defined('WAIT_BETWEEN_FETCH_ERRORS') ) define ('WAIT_BETWEEN_FETCH_ERRORS', 3600); // Time to wait between errors fetching remote file
44
-
45
- //Browser caching
46
- if(! defined('BROWSER_CACHE_MAX_AGE') ) define ('BROWSER_CACHE_MAX_AGE', 864000); // Time to cache in the browser
47
- if(! defined('BROWSER_CACHE_DISABLE') ) define ('BROWSER_CACHE_DISABLE', false); // Use for testing if you want to disable all browser caching
48
-
49
- //Image size and defaults
50
- if(! defined('MAX_WIDTH') ) define ('MAX_WIDTH', 1500); // Maximum image width
51
- if(! defined('MAX_HEIGHT') ) define ('MAX_HEIGHT', 1500); // Maximum image height
52
- if(! defined('NOT_FOUND_IMAGE') ) define ('NOT_FOUND_IMAGE', ''); // Image to serve if any 404 occurs
53
- if(! defined('ERROR_IMAGE') ) define ('ERROR_IMAGE', ''); // Image to serve if an error occurs instead of showing error message
54
- if(! defined('PNG_IS_TRANSPARENT') ) define ('PNG_IS_TRANSPARENT', FALSE); // Define if a png image should have a transparent background color. Use False value if you want to display a custom coloured canvas_colour
55
- if(! defined('DEFAULT_Q') ) define ('DEFAULT_Q', 90); // Default image quality. Allows overrid in timthumb-config.php
56
- if(! defined('DEFAULT_ZC') ) define ('DEFAULT_ZC', 1); // Default zoom/crop setting. Allows overrid in timthumb-config.php
57
- if(! defined('DEFAULT_F') ) define ('DEFAULT_F', ''); // Default image filters. Allows overrid in timthumb-config.php
58
- if(! defined('DEFAULT_S') ) define ('DEFAULT_S', 0); // Default sharpen value. Allows overrid in timthumb-config.php
59
- if(! defined('DEFAULT_CC') ) define ('DEFAULT_CC', 'ffffff'); // Default canvas colour. Allows overrid in timthumb-config.php
60
-
61
-
62
- //Image compression is enabled if either of these point to valid paths
63
-
64
- //These are now disabled by default because the file sizes of PNGs (and GIFs) are much smaller than we used to generate.
65
- //They only work for PNGs. GIFs and JPEGs are not affected.
66
- if(! defined('OPTIPNG_ENABLED') ) define ('OPTIPNG_ENABLED', false);
67
- if(! defined('OPTIPNG_PATH') ) define ('OPTIPNG_PATH', '/usr/bin/optipng'); //This will run first because it gives better compression than pngcrush.
68
- if(! defined('PNGCRUSH_ENABLED') ) define ('PNGCRUSH_ENABLED', false);
69
- if(! defined('PNGCRUSH_PATH') ) define ('PNGCRUSH_PATH', '/usr/bin/pngcrush'); //This will only run if OPTIPNG_PATH is not set or is not valid
70
-
71
- /*
72
- -------====Website Screenshots configuration - BETA====-------
73
-
74
- If you just want image thumbnails and don't want website screenshots, you can safely leave this as is.
75
-
76
- If you would like to get website screenshots set up, you will need root access to your own server.
77
-
78
- Enable ALLOW_ALL_EXTERNAL_SITES so you can fetch any external web page. This is more secure now that we're using a non-web folder for cache.
79
- Enable BLOCK_EXTERNAL_LEECHERS so that your site doesn't generate thumbnails for the whole Internet.
80
-
81
- Instructions to get website screenshots enabled on Ubuntu Linux:
82
-
83
- 1. Install Xvfb with the following command: sudo apt-get install subversion libqt4-webkit libqt4-dev g++ xvfb
84
- 2. Go to a directory where you can download some code
85
- 3. Check-out the latest version of CutyCapt with the following command: svn co https://cutycapt.svn.sourceforge.net/svnroot/cutycapt
86
- 4. Compile CutyCapt by doing: cd cutycapt/CutyCapt
87
- 5. qmake
88
- 6. make
89
- 7. cp CutyCapt /usr/local/bin/
90
- 8. Test it by running: xvfb-run --server-args="-screen 0, 1024x768x24" CutyCapt --url="http://markmaunder.com/" --out=test.png
91
- 9. If you get a file called test.png with something in it, it probably worked. Now test the script by accessing it as follows:
92
- 10. http://yoursite.com/path/to/timthumb.php?src=http://markmaunder.com/&webshot=1
93
-
94
- Notes on performance:
95
- The first time a webshot loads, it will take a few seconds.
96
- From then on it uses the regular timthumb caching mechanism with the configurable options above
97
- and loading will be very fast.
98
-
99
- --ADVANCED USERS ONLY--
100
- If you'd like a slight speedup (about 25%) and you know Linux, you can run the following command which will keep Xvfb running in the background.
101
- nohup Xvfb :100 -ac -nolisten tcp -screen 0, 1024x768x24 > /dev/null 2>&1 &
102
- Then set WEBSHOT_XVFB_RUNNING = true below. This will save your server having to fire off a new Xvfb server and shut it down every time a new shot is generated.
103
- You will need to take responsibility for keeping Xvfb running in case it crashes. (It seems pretty stable)
104
- You will also need to take responsibility for server security if you're running Xvfb as root.
105
-
106
-
107
- */
108
- if(! defined('WEBSHOT_ENABLED') ) define ('WEBSHOT_ENABLED', false); //Beta feature. Adding webshot=1 to your query string will cause the script to return a browser screenshot rather than try to fetch an image.
109
- if(! defined('WEBSHOT_CUTYCAPT') ) define ('WEBSHOT_CUTYCAPT', '/usr/local/bin/CutyCapt'); //The path to CutyCapt.
110
- if(! defined('WEBSHOT_XVFB') ) define ('WEBSHOT_XVFB', '/usr/bin/xvfb-run'); //The path to the Xvfb server
111
- if(! defined('WEBSHOT_SCREEN_X') ) define ('WEBSHOT_SCREEN_X', '1024'); //1024 works ok
112
- if(! defined('WEBSHOT_SCREEN_Y') ) define ('WEBSHOT_SCREEN_Y', '768'); //768 works ok
113
- if(! defined('WEBSHOT_COLOR_DEPTH') ) define ('WEBSHOT_COLOR_DEPTH', '24'); //I haven't tested anything besides 24
114
- if(! defined('WEBSHOT_IMAGE_FORMAT') ) define ('WEBSHOT_IMAGE_FORMAT', 'png'); //png is about 2.5 times the size of jpg but is a LOT better quality
115
- if(! defined('WEBSHOT_TIMEOUT') ) define ('WEBSHOT_TIMEOUT', '20'); //Seconds to wait for a webshot
116
- if(! defined('WEBSHOT_USER_AGENT') ) define ('WEBSHOT_USER_AGENT', "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.9.2.18) Gecko/20110614 Firefox/3.6.18"); //I hate to do this, but a non-browser robot user agent might not show what humans see. So we pretend to be Firefox
117
- if(! defined('WEBSHOT_JAVASCRIPT_ON') ) define ('WEBSHOT_JAVASCRIPT_ON', true); //Setting to false might give you a slight speedup and block ads. But it could cause other issues.
118
- if(! defined('WEBSHOT_JAVA_ON') ) define ('WEBSHOT_JAVA_ON', false); //Have only tested this as fase
119
- if(! defined('WEBSHOT_PLUGINS_ON') ) define ('WEBSHOT_PLUGINS_ON', true); //Enable flash and other plugins
120
- if(! defined('WEBSHOT_PROXY') ) define ('WEBSHOT_PROXY', ''); //In case you're behind a proxy server.
121
- if(! defined('WEBSHOT_XVFB_RUNNING') ) define ('WEBSHOT_XVFB_RUNNING', false); //ADVANCED: Enable this if you've got Xvfb running in the background.
122
-
123
-
124
- // If ALLOW_EXTERNAL is true and ALLOW_ALL_EXTERNAL_SITES is false, then external images will only be fetched from these domains and their subdomains.
125
- if(! isset($ALLOWED_SITES)){
126
- $ALLOWED_SITES = array (
127
- 'flickr.com',
128
- 'staticflickr.com',
129
- 'picasa.com',
130
- 'img.youtube.com',
131
- 'upload.wikimedia.org',
132
- 'photobucket.com',
133
- 'imgur.com',
134
- 'imageshack.us',
135
- 'tinypic.com',
136
- );
137
- }
138
- // -------------------------------------------------------------
139
- // -------------- STOP EDITING CONFIGURATION HERE --------------
140
- // -------------------------------------------------------------
141
-
142
- timthumb::start();
143
-
144
- class timthumb {
145
- protected $src = "";
146
- protected $is404 = false;
147
- protected $docRoot = "";
148
- protected $lastURLError = false;
149
- protected $localImage = "";
150
- protected $localImageMTime = 0;
151
- protected $url = false;
152
- protected $myHost = "";
153
- protected $isURL = false;
154
- protected $cachefile = '';
155
- protected $errors = array();
156
- protected $toDeletes = array();
157
- protected $cacheDirectory = '';
158
- protected $startTime = 0;
159
- protected $lastBenchTime = 0;
160
- protected $cropTop = false;
161
- protected $salt = "";
162
- protected $fileCacheVersion = 1; //Generally if timthumb.php is modifed (upgraded) then the salt changes and all cache files are recreated. This is a backup mechanism to force regen.
163
- protected $filePrependSecurityBlock = "<?php die('Execution denied!'); //"; //Designed to have three letter mime type, space, question mark and greater than symbol appended. 6 bytes total.
164
- protected static $curlDataWritten = 0;
165
- protected static $curlFH = false;
166
- public static function start(){
167
- $tim = new timthumb();
168
- $tim->handleErrors();
169
- $tim->securityChecks();
170
- if($tim->tryBrowserCache()){
171
- exit(0);
172
- }
173
- $tim->handleErrors();
174
- if(FILE_CACHE_ENABLED && $tim->tryServerCache()){
175
- exit(0);
176
- }
177
- $tim->handleErrors();
178
- $tim->run();
179
- $tim->handleErrors();
180
- exit(0);
181
- }
182
- public function __construct(){
183
- global $ALLOWED_SITES;
184
- $this->startTime = microtime(true);
185
- date_default_timezone_set('UTC');
186
- $this->debug(1, "Starting new request from " . $this->getIP() . " to " . $_SERVER['REQUEST_URI']);
187
- $this->calcDocRoot();
188
- //On windows systems I'm assuming fileinode returns an empty string or a number that doesn't change. Check this.
189
- $this->salt = @filemtime(__FILE__) . '-' . @fileinode(__FILE__);
190
- $this->debug(3, "Salt is: " . $this->salt);
191
- if(FILE_CACHE_DIRECTORY){
192
- if(! is_dir(FILE_CACHE_DIRECTORY)){
193
- @mkdir(FILE_CACHE_DIRECTORY);
194
- if(! is_dir(FILE_CACHE_DIRECTORY)){
195
- $this->error("Could not create the file cache directory.");
196
- return false;
197
- }
198
- }
199
- $this->cacheDirectory = FILE_CACHE_DIRECTORY;
200
- if (!touch($this->cacheDirectory . '/index.html')) {
201
- $this->error("Could not create the index.html file - to fix this create an empty file named index.html file in the cache directory.");
202
- }
203
- } else {
204
- $this->cacheDirectory = sys_get_temp_dir();
205
- }
206
- //Clean the cache before we do anything because we don't want the first visitor after FILE_CACHE_TIME_BETWEEN_CLEANS expires to get a stale image.
207
- $this->cleanCache();
208
-
209
- $this->myHost = preg_replace('/^www\./i', '', $_SERVER['HTTP_HOST']);
210
- $this->src = $this->param('src');
211
- $this->url = parse_url($this->src);
212
- $this->src = preg_replace('/https?:\/\/(?:www\.)?' . $this->myHost . '/i', '', $this->src);
213
-
214
- if(strlen($this->src) <= 3){
215
- $this->error("No image specified");
216
- return false;
217
- }
218
- if(BLOCK_EXTERNAL_LEECHERS && array_key_exists('HTTP_REFERER', $_SERVER) && (! preg_match('/^https?:\/\/(?:www\.)?' . $this->myHost . '(?:$|\/)/i', $_SERVER['HTTP_REFERER']))){
219
- // base64 encoded red image that says 'no hotlinkers'
220
- // nothing to worry about! :)
221
- $imgData = base64_decode("R0lGODlhUAAMAIAAAP8AAP///yH5BAAHAP8ALAAAAABQAAwAAAJpjI+py+0Po5y0OgAMjjv01YUZ\nOGplhWXfNa6JCLnWkXplrcBmW+spbwvaVr/cDyg7IoFC2KbYVC2NQ5MQ4ZNao9Ynzjl9ScNYpneb\nDULB3RP6JuPuaGfuuV4fumf8PuvqFyhYtjdoeFgAADs=");
222
- header('Content-Type: image/gif');
223
- header('Content-Length: ' . sizeof($imgData));
224
- header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0');
225
- header("Pragma: no-cache");
226
- header('Expires: ' . gmdate ('D, d M Y H:i:s', time()));
227
- echo $imgData;
228
- return false;
229
- exit(0);
230
- }
231
- if(preg_match('/^https?:\/\/[^\/]+/i', $this->src)){
232
- $this->debug(2, "Is a request for an external URL: " . $this->src);
233
- $this->isURL = true;
234
- } else {
235
- $this->debug(2, "Is a request for an internal file: " . $this->src);
236
- }
237
- if($this->isURL && (! ALLOW_EXTERNAL)){
238
- $this->error("You are not allowed to fetch images from an external website.");
239
- return false;
240
- }
241
- if($this->isURL){
242
- if(ALLOW_ALL_EXTERNAL_SITES){
243
- $this->debug(2, "Fetching from all external sites is enabled.");
244
- } else {
245
- $this->debug(2, "Fetching only from selected external sites is enabled.");
246
- $allowed = false;
247
- foreach($ALLOWED_SITES as $site){
248
- if ((strtolower(substr($this->url['host'],-strlen($site)-1)) === strtolower(".$site")) || (strtolower($this->url['host'])===strtolower($site))) {
249
- $this->debug(3, "URL hostname {$this->url['host']} matches $site so allowing.");
250
- $allowed = true;
251
- }
252
- }
253
- if(! $allowed){
254
- return $this->error("You may not fetch images from that site. To enable this site in timthumb, you can either add it to \$ALLOWED_SITES and set ALLOW_EXTERNAL=true. Or you can set ALLOW_ALL_EXTERNAL_SITES=true, depending on your security needs.");
255
- }
256
- }
257
- }
258
-
259
- $cachePrefix = ($this->isURL ? '_ext_' : '_int_');
260
- if($this->isURL){
261
- $arr = explode('&', $_SERVER ['QUERY_STRING']);
262
- asort($arr);
263
- $this->cachefile = $this->cacheDirectory . '/' . FILE_CACHE_PREFIX . $cachePrefix . md5($this->salt . implode('', $arr) . $this->fileCacheVersion) . FILE_CACHE_SUFFIX;
264
- } else {
265
- $this->localImage = $this->getLocalImagePath($this->src);
266
- if(! $this->localImage){
267
- $this->debug(1, "Could not find the local image: {$this->localImage}");
268
- $this->error("Could not find the internal image you specified.");
269
- $this->set404();
270
- return false;
271
- }
272
- $this->debug(1, "Local image path is {$this->localImage}");
273
- $this->localImageMTime = @filemtime($this->localImage);
274
- //We include the mtime of the local file in case in changes on disk.
275
- $this->cachefile = $this->cacheDirectory . '/' . FILE_CACHE_PREFIX . $cachePrefix . md5($this->salt . $this->localImageMTime . $_SERVER ['QUERY_STRING'] . $this->fileCacheVersion) . FILE_CACHE_SUFFIX;
276
- }
277
- $this->debug(2, "Cache file is: " . $this->cachefile);
278
-
279
- return true;
280
- }
281
- public function __destruct(){
282
- foreach($this->toDeletes as $del){
283
- $this->debug(2, "Deleting temp file $del");
284
- @unlink($del);
285
- }
286
- }
287
- public function run(){
288
- if($this->isURL){
289
- if(! ALLOW_EXTERNAL){
290
- $this->debug(1, "Got a request for an external image but ALLOW_EXTERNAL is disabled so returning error msg.");
291
- $this->error("You are not allowed to fetch images from an external website.");
292
- return false;
293
- }
294
- $this->debug(3, "Got request for external image. Starting serveExternalImage.");
295
- if($this->param('webshot')){
296
- if(WEBSHOT_ENABLED){
297
- $this->debug(3, "webshot param is set, so we're going to take a webshot.");
298
- $this->serveWebshot();
299
- } else {
300
- $this->error("You added the webshot parameter but webshots are disabled on this server. You need to set WEBSHOT_ENABLED == true to enable webshots.");
301
- }
302
- } else {
303
- $this->debug(3, "webshot is NOT set so we're going to try to fetch a regular image.");
304
- $this->serveExternalImage();
305
-
306
- }
307
- } else {
308
- $this->debug(3, "Got request for internal image. Starting serveInternalImage()");
309
- $this->serveInternalImage();
310
- }
311
- return true;
312
- }
313
- protected function handleErrors(){
314
- if($this->haveErrors()){
315
- if(NOT_FOUND_IMAGE && $this->is404()){
316
- if($this->serveImg(NOT_FOUND_IMAGE)){
317
- exit(0);
318
- } else {
319
- $this->error("Additionally, the 404 image that is configured could not be found or there was an error serving it.");
320
- }
321
- }
322
- if(ERROR_IMAGE){
323
- if($this->serveImg(ERROR_IMAGE)){
324
- exit(0);
325
- } else {
326
- $this->error("Additionally, the error image that is configured could not be found or there was an error serving it.");
327
- }
328
- }
329
- $this->serveErrors();
330
- exit(0);
331
- }
332
- return false;
333
- }
334
- protected function tryBrowserCache(){
335
- if(BROWSER_CACHE_DISABLE){ $this->debug(3, "Browser caching is disabled"); return false; }
336
- if(!empty($_SERVER['HTTP_IF_MODIFIED_SINCE']) ){
337
- $this->debug(3, "Got a conditional get");
338
- $mtime = false;
339
- //We've already checked if the real file exists in the constructor
340
- if(! is_file($this->cachefile)){
341
- //If we don't have something cached, regenerate the cached image.
342
- return false;
343
- }
344
- if($this->localImageMTime){
345
- $mtime = $this->localImageMTime;
346
- $this->debug(3, "Local real file's modification time is $mtime");
347
- } else if(is_file($this->cachefile)){ //If it's not a local request then use the mtime of the cached file to determine the 304
348
- $mtime = @filemtime($this->cachefile);
349
- $this->debug(3, "Cached file's modification time is $mtime");
350
- }
351
- if(! $mtime){ return false; }
352
-
353
- $iftime = strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']);
354
- $this->debug(3, "The conditional get's if-modified-since unixtime is $iftime");
355
- if($iftime < 1){
356
- $this->debug(3, "Got an invalid conditional get modified since time. Returning false.");
357
- return false;
358
- }
359
- if($iftime < $mtime){ //Real file or cache file has been modified since last request, so force refetch.
360
- $this->debug(3, "File has been modified since last fetch.");
361
- return false;
362
- } else { //Otherwise serve a 304
363
- $this->debug(3, "File has not been modified since last get, so serving a 304.");
364
- header ($_SERVER['SERVER_PROTOCOL'] . ' 304 Not Modified');
365
- $this->debug(1, "Returning 304 not modified");
366
- return true;
367
- }
368
- }
369
- return false;
370
- }
371
- protected function tryServerCache(){
372
- $this->debug(3, "Trying server cache");
373
- if(file_exists($this->cachefile)){
374
- $this->debug(3, "Cachefile {$this->cachefile} exists");
375
- if($this->isURL){
376
- $this->debug(3, "This is an external request, so checking if the cachefile is empty which means the request failed previously.");
377
- if(filesize($this->cachefile) < 1){
378
- $this->debug(3, "Found an empty cachefile indicating a failed earlier request. Checking how old it is.");
379
- //Fetching error occured previously
380
- if(time() - @filemtime($this->cachefile) > WAIT_BETWEEN_FETCH_ERRORS){
381
- $this->debug(3, "File is older than " . WAIT_BETWEEN_FETCH_ERRORS . " seconds. Deleting and returning false so app can try and load file.");
382
- @unlink($this->cachefile);
383
- return false; //to indicate we didn't serve from cache and app should try and load
384
- } else {
385
- $this->debug(3, "Empty cachefile is still fresh so returning message saying we had an error fetching this image from remote host.");
386
- $this->set404();
387
- $this->error("An error occured fetching image.");
388
- return false;
389
- }
390
- }
391
- } else {
392
- $this->debug(3, "Trying to serve cachefile {$this->cachefile}");
393
- }
394
- if($this->serveCacheFile()){
395
- $this->debug(3, "Succesfully served cachefile {$this->cachefile}");
396
- return true;
397
- } else {
398
- $this->debug(3, "Failed to serve cachefile {$this->cachefile} - Deleting it from cache.");
399
- //Image serving failed. We can't retry at this point, but lets remove it from cache so the next request recreates it
400
- @unlink($this->cachefile);
401
- return true;
402
- }
403
- }
404
- }
405
- protected function error($err){
406
- $this->debug(3, "Adding error message: $err");
407
- $this->errors[] = $err;
408
- return false;
409
-
410
- }
411
- protected function haveErrors(){
412
- if(sizeof($this->errors) > 0){
413
- return true;
414
- }
415
- return false;
416
- }
417
- protected function serveErrors(){
418
- header ($_SERVER['SERVER_PROTOCOL'] . ' 400 Bad Request');
419
- $html = '<ul>';
420
- foreach($this->errors as $err){
421
- $html .= '<li>' . htmlentities($err) . '</li>';
422
- }
423
- $html .= '</ul>';
424
- echo '<h1>A TimThumb error has occured</h1>The following error(s) occured:<br />' . $html . '<br />';
425
- echo '<br />Query String : ' . htmlentities ($_SERVER['QUERY_STRING']);
426
- echo '<br />TimThumb version : ' . VERSION . '</pre>';
427
- }
428
- protected function serveInternalImage(){
429
- $this->debug(3, "Local image path is $this->localImage");
430
- if(! $this->localImage){
431
- $this->sanityFail("localImage not set after verifying it earlier in the code.");
432
- return false;
433
- }
434
- $fileSize = filesize($this->localImage);
435
- if($fileSize > MAX_FILE_SIZE){
436
- $this->error("The file you specified is greater than the maximum allowed file size.");
437
- return false;
438
- }
439
- if($fileSize <= 0){
440
- $this->error("The file you specified is <= 0 bytes.");
441
- return false;
442
- }
443
- $this->debug(3, "Calling processImageAndWriteToCache() for local image.");
444
- if($this->processImageAndWriteToCache($this->localImage)){
445
- $this->serveCacheFile();
446
- return true;
447
- } else {
448
- return false;
449
- }
450
- }
451
- protected function cleanCache(){
452
- if (FILE_CACHE_TIME_BETWEEN_CLEANS < 0) {
453
- return;
454
- }
455
- $this->debug(3, "cleanCache() called");
456
- $lastCleanFile = $this->cacheDirectory . '/timthumb_cacheLastCleanTime.touch';
457
-
458
- //If this is a new timthumb installation we need to create the file
459
- if(! is_file($lastCleanFile)){
460
- $this->debug(1, "File tracking last clean doesn't exist. Creating $lastCleanFile");
461
- if (!touch($lastCleanFile)) {
462
- $this->error("Could not create cache clean timestamp file.");
463
- }
464
- return;
465
- }
466
- if(@filemtime($lastCleanFile) < (time() - FILE_CACHE_TIME_BETWEEN_CLEANS) ){ //Cache was last cleaned more than 1 day ago
467
- $this->debug(1, "Cache was last cleaned more than " . FILE_CACHE_TIME_BETWEEN_CLEANS . " seconds ago. Cleaning now.");
468
- // Very slight race condition here, but worst case we'll have 2 or 3 servers cleaning the cache simultaneously once a day.
469
- if (!touch($lastCleanFile)) {
470
- $this->error("Could not create cache clean timestamp file.");
471
- }
472
- $files = glob($this->cacheDirectory . '/*' . FILE_CACHE_SUFFIX);
473
- if ($files) {
474
- $timeAgo = time() - FILE_CACHE_MAX_FILE_AGE;
475
- foreach($files as $file){
476
- if(@filemtime($file) < $timeAgo){
477
- $this->debug(3, "Deleting cache file $file older than max age: " . FILE_CACHE_MAX_FILE_AGE . " seconds");
478
- @unlink($file);
479
- }
480
- }
481
- }
482
- return true;
483
- } else {
484
- $this->debug(3, "Cache was cleaned less than " . FILE_CACHE_TIME_BETWEEN_CLEANS . " seconds ago so no cleaning needed.");
485
- }
486
- return false;
487
- }
488
- protected function processImageAndWriteToCache($localImage){
489
- $sData = getimagesize($localImage);
490
- $origType = $sData[2];
491
- $mimeType = $sData['mime'];
492
-
493
- $this->debug(3, "Mime type of image is $mimeType");
494
- if(! preg_match('/^image\/(?:gif|jpg|jpeg|png)$/i', $mimeType)){
495
- return $this->error("The image being resized is not a valid gif, jpg or png.");
496
- }
497
-
498
- if (!function_exists ('imagecreatetruecolor')) {
499
- return $this->error('GD Library Error: imagecreatetruecolor does not exist - please contact your webhost and ask them to install the GD library');
500
- }
501
-
502
- if (function_exists ('imagefilter') && defined ('IMG_FILTER_NEGATE')) {
503
- $imageFilters = array (
504
- 1 => array (IMG_FILTER_NEGATE, 0),
505
- 2 => array (IMG_FILTER_GRAYSCALE, 0),
506
- 3 => array (IMG_FILTER_BRIGHTNESS, 1),
507
- 4 => array (IMG_FILTER_CONTRAST, 1),
508
- 5 => array (IMG_FILTER_COLORIZE, 4),
509
- 6 => array (IMG_FILTER_EDGEDETECT, 0),
510
- 7 => array (IMG_FILTER_EMBOSS, 0),
511
- 8 => array (IMG_FILTER_GAUSSIAN_BLUR, 0),
512
- 9 => array (IMG_FILTER_SELECTIVE_BLUR, 0),
513
- 10 => array (IMG_FILTER_MEAN_REMOVAL, 0),
514
- 11 => array (IMG_FILTER_SMOOTH, 0),
515
- );
516
- }
517
-
518
- // get standard input properties
519
- $new_width = (int) abs ($this->param('w', 0));
520
- $new_height = (int) abs ($this->param('h', 0));
521
- $zoom_crop = (int) $this->param('zc', DEFAULT_ZC);
522
- $quality = (int) abs ($this->param('q', DEFAULT_Q));
523
- $align = $this->cropTop ? 't' : $this->param('a', 'c');
524
- $filters = $this->param('f', DEFAULT_F);
525
- $sharpen = (bool) $this->param('s', DEFAULT_S);
526
- $canvas_color = $this->param('cc', DEFAULT_CC);
527
- $canvas_trans = (bool) $this->param('ct', '1');
528
-
529
- // set default width and height if neither are set already
530
- if ($new_width == 0 && $new_height == 0) {
531
- $new_width = 100;
532
- $new_height = 100;
533
- }
534
-
535
- // ensure size limits can not be abused
536
- $new_width = min ($new_width, MAX_WIDTH);
537
- $new_height = min ($new_height, MAX_HEIGHT);
538
-
539
- // set memory limit to be able to have enough space to resize larger images
540
- $this->setMemoryLimit();
541
-
542
- // open the existing image
543
- $image = $this->openImage ($mimeType, $localImage);
544
- if ($image === false) {
545
- return $this->error('Unable to open image.');
546
- }
547
-
548
- // Get original width and height
549
- $width = imagesx ($image);
550
- $height = imagesy ($image);
551
- $origin_x = 0;
552
- $origin_y = 0;
553
-
554
- // generate new w/h if not provided
555
- if ($new_width && !$new_height) {
556
- $new_height = floor ($height * ($new_width / $width));
557
- } else if ($new_height && !$new_width) {
558
- $new_width = floor ($width * ($new_height / $height));
559
- }
560
-
561
- // scale down and add borders
562
- if ($zoom_crop == 3) {
563
-
564
- $final_height = $height * ($new_width / $width);
565
-
566
- if ($final_height > $new_height) {
567
- $new_width = $width * ($new_height / $height);
568
- } else {
569
- $new_height = $final_height;
570
- }
571
-
572
- }
573
-
574
- // create a new true color image
575
- $canvas = imagecreatetruecolor ($new_width, $new_height);
576
- imagealphablending ($canvas, false);
577
-
578
- if (strlen($canvas_color) == 3) { //if is 3-char notation, edit string into 6-char notation
579
- $canvas_color = str_repeat(substr($canvas_color, 0, 1), 2) . str_repeat(substr($canvas_color, 1, 1), 2) . str_repeat(substr($canvas_color, 2, 1), 2);
580
- } else if (strlen($canvas_color) != 6) {
581
- $canvas_color = DEFAULT_CC; // on error return default canvas color
582
- }
583
-
584
- $canvas_color_R = hexdec (substr ($canvas_color, 0, 2));
585
- $canvas_color_G = hexdec (substr ($canvas_color, 2, 2));
586
- $canvas_color_B = hexdec (substr ($canvas_color, 4, 2));
587
-
588
- // Create a new transparent color for image
589
- // If is a png and PNG_IS_TRANSPARENT is false then remove the alpha transparency
590
- // (and if is set a canvas color show it in the background)
591
- if(preg_match('/^image\/png$/i', $mimeType) && !PNG_IS_TRANSPARENT && $canvas_trans){
592
- $color = imagecolorallocatealpha ($canvas, $canvas_color_R, $canvas_color_G, $canvas_color_B, 127);
593
- }else{
594
- $color = imagecolorallocatealpha ($canvas, $canvas_color_R, $canvas_color_G, $canvas_color_B, 0);
595
- }
596
-
597
-
598
- // Completely fill the background of the new image with allocated color.
599
- imagefill ($canvas, 0, 0, $color);
600
-
601
- // scale down and add borders
602
- if ($zoom_crop == 2) {
603
-
604
- $final_height = $height * ($new_width / $width);
605
-
606
- if ($final_height > $new_height) {
607
-
608
- $origin_x = $new_width / 2;
609
- $new_width = $width * ($new_height / $height);
610
- $origin_x = round ($origin_x - ($new_width / 2));
611
-
612
- } else {
613
-
614
- $origin_y = $new_height / 2;
615
- $new_height = $final_height;
616
- $origin_y = round ($origin_y - ($new_height / 2));
617
-
618
- }
619
-
620
- }
621
-
622
- // Restore transparency blending
623
- imagesavealpha ($canvas, true);
624
-
625
- if ($zoom_crop > 0) {
626
-
627
- $src_x = $src_y = 0;
628
- $src_w = $width;
629
- $src_h = $height;
630
-
631
- $cmp_x = $width / $new_width;
632
- $cmp_y = $height / $new_height;
633
-
634
- // calculate x or y coordinate and width or height of source
635
- if ($cmp_x > $cmp_y) {
636
-
637
- $src_w = round ($width / $cmp_x * $cmp_y);
638
- $src_x = round (($width - ($width / $cmp_x * $cmp_y)) / 2);
639
-
640
- } else if ($cmp_y > $cmp_x) {
641
-
642
- $src_h = round ($height / $cmp_y * $cmp_x);
643
- $src_y = round (($height - ($height / $cmp_y * $cmp_x)) / 2);
644
-
645
- }
646
-
647
- // positional cropping!
648
- if ($align) {
649
- if (strpos ($align, 't') !== false) {
650
- $src_y = 0;
651
- }
652
- if (strpos ($align, 'b') !== false) {
653
- $src_y = $height - $src_h;
654
- }
655
- if (strpos ($align, 'l') !== false) {
656
- $src_x = 0;
657
- }
658
- if (strpos ($align, 'r') !== false) {
659
- $src_x = $width - $src_w;
660
- }
661
- }
662
-
663
- imagecopyresampled ($canvas, $image, $origin_x, $origin_y, $src_x, $src_y, $new_width, $new_height, $src_w, $src_h);
664
-
665
- } else {
666
-
667
- // copy and resize part of an image with resampling
668
- imagecopyresampled ($canvas, $image, 0, 0, 0, 0, $new_width, $new_height, $width, $height);
669
-
670
- }
671
-
672
- if ($filters != '' && function_exists ('imagefilter') && defined ('IMG_FILTER_NEGATE')) {
673
- // apply filters to image
674
- $filterList = explode ('|', $filters);
675
- foreach ($filterList as $fl) {
676
-
677
- $filterSettings = explode (',', $fl);
678
- if (isset ($imageFilters[$filterSettings[0]])) {
679
-
680
- for ($i = 0; $i < 4; $i ++) {
681
- if (!isset ($filterSettings[$i])) {
682
- $filterSettings[$i] = null;
683
- } else {
684
- $filterSettings[$i] = (int) $filterSettings[$i];
685
- }
686
- }
687
-
688
- switch ($imageFilters[$filterSettings[0]][1]) {
689
-
690
- case 1:
691
-
692
- imagefilter ($canvas, $imageFilters[$filterSettings[0]][0], $filterSettings[1]);
693
- break;
694
-
695
- case 2:
696
-
697
- imagefilter ($canvas, $imageFilters[$filterSettings[0]][0], $filterSettings[1], $filterSettings[2]);
698
- break;
699
-
700
- case 3:
701
-
702
- imagefilter ($canvas, $imageFilters[$filterSettings[0]][0], $filterSettings[1], $filterSettings[2], $filterSettings[3]);
703
- break;
704
-
705
- case 4:
706
-
707
- imagefilter ($canvas, $imageFilters[$filterSettings[0]][0], $filterSettings[1], $filterSettings[2], $filterSettings[3], $filterSettings[4]);
708
- break;
709
-
710
- default:
711
-
712
- imagefilter ($canvas, $imageFilters[$filterSettings[0]][0]);
713
- break;
714
-
715
- }
716
- }
717
- }
718
- }
719
-
720
- // sharpen image
721
- if ($sharpen && function_exists ('imageconvolution')) {
722
-
723
- $sharpenMatrix = array (
724
- array (-1,-1,-1),
725
- array (-1,16,-1),
726
- array (-1,-1,-1),
727
- );
728
-
729
- $divisor = 8;
730
- $offset = 0;
731
-
732
- imageconvolution ($canvas, $sharpenMatrix, $divisor, $offset);
733
-
734
- }
735
- //Straight from Wordpress core code. Reduces filesize by up to 70% for PNG's
736
- if ( (IMAGETYPE_PNG == $origType || IMAGETYPE_GIF == $origType) && function_exists('imageistruecolor') && !imageistruecolor( $image ) && imagecolortransparent( $image ) > 0 ){
737
- imagetruecolortopalette( $canvas, false, imagecolorstotal( $image ) );
738
- }
739
-
740
- $imgType = "";
741
- $tempfile = tempnam($this->cacheDirectory, 'timthumb_tmpimg_');
742
- if(preg_match('/^image\/(?:jpg|jpeg)$/i', $mimeType)){
743
- $imgType = 'jpg';
744
- imagejpeg($canvas, $tempfile, $quality);
745
- } else if(preg_match('/^image\/png$/i', $mimeType)){
746
- $imgType = 'png';
747
- imagepng($canvas, $tempfile, floor($quality * 0.09));
748
- } else if(preg_match('/^image\/gif$/i', $mimeType)){
749
- $imgType = 'gif';
750
- imagegif($canvas, $tempfile);
751
- } else {
752
- return $this->sanityFail("Could not match mime type after verifying it previously.");
753
- }
754
-
755
- if($imgType == 'png' && OPTIPNG_ENABLED && OPTIPNG_PATH && @is_file(OPTIPNG_PATH)){
756
- $exec = OPTIPNG_PATH;
757
- $this->debug(3, "optipng'ing $tempfile");
758
- $presize = filesize($tempfile);
759
- $out = `$exec -o1 $tempfile`; //you can use up to -o7 but it really slows things down
760
- clearstatcache();
761
- $aftersize = filesize($tempfile);
762
- $sizeDrop = $presize - $aftersize;
763
- if($sizeDrop > 0){
764
- $this->debug(1, "optipng reduced size by $sizeDrop");
765
- } else if($sizeDrop < 0){
766
- $this->debug(1, "optipng increased size! Difference was: $sizeDrop");
767
- } else {
768
- $this->debug(1, "optipng did not change image size.");
769
- }
770
- } else if($imgType == 'png' && PNGCRUSH_ENABLED && PNGCRUSH_PATH && @is_file(PNGCRUSH_PATH)){
771
- $exec = PNGCRUSH_PATH;
772
- $tempfile2 = tempnam($this->cacheDirectory, 'timthumb_tmpimg_');
773
- $this->debug(3, "pngcrush'ing $tempfile to $tempfile2");
774
- $out = `$exec $tempfile $tempfile2`;
775
- $todel = "";
776
- if(is_file($tempfile2)){
777
- $sizeDrop = filesize($tempfile) - filesize($tempfile2);
778
- if($sizeDrop > 0){
779
- $this->debug(1, "pngcrush was succesful and gave a $sizeDrop byte size reduction");
780
- $todel = $tempfile;
781
- $tempfile = $tempfile2;
782
- } else {
783
- $this->debug(1, "pngcrush did not reduce file size. Difference was $sizeDrop bytes.");
784
- $todel = $tempfile2;
785
- }
786
- } else {
787
- $this->debug(3, "pngcrush failed with output: $out");
788
- $todel = $tempfile2;
789
- }
790
- @unlink($todel);
791
- }
792
-
793
- $this->debug(3, "Rewriting image with security header.");
794
- $tempfile4 = tempnam($this->cacheDirectory, 'timthumb_tmpimg_');
795
- $context = stream_context_create ();
796
- $fp = fopen($tempfile,'r',0,$context);
797
- file_put_contents($tempfile4, $this->filePrependSecurityBlock . $imgType . ' ?' . '>'); //6 extra bytes, first 3 being image type
798
- file_put_contents($tempfile4, $fp, FILE_APPEND);
799
- fclose($fp);
800
- @unlink($tempfile);
801
- $this->debug(3, "Locking and replacing cache file.");
802
- $lockFile = $this->cachefile . '.lock';
803
- $fh = fopen($lockFile, 'w');
804
- if(! $fh){
805
- return $this->error("Could not open the lockfile for writing an image.");
806
- }
807
- if(flock($fh, LOCK_EX)){
808
- @unlink($this->cachefile); //rename generally overwrites, but doing this in case of platform specific quirks. File might not exist yet.
809
- rename($tempfile4, $this->cachefile);
810
- flock($fh, LOCK_UN);
811
- fclose($fh);
812
- @unlink($lockFile);
813
- } else {
814
- fclose($fh);
815
- @unlink($lockFile);
816
- @unlink($tempfile4);
817
- return $this->error("Could not get a lock for writing.");
818
- }
819
- $this->debug(3, "Done image replace with security header. Cleaning up and running cleanCache()");
820
- imagedestroy($canvas);
821
- imagedestroy($image);
822
- return true;
823
- }
824
- protected function calcDocRoot(){
825
- $docRoot = @$_SERVER['DOCUMENT_ROOT'];
826
- if (defined('LOCAL_FILE_BASE_DIRECTORY')) {
827
- $docRoot = LOCAL_FILE_BASE_DIRECTORY;
828
- }
829
- if(!isset($docRoot)){
830
- $this->debug(3, "DOCUMENT_ROOT is not set. This is probably windows. Starting search 1.");
831
- if(isset($_SERVER['SCRIPT_FILENAME'])){
832
- $docRoot = str_replace( '\\', '/', substr($_SERVER['SCRIPT_FILENAME'], 0, 0-strlen($_SERVER['PHP_SELF'])));
833
- $this->debug(3, "Generated docRoot using SCRIPT_FILENAME and PHP_SELF as: $docRoot");
834
- }
835
- }
836
- if(!isset($docRoot)){
837
- $this->debug(3, "DOCUMENT_ROOT still is not set. Starting search 2.");
838
- if(isset($_SERVER['PATH_TRANSLATED'])){
839
- $docRoot = str_replace( '\\', '/', substr(str_replace('\\\\', '\\', $_SERVER['PATH_TRANSLATED']), 0, 0-strlen($_SERVER['PHP_SELF'])));
840
- $this->debug(3, "Generated docRoot using PATH_TRANSLATED and PHP_SELF as: $docRoot");
841
- }
842
- }
843
- if($docRoot && $_SERVER['DOCUMENT_ROOT'] != '/'){ $docRoot = preg_replace('/\/$/', '', $docRoot); }
844
- $this->debug(3, "Doc root is: " . $docRoot);
845
- $this->docRoot = $docRoot;
846
-
847
- }
848
- protected function getLocalImagePath($src){
849
- $src = ltrim($src, '/'); //strip off the leading '/'
850
- if(! $this->docRoot){
851
- $this->debug(3, "We have no document root set, so as a last resort, lets check if the image is in the current dir and serve that.");
852
- //We don't support serving images outside the current dir if we don't have a doc root for security reasons.
853
- $file = preg_replace('/^.*?([^\/\\\\]+)$/', '$1', $src); //strip off any path info and just leave the filename.
854
- if(is_file($file)){
855
- return $this->realpath($file);
856
- }
857
- return $this->error("Could not find your website document root and the file specified doesn't exist in timthumbs directory. We don't support serving files outside timthumb's directory without a document root for security reasons.");
858
- } //Do not go past this point without docRoot set
859
-
860
- //Try src under docRoot
861
- if(file_exists ($this->docRoot . '/' . $src)) {
862
- $this->debug(3, "Found file as " . $this->docRoot . '/' . $src);
863
- $real = $this->realpath($this->docRoot . '/' . $src);
864
- if(stripos($real, $this->docRoot) === 0){
865
- return $real;
866
- } else {
867
- $this->debug(1, "Security block: The file specified occurs outside the document root.");
868
- //allow search to continue
869
- }
870
- }
871
- //Check absolute paths and then verify the real path is under doc root
872
- $absolute = $this->realpath('/' . $src);
873
- if($absolute && file_exists($absolute)){ //realpath does file_exists check, so can probably skip the exists check here
874
- $this->debug(3, "Found absolute path: $absolute");
875
- if(! $this->docRoot){ $this->sanityFail("docRoot not set when checking absolute path."); }
876
- if(stripos($absolute, $this->docRoot) === 0){
877
- return $absolute;
878
- } else {
879
- $this->debug(1, "Security block: The file specified occurs outside the document root.");
880
- //and continue search
881
- }
882
- }
883
-
884
- $base = $this->docRoot;
885
-
886
- // account for Windows directory structure
887
- if (strstr($_SERVER['SCRIPT_FILENAME'],':')) {
888
- $sub_directories = explode('\\', str_replace($this->docRoot, '', $_SERVER['SCRIPT_FILENAME']));
889
- } else {
890
- $sub_directories = explode('/', str_replace($this->docRoot, '', $_SERVER['SCRIPT_FILENAME']));
891
- }
892
-
893
- foreach ($sub_directories as $sub){
894
- $base .= $sub . '/';
895
- $this->debug(3, "Trying file as: " . $base . $src);
896
- if(file_exists($base . $src)){
897
- $this->debug(3, "Found file as: " . $base . $src);
898
- $real = $this->realpath($base . $src);
899
- if(stripos($real, $this->realpath($this->docRoot)) === 0){
900
- return $real;
901
- } else {
902
- $this->debug(1, "Security block: The file specified occurs outside the document root.");
903
- //And continue search
904
- }
905
- }
906
- }
907
- return false;
908
- }
909
- protected function realpath($path){
910
- //try to remove any relative paths
911
- $remove_relatives = '/\w+\/\.\.\//';
912
- while(preg_match($remove_relatives,$path)){
913
- $path = preg_replace($remove_relatives, '', $path);
914
- }
915
- //if any remain use PHP realpath to strip them out, otherwise return $path
916
- //if using realpath, any symlinks will also be resolved
917
- return preg_match('#^\.\./|/\.\./#', $path) ? realpath($path) : $path;
918
- }
919
- protected function toDelete($name){
920
- $this->debug(3, "Scheduling file $name to delete on destruct.");
921
- $this->toDeletes[] = $name;
922
- }
923
- protected function serveWebshot(){
924
- $this->debug(3, "Starting serveWebshot");
925
- $instr = "Please follow the instructions at http://code.google.com/p/timthumb/ to set your server up for taking website screenshots.";
926
- if(! is_file(WEBSHOT_CUTYCAPT)){
927
- return $this->error("CutyCapt is not installed. $instr");
928
- }
929
- if(! is_file(WEBSHOT_XVFB)){
930
- return $this->Error("Xvfb is not installed. $instr");
931
- }
932
- $cuty = WEBSHOT_CUTYCAPT;
933
- $xv = WEBSHOT_XVFB;
934
- $screenX = WEBSHOT_SCREEN_X;
935
- $screenY = WEBSHOT_SCREEN_Y;
936
- $colDepth = WEBSHOT_COLOR_DEPTH;
937
- $format = WEBSHOT_IMAGE_FORMAT;
938
- $timeout = WEBSHOT_TIMEOUT * 1000;
939
- $ua = WEBSHOT_USER_AGENT;
940
- $jsOn = WEBSHOT_JAVASCRIPT_ON ? 'on' : 'off';
941
- $javaOn = WEBSHOT_JAVA_ON ? 'on' : 'off';
942
- $pluginsOn = WEBSHOT_PLUGINS_ON ? 'on' : 'off';
943
- $proxy = WEBSHOT_PROXY ? ' --http-proxy=' . WEBSHOT_PROXY : '';
944
- $tempfile = tempnam($this->cacheDirectory, 'timthumb_webshot');
945
- $url = $this->src;
946
- if(! preg_match('/^https?:\/\/[a-zA-Z0-9\.\-]+/i', $url)){
947
- return $this->error("Invalid URL supplied.");
948
- }
949
- $url = preg_replace('/[^A-Za-z0-9\-\.\_\~:\/\?\#\[\]\@\!\$\&\'\(\)\*\+\,\;\=]+/', '', $url); //RFC 3986
950
- //Very important we don't allow injection of shell commands here. URL is between quotes and we are only allowing through chars allowed by a the RFC
951
- // which AFAIKT can't be used for shell injection.
952
- if(WEBSHOT_XVFB_RUNNING){
953
- putenv('DISPLAY=:100.0');
954
- $command = "$cuty $proxy --max-wait=$timeout --user-agent=\"$ua\" --javascript=$jsOn --java=$javaOn --plugins=$pluginsOn --js-can-open-windows=off --url=\"$url\" --out-format=$format --out=$tempfile";
955
- } else {
956
- $command = "$xv --server-args=\"-screen 0, {$screenX}x{$screenY}x{$colDepth}\" $cuty $proxy --max-wait=$timeout --user-agent=\"$ua\" --javascript=$jsOn --java=$javaOn --plugins=$pluginsOn --js-can-open-windows=off --url=\"$url\" --out-format=$format --out=$tempfile";
957
- }
958
- $this->debug(3, "Executing command: $command");
959
- $out = `$command`;
960
- $this->debug(3, "Received output: $out");
961
- if(! is_file($tempfile)){
962
- $this->set404();
963
- return $this->error("The command to create a thumbnail failed.");
964
- }
965
- $this->cropTop = true;
966
- if($this->processImageAndWriteToCache($tempfile)){
967
- $this->debug(3, "Image processed succesfully. Serving from cache");
968
- return $this->serveCacheFile();
969
- } else {
970
- return false;
971
- }
972
- }
973
- protected function serveExternalImage(){
974
- if(! preg_match('/^https?:\/\/[a-zA-Z0-9\-\.]+/i', $this->src)){
975
- $this->error("Invalid URL supplied.");
976
- return false;
977
- }
978
- $tempfile = tempnam($this->cacheDirectory, 'timthumb');
979
- $this->debug(3, "Fetching external image into temporary file $tempfile");
980
- $this->toDelete($tempfile);
981
- #fetch file here
982
- if(! $this->getURL($this->src, $tempfile)){
983
- @unlink($this->cachefile);
984
- touch($this->cachefile);
985
- $this->debug(3, "Error fetching URL: " . $this->lastURLError);
986
- $this->error("Error reading the URL you specified from remote host." . $this->lastURLError);
987
- return false;
988
- }
989
-
990
- $mimeType = $this->getMimeType($tempfile);
991
- if(! preg_match("/^image\/(?:jpg|jpeg|gif|png)$/i", $mimeType)){
992
- $this->debug(3, "Remote file has invalid mime type: $mimeType");
993
- @unlink($this->cachefile);
994
- touch($this->cachefile);
995
- $this->error("The remote file is not a valid image. Mimetype = '" . $mimeType . "'" . $tempfile);
996
- return false;
997
- }
998
- if($this->processImageAndWriteToCache($tempfile)){
999
- $this->debug(3, "Image processed succesfully. Serving from cache");
1000
- return $this->serveCacheFile();
1001
- } else {
1002
- return false;
1003
- }
1004
- }
1005
- public static function curlWrite($h, $d){
1006
- fwrite(self::$curlFH, $d);
1007
- self::$curlDataWritten += strlen($d);
1008
- if(self::$curlDataWritten > MAX_FILE_SIZE){
1009
- return 0;
1010
- } else {
1011
- return strlen($d);
1012
- }
1013
- }
1014
- protected function serveCacheFile(){
1015
- $this->debug(3, "Serving {$this->cachefile}");
1016
- if(! is_file($this->cachefile)){
1017
- $this->error("serveCacheFile called in timthumb but we couldn't find the cached file.");
1018
- return false;
1019
- }
1020
- $fp = fopen($this->cachefile, 'rb');
1021
- if(! $fp){ return $this->error("Could not open cachefile."); }
1022
- fseek($fp, strlen($this->filePrependSecurityBlock), SEEK_SET);
1023
- $imgType = fread($fp, 3);
1024
- fseek($fp, 3, SEEK_CUR);
1025
- if(ftell($fp) != strlen($this->filePrependSecurityBlock) + 6){
1026
- @unlink($this->cachefile);
1027
- return $this->error("The cached image file seems to be corrupt.");
1028
- }
1029
- $imageDataSize = filesize($this->cachefile) - (strlen($this->filePrependSecurityBlock) + 6);
1030
- $this->sendImageHeaders($imgType, $imageDataSize);
1031
- $bytesSent = @fpassthru($fp);
1032
- fclose($fp);
1033
- if($bytesSent > 0){
1034
- return true;
1035
- }
1036
- $content = file_get_contents ($this->cachefile);
1037
- if ($content != FALSE) {
1038
- $content = substr($content, strlen($this->filePrependSecurityBlock) + 6);
1039
- echo $content;
1040
- $this->debug(3, "Served using file_get_contents and echo");
1041
- return true;
1042
- } else {
1043
- $this->error("Cache file could not be loaded.");
1044
- return false;
1045
- }
1046
- }
1047
- protected function sendImageHeaders($mimeType, $dataSize){
1048
- if(! preg_match('/^image\//i', $mimeType)){
1049
- $mimeType = 'image/' . $mimeType;
1050
- }
1051
- if(strtolower($mimeType) == 'image/jpg'){
1052
- $mimeType = 'image/jpeg';
1053
- }
1054
- $gmdate_expires = gmdate ('D, d M Y H:i:s', strtotime ('now +10 days')) . ' GMT';
1055
- $gmdate_modified = gmdate ('D, d M Y H:i:s') . ' GMT';
1056
- // send content headers then display image
1057
- header ('Content-Type: ' . $mimeType);
1058
- header ('Accept-Ranges: none'); //Changed this because we don't accept range requests
1059
- header ('Last-Modified: ' . $gmdate_modified);
1060
- header ('Content-Length: ' . $dataSize);
1061
- if(BROWSER_CACHE_DISABLE){
1062
- $this->debug(3, "Browser cache is disabled so setting non-caching headers.");
1063
- header('Cache-Control: no-store, no-cache, must-revalidate, max-age=0');
1064
- header("Pragma: no-cache");
1065
- header('Expires: ' . gmdate ('D, d M Y H:i:s', time()));
1066
- } else {
1067
- $this->debug(3, "Browser caching is enabled");
1068
- header('Cache-Control: max-age=' . BROWSER_CACHE_MAX_AGE . ', must-revalidate');
1069
- header('Expires: ' . $gmdate_expires);
1070
- }
1071
- return true;
1072
- }
1073
- protected function securityChecks(){
1074
- }
1075
- protected function param($property, $default = ''){
1076
- if (isset ($_GET[$property])) {
1077
- return $_GET[$property];
1078
- } else {
1079
- return $default;
1080
- }
1081
- }
1082
- protected function openImage($mimeType, $src){
1083
- switch ($mimeType) {
1084
- case 'image/jpeg':
1085
- $image = imagecreatefromjpeg ($src);
1086
- break;
1087
-
1088
- case 'image/png':
1089
- $image = imagecreatefrompng ($src);
1090
- imagealphablending( $image, true );
1091
- imagesavealpha( $image, true );
1092
- break;
1093
-
1094
- case 'image/gif':
1095
- $image = imagecreatefromgif ($src);
1096
- break;
1097
-
1098
- default:
1099
- $this->error("Unrecognised mimeType");
1100
- }
1101
-
1102
- return $image;
1103
- }
1104
- protected function getIP(){
1105
- $rem = @$_SERVER["REMOTE_ADDR"];
1106
- $ff = @$_SERVER["HTTP_X_FORWARDED_FOR"];
1107
- $ci = @$_SERVER["HTTP_CLIENT_IP"];
1108
- if(preg_match('/^(?:192\.168|172\.16|10\.|127\.)/', $rem)){
1109
- if($ff){ return $ff; }
1110
- if($ci){ return $ci; }
1111
- return $rem;
1112
- } else {
1113
- if($rem){ return $rem; }
1114
- if($ff){ return $ff; }
1115
- if($ci){ return $ci; }
1116
- return "UNKNOWN";
1117
- }
1118
- }
1119
- protected function debug($level, $msg){
1120
- if(DEBUG_ON && $level <= DEBUG_LEVEL){
1121
- $execTime = sprintf('%.6f', microtime(true) - $this->startTime);
1122
- $tick = sprintf('%.6f', 0);
1123
- if($this->lastBenchTime > 0){
1124
- $tick = sprintf('%.6f', microtime(true) - $this->lastBenchTime);
1125
- }
1126
- $this->lastBenchTime = microtime(true);
1127
- error_log("TimThumb Debug line " . __LINE__ . " [$execTime : $tick]: $msg");
1128
- }
1129
- }
1130
- protected function sanityFail($msg){
1131
- return $this->error("There is a problem in the timthumb code. Message: Please report this error at <a href='http://code.google.com/p/timthumb/issues/list'>timthumb's bug tracking page</a>: $msg");
1132
- }
1133
- protected function getMimeType($file){
1134
- $info = getimagesize($file);
1135
- if(is_array($info) && $info['mime']){
1136
- return $info['mime'];
1137
- }
1138
- return '';
1139
- }
1140
- protected function setMemoryLimit(){
1141
- $inimem = ini_get('memory_limit');
1142
- $inibytes = timthumb::returnBytes($inimem);
1143
- $ourbytes = timthumb::returnBytes(MEMORY_LIMIT);
1144
- if($inibytes < $ourbytes){
1145
- ini_set ('memory_limit', MEMORY_LIMIT);
1146
- $this->debug(3, "Increased memory from $inimem to " . MEMORY_LIMIT);
1147
- } else {
1148
- $this->debug(3, "Not adjusting memory size because the current setting is " . $inimem . " and our size of " . MEMORY_LIMIT . " is smaller.");
1149
- }
1150
- }
1151
- protected static function returnBytes($size_str){
1152
- switch (substr ($size_str, -1))
1153
- {
1154
- case 'M': case 'm': return (int)$size_str * 1048576;
1155
- case 'K': case 'k': return (int)$size_str * 1024;
1156
- case 'G': case 'g': return (int)$size_str * 1073741824;
1157
- default: return $size_str;
1158
- }
1159
- }
1160
-
1161
- protected function getURL($url, $tempfile){
1162
- $this->lastURLError = false;
1163
- $url = preg_replace('/ /', '%20', $url);
1164
- if(function_exists('curl_init')){
1165
- $this->debug(3, "Curl is installed so using it to fetch URL.");
1166
- self::$curlFH = fopen($tempfile, 'w');
1167
- if(! self::$curlFH){
1168
- $this->error("Could not open $tempfile for writing.");
1169
- return false;
1170
- }
1171
- self::$curlDataWritten = 0;
1172
- $this->debug(3, "Fetching url with curl: $url");
1173
- $curl = curl_init($url);
1174
- curl_setopt ($curl, CURLOPT_TIMEOUT, CURL_TIMEOUT);
1175
- curl_setopt ($curl, CURLOPT_USERAGENT, "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.742.122 Safari/534.30");
1176
- curl_setopt ($curl, CURLOPT_RETURNTRANSFER, TRUE);
1177
- curl_setopt ($curl, CURLOPT_HEADER, 0);
1178
- curl_setopt ($curl, CURLOPT_SSL_VERIFYPEER, FALSE);
1179
- curl_setopt ($curl, CURLOPT_WRITEFUNCTION, 'timthumb::curlWrite');
1180
- @curl_setopt ($curl, CURLOPT_FOLLOWLOCATION, true);
1181
- @curl_setopt ($curl, CURLOPT_MAXREDIRS, 10);
1182
-
1183
- $curlResult = curl_exec($curl);
1184
- fclose(self::$curlFH);
1185
- $httpStatus = curl_getinfo($curl, CURLINFO_HTTP_CODE);
1186
- if($httpStatus == 404){
1187
- $this->set404();
1188
- }
1189
- if($httpStatus == 302){
1190
- $this->error("External Image is Redirecting. Try alternate image url");
1191
- return false;
1192
- }
1193
- if($curlResult){
1194
- curl_close($curl);
1195
- return true;
1196
- } else {
1197
- $this->lastURLError = curl_error($curl);
1198
- curl_close($curl);
1199
- return false;
1200
- }
1201
- } else {
1202
- $img = @file_get_contents ($url);
1203
- if($img === false){
1204
- $err = error_get_last();
1205
- if(is_array($err) && $err['message']){
1206
- $this->lastURLError = $err['message'];
1207
- } else {
1208
- $this->lastURLError = $err;
1209
- }
1210
- if(preg_match('/404/', $this->lastURLError)){
1211
- $this->set404();
1212
- }
1213
-
1214
- return false;
1215
- }
1216
- if(! file_put_contents($tempfile, $img)){
1217
- $this->error("Could not write to $tempfile.");
1218
- return false;
1219
- }
1220
- return true;
1221
- }
1222
-
1223
- }
1224
- protected function serveImg($file){
1225
- $s = getimagesize($file);
1226
- if(! ($s && $s['mime'])){
1227
- return false;
1228
- }
1229
- header ('Content-Type: ' . $s['mime']);
1230
- header ('Content-Length: ' . filesize($file) );
1231
- header ('Cache-Control: no-store, no-cache, must-revalidate, max-age=0');
1232
- header ("Pragma: no-cache");
1233
- $bytes = @readfile($file);
1234
- if($bytes > 0){
1235
- return true;
1236
- }
1237
- $content = @file_get_contents ($file);
1238
- if ($content != FALSE){
1239
- echo $content;
1240
- return true;
1241
- }
1242
- return false;
1243
-
1244
- }
1245
- protected function set404(){
1246
- $this->is404 = true;
1247
- }
1248
- protected function is404(){
1249
- return $this->is404;
1250
- }
1251
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
readme.txt CHANGED
@@ -1,30 +1,38 @@
1
  === Gallery Bank ===
2
  Contributors: Gallery-Bank
3
- Tags: gallery, gallery images, album, foto, fotoalbum, website gallery, multiple pictures, pictures, photo, photoalbum, photogallery, photo gallery, lightbox, media,photo albums, picture, pictures, thumbnails, slideshow, admin, best gallery plugin, filterable gallery, filterable portfolio, gallery, gallery wordpress plugin, grid gallery, image album, images, page, photo albums, plugin, portfolio, portfolio wordpress plugin, Post, posts, widget, wordpress gallery plugin, wordpress portfolio plugin, videos
4
-
5
- Requires at least: 3.0
6
  Tested up to: 3.6
7
- Stable tag: 2.0.18
8
  License: GPLv3 or later
9
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
10
 
11
- Gallery Bank is an easy to use Responsive WordPress Gallery Plugin for photos galleries ,videos and albums.
12
 
13
  == Description ==
14
 
15
  Gallery Bank is the best WordPress plugin that allows you to create photo galleries with an ease in your WordPress websites.
 
 
16
  It has the ability to upload images, with options like adding, editing, re-order/sorting and deleting images in the Album.
 
17
  Gallery Bank is designed to adapt each portfolio to any situation and can be easily used on mobiles as it is a Responsive Plugin.
18
 
 
 
19
  <a href="http://gallery-bank.com/forum/support-forum/" target="_blank">Support Desk - feel free to ask your queries</a>
20
 
21
  <a href="http://gallery-bank.com/" target="_blank">Upgrade to Pro Version</a>
22
 
23
  <a href="https://www.facebook.com/GalleryBank/" target="_blank">Like & Support us on Facebook</a>
24
 
 
 
 
 
25
  = Key Features in Standard Version =
26
 
27
- * Now Supports Videos
28
  * Creates upto 2 Albums in your Gallery Bank
29
  * 10 Images could be uploaded to each Album.
30
  * Feature to set the cover for the album.
@@ -136,6 +144,12 @@ With this bulk deletion feature, you can now delete the pictures you want in bul
136
 
137
  == Changelog ==
138
 
 
 
 
 
 
 
139
  = 2.0.18 =
140
 
141
  * Few Bugs Fixed
1
  === Gallery Bank ===
2
  Contributors: Gallery-Bank
3
+ Tags: gallery, images, album, pictures, photos, photo album, photo gallery, media, photo albums, picture, pictures, thumbnails, slideshow, admin, best gallery plugin, filterable gallery, filterable portfolio, gallery, gallery wordpress plugin, grid gallery, image album, images, page, photo albums, plugin, portfolio, portfolio wordpress plugin, Post, Posts, widget, wordpress gallery plugin, wordpress portfolio plugin, videos, comments, best gallery plugin, easy gallery, widget, gallery bank
4
+ Requires at least: 3.3
 
5
  Tested up to: 3.6
6
+ Stable tag: 2.0.19
7
  License: GPLv3 or later
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
10
+ Gallery Bank is an easy to use Responsive WordPress Premium Gallery Plugin for galleries, videos and albums.
11
 
12
  == Description ==
13
 
14
  Gallery Bank is the best WordPress plugin that allows you to create photo galleries with an ease in your WordPress websites.
15
+
16
+
17
  It has the ability to upload images, with options like adding, editing, re-order/sorting and deleting images in the Album.
18
+
19
  Gallery Bank is designed to adapt each portfolio to any situation and can be easily used on mobiles as it is a Responsive Plugin.
20
 
21
+ **October 24, 2013: We're happy to announce that Gallery Bank reached 45,600+ plugin downloads in only 5 months. We frequently receive positive feedback from people using our gallery bank plugin for WordPress. Thanks so much for your support!**
22
+
23
  <a href="http://gallery-bank.com/forum/support-forum/" target="_blank">Support Desk - feel free to ask your queries</a>
24
 
25
  <a href="http://gallery-bank.com/" target="_blank">Upgrade to Pro Version</a>
26
 
27
  <a href="https://www.facebook.com/GalleryBank/" target="_blank">Like & Support us on Facebook</a>
28
 
29
+ **Highly Recommended Captcha Plugin Captcha Bank**
30
+
31
+ **It can be downloaded [here](http://wordpress.org/plugins/captcha-bank/) from the WordPress Repository**
32
+
33
  = Key Features in Standard Version =
34
 
35
+ * Gallery Bank now Supports Videos
36
  * Creates upto 2 Albums in your Gallery Bank
37
  * 10 Images could be uploaded to each Album.
38
  * Feature to set the cover for the album.
144
 
145
  == Changelog ==
146
 
147
+ = 2.0.19 =
148
+
149
+ * Few Bugs Fixed
150
+ * Introducing Jquery Masonry
151
+ * Removed Timbthumb
152
+
153
  = 2.0.18 =
154
 
155
  * Few Bugs Fixed
views/album_preview.php CHANGED
@@ -1,6 +1,6 @@
1
  <?php
2
  global $wpdb;
3
- $album_id = $_REQUEST["album_id"];
4
  $albums = $wpdb->get_var
5
  (
6
  $wpdb->prepare
@@ -9,7 +9,8 @@
9
  $album_id
10
  )
11
  );
12
-
 
13
  $pic_detail = $wpdb->get_results
14
  (
15
  $wpdb->prepare
@@ -82,29 +83,8 @@
82
  $litebox_bg_color_substring = str_replace("rgb","rgba",substr($lightbox_bg_color[1], 0, -1));
83
  $litebox_bg_color_with_opacity = $litebox_bg_color_substring. "," . $overlay_opacity[1] . ")";
84
  $lightbox_bg_color_value= $overlay_border_size_value[1] . " solid " . $overlay_border_color[1];
85
- $slideshow_settings = explode(";", $content[3]);
86
- $auto_play = explode(":", $slideshow_settings[0]);
87
- $pagination = explode(":", $content[4]);
88
- if($auto_play[1] == "1")
89
- {
90
- $autoplay = true;
91
-
92
- }
93
- else {
94
- $autoplay = false;
95
- }
96
-
97
- $slide_interval = explode(":", $slideshow_settings[1]);
98
 
99
- $pagination_settings = explode(";", $content[4]);
100
- $pagination = explode(":", $pagination_settings[0]);
101
-
102
- $count = 1;
103
- $pagename = 'temp';
104
- $fileName = GALLERY_BK_PLUGIN_DIR.'/lib/cache/'.$pagename.".txt";
105
-
106
  ?>
107
-
108
  <div class="block well" style="min-height:400px;">
109
  <div class="navbar">
110
  <div class="navbar-inner">
@@ -114,990 +94,242 @@
114
  <div class="body" style="margin:10px;">
115
  <a class="btn btn-inverse" href="admin.php?page=gallery_bank"><?php _e("Back to Album Overview", gallery_bank); ?></a>
116
  <div class="separator-doubled"></div>
117
- <div class="row-fluid">
118
- <div class="span12">
119
- <div class="block well">
120
- <div class="navbar">
121
- <div class="navbar-inner">
122
- <h5><?php echo stripcslashes(htmlspecialchars_decode($album->album_name));?></h5>
123
- </div>
124
- </div>
125
- <div id="view_bank_album_<?php echo $unique_id;?>">
126
- <div class="imgContainerSingle" style="margin:10px;">
127
-
128
- <?php
129
- if($pagination[1] == 1)
130
- {
131
- ?>
132
- <table class='table table-striped' id='images_view_data_table_<?php echo $unique_id;?>'>
133
- <?php
134
- }
135
- else {
136
- ?>
137
- <table style="width:100%;"><tr><td>
138
- <?php
139
- }
140
-
141
- $default_height = 151 + ($image_border_size_value[1] * 2) . "px;" . "border-radius:" . $image_radius_value[1]. ";-moz-border-radius:" . $image_radius_value[1]. ";-webkit-border-radius:" . $image_radius_value[1]. ";-khtml-border-radius:" . $image_radius_value[1]. ";-o-border-radius:" . $image_radius_value[1] . ";";
142
- $default_width = 155 + ($image_border_size_value[1] * 2) . "px;" ."border-radius:" . $image_radius_value[1]. ";-moz-border-radius:" . $image_radius_value[1]. ";-webkit-border-radius:" . $image_radius_value[1]. ";-khtml-border-radius:" . $image_radius_value[1]. ";-o-border-radius:" . $image_radius_value[1] . ";";
143
- $custom_height = $image_height[1] + 1 + ($image_border_size_value[1] * 2) . "px;" . "border-radius:" . $image_radius_value[1]. ";-moz-border-radius:" . $image_radius_value[1]. ";-webkit-border-radius:" . $image_radius_value[1]. ";-khtml-border-radius:" . $image_radius_value[1]. ";-o-border-radius:" . $image_radius_value[1] . ";";
144
- $custom_width = $image_width[1] + 5 + ($image_border_size_value[1] * 2) . "px;" . "border-radius:" . $image_radius_value[1]. ";-moz-border-radius:" . $image_radius_value[1]. ";-webkit-border-radius:" . $image_radius_value[1]. ";-khtml-border-radius:" . $image_radius_value[1]. ";-o-border-radius:" . $image_radius_value[1] . ";";
145
- $radius_for_shutter = "border-radius:" . $image_radius_value[1]. ";-moz-border-radius:" . $image_radius_value[1]. ";-webkit-border-radius:" . $image_radius_value[1]. ";-khtml-border-radius:" . $image_radius_value[1]. ";-o-border-radius:" . $image_radius_value[1];
146
-
147
- for ($flag = 0; $flag <count($pic_detail); $flag++)
148
- {
149
- if($pagination[1] == 1)
150
- {
151
- if($count == 1)
152
- {
153
-
154
- ?>
155
- <tr><td>
156
- <?php
157
- }
158
- }
159
- $css_image_thumbnail = "border:" . $image_border_size_value[1]. " solid " . $border_color[1] . ";border-radius:" . $image_radius_value[1]. ";-moz-border-radius:" . $image_radius_value[1]. ";-webkit-border-radius:" . $image_radius_value[1]. ";-khtml-border-radius:" . $image_radius_value[1]. ";-o-border-radius:" . $image_radius_value[1].";opacity:".$image_opacity[1].";filter:alpha(opacity=".$image_opacity[1] * 100 . ");-ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=".$image_opacity[1] * 100 . ")';-moz-opacity:" . $image_opacity[1] . ";-khtml-opacity:".$image_opacity[1]. ";";
160
- if($pic_detail[$flag]->description == "")
161
- {
162
- if(($flag % $images_in_row[1] == 0) && $flag != 0)
163
- {
164
- ?>
165
- </br>
166
  <?php
167
- if($image_content[1] == 1)
168
- {
169
- if($images_in_row[1] == 1)
170
- {
171
- ?>
172
- <div class="view da-thumbs" style="height:<?php echo $default_height; ?>;width:<?php echo $default_width; ?>;">
173
- <?php
174
- }
175
- else {
176
- ?>
177
- <div class="view da-thumbs" style="float:left;height:<?php echo $default_height; ?>;width:<?php echo $default_width; ?>;">
178
- <?php
179
- }
180
- }
181
- else
182
- {
183
- if($images_in_row[1] == 1)
184
- {
185
- ?>
186
- <div class="view da-thumbs" style="height:<?php echo $custom_height; ?>;width:<?php echo $custom_width; ?>;">
187
- <?php
188
-
189
- }
190
- else
191
- {
192
- ?>
193
- <div class="view da-thumbs" style="float:left;height:<?php echo $custom_height; ?>;width:<?php echo $custom_width; ?>;">
194
- <?php
195
- }
196
- }
197
-
198
- if($pic_detail[$flag]->check_url == 1)
199
- {
200
- if($image_content[1] == 1)
201
- {
202
-
203
- ?>
204
- <a href="<?php echo $pic_detail[$flag]->url;?>" target="_blank">
205
- <?php
206
- if(file_exists($fileName)!=false)
207
- {
208
- ?>
209
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h=150&w=150&zc=1&q=100';?>" style="margin-left:5px;;<?php echo $css_image_thumbnail; ?>" />
210
- <?php
211
- }
212
- else
213
- {
214
- ?>
215
- <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path );?>" style="margin-left:5px;width: 150px;height:155px;<?php echo $css_image_thumbnail; ?>" />
216
- <?php
217
- }
218
- ?>
219
-
220
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
221
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
222
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
223
- </p>
224
- <div class="forspan">
225
- <span class="zoom"></span>
226
- </div>
227
- </article>
228
- </a>
229
- </div>
230
- <?php
231
-
232
- }
233
- else
234
  {
235
-
236
- ?>
237
- <a href="<?php echo $pic_detail[$flag]->url;?>" target="_blank">
238
- <?php
239
- if(file_exists($fileName)!=false)
240
- {
241
- ?>
242
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin-left:5px;;<?php echo $css_image_thumbnail; ?>" />
243
- <?php
244
- }
245
- else
246
  {
247
  ?>
248
- <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path );?>" style="margin-left:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
249
- <?php
250
- }
251
- ?>
252
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
253
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
254
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
255
- </p>
256
- <div class="forspan">
257
- <span class="zoom">
258
- </span>
259
- </div>
260
- </article>
261
- </a>
262
- </div>
263
- <?php
264
- }
265
- }
266
- else
267
- {
268
- ?>
269
- <a class="titan-lb_<?php echo $unique_id;?>" data-titan-lightbox="on" data-titan-group="gallery" href="<?php echo stripcslashes($pic_detail[$flag]->pic_path); ?>" title="<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>">
270
- <?php
271
- if($image_content[1] == 1)
272
- {
273
- if(file_exists($fileName)!=false)
274
- {
275
- if($pic_detail[$flag]->video == 1)
276
- {
277
- ?>
278
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg')).'&h=150&w=150&zc=1&q=100';?>" style="margin-left:5px;;<?php echo $css_image_thumbnail; ?>" />
279
- <?php
280
- }
281
- else
282
- {
283
- ?>
284
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h=150&w=150&zc=1&q=100';?>" style="margin-left:5px;;<?php echo $css_image_thumbnail; ?>" />
285
- <?php
286
- }
287
 
288
- }
289
- else
290
- {
291
- if($pic_detail[$flag]->video == 1)
292
- {
293
- ?>
294
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg');?>" style="margin-left:5px;width: 150px;height:155px;<?php echo $css_image_thumbnail; ?>" />
295
- <?php
296
- }
297
- else
298
- {
299
- ?>
300
- <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path );?>" style="margin-left:5px;width: 150px;height:155px;<?php echo $css_image_thumbnail; ?>" />
301
  <?php
302
- }
303
-
304
- }
305
- ?>
306
-
307
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
308
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
309
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
310
- </p>
311
- <div class="forspan">
312
- <span class="zoom"></span>
313
- </div>
314
- </article>
315
- </a>
316
- </div>
317
- <?php
318
-
319
- }
320
- else
321
- {
322
- if(file_exists($fileName)!=false)
323
- {
324
- if($pic_detail[$flag]->video == 1)
325
  {
326
- ?>
327
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg')).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin-left:5px;;<?php echo $css_image_thumbnail; ?>" />
328
- <?php
 
 
 
 
 
 
 
329
  }
330
  else
331
  {
332
  ?>
333
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin-left:5px;;<?php echo $css_image_thumbnail; ?>" />
334
- <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
335
  }
336
-
337
  }
338
  else
339
  {
340
- if($pic_detail[$flag]->video == 1)
 
341
  {
342
- ?>
343
- <img src="<?php echo trim(stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg'));?>" style="margin-left:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
344
- <?php
 
 
 
 
 
 
 
345
  }
346
- else
347
- {
348
- ?>
349
- <img src="<?php echo trim(stripcslashes($pic_detail[$flag]->pic_path ));?>" style="margin-left:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
350
- <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
351
  }
352
-
353
  }
354
- ?>
355
-
356
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
357
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
358
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
359
- </p>
360
- <div class="forspan">
361
- <span class="zoom">
362
- </span>
363
- </div>
364
- </article>
365
- </a>
366
- </div>
367
- <?php
368
- }
369
- }
370
- }
371
- else
372
- {
373
-
374
- if($image_content[1] == 1)
375
- {
376
- if($images_in_row[1] == 1)
377
- {
378
- ?>
379
- <div class="view da-thumbs" style="height:<?php echo $default_height; ?>;width:<?php echo $default_width; ?>;">
380
- <?php
381
-
382
- }
383
- else {
384
-
385
-
386
- if((($flag + 1) % $images_in_row[1] == 0) && $flag != 0)
387
- {
388
- ?>
389
- <div class="view da-thumbs" style="height:<?php echo $default_height; ?>;width:<?php echo $default_width; ?>;">
390
- <?php
391
- }
392
- else
393
- {
394
- ?>
395
- <div class="view da-thumbs" style="float:left;height:<?php echo $default_height; ?>;width:<?php echo $default_width; ?>;">
396
- <?php
397
- }
398
-
399
- }
400
- }
401
- else
402
- {
403
- if($images_in_row[1] == 1)
404
- {
405
- ?>
406
- <div class="view da-thumbs" style="height:<?php echo $custom_height; ?>;width:<?php echo $custom_width; ?>;">
407
- <?php
408
-
409
- }
410
- else
411
- {
412
- if((($flag + 1) % $images_in_row[1] == 0) && $flag != 0)
413
- {
414
- ?>
415
- <div class="view da-thumbs" style="height:<?php echo $custom_height; ?>;width:<?php echo $custom_width; ?>;">
416
- <?php
417
  }
418
  else
419
  {
420
- ?>
421
- <div class="view da-thumbs" style="float:left;height:<?php echo $custom_height; ?>;width:<?php echo $custom_width; ?>;">
422
- <?php
423
-
424
- }
425
- }
426
- }
427
-
428
- if($pic_detail[$flag]->check_url == 1)
429
- {
430
- if($image_content[1] == 1)
431
- {
432
-
433
- ?>
434
- <a href="<?php echo $pic_detail[$flag]->url;?>" target="_blank">
435
- <?php
436
- if(file_exists($fileName)!=false)
437
- {
438
- ?>
439
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h=150&w=150&zc=1&q=100';?>" style="margin-left:5px;;<?php echo $css_image_thumbnail; ?>" />
440
- <?php
441
- }
442
- else
443
  {
444
  ?>
445
- <img src="<?php echo trim(stripcslashes($pic_detail[$flag]->pic_path ));?>" style="margin-left:5px;width:150px;height:155px;<?php echo $css_image_thumbnail; ?>" />
446
- <?php
447
- }
448
- ?>
449
 
450
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
451
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
452
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
453
- </p>
454
- <div class="forspan">
455
- <span class="zoom">
456
- </span>
457
- </div>
458
- </article>
459
- </a>
460
- </div>
461
- <?php
462
- }
463
- else
464
- {
465
-
466
- ?>
467
- <a href="<?php echo $pic_detail[$flag]->url;?>" target="_blank">
468
- <?php
469
- if(file_exists($fileName)!=false)
470
- {
471
- ?>
472
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin-left:5px;;<?php echo $css_image_thumbnail; ?>" />
473
- <?php
474
- }
475
- else
476
- {
477
- ?>
478
- <img src="<?php echo trim(stripcslashes($pic_detail[$flag]->pic_path ));?>" style="margin-left:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
479
  <?php
480
- }
481
- ?>
482
-
483
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
484
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
485
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
486
- </p>
487
- <div class="forspan">
488
- <span class="zoom">
489
-
490
- </span>
491
- </div>
492
- </article>
493
- </a>
494
- </div>
495
- <?php
496
-
497
- }
498
- }
499
- else
500
- {
501
- ?>
502
- <a class="titan-lb_<?php echo $unique_id;?>" data-titan-lightbox="on" data-titan-group="gallery" href="<?php echo $pic_detail[$flag]->pic_path; ?>" title="<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>">
503
- <?php
504
- if($image_content[1] == 1)
505
- {
506
- if(file_exists($fileName)!=false)
507
- {
508
- if($pic_detail[$flag]->video == 1)
509
- {
510
- ?>
511
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg')).'&h=150&w=150&zc=1&q=100';?>" style="margin-left:5px;;<?php echo $css_image_thumbnail; ?>" />
512
- <?php
513
- }
514
- else
515
- {
516
- ?>
517
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h=150&w=150&zc=1&q=100';?>" style="margin-left:5px;;<?php echo $css_image_thumbnail; ?>" />
518
- <?php
519
- }
520
 
521
- }
522
- else
523
- {
524
- if($pic_detail[$flag]->video == 1)
525
  {
526
- ?>
527
- <img src="<?php echo trim(stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg'));?>" style="margin-left:5px;width:150px;height:155px;<?php echo $css_image_thumbnail; ?>" />
528
- <?php
 
 
 
 
 
 
 
529
  }
530
- else
531
  {
532
- ?>
533
- <img src="<?php echo trim(stripcslashes($pic_detail[$flag]->pic_path ));?>" style="margin-left:5px;width:150px;height:155px;<?php echo $css_image_thumbnail; ?>" />
534
- <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
535
  }
536
-
537
  }
538
- ?>
539
-
540
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
541
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
542
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
543
- </p>
544
- <div class="forspan">
545
- <span class="zoom">
546
- </span>
547
- </div>
548
- </article>
549
- </a>
550
- </div>
551
- <?php
552
- }
553
- else
554
- {
555
-
556
- if(file_exists($fileName)!=false)
557
  {
558
- if($pic_detail[$flag]->video == 1)
559
- {
560
- ?>
561
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg')).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin-left:5px;;<?php echo $css_image_thumbnail; ?>" />
562
- <?php
563
- }
564
- else
565
- {
566
- ?>
567
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin-left:5px;;<?php echo $css_image_thumbnail; ?>" />
568
- <?php
569
- }
570
 
571
- }
572
- else
573
- {
574
- if($pic_detail[$flag]->video == 1)
575
  {
576
- ?>
577
- <img src="<?php echo trim(stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg' ));?>" style="margin-left:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
578
- <?php
 
 
 
 
 
 
 
579
  }
580
  else
581
  {
582
- ?>
583
- <img src="<?php echo trim(stripcslashes($pic_detail[$flag]->pic_path ));?>" style="margin-left:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
584
- <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
585
  }
586
-
587
- }
588
- ?>
589
-
590
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
591
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
592
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
593
- </p>
594
- <div class="forspan">
595
- <span class="zoom">
596
-
597
- </span>
598
- </div>
599
- </article>
600
- </a>
601
- </div>
602
- <?php
603
-
604
- }
605
- }
606
- }
607
- }
608
- else
609
- {
610
- if(($flag % $images_in_row[1] == 0) && $flag != 0)
611
- {
612
- ?>
613
- </br>
614
- <?php
615
- if($image_content[1] == 1)
616
- {
617
- if($images_in_row[1] == 1)
618
- {
619
- ?>
620
- <div class="view da-thumbs" style="height:<?php echo $default_height; ?>;width:<?php echo $default_width; ?>;">
621
- <?php
622
-
623
- }
624
- else {
625
- ?>
626
- <div class="view da-thumbs" style="float:left;height:<?php echo $default_height; ?>;width:<?php echo $default_width; ?>;">
627
- <?php
628
- }
629
- }
630
- else
631
- {
632
- if($images_in_row[1] == 1)
633
- {
634
- ?>
635
- <div class="view da-thumbs" style="height:<?php echo $custom_height; ?>;width:<?php echo $custom_width; ?>;">
636
- <?php
637
-
638
- }
639
- else {
640
- ?>
641
- <div class="view da-thumbs" style="float:left;height:<?php echo $custom_height; ?>;width:<?php echo $custom_width; ?>;">
642
- <?php
643
- }
644
- }
645
-
646
- if($pic_detail[$flag]->check_url == 1)
647
- {
648
- if($image_content[1] == 1)
649
- {
650
-
651
- ?>
652
- <a href="<?php echo $pic_detail[$flag]->url;?>" target="_blank">
653
- <?php
654
- if(file_exists($fileName)!=false)
655
- {
656
- ?>
657
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h=150&w=150&zc=1&q=100';?>" style="margin-left:5px;;<?php echo $css_image_thumbnail; ?>" />
658
- <?php
659
- }
660
- else
661
- {
662
- ?>
663
- <img src="<?php echo trim(stripcslashes($pic_detail[$flag]->pic_path ));?>" style="margin-left:5px;width:150px;height:155px;<?php echo $css_image_thumbnail; ?>" />
664
- <?php
665
- }
666
- ?>
667
-
668
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
669
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
670
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
671
- </p>
672
- <div class="forspan">
673
- <span class="zoom">
674
- </span>
675
- </div>
676
- </article>
677
- </a>
678
- </div>
679
- <?php
680
-
681
- }
682
- else
683
- {
684
-
685
- ?>
686
- <a href="<?php echo $pic_detail[$flag]->url;?>" target="_blank">
687
- <?php
688
- if(file_exists($fileName)!=false)
689
- {
690
- ?>
691
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin-left:5px;;<?php echo $css_image_thumbnail; ?>" />
692
- <?php
693
- }
694
- else
695
- {
696
- ?>
697
- <img src="<?php echo trim(stripcslashes($pic_detail[$flag]->pic_path ));?>" style="margin-left:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
698
- <?php
699
- }
700
- ?>
701
-
702
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
703
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
704
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
705
- </p>
706
- <div class="forspan">
707
- <span class="zoom">
708
- </span>
709
- </div>
710
- </article>
711
- </a>
712
- </div>
713
- <?php
714
-
715
- }
716
- }
717
- else
718
- {
719
- if($pic_detail[$flag]->description == "")
720
- {
721
- ?>
722
- <a class="titan-lb_<?php echo $unique_id;?>" data-titan-lightbox="on" data-titan-group="gallery" href="<?php echo stripcslashes($pic_detail[$flag]->pic_path); ?>" title="<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>">
723
- <?php
724
- }
725
- else
726
- {
727
- ?>
728
- <a class="titan-lb_<?php echo $unique_id;?>" data-titan-lightbox="on" data-titan-group="gallery" href="<?php echo stripcslashes($pic_detail[$flag]->pic_path); ?>" title="<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?> (<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->description)); ?>)">
729
- <?php
730
- }
731
-
732
- if($image_content[1] == 1)
733
- {
734
-
735
-
736
- if(file_exists($fileName)!=false)
737
- {
738
- ?>
739
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h=150&w=150&zc=1&q=100';?>" style="margin-left:5px;;<?php echo $css_image_thumbnail; ?>" />
740
- <?php
741
- }
742
- else
743
- {
744
- ?>
745
- <img src="<?php echo trim(stripcslashes($pic_detail[$flag]->pic_path ));?>" style="margin-left:5px;width:150px;height:155px;<?php echo $css_image_thumbnail; ?>" />
746
- <?php
747
- }
748
- ?>
749
-
750
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
751
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
752
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
753
- </p>
754
- <div class="forspan">
755
- <span class="zoom">
756
- </span>
757
- </div>
758
- </article>
759
- </a>
760
- </div>
761
- <?php
762
-
763
- }
764
- else
765
- {
766
-
767
- if(file_exists($fileName)!=false)
768
- {
769
- ?>
770
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin-left:5px;;<?php echo $css_image_thumbnail; ?>" />
771
- <?php
772
- }
773
- else
774
- {
775
- ?>
776
- <img src="<?php echo trim(stripcslashes($pic_detail[$flag]->pic_path ));?>" style="margin-left:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
777
- <?php
778
  }
779
- ?>
780
-
781
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
782
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
783
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
784
- </p>
785
- <div class="forspan">
786
- <span class="zoom">
787
- </span>
788
- </div>
789
- </article>
790
- </a>
791
- </div>
792
- <?php
793
-
794
- }
795
- }
796
- }
797
- else
798
- {
799
- if($image_content[1] == 1)
800
- {
801
- if($images_in_row[1] == 1)
802
- {
803
- ?>
804
- <div class="view da-thumbs" style="height:<?php echo $default_height; ?>;width:<?php echo $default_width; ?>;">
805
- <?php
806
-
807
- }
808
- else {
809
-
810
-
811
- if((($flag + 1) % $images_in_row[1] == 0) && $flag != 0)
812
- {
813
- ?>
814
- <div class="view da-thumbs" style="height:<?php echo $default_height; ?>;width:<?php echo $default_width; ?>;">
815
- <?php
816
- }
817
- else
818
- {
819
- ?>
820
- <div class="view da-thumbs" style="float:left;height:<?php echo $default_height; ?>;width:<?php echo $default_width; ?>;">
821
- <?php
822
  }
823
-
824
  }
825
- }
826
- else
827
- {
828
- if($images_in_row[1] == 1)
829
- {
830
- ?>
831
- <div class="view da-thumbs" style="height:<?php echo $custom_height; ?>;width:<?php echo $custom_width; ?>;">
832
- <?php
833
-
834
- }
835
- else
836
- {
837
- if((($flag + 1) % $images_in_row[1] == 0) && $flag != 0)
838
- {
839
- ?>
840
- <div class="view da-thumbs" style="height:<?php echo $custom_height; ?>;width:<?php echo $custom_width; ?>;">
841
- <?php
842
- }
843
- else
844
- {
845
- ?>
846
- <div class="view da-thumbs" style="float:left;height:<?php echo $custom_height; ?>;width:<?php echo $custom_width; ?>;">
847
- <?php
848
-
849
- }
850
- }
851
- }
852
-
853
- if($pic_detail[$flag]->check_url == 1)
854
- {
855
- if($image_content[1] == 1)
856
- {
857
-
858
- ?>
859
- <a href="<?php echo $pic_detail[$flag]->url;?>" target="_blank">
860
- <?php
861
- if(file_exists($fileName)!=false)
862
- {
863
- ?>
864
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h=150&w=150&zc=1&q=100';?>" style="margin-left:5px;;<?php echo $css_image_thumbnail; ?>" />
865
- <?php
866
- }
867
- else
868
- {
869
- ?>
870
- <img src="<?php echo trim(stripcslashes($pic_detail[$flag]->pic_path ));?>" style="margin-left:5px;width:150px;height:155px;<?php echo $css_image_thumbnail; ?>" />
871
- <?php
872
- }
873
- ?>
874
-
875
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
876
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
877
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
878
- </p>
879
- <div class="forspan">
880
- <span class="zoom">
881
- </span>
882
- </div>
883
- </article>
884
- </a>
885
- </div>
886
- <?php
887
-
888
- }
889
- else
890
- {
891
-
892
- ?>
893
- <a href="<?php echo $pic_detail[$flag]->url;?>" target="_blank">
894
- <?php
895
- if(file_exists($fileName)!=false)
896
- {
897
- ?>
898
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin-left:5px;;<?php echo $css_image_thumbnail; ?>" />
899
- <?php
900
- }
901
- else
902
- {
903
- ?>
904
- <img src="<?php echo trim(stripcslashes($pic_detail[$flag]->pic_path ));?>" style="margin-left:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
905
- <?php
906
- }
907
- ?>
908
-
909
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
910
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
911
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
912
- </p>
913
- <div class="forspan">
914
- <span class="zoom">
915
- </span>
916
- </div>
917
- </article>
918
- </a>
919
- </div>
920
- <?php
921
-
922
- }
923
- }
924
- else
925
- {
926
- if($pic_detail[$flag]->description == "")
927
- {
928
- ?>
929
- <a class="titan-lb_<?php echo $unique_id;?>" data-titan-lightbox="on" data-titan-group="gallery" href="<?php echo stripcslashes($pic_detail[$flag]->pic_path); ?>" title="<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>">
930
- <?php
931
- }
932
- else
933
- {
934
- ?>
935
- <a class="titan-lb_<?php echo $unique_id;?>" data-titan-lightbox="on" data-titan-group="gallery" href="<?php echo stripcslashes($pic_detail[$flag]->pic_path); ?>" title="<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?> (<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->description)); ?>)">
936
- <?php
937
- }
938
- if($image_content[1] == 1)
939
- {
940
-
941
-
942
- if(file_exists($fileName)!=false)
943
- {
944
- ?>
945
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h=150&w=150&zc=1&q=100';?>" style="margin-left:5px;;<?php echo $css_image_thumbnail; ?>" />
946
- <?php
947
- }
948
- else
949
- {
950
- ?>
951
- <img src="<?php echo trim(stripcslashes($pic_detail[$flag]->pic_path ));?>" style="margin-left:5px;width:150px;height:155px;<?php echo $css_image_thumbnail; ?>" />
952
- <?php
953
- }
954
- ?>
955
-
956
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
957
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
958
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
959
- </p>
960
- <div class="forspan">
961
- <span class="zoom">
962
- </span>
963
- </div>
964
- </article>
965
- </a>
966
- </div>
967
- <?php
968
-
969
- }
970
- else
971
- {
972
-
973
- if(file_exists($fileName)!=false)
974
- {
975
- ?>
976
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin-left:5px;;<?php echo $css_image_thumbnail; ?>" />
977
- <?php
978
- }
979
- else
980
- {
981
- ?>
982
- <img src="<?php echo trim(stripcslashes($pic_detail[$flag]->pic_path ));?>" style="margin-left:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
983
- <?php
984
- }
985
- ?>
986
-
987
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
988
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
989
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
990
- </p>
991
- <div class="forspan">
992
- <span class="zoom">
993
- </span>
994
- </div>
995
- </article>
996
- </a>
997
- </div>
998
- <?php
999
-
1000
- }
1001
- }
1002
- }
1003
- }
1004
- if($pagination[1] == 1)
1005
- {
1006
- if($count == $images_in_row[1])
1007
- {
1008
- ?>
1009
- </td></tr>
1010
- <?php
1011
- $count = 1;
1012
- }
1013
- else
1014
- {
1015
- $count++;
1016
- }
1017
- }
1018
- }
1019
- if($pagination[1] == 1)
1020
- {
1021
-
1022
- ?>
1023
- </table>
1024
- <?php
1025
- }
1026
- else {
1027
- ?>
1028
- </td></tr></table>
1029
- <?php
1030
- }
1031
- ?>
1032
- </div>
1033
- </div>
1034
- </div>
1035
- </div>
1036
  </div>
1037
  </div>
1038
- </div>
1039
- <script type="text/javascript">
1040
- <?php
1041
- if($slide_interval[1] == 0)
1042
- {
1043
- $interval = 10000 * 1000 ;
1044
- }
1045
- else
1046
- {
1047
- $interval = $slide_interval[1] * 1000;
1048
- }
1049
- ?>
1050
-
1051
- jQuery(document).ready(function() {
1052
- jQuery('.titan-lb_<?php echo $unique_id;?>').lightbox({
1053
- //interval : "<php echo $interval; ?>",
1054
- //autoPlay: "<php echo $autoplay; ?>",
1055
- beforeShow: function(){
1056
- jQuery(".lightbox-skin").css("background","<?php echo $lightbox_inline_bg_color[1]; ?>");
1057
- jQuery(".lightbox-overlay").css("background","<?php echo $litebox_bg_color_with_opacity; ?>");
1058
- jQuery(".lightbox-wrap").css("border-radius","<?php echo $overlay_border_radius[1]; ?>");
1059
- jQuery(".lightbox-wrap").css("-moz-border-radius","<?php echo $overlay_border_radius[1]; ?>");
1060
- jQuery(".lightbox-wrap").css("-webkit-border-radius","<?php echo $overlay_border_radius[1]; ?>");
1061
- jQuery(".lightbox-wrap").css("-khtml-border-radius","<?php echo $overlay_border_radius[1]; ?>");
1062
- jQuery(".lightbox-wrap").css("-o-border-radius","<?php echo $overlay_border_radius[1]; ?>");
1063
- jQuery(".lightbox-wrap").css("border","<?php echo $lightbox_bg_color_value;?>");
1064
- },
1065
- afterShow : function()
1066
- {
1067
- jQuery(".lightbox-title").css("color","<?php echo $lightbox_text_color[1]; ?>");
1068
- }
1069
- });
1070
-
1071
  });
1072
- jQuery(document).ready(function(){
1073
- oTable = jQuery('#images_view_data_table_<?php echo $unique_id;?>').dataTable
1074
- ({
1075
- "bJQueryUI": false,
1076
- "bAutoWidth": true,
1077
- "sPaginationType": "full_numbers",
1078
- "sDom": '<"datatable-header"fl>t<"datatable-footer"ip>',
1079
- "oLanguage":
1080
- {
1081
- "sLengthMenu": "_MENU_"
1082
- },
1083
- "aaSorting": [[ 0, "desc" ]],
1084
- "aoColumnDefs": [{ "bSortable": false, "aTargets": [0] },{ "bSortable": false, "aTargets": [0] }],
1085
- "bSort": false
1086
  });
1087
- });
1088
- // var $container_<?php echo $unique_id;?> = jQuery('#view_bank_album_<?php echo $unique_id;?>');
1089
- // $container_<?php echo $unique_id;?>.imagesLoaded( function(){
1090
- // $container_<?php echo $unique_id;?>.masonry({
1091
- // itemSelector : '.imgContainerSingle',
1092
- // isAnimated: true,
1093
- // animationOptions: {
1094
- // duration: 750,
1095
- // easing: 'linear',
1096
- // queue: false
1097
- // }
1098
- // });
1099
- //
1100
- // });
1101
- </script>
1102
-
1103
-
1
  <?php
2
  global $wpdb;
3
+ $album_id = $_REQUEST['album_id'];
4
  $albums = $wpdb->get_var
5
  (
6
  $wpdb->prepare
9
  $album_id
10
  )
11
  );
12
+ if($albums > 0)
13
+ {
14
  $pic_detail = $wpdb->get_results
15
  (
16
  $wpdb->prepare
83
  $litebox_bg_color_substring = str_replace("rgb","rgba",substr($lightbox_bg_color[1], 0, -1));
84
  $litebox_bg_color_with_opacity = $litebox_bg_color_substring. "," . $overlay_opacity[1] . ")";
85
  $lightbox_bg_color_value= $overlay_border_size_value[1] . " solid " . $overlay_border_color[1];
 
 
 
 
 
 
 
 
 
 
 
 
 
86
 
 
 
 
 
 
 
 
87
  ?>
 
88
  <div class="block well" style="min-height:400px;">
89
  <div class="navbar">
90
  <div class="navbar-inner">
94
  <div class="body" style="margin:10px;">
95
  <a class="btn btn-inverse" href="admin.php?page=gallery_bank"><?php _e("Back to Album Overview", gallery_bank); ?></a>
96
  <div class="separator-doubled"></div>
97
+ <div class="row-fluid">
98
+ <div class="span12">
99
+ <div class="block well">
100
+ <div class="navbar">
101
+ <div class="navbar-inner">
102
+ <h5><?php echo stripcslashes(htmlspecialchars_decode($album->album_name));?></h5>
103
+ </div>
104
+ </div>
105
+ <div id="view_bank_album_<?php echo $unique_id;?>">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
106
  <?php
107
+ for ($flag = 0; $flag <count($pic_detail); $flag++)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
108
  {
109
+ $css_image_thumbnail = "border:" . $image_border_size_value[1]. " solid " . $border_color[1] . ";border-radius:" . $image_radius_value[1]. ";-moz-border-radius:" . $image_radius_value[1]. ";-webkit-border-radius:" . $image_radius_value[1]. ";-khtml-border-radius:" . $image_radius_value[1]. ";-o-border-radius:" . $image_radius_value[1].";opacity:".$image_opacity[1].";filter:alpha(opacity=".$image_opacity[1] * 100 . ");-ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=".$image_opacity[1] * 100 . ")';-moz-opacity:" . $image_opacity[1] . ";-khtml-opacity:".$image_opacity[1]. ";";
110
+ if($pic_detail[$flag]->description == "")
111
+ {
112
+ if(($flag % $images_in_row[1] == 0) && $flag != 0)
 
 
 
 
 
 
 
113
  {
114
  ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
115
 
 
 
 
 
 
 
 
 
 
 
 
 
 
116
  <?php
117
+ if($pic_detail[$flag]->check_url == 1)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
118
  {
119
+ if($image_content[1] == 1)
120
+ {
121
+ ?>
122
+ <div class="imgContainerSingle">
123
+ <a href="<?php echo $pic_detail[$flag]->url;?>" target="_blank">
124
+ <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:146px;<?php echo $css_image_thumbnail; ?>" />
125
+ </a>
126
+ </div>
127
+ <?php
128
+ }
129
  }
130
  else
131
  {
132
  ?>
133
+ <div class="imgContainerSingle">
134
+ <a class="titan-lb_<?php echo $unique_id;?>" data-titan-lightbox="on" data-titan-group="gallery" href="<?php echo stripcslashes($pic_detail[$flag]->pic_path); ?>" title="<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>">
135
+ <?php
136
+ if($image_content[1] == 1)
137
+ {
138
+ if($pic_detail[$flag]->video == 1)
139
+ {
140
+ ?>
141
+ <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg');?>" style="margin-left:5px;width:146px;<?php echo $css_image_thumbnail; ?>" />
142
+ <?php
143
+ }
144
+ else
145
+ {
146
+ ?>
147
+ <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:146px;<?php echo $css_image_thumbnail; ?>" />
148
+ <?php
149
+ }
150
+ ?>
151
+ </a>
152
+ </div>
153
+ <?php
154
+ }
155
  }
 
156
  }
157
  else
158
  {
159
+
160
+ if($pic_detail[$flag]->check_url == 1)
161
  {
162
+ if($image_content[1] == 1)
163
+ {
164
+ ?>
165
+ <div class="imgContainerSingle">
166
+ <a href="<?php echo $pic_detail[$flag]->url;?>" target="_blank">
167
+ <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:146px;<?php echo $css_image_thumbnail; ?>" />
168
+ </a>
169
+ </div>
170
+ <?php
171
+ }
172
  }
173
+ else
174
+ {
175
+ ?>
176
+ <div class="imgContainerSingle">
177
+ <a class="titan-lb_<?php echo $unique_id;?>" data-titan-lightbox="on" data-titan-group="gallery" href="<?php echo $pic_detail[$flag]->pic_path; ?>" title="<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>">
178
+ <?php
179
+ if($image_content[1] == 1)
180
+ {
181
+ if($pic_detail[$flag]->video == 1)
182
+ {
183
+ ?>
184
+ <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg');?>" style="margin-left:5px;width:146px;<?php echo $css_image_thumbnail; ?>" />
185
+ <?php
186
+ }
187
+ else
188
+ {
189
+ ?>
190
+ <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:146px;<?php echo $css_image_thumbnail; ?>" />
191
+ <?php
192
+ }
193
+ ?>
194
+ </a>
195
+ </div>
196
+ <?php
197
+ }
198
  }
 
199
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
200
  }
201
  else
202
  {
203
+ if(($flag % $images_in_row[1] == 0) && $flag != 0)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
204
  {
205
  ?>
 
 
 
 
206
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
207
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
208
 
209
+ if($pic_detail[$flag]->check_url == 1)
 
 
 
210
  {
211
+ if($image_content[1] == 1)
212
+ {
213
+ ?>
214
+ <div class="imgContainerSingle">
215
+ <a href="<?php echo $pic_detail[$flag]->url;?>" target="_blank">
216
+ <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:146px;<?php echo $css_image_thumbnail; ?>" />
217
+ </a>
218
+ </div>
219
+ <?php
220
+ }
221
  }
222
+ else
223
  {
224
+ if($pic_detail[$flag]->description == "")
225
+ {
226
+ ?>
227
+ <div class="imgContainerSingle">
228
+ <a class="titan-lb_<?php echo $unique_id;?>" data-titan-lightbox="on" data-titan-group="gallery" href="<?php echo stripcslashes($pic_detail[$flag]->pic_path); ?>" title="<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>">
229
+ <?php
230
+ }
231
+ else
232
+ {
233
+ ?>
234
+ <div class="imgContainerSingle">
235
+ <a class="titan-lb_<?php echo $unique_id;?>" data-titan-lightbox="on" data-titan-group="gallery" href="<?php echo stripcslashes($pic_detail[$flag]->pic_path); ?>" title="<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?> (<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->description)); ?>)">
236
+ <?php
237
+ }
238
+ if($image_content[1] == 1)
239
+ {
240
+ ?>
241
+ <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:146px;<?php echo $css_image_thumbnail; ?>" />
242
+ </a>
243
+ </div>
244
+ <?php
245
+ }
246
  }
 
247
  }
248
+ else
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
249
  {
 
 
 
 
 
 
 
 
 
 
 
 
250
 
251
+ if($pic_detail[$flag]->check_url == 1)
 
 
 
252
  {
253
+ if($image_content[1] == 1)
254
+ {
255
+ ?>
256
+ <div class="imgContainerSingle">
257
+ <a href="<?php echo $pic_detail[$flag]->url;?>" target="_blank">
258
+ <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:146px;<?php echo $css_image_thumbnail; ?>" />
259
+ </a>
260
+ </div>
261
+ <?php
262
+ }
263
  }
264
  else
265
  {
266
+ if($pic_detail[$flag]->description == "")
267
+ {
268
+ ?>
269
+ <div class="imgContainerSingle">
270
+ <a class="titan-lb_<?php echo $unique_id;?>" data-titan-lightbox="on" data-titan-group="gallery" href="<?php echo stripcslashes($pic_detail[$flag]->pic_path); ?>" title="<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>">
271
+ <?php
272
+ }
273
+ else
274
+ {
275
+ ?>
276
+ <div class="imgContainerSingle">
277
+ <a class="titan-lb_<?php echo $unique_id;?>" data-titan-lightbox="on" data-titan-group="gallery" href="<?php echo stripcslashes($pic_detail[$flag]->pic_path); ?>" title="<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?> (<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->description)); ?>)">
278
+ <?php
279
+ }
280
+ if($image_content[1] == 1)
281
+ {
282
+ ?>
283
+ <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:146px;<?php echo $css_image_thumbnail; ?>" />
284
+ </a>
285
+ </div>
286
+ <?php
287
+ }
288
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
289
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
290
  }
 
291
  }
292
+ ?>
293
+ </div>
294
+ </div>
295
+ </div>
296
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
297
  </div>
298
  </div>
299
+ <script type="text/javascript">
300
+ jQuery(document).ready(function() {
301
+ jQuery('.titan-lb_<?php echo $unique_id;?>').lightbox({
302
+ beforeShow: function(){
303
+ jQuery(".lightbox-skin").css("background","<?php echo $lightbox_inline_bg_color[1]; ?>");
304
+ jQuery(".lightbox-overlay").css("background","<?php echo $litebox_bg_color_with_opacity; ?>");
305
+ jQuery(".lightbox-wrap").css("border-radius","<?php echo $overlay_border_radius[1]; ?>");
306
+ jQuery(".lightbox-wrap").css("-moz-border-radius","<?php echo $overlay_border_radius[1]; ?>");
307
+ jQuery(".lightbox-wrap").css("-webkit-border-radius","<?php echo $overlay_border_radius[1]; ?>");
308
+ jQuery(".lightbox-wrap").css("-khtml-border-radius","<?php echo $overlay_border_radius[1]; ?>");
309
+ jQuery(".lightbox-wrap").css("-o-border-radius","<?php echo $overlay_border_radius[1]; ?>");
310
+ jQuery(".lightbox-wrap").css("border","<?php echo $lightbox_bg_color_value;?>");
311
+ },
312
+ afterShow : function()
313
+ {
314
+ jQuery(".lightbox-title").css("color","<?php echo $lightbox_text_color[1]; ?>");
315
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
316
  });
317
+ });
318
+ var $container_<?php echo $unique_id;?> = jQuery('#view_bank_album_<?php echo $unique_id;?>');
319
+ $container_<?php echo $unique_id;?>.imagesLoaded( function(){
320
+ $container_<?php echo $unique_id;?>.masonry({
321
+
322
+ itemSelector : '.imgContainerSingle',
323
+ isAnimated: true,
324
+ animationOptions: {
325
+ duration: 750,
326
+ easing: 'linear',
327
+ queue: false
328
+ }
329
+ });
 
330
  });
331
+
332
+ </script>
333
+ <?php
334
+ }
335
+ ?>
 
 
 
 
 
 
 
 
 
 
 
 
views/front-view-albums.php CHANGED
@@ -78,8 +78,7 @@ global $wpdb;
78
  $custom_height = $cover_height[1] + 1 +"px;" . "-moz-border-radius:". $cover_border_radius[1] ."; -webkit-border-radius:". $cover_border_radius[1] . ";-khtml-border-radius:". $cover_border_radius[1] . ";-o-border-radius:" . $cover_border_radius[1] . ";border-radius:" . $cover_border_radius[1];
79
  $custom_width = $cover_width[1] + 5 +"px;" . "-moz-border-radius:". $cover_border_radius[1] ."; -webkit-border-radius:". $cover_border_radius[1] . ";-khtml-border-radius:". $cover_border_radius[1] . ";-o-border-radius:" . $cover_border_radius[1] . ";border-radius:" . $cover_border_radius[1];
80
  $radius_for_shutter = "-moz-border-radius:". $cover_border_radius[1] ."; -webkit-border-radius:". $cover_border_radius[1] . ";-khtml-border-radius:". $cover_border_radius[1] . ";-o-border-radius:" . $cover_border_radius[1] . ";border-radius:" . $cover_border_radius[1];
81
- $pagename = 'temp';
82
- $fileName = GALLERY_BK_PLUGIN_DIR.'/lib/cache/'.$pagename.".txt";
83
  ?>
84
  <button id="back_button<?php echo $unique_id;?>" style="margin-top:10px; display: none;" onclick="view_albums<?php echo $unique_id;?>();">
85
  <span style="color: #000;"> &laquo <?php _e('Back to Albums', gallery_bank); ?></span>
@@ -95,20 +94,12 @@ if(($setting_cover->album_cover == "undefined") || ($setting_cover->album_cover
95
  <?php
96
  $album_custom_cover_css = "Height:150px;Width:150px;". "border:" . $cover_border_value . ";-moz-border-radius:". $cover_border_radius[1] ."; -webkit-border-radius:". $cover_border_radius[1] . ";-khtml-border-radius:". $cover_border_radius[1] . ";-o-border-radius:" . $cover_border_radius[1] . ";border-radius:" . $cover_border_radius[1].";-moz-opacity:".$cover_opacity[1]. ";-khtml-opacity:".$cover_opacity[1]. ";-ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=".($cover_opacity[1]* 100).")'". ";filter:alpha(opacity=".$cover_opacity[1] * 100 . ");opacity:". $cover_opacity[1]. ";";
97
  ?>
98
- <div class="view da-thumbs" style="height:<?php echo $default_height; ?>;width:<?php echo $default_width; ?>;float:left;">
99
  <a onclick="view_images_<?php echo $unique_id;?>(<?php echo $album_id;?>);" style="cursor: pointer" >
100
  <img class="imgHolder" src="<?php echo stripcslashes($url); ?>" style="cursor:pointer;margin-left:5px;;margin-top:3px;<?php echo $album_custom_cover_css; ?>" />
101
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
102
- <p <?php if ( $album->album_name == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
103
- <?php echo stripcslashes(htmlspecialchars_decode($album->album_name)); ?>
104
- </p>
105
- <div class="forspan">
106
- <span class="zoom">
107
- </span>
108
- </div>
109
- </article>
110
  </a>
111
- </div>
112
  <div style="text-align: justify;display:inline-block;vertical-align:top;margin-left:20px;">
113
  <h3><?php echo stripcslashes(htmlspecialchars_decode($album->album_name)); ?>&nbsp;</h3>
114
  <span><?php echo stripcslashes(htmlspecialchars_decode($album->description));?>&nbsp;</span><br/>
@@ -130,34 +121,13 @@ else
130
 
131
  $album_custom_cover_css = "border:" .$cover_border_value.";-moz-border-radius:". $cover_border_radius[1] ."; -webkit-border-radius:". $cover_border_radius[1] . ";-khtml-border-radius:". $cover_border_radius[1] .";-o-border-radius:" . $cover_border_radius[1] . ";border-radius:" . $cover_border_radius[1].";-moz-opacity:".$cover_opacity[1]. ";-khtml-opacity:".$cover_opacity[1]. ";-ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=".($cover_opacity[1]* 100).")'". ";filter:alpha(opacity=".$cover_opacity[1] * 100 . ");opacity:". $cover_opacity[1]. ";";
132
  ?>
133
- <div class="view da-thumbs" style="height:<?php echo $default_height; ?>;width:<?php echo $default_width; ?>;float:left;">
134
  <a onclick="view_images_<?php echo $unique_id;?>(<?php echo $album_id;?>);" style="cursor: pointer" >
135
- <?php
136
- if(file_exists($fileName)!=false)
137
- {
138
- ?>
139
- <img class="imgHolder" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.stripcslashes($setting_cover->album_cover).'&h=150&w=150&zc=1&q=100';?>" style="cursor:pointer;margin-left:5px;margin-top:3p;<?php echo $album_custom_cover_css; ?>" />
140
- <?php
141
- }
142
- else
143
- {
144
- ?>
145
  <img class="imgHolder" src="<?php echo stripcslashes($setting_cover->album_cover);?>" style="cursor:pointer;margin-left:5px;width:150px;height:155px;margin-top:3px;<?php echo $album_custom_cover_css; ?>" />
146
- <?php
147
- }
148
- ?>
149
-
150
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
151
- <p <?php if ( $album->album_name == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
152
- <?php echo stripcslashes(htmlspecialchars_decode($album->album_name)); ?>
153
- </p>
154
- <div class="forspan">
155
- <span class="zoom">
156
- </span>
157
- </div>
158
- </article>
159
  </a>
160
- </div>
161
 
162
  <?php
163
 
@@ -167,35 +137,13 @@ else
167
  $album_cover_css = "border:" . $cover_border_value . ";-moz-border-radius:". $cover_border_radius[1] ."; -webkit-border-radius:". $cover_border_radius[1] . ";-khtml-border-radius:". $cover_border_radius[1] . ";-o-border-radius:" . $cover_border_radius[1] . ";border-radius:" . $cover_border_radius[1].";-moz-opacity:".$cover_opacity[1]. ";-khtml-opacity:".$cover_opacity[1]. ";-ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=".($cover_opacity[1]* 100).")'". ";filter:alpha(opacity=".$cover_opacity[1] * 100 . ");opacity:". $cover_opacity[1]. ";";
168
  ?>
169
 
170
- <div class="view da-thumbs" style="height:<?php echo $custom_height; ?>;width:<?php echo $custom_width; ?>;float:left;">
171
  <a onclick="view_images_<?php echo $unique_id;?>(<?php echo $album_id;?>);" style="cursor: pointer" >
172
- <?php
173
- if(file_exists($fileName)!=false)
174
- {
175
- ?>
176
- <img class="imgHolder" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.stripcslashes($setting_cover->album_cover).'&h='.$cover_height[1].'&w='.$cover_width[1].'&zc=1&q=100';?>" style="margin-left:5px;;margin-top:3px;cursor:pointer;<?php echo $album_cover_css; ?>"/>
177
- <?php
178
- }
179
- else
180
- {
181
- ?>
182
  <img class="imgHolder" src="<?php echo stripcslashes($setting_cover->album_cover);?>";" style="margin-left:5px;margin-top:3px;cursor:pointer;width:<?php echo $cover_width[1];?>;height:<?php echo $cover_height[1];?>;<?php echo $album_cover_css;?>" />
183
-
184
- <?php
185
- }
186
- ?>
187
-
188
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
189
- <p <?php if ( $album->album_name == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
190
- <?php echo stripcslashes(htmlspecialchars_decode($album->album_name)); ?>
191
- </p>
192
- <div class="forspan">
193
- <span class="zoom">
194
- </span>
195
- </div>
196
- </article>
197
  </a>
198
- </div>
199
 
200
  <?php
201
 
@@ -214,7 +162,7 @@ else
214
  ?>
215
  </td></tr></table>
216
  <div id="image_show_div<?php echo $unique_id;?>" style="display: none;" class="images-cover">
217
- <h3 id="album_title<?php echo $unique_id;?>"><?php echo stripcslashes(htmlspecialchars_decode($album->album_name)); ?>&nbsp;</h3>
218
  <div id="show_images_<?php echo $unique_id;?>" >
219
  </div>
220
  </div>
78
  $custom_height = $cover_height[1] + 1 +"px;" . "-moz-border-radius:". $cover_border_radius[1] ."; -webkit-border-radius:". $cover_border_radius[1] . ";-khtml-border-radius:". $cover_border_radius[1] . ";-o-border-radius:" . $cover_border_radius[1] . ";border-radius:" . $cover_border_radius[1];
79
  $custom_width = $cover_width[1] + 5 +"px;" . "-moz-border-radius:". $cover_border_radius[1] ."; -webkit-border-radius:". $cover_border_radius[1] . ";-khtml-border-radius:". $cover_border_radius[1] . ";-o-border-radius:" . $cover_border_radius[1] . ";border-radius:" . $cover_border_radius[1];
80
  $radius_for_shutter = "-moz-border-radius:". $cover_border_radius[1] ."; -webkit-border-radius:". $cover_border_radius[1] . ";-khtml-border-radius:". $cover_border_radius[1] . ";-o-border-radius:" . $cover_border_radius[1] . ";border-radius:" . $cover_border_radius[1];
81
+
 
82
  ?>
83
  <button id="back_button<?php echo $unique_id;?>" style="margin-top:10px; display: none;" onclick="view_albums<?php echo $unique_id;?>();">
84
  <span style="color: #000;"> &laquo <?php _e('Back to Albums', gallery_bank); ?></span>
94
  <?php
95
  $album_custom_cover_css = "Height:150px;Width:150px;". "border:" . $cover_border_value . ";-moz-border-radius:". $cover_border_radius[1] ."; -webkit-border-radius:". $cover_border_radius[1] . ";-khtml-border-radius:". $cover_border_radius[1] . ";-o-border-radius:" . $cover_border_radius[1] . ";border-radius:" . $cover_border_radius[1].";-moz-opacity:".$cover_opacity[1]. ";-khtml-opacity:".$cover_opacity[1]. ";-ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=".($cover_opacity[1]* 100).")'". ";filter:alpha(opacity=".$cover_opacity[1] * 100 . ");opacity:". $cover_opacity[1]. ";";
96
  ?>
97
+
98
  <a onclick="view_images_<?php echo $unique_id;?>(<?php echo $album_id;?>);" style="cursor: pointer" >
99
  <img class="imgHolder" src="<?php echo stripcslashes($url); ?>" style="cursor:pointer;margin-left:5px;;margin-top:3px;<?php echo $album_custom_cover_css; ?>" />
100
+
 
 
 
 
 
 
 
 
101
  </a>
102
+
103
  <div style="text-align: justify;display:inline-block;vertical-align:top;margin-left:20px;">
104
  <h3><?php echo stripcslashes(htmlspecialchars_decode($album->album_name)); ?>&nbsp;</h3>
105
  <span><?php echo stripcslashes(htmlspecialchars_decode($album->description));?>&nbsp;</span><br/>
121
 
122
  $album_custom_cover_css = "border:" .$cover_border_value.";-moz-border-radius:". $cover_border_radius[1] ."; -webkit-border-radius:". $cover_border_radius[1] . ";-khtml-border-radius:". $cover_border_radius[1] .";-o-border-radius:" . $cover_border_radius[1] . ";border-radius:" . $cover_border_radius[1].";-moz-opacity:".$cover_opacity[1]. ";-khtml-opacity:".$cover_opacity[1]. ";-ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=".($cover_opacity[1]* 100).")'". ";filter:alpha(opacity=".$cover_opacity[1] * 100 . ");opacity:". $cover_opacity[1]. ";";
123
  ?>
124
+
125
  <a onclick="view_images_<?php echo $unique_id;?>(<?php echo $album_id;?>);" style="cursor: pointer" >
126
+
 
 
 
 
 
 
 
 
 
127
  <img class="imgHolder" src="<?php echo stripcslashes($setting_cover->album_cover);?>" style="cursor:pointer;margin-left:5px;width:150px;height:155px;margin-top:3px;<?php echo $album_custom_cover_css; ?>" />
128
+
 
 
 
 
 
 
 
 
 
 
 
 
129
  </a>
130
+
131
 
132
  <?php
133
 
137
  $album_cover_css = "border:" . $cover_border_value . ";-moz-border-radius:". $cover_border_radius[1] ."; -webkit-border-radius:". $cover_border_radius[1] . ";-khtml-border-radius:". $cover_border_radius[1] . ";-o-border-radius:" . $cover_border_radius[1] . ";border-radius:" . $cover_border_radius[1].";-moz-opacity:".$cover_opacity[1]. ";-khtml-opacity:".$cover_opacity[1]. ";-ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=".($cover_opacity[1]* 100).")'". ";filter:alpha(opacity=".$cover_opacity[1] * 100 . ");opacity:". $cover_opacity[1]. ";";
138
  ?>
139
 
140
+
141
  <a onclick="view_images_<?php echo $unique_id;?>(<?php echo $album_id;?>);" style="cursor: pointer" >
142
+
 
 
 
 
 
 
 
 
 
143
  <img class="imgHolder" src="<?php echo stripcslashes($setting_cover->album_cover);?>";" style="margin-left:5px;margin-top:3px;cursor:pointer;width:<?php echo $cover_width[1];?>;height:<?php echo $cover_height[1];?>;<?php echo $album_cover_css;?>" />
144
+
 
 
 
 
 
 
 
 
 
 
 
 
 
145
  </a>
146
+
147
 
148
  <?php
149
 
162
  ?>
163
  </td></tr></table>
164
  <div id="image_show_div<?php echo $unique_id;?>" style="display: none;" class="images-cover">
165
+ <h3 id="album_title<?php echo $unique_id;?>"></h3>
166
  <div id="show_images_<?php echo $unique_id;?>" >
167
  </div>
168
  </div>
views/front-view-all-albums.php CHANGED
@@ -69,16 +69,9 @@
69
  $cover_border_color = explode(":", $cover_settings[6]);
70
  $cover_border_value = $cover_border_size[1] ." solid " . $cover_border_color[1];
71
 
72
- $pagination_settings = explode(";", $content[4]);
73
- $pagination = explode(":", $pagination_settings[0]);
74
 
75
- $default_height = 151 + "px;" . ";-moz-border-radius:". $cover_border_radius[1] ."; -webkit-border-radius:". $cover_border_radius[1] . ";-khtml-border-radius:". $cover_border_radius[1] . ";-o-border-radius:" . $cover_border_radius[1] . ";border-radius:" . $cover_border_radius[1];
76
- $default_width = 155 + "px;" . ";-moz-border-radius:". $cover_border_radius[1] ."; -webkit-border-radius:". $cover_border_radius[1] . ";-khtml-border-radius:". $cover_border_radius[1] . ";-o-border-radius:" . $cover_border_radius[1] . ";border-radius:" . $cover_border_radius[1];
77
- $custom_height = $cover_height[1] + 1 + "px;" . ";-moz-border-radius:". $cover_border_radius[1] ."; -webkit-border-radius:". $cover_border_radius[1] . ";-khtml-border-radius:". $cover_border_radius[1] . ";-o-border-radius:" . $cover_border_radius[1] . ";border-radius:" . $cover_border_radius[1];
78
- $custom_width = $cover_width[1] + 5 + "px;" . ";-moz-border-radius:". $cover_border_radius[1] ."; -webkit-border-radius:". $cover_border_radius[1] . ";-khtml-border-radius:". $cover_border_radius[1] . ";-o-border-radius:" . $cover_border_radius[1] . ";border-radius:" . $cover_border_radius[1];
79
- $radius_for_shutter = ";-moz-border-radius:". $cover_border_radius[1] ."; -webkit-border-radius:". $cover_border_radius[1] . ";-khtml-border-radius:". $cover_border_radius[1] . ";-o-border-radius:" . $cover_border_radius[1] . ";border-radius:" . $cover_border_radius[1];
80
- $pagename = 'temp';
81
- $fileName = GALLERY_BK_PLUGIN_DIR.'/lib/cache/'.$pagename.".txt";
82
  ?>
83
  <tr id="tr_<?php echo $album[$flag]->album_id;?>"><td style="border:0px;">
84
  <?php
@@ -91,20 +84,12 @@
91
  $album_custom_cover_css = "Height:150px;Width:150px;"."border:" . $cover_border_value . ";-moz-border-radius:". $cover_border_radius[1] ."; -webkit-border-radius:". $cover_border_radius[1] . ";-khtml-border-radius:". $cover_border_radius[1] . ";-o-border-radius:" . $cover_border_radius[1] . ";border-radius:" . $cover_border_radius[1].";-moz-opacity:".$cover_opacity[1]. ";-khtml-opacity:".$cover_opacity[1]. ";-ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=".($cover_opacity[1]* 100).")'". ";filter:alpha(opacity=".$cover_opacity[1] * 100 . ");opacity:". $cover_opacity[1]. ";";
92
  ?>
93
 
94
- <div class="view da-thumbs" style="height:<?php echo $default_height; ?>;width:<?php echo $default_width; ?>;float:left;">
95
  <a onclick="view_images<?php echo $unique_id;?>(<?php echo $album[$flag]->album_id;?>);" style="cursor: pointer" >
96
  <img class="imgHolder" src="<?php echo stripcslashes($url); ?>" style="cursor:pointer;margin-left:5px;;margin-top:3p;<?php echo $album_custom_cover_css; ?>" />
97
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
98
- <p <?php if ( $album[$flag]->album_name == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
99
- <?php echo stripcslashes(htmlspecialchars_decode($album[$flag]->album_name)); ?>
100
- </p>
101
- <div class="forspan">
102
- <span class="zoom">
103
- </span>
104
- </div>
105
- </article>
106
  </a>
107
- </div>
108
  <div style="text-align: justify;display:inline-block;vertical-align:top;margin-left:20px;">
109
  <h3><?php echo stripcslashes(htmlspecialchars_decode($album[$flag]->album_name)); ?>&nbsp;</h3>
110
  <span><?php echo stripcslashes(htmlspecialchars_decode($album[$flag]->description));?>&nbsp;</span><br/>
@@ -126,72 +111,14 @@
126
  $album_custom_cover_css = "border:" .$cover_border_value. ";-moz-border-radius:". $cover_border_radius[1] ."; -webkit-border-radius:". $cover_border_radius[1] . ";-khtml-border-radius:". $cover_border_radius[1] .";-o-border-radius:" . $cover_border_radius[1] . ";border-radius:" . $cover_border_radius[1].";-moz-opacity:".$cover_opacity[1]. ";-khtml-opacity:".$cover_opacity[1]. ";-ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=".($cover_opacity[1]* 100).")'". ";filter:alpha(opacity=".$cover_opacity[1] * 100 . ");opacity:". $cover_opacity[1]. ";";
127
  ?>
128
 
129
- <div class="view da-thumbs" style="height:<?php echo $default_height; ?>;width:<?php echo $default_width; ?>;float:left;">
130
- <a onclick="view_images<?php echo $unique_id;?>(<?php echo $album[$flag]->album_id;?>);" style="cursor: pointer" >
131
- <?php
132
- if(file_exists($fileName)!=false)
133
- {
134
- ?>
135
- <img class="imgHolder" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.stripcslashes($get_settings->album_cover).'&h=150&w=150&zc=1&q=100';?>" style="cursor:pointer;margin-left:5px;;margin-top:3p;<?php echo $album_custom_cover_css; ?>" />
136
- <?php
137
- }
138
- else
139
- {
140
- ?>
141
- <img class="imgHolder" src="<?php echo stripcslashes($get_settings->album_cover);?>" style="cursor:pointer;margin-left:5px;width:150px;height:155px;margin-top:3px;<?php echo $album_custom_cover_css; ?>" />
142
- <?php
143
- }
144
- ?>
145
-
146
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
147
- <p <?php if ( $album[$flag]->album_name == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
148
- <?php echo stripcslashes(htmlspecialchars_decode($album[$flag]->album_name)); ?>
149
- </p>
150
- <div class="forspan">
151
- <span class="zoom">
152
- </span>
153
- </div>
154
- </article>
155
- </a>
156
- </div>
157
 
158
- <?php
159
- }
160
- else
161
- {
162
- $album_cover_css = "border:" . $cover_border_value . ";-moz-border-radius:". $cover_border_radius[1] ."; -webkit-border-radius:". $cover_border_radius[1] . ";-khtml-border-radius:". $cover_border_radius[1] . ";-o-border-radius:" . $cover_border_radius[1] . ";border-radius:" . $cover_border_radius[1].";-moz-opacity:".$cover_opacity[1]. ";-khtml-opacity:".$cover_opacity[1]. ";-ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=".($cover_opacity[1]* 100).")'". ";filter:alpha(opacity=".$cover_opacity[1] * 100 . ");opacity:". $cover_opacity[1]. ";";
163
- ?>
164
- <div class="view da-thumbs" style="height:<?php echo $custom_height; ?>;width:<?php echo $custom_width; ?>;float:left;">
165
  <a onclick="view_images<?php echo $unique_id;?>(<?php echo $album[$flag]->album_id;?>);" style="cursor: pointer" >
166
- <?php
167
- if(file_exists($fileName)!=false)
168
- {
169
- ?>
170
- <img class="imgHolder" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.stripcslashes($get_settings->album_cover).'&h='.$cover_height[1].'&w='.$cover_width[1].'&zc=1&q=100';?>" style="cursor:pointer;margin-left:5px;;margin-top:3p;<?php echo $album_cover_css; ?>" />
171
- <?php
172
- }
173
- else
174
- {
175
- ?>
176
- <img class="imgHolder" src="<?php echo stripcslashes($get_settings->album_cover);?>" style="cursor:pointer;margin-left:5px;width:<?php echo $cover_width[1];?>;height:<?php echo $cover_height[1];?>;margin-top:3px;<?php echo $album_cover_css; ?>" />
177
- <?php
178
- }
179
- ?>
180
-
181
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
182
- <p <?php if ( $album[$flag]->album_name == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
183
- <?php echo stripcslashes(htmlspecialchars_decode($album[$flag]->album_name)); ?>
184
- </p>
185
- <div class="forspan">
186
- <span class="zoom">
187
- </span>
188
- </div>
189
- </article>
190
  </a>
191
- </div>
192
 
193
  <?php
194
  }
 
195
  ?>
196
  <div style="text-align: justify;display:inline-block;vertical-align:top;margin-left:20px;">
197
  <h3><?php echo stripcslashes(htmlspecialchars_decode($album[$flag]->album_name)); ?>&nbsp;</h3>
@@ -201,7 +128,6 @@
201
  </a>
202
  </div>
203
  </div>
204
-
205
  <?php
206
  }
207
  ?>
@@ -212,7 +138,7 @@
212
  ?>
213
  </table>
214
  <div id="image_show_div<?php echo $unique_id;?>" style="display: none;" class="images-cover">
215
- <h3 id="album_title<?php echo $unique_id;?>"><?php echo stripcslashes(htmlspecialchars_decode($album[$flag]->album_name)); ?>&nbsp;</h3>
216
  <div id="show_images_<?php echo $unique_id;?>" >
217
  </div>
218
  </div>
@@ -264,8 +190,8 @@
264
  }
265
  ?>
266
  }
 
267
  </script>
268
-
269
  <?php
270
  }
271
  ?>
69
  $cover_border_color = explode(":", $cover_settings[6]);
70
  $cover_border_value = $cover_border_size[1] ." solid " . $cover_border_color[1];
71
 
 
 
72
 
73
+
74
+
 
 
 
 
 
75
  ?>
76
  <tr id="tr_<?php echo $album[$flag]->album_id;?>"><td style="border:0px;">
77
  <?php
84
  $album_custom_cover_css = "Height:150px;Width:150px;"."border:" . $cover_border_value . ";-moz-border-radius:". $cover_border_radius[1] ."; -webkit-border-radius:". $cover_border_radius[1] . ";-khtml-border-radius:". $cover_border_radius[1] . ";-o-border-radius:" . $cover_border_radius[1] . ";border-radius:" . $cover_border_radius[1].";-moz-opacity:".$cover_opacity[1]. ";-khtml-opacity:".$cover_opacity[1]. ";-ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=".($cover_opacity[1]* 100).")'". ";filter:alpha(opacity=".$cover_opacity[1] * 100 . ");opacity:". $cover_opacity[1]. ";";
85
  ?>
86
 
87
+
88
  <a onclick="view_images<?php echo $unique_id;?>(<?php echo $album[$flag]->album_id;?>);" style="cursor: pointer" >
89
  <img class="imgHolder" src="<?php echo stripcslashes($url); ?>" style="cursor:pointer;margin-left:5px;;margin-top:3p;<?php echo $album_custom_cover_css; ?>" />
90
+
 
 
 
 
 
 
 
 
91
  </a>
92
+
93
  <div style="text-align: justify;display:inline-block;vertical-align:top;margin-left:20px;">
94
  <h3><?php echo stripcslashes(htmlspecialchars_decode($album[$flag]->album_name)); ?>&nbsp;</h3>
95
  <span><?php echo stripcslashes(htmlspecialchars_decode($album[$flag]->description));?>&nbsp;</span><br/>
111
  $album_custom_cover_css = "border:" .$cover_border_value. ";-moz-border-radius:". $cover_border_radius[1] ."; -webkit-border-radius:". $cover_border_radius[1] . ";-khtml-border-radius:". $cover_border_radius[1] .";-o-border-radius:" . $cover_border_radius[1] . ";border-radius:" . $cover_border_radius[1].";-moz-opacity:".$cover_opacity[1]. ";-khtml-opacity:".$cover_opacity[1]. ";-ms-filter: 'progid:DXImageTransform.Microsoft.Alpha(Opacity=".($cover_opacity[1]* 100).")'". ";filter:alpha(opacity=".$cover_opacity[1] * 100 . ");opacity:". $cover_opacity[1]. ";";
112
  ?>
113
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
114
 
 
 
 
 
 
 
 
115
  <a onclick="view_images<?php echo $unique_id;?>(<?php echo $album[$flag]->album_id;?>);" style="cursor: pointer" >
116
+ <img class="imgHolder" src="<?php echo stripcslashes($get_settings->album_cover);?>" style="cursor:pointer;margin-left:5px;width:150px;height:155px;margin-top:3px;<?php echo $album_custom_cover_css; ?>" />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
117
  </a>
 
118
 
119
  <?php
120
  }
121
+
122
  ?>
123
  <div style="text-align: justify;display:inline-block;vertical-align:top;margin-left:20px;">
124
  <h3><?php echo stripcslashes(htmlspecialchars_decode($album[$flag]->album_name)); ?>&nbsp;</h3>
128
  </a>
129
  </div>
130
  </div>
 
131
  <?php
132
  }
133
  ?>
138
  ?>
139
  </table>
140
  <div id="image_show_div<?php echo $unique_id;?>" style="display: none;" class="images-cover">
141
+ <h3 id="album_title<?php echo $unique_id;?>"></h3>
142
  <div id="show_images_<?php echo $unique_id;?>" >
143
  </div>
144
  </div>
190
  }
191
  ?>
192
  }
193
+
194
  </script>
 
195
  <?php
196
  }
197
  ?>
views/front_view.php CHANGED
@@ -82,977 +82,234 @@
82
  $litebox_bg_color_substring = str_replace("rgb","rgba",substr($lightbox_bg_color[1], 0, -1));
83
  $litebox_bg_color_with_opacity = $litebox_bg_color_substring. "," . $overlay_opacity[1] . ")";
84
  $lightbox_bg_color_value= $overlay_border_size_value[1] . " solid " . $overlay_border_color[1];
85
- $slideshow_settings = explode(";", $content[3]);
86
- $auto_play = explode(":", $slideshow_settings[0]);
87
- $pagination = explode(":", $content[4]);
88
- if($auto_play[1] == "1")
89
- {
90
- $autoplay = true;
91
-
92
- }
93
- else {
94
- $autoplay = false;
95
- }
96
-
97
- $slide_interval = explode(":", $slideshow_settings[1]);
98
-
99
- $pagination_settings = explode(";", $content[4]);
100
- $pagination = explode(":", $pagination_settings[0]);
101
 
102
- $count = 1;
103
- $pagename = 'temp';
104
- $fileName = GALLERY_BK_PLUGIN_DIR.'/lib/cache/'.$pagename.".txt";
105
  ?>
106
  <h3><?php echo stripcslashes(htmlspecialchars_decode($album->album_name));?></h3>
107
- <div class="imgContainerSingle">
108
-
109
- <?php
110
- if($pagination[1] == 1)
111
- {
112
- ?>
113
- <table class='table table-striped' id='images_view_data_table_<?php echo $unique_id;?>'>
114
- <?php
115
- }
116
- if(file_exists($fileName)!=false)
117
- {
118
- $default_height = 151 + ($image_border_size_value[1] * 2) . "px;" . "border-radius:" . $image_radius_value[1]. ";-moz-border-radius:" . $image_radius_value[1]. ";-webkit-border-radius:" . $image_radius_value[1]. ";-khtml-border-radius:" . $image_radius_value[1]. ";-o-border-radius:" . $image_radius_value[1] . ";";
119
- $default_width = 155 + ($image_border_size_value[1] * 2) . "px;" ."border-radius:" . $image_radius_value[1]. ";-moz-border-radius:" . $image_radius_value[1]. ";-webkit-border-radius:" . $image_radius_value[1]. ";-khtml-border-radius:" . $image_radius_value[1]. ";-o-border-radius:" . $image_radius_value[1] . ";";
120
- $custom_height = $image_height[1] + 1 + ($image_border_size_value[1] * 2) . "px;" . "border-radius:" . $image_radius_value[1]. ";-moz-border-radius:" . $image_radius_value[1]. ";-webkit-border-radius:" . $image_radius_value[1]. ";-khtml-border-radius:" . $image_radius_value[1]. ";-o-border-radius:" . $image_radius_value[1] . ";";
121
- $custom_width = $image_width[1] + 5 + ($image_border_size_value[1] * 2) . "px;" . "border-radius:" . $image_radius_value[1]. ";-moz-border-radius:" . $image_radius_value[1]. ";-webkit-border-radius:" . $image_radius_value[1]. ";-khtml-border-radius:" . $image_radius_value[1]. ";-o-border-radius:" . $image_radius_value[1] . ";";
122
- $radius_for_shutter = "border-radius:" . $image_radius_value[1]. ";-moz-border-radius:" . $image_radius_value[1]. ";-webkit-border-radius:" . $image_radius_value[1]. ";-khtml-border-radius:" . $image_radius_value[1]. ";-o-border-radius:" . $image_radius_value[1];
123
- }
124
- else
125
  {
126
- $default_height = 151 + (0) . "px;" . "border-radius:" . $image_radius_value[1]. ";-moz-border-radius:" . $image_radius_value[1]. ";-webkit-border-radius:" . $image_radius_value[1]. ";-khtml-border-radius:" . $image_radius_value[1]. ";-o-border-radius:" . $image_radius_value[1] . ";";
127
- $default_width = 155 + (0) . "px;" ."border-radius:" . $image_radius_value[1]. ";-moz-border-radius:" . $image_radius_value[1]. ";-webkit-border-radius:" . $image_radius_value[1]. ";-khtml-border-radius:" . $image_radius_value[1]. ";-o-border-radius:" . $image_radius_value[1] . ";";
128
- $custom_height = $image_height[1] + 1 + (0) . "px;" . "border-radius:" . $image_radius_value[1]. ";-moz-border-radius:" . $image_radius_value[1]. ";-webkit-border-radius:" . $image_radius_value[1]. ";-khtml-border-radius:" . $image_radius_value[1]. ";-o-border-radius:" . $image_radius_value[1] . ";";
129
- $custom_width = $image_width[1] + 5 + (0) . "px;" . "border-radius:" . $image_radius_value[1]. ";-moz-border-radius:" . $image_radius_value[1]. ";-webkit-border-radius:" . $image_radius_value[1]. ";-khtml-border-radius:" . $image_radius_value[1]. ";-o-border-radius:" . $image_radius_value[1] . ";";
130
- $radius_for_shutter = "border-radius:" . $image_radius_value[1]. ";-moz-border-radius:" . $image_radius_value[1]. ";-webkit-border-radius:" . $image_radius_value[1]. ";-khtml-border-radius:" . $image_radius_value[1]. ";-o-border-radius:" . $image_radius_value[1];
131
- }
132
-
133
- for ($flag = 0; $flag <count($pic_detail); $flag++)
134
  {
135
- if($pagination[1] == 1)
136
- {
137
- if($count == 1)
138
- {
139
-
140
  ?>
141
- <tr><td>
142
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
143
  }
144
- }
145
- $css_image_thumbnail = "border:" . $image_border_size_value[1]. " solid " . $border_color[1] . ";border-radius:" . $image_radius_value[1]. ";-moz-border-radius:" . $image_radius_value[1]. ";-webkit-border-radius:" . $image_radius_value[1]. ";-khtml-border-radius:" . $image_radius_value[1]. ";-o-border-radius:" . $image_radius_value[1].";opacity:".$image_opacity[1].";filter:alpha(opacity=".$image_opacity[1] * 100 . ");-ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=".$image_opacity[1] * 100 . ")';-moz-opacity:" . $image_opacity[1] . ";-khtml-opacity:".$image_opacity[1]. ";";
146
- if($pic_detail[$flag]->description == "")
147
- {
148
-
149
- if(($flag % $images_in_row[1] == 0) && $flag != 0)
150
  {
151
-
152
  ?>
153
- </br>
 
154
  <?php
155
  if($image_content[1] == 1)
156
  {
157
- if($images_in_row[1] == 1)
158
  {
159
  ?>
160
- <div class="view da-thumbs" style="height:<?php echo $default_height; ?>;width:<?php echo $default_width; ?>;">
161
  <?php
162
-
163
  }
164
  else
165
  {
166
  ?>
167
- <div class="view da-thumbs" style="float:left;height:<?php echo $default_height; ?>;width:<?php echo $default_width; ?>;">
168
- <?php
169
- }
170
- }
171
- else
172
- {
173
- if($images_in_row[1] == 1)
174
- {
175
- ?>
176
- <div class="view da-thumbs" style="height:<?php echo $custom_height; ?>;width:<?php echo $custom_width; ?>;">
177
- <?php
178
-
179
- }
180
- else {
181
- ?>
182
- <div class="view da-thumbs" style="float:left;height:<?php echo $custom_height; ?>;width:<?php echo $custom_width; ?>;">
183
- <?php
184
- }
185
- }
186
- if($pic_detail[$flag]->check_url == 1)
187
- {
188
- if($image_content[1] == 1)
189
- {
190
- ?>
191
- <a href="<?php echo $pic_detail[$flag]->url;?>" target="_blank">
192
- <?php
193
- if(file_exists($fileName)!=false)
194
- {
195
- ?>
196
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h=150&w=150&zc=1&q=100';?>" style="margin-left:5px;<?php echo $css_image_thumbnail; ?>" />
197
- <?php
198
- }
199
- else
200
- {
201
- ?>
202
- <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:150px;height:155px;<?php echo $css_image_thumbnail; ?>" />
203
- <?php
204
- }
205
- ?>
206
-
207
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
208
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
209
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
210
- </p>
211
- <div class="forspan">
212
- <span class="zoom">
213
- </span>
214
- </div>
215
- </article>
216
- </a>
217
- </div>
218
- <?php
219
- }
220
- else
221
- {
222
- ?>
223
- <a href="<?php echo $pic_detail[$flag]->url;?>" target="_blank">
224
- <?php
225
- if(file_exists($fileName)!=false)
226
- {
227
- ?>
228
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin-left:5px;<?php echo $css_image_thumbnail; ?>" />
229
- <?php
230
- }
231
- else
232
- {
233
- ?>
234
- <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
235
- <?php
236
- }
237
- ?>
238
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
239
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
240
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
241
- </p>
242
- <div class="forspan">
243
- <span class="zoom">
244
- </span>
245
- </div>
246
- </article>
247
- </a>
248
- </div>
249
  <?php
250
  }
 
 
 
 
251
  }
252
- else
 
 
 
 
 
 
 
253
  {
254
  ?>
255
- <a class="titan-lb_<?php echo $unique_id;?>" data-titan-lightbox="on" data-titan-group="gallery" href="<?php echo stripcslashes($pic_detail[$flag]->pic_path); ?>" title="<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>">
256
- <?php
257
- if($image_content[1] == 1)
258
- {
259
-
260
- if(file_exists($fileName)!=false)
261
- {
262
- if($pic_detail[$flag]->video == 1)
263
- {
264
- ?>
265
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg')).'&h=150&w=150&zc=1&q=100';?>" style="margin-left:5px;<?php echo $css_image_thumbnail; ?>" />
266
- <?php
267
- }
268
- else
269
- {
270
- ?>
271
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h=150&w=150&zc=1&q=100';?>" style="margin-left:5px;<?php echo $css_image_thumbnail; ?>" />
272
- <?php
273
- }
274
-
275
- }
276
- else
277
- {
278
- if($pic_detail[$flag]->video == 1)
279
- {
280
- ?>
281
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg');?>" style="margin-left:5px;width:150;height:155px;<?php echo $css_image_thumbnail; ?>" />
282
- <?php
283
- }
284
- else
285
- {
286
- ?>
287
- <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:150;height:155px;<?php echo $css_image_thumbnail; ?>" />
288
- <?php
289
- }
290
-
291
- }
292
- ?>
293
-
294
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
295
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
296
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
297
- </p>
298
- <div class="forspan">
299
- <span class="zoom"></span>
300
- </div>
301
- </article>
302
- </a>
303
- </div>
304
- <?php
305
-
306
- }
307
- else
308
- {
309
-
310
- if(file_exists($fileName)!=false)
311
- {
312
- if($pic_detail[$flag]->video == 1)
313
- {
314
- ?>
315
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg')).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin-left:5px;<?php echo $css_image_thumbnail; ?>" />
316
- <?php
317
- }
318
- else
319
- {
320
- ?>
321
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin-left:5px;<?php echo $css_image_thumbnail; ?>" />
322
- <?php
323
- }
324
-
325
- }
326
- else
327
- {
328
- if($pic_detail[$flag]->video == 1)
329
- {
330
- ?>
331
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg');?>" style="margin-left:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
332
- <?php
333
- }
334
- else
335
- {
336
- ?>
337
- <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
338
- <?php
339
- }
340
-
341
- }
342
- ?>
343
-
344
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
345
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
346
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
347
- </p>
348
- <div class="forspan">
349
- <span class="zoom">
350
- </span>
351
- </div>
352
- </article>
353
  </a>
354
- </div>
355
- <?php
356
- }
357
  }
358
  }
359
- else
360
  {
361
-
 
 
 
362
  if($image_content[1] == 1)
363
  {
364
- if($images_in_row[1] == 1)
365
  {
366
  ?>
367
- <div class="view da-thumbs" style="height:<?php echo $default_height; ?>;width:<?php echo $default_width; ?>;">
368
- <?php
369
-
370
- }
371
- else {
372
-
373
-
374
- if((($flag + 1) % $images_in_row[1] == 0) && $flag != 0)
375
- {
376
- ?>
377
- <div class="view da-thumbs" style="height:<?php echo $default_height; ?>;width:<?php echo $default_width; ?>;">
378
- <?php
379
- }
380
- else
381
- {
382
- ?>
383
- <div class="view da-thumbs" style="float:left;height:<?php echo $default_height; ?>;width:<?php echo $default_width; ?>;">
384
- <?php
385
- }
386
-
387
- }
388
- }
389
- else
390
- {
391
- if($images_in_row[1] == 1)
392
- {
393
- ?>
394
- <div class="view da-thumbs" style="height:<?php echo $custom_height; ?>;width:<?php echo $custom_width; ?>;">
395
- <?php
396
-
397
- }
398
- else
399
- {
400
- if((($flag + 1) % $images_in_row[1] == 0) && $flag != 0)
401
- {
402
- ?>
403
- <div class="view da-thumbs" style="height:<?php echo $custom_height; ?>;width:<?php echo $custom_width; ?>;">
404
- <?php
405
- }
406
- else
407
- {
408
- ?>
409
- <div class="view da-thumbs" style="float:left;height:<?php echo $custom_height; ?>;width:<?php echo $custom_width; ?>;">
410
- <?php
411
-
412
- }
413
- }
414
- }
415
- if($pic_detail[$flag]->check_url == 1)
416
- {
417
- if($image_content[1] == 1)
418
- {
419
- ?>
420
- <a href="<?php echo $pic_detail[$flag]->url;?>" target="_blank">
421
- <?php
422
- if(file_exists($fileName)!=false)
423
- {
424
- ?>
425
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h=150&w=150&zc=1&q=100';?>" style="margin-left:5px;<?php echo $css_image_thumbnail; ?>" />
426
- <?php
427
- }
428
- else
429
- {
430
- ?>
431
- <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
432
- <?php
433
- }
434
- ?>
435
-
436
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
437
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
438
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
439
- </p>
440
- <div class="forspan">
441
- <span class="zoom">
442
- </span>
443
- </div>
444
- </article>
445
- </a>
446
- </div>
447
  <?php
448
  }
449
  else
450
  {
451
  ?>
452
- <a href="<?php echo $pic_detail[$flag]->url;?>" target="_blank">
453
- <?php
454
- if(file_exists($fileName)!=false)
455
- {
456
- ?>
457
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin-left:5px;<?php echo $css_image_thumbnail; ?>" />
458
- <?php
459
- }
460
- else
461
- {
462
- ?>
463
- <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
464
- <?php
465
- }
466
- ?>
467
-
468
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
469
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
470
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
471
- </p>
472
- <div class="forspan">
473
- <span class="zoom">
474
- </span>
475
- </div>
476
- </article>
477
- </a>
478
- </div>
479
  <?php
480
  }
481
- }
482
- else
483
- {
484
- ?>
485
- <a class="titan-lb_<?php echo $unique_id;?>" data-titan-lightbox="on" data-titan-group="gallery" href="<?php echo $pic_detail[$flag]->pic_path; ?>" title="<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>">
486
- <?php
487
- if($image_content[1] == 1)
488
- {
489
-
490
-
491
- if(file_exists($fileName)!=false)
492
- {
493
- if($pic_detail[$flag]->video == 1)
494
- {
495
- ?>
496
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg')).'&h=150&w=150&zc=1&q=100';?>" style="margin-left:5px;<?php echo $css_image_thumbnail; ?>" />
497
- <?php
498
- }
499
- else
500
- {
501
- ?>
502
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h=150&w=150&zc=1&q=100';?>" style="margin-left:5px;<?php echo $css_image_thumbnail; ?>" />
503
- <?php
504
- }
505
-
506
- }
507
- else
508
- {
509
- if($pic_detail[$flag]->video == 1)
510
- {
511
- ?>
512
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg');?>" style="margin-left:5px;width:150;height:155px;<?php echo $css_image_thumbnail; ?>" />
513
- <?php
514
- }
515
- else
516
- {
517
- ?>
518
- <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:150;height:155px;<?php echo $css_image_thumbnail; ?>" />
519
- <?php
520
- }
521
-
522
- }
523
- ?>
524
-
525
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
526
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
527
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
528
- </p>
529
- <div class="forspan">
530
- <span class="zoom">
531
- </span>
532
- </div>
533
- </article>
534
  </a>
535
- </div>
536
- <?php
537
- }
538
- else
539
- {
540
-
541
- if(file_exists($fileName)!=false)
542
- {
543
- if($pic_detail[$flag]->video == 1)
544
- {
545
- ?>
546
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg')).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin-left:5px;<?php echo $css_image_thumbnail; ?>" />
547
- <?php
548
- }
549
- else
550
- {
551
- ?>
552
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin-left:5px;<?php echo $css_image_thumbnail; ?>" />
553
- <?php
554
- }
555
-
556
- }
557
- else
558
- {
559
- if($pic_detail[$flag]->video == 1)
560
- {
561
- ?>
562
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg');?>" style="margin-left:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
563
- <?php
564
- }
565
- else
566
- {
567
- ?>
568
- <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
569
- <?php
570
- }
571
-
572
- }
573
- ?>
574
-
575
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
576
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
577
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
578
- </p>
579
- <div class="forspan">
580
- <span class="zoom">
581
-
582
- </span>
583
- </div>
584
- </article>
585
- </a>
586
- </div>
587
- <?php
588
-
589
- }
590
  }
591
  }
592
  }
593
- else
 
 
 
594
  {
 
595
 
596
- if(($flag % $images_in_row[1] == 0) && $flag != 0)
 
 
597
  {
598
- ?>
599
- </br>
600
- <?php
601
  if($image_content[1] == 1)
602
  {
603
- if($images_in_row[1] == 1)
604
- {
605
- ?>
606
- <div class="view da-thumbs" style="height:<?php echo $default_height; ?>;width:<?php echo $default_width; ?>;">
607
- <?php
608
-
609
- }
610
- else {
611
- ?>
612
- <div class="view da-thumbs" style="float:left;height:<?php echo $default_height; ?>;width:<?php echo $default_width; ?>;">
613
  <?php
614
- }
615
  }
616
- else
 
 
 
617
  {
618
- if($images_in_row[1] == 1)
619
- {
620
- ?>
621
- <div class="view da-thumbs" style="height:<?php echo $custom_height; ?>;width:<?php echo $custom_width; ?>;">
622
- <?php
623
-
624
- }
625
- else {
626
- ?>
627
- <div class="view da-thumbs" style="float:left;height:<?php echo $custom_height; ?>;width:<?php echo $custom_width; ?>;">
628
  <?php
629
- }
630
- }
631
- if($pic_detail[$flag]->check_url == 1)
632
- {
633
- if($image_content[1] == 1)
634
- {
635
- ?>
636
- <a href="<?php echo $pic_detail[$flag]->url;?>" target="_blank">
637
- <?php
638
- if(file_exists($fileName)!=false)
639
- {
640
- ?>
641
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h=150&w=150&zc=1&q=100';?>" style="margin-left:5px;<?php echo $css_image_thumbnail; ?>" />
642
- <?php
643
- }
644
- else
645
- {
646
- ?>
647
- <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:150;height:155px;<?php echo $css_image_thumbnail; ?>" />
648
- <?php
649
- }
650
- ?>
651
-
652
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
653
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
654
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
655
- </p>
656
- <div class="forspan">
657
- <span class="zoom">
658
- </span>
659
- </div>
660
- </article>
661
- </a>
662
- </div>
663
- <?php
664
- }
665
- else
666
- {
667
- ?>
668
- <a href="<?php echo $pic_detail[$flag]->url;?>" target="_blank">
669
- <?php
670
- if(file_exists($fileName)!=false)
671
- {
672
- ?>
673
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin-left:5px;<?php echo $css_image_thumbnail; ?>" />
674
- <?php
675
- }
676
- else
677
- {
678
- ?>
679
- <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
680
- <?php
681
- }
682
- ?>
683
-
684
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
685
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
686
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
687
- </p>
688
- <div class="forspan">
689
- <span class="zoom">
690
- </span>
691
- </div>
692
- </article>
693
- </a>
694
- </div>
695
- <?php
696
- }
697
  }
698
  else
699
  {
700
- if($pic_detail[$flag]->description == "")
701
- {
702
- ?>
703
- <a class="titan-lb_<?php echo $unique_id;?>" data-titan-lightbox="on" data-titan-group="gallery" href="<?php echo stripcslashes($pic_detail[$flag]->pic_path); ?>" title="<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>">
704
- <?php
705
- }
706
- else
707
- {
708
- ?>
709
- <a class="titan-lb_<?php echo $unique_id;?>" data-titan-lightbox="on" data-titan-group="gallery" href="<?php echo stripcslashes($pic_detail[$flag]->pic_path); ?>" title="<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?> (<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->description)); ?>)">
710
- <?php
711
- }
712
-
713
  if($image_content[1] == 1)
714
  {
715
-
716
-
717
- if(file_exists($fileName)!=false)
718
- {
719
- ?>
720
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h=150&w=150&zc=1&q=100';?>" style="margin-left:5px;<?php echo $css_image_thumbnail; ?>" />
721
- <?php
722
- }
723
- else
724
- {
725
- ?>
726
- <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:150;height:155px;<?php echo $css_image_thumbnail; ?>" />
727
- <?php
728
- }
729
- ?>
730
-
731
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
732
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
733
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
734
- </p>
735
- <div class="forspan">
736
- <span class="zoom">
737
- </span>
738
- </div>
739
- </article>
740
- </a>
741
- </div>
742
  <?php
743
-
744
  }
745
- else
 
 
 
 
 
 
 
746
  {
747
-
748
- if(file_exists($fileName)!=false)
749
- {
750
- ?>
751
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin-left:5px;<?php echo $css_image_thumbnail; ?>" />
752
- <?php
753
- }
754
- else
755
- {
756
- ?>
757
- <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
758
- <?php
759
- }
760
- ?>
761
-
762
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
763
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
764
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
765
- </p>
766
- <div class="forspan">
767
- <span class="zoom">
768
- </span>
769
- </div>
770
- </article>
771
- </a>
772
- </div>
773
  <?php
774
-
775
- }
776
  }
777
  }
778
  else
779
  {
780
- if($image_content[1] == 1)
781
  {
782
- if($images_in_row[1] == 1)
783
- {
784
- ?>
785
- <div class="view da-thumbs" style="height:<?php echo $default_height; ?>;width:<?php echo $default_width; ?>;">
786
- <?php
787
-
788
- }
789
- else {
790
-
791
-
792
- if((($flag + 1) % $images_in_row[1] == 0) && $flag != 0)
793
- {
794
- ?>
795
- <div class="view da-thumbs" style="height:<?php echo $default_height; ?>;width:<?php echo $default_width; ?>;">
796
- <?php
797
- }
798
- else
799
- {
800
- ?>
801
- <div class="view da-thumbs" style="float:left;height:<?php echo $default_height; ?>;width:<?php echo $default_width; ?>;">
802
- <?php
803
- }
804
-
805
- }
806
  }
807
  else
808
  {
809
- if($images_in_row[1] == 1)
810
- {
811
- ?>
812
- <div class="view da-thumbs" style="height:<?php echo $custom_height; ?>;width:<?php echo $custom_width; ?>;">
813
- <?php
814
-
815
- }
816
- else
817
- {
818
- if((($flag + 1) % $images_in_row[1] == 0) && $flag != 0)
819
- {
820
- ?>
821
- <div class="view da-thumbs" style="height:<?php echo $custom_height; ?>;width:<?php echo $custom_width; ?>;">
822
- <?php
823
- }
824
- else
825
- {
826
- ?>
827
- <div class="view da-thumbs" style="float:left;height:<?php echo $custom_height; ?>;width:<?php echo $custom_width; ?>;">
828
- <?php
829
-
830
- }
831
- }
832
- }
833
- if($pic_detail[$flag]->check_url == 1)
834
- {
835
- if($image_content[1] == 1)
836
- {
837
- ?>
838
- <a href="<?php echo $pic_detail[$flag]->url;?>" target="_blank">
839
- <?php
840
- if(file_exists($fileName)!=false)
841
- {
842
- ?>
843
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h=150&w=150&zc=1&q=100';?>" style="margin-left:5px;<?php echo $css_image_thumbnail; ?>" />
844
- <?php
845
- }
846
- else
847
- {
848
- ?>
849
- <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:150;height:155px;<?php echo $css_image_thumbnail; ?>" />
850
- <?php
851
- }
852
- ?>
853
-
854
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
855
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
856
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
857
- </p>
858
- <div class="forspan">
859
- <span class="zoom">
860
- </span>
861
- </div>
862
- </article>
863
- </a>
864
- </div>
865
- <?php
866
- }
867
- else
868
- {
869
- ?>
870
- <a href="<?php echo $pic_detail[$flag]->url;?>" target="_blank">
871
- <?php
872
- if(file_exists($fileName)!=false)
873
- {
874
- ?>
875
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin-left:5px;<?php echo $css_image_thumbnail; ?>" />
876
- <?php
877
- }
878
- else
879
- {
880
- ?>
881
- <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
882
- <?php
883
- }
884
- ?>
885
-
886
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
887
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
888
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
889
- </p>
890
- <div class="forspan">
891
- <span class="zoom">
892
- </span>
893
- </div>
894
- </article>
895
- </a>
896
- </div>
897
- <?php
898
- }
899
- }
900
- else
901
- {
902
- if($pic_detail[$flag]->description == "")
903
- {
904
- ?>
905
- <a class="titan-lb_<?php echo $unique_id;?>" data-titan-lightbox="on" data-titan-group="gallery" href="<?php echo stripcslashes($pic_detail[$flag]->pic_path); ?>" title="<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>">
906
- <?php
907
- }
908
- else
909
- {
910
- ?>
911
- <a class="titan-lb_<?php echo $unique_id;?>" data-titan-lightbox="on" data-titan-group="gallery" href="<?php echo stripcslashes($pic_detail[$flag]->pic_path); ?>" title="<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?> (<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->description)); ?>)">
912
- <?php
913
- }
914
-
915
- if($image_content[1] == 1)
916
- {
917
-
918
- if(file_exists($fileName)!=false)
919
- {
920
- ?>
921
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h=150&w=150&zc=1&q=100';?>" style="margin-left:5px;<?php echo $css_image_thumbnail; ?>" />
922
- <?php
923
- }
924
- else
925
- {
926
- ?>
927
- <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:150;height:155px;<?php echo $css_image_thumbnail; ?>" />
928
- <?php
929
- }
930
- ?>
931
-
932
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
933
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
934
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
935
- </p>
936
- <div class="forspan">
937
- <span class="zoom">
938
- </span>
939
- </div>
940
- </article>
941
- </a>
942
- </div>
943
  <?php
944
-
945
  }
946
- else
947
  {
948
-
949
- if(file_exists($fileName)!=false)
950
- {
951
- ?>
952
- <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin-left:5px;<?php echo $css_image_thumbnail; ?>" />
953
- <?php
954
- }
955
- else
956
- {
957
- ?>
958
- <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
959
- <?php
960
- }
961
- ?>
962
-
963
- <article class="da-animate da-slideFromRight" style="<?php echo $radius_for_shutter; ?>">
964
- <p <?php if ( $pic_detail[$flag]->title == '' ) { echo 'style="display:none !important;"'; } ?> class="emgfittext">
965
- <?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>
966
- </p>
967
- <div class="forspan">
968
- <span class="zoom">
969
- </span>
970
- </div>
971
- </article>
972
- </a>
973
- </div>
974
  <?php
975
-
976
  }
977
  }
978
- }
979
- }
980
- if($pagination[1] == 1)
981
- {
982
- if($count == $images_in_row[1])
983
- {
984
- ?>
985
- </td></tr>
986
- <?php
987
- $count = 1;
988
- }
989
- else
990
- {
991
- $count++;
992
- }
993
  }
994
  }
995
- if($pagination[1] == 1)
996
- {
997
-
998
- ?>
999
- </table>
1000
- <?php
1001
- }
1002
- ?>
1003
- </div>
1004
-
1005
- <script type="text/javascript">
1006
- <?php
1007
- if($slide_interval[1] == 0)
1008
- {
1009
- $interval = 10000 * 1000 ;
1010
- }
1011
- else
1012
- {
1013
- $interval = $slide_interval[1] * 1000;
1014
  }
1015
  ?>
1016
-
1017
- jQuery(document).ready(function() {
1018
- jQuery('.titan-lb_<?php echo $unique_id;?>').lightbox({
1019
- //interval : "<php echo $interval; ?>",
1020
- //autoPlay: "<php echo $autoplay; ?>",
1021
- beforeShow: function(){
1022
- jQuery(".lightbox-skin").css("background","<?php echo $lightbox_inline_bg_color[1]; ?>");
1023
- jQuery(".lightbox-overlay").css("background","<?php echo $litebox_bg_color_with_opacity; ?>");
1024
- jQuery(".lightbox-wrap").css("border-radius","<?php echo $overlay_border_radius[1]; ?>");
1025
- jQuery(".lightbox-wrap").css("-moz-border-radius","<?php echo $overlay_border_radius[1]; ?>");
1026
- jQuery(".lightbox-wrap").css("-webkit-border-radius","<?php echo $overlay_border_radius[1]; ?>");
1027
- jQuery(".lightbox-wrap").css("-khtml-border-radius","<?php echo $overlay_border_radius[1]; ?>");
1028
- jQuery(".lightbox-wrap").css("-o-border-radius","<?php echo $overlay_border_radius[1]; ?>");
1029
- jQuery(".lightbox-wrap").css("border","<?php echo $lightbox_bg_color_value;?>");
1030
- },
1031
- afterShow : function()
1032
- {
1033
- jQuery(".lightbox-title").css("color","<?php echo $lightbox_text_color[1]; ?>");
1034
- }
1035
- });
1036
-
1037
  });
1038
- jQuery(document).ready(function(){
1039
- oTable = jQuery('#images_view_data_table_<?php echo $unique_id;?>').dataTable
1040
- ({
1041
- "bJQueryUI": false,
1042
- "bAutoWidth": true,
1043
- "sPaginationType": "full_numbers",
1044
- "sDom": '<"datatable-header"fl>t<"datatable-footer"ip>',
1045
- "oLanguage":
1046
- {
1047
- "sLengthMenu": "_MENU_"
1048
- },
1049
- "aaSorting": [[ 0, "desc" ]],
1050
- "aoColumnDefs": [{ "bSortable": false, "aTargets": [0] },{ "bSortable": false, "aTargets": [0] }],
1051
- "bSort": false
1052
  });
1053
- });
1054
- </script>
1055
-
1056
- <?php
1057
- }
1058
  ?>
82
  $litebox_bg_color_substring = str_replace("rgb","rgba",substr($lightbox_bg_color[1], 0, -1));
83
  $litebox_bg_color_with_opacity = $litebox_bg_color_substring. "," . $overlay_opacity[1] . ")";
84
  $lightbox_bg_color_value= $overlay_border_size_value[1] . " solid " . $overlay_border_color[1];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
85
 
 
 
 
86
  ?>
87
  <h3><?php echo stripcslashes(htmlspecialchars_decode($album->album_name));?></h3>
88
+ <div id="view_bank_album_<?php echo $unique_id;?>">
89
+
90
+ <?php
91
+ for ($flag = 0; $flag <count($pic_detail); $flag++)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  {
93
+ $css_image_thumbnail = "border:" . $image_border_size_value[1]. " solid " . $border_color[1] . ";border-radius:" . $image_radius_value[1]. ";-moz-border-radius:" . $image_radius_value[1]. ";-webkit-border-radius:" . $image_radius_value[1]. ";-khtml-border-radius:" . $image_radius_value[1]. ";-o-border-radius:" . $image_radius_value[1].";opacity:".$image_opacity[1].";filter:alpha(opacity=".$image_opacity[1] * 100 . ");-ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=".$image_opacity[1] * 100 . ")';-moz-opacity:" . $image_opacity[1] . ";-khtml-opacity:".$image_opacity[1]. ";";
94
+ if($pic_detail[$flag]->description == "")
 
 
 
 
 
 
95
  {
96
+ if(($flag % $images_in_row[1] == 0) && $flag != 0)
97
+ {
 
 
 
98
  ?>
99
+
100
  <?php
101
+ if($pic_detail[$flag]->check_url == 1)
102
+ {
103
+ if($image_content[1] == 1)
104
+ {
105
+ ?>
106
+ <div class="imgContainerSingle">
107
+ <a href="<?php echo $pic_detail[$flag]->url;?>" target="_blank">
108
+ <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:146px;<?php echo $css_image_thumbnail; ?>" />
109
+ </a>
110
+ </div>
111
+ <?php
112
+ }
113
  }
114
+ else
 
 
 
 
 
115
  {
 
116
  ?>
117
+ <div class="imgContainerSingle">
118
+ <a class="titan-lb_<?php echo $unique_id;?>" data-titan-lightbox="on" data-titan-group="gallery" href="<?php echo stripcslashes($pic_detail[$flag]->pic_path); ?>" title="<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>">
119
  <?php
120
  if($image_content[1] == 1)
121
  {
122
+ if($pic_detail[$flag]->video == 1)
123
  {
124
  ?>
125
+ <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg');?>" style="margin-left:5px;width:146px;<?php echo $css_image_thumbnail; ?>" />
126
  <?php
 
127
  }
128
  else
129
  {
130
  ?>
131
+ <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:146px;<?php echo $css_image_thumbnail; ?>" />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
  <?php
133
  }
134
+ ?>
135
+ </a>
136
+ </div>
137
+ <?php
138
  }
139
+ }
140
+ }
141
+ else
142
+ {
143
+
144
+ if($pic_detail[$flag]->check_url == 1)
145
+ {
146
+ if($image_content[1] == 1)
147
  {
148
  ?>
149
+ <div class="imgContainerSingle">
150
+ <a href="<?php echo $pic_detail[$flag]->url;?>" target="_blank">
151
+ <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:146px;<?php echo $css_image_thumbnail; ?>" />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
152
  </a>
153
+ </div>
154
+ <?php
 
155
  }
156
  }
157
+ else
158
  {
159
+ ?>
160
+ <div class="imgContainerSingle">
161
+ <a class="titan-lb_<?php echo $unique_id;?>" data-titan-lightbox="on" data-titan-group="gallery" href="<?php echo $pic_detail[$flag]->pic_path; ?>" title="<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>">
162
+ <?php
163
  if($image_content[1] == 1)
164
  {
165
+ if($pic_detail[$flag]->video == 1)
166
  {
167
  ?>
168
+ <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg');?>" style="margin-left:5px;width:146px;<?php echo $css_image_thumbnail; ?>" />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
169
  <?php
170
  }
171
  else
172
  {
173
  ?>
174
+ <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:146px;<?php echo $css_image_thumbnail; ?>" />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
175
  <?php
176
  }
177
+ ?>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
178
  </a>
179
+ </div>
180
+ <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
181
  }
182
  }
183
  }
184
+ }
185
+ else
186
+ {
187
+ if(($flag % $images_in_row[1] == 0) && $flag != 0)
188
  {
189
+ ?>
190
 
191
+ <?php
192
+
193
+ if($pic_detail[$flag]->check_url == 1)
194
  {
 
 
 
195
  if($image_content[1] == 1)
196
  {
197
+ ?>
198
+ <div class="imgContainerSingle">
199
+ <a href="<?php echo $pic_detail[$flag]->url;?>" target="_blank">
200
+ <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:146px;<?php echo $css_image_thumbnail; ?>" />
201
+ </a>
202
+ </div>
 
 
 
 
203
  <?php
 
204
  }
205
+ }
206
+ else
207
+ {
208
+ if($pic_detail[$flag]->description == "")
209
  {
210
+ ?>
211
+ <div class="imgContainerSingle">
212
+ <a class="titan-lb_<?php echo $unique_id;?>" data-titan-lightbox="on" data-titan-group="gallery" href="<?php echo stripcslashes($pic_detail[$flag]->pic_path); ?>" title="<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>">
 
 
 
 
 
 
 
213
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
214
  }
215
  else
216
  {
217
+ ?>
218
+ <div class="imgContainerSingle">
219
+ <a class="titan-lb_<?php echo $unique_id;?>" data-titan-lightbox="on" data-titan-group="gallery" href="<?php echo stripcslashes($pic_detail[$flag]->pic_path); ?>" title="<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?> (<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->description)); ?>)">
220
+ <?php
221
+ }
 
 
 
 
 
 
 
 
222
  if($image_content[1] == 1)
223
  {
224
+ ?>
225
+ <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:146px;<?php echo $css_image_thumbnail; ?>" />
226
+ </a>
227
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
228
  <?php
 
229
  }
230
+ }
231
+ }
232
+ else
233
+ {
234
+
235
+ if($pic_detail[$flag]->check_url == 1)
236
+ {
237
+ if($image_content[1] == 1)
238
  {
239
+ ?>
240
+ <div class="imgContainerSingle">
241
+ <a href="<?php echo $pic_detail[$flag]->url;?>" target="_blank">
242
+ <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:146px;<?php echo $css_image_thumbnail; ?>" />
243
+ </a>
244
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
245
  <?php
 
 
246
  }
247
  }
248
  else
249
  {
250
+ if($pic_detail[$flag]->description == "")
251
  {
252
+ ?>
253
+ <div class="imgContainerSingle">
254
+ <a class="titan-lb_<?php echo $unique_id;?>" data-titan-lightbox="on" data-titan-group="gallery" href="<?php echo stripcslashes($pic_detail[$flag]->pic_path); ?>" title="<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?>">
255
+ <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
256
  }
257
  else
258
  {
259
+ ?>
260
+ <div class="imgContainerSingle">
261
+ <a class="titan-lb_<?php echo $unique_id;?>" data-titan-lightbox="on" data-titan-group="gallery" href="<?php echo stripcslashes($pic_detail[$flag]->pic_path); ?>" title="<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->title)); ?> (<?php echo stripcslashes(htmlspecialchars($pic_detail[$flag]->description)); ?>)">
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
262
  <?php
 
263
  }
264
+ if($image_content[1] == 1)
265
  {
266
+ ?>
267
+ <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:146px;<?php echo $css_image_thumbnail; ?>" />
268
+ </a>
269
+ </div>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
270
  <?php
 
271
  }
272
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
273
  }
274
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
275
  }
276
  ?>
277
+ </div>
278
+
279
+ <script type="text/javascript">
280
+ jQuery(document).ready(function() {
281
+ jQuery('.titan-lb_<?php echo $unique_id;?>').lightbox({
282
+ beforeShow: function(){
283
+ jQuery(".lightbox-skin").css("background","<?php echo $lightbox_inline_bg_color[1]; ?>");
284
+ jQuery(".lightbox-overlay").css("background","<?php echo $litebox_bg_color_with_opacity; ?>");
285
+ jQuery(".lightbox-wrap").css("border-radius","<?php echo $overlay_border_radius[1]; ?>");
286
+ jQuery(".lightbox-wrap").css("-moz-border-radius","<?php echo $overlay_border_radius[1]; ?>");
287
+ jQuery(".lightbox-wrap").css("-webkit-border-radius","<?php echo $overlay_border_radius[1]; ?>");
288
+ jQuery(".lightbox-wrap").css("-khtml-border-radius","<?php echo $overlay_border_radius[1]; ?>");
289
+ jQuery(".lightbox-wrap").css("-o-border-radius","<?php echo $overlay_border_radius[1]; ?>");
290
+ jQuery(".lightbox-wrap").css("border","<?php echo $lightbox_bg_color_value;?>");
291
+ },
292
+ afterShow : function()
293
+ {
294
+ jQuery(".lightbox-title").css("color","<?php echo $lightbox_text_color[1]; ?>");
295
+ }
 
 
296
  });
297
+ });
298
+ var $container_<?php echo $unique_id;?> = jQuery('#view_bank_album_<?php echo $unique_id;?>');
299
+ $container_<?php echo $unique_id;?>.imagesLoaded( function(){
300
+ $container_<?php echo $unique_id;?>.masonry({
301
+
302
+ itemSelector : '.imgContainerSingle',
303
+ isAnimated: true,
304
+ animationOptions: {
305
+ duration: 750,
306
+ easing: 'linear',
307
+ queue: false
308
+ }
309
+ });
 
310
  });
311
+
312
+ </script>
313
+ <?php
314
+ }
 
315
  ?>
views/header.php CHANGED
@@ -13,23 +13,7 @@ $url = plugins_url('', __FILE__);
13
  </span>
14
  </div>
15
  <?php
16
- $pagename = 'temp';
17
- $fileName = GALLERY_BK_PLUGIN_DIR.'/lib/cache/'.$pagename.".txt";
18
- if(file_exists($fileName)==false)
19
- {
20
- ?>
21
- <div class="message red" >
22
- <span>
23
- <strong><?php _e("<p>Error : Thumbnails could not be displayed as permissions are missing.</p><p style='margin-top:10px'>Kindly contact Gallery Bank or your Host to prove Read/Write/Execute permissions to cache folder inside the lib folder of Gallery Bank Plugin.</p>", gallery_bank); ?></strong>
24
- </span>
25
- </div>
26
- <?php
27
- }
28
- else
29
- {
30
-
31
- }
32
- include_once GALLERY_BK_PLUGIN_DIR .'/install-script.php';
33
  ?>
34
 
35
 
13
  </span>
14
  </div>
15
  <?php
16
+ include_once GALLERY_BK_PLUGIN_DIR .'/install-script.php';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
17
  ?>
18
 
19
 
views/images_sorting.php CHANGED
@@ -76,8 +76,7 @@
76
  $pagination_value = str_replace(";","",$pagination[1]);
77
  $count = 1;
78
  $row_id_images = "";
79
- $pagename = 'temp';
80
- $fileName = GALLERY_BK_PLUGIN_DIR.'/lib/cache/'.$pagename.".txt";
81
  ?>
82
  <div class="block well" style="min-height:400px;">
83
  <div class="navbar">
@@ -100,52 +99,19 @@
100
  <form id="sort_album" class="form-horizontal" method="post" action="">
101
  <div id="view_bank_album">
102
  <?php
103
- if($pagination_value == 1)
104
- {
105
- ?>
106
- <table class='table table-striped' id='images_view_data_table'>
107
- <tbody>
108
- <?php
109
- }
110
  for ($flag = 0; $flag <count($pic_detail); $flag++)
111
  {
112
  $css_image_thumbnail = "border:" . $image_border_size_value[1]. " solid " . $border_color[1] . ";border-radius:" . $image_radius_value[1]. ";-moz-border-radius:" . $image_radius_value[1]. ";-webkit-border-radius:" . $image_radius_value[1]. ";-khtml-border-radius:" . $image_radius_value[1]. ";-o-border-radius:" . $image_radius_value[1].";opacity:".$image_opacity[1].";filter:alpha(opacity=".$image_opacity[1] * 100 . ");-ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=".$image_opacity[1] * 100 . ")';-moz-opacity:" . $image_opacity[1] . ";-khtml-opacity:".$image_opacity[1]. ";";
113
- if($pagination_value == 1)
114
- {
115
- if($count == 1)
116
- {
117
- ?>
118
- <tr id="row_<?php echo $pic_detail[$flag]->pic_id; ?>"><td><div class="sort_table">
119
- <?php
120
- }
121
- }
122
  if($pic_detail[$flag]->description == "")
123
  {
124
  if(($flag % $images_in_row[1] == 0) && $flag != 0)
125
  {
126
- ?>
127
- </br>
128
- <?php
129
  if($image_content[1] == 1)
130
  {
131
- if(file_exists($fileName)!=false)
132
- {
133
- if($pic_detail[$flag]->video == 1)
134
- {
135
- ?>
136
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg')).'&h=150&w=150&zc=1&q=100';?>" style="margin:5px;<?php echo $css_image_thumbnail; ?>" />
137
- <?php
138
- }
139
- else
140
- {
141
- ?>
142
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h=150&w=150&zc=1&q=100';?>" style="margin:5px;<?php echo $css_image_thumbnail; ?>" />
143
- <?php
144
- }
145
-
146
- }
147
- else
148
- {
149
  if($pic_detail[$flag]->video == 1)
150
  {
151
  ?>
@@ -159,45 +125,10 @@
159
  <?php
160
  }
161
 
162
- }
163
 
164
- }
165
- else
166
- {
167
- if(file_exists($fileName)!=false)
168
- {
169
- if($pic_detail[$flag]->video == 1)
170
- {
171
- ?>
172
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg')).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin:5px;<?php echo $css_image_thumbnail; ?>" />
173
- <?php
174
- }
175
- else
176
- {
177
- ?>
178
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin:5px;<?php echo $css_image_thumbnail; ?>" />
179
- <?php
180
- }
181
-
182
- }
183
- else
184
- {
185
- if($pic_detail[$flag]->video == 1)
186
- {
187
- ?>
188
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg');?>" style="margin:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
189
- <?php
190
- }
191
- else
192
- {
193
- ?>
194
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
195
- <?php
196
- }
197
-
198
- }
199
 
200
  }
 
201
  $row_id_images .= "/" . $pic_detail[$flag]->pic_id;
202
 
203
  }
@@ -206,26 +137,8 @@
206
 
207
  if($image_content[1] == 1)
208
  {
209
- if(file_exists($fileName)!=false)
210
- {
211
- if($pic_detail[$flag]->video == 1)
212
- {
213
-
214
- ?>
215
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg')).'&h=150&w=150&zc=1&q=100';?>" style="margin:5px;<?php echo $css_image_thumbnail; ?>" />
216
- <?php
217
- }
218
- else
219
- {
220
- ?>
221
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h=150&w=150&zc=1&q=100';?>" style="margin:5px;<?php echo $css_image_thumbnail; ?>" />
222
- <?php
223
- }
224
-
225
-
226
- }
227
- else
228
- {
229
  if($pic_detail[$flag]->video == 1)
230
  {
231
  ?>
@@ -239,46 +152,10 @@
239
  <?php
240
  }
241
 
242
- }
243
 
244
- }
245
- else
246
- {
247
- if(file_exists($fileName)!=false)
248
- {
249
- if($pic_detail[$flag]->video == 1)
250
- {
251
- ?>
252
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg')).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin:5px;<?php echo $css_image_thumbnail; ?>" />
253
- <?php
254
- }
255
- else
256
- {
257
- ?>
258
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin:5px;<?php echo $css_image_thumbnail; ?>" />
259
- <?php
260
- }
261
-
262
-
263
- }
264
- else
265
- {
266
- if($pic_detail[$flag]->video == 1)
267
- {
268
- ?>
269
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg');?>" style="margin:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
270
- <?php
271
- }
272
- else
273
- {
274
- ?>
275
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
276
- <?php
277
- }
278
-
279
- }
280
 
281
  }
 
282
  $row_id_images .= "-". $pic_detail[$flag]->pic_id;
283
  }
284
  }
@@ -286,29 +163,11 @@
286
  {
287
  if(($flag % $images_in_row[1] == 0) && $flag != 0)
288
  {
289
- ?>
290
- </br>
291
- <?php
292
  if($image_content[1] == 1)
293
  {
294
- if(file_exists($fileName)!=false)
295
- {
296
- if($pic_detail[$flag]->video == 1)
297
- {
298
- ?>
299
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg')).'&h=150&w=150&zc=1&q=100';?>" style="margin:5px;<?php echo $css_image_thumbnail; ?>" />
300
- <?php
301
- }
302
- else
303
- {
304
- ?>
305
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h=150&w=150&zc=1&q=100';?>" style="margin:5px;<?php echo $css_image_thumbnail; ?>" />
306
- <?php
307
- }
308
-
309
- }
310
- else
311
- {
312
  if($pic_detail[$flag]->video == 1)
313
  {
314
  ?>
@@ -322,73 +181,18 @@
322
  <?php
323
  }
324
 
325
- }
326
 
327
- }
328
- else
329
- {
330
- if(file_exists($fileName)!=false)
331
- {
332
- if($pic_detail[$flag]->video == 1)
333
- {
334
- ?>
335
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg')).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin:5px;<?php echo $css_image_thumbnail; ?>" />
336
- <?php
337
- }
338
- else
339
- {
340
- ?>
341
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin:5px;<?php echo $css_image_thumbnail; ?>" />
342
- <?php
343
- }
344
-
345
- }
346
- else
347
- {
348
- if($pic_detail[$flag]->video == 1)
349
- {
350
- ?>
351
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg');?>" style="margin:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
352
- <?php
353
- }
354
- else
355
- {
356
- ?>
357
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
358
- <?php
359
- }
360
-
361
- }
362
 
363
  }
 
364
  $row_id_images .= "/" . $pic_detail[$flag]->pic_id;
365
 
366
  }
367
  else
368
  {
369
- ?>
370
-
371
- <?php
372
  if($image_content[1] == 1)
373
  {
374
- if(file_exists($fileName)!=false)
375
- {
376
- if($pic_detail[$flag]->video == 1)
377
- {
378
- ?>
379
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg')).'&h=150&w=150&zc=1&q=100';?>" style="margin:5px;<?php echo $css_image_thumbnail; ?>" />
380
- <?php
381
- }
382
- else
383
- {
384
- ?>
385
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h=150&w=150&zc=1&q=100';?>" style="margin:5px;<?php echo $css_image_thumbnail; ?>" />
386
- <?php
387
- }
388
-
389
- }
390
- else
391
- {
392
  if($pic_detail[$flag]->video == 1)
393
  {
394
  ?>
@@ -402,74 +206,19 @@
402
  <?php
403
  }
404
 
405
- }
406
 
407
- }
408
- else
409
- {
410
- if(file_exists($fileName)!=false)
411
- {
412
- if($pic_detail[$flag]->video == 1)
413
- {
414
- ?>
415
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg')).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin:5px;<?php echo $css_image_thumbnail; ?>" />
416
- <?php
417
- }
418
- else
419
- {
420
- ?>
421
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL).'/lib/timthumb.php?src='.trim(stripcslashes($pic_detail[$flag]->pic_path)).'&h='.$image_height[1].'&w='.$image_width[1].'&zc=1&q=100';?>" style="margin:5px;<?php echo $css_image_thumbnail; ?>" />
422
- <?php
423
- }
424
-
425
- }
426
- else
427
- {
428
- if($pic_detail[$flag]->video == 1)
429
- {
430
- ?>
431
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg');?>" style="margin:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
432
- <?php
433
- }
434
- else
435
- {
436
- ?>
437
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin:5px;width:<?php echo $image_width[1];?>;height:<?php echo $image_height[1];?>;<?php echo $css_image_thumbnail; ?>" />
438
- <?php
439
- }
440
-
441
- }
442
 
443
  }
 
444
  $row_id_images .= "-". $pic_detail[$flag]->pic_id;
445
 
446
  }
447
  }
448
- if($pagination_value == 1)
449
- {
450
- if($count == $images_in_row[1])
451
- {
452
- ?></div>
453
- </td></tr>
454
- <?php
455
- $count = 1;
456
- }
457
- else
458
- {
459
- $count++;
460
- }
461
- }
462
 
463
  }
464
- if($pagination_value == 1)
465
- {
466
 
467
  ?>
468
- </tbody>
469
- </table>
470
- <?php
471
- }
472
- ?>
473
  </div>
474
  <input type="hidden" id="uxHdn_ids" name="uxHdn_ids" value="" />
475
  </form>
@@ -551,19 +300,6 @@
551
  }
552
  });
553
  }
554
- oTable = jQuery('#images_view_data_table').dataTable
555
- ({
556
- "bJQueryUI": false,
557
- "bAutoWidth": true,
558
- "sPaginationType": "full_numbers",
559
- "sDom": '<"datatable-header"fl>t<"datatable-footer"ip>',
560
- "oLanguage":
561
- {
562
- "sLengthMenu": "_MENU_"
563
- },
564
- "aaSorting": [[ 0, "desc" ]],
565
- "aoColumnDefs": [{ "bSortable": false, "aTargets": [0] },{ "bSortable": false, "aTargets": [0] }],
566
- "bSort": false
567
- });
568
  });
569
  </script>
76
  $pagination_value = str_replace(";","",$pagination[1]);
77
  $count = 1;
78
  $row_id_images = "";
79
+
 
80
  ?>
81
  <div class="block well" style="min-height:400px;">
82
  <div class="navbar">
99
  <form id="sort_album" class="form-horizontal" method="post" action="">
100
  <div id="view_bank_album">
101
  <?php
102
+
 
 
 
 
 
 
103
  for ($flag = 0; $flag <count($pic_detail); $flag++)
104
  {
105
  $css_image_thumbnail = "border:" . $image_border_size_value[1]. " solid " . $border_color[1] . ";border-radius:" . $image_radius_value[1]. ";-moz-border-radius:" . $image_radius_value[1]. ";-webkit-border-radius:" . $image_radius_value[1]. ";-khtml-border-radius:" . $image_radius_value[1]. ";-o-border-radius:" . $image_radius_value[1].";opacity:".$image_opacity[1].";filter:alpha(opacity=".$image_opacity[1] * 100 . ");-ms-filter:'progid:DXImageTransform.Microsoft.Alpha(Opacity=".$image_opacity[1] * 100 . ")';-moz-opacity:" . $image_opacity[1] . ";-khtml-opacity:".$image_opacity[1]. ";";
106
+
 
 
 
 
 
 
 
 
107
  if($pic_detail[$flag]->description == "")
108
  {
109
  if(($flag % $images_in_row[1] == 0) && $flag != 0)
110
  {
111
+
 
 
112
  if($image_content[1] == 1)
113
  {
114
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
115
  if($pic_detail[$flag]->video == 1)
116
  {
117
  ?>
125
  <?php
126
  }
127
 
 
128
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
129
 
130
  }
131
+
132
  $row_id_images .= "/" . $pic_detail[$flag]->pic_id;
133
 
134
  }
137
 
138
  if($image_content[1] == 1)
139
  {
140
+
141
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
142
  if($pic_detail[$flag]->video == 1)
143
  {
144
  ?>
152
  <?php
153
  }
154
 
 
155
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
156
 
157
  }
158
+
159
  $row_id_images .= "-". $pic_detail[$flag]->pic_id;
160
  }
161
  }
163
  {
164
  if(($flag % $images_in_row[1] == 0) && $flag != 0)
165
  {
166
+
 
 
167
  if($image_content[1] == 1)
168
  {
169
+
170
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
171
  if($pic_detail[$flag]->video == 1)
172
  {
173
  ?>
181
  <?php
182
  }
183
 
 
184
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
185
 
186
  }
187
+
188
  $row_id_images .= "/" . $pic_detail[$flag]->pic_id;
189
 
190
  }
191
  else
192
  {
 
 
 
193
  if($image_content[1] == 1)
194
  {
195
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
196
  if($pic_detail[$flag]->video == 1)
197
  {
198
  ?>
206
  <?php
207
  }
208
 
 
209
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
210
 
211
  }
212
+
213
  $row_id_images .= "-". $pic_detail[$flag]->pic_id;
214
 
215
  }
216
  }
217
+
 
 
 
 
 
 
 
 
 
 
 
 
 
218
 
219
  }
 
 
220
 
221
  ?>
 
 
 
 
 
222
  </div>
223
  <input type="hidden" id="uxHdn_ids" name="uxHdn_ids" value="" />
224
  </form>
300
  }
301
  });
302
  }
303
+
 
 
 
 
 
 
 
 
 
 
 
 
 
304
  });
305
  </script>