Gallery Bank: WordPress Photo Gallery Plugin - Version 2.0.20

Version Description

  • Few Bugs Fixed
  • Fixed Security Issues
  • Fixed Cross Scripting Issues
  • Compatibility with 3.7
Download this release

Release Info

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

Code changes from version 2.0.19 to 2.0.20

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.19
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.20
8
  Author URI: http://gallery-bank.com
9
  */
10
  ////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
lib/album-gallery-bank-class.php CHANGED
@@ -530,7 +530,7 @@ else
530
  else if($_REQUEST["param"] == "reorderControls")
531
  {
532
 
533
- $updateRecordsArray = $_POST['recordsArray'];
534
  $listingCounter = 1;
535
  foreach ($updateRecordsArray as $recordIDValue)
536
  {
@@ -551,7 +551,7 @@ else
551
  {
552
  $images_in_row = intval($_REQUEST['images_in_row']);
553
  $row_images_id = explode("/",esc_attr($_REQUEST['row_id_images']));
554
- $updateRecordsArray = $_POST['row'];
555
  $listingCounter = 1;
556
  $string_ids = "";
557
  foreach ($updateRecordsArray as $recordIDValue)
@@ -617,7 +617,7 @@ else
617
  }
618
  else if($_REQUEST['param'] == "reorder_td_controls")
619
  {
620
- $updateRecordsArray = $_POST['recordsArray'];
621
  $arr_sorting_orders = array();
622
  $row_images_id = explode("/",esc_attr($_REQUEST['row_id_images']));
623
  $record_val = "";
530
  else if($_REQUEST["param"] == "reorderControls")
531
  {
532
 
533
+ $updateRecordsArray = $_REQUEST['recordsArray'];
534
  $listingCounter = 1;
535
  foreach ($updateRecordsArray as $recordIDValue)
536
  {
551
  {
552
  $images_in_row = intval($_REQUEST['images_in_row']);
553
  $row_images_id = explode("/",esc_attr($_REQUEST['row_id_images']));
554
+ $updateRecordsArray = $_REQUEST['row'];
555
  $listingCounter = 1;
556
  $string_ids = "";
557
  foreach ($updateRecordsArray as $recordIDValue)
617
  }
618
  else if($_REQUEST['param'] == "reorder_td_controls")
619
  {
620
+ $updateRecordsArray = $_REQUEST['recordsArray'];
621
  $arr_sorting_orders = array();
622
  $row_images_id = explode("/",esc_attr($_REQUEST['row_id_images']));
623
  $record_val = "";
lib/front-view-album-class.php CHANGED
@@ -325,7 +325,7 @@
325
  }
326
  elseif($_REQUEST["param"] == "get_album_name")
327
  {
328
- $album_id = $_REQUEST['album_id'];
329
  $album_name = $wpdb->get_var
330
  (
331
  $wpdb->prepare
325
  }
326
  elseif($_REQUEST["param"] == "get_album_name")
327
  {
328
+ $album_id = intval($_REQUEST['album_id']);
329
  $album_name = $wpdb->get_var
330
  (
331
  $wpdb->prepare
lib/image_sorting_class.php CHANGED
@@ -1,307 +1,317 @@
1
  <?php
2
- if(isset($_REQUEST['param']))
 
 
 
3
  {
4
- if($_REQUEST['param'] == "album_sorting")
 
 
 
 
5
  {
6
- $album_id = $_REQUEST["id"];
7
- $pic_detail = $wpdb->get_results
8
- (
9
- $wpdb->prepare
10
- (
11
- "SELECT * FROM ". gallery_bank_pics(). " WHERE album_id = %d order by sorting_order asc",
12
- $album_id
13
- )
14
- );
15
- $album = $wpdb->get_row
16
- (
17
- $wpdb->prepare
18
- (
19
- "SELECT * FROM ".gallery_bank_albums()." where album_id = %d",
20
- $album_id
21
- )
22
- );
23
- $unique_id = rand(100,10000);
24
-
25
- $get_settings = $wpdb->get_var
26
- (
27
- $wpdb->prepare
28
- (
29
- "SELECT album_settings FROM ". gallery_bank_settings(). " WHERE album_id = %d",
30
- $album_id
31
- )
32
- );
33
- if($get_settings == 1)
34
  {
35
- $album_css = $wpdb->get_row
 
 
 
 
 
 
 
 
 
36
  (
37
  $wpdb->prepare
38
  (
39
- "SELECT * FROM ". gallery_bank_settings(). " WHERE album_settings = %d and album_id = %d",
40
- $get_settings,
41
- 0
42
  )
43
  );
44
- }
45
- else
46
- {
47
- $album_css = $wpdb->get_row
48
  (
49
  $wpdb->prepare
50
  (
51
- "SELECT * FROM ". gallery_bank_settings(). " WHERE album_settings = %d and album_id =%d",
52
- $get_settings,
53
  $album_id
54
  )
55
  );
56
- }
57
- $content = explode("/", $album_css->setting_content);
58
- $image_settings = explode(";", $content[0]);
59
- $image_content = explode(":", $image_settings[0]);
60
- $image_width = explode(":", $image_settings[1]);
61
- $image_height = explode(":", $image_settings[2]);
62
- $images_in_row = explode(":", $image_settings[3]);
63
- $image_opacity = explode(":", $image_settings[4]);
64
- $image_border_size_value = explode(":", $image_settings[5]);
65
- $image_radius_value = explode(":", $image_settings[6]);
66
- $border_color = explode(":", $image_settings[7]);
67
- $lightbox_settings = explode(";", $content[2]);
68
- $overlay_opacity = explode(":", $lightbox_settings[0]);
69
- $overlay_border_size_value = explode(":", $lightbox_settings[1]);
70
- $overlay_border_radius = explode(":", $lightbox_settings[2]);
71
- $lightbox_text_color = explode(":", $lightbox_settings[3]);
72
- $overlay_border_color = explode(":", $lightbox_settings[4]);
73
- $lightbox_inline_bg_color = explode(":", $lightbox_settings[5]);
74
- $lightbox_bg_color = explode(":", $lightbox_settings[6]);
75
- $litebox_bg_color_substring = str_replace("rgb","rgba",substr($lightbox_bg_color[1], 0, -1));
76
- $litebox_bg_color_with_opacity = $litebox_bg_color_substring. "," . $overlay_opacity[1] . ")";
77
- $lightbox_bg_color_value= $overlay_border_size_value[1] . " solid " . $overlay_border_color[1];
78
- $pagination = explode(":", $content[4]);
79
- $pagination_value = str_replace(";","",$pagination[1]);
80
- $count = 1;
81
- $row_id_images = "";
82
-
83
- if($album_id != 0)
84
- {
85
- ?>
86
- <div class="row-fluid" >
87
- <div class="span12">
88
- <div class="block well">
89
- <div class="navbar">
90
- <div class="navbar-inner">
91
- <h5><?php echo stripcslashes(htmlspecialchars_decode($album->album_name));?></h5>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  </div>
93
- </div>
94
- <form id="sort_album" class="form-horizontal" method="post" action="">
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
- ?>
115
- <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:150px;height:155px;<?php echo $css_image_thumbnail; ?>" />
116
- <?php
117
- }
118
- else
119
- {
120
- ?>
121
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin:5px;width:150px;height:155px;<?php echo $css_image_thumbnail; ?>" />
122
- <?php
123
-
124
- }
125
-
126
-
127
-
128
- }
129
 
130
- $row_id_images .= "/" . $pic_detail[$flag]->pic_id;
131
-
132
- }
133
- else
134
- {
135
-
136
- if($image_content[1] == 1)
137
- {
138
-
139
- if($pic_detail[$flag]->video == 1)
140
- {
141
- ?>
142
- <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:150px;height:155px;<?php echo $css_image_thumbnail; ?>" />
143
- <?php
144
- }
145
- else
146
- {
147
- ?>
148
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin:5px;width:150px;height:155px;<?php echo $css_image_thumbnail; ?>" />
149
- <?php
150
 
151
- }
152
 
 
153
 
 
154
 
155
- }
 
 
156
 
157
- $row_id_images .= "-". $pic_detail[$flag]->pic_id;
158
-
159
- }
160
- }
161
- else
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
- ?>
173
- <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:150px;height:155px;<?php echo $css_image_thumbnail; ?>" />
174
- <?php
175
- }
176
- else
177
- {
178
- ?>
179
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin:5px;width:150px;height:155px;<?php echo $css_image_thumbnail; ?>" />
180
- <?php
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
- ?>
200
- <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:150px;height:155px;<?php echo $css_image_thumbnail; ?>" />
201
- <?php
202
- }
203
- else
204
- {
205
- ?>
206
- <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin:5px;width:150px;height:155px;<?php echo $css_image_thumbnail; ?>" />
207
- <?php
 
 
 
 
 
 
 
 
 
 
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>
227
  </div>
228
  </div>
229
- </div>
230
- <?php
231
- }
232
- ?>
233
- <script>
234
- var start_pic_ids = [];
235
-
236
  <?php
237
- $row_id_images = substr($row_id_images, 1);
238
  ?>
239
-
240
- jQuery("#uxHdn_ids").val("<?php echo $row_id_images; ?>");
241
- if(jQuery("#pagination_val").val() == "1")
242
- {
243
- jQuery("#images_view_data_table tbody").sortable
244
- ({
245
- opacity: 0.6,
246
- cursor: 'move',
247
- update: function()
248
- {
249
- var row_ids = jQuery("#uxHdn_ids").val();
250
- jQuery.post(ajaxurl, jQuery(this).sortable("serialize") +"&row_id_images=" +row_ids+"&images_in_row=<?php echo $images_in_row[1]; ?>&param=reorderRows&action=album_gallery_library", function(data)
 
 
 
251
  {
252
- jQuery("#ux_album_name").val(0);
253
- });
254
- }
255
- });
256
-
257
- jQuery(".sort_table").sortable
258
- ({
259
- opacity: 0.6,
260
- cursor: 'move',
261
- update: function()
262
- {
263
- var row_ids = jQuery("#uxHdn_ids").val();
264
- jQuery.post(ajaxurl, jQuery(this).sortable("serialize")+"&row_id_images=" +row_ids+"&param=reorder_td_controls&action=album_gallery_library", function(data)
265
  {
266
- var array_data = jQuery.trim(data).split("_");
267
- var arr = array_data[0].split(",");
268
- var new_tr_string = array_data[1];
269
- jQuery("#uxHdn_ids").val(new_tr_string);
270
- var new_first_id = arr[0];
271
- var tr_id = "";
272
- for(flag = 0; flag < arr.length - 1; flag++)
273
  {
274
- var id = "row_" + arr[flag];
275
- tr_id = jQuery("#"+id).length;
276
- if(tr_id == 1)
 
 
 
 
277
  {
278
- jQuery("#"+id).attr("id","row_"+new_first_id);
 
 
 
 
 
279
  }
280
- }
281
- });
282
- }
283
- });
284
- }
285
- else
286
- {
287
- jQuery("#view_bank_album").sortable
288
- ({
289
- opacity: 0.6,
290
- cursor: 'move',
291
- update: function()
292
- {
293
- jQuery.post(ajaxurl, jQuery(this).sortable("serialize")+"&param=reorderControls&action=album_gallery_library", function(data)
294
  {
295
- jQuery("#ux_album_name").val(0);
296
- });
297
- }
298
- });
299
- }
 
 
 
300
 
301
-
302
- </script>
303
- <?php
304
- die();
305
  }
306
  }
307
  ?>
1
  <?php
2
+ global $wpdb;
3
+ global $current_user;
4
+ $current_user = wp_get_current_user();
5
+ if (!current_user_can("edit_posts") && ! current_user_can("edit_pages"))
6
  {
7
+ return;
8
+ }
9
+ else
10
+ {
11
+ if(isset($_REQUEST['param']))
12
  {
13
+ if($_REQUEST['param'] == "album_sorting")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
  {
15
+ $album_id = intval($_REQUEST["id"]);
16
+ $pic_detail = $wpdb->get_results
17
+ (
18
+ $wpdb->prepare
19
+ (
20
+ "SELECT * FROM ". gallery_bank_pics(). " WHERE album_id = %d order by sorting_order asc",
21
+ $album_id
22
+ )
23
+ );
24
+ $album = $wpdb->get_row
25
  (
26
  $wpdb->prepare
27
  (
28
+ "SELECT * FROM ".gallery_bank_albums()." where album_id = %d",
29
+ $album_id
 
30
  )
31
  );
32
+ $unique_id = rand(100,10000);
33
+
34
+ $get_settings = $wpdb->get_var
 
35
  (
36
  $wpdb->prepare
37
  (
38
+ "SELECT album_settings FROM ". gallery_bank_settings(). " WHERE album_id = %d",
 
39
  $album_id
40
  )
41
  );
42
+ if($get_settings == 1)
43
+ {
44
+ $album_css = $wpdb->get_row
45
+ (
46
+ $wpdb->prepare
47
+ (
48
+ "SELECT * FROM ". gallery_bank_settings(). " WHERE album_settings = %d and album_id = %d",
49
+ $get_settings,
50
+ 0
51
+ )
52
+ );
53
+ }
54
+ else
55
+ {
56
+ $album_css = $wpdb->get_row
57
+ (
58
+ $wpdb->prepare
59
+ (
60
+ "SELECT * FROM ". gallery_bank_settings(). " WHERE album_settings = %d and album_id =%d",
61
+ $get_settings,
62
+ $album_id
63
+ )
64
+ );
65
+ }
66
+ $content = explode("/", $album_css->setting_content);
67
+ $image_settings = explode(";", $content[0]);
68
+ $image_content = explode(":", $image_settings[0]);
69
+ $image_width = explode(":", $image_settings[1]);
70
+ $image_height = explode(":", $image_settings[2]);
71
+ $images_in_row = explode(":", $image_settings[3]);
72
+ $image_opacity = explode(":", $image_settings[4]);
73
+ $image_border_size_value = explode(":", $image_settings[5]);
74
+ $image_radius_value = explode(":", $image_settings[6]);
75
+ $border_color = explode(":", $image_settings[7]);
76
+ $lightbox_settings = explode(";", $content[2]);
77
+ $overlay_opacity = explode(":", $lightbox_settings[0]);
78
+ $overlay_border_size_value = explode(":", $lightbox_settings[1]);
79
+ $overlay_border_radius = explode(":", $lightbox_settings[2]);
80
+ $lightbox_text_color = explode(":", $lightbox_settings[3]);
81
+ $overlay_border_color = explode(":", $lightbox_settings[4]);
82
+ $lightbox_inline_bg_color = explode(":", $lightbox_settings[5]);
83
+ $lightbox_bg_color = explode(":", $lightbox_settings[6]);
84
+ $litebox_bg_color_substring = str_replace("rgb","rgba",substr($lightbox_bg_color[1], 0, -1));
85
+ $litebox_bg_color_with_opacity = $litebox_bg_color_substring. "," . $overlay_opacity[1] . ")";
86
+ $lightbox_bg_color_value= $overlay_border_size_value[1] . " solid " . $overlay_border_color[1];
87
+ $pagination = explode(":", $content[4]);
88
+ $pagination_value = str_replace(";","",$pagination[1]);
89
+ $count = 1;
90
+ $row_id_images = "";
91
+
92
+ if($album_id != 0)
93
+ {
94
+ ?>
95
+ <div class="row-fluid" >
96
+ <div class="span12">
97
+ <div class="block well">
98
+ <div class="navbar">
99
+ <div class="navbar-inner">
100
+ <h5><?php echo stripcslashes(htmlspecialchars_decode($album->album_name));?></h5>
101
+ </div>
102
  </div>
103
+ <form id="sort_album" class="form-horizontal" method="post" action="">
104
+ <input type="hidden" id="pagination_val" name="pagination_val" value="<?php echo $pagination_value; ?>" />
105
+ <div id="view_bank_album">
106
+ <?php
107
+
108
+ for ($flag = 0; $flag <count($pic_detail); $flag++)
 
 
 
 
 
109
  {
110
+ $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]. ";";
111
+
112
+ if($pic_detail[$flag]->description == "")
113
  {
114
+ if(($flag % $images_in_row[1] == 0) && $flag != 0)
115
+ {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
116
 
117
+ if($image_content[1] == 1)
118
+ {
119
+
120
+
121
+ if($pic_detail[$flag]->video == 1)
122
+ {
123
+ ?>
124
+ <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:150px;height:155px;<?php echo $css_image_thumbnail; ?>" />
125
+ <?php
126
+ }
127
+ else
128
+ {
129
+ ?>
130
+ <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin:5px;width:150px;height:155px;<?php echo $css_image_thumbnail; ?>" />
131
+ <?php
132
+
133
+ }
134
+
 
 
135
 
 
136
 
137
+ }
138
 
139
+ $row_id_images .= "/" . $pic_detail[$flag]->pic_id;
140
 
141
+ }
142
+ else
143
+ {
144
 
145
+ if($image_content[1] == 1)
146
+ {
147
+
148
+ if($pic_detail[$flag]->video == 1)
149
+ {
150
+ ?>
151
+ <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:150px;height:155px;<?php echo $css_image_thumbnail; ?>" />
152
+ <?php
153
+ }
154
+ else
155
+ {
156
+ ?>
157
+ <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin:5px;width:150px;height:155px;<?php echo $css_image_thumbnail; ?>" />
158
+ <?php
159
+
160
+ }
161
+
 
 
 
 
 
 
 
162
 
 
163
 
164
+ }
165
 
166
+ $row_id_images .= "-". $pic_detail[$flag]->pic_id;
167
 
168
+ }
 
 
 
169
  }
170
+ else
171
  {
172
+ if(($flag % $images_in_row[1] == 0) && $flag != 0)
173
+ {
174
+
175
+ if($image_content[1] == 1)
176
+ {
177
+
178
+
179
+ if($pic_detail[$flag]->video == 1)
180
+ {
181
+ ?>
182
+ <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:150px;height:155px;<?php echo $css_image_thumbnail; ?>" />
183
+ <?php
184
+ }
185
+ else
186
+ {
187
+ ?>
188
+ <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin:5px;width:150px;height:155px;<?php echo $css_image_thumbnail; ?>" />
189
+ <?php
190
+
191
+ }
192
+
193
+
194
+
195
+ }
196
 
197
+ $row_id_images .= "/" . $pic_detail[$flag]->pic_id;
198
 
199
+ }
200
+ else
201
+ {
202
+ if($image_content[1] == 1)
203
+ {
204
+
205
+
206
+ if($pic_detail[$flag]->video == 1)
207
+ {
208
+ ?>
209
+ <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:150px;height:155px;<?php echo $css_image_thumbnail; ?>" />
210
+ <?php
211
+ }
212
+ else
213
+ {
214
+ ?>
215
+ <img id="recordsArray_<?php echo $pic_detail[$flag]->pic_id; ?>" src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin:5px;width:150px;height:155px;<?php echo $css_image_thumbnail; ?>" />
216
+ <?php
217
+
218
+ }
219
+
220
 
 
221
 
222
+ }
223
 
224
+ $row_id_images .= "-". $pic_detail[$flag]->pic_id;
225
 
226
+ }
 
 
 
227
  }
228
+
229
+
230
  }
231
 
232
+ ?>
233
+ </div>
234
+ <input type="hidden" id="uxHdn_ids" name="uxHdn_ids" value="" />
235
+ </form>
236
+ </div>
 
 
237
  </div>
238
  </div>
 
 
 
 
 
 
 
239
  <?php
240
+ }
241
  ?>
242
+ <script>
243
+ var start_pic_ids = [];
244
+
245
+ <?php
246
+ $row_id_images = substr($row_id_images, 1);
247
+ ?>
248
+
249
+ jQuery("#uxHdn_ids").val("<?php echo $row_id_images; ?>");
250
+ if(jQuery("#pagination_val").val() == "1")
251
+ {
252
+ jQuery("#images_view_data_table tbody").sortable
253
+ ({
254
+ opacity: 0.6,
255
+ cursor: 'move',
256
+ update: function()
257
  {
258
+ var row_ids = jQuery("#uxHdn_ids").val();
259
+ jQuery.post(ajaxurl, jQuery(this).sortable("serialize") +"&row_id_images=" +row_ids+"&images_in_row=<?php echo $images_in_row[1]; ?>&param=reorderRows&action=album_gallery_library", function(data)
260
+ {
261
+ jQuery("#ux_album_name").val(0);
262
+ });
263
+ }
264
+ });
265
+
266
+ jQuery(".sort_table").sortable
267
+ ({
268
+ opacity: 0.6,
269
+ cursor: 'move',
270
+ update: function()
271
  {
272
+ var row_ids = jQuery("#uxHdn_ids").val();
273
+ jQuery.post(ajaxurl, jQuery(this).sortable("serialize")+"&row_id_images=" +row_ids+"&param=reorder_td_controls&action=album_gallery_library", function(data)
 
 
 
 
 
274
  {
275
+ var array_data = jQuery.trim(data).split("_");
276
+ var arr = array_data[0].split(",");
277
+ var new_tr_string = array_data[1];
278
+ jQuery("#uxHdn_ids").val(new_tr_string);
279
+ var new_first_id = arr[0];
280
+ var tr_id = "";
281
+ for(flag = 0; flag < arr.length - 1; flag++)
282
  {
283
+ var id = "row_" + arr[flag];
284
+ tr_id = jQuery("#"+id).length;
285
+ if(tr_id == 1)
286
+ {
287
+ jQuery("#"+id).attr("id","row_"+new_first_id);
288
+ }
289
  }
290
+ });
291
+ }
292
+ });
293
+ }
294
+ else
295
+ {
296
+ jQuery("#view_bank_album").sortable
297
+ ({
298
+ opacity: 0.6,
299
+ cursor: 'move',
300
+ update: function()
 
 
 
301
  {
302
+ jQuery.post(ajaxurl, jQuery(this).sortable("serialize")+"&param=reorderControls&action=album_gallery_library", function(data)
303
+ {
304
+ jQuery("#ux_album_name").val(0);
305
+ });
306
+ }
307
+ });
308
+ }
309
+
310
 
311
+ </script>
312
+ <?php
313
+ die();
314
+ }
315
  }
316
  }
317
  ?>
readme.txt CHANGED
@@ -1,9 +1,9 @@
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
 
@@ -18,7 +18,7 @@ It has the ability to upload images, with options like adding, editing, re-order
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
 
@@ -26,9 +26,11 @@ Gallery Bank is designed to adapt each portfolio to any situation and can be eas
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
 
@@ -144,6 +146,13 @@ With this bulk deletion feature, you can now delete the pictures you want in bul
144
 
145
  == Changelog ==
146
 
 
 
 
 
 
 
 
147
  = 2.0.19 =
148
 
149
  * 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, widget, gallery bank
4
  Requires at least: 3.3
5
+ Tested up to: 3.7.1
6
+ Stable tag: 2.0.20
7
  License: GPLv3 or later
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
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
+ **December 3, 2013: We're happy to announce that Gallery Bank reached 57,600+ plugin downloads in only 6 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
 
26
 
27
  <a href="https://www.facebook.com/GalleryBank/" target="_blank">Like & Support us on Facebook</a>
28
 
 
29
 
30
+ **The following are other recommended plugins by the author of Captcha Bank.**
31
+
32
+ * [Captcha Bank](http://wordpress.org/extend/plugins/captcha-bank/) - An easy to use powerful wordpress Captcha Plugin to prevent spam on your site.lbums.
33
+ * [Contact Bank](http://wordpress.org/extend/plugins/contact-bank/) - Contact Bank allows you to add a contact form easilly and simply to a post or a page.
34
 
35
  = Key Features in Standard Version =
36
 
146
 
147
  == Changelog ==
148
 
149
+ = 2.0.20 =
150
+
151
+ * Few Bugs Fixed
152
+ * Fixed Security Issues
153
+ * Fixed Cross Scripting Issues
154
+ * Compatibility with 3.7
155
+
156
  = 2.0.19 =
157
 
158
  * Few Bugs Fixed
views/add-new-album.php CHANGED
@@ -1,4 +1,13 @@
1
  <?php
 
 
 
 
 
 
 
 
 
2
  $album_css = $wpdb -> get_row
3
  (
4
  $wpdb -> prepare
@@ -1284,4 +1293,6 @@ jQuery(".inline").colorbox({inline:true, width:"700px"});
1284
  }
1285
  }
1286
  }
1287
- </script>
 
 
1
  <?php
2
+ global $wpdb;
3
+ global $current_user;
4
+ $current_user = wp_get_current_user();
5
+ if (!current_user_can("edit_posts") && ! current_user_can("edit_pages"))
6
+ {
7
+ return;
8
+ }
9
+ else
10
+ {
11
  $album_css = $wpdb -> get_row
12
  (
13
  $wpdb -> prepare
1293
  }
1294
  }
1295
  }
1296
+ </script>
1297
+ <?php
1298
+ }?>
views/album_preview.php CHANGED
@@ -1,6 +1,15 @@
1
  <?php
 
 
 
 
 
 
 
 
 
2
  global $wpdb;
3
- $album_id = $_REQUEST['album_id'];
4
  $albums = $wpdb->get_var
5
  (
6
  $wpdb->prepare
@@ -11,325 +20,326 @@
11
  );
12
  if($albums > 0)
13
  {
14
- $pic_detail = $wpdb->get_results
15
- (
16
- $wpdb->prepare
17
- (
18
- "SELECT * FROM ". gallery_bank_pics(). " WHERE album_id = %d order by sorting_order asc",
19
- $album_id
20
- )
21
- );
22
- $album = $wpdb->get_row
23
- (
24
- $wpdb->prepare
25
- (
26
- "SELECT * FROM ".gallery_bank_albums()." where album_id = %d",
27
- $album_id
28
- )
29
- );
30
- $unique_id = rand(100,10000);
31
-
32
- $get_settings = $wpdb->get_var
33
- (
34
- $wpdb->prepare
35
- (
36
- "SELECT album_settings FROM ". gallery_bank_settings(). " WHERE album_id = %d ",
37
- $album_id
38
- )
39
- );
40
- if($get_settings == 1)
41
- {
42
- $album_css = $wpdb->get_row
43
  (
44
  $wpdb->prepare
45
  (
46
- "SELECT * FROM ". gallery_bank_settings(). " WHERE album_settings = %d and album_id = %d",
47
- $get_settings,
48
- 0
49
  )
50
  );
51
- }
52
- else
53
- {
54
- $album_css = $wpdb->get_row
55
  (
56
  $wpdb->prepare
57
  (
58
- "SELECT * FROM ". gallery_bank_settings(). " WHERE album_settings = %d and album_id =%d",
59
- $get_settings,
60
  $album_id
61
  )
62
  );
63
- }
64
- $content = explode("/", $album_css->setting_content);
65
- $image_settings = explode(";", $content[0]);
66
- $image_content = explode(":", $image_settings[0]);
67
- $image_width = explode(":", $image_settings[1]);
68
- $image_height = explode(":", $image_settings[2]);
69
- $images_in_row = explode(":", $image_settings[3]);
70
- $image_opacity = explode(":", $image_settings[4]);
71
- $image_border_size_value = explode(":", $image_settings[5]);
72
- $image_radius_value = explode(":", $image_settings[6]);
73
- $border_color = explode(":", $image_settings[7]);
74
-
75
- $lightbox_settings = explode(";", $content[2]);
76
- $overlay_opacity = explode(":", $lightbox_settings[0]);
77
- $overlay_border_size_value = explode(":", $lightbox_settings[1]);
78
- $overlay_border_radius = explode(":", $lightbox_settings[2]);
79
- $lightbox_text_color = explode(":", $lightbox_settings[3]);
80
- $overlay_border_color = explode(":", $lightbox_settings[4]);
81
- $lightbox_inline_bg_color = explode(":", $lightbox_settings[5]);
82
- $lightbox_bg_color = explode(":", $lightbox_settings[6]);
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">
91
- <h5><?php _e( "Preview Album ", gallery_bank ); ?></h5>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
92
  </div>
93
- </div>
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
  ?>
1
  <?php
2
+ global $wpdb;
3
+ global $current_user;
4
+ $current_user = wp_get_current_user();
5
+ if (!current_user_can("edit_posts") && ! current_user_can("edit_pages"))
6
+ {
7
+ return;
8
+ }
9
+ else
10
+ {
11
  global $wpdb;
12
+ $album_id = intval($_REQUEST['album_id']);
13
  $albums = $wpdb->get_var
14
  (
15
  $wpdb->prepare
20
  );
21
  if($albums > 0)
22
  {
23
+ $pic_detail = $wpdb->get_results
24
+ (
25
+ $wpdb->prepare
26
+ (
27
+ "SELECT * FROM ". gallery_bank_pics(). " WHERE album_id = %d order by sorting_order asc",
28
+ $album_id
29
+ )
30
+ );
31
+ $album = $wpdb->get_row
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
32
  (
33
  $wpdb->prepare
34
  (
35
+ "SELECT * FROM ".gallery_bank_albums()." where album_id = %d",
36
+ $album_id
 
37
  )
38
  );
39
+ $unique_id = rand(100,10000);
40
+
41
+ $get_settings = $wpdb->get_var
 
42
  (
43
  $wpdb->prepare
44
  (
45
+ "SELECT album_settings FROM ". gallery_bank_settings(). " WHERE album_id = %d ",
 
46
  $album_id
47
  )
48
  );
49
+ if($get_settings == 1)
50
+ {
51
+ $album_css = $wpdb->get_row
52
+ (
53
+ $wpdb->prepare
54
+ (
55
+ "SELECT * FROM ". gallery_bank_settings(). " WHERE album_settings = %d and album_id = %d",
56
+ $get_settings,
57
+ 0
58
+ )
59
+ );
60
+ }
61
+ else
62
+ {
63
+ $album_css = $wpdb->get_row
64
+ (
65
+ $wpdb->prepare
66
+ (
67
+ "SELECT * FROM ". gallery_bank_settings(). " WHERE album_settings = %d and album_id =%d",
68
+ $get_settings,
69
+ $album_id
70
+ )
71
+ );
72
+ }
73
+ $content = explode("/", $album_css->setting_content);
74
+ $image_settings = explode(";", $content[0]);
75
+ $image_content = explode(":", $image_settings[0]);
76
+ $image_width = explode(":", $image_settings[1]);
77
+ $image_height = explode(":", $image_settings[2]);
78
+ $images_in_row = explode(":", $image_settings[3]);
79
+ $image_opacity = explode(":", $image_settings[4]);
80
+ $image_border_size_value = explode(":", $image_settings[5]);
81
+ $image_radius_value = explode(":", $image_settings[6]);
82
+ $border_color = explode(":", $image_settings[7]);
83
+
84
+ $lightbox_settings = explode(";", $content[2]);
85
+ $overlay_opacity = explode(":", $lightbox_settings[0]);
86
+ $overlay_border_size_value = explode(":", $lightbox_settings[1]);
87
+ $overlay_border_radius = explode(":", $lightbox_settings[2]);
88
+ $lightbox_text_color = explode(":", $lightbox_settings[3]);
89
+ $overlay_border_color = explode(":", $lightbox_settings[4]);
90
+ $lightbox_inline_bg_color = explode(":", $lightbox_settings[5]);
91
+ $lightbox_bg_color = explode(":", $lightbox_settings[6]);
92
+ $litebox_bg_color_substring = str_replace("rgb","rgba",substr($lightbox_bg_color[1], 0, -1));
93
+ $litebox_bg_color_with_opacity = $litebox_bg_color_substring. "," . $overlay_opacity[1] . ")";
94
+ $lightbox_bg_color_value= $overlay_border_size_value[1] . " solid " . $overlay_border_color[1];
95
+
96
+ ?>
97
+ <div class="block well" style="min-height:400px;">
98
+ <div class="navbar">
99
+ <div class="navbar-inner">
100
+ <h5><?php _e( "Preview Album ", gallery_bank ); ?></h5>
101
+ </div>
102
  </div>
103
+ <div class="body" style="margin:10px;">
104
+ <a class="btn btn-inverse" href="admin.php?page=gallery_bank"><?php _e("Back to Album Overview", gallery_bank); ?></a>
105
+ <div class="separator-doubled"></div>
106
+ <div class="row-fluid">
107
+ <div class="span12">
108
+ <div class="block well">
109
+ <div class="navbar">
110
+ <div class="navbar-inner">
111
+ <h5><?php echo stripcslashes(htmlspecialchars_decode($album->album_name));?></h5>
112
+ </div>
113
  </div>
114
+ <div id="view_bank_album_<?php echo $unique_id;?>">
115
+ <?php
116
+ for ($flag = 0; $flag <count($pic_detail); $flag++)
 
 
 
 
117
  {
118
+ $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]. ";";
119
+ if($pic_detail[$flag]->description == "")
120
  {
121
+ if(($flag % $images_in_row[1] == 0) && $flag != 0)
 
 
 
122
  {
123
+ ?>
124
+
125
+ <?php
126
+ if($pic_detail[$flag]->check_url == 1)
127
+ {
128
+ if($image_content[1] == 1)
129
+ {
130
+ ?>
131
+ <div class="imgContainerSingle">
132
+ <a href="<?php echo $pic_detail[$flag]->url;?>" target="_blank">
133
+ <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:146px;<?php echo $css_image_thumbnail; ?>" />
134
+ </a>
135
+ </div>
136
+ <?php
137
+ }
138
+ }
139
+ else
140
  {
141
  ?>
142
  <div class="imgContainerSingle">
143
+ <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)); ?>">
144
+ <?php
145
+ if($image_content[1] == 1)
146
+ {
147
+ if($pic_detail[$flag]->video == 1)
148
+ {
149
+ ?>
150
+ <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg');?>" style="margin-left:5px;width:146px;<?php echo $css_image_thumbnail; ?>" />
151
+ <?php
152
+ }
153
+ else
154
+ {
155
+ ?>
156
+ <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:146px;<?php echo $css_image_thumbnail; ?>" />
157
+ <?php
158
+ }
159
+ ?>
160
  </a>
161
  </div>
162
  <?php
163
+ }
164
  }
165
  }
166
+ else
167
  {
168
+
169
+ if($pic_detail[$flag]->check_url == 1)
 
 
 
170
  {
171
+ if($image_content[1] == 1)
172
  {
173
  ?>
174
+ <div class="imgContainerSingle">
175
+ <a href="<?php echo $pic_detail[$flag]->url;?>" target="_blank">
176
+ <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:146px;<?php echo $css_image_thumbnail; ?>" />
177
+ </a>
178
+ </div>
179
  <?php
180
  }
181
+ }
182
+ else
183
+ {
184
+ ?>
185
+ <div class="imgContainerSingle">
186
+ <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)); ?>">
187
+ <?php
188
+ if($image_content[1] == 1)
189
  {
190
+ if($pic_detail[$flag]->video == 1)
191
+ {
192
+ ?>
193
+ <img src="<?php echo stripcslashes(GALLERY_BK_PLUGIN_URL . '/assets/images/video.jpg');?>" style="margin-left:5px;width:146px;<?php echo $css_image_thumbnail; ?>" />
194
+ <?php
195
+ }
196
+ else
197
+ {
198
+ ?>
199
+ <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:146px;<?php echo $css_image_thumbnail; ?>" />
200
+ <?php
201
+ }
202
  ?>
203
+ </a>
204
+ </div>
205
+ <?php
206
  }
 
 
 
 
207
  }
208
  }
209
  }
210
  else
211
  {
212
+ if(($flag % $images_in_row[1] == 0) && $flag != 0)
 
213
  {
214
+ ?>
215
+
216
+ <?php
217
+
218
+ if($pic_detail[$flag]->check_url == 1)
219
  {
220
+ if($image_content[1] == 1)
221
+ {
222
+ ?>
223
+ <div class="imgContainerSingle">
224
+ <a href="<?php echo $pic_detail[$flag]->url;?>" target="_blank">
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
+ else
 
 
 
 
 
 
 
232
  {
233
+ if($pic_detail[$flag]->description == "")
234
  {
235
  ?>
236
+ <div class="imgContainerSingle">
237
+ <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)); ?>">
238
  <?php
239
  }
240
+ else
241
  {
242
  ?>
243
+ <div class="imgContainerSingle">
244
+ <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)); ?>)">
245
  <?php
246
  }
247
+ if($image_content[1] == 1)
248
+ {
249
+ ?>
250
+ <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:146px;<?php echo $css_image_thumbnail; ?>" />
251
+ </a>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
252
  </div>
253
+ <?php
254
+ }
255
  }
256
  }
257
+ else
258
  {
259
+
260
+ if($pic_detail[$flag]->check_url == 1)
261
  {
262
+ if($image_content[1] == 1)
263
+ {
264
+ ?>
265
+ <div class="imgContainerSingle">
266
+ <a href="<?php echo $pic_detail[$flag]->url;?>" target="_blank">
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
+ else
274
  {
275
+ if($pic_detail[$flag]->description == "")
276
+ {
277
+ ?>
278
+ <div class="imgContainerSingle">
279
+ <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)); ?>">
280
+ <?php
281
+ }
282
+ else
283
+ {
284
+ ?>
285
+ <div class="imgContainerSingle">
286
  <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)); ?>)">
287
+ <?php
288
+ }
289
+ if($image_content[1] == 1)
290
+ {
291
+ ?>
292
  <img src="<?php echo stripcslashes($pic_detail[$flag]->pic_path);?>" style="margin-left:5px;width:146px;<?php echo $css_image_thumbnail; ?>" />
293
  </a>
294
+ </div>
295
+ <?php
296
+ }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
297
  }
298
  }
299
  }
300
  }
301
+ ?>
302
+ </div>
303
  </div>
304
  </div>
305
  </div>
306
  </div>
307
  </div>
308
+ <script type="text/javascript">
309
+ jQuery(document).ready(function() {
310
+ jQuery('.titan-lb_<?php echo $unique_id;?>').lightbox({
311
+ beforeShow: function(){
312
+ jQuery(".lightbox-skin").css("background","<?php echo $lightbox_inline_bg_color[1]; ?>");
313
+ jQuery(".lightbox-overlay").css("background","<?php echo $litebox_bg_color_with_opacity; ?>");
314
+ jQuery(".lightbox-wrap").css("border-radius","<?php echo $overlay_border_radius[1]; ?>");
315
+ jQuery(".lightbox-wrap").css("-moz-border-radius","<?php echo $overlay_border_radius[1]; ?>");
316
+ jQuery(".lightbox-wrap").css("-webkit-border-radius","<?php echo $overlay_border_radius[1]; ?>");
317
+ jQuery(".lightbox-wrap").css("-khtml-border-radius","<?php echo $overlay_border_radius[1]; ?>");
318
+ jQuery(".lightbox-wrap").css("-o-border-radius","<?php echo $overlay_border_radius[1]; ?>");
319
+ jQuery(".lightbox-wrap").css("border","<?php echo $lightbox_bg_color_value;?>");
320
+ },
321
+ afterShow : function()
322
+ {
323
+ jQuery(".lightbox-title").css("color","<?php echo $lightbox_text_color[1]; ?>");
324
+ }
325
+ });
326
  });
327
+ var $container_<?php echo $unique_id;?> = jQuery('#view_bank_album_<?php echo $unique_id;?>');
328
+ $container_<?php echo $unique_id;?>.imagesLoaded( function(){
329
+ $container_<?php echo $unique_id;?>.masonry({
330
+
331
+ itemSelector : '.imgContainerSingle',
332
+ isAnimated: true,
333
+ animationOptions: {
334
+ duration: 750,
335
+ easing: 'linear',
336
+ queue: false
337
+ }
338
+ });
339
  });
340
+
341
+ </script>
342
+ <?php
343
+ }
344
  }
345
  ?>
views/dashboard.php CHANGED
@@ -1,3 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
1
  <div class="block well" style="min-height:400px;">
2
  <div class="navbar">
3
  <div class="navbar-inner">
@@ -143,7 +154,7 @@
143
  jQuery.post(ajaxurl, "album_id="+album_id+"&param=Delete_album&action=album_gallery_library", function(data)
144
  {
145
 
146
- var check_page = "<?php echo $_REQUEST['page']; ?>";
147
  window.location.href = "admin.php?page="+check_page;
148
 
149
  });
@@ -159,11 +170,14 @@
159
  {
160
  jQuery.post(ajaxurl, "&param=delete_all_albums&action=album_gallery_library", function(data)
161
  {
162
- var check_page = "<?php echo $_REQUEST['page']; ?>";
163
  window.location.href = "admin.php?page="+check_page;
164
  });
165
 
166
  }
167
  });
168
  }
169
- </script>
 
 
 
1
+ <?php
2
+ global $wpdb;
3
+ global $current_user;
4
+ $current_user = wp_get_current_user();
5
+ if (!current_user_can("edit_posts") && ! current_user_can("edit_pages"))
6
+ {
7
+ return;
8
+ }
9
+ else
10
+ {
11
+ ?>
12
  <div class="block well" style="min-height:400px;">
13
  <div class="navbar">
14
  <div class="navbar-inner">
154
  jQuery.post(ajaxurl, "album_id="+album_id+"&param=Delete_album&action=album_gallery_library", function(data)
155
  {
156
 
157
+ var check_page = "<?php echo intval($_REQUEST['page']); ?>";
158
  window.location.href = "admin.php?page="+check_page;
159
 
160
  });
170
  {
171
  jQuery.post(ajaxurl, "&param=delete_all_albums&action=album_gallery_library", function(data)
172
  {
173
+ var check_page = "<?php echo intval($_REQUEST['page']); ?>";
174
  window.location.href = "admin.php?page="+check_page;
175
  });
176
 
177
  }
178
  });
179
  }
180
+ </script>
181
+ <?php
182
+ }
183
+ ?>
views/documentation.php CHANGED
@@ -1,3 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
  <div class="block well" >
2
  <div class="navbar">
3
  <div class="navbar-inner">
@@ -785,4 +797,7 @@
785
  </div>
786
  </div>
787
  </div>
788
- </div>
 
 
 
1
+ <?php
2
+ global $wpdb;
3
+ global $current_user;
4
+ $current_user = wp_get_current_user();
5
+ if (!current_user_can("edit_posts") && ! current_user_can("edit_pages"))
6
+ {
7
+ return;
8
+ }
9
+ else
10
+ {
11
+
12
+ ?>
13
  <div class="block well" >
14
  <div class="navbar">
15
  <div class="navbar-inner">
797
  </div>
798
  </div>
799
  </div>
800
+ </div>
801
+ <?php
802
+ }
803
+ ?>
views/edit-album.php CHANGED
@@ -1,3 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
  <div class="block well" style="min-height:400px;">
2
  <div class="navbar">
3
  <div class="navbar-inner">
@@ -33,15 +45,18 @@
33
  <div class="body">
34
  <div class="control-group">
35
  <?php
36
- $album_id = $_GET["album_id"];
37
- $album = $wpdb->get_row
38
- (
39
- $wpdb->prepare
40
- (
41
- "SELECT * FROM ".gallery_bank_albums()." where album_id = %d",
42
- $album_id
43
- )
44
- );
 
 
 
45
  ?>
46
  <div class="cntrl">
47
  <input type="text" name="title" class="span12" value="<?php echo stripcslashes(htmlspecialchars_decode($album->album_name)) ;?>" id="title" placeholder="<?php _e( "Enter your Album title here", gallery_bank);?>" />
@@ -1672,4 +1687,7 @@
1672
  jQuery('#chk_url_req_' + dynamicId).css('display','none');
1673
  }
1674
  }
1675
- </script>
 
 
 
1
+ <?php
2
+ global $wpdb;
3
+ global $current_user;
4
+ $current_user = wp_get_current_user();
5
+ if (!current_user_can("edit_posts") && ! current_user_can("edit_pages"))
6
+ {
7
+ return;
8
+ }
9
+ else
10
+ {
11
+
12
+ ?>
13
  <div class="block well" style="min-height:400px;">
14
  <div class="navbar">
15
  <div class="navbar-inner">
45
  <div class="body">
46
  <div class="control-group">
47
  <?php
48
+ if(isset($_REQUEST["album_id"]))
49
+ {
50
+ $album_id = intval($_REQUEST["album_id"]);
51
+ $album = $wpdb->get_row
52
+ (
53
+ $wpdb->prepare
54
+ (
55
+ "SELECT * FROM ".gallery_bank_albums()." where album_id = %d",
56
+ $album_id
57
+ )
58
+ );
59
+ }
60
  ?>
61
  <div class="cntrl">
62
  <input type="text" name="title" class="span12" value="<?php echo stripcslashes(htmlspecialchars_decode($album->album_name)) ;?>" id="title" placeholder="<?php _e( "Enter your Album title here", gallery_bank);?>" />
1687
  jQuery('#chk_url_req_' + dynamicId).css('display','none');
1688
  }
1689
  }
1690
+ </script>
1691
+ <?php
1692
+ }
1693
+ ?>
views/header.php CHANGED
@@ -1,6 +1,15 @@
1
  <?php
2
  global $wpdb;
 
 
3
  $url = plugins_url('', __FILE__);
 
 
 
 
 
 
 
4
  ?>
5
  <div class="wrapper">
6
  <div class="content">
@@ -14,6 +23,7 @@ $url = plugins_url('', __FILE__);
14
  </div>
15
  <?php
16
  include_once GALLERY_BK_PLUGIN_DIR .'/install-script.php';
 
17
  ?>
18
 
19
 
1
  <?php
2
  global $wpdb;
3
+ global $current_user;
4
+ $current_user = wp_get_current_user();
5
  $url = plugins_url('', __FILE__);
6
+ if (!current_user_can("edit_posts") && ! current_user_can("edit_pages"))
7
+ {
8
+ return;
9
+ }
10
+ else
11
+ {
12
+
13
  ?>
14
  <div class="wrapper">
15
  <div class="content">
23
  </div>
24
  <?php
25
  include_once GALLERY_BK_PLUGIN_DIR .'/install-script.php';
26
+ }
27
  ?>
28
 
29
 
views/images_sorting.php CHANGED
@@ -1,5 +1,14 @@
1
  <?php
2
- $album_id = $_REQUEST["album_id"];
 
 
 
 
 
 
 
 
 
3
  $pic_detail = $wpdb->get_results
4
  (
5
  $wpdb->prepare
@@ -294,6 +303,7 @@
294
  cursor: 'move',
295
  update: function()
296
  {
 
297
  jQuery.post(ajaxurl, jQuery(this).sortable("serialize")+"&param=reorderControls&action=album_gallery_library", function(data)
298
  {
299
  });
@@ -302,4 +312,7 @@
302
  }
303
 
304
  });
305
- </script>
 
 
 
1
  <?php
2
+ global $wpdb;
3
+ global $current_user;
4
+ $current_user = wp_get_current_user();
5
+ if (!current_user_can("edit_posts") && ! current_user_can("edit_pages"))
6
+ {
7
+ return;
8
+ }
9
+ else
10
+ {
11
+ $album_id = intval($_REQUEST["album_id"]);
12
  $pic_detail = $wpdb->get_results
13
  (
14
  $wpdb->prepare
303
  cursor: 'move',
304
  update: function()
305
  {
306
+
307
  jQuery.post(ajaxurl, jQuery(this).sortable("serialize")+"&param=reorderControls&action=album_gallery_library", function(data)
308
  {
309
  });
312
  }
313
 
314
  });
315
+ </script>
316
+ <?php
317
+ }
318
+ ?>
views/images_sorting_ddl.php CHANGED
@@ -1,3 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
1
  <div class="block well" >
2
  <div class="navbar">
3
  <div class="navbar-inner">
@@ -48,4 +59,7 @@
48
  jQuery("#albums_sorting_data").html(data);
49
  });
50
  }
51
- </script>
 
 
 
1
+ <?php
2
+ global $wpdb;
3
+ global $current_user;
4
+ $current_user = wp_get_current_user();
5
+ if (!current_user_can("edit_posts") && ! current_user_can("edit_pages"))
6
+ {
7
+ return;
8
+ }
9
+ else
10
+ {
11
+ ?>
12
  <div class="block well" >
13
  <div class="navbar">
14
  <div class="navbar-inner">
59
  jQuery("#albums_sorting_data").html(data);
60
  });
61
  }
62
+ </script>
63
+ <?php
64
+ }
65
+ ?>
views/more_feature.php CHANGED
@@ -1,4 +1,14 @@
1
-
 
 
 
 
 
 
 
 
 
 
2
  <link rel="stylesheet" href="http://gallery-bank.com/wp-content/themes/infographer/css/stylesheet.min.css"/>
3
  <link rel="stylesheet" href="http://gallery-bank.com/wp-content/themes/infographer/css/responsive.min.css"/>
4
  <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:400,600,700,800|PT+Sans:400,400italic,700,700italic|Oswald:400,300,700&subset=latin,latin-ext"/>
@@ -90,4 +100,7 @@
90
  </div>
91
 
92
  <!-- DC Pricing Tables:3 End -->
93
- <div class="tsc_clear"></div>
 
 
 
1
+ <?php
2
+ global $wpdb;
3
+ global $current_user;
4
+ $current_user = wp_get_current_user();
5
+ if (!current_user_can("edit_posts") && ! current_user_can("edit_pages"))
6
+ {
7
+ return;
8
+ }
9
+ else
10
+ {
11
+ ?>
12
  <link rel="stylesheet" href="http://gallery-bank.com/wp-content/themes/infographer/css/stylesheet.min.css"/>
13
  <link rel="stylesheet" href="http://gallery-bank.com/wp-content/themes/infographer/css/responsive.min.css"/>
14
  <link rel="stylesheet" href="http://fonts.googleapis.com/css?family=Open+Sans:400,600,700,800|PT+Sans:400,400italic,700,700italic|Oswald:400,300,700&subset=latin,latin-ext"/>
100
  </div>
101
 
102
  <!-- DC Pricing Tables:3 End -->
103
+ <div class="tsc_clear"></div>
104
+ <?php
105
+ }
106
+ ?>
views/settings.php CHANGED
@@ -1,3 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
1
  <div class="block well" style="min-height:1094px;">
2
  <div class="navbar">
3
  <div class="navbar-inner">
@@ -8,3 +19,6 @@
8
  <a href="http://gallery-bank.com/" target="_blank"><img style="float:right;cursor: pointer;width: 100%" src="<?php echo GALLERY_BK_PLUGIN_URL.'/assets/images/settings_page.png' ?>"/></a>
9
  </div>
10
  </div>
 
 
 
1
+ <?php
2
+ global $wpdb;
3
+ global $current_user;
4
+ $current_user = wp_get_current_user();
5
+ if (!current_user_can("edit_posts") && ! current_user_can("edit_pages"))
6
+ {
7
+ return;
8
+ }
9
+ else
10
+ {
11
+ ?>
12
  <div class="block well" style="min-height:1094px;">
13
  <div class="navbar">
14
  <div class="navbar-inner">
19
  <a href="http://gallery-bank.com/" target="_blank"><img style="float:right;cursor: pointer;width: 100%" src="<?php echo GALLERY_BK_PLUGIN_URL.'/assets/images/settings_page.png' ?>"/></a>
20
  </div>
21
  </div>
22
+ <?php
23
+ }
24
+ ?>