Version Description
- Security Patch
- Few Bugs Fixed
Download this release
Release Info
Developer | contact-banker |
Plugin | Gallery Bank: WordPress Photo Gallery Plugin |
Version | 3.1.27 |
Comparing to | |
See all releases |
Code changes from version 3.1.26 to 3.1.27
- assets/css/system-message.css +2 -1
- assets/images/icons/icon-error.png +0 -0
- assets/images/icons/icon-success.png +0 -0
- assets/images/icons/more.png +0 -0
- front_views/gallery-bank-shortcode.php +3 -0
- front_views/grid-albums.php +4 -1
- front_views/includes_common_after.php +1 -1
- front_views/includes_common_before.php +1 -0
- front_views/listed-album.php +3 -0
- front_views/masonry-gallery.php +4 -1
- front_views/single-album.php +3 -0
- front_views/thumbnail-gallery.php +4 -1
- gallery-bank.php +20 -5
- lib/add-new-album-class.php +1 -0
- lib/front-view-all-albums-class.php +16 -2
- lib/gallery-bank-class.php +145 -34
- lib/include_settings.php +111 -91
- lib/install-script.php +307 -271
- lib/uninstall-script.php +2 -1
- lib/upload.php +13 -15
- readme.txt +6 -1
- views/album-preview.php +32 -25
- views/album-sorting.php +1 -1
- views/automatic-plugin-update.php +4 -3
- views/dashboard.php +1 -0
- views/edit-album.php +1 -0
- views/gallery-bank-system-report.php +1 -1
- views/gallery-feedback.php +1 -0
- views/header.php +347 -327
- views/images-sorting.php +1 -1
- views/includes_common_after.php +51 -30
- views/includes_common_before.php +276 -255
- views/other-services.php +1 -0
- views/purchase_pro_version.php +1 -0
- views/recommended-plugins.php +1 -0
- views/settings.php +1 -1
- views/shortcode.php +1 -0
assets/css/system-message.css
CHANGED
@@ -29,7 +29,8 @@
|
|
29 |
|
30 |
.custom-message.red {
|
31 |
display: block;
|
32 |
-
|
|
|
33 |
border: 1px solid #E4BBBC;
|
34 |
color: #b80000;
|
35 |
}
|
29 |
|
30 |
.custom-message.red {
|
31 |
display: block;
|
32 |
+
|
33 |
+
background: url(../images/icons/icon-error.png) no-repeat 1px 8px #F8E9E9;
|
34 |
border: 1px solid #E4BBBC;
|
35 |
color: #b80000;
|
36 |
}
|
assets/images/icons/icon-error.png
ADDED
Binary file
|
assets/images/icons/icon-success.png
ADDED
Binary file
|
assets/images/icons/more.png
ADDED
Binary file
|
front_views/gallery-bank-shortcode.php
CHANGED
@@ -1,3 +1,6 @@
|
|
|
|
|
|
|
|
1 |
<style>
|
2 |
#TB_ajaxContent { width: 752px !important; }
|
3 |
</style>
|
1 |
+
<?php
|
2 |
+
if(!defined("ABSPATH")) exit; //exit if accessed directly
|
3 |
+
?>
|
4 |
<style>
|
5 |
#TB_ajaxContent { width: 752px !important; }
|
6 |
</style>
|
front_views/grid-albums.php
CHANGED
@@ -1,3 +1,6 @@
|
|
|
|
|
|
|
|
1 |
<button class="album_back_btn" id="back_button<?php echo $unique_id; ?>" style="display: none;" onclick="view_albums<?php echo $unique_id; ?>(<?php echo $unique_id; ?>);"><span style="color: <?php echo $button_text_color; ?>;"> <?php echo $back_button_text; ?></span></button>
|
2 |
<!------------------------------------------->
|
3 |
|
@@ -82,4 +85,4 @@ if ($album_seperator == 1) {
|
|
82 |
<div id="bank_album_images_div<?php echo $unique_id; ?>" style="display: none;">
|
83 |
<div id="show_bank_album_images<?php echo $unique_id; ?>" style="margin-top: 5px;">
|
84 |
</div>
|
85 |
-
</div>
|
1 |
+
<?php
|
2 |
+
if(!defined("ABSPATH")) exit; //exit if accessed directly
|
3 |
+
?>
|
4 |
<button class="album_back_btn" id="back_button<?php echo $unique_id; ?>" style="display: none;" onclick="view_albums<?php echo $unique_id; ?>(<?php echo $unique_id; ?>);"><span style="color: <?php echo $button_text_color; ?>;"> <?php echo $back_button_text; ?></span></button>
|
5 |
<!------------------------------------------->
|
6 |
|
85 |
<div id="bank_album_images_div<?php echo $unique_id; ?>" style="display: none;">
|
86 |
<div id="show_bank_album_images<?php echo $unique_id; ?>" style="margin-top: 5px;">
|
87 |
</div>
|
88 |
+
</div>
|
front_views/includes_common_after.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
switch ($album_type) {
|
4 |
case "images":
|
5 |
if ($album_seperator == 1) {
|
1 |
<?php
|
2 |
+
if(!defined("ABSPATH")) exit; //exit if accessed directly
|
3 |
switch ($album_type) {
|
4 |
case "images":
|
5 |
if ($album_seperator == 1) {
|
front_views/includes_common_before.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
global $wpdb;
|
3 |
$unique_id = rand(100, 10000);
|
4 |
$effect = explode("-", $special_effect);
|
1 |
<?php
|
2 |
+
if(!defined("ABSPATH")) exit; //exit if accessed directly
|
3 |
global $wpdb;
|
4 |
$unique_id = rand(100, 10000);
|
5 |
$effect = explode("-", $special_effect);
|
front_views/listed-album.php
CHANGED
@@ -1,3 +1,6 @@
|
|
|
|
|
|
|
|
1 |
<!------ Code for Back Buttons ------->
|
2 |
<button class="album_back_btn" id="back_button<?php echo $unique_id; ?>" style="display: none;" onclick="view_list_albums<?php echo $unique_id; ?>(<?php echo $unique_id; ?>);"><span style="color: <?php echo $button_text_color; ?>;"> <?php echo $back_button_text ?></span></button>
|
3 |
<div id="seperator<?php echo $unique_id; ?>" class="separator-doubled" style="display: none"></div>
|
1 |
+
<?php
|
2 |
+
if(!defined("ABSPATH")) exit; //exit if accessed directly
|
3 |
+
?>
|
4 |
<!------ Code for Back Buttons ------->
|
5 |
<button class="album_back_btn" id="back_button<?php echo $unique_id; ?>" style="display: none;" onclick="view_list_albums<?php echo $unique_id; ?>(<?php echo $unique_id; ?>);"><span style="color: <?php echo $button_text_color; ?>;"> <?php echo $back_button_text ?></span></button>
|
6 |
<div id="seperator<?php echo $unique_id; ?>" class="separator-doubled" style="display: none"></div>
|
front_views/masonry-gallery.php
CHANGED
@@ -1,4 +1,7 @@
|
|
1 |
-
<?php
|
|
|
|
|
|
|
2 |
<style type="text/css">
|
3 |
.<?php echo $class_images_in_row ?> > a
|
4 |
{
|
1 |
+
<?php
|
2 |
+
if(!defined("ABSPATH")) exit; //exit if accessed directly
|
3 |
+
remove_filter ('comment_text', 'wpautop');
|
4 |
+
?>
|
5 |
<style type="text/css">
|
6 |
.<?php echo $class_images_in_row ?> > a
|
7 |
{
|
front_views/single-album.php
CHANGED
@@ -1,3 +1,6 @@
|
|
|
|
|
|
|
|
1 |
<!------ Code for Back Button ------->
|
2 |
<button class="album_back_btn" id="back_button<?php echo $unique_id; ?>" onclick="view_individual_albums<?php echo $unique_id; ?>(<?php echo $unique_id; ?>);" style="display: none;"><span style="color: <?php echo $button_text_color; ?>;"> <?php echo $back_button_text; ?></span></button>
|
3 |
<div id="seperator<?php echo $unique_id; ?>" class="separator-doubled" style="display: none"></div>
|
1 |
+
<?php
|
2 |
+
if(!defined("ABSPATH")) exit; //exit if accessed directly
|
3 |
+
?>
|
4 |
<!------ Code for Back Button ------->
|
5 |
<button class="album_back_btn" id="back_button<?php echo $unique_id; ?>" onclick="view_individual_albums<?php echo $unique_id; ?>(<?php echo $unique_id; ?>);" style="display: none;"><span style="color: <?php echo $button_text_color; ?>;"> <?php echo $back_button_text; ?></span></button>
|
6 |
<div id="seperator<?php echo $unique_id; ?>" class="separator-doubled" style="display: none"></div>
|
front_views/thumbnail-gallery.php
CHANGED
@@ -1,4 +1,7 @@
|
|
1 |
-
<?php
|
|
|
|
|
|
|
2 |
<style>
|
3 |
.<?php echo $class_images_in_row ?> > a
|
4 |
{
|
1 |
+
<?php
|
2 |
+
if(!defined("ABSPATH")) exit; //exit if accessed directly
|
3 |
+
remove_filter ('comment_text', 'wpautop');
|
4 |
+
?>
|
5 |
<style>
|
6 |
.<?php echo $class_images_in_row ?> > a
|
7 |
{
|
gallery-bank.php
CHANGED
@@ -4,12 +4,13 @@ Plugin Name: Gallery Bank Lite Edition
|
|
4 |
Plugin URI: http://tech-banker.com
|
5 |
Description: Gallery Bank is an easy to use Responsive WordPress Gallery Plugin for photos, videos, galleries and albums.
|
6 |
Author: Tech Banker
|
7 |
-
Version: 3.1.
|
8 |
Author URI: http://tech-banker.com
|
9 |
License: GPLv3 or later
|
10 |
*/
|
|
|
11 |
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
12 |
-
//
|
13 |
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
14 |
if (!defined("GALLERY_FILE")) define("GALLERY_FILE","gallery-bank/gallery-bank.php");
|
15 |
if (!defined("GALLERY_MAIN_DIR")) define("GALLERY_MAIN_DIR", dirname(dirname(dirname(__FILE__)))."/gallery-bank");
|
@@ -17,7 +18,7 @@ if (!defined("GALLERY_MAIN_UPLOAD_DIR")) define("GALLERY_MAIN_UPLOAD_DIR", dirna
|
|
17 |
if (!defined("GALLERY_MAIN_THUMB_DIR")) define("GALLERY_MAIN_THUMB_DIR", dirname(dirname(dirname(__FILE__)))."/gallery-bank/thumbs/");
|
18 |
if (!defined("GALLERY_MAIN_ALB_THUMB_DIR")) define("GALLERY_MAIN_ALB_THUMB_DIR", dirname(dirname(dirname(__FILE__)))."/gallery-bank/album-thumbs/");
|
19 |
if (!defined("GALLERY_BK_PLUGIN_DIRNAME")) define("GALLERY_BK_PLUGIN_DIRNAME", plugin_basename(dirname(__FILE__)));
|
20 |
-
if (!defined("GALLERY_BK_PLUGIN_DIR")) define("GALLERY_BK_PLUGIN_DIR",
|
21 |
if (!defined("GALLERY_BK_THUMB_URL")) define("GALLERY_BK_THUMB_URL", content_url()."/gallery-bank/gallery-uploads/");
|
22 |
if (!defined("GALLERY_BK_THUMB_SMALL_URL")) define("GALLERY_BK_THUMB_SMALL_URL", content_url()."/gallery-bank/thumbs/");
|
23 |
if (!defined("GALLERY_BK_ALBUM_THUMB_URL")) define("GALLERY_BK_ALBUM_THUMB_URL", content_url()."/gallery-bank/album-thumbs/");
|
@@ -51,7 +52,21 @@ if(!function_exists("plugin_install_script_for_gallery_bank"))
|
|
51 |
{
|
52 |
function plugin_install_script_for_gallery_bank()
|
53 |
{
|
54 |
-
global $wpdb;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
55 |
if (is_multisite())
|
56 |
{
|
57 |
$blog_ids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
|
@@ -358,7 +373,7 @@ if(!function_exists("gallery_bank_custom_plugin_row"))
|
|
358 |
if ($file == GALLERY_BK_PLUGIN_BASENAME)
|
359 |
{
|
360 |
$gallery_bank_row_meta = array(
|
361 |
-
"docs"
|
362 |
"gopremium" => "<a href='" .esc_url( apply_filters("gallery_bank_premium_editions_url", "http://tech-banker.com/products/wp-gallery-bank/pricing/"))."' title='".esc_attr(__( "View Gallery Bank Premium Editions",gallery_bank))."'>".__("Go for Premium!",gallery_bank)."</a>",
|
363 |
);
|
364 |
return array_merge($links,$gallery_bank_row_meta);
|
4 |
Plugin URI: http://tech-banker.com
|
5 |
Description: Gallery Bank is an easy to use Responsive WordPress Gallery Plugin for photos, videos, galleries and albums.
|
6 |
Author: Tech Banker
|
7 |
+
Version: 3.1.27
|
8 |
Author URI: http://tech-banker.com
|
9 |
License: GPLv3 or later
|
10 |
*/
|
11 |
+
if(!defined("ABSPATH")) exit; //exit if accessed directly
|
12 |
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
13 |
+
// Define Constants ///////////////////////////////////////////////////////////////////////////////////////////
|
14 |
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
|
15 |
if (!defined("GALLERY_FILE")) define("GALLERY_FILE","gallery-bank/gallery-bank.php");
|
16 |
if (!defined("GALLERY_MAIN_DIR")) define("GALLERY_MAIN_DIR", dirname(dirname(dirname(__FILE__)))."/gallery-bank");
|
18 |
if (!defined("GALLERY_MAIN_THUMB_DIR")) define("GALLERY_MAIN_THUMB_DIR", dirname(dirname(dirname(__FILE__)))."/gallery-bank/thumbs/");
|
19 |
if (!defined("GALLERY_MAIN_ALB_THUMB_DIR")) define("GALLERY_MAIN_ALB_THUMB_DIR", dirname(dirname(dirname(__FILE__)))."/gallery-bank/album-thumbs/");
|
20 |
if (!defined("GALLERY_BK_PLUGIN_DIRNAME")) define("GALLERY_BK_PLUGIN_DIRNAME", plugin_basename(dirname(__FILE__)));
|
21 |
+
if (!defined("GALLERY_BK_PLUGIN_DIR")) define("GALLERY_BK_PLUGIN_DIR", plugin_dir_path( __FILE__ ));
|
22 |
if (!defined("GALLERY_BK_THUMB_URL")) define("GALLERY_BK_THUMB_URL", content_url()."/gallery-bank/gallery-uploads/");
|
23 |
if (!defined("GALLERY_BK_THUMB_SMALL_URL")) define("GALLERY_BK_THUMB_SMALL_URL", content_url()."/gallery-bank/thumbs/");
|
24 |
if (!defined("GALLERY_BK_ALBUM_THUMB_URL")) define("GALLERY_BK_ALBUM_THUMB_URL", content_url()."/gallery-bank/album-thumbs/");
|
52 |
{
|
53 |
function plugin_install_script_for_gallery_bank()
|
54 |
{
|
55 |
+
global $wpdb,$current_user;
|
56 |
+
if (!is_user_logged_in())
|
57 |
+
{
|
58 |
+
return;
|
59 |
+
}
|
60 |
+
if(is_super_admin())
|
61 |
+
{
|
62 |
+
$gb_role = "administrator";
|
63 |
+
}
|
64 |
+
else
|
65 |
+
{
|
66 |
+
$gb_role = $wpdb->prefix . "capabilities";
|
67 |
+
$current_user->role = array_keys($current_user->$gb_role);
|
68 |
+
$gb_role = $current_user->role[0];
|
69 |
+
}
|
70 |
if (is_multisite())
|
71 |
{
|
72 |
$blog_ids = $wpdb->get_col("SELECT blog_id FROM $wpdb->blogs");
|
373 |
if ($file == GALLERY_BK_PLUGIN_BASENAME)
|
374 |
{
|
375 |
$gallery_bank_row_meta = array(
|
376 |
+
"docs" => "<a href='".esc_url( apply_filters("gallery_bank_docs_url","http://tech-banker.com/products/wp-gallery-bank/knowledge-base/"))."' title='".esc_attr(__( "View Gallery Bank Documentation",gallery_bank))."'>".__("Docs",gallery_bank)."</a>",
|
377 |
"gopremium" => "<a href='" .esc_url( apply_filters("gallery_bank_premium_editions_url", "http://tech-banker.com/products/wp-gallery-bank/pricing/"))."' title='".esc_attr(__( "View Gallery Bank Premium Editions",gallery_bank))."'>".__("Go for Premium!",gallery_bank)."</a>",
|
378 |
);
|
379 |
return array_merge($links,$gallery_bank_row_meta);
|
lib/add-new-album-class.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
$dynamicArray = array();
|
3 |
$dynamicId = mt_rand(10, 10000);
|
4 |
switch($gb_role)
|
1 |
<?php
|
2 |
+
if(!defined("ABSPATH")) exit; //exit if accessed directly
|
3 |
$dynamicArray = array();
|
4 |
$dynamicId = mt_rand(10, 10000);
|
5 |
switch($gb_role)
|
lib/front-view-all-albums-class.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
if (isset($_REQUEST["param"]))
|
3 |
{
|
4 |
global $wpdb;
|
@@ -20,17 +21,30 @@ if (isset($_REQUEST["param"]))
|
|
20 |
$sort_by = isset($_REQUEST["sort_by"]) ? esc_attr($_REQUEST["sort_by"]) : "";
|
21 |
|
22 |
$album_type = "images";
|
23 |
-
|
|
|
|
|
|
|
|
|
24 |
switch ($gallery_type)
|
25 |
{
|
26 |
case "masonry":
|
|
|
|
|
27 |
include GALLERY_BK_PLUGIN_DIR . "/front_views/masonry-gallery.php";
|
|
|
28 |
break;
|
29 |
case "thumbnail":
|
|
|
|
|
30 |
include GALLERY_BK_PLUGIN_DIR . "/front_views/thumbnail-gallery.php";
|
|
|
31 |
break;
|
32 |
}
|
33 |
-
|
|
|
|
|
|
|
34 |
die();
|
35 |
}
|
36 |
}
|
1 |
<?php
|
2 |
+
if(!defined("ABSPATH")) exit; //exit if accessed directly
|
3 |
if (isset($_REQUEST["param"]))
|
4 |
{
|
5 |
global $wpdb;
|
21 |
$sort_by = isset($_REQUEST["sort_by"]) ? esc_attr($_REQUEST["sort_by"]) : "";
|
22 |
|
23 |
$album_type = "images";
|
24 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/front_views/includes_common_before.php"))
|
25 |
+
{
|
26 |
+
include GALLERY_BK_PLUGIN_DIR . "/front_views/includes_common_before.php";
|
27 |
+
}
|
28 |
+
|
29 |
switch ($gallery_type)
|
30 |
{
|
31 |
case "masonry":
|
32 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/front_views/masonry-gallery.php"))
|
33 |
+
{
|
34 |
include GALLERY_BK_PLUGIN_DIR . "/front_views/masonry-gallery.php";
|
35 |
+
}
|
36 |
break;
|
37 |
case "thumbnail":
|
38 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/front_views/thumbnail-gallery.php"))
|
39 |
+
{
|
40 |
include GALLERY_BK_PLUGIN_DIR . "/front_views/thumbnail-gallery.php";
|
41 |
+
}
|
42 |
break;
|
43 |
}
|
44 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/front_views/includes_common_after.php"))
|
45 |
+
{
|
46 |
+
include GALLERY_BK_PLUGIN_DIR . "/front_views/includes_common_after.php";
|
47 |
+
}
|
48 |
die();
|
49 |
}
|
50 |
}
|
lib/gallery-bank-class.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
//--------------------------------------------------------------------------------------------------------------//
|
3 |
// CODE FOR CREATING MENUS
|
4 |
//---------------------------------------------------------------------------------------------------------------//
|
@@ -118,8 +119,14 @@ if(!function_exists("gallery_bank"))
|
|
118 |
$current_user->role = array_keys($current_user->$gb_role);
|
119 |
$gb_role = $current_user->role[0];
|
120 |
}
|
121 |
-
|
122 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
123 |
}
|
124 |
}
|
125 |
if(!function_exists("gallery_bank_shortcode"))
|
@@ -137,8 +144,14 @@ if(!function_exists("gallery_bank_shortcode"))
|
|
137 |
$current_user->role = array_keys($current_user->$gb_role);
|
138 |
$gb_role = $current_user->role[0];
|
139 |
}
|
140 |
-
|
141 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
142 |
}
|
143 |
}
|
144 |
if(!function_exists("save_album"))
|
@@ -162,8 +175,14 @@ if(!function_exists("save_album"))
|
|
162 |
);
|
163 |
if($album_count <= 3)
|
164 |
{
|
165 |
-
|
166 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
167 |
}
|
168 |
else
|
169 |
{
|
@@ -186,8 +205,14 @@ if(!function_exists("global_settings"))
|
|
186 |
$current_user->role = array_keys($current_user->$gb_role);
|
187 |
$gb_role = $current_user->role[0];
|
188 |
}
|
189 |
-
|
190 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
191 |
}
|
192 |
}
|
193 |
if(!function_exists("gallery_album_sorting"))
|
@@ -205,8 +230,14 @@ if(!function_exists("gallery_album_sorting"))
|
|
205 |
$current_user->role = array_keys($current_user->$gb_role);
|
206 |
$gb_role = $current_user->role[0];
|
207 |
}
|
208 |
-
|
209 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
210 |
}
|
211 |
}
|
212 |
if(!function_exists("images_sorting"))
|
@@ -224,8 +255,14 @@ if(!function_exists("images_sorting"))
|
|
224 |
$current_user->role = array_keys($current_user->$gb_role);
|
225 |
$gb_role = $current_user->role[0];
|
226 |
}
|
227 |
-
|
228 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
229 |
}
|
230 |
}
|
231 |
if(!function_exists("album_preview"))
|
@@ -243,8 +280,14 @@ if(!function_exists("album_preview"))
|
|
243 |
$current_user->role = array_keys($current_user->$gb_role);
|
244 |
$gb_role = $current_user->role[0];
|
245 |
}
|
246 |
-
|
247 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
248 |
}
|
249 |
}
|
250 |
if(!function_exists("gallery_bank_system_status"))
|
@@ -262,8 +305,14 @@ if(!function_exists("gallery_bank_system_status"))
|
|
262 |
$current_user->role = array_keys($current_user->$gb_role);
|
263 |
$gb_role = $current_user->role[0];
|
264 |
}
|
265 |
-
|
266 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
267 |
}
|
268 |
}
|
269 |
if(!function_exists("gallery_bank_purchase"))
|
@@ -281,8 +330,14 @@ if(!function_exists("gallery_bank_purchase"))
|
|
281 |
$current_user->role = array_keys($current_user->$gb_role);
|
282 |
$gb_role = $current_user->role[0];
|
283 |
}
|
284 |
-
|
285 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
286 |
}
|
287 |
}
|
288 |
if(!function_exists("gallery_bank_recommended_plugins"))
|
@@ -300,8 +355,14 @@ if(!function_exists("gallery_bank_recommended_plugins"))
|
|
300 |
$current_user->role = array_keys($current_user->$gb_role);
|
301 |
$gb_role = $current_user->role[0];
|
302 |
}
|
303 |
-
|
304 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
305 |
}
|
306 |
}
|
307 |
if(!function_exists("gallery_bank_other_services"))
|
@@ -319,8 +380,14 @@ if(!function_exists("gallery_bank_other_services"))
|
|
319 |
$current_user->role = array_keys($current_user->$gb_role);
|
320 |
$gb_role = $current_user->role[0];
|
321 |
}
|
322 |
-
|
323 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
324 |
}
|
325 |
}
|
326 |
if(!function_exists("gallery_auto_plugin_update"))
|
@@ -338,8 +405,14 @@ if(!function_exists("gallery_auto_plugin_update"))
|
|
338 |
$current_user->role = array_keys($current_user->$gb_role);
|
339 |
$gb_role = $current_user->role[0];
|
340 |
}
|
341 |
-
|
342 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
343 |
}
|
344 |
}
|
345 |
if(!function_exists("gallery_bank_feature_request"))
|
@@ -357,8 +430,14 @@ if(!function_exists("gallery_bank_feature_request"))
|
|
357 |
$current_user->role = array_keys($current_user->$gb_role);
|
358 |
$gb_role = $current_user->role[0];
|
359 |
}
|
360 |
-
|
361 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
362 |
}
|
363 |
}
|
364 |
//--------------------------------------------------------------------------------------------------------------//
|
@@ -446,7 +525,11 @@ if (isset($_REQUEST["action"])) {
|
|
446 |
$current_user->role = array_keys($current_user->$gb_role);
|
447 |
$gb_role = $current_user->role[0];
|
448 |
}
|
449 |
-
|
|
|
|
|
|
|
|
|
450 |
}
|
451 |
}
|
452 |
break;
|
@@ -456,7 +539,10 @@ if (isset($_REQUEST["action"])) {
|
|
456 |
{
|
457 |
function front_view_all_albums_library()
|
458 |
{
|
459 |
-
|
|
|
|
|
|
|
460 |
}
|
461 |
}
|
462 |
break;
|
@@ -477,7 +563,10 @@ if (isset($_REQUEST["action"])) {
|
|
477 |
$current_user->role = array_keys($current_user->$gb_role);
|
478 |
$gb_role = $current_user->role[0];
|
479 |
}
|
480 |
-
|
|
|
|
|
|
|
481 |
}
|
482 |
}
|
483 |
break;
|
@@ -546,29 +635,51 @@ if(!function_exists("extract_short_code_for_gallery_images"))
|
|
546 |
{
|
547 |
ob_start();
|
548 |
global $wpdb;
|
549 |
-
|
|
|
|
|
|
|
550 |
switch ($album_type) {
|
551 |
case "images":
|
552 |
switch ($gallery_type) {
|
553 |
case "masonry":
|
|
|
|
|
554 |
include GALLERY_BK_PLUGIN_DIR . "/front_views/masonry-gallery.php";
|
|
|
555 |
break;
|
556 |
case "thumbnail":
|
|
|
|
|
557 |
include GALLERY_BK_PLUGIN_DIR . "/front_views/thumbnail-gallery.php";
|
|
|
558 |
break;
|
559 |
}
|
560 |
break;
|
561 |
case "grid":
|
562 |
-
|
|
|
|
|
|
|
563 |
break;
|
564 |
case "list":
|
565 |
-
|
|
|
|
|
|
|
566 |
break;
|
567 |
case "individual":
|
568 |
-
|
|
|
|
|
|
|
569 |
break;
|
570 |
}
|
571 |
-
|
|
|
|
|
|
|
|
|
572 |
$gallery_bank_output_album = ob_get_clean();
|
573 |
wp_reset_query();
|
574 |
return $gallery_bank_output_album;
|
1 |
<?php
|
2 |
+
if(!defined("ABSPATH")) exit; //exit if accessed directly
|
3 |
//--------------------------------------------------------------------------------------------------------------//
|
4 |
// CODE FOR CREATING MENUS
|
5 |
//---------------------------------------------------------------------------------------------------------------//
|
119 |
$current_user->role = array_keys($current_user->$gb_role);
|
120 |
$gb_role = $current_user->role[0];
|
121 |
}
|
122 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/header.php"))
|
123 |
+
{
|
124 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/header.php";
|
125 |
+
}
|
126 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/dashboard.php"))
|
127 |
+
{
|
128 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/dashboard.php";
|
129 |
+
}
|
130 |
}
|
131 |
}
|
132 |
if(!function_exists("gallery_bank_shortcode"))
|
144 |
$current_user->role = array_keys($current_user->$gb_role);
|
145 |
$gb_role = $current_user->role[0];
|
146 |
}
|
147 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/header.php"))
|
148 |
+
{
|
149 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/header.php";
|
150 |
+
}
|
151 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/shortcode.php"))
|
152 |
+
{
|
153 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/shortcode.php";
|
154 |
+
}
|
155 |
}
|
156 |
}
|
157 |
if(!function_exists("save_album"))
|
175 |
);
|
176 |
if($album_count <= 3)
|
177 |
{
|
178 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/header.php"))
|
179 |
+
{
|
180 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/header.php";
|
181 |
+
}
|
182 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/edit-album.php"))
|
183 |
+
{
|
184 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/edit-album.php";
|
185 |
+
}
|
186 |
}
|
187 |
else
|
188 |
{
|
205 |
$current_user->role = array_keys($current_user->$gb_role);
|
206 |
$gb_role = $current_user->role[0];
|
207 |
}
|
208 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/header.php"))
|
209 |
+
{
|
210 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/header.php";
|
211 |
+
}
|
212 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/settings.php"))
|
213 |
+
{
|
214 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/settings.php";
|
215 |
+
}
|
216 |
}
|
217 |
}
|
218 |
if(!function_exists("gallery_album_sorting"))
|
230 |
$current_user->role = array_keys($current_user->$gb_role);
|
231 |
$gb_role = $current_user->role[0];
|
232 |
}
|
233 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/header.php"))
|
234 |
+
{
|
235 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/header.php";
|
236 |
+
}
|
237 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/album-sorting.php"))
|
238 |
+
{
|
239 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/album-sorting.php";
|
240 |
+
}
|
241 |
}
|
242 |
}
|
243 |
if(!function_exists("images_sorting"))
|
255 |
$current_user->role = array_keys($current_user->$gb_role);
|
256 |
$gb_role = $current_user->role[0];
|
257 |
}
|
258 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/header.php"))
|
259 |
+
{
|
260 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/header.php";
|
261 |
+
}
|
262 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/images-sorting.php"))
|
263 |
+
{
|
264 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/images-sorting.php";
|
265 |
+
}
|
266 |
}
|
267 |
}
|
268 |
if(!function_exists("album_preview"))
|
280 |
$current_user->role = array_keys($current_user->$gb_role);
|
281 |
$gb_role = $current_user->role[0];
|
282 |
}
|
283 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/header.php"))
|
284 |
+
{
|
285 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/header.php";
|
286 |
+
}
|
287 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/album-preview.php"))
|
288 |
+
{
|
289 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/album-preview.php";
|
290 |
+
}
|
291 |
}
|
292 |
}
|
293 |
if(!function_exists("gallery_bank_system_status"))
|
305 |
$current_user->role = array_keys($current_user->$gb_role);
|
306 |
$gb_role = $current_user->role[0];
|
307 |
}
|
308 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/header.php"))
|
309 |
+
{
|
310 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/header.php";
|
311 |
+
}
|
312 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/gallery-bank-system-report.php"))
|
313 |
+
{
|
314 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/gallery-bank-system-report.php";
|
315 |
+
}
|
316 |
}
|
317 |
}
|
318 |
if(!function_exists("gallery_bank_purchase"))
|
330 |
$current_user->role = array_keys($current_user->$gb_role);
|
331 |
$gb_role = $current_user->role[0];
|
332 |
}
|
333 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/header.php"))
|
334 |
+
{
|
335 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/header.php";
|
336 |
+
}
|
337 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/purchase_pro_version.php"))
|
338 |
+
{
|
339 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/purchase_pro_version.php";
|
340 |
+
}
|
341 |
}
|
342 |
}
|
343 |
if(!function_exists("gallery_bank_recommended_plugins"))
|
355 |
$current_user->role = array_keys($current_user->$gb_role);
|
356 |
$gb_role = $current_user->role[0];
|
357 |
}
|
358 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/header.php"))
|
359 |
+
{
|
360 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/header.php";
|
361 |
+
}
|
362 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/recommended-plugins.php"))
|
363 |
+
{
|
364 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/recommended-plugins.php";
|
365 |
+
}
|
366 |
}
|
367 |
}
|
368 |
if(!function_exists("gallery_bank_other_services"))
|
380 |
$current_user->role = array_keys($current_user->$gb_role);
|
381 |
$gb_role = $current_user->role[0];
|
382 |
}
|
383 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/header.php"))
|
384 |
+
{
|
385 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/header.php";
|
386 |
+
}
|
387 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/other-services.php"))
|
388 |
+
{
|
389 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/other-services.php";
|
390 |
+
}
|
391 |
}
|
392 |
}
|
393 |
if(!function_exists("gallery_auto_plugin_update"))
|
405 |
$current_user->role = array_keys($current_user->$gb_role);
|
406 |
$gb_role = $current_user->role[0];
|
407 |
}
|
408 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/header.php"))
|
409 |
+
{
|
410 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/header.php";
|
411 |
+
}
|
412 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/automatic-plugin-update.php"))
|
413 |
+
{
|
414 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/automatic-plugin-update.php";
|
415 |
+
}
|
416 |
}
|
417 |
}
|
418 |
if(!function_exists("gallery_bank_feature_request"))
|
430 |
$current_user->role = array_keys($current_user->$gb_role);
|
431 |
$gb_role = $current_user->role[0];
|
432 |
}
|
433 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/header.php"))
|
434 |
+
{
|
435 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/header.php";
|
436 |
+
}
|
437 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/gallery-feedback.php"))
|
438 |
+
{
|
439 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/views/gallery-feedback.php";
|
440 |
+
}
|
441 |
}
|
442 |
}
|
443 |
//--------------------------------------------------------------------------------------------------------------//
|
525 |
$current_user->role = array_keys($current_user->$gb_role);
|
526 |
$gb_role = $current_user->role[0];
|
527 |
}
|
528 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/lib/add-new-album-class.php"))
|
529 |
+
{
|
530 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/lib/add-new-album-class.php";
|
531 |
+
}
|
532 |
+
|
533 |
}
|
534 |
}
|
535 |
break;
|
539 |
{
|
540 |
function front_view_all_albums_library()
|
541 |
{
|
542 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/lib/front-view-all-albums-class.php"))
|
543 |
+
{
|
544 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/lib/front-view-all-albums-class.php";
|
545 |
+
}
|
546 |
}
|
547 |
}
|
548 |
break;
|
563 |
$current_user->role = array_keys($current_user->$gb_role);
|
564 |
$gb_role = $current_user->role[0];
|
565 |
}
|
566 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/lib/upload.php"))
|
567 |
+
{
|
568 |
+
include_once GALLERY_BK_PLUGIN_DIR . "/lib/upload.php";
|
569 |
+
}
|
570 |
}
|
571 |
}
|
572 |
break;
|
635 |
{
|
636 |
ob_start();
|
637 |
global $wpdb;
|
638 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/front_views/includes_common_before.php"))
|
639 |
+
{
|
640 |
+
include GALLERY_BK_PLUGIN_DIR . "/front_views/includes_common_before.php";
|
641 |
+
}
|
642 |
switch ($album_type) {
|
643 |
case "images":
|
644 |
switch ($gallery_type) {
|
645 |
case "masonry":
|
646 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/front_views/masonry-gallery.php"))
|
647 |
+
{
|
648 |
include GALLERY_BK_PLUGIN_DIR . "/front_views/masonry-gallery.php";
|
649 |
+
}
|
650 |
break;
|
651 |
case "thumbnail":
|
652 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/front_views/thumbnail-gallery.php"))
|
653 |
+
{
|
654 |
include GALLERY_BK_PLUGIN_DIR . "/front_views/thumbnail-gallery.php";
|
655 |
+
}
|
656 |
break;
|
657 |
}
|
658 |
break;
|
659 |
case "grid":
|
660 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/front_views/grid-albums.php"))
|
661 |
+
{
|
662 |
+
include GALLERY_BK_PLUGIN_DIR . "/front_views/grid-albums.php";
|
663 |
+
}
|
664 |
break;
|
665 |
case "list":
|
666 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/front_views/listed-album.php"))
|
667 |
+
{
|
668 |
+
include GALLERY_BK_PLUGIN_DIR . "/front_views/listed-album.php";
|
669 |
+
}
|
670 |
break;
|
671 |
case "individual":
|
672 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/front_views/single-album.php"))
|
673 |
+
{
|
674 |
+
include GALLERY_BK_PLUGIN_DIR . "/front_views/single-album.php";
|
675 |
+
}
|
676 |
break;
|
677 |
}
|
678 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/front_views/includes_common_after.php"))
|
679 |
+
{
|
680 |
+
include GALLERY_BK_PLUGIN_DIR . "/front_views/includes_common_after.php";
|
681 |
+
}
|
682 |
+
|
683 |
$gallery_bank_output_album = ob_get_clean();
|
684 |
wp_reset_query();
|
685 |
return $gallery_bank_output_album;
|
lib/include_settings.php
CHANGED
@@ -1,106 +1,126 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
return;
|
5 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
6 |
|
7 |
-
$settings = array();
|
8 |
|
9 |
-
$settings["thumbnails_custom_enable"] = "1";
|
10 |
-
$settings["thumbnails_width"] = "160";
|
11 |
-
$settings["thumbnails_height"] = "120";
|
12 |
-
$settings["thumbnails_opacity"] = "1";
|
13 |
-
$settings["thumbnails_border_size"] = "2";
|
14 |
-
$settings["thumbnails_border_radius"] = "2";
|
15 |
-
$settings["thumbnails_border_color"] = "#000000";
|
16 |
-
$settings["margin_btw_thumbnails"] = "5";
|
17 |
-
$settings["thumbnail_text_color"] = "#ffffff";
|
18 |
-
$settings["thumbnail_text_align"] = "center";
|
19 |
-
$settings["thumbnail_font_family"] = "Verdana";
|
20 |
-
$settings["heading_font_size"] = "16";
|
21 |
-
$settings["text_font_size"] = "12";
|
22 |
-
$settings["thumbnail_desc_length"] = "60";
|
23 |
|
24 |
-
$settings["cover_custom_enable"] = "1";
|
25 |
-
$settings["cover_thumbnail_width"] = "160";
|
26 |
-
$settings["cover_thumbnail_height"] = "120";
|
27 |
-
$settings["cover_thumbnail_opacity"] = "1";
|
28 |
-
$settings["cover_thumbnail_border_size"] = "2";
|
29 |
-
$settings["cover_thumbnail_border_radius"] = "2";
|
30 |
-
$settings["cover_thumbnail_border_color"] = "#000000";
|
31 |
-
$settings["margin_btw_cover_thumbnails"] = "5";
|
32 |
-
$settings["album_text_align"] = "left";
|
33 |
-
$settings["album_font_family"] = "Verdana";
|
34 |
-
$settings["album_heading_font_size"] = "16";
|
35 |
-
$settings["album_text_font_size"] = "12";
|
36 |
-
$settings["album_desc_length"] = "400";
|
37 |
|
38 |
-
$settings["lightbox_type"] = "pretty_photo";
|
39 |
-
$settings["lightbox_overlay_opacity"] = "0.6";
|
40 |
-
$settings["lightbox_overlay_border_size"] = "5";
|
41 |
-
$settings["lightbox_overlay_border_radius"] = "5";
|
42 |
-
$settings["lightbox_text_color"] = "#ffffff";
|
43 |
-
$settings["lightbox_overlay_border_color"] = "#ffffff";
|
44 |
-
$settings["lightbox_inline_bg_color"] = "#ffffff";
|
45 |
-
$settings["lightbox_overlay_bg_color"] = "#000000";
|
46 |
-
$settings["lightbox_fade_in_time"] = "500";
|
47 |
-
$settings["lightbox_fade_out_time"] = "500";
|
48 |
-
$settings["lightbox_text_align"] = "left";
|
49 |
-
$settings["lightbox_font_family"] = "Verdana";
|
50 |
-
$settings["lightbox_heading_font_size"] = "16";
|
51 |
-
$settings["lightbox_text_font_size"] = "12";
|
52 |
-
$settings["facebook_comments"] = "0";
|
53 |
-
$settings["social_sharing"] = "0";
|
54 |
-
$settings["image_title_setting"] = "1";
|
55 |
-
$settings["image_desc_setting"] = "1";
|
56 |
|
57 |
-
$settings["autoplay_setting"] = "0";
|
58 |
-
$settings["slide_interval"] = "5";
|
59 |
|
60 |
-
$settings["pagination_setting"] = "0";
|
61 |
-
$settings["images_per_page"] = "10";
|
62 |
|
63 |
-
$settings["filters_setting"] = "0";
|
64 |
-
$settings["filter_font_family"] = "Verdana";
|
65 |
-
$settings["filter_font_size"] = "12";
|
66 |
-
$settings["back_button_text"] = "Back to Albums";
|
67 |
-
$settings["album_click_text"] = "Click to View Album";
|
68 |
-
$settings["album_text_color"] = "#C0C0C0";
|
69 |
-
$settings["button_color"] = "#000000";
|
70 |
-
$settings["button_text_color"] = "#CCCCCC";
|
71 |
-
$settings["filters_color"] = "#2a83ed";
|
72 |
-
$settings["filters_text_color"] = "#ffffff";
|
73 |
-
$settings["album_seperator"] = "1";
|
74 |
-
$settings["back_button_font_family"] = "Verdana";
|
75 |
-
$settings["back_button_font_size"] = "12";
|
76 |
|
77 |
-
$settings["admin_full_control"] = "1";
|
78 |
-
$settings["admin_read_control"] = "1";
|
79 |
-
$settings["admin_write_control"] = "1";
|
80 |
-
$settings["editor_full_control"] = "0";
|
81 |
-
$settings["editor_read_control"] = "1";
|
82 |
-
$settings["editor_write_control"] = "0";
|
83 |
-
$settings["author_full_control"] = "0";
|
84 |
-
$settings["author_read_control"] = "1";
|
85 |
-
$settings["author_write_control"] = "0";
|
86 |
-
$settings["contributor_full_control"] = "0";
|
87 |
-
$settings["contributor_read_control"] = "1";
|
88 |
-
$settings["contributor_write_control"] = "0";
|
89 |
-
$settings["subscriber_full_control"] = "0";
|
90 |
-
$settings["subscriber_read_control"] = "1";
|
91 |
-
$settings["subscriber_write_control"] = "0";
|
92 |
|
93 |
-
$settings["language_direction"] = "inherit";
|
94 |
-
foreach ($settings as $val => $innerKey)
|
95 |
-
{
|
96 |
-
|
97 |
-
(
|
98 |
-
$wpdb->prepare
|
99 |
(
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
|
|
|
|
|
|
105 |
}
|
106 |
?>
|
1 |
<?php
|
2 |
+
if(!defined("ABSPATH")) exit; //exit if accessed directly
|
3 |
+
switch($gb_role)
|
4 |
+
{
|
5 |
+
case "administrator":
|
6 |
+
$user_role_permission = "manage_options";
|
7 |
+
break;
|
8 |
+
case "editor":
|
9 |
+
$user_role_permission = "publish_pages";
|
10 |
+
break;
|
11 |
+
case "author":
|
12 |
+
$user_role_permission = "publish_posts";
|
13 |
+
break;
|
14 |
+
}
|
15 |
+
if (!current_user_can($user_role_permission))
|
16 |
+
{
|
17 |
return;
|
18 |
}
|
19 |
+
else
|
20 |
+
{
|
21 |
+
global $wpdb,$current_user;
|
22 |
+
if (!is_user_logged_in()) {
|
23 |
+
return;
|
24 |
+
}
|
25 |
|
26 |
+
$settings = array();
|
27 |
|
28 |
+
$settings["thumbnails_custom_enable"] = "1";
|
29 |
+
$settings["thumbnails_width"] = "160";
|
30 |
+
$settings["thumbnails_height"] = "120";
|
31 |
+
$settings["thumbnails_opacity"] = "1";
|
32 |
+
$settings["thumbnails_border_size"] = "2";
|
33 |
+
$settings["thumbnails_border_radius"] = "2";
|
34 |
+
$settings["thumbnails_border_color"] = "#000000";
|
35 |
+
$settings["margin_btw_thumbnails"] = "5";
|
36 |
+
$settings["thumbnail_text_color"] = "#ffffff";
|
37 |
+
$settings["thumbnail_text_align"] = "center";
|
38 |
+
$settings["thumbnail_font_family"] = "Verdana";
|
39 |
+
$settings["heading_font_size"] = "16";
|
40 |
+
$settings["text_font_size"] = "12";
|
41 |
+
$settings["thumbnail_desc_length"] = "60";
|
42 |
|
43 |
+
$settings["cover_custom_enable"] = "1";
|
44 |
+
$settings["cover_thumbnail_width"] = "160";
|
45 |
+
$settings["cover_thumbnail_height"] = "120";
|
46 |
+
$settings["cover_thumbnail_opacity"] = "1";
|
47 |
+
$settings["cover_thumbnail_border_size"] = "2";
|
48 |
+
$settings["cover_thumbnail_border_radius"] = "2";
|
49 |
+
$settings["cover_thumbnail_border_color"] = "#000000";
|
50 |
+
$settings["margin_btw_cover_thumbnails"] = "5";
|
51 |
+
$settings["album_text_align"] = "left";
|
52 |
+
$settings["album_font_family"] = "Verdana";
|
53 |
+
$settings["album_heading_font_size"] = "16";
|
54 |
+
$settings["album_text_font_size"] = "12";
|
55 |
+
$settings["album_desc_length"] = "400";
|
56 |
|
57 |
+
$settings["lightbox_type"] = "pretty_photo";
|
58 |
+
$settings["lightbox_overlay_opacity"] = "0.6";
|
59 |
+
$settings["lightbox_overlay_border_size"] = "5";
|
60 |
+
$settings["lightbox_overlay_border_radius"] = "5";
|
61 |
+
$settings["lightbox_text_color"] = "#ffffff";
|
62 |
+
$settings["lightbox_overlay_border_color"] = "#ffffff";
|
63 |
+
$settings["lightbox_inline_bg_color"] = "#ffffff";
|
64 |
+
$settings["lightbox_overlay_bg_color"] = "#000000";
|
65 |
+
$settings["lightbox_fade_in_time"] = "500";
|
66 |
+
$settings["lightbox_fade_out_time"] = "500";
|
67 |
+
$settings["lightbox_text_align"] = "left";
|
68 |
+
$settings["lightbox_font_family"] = "Verdana";
|
69 |
+
$settings["lightbox_heading_font_size"] = "16";
|
70 |
+
$settings["lightbox_text_font_size"] = "12";
|
71 |
+
$settings["facebook_comments"] = "0";
|
72 |
+
$settings["social_sharing"] = "0";
|
73 |
+
$settings["image_title_setting"] = "1";
|
74 |
+
$settings["image_desc_setting"] = "1";
|
75 |
|
76 |
+
$settings["autoplay_setting"] = "0";
|
77 |
+
$settings["slide_interval"] = "5";
|
78 |
|
79 |
+
$settings["pagination_setting"] = "0";
|
80 |
+
$settings["images_per_page"] = "10";
|
81 |
|
82 |
+
$settings["filters_setting"] = "0";
|
83 |
+
$settings["filter_font_family"] = "Verdana";
|
84 |
+
$settings["filter_font_size"] = "12";
|
85 |
+
$settings["back_button_text"] = "Back to Albums";
|
86 |
+
$settings["album_click_text"] = "Click to View Album";
|
87 |
+
$settings["album_text_color"] = "#C0C0C0";
|
88 |
+
$settings["button_color"] = "#000000";
|
89 |
+
$settings["button_text_color"] = "#CCCCCC";
|
90 |
+
$settings["filters_color"] = "#2a83ed";
|
91 |
+
$settings["filters_text_color"] = "#ffffff";
|
92 |
+
$settings["album_seperator"] = "1";
|
93 |
+
$settings["back_button_font_family"] = "Verdana";
|
94 |
+
$settings["back_button_font_size"] = "12";
|
95 |
|
96 |
+
$settings["admin_full_control"] = "1";
|
97 |
+
$settings["admin_read_control"] = "1";
|
98 |
+
$settings["admin_write_control"] = "1";
|
99 |
+
$settings["editor_full_control"] = "0";
|
100 |
+
$settings["editor_read_control"] = "1";
|
101 |
+
$settings["editor_write_control"] = "0";
|
102 |
+
$settings["author_full_control"] = "0";
|
103 |
+
$settings["author_read_control"] = "1";
|
104 |
+
$settings["author_write_control"] = "0";
|
105 |
+
$settings["contributor_full_control"] = "0";
|
106 |
+
$settings["contributor_read_control"] = "1";
|
107 |
+
$settings["contributor_write_control"] = "0";
|
108 |
+
$settings["subscriber_full_control"] = "0";
|
109 |
+
$settings["subscriber_read_control"] = "1";
|
110 |
+
$settings["subscriber_write_control"] = "0";
|
111 |
|
112 |
+
$settings["language_direction"] = "inherit";
|
113 |
+
foreach ($settings as $val => $innerKey)
|
114 |
+
{
|
115 |
+
$wpdb->query
|
|
|
|
|
116 |
(
|
117 |
+
$wpdb->prepare
|
118 |
+
(
|
119 |
+
"INSERT INTO " . gallery_bank_settings() . " (setting_key, setting_value) VALUES(%s, %s)",
|
120 |
+
$val,
|
121 |
+
$innerKey
|
122 |
+
)
|
123 |
+
);
|
124 |
+
}
|
125 |
}
|
126 |
?>
|
lib/install-script.php
CHANGED
@@ -1,318 +1,354 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
4 |
{
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
move_uploaded_file($temp_image_path, $uploaded_image_path);
|
15 |
-
$type = explode(".", $image);
|
16 |
-
$thumbnail_image_path = GALLERY_MAIN_THUMB_DIR . preg_replace('{\\.[^\\.]+$}', '.'.$type[1], $temp_image_name);
|
17 |
-
|
18 |
-
$result = generate_gallery_thumbnail($uploaded_image_path, $thumbnail_image_path, $width, $height);
|
19 |
-
return $result ? array($uploaded_image_path, $thumbnail_image_path) : false;
|
20 |
-
}
|
21 |
}
|
22 |
-
if(!
|
23 |
{
|
24 |
-
|
25 |
-
{
|
26 |
-
$temp_image_path = GALLERY_MAIN_UPLOAD_DIR . $album_image;
|
27 |
-
$temp_image_name = $album_image;
|
28 |
-
list(, , $temp_image_type) = getimagesize($temp_image_path);
|
29 |
-
if ($temp_image_type === NULL) {
|
30 |
-
return false;
|
31 |
-
}
|
32 |
-
$uploaded_image_path = GALLERY_MAIN_UPLOAD_DIR . $temp_image_name;
|
33 |
-
move_uploaded_file($temp_image_path, $uploaded_image_path);
|
34 |
-
$type = explode(".", $album_image);
|
35 |
-
$thumbnail_image_path = GALLERY_MAIN_ALB_THUMB_DIR . preg_replace("{\\.[^\\.]+$}", ".".$type[1], $temp_image_name);
|
36 |
-
|
37 |
-
$result = generate_gallery_thumbnail($uploaded_image_path, $thumbnail_image_path, $width, $height);
|
38 |
-
return $result ? array($uploaded_image_path, $thumbnail_image_path) : false;
|
39 |
-
}
|
40 |
}
|
41 |
-
|
42 |
-
if(!function_exists("generate_gallery_thumbnail"))
|
43 |
{
|
44 |
-
|
|
|
45 |
{
|
46 |
-
|
47 |
-
|
48 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
49 |
|
50 |
-
|
51 |
-
|
52 |
-
break;
|
53 |
-
case IMAGETYPE_JPEG:
|
54 |
-
$source_gd_image = imagecreatefromjpeg($source_image_path);
|
55 |
-
break;
|
56 |
-
case IMAGETYPE_PNG:
|
57 |
-
$source_gd_image = imagecreatefrompng($source_image_path);
|
58 |
-
break;
|
59 |
}
|
60 |
-
|
61 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
62 |
}
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
(
|
|
|
|
|
70 |
|
71 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
72 |
|
73 |
-
|
74 |
-
(int)$real_width = $imageWidth > $imageHeight ? $imageWidth : $imageHeight;
|
75 |
-
}
|
76 |
-
$thumbnail_gd_image = imagecreatetruecolor($real_width, $real_height);
|
77 |
-
$bg_color = imagecolorallocate($thumbnail_gd_image, 255, 255, 255);
|
78 |
-
imagefilledrectangle($thumbnail_gd_image, 0, 0, $real_width, $real_height, $bg_color);
|
79 |
-
imagecopyresampled($thumbnail_gd_image, $source_gd_image, 0, 0, 0, 0, $real_width, $real_height, $source_image_width, $source_image_height);
|
80 |
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
$sql = "CREATE TABLE " . gallery_bank_albums() . "(
|
95 |
-
album_id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
96 |
-
album_name TEXT,
|
97 |
-
author VARCHAR(100),
|
98 |
-
album_date DATE,
|
99 |
-
description TEXT ,
|
100 |
-
album_order INTEGER(10),
|
101 |
-
PRIMARY KEY (album_id)
|
102 |
-
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_general_ci";
|
103 |
-
dbDelta($sql);
|
104 |
}
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
{
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
PRIMARY KEY(pic_id)
|
124 |
-
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_general_ci";
|
125 |
-
dbDelta($sql);
|
126 |
}
|
127 |
-
|
128 |
-
if(!function_exists("create_table_album_settings"))
|
129 |
-
{
|
130 |
-
function create_table_album_settings()
|
131 |
{
|
132 |
-
|
133 |
-
$sql = "CREATE TABLE " . gallery_bank_settings() . "(
|
134 |
-
setting_id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
135 |
-
setting_key VARCHAR(100) NOT NULL,
|
136 |
-
setting_value TEXT NOT NULL,
|
137 |
-
PRIMARY KEY (setting_id)
|
138 |
-
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_general_ci";
|
139 |
-
dbDelta($sql);
|
140 |
-
|
141 |
-
include (GALLERY_BK_PLUGIN_DIR . "/lib/include_settings.php");
|
142 |
-
|
143 |
-
}
|
144 |
-
}
|
145 |
-
/******************************************End of Code for Table Creation**********************/
|
146 |
-
global $wpdb;
|
147 |
-
require_once(ABSPATH . "wp-admin/includes/upgrade.php");
|
148 |
-
update_option("gallery-bank-updation-check-url","http://tech-banker.com/wp-admin/admin-ajax.php");
|
149 |
-
$version = get_option("gallery-bank-pro-edition");
|
150 |
-
if($version == "")
|
151 |
-
{
|
152 |
-
if (count($wpdb->get_var("SHOW TABLES LIKE '" . gallery_bank_albums() . "'")) == 0)
|
153 |
{
|
154 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
155 |
}
|
156 |
-
|
|
|
|
|
|
|
157 |
{
|
158 |
-
|
159 |
-
|
160 |
-
|
161 |
-
|
162 |
-
|
163 |
-
|
164 |
-
|
165 |
-
|
166 |
-
|
167 |
-
|
168 |
-
|
|
|
169 |
{
|
170 |
-
|
171 |
-
{
|
172 |
-
$wpdb->query
|
173 |
-
(
|
174 |
-
$wpdb->prepare
|
175 |
-
(
|
176 |
-
"INSERT INTO " . gallery_bank_albums() . "(album_id, album_name, author, album_date,
|
177 |
-
description, album_order) VALUES(%d, %s, %s, %s, %s, %d)",
|
178 |
-
$albums[$flag]->album_id,
|
179 |
-
$albums[$flag]->album_name,
|
180 |
-
$albums[$flag]->author,
|
181 |
-
$albums[$flag]->album_date,
|
182 |
-
$albums[$flag]->description,
|
183 |
-
$albums[$flag]->album_id
|
184 |
-
)
|
185 |
-
);
|
186 |
-
}
|
187 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
188 |
}
|
189 |
-
|
190 |
-
|
191 |
-
|
192 |
-
|
193 |
-
|
194 |
-
|
195 |
-
|
196 |
-
|
197 |
-
|
198 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
199 |
|
200 |
-
|
201 |
-
|
202 |
|
203 |
-
|
204 |
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
for($flag = 0; $flag < count($album_pics); $flag++)
|
209 |
-
{
|
210 |
-
if($album_pics[$flag]->video == 1)
|
211 |
{
|
212 |
$wpdb->query
|
213 |
(
|
214 |
$wpdb->prepare
|
215 |
(
|
216 |
-
"INSERT INTO " .
|
217 |
-
|
218 |
-
|
219 |
-
$
|
220 |
-
$
|
221 |
-
$
|
222 |
-
$
|
223 |
-
$
|
224 |
-
$album_pics[$flag]->sorting_order,
|
225 |
-
$album_pics[$flag]->date,
|
226 |
-
$album_pics[$flag]->url,
|
227 |
-
isset($album_pics[$flag]->video) ? $album_pics[$flag]->video : 0,
|
228 |
-
isset($album_pics[$flag]->tags) ? $album_pics[$flag]->tags : "" ,
|
229 |
-
isset($album_pics[$flag]->pic_path) ? $album_pics[$flag]->pic_path : "",
|
230 |
-
0
|
231 |
)
|
232 |
);
|
233 |
}
|
234 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
235 |
{
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
241 |
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
|
258 |
-
|
259 |
-
(
|
260 |
-
$wpdb->prepare
|
261 |
(
|
262 |
-
|
263 |
-
|
264 |
-
|
265 |
-
|
266 |
-
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
|
274 |
-
|
275 |
-
|
276 |
-
|
277 |
-
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
|
|
|
|
|
|
284 |
}
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
289 |
{
|
290 |
-
|
|
|
|
|
|
|
291 |
}
|
292 |
-
|
293 |
-
|
294 |
-
$sql = "DROP TABLE " . gallery_bank_settings();
|
295 |
-
$wpdb->query($sql);
|
296 |
|
297 |
-
|
298 |
-
|
299 |
-
update_option("gallery-bank-pro-edition", "3.1");
|
300 |
-
}
|
301 |
-
else
|
302 |
-
{
|
303 |
-
if(count($wpdb->get_var("SHOW TABLES LIKE '" . gallery_bank_albums() . "'")) != 0)
|
304 |
{
|
305 |
-
|
306 |
-
(
|
307 |
-
"ALTER TABLE " . gallery_bank_albums() . " MODIFY album_name TEXT"
|
308 |
-
);
|
309 |
}
|
310 |
-
update_option("gallery-bank-pro-edition", "3.1");
|
311 |
-
}
|
312 |
-
|
313 |
-
$option_auto_update = get_option("gallery-bank-automatic_update");
|
314 |
-
if($option_auto_update == "")
|
315 |
-
{
|
316 |
-
update_option("gallery-bank-automatic_update", "1");
|
317 |
}
|
318 |
?>
|
1 |
<?php
|
2 |
+
if(!defined("ABSPATH")) exit;
|
3 |
+
switch($gb_role)
|
4 |
{
|
5 |
+
case "administrator":
|
6 |
+
$user_role_permission = "manage_options";
|
7 |
+
break;
|
8 |
+
case "editor":
|
9 |
+
$user_role_permission = "publish_pages";
|
10 |
+
break;
|
11 |
+
case "author":
|
12 |
+
$user_role_permission = "publish_posts";
|
13 |
+
break;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
14 |
}
|
15 |
+
if (!current_user_can($user_role_permission))
|
16 |
{
|
17 |
+
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
18 |
}
|
19 |
+
else
|
|
|
20 |
{
|
21 |
+
/******************************************Code for Thumbnails Creation**********************/
|
22 |
+
if(!function_exists("process_gallery_image_upload"))
|
23 |
{
|
24 |
+
function process_gallery_image_upload($image, $width, $height)
|
25 |
+
{
|
26 |
+
$temp_image_path = GALLERY_MAIN_UPLOAD_DIR . $image;
|
27 |
+
$temp_image_name = $image;
|
28 |
+
list(, , $temp_image_type) = getimagesize($temp_image_path);
|
29 |
+
if ($temp_image_type === NULL) {
|
30 |
+
return false;
|
31 |
+
}
|
32 |
+
$uploaded_image_path = GALLERY_MAIN_UPLOAD_DIR . $temp_image_name;
|
33 |
+
move_uploaded_file($temp_image_path, $uploaded_image_path);
|
34 |
+
$type = explode(".", $image);
|
35 |
+
$thumbnail_image_path = GALLERY_MAIN_THUMB_DIR . preg_replace('{\\.[^\\.]+$}', '.'.$type[1], $temp_image_name);
|
36 |
|
37 |
+
$result = generate_gallery_thumbnail($uploaded_image_path, $thumbnail_image_path, $width, $height);
|
38 |
+
return $result ? array($uploaded_image_path, $thumbnail_image_path) : false;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
39 |
}
|
40 |
+
}
|
41 |
+
if(!function_exists("process_gallery_album_upload"))
|
42 |
+
{
|
43 |
+
function process_gallery_album_upload($album_image, $width, $height)
|
44 |
+
{
|
45 |
+
$temp_image_path = GALLERY_MAIN_UPLOAD_DIR . $album_image;
|
46 |
+
$temp_image_name = $album_image;
|
47 |
+
list(, , $temp_image_type) = getimagesize($temp_image_path);
|
48 |
+
if ($temp_image_type === NULL) {
|
49 |
+
return false;
|
50 |
+
}
|
51 |
+
$uploaded_image_path = GALLERY_MAIN_UPLOAD_DIR . $temp_image_name;
|
52 |
+
move_uploaded_file($temp_image_path, $uploaded_image_path);
|
53 |
+
$type = explode(".", $album_image);
|
54 |
+
$thumbnail_image_path = GALLERY_MAIN_ALB_THUMB_DIR . preg_replace("{\\.[^\\.]+$}", ".".$type[1], $temp_image_name);
|
55 |
+
|
56 |
+
$result = generate_gallery_thumbnail($uploaded_image_path, $thumbnail_image_path, $width, $height);
|
57 |
+
return $result ? array($uploaded_image_path, $thumbnail_image_path) : false;
|
58 |
}
|
59 |
+
}
|
60 |
+
/****************************** COMMON FUNCTION TO GENERATE THUMBNAILS********************************/
|
61 |
+
if(!function_exists("generate_gallery_thumbnail"))
|
62 |
+
{
|
63 |
+
function generate_gallery_thumbnail($source_image_path, $thumbnail_image_path, $imageWidth, $imageHeight)
|
64 |
+
{
|
65 |
+
list($source_image_width, $source_image_height, $source_image_type) = getimagesize($source_image_path);
|
66 |
+
$source_gd_image = false;
|
67 |
+
switch ($source_image_type) {
|
68 |
|
69 |
+
case IMAGETYPE_GIF:
|
70 |
+
$source_gd_image = imagecreatefromgif($source_image_path);
|
71 |
+
break;
|
72 |
+
case IMAGETYPE_JPEG:
|
73 |
+
$source_gd_image = imagecreatefromjpeg($source_image_path);
|
74 |
+
break;
|
75 |
+
case IMAGETYPE_PNG:
|
76 |
+
$source_gd_image = imagecreatefrompng($source_image_path);
|
77 |
+
break;
|
78 |
+
}
|
79 |
+
if ($source_gd_image === false) {
|
80 |
+
return false;
|
81 |
+
}
|
82 |
+
$source_aspect_ratio = $source_image_width / $source_image_height;
|
83 |
+
if ($source_image_width > $source_image_height) {
|
84 |
+
(int)$real_height = $imageHeight;
|
85 |
+
(int)$real_width = $imageHeight * $source_aspect_ratio;
|
86 |
+
} else if ($source_image_height > $source_image_width) {
|
87 |
+
(int)$real_height = $imageWidth / $source_aspect_ratio;
|
88 |
+
(int)$real_width = $imageWidth;
|
89 |
|
90 |
+
} else {
|
|
|
|
|
|
|
|
|
|
|
|
|
91 |
|
92 |
+
(int)$real_height = $imageHeight > $imageWidth ? $imageHeight : $imageWidth;
|
93 |
+
(int)$real_width = $imageWidth > $imageHeight ? $imageWidth : $imageHeight;
|
94 |
+
}
|
95 |
+
$thumbnail_gd_image = imagecreatetruecolor($real_width, $real_height);
|
96 |
+
$bg_color = imagecolorallocate($thumbnail_gd_image, 255, 255, 255);
|
97 |
+
imagefilledrectangle($thumbnail_gd_image, 0, 0, $real_width, $real_height, $bg_color);
|
98 |
+
imagecopyresampled($thumbnail_gd_image, $source_gd_image, 0, 0, 0, 0, $real_width, $real_height, $source_image_width, $source_image_height);
|
99 |
|
100 |
+
imagejpeg($thumbnail_gd_image, $thumbnail_image_path, 100);
|
101 |
+
imagedestroy($source_gd_image);
|
102 |
+
imagedestroy($thumbnail_gd_image);
|
103 |
+
return true;
|
104 |
+
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
105 |
}
|
106 |
+
/******************************************End of Code for Thumbnails Creation **********************/
|
107 |
+
|
108 |
+
/****************************************** Code for Table Creation **********************/
|
109 |
+
if(!function_exists("create_table_albums"))
|
110 |
{
|
111 |
+
function create_table_albums()
|
112 |
+
{
|
113 |
+
$sql = "CREATE TABLE " . gallery_bank_albums() . "(
|
114 |
+
album_id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
115 |
+
album_name TEXT,
|
116 |
+
author VARCHAR(100),
|
117 |
+
album_date DATE,
|
118 |
+
description TEXT ,
|
119 |
+
album_order INTEGER(10),
|
120 |
+
PRIMARY KEY (album_id)
|
121 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_general_ci";
|
122 |
+
dbDelta($sql);
|
123 |
+
}
|
|
|
|
|
|
|
124 |
}
|
125 |
+
if(!function_exists("create_table_album_pics"))
|
|
|
|
|
|
|
126 |
{
|
127 |
+
function create_table_album_pics()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
128 |
{
|
129 |
+
$sql = "CREATE TABLE " . gallery_bank_pics() . "(
|
130 |
+
pic_id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
131 |
+
album_id INTEGER(10) UNSIGNED NOT NULL,
|
132 |
+
title TEXT,
|
133 |
+
description TEXT,
|
134 |
+
thumbnail_url TEXT NOT NULL,
|
135 |
+
sorting_order INTEGER(20),
|
136 |
+
date DATE,
|
137 |
+
url VARCHAR(250),
|
138 |
+
video INTEGER(10) NOT NULL,
|
139 |
+
tags TEXT,
|
140 |
+
pic_name TEXT NOT NULL,
|
141 |
+
album_cover INTEGER(1) NOT NULL,
|
142 |
+
PRIMARY KEY(pic_id)
|
143 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_general_ci";
|
144 |
+
dbDelta($sql);
|
145 |
}
|
146 |
+
}
|
147 |
+
if(!function_exists("create_table_album_settings"))
|
148 |
+
{
|
149 |
+
function create_table_album_settings()
|
150 |
{
|
151 |
+
global $wpdb;
|
152 |
+
$sql = "CREATE TABLE " . gallery_bank_settings() . "(
|
153 |
+
setting_id INTEGER(10) UNSIGNED NOT NULL AUTO_INCREMENT,
|
154 |
+
setting_key VARCHAR(100) NOT NULL,
|
155 |
+
setting_value TEXT NOT NULL,
|
156 |
+
PRIMARY KEY (setting_id)
|
157 |
+
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE utf8_general_ci";
|
158 |
+
dbDelta($sql);
|
159 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/lib/include_settings.php"))
|
160 |
+
{
|
161 |
+
global $wpdb,$current_user;
|
162 |
+
if (!is_user_logged_in())
|
163 |
{
|
164 |
+
return;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
165 |
}
|
166 |
+
if(is_super_admin())
|
167 |
+
{
|
168 |
+
$gb_role = "administrator";
|
169 |
+
}
|
170 |
+
else
|
171 |
+
{
|
172 |
+
$gb_role = $wpdb->prefix . "capabilities";
|
173 |
+
$current_user->role = array_keys($current_user->$gb_role);
|
174 |
+
$gb_role = $current_user->role[0];
|
175 |
+
}
|
176 |
+
include GALLERY_BK_PLUGIN_DIR . "/lib/include_settings.php";
|
177 |
+
}
|
178 |
+
|
179 |
}
|
180 |
+
}
|
181 |
+
/******************************************End of Code for Table Creation**********************/
|
182 |
+
global $wpdb;
|
183 |
+
require_once(ABSPATH . "wp-admin/includes/upgrade.php");
|
184 |
+
update_option("gallery-bank-updation-check-url","http://tech-banker.com/wp-admin/admin-ajax.php");
|
185 |
+
$version = get_option("gallery-bank-pro-edition");
|
186 |
+
if($version == "")
|
187 |
+
{
|
188 |
+
if (count($wpdb->get_var("SHOW TABLES LIKE '" . gallery_bank_albums() . "'")) == 0)
|
189 |
+
{
|
190 |
+
create_table_albums();
|
191 |
+
}
|
192 |
+
else
|
193 |
+
{
|
194 |
+
$albums = $wpdb->get_results
|
195 |
+
(
|
196 |
+
"Select * FROM " . gallery_bank_albums()
|
197 |
+
);
|
198 |
|
199 |
+
$sql = "DROP TABLE " . gallery_bank_albums();
|
200 |
+
$wpdb->query($sql);
|
201 |
|
202 |
+
create_table_albums();
|
203 |
|
204 |
+
if(count($albums) > 0)
|
205 |
+
{
|
206 |
+
for($flag = 0; $flag < count($albums); $flag++)
|
|
|
|
|
|
|
207 |
{
|
208 |
$wpdb->query
|
209 |
(
|
210 |
$wpdb->prepare
|
211 |
(
|
212 |
+
"INSERT INTO " . gallery_bank_albums() . "(album_id, album_name, author, album_date,
|
213 |
+
description, album_order) VALUES(%d, %s, %s, %s, %s, %d)",
|
214 |
+
$albums[$flag]->album_id,
|
215 |
+
$albums[$flag]->album_name,
|
216 |
+
$albums[$flag]->author,
|
217 |
+
$albums[$flag]->album_date,
|
218 |
+
$albums[$flag]->description,
|
219 |
+
$albums[$flag]->album_id
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
220 |
)
|
221 |
);
|
222 |
}
|
223 |
+
}
|
224 |
+
}
|
225 |
+
if (count($wpdb->get_var("SHOW TABLES LIKE '" . gallery_bank_pics() . "'")) == 0)
|
226 |
+
{
|
227 |
+
create_table_album_pics();
|
228 |
+
}
|
229 |
+
else
|
230 |
+
{
|
231 |
+
$album_pics = $wpdb->get_results
|
232 |
+
(
|
233 |
+
"Select * FROM " . gallery_bank_pics()
|
234 |
+
);
|
235 |
+
|
236 |
+
$sql = "DROP TABLE " . gallery_bank_pics();
|
237 |
+
$wpdb->query($sql);
|
238 |
+
|
239 |
+
create_table_album_pics();
|
240 |
+
|
241 |
+
if(count($album_pics) > 0)
|
242 |
+
{
|
243 |
+
$album_id = 0;
|
244 |
+
for($flag = 0; $flag < count($album_pics); $flag++)
|
245 |
{
|
246 |
+
if($album_pics[$flag]->video == 1)
|
247 |
+
{
|
248 |
+
$wpdb->query
|
249 |
+
(
|
250 |
+
$wpdb->prepare
|
251 |
+
(
|
252 |
+
"INSERT INTO " . gallery_bank_pics() . "(pic_id, album_id, title, description, thumbnail_url,
|
253 |
+
sorting_order, date, url, video, tags, pic_name, album_cover) VALUES(%d, %d, %s, %s, %s, %d, %s,
|
254 |
+
%s, %d, %s, %s, %d)",
|
255 |
+
$album_pics[$flag]->pic_id,
|
256 |
+
$album_pics[$flag]->album_id,
|
257 |
+
$album_pics[$flag]->title,
|
258 |
+
$album_pics[$flag]->description,
|
259 |
+
$album_pics[$flag]->thumbnail_url,
|
260 |
+
$album_pics[$flag]->sorting_order,
|
261 |
+
$album_pics[$flag]->date,
|
262 |
+
$album_pics[$flag]->url,
|
263 |
+
isset($album_pics[$flag]->video) ? $album_pics[$flag]->video : 0,
|
264 |
+
isset($album_pics[$flag]->tags) ? $album_pics[$flag]->tags : "" ,
|
265 |
+
isset($album_pics[$flag]->pic_path) ? $album_pics[$flag]->pic_path : "",
|
266 |
+
0
|
267 |
+
)
|
268 |
+
);
|
269 |
+
}
|
270 |
+
else
|
271 |
+
{
|
272 |
+
$file_path = $album_pics[$flag]->pic_path;
|
273 |
+
$file_name_exct = explode("/", $album_pics[$flag]->pic_path);
|
274 |
+
$file_name = $file_name_exct[count($file_name_exct) - 1];
|
275 |
+
$src = str_replace(site_url("/"), "", $file_path);
|
276 |
+
$destination = GALLERY_MAIN_UPLOAD_DIR.$file_name;
|
277 |
|
278 |
+
if (PHP_VERSION > 5)
|
279 |
+
{
|
280 |
+
copy(ABSPATH.$src, $destination);
|
281 |
+
}
|
282 |
+
else
|
283 |
+
{
|
284 |
+
$content = file_get_contents(ABSPATH.$src);
|
285 |
+
$fp = fopen($destination, "w");
|
286 |
+
fwrite($fp, $content);
|
287 |
+
fclose($fp);
|
288 |
+
}
|
289 |
+
if(file_exists($destination))
|
290 |
+
{
|
291 |
+
process_gallery_image_upload($file_name, 160, 120);
|
292 |
+
}
|
293 |
|
294 |
+
$wpdb->query
|
|
|
|
|
295 |
(
|
296 |
+
$wpdb->prepare
|
297 |
+
(
|
298 |
+
"INSERT INTO " . gallery_bank_pics() . "(pic_id, album_id, title, description, thumbnail_url,
|
299 |
+
sorting_order, date, url, video, tags, pic_name, album_cover) VALUES(%d, %d, %s, %s, %s, %d, %s,
|
300 |
+
%s, %d, %s, %s, %d)",
|
301 |
+
$album_pics[$flag]->pic_id,
|
302 |
+
$album_pics[$flag]->album_id,
|
303 |
+
$album_pics[$flag]->title,
|
304 |
+
$album_pics[$flag]->description,
|
305 |
+
$file_name,
|
306 |
+
$album_pics[$flag]->sorting_order,
|
307 |
+
$album_pics[$flag]->date,
|
308 |
+
$album_pics[$flag]->url,
|
309 |
+
$album_pics[$flag]->video,
|
310 |
+
isset($album_pics[$flag]->tags) ? $album_pics[$flag]->tags : "" ,
|
311 |
+
$file_name,
|
312 |
+
$album_id == $album_pics[$flag]->album_id ? 0 : 1
|
313 |
+
)
|
314 |
+
);
|
315 |
+
if($album_id != $album_pics[$flag]->album_id)
|
316 |
+
{
|
317 |
+
process_gallery_album_upload($file_name, 160, 120);
|
318 |
+
}
|
319 |
+
$album_id = $album_pics[$flag]->album_id;
|
320 |
+
}
|
321 |
}
|
322 |
+
}
|
323 |
+
}
|
324 |
+
if (count($wpdb->get_var("SHOW TABLES LIKE '" . gallery_bank_settings() . "'")) == 0)
|
325 |
+
{
|
326 |
+
create_table_album_settings();
|
327 |
+
}
|
328 |
+
else
|
329 |
+
{
|
330 |
+
$sql = "DROP TABLE " . gallery_bank_settings();
|
331 |
+
$wpdb->query($sql);
|
332 |
+
create_table_album_settings();
|
333 |
+
}
|
334 |
+
update_option("gallery-bank-pro-edition", "3.1");
|
335 |
+
}
|
336 |
+
else
|
337 |
+
{
|
338 |
+
if(count($wpdb->get_var("SHOW TABLES LIKE '" . gallery_bank_albums() . "'")) != 0)
|
339 |
{
|
340 |
+
$wpdb->query
|
341 |
+
(
|
342 |
+
"ALTER TABLE " . gallery_bank_albums() . " MODIFY album_name TEXT"
|
343 |
+
);
|
344 |
}
|
345 |
+
update_option("gallery-bank-pro-edition", "3.1");
|
346 |
+
}
|
|
|
|
|
347 |
|
348 |
+
$option_auto_update = get_option("gallery-bank-automatic_update");
|
349 |
+
if($option_auto_update == "")
|
|
|
|
|
|
|
|
|
|
|
350 |
{
|
351 |
+
update_option("gallery-bank-automatic_update", "1");
|
|
|
|
|
|
|
352 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
353 |
}
|
354 |
?>
|
lib/uninstall-script.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
global $wpdb,$current_user;
|
3 |
if (!is_user_logged_in()) {
|
4 |
return;
|
@@ -15,4 +16,4 @@ $wpdb->query($sql);
|
|
15 |
|
16 |
delete_option("gallery-bank-pro-edition");
|
17 |
delete_option("allow_tracking_gb");
|
18 |
-
?>
|
1 |
<?php
|
2 |
+
if(!defined("ABSPATH")) exit; //exit if accessed directly
|
3 |
global $wpdb,$current_user;
|
4 |
if (!is_user_logged_in()) {
|
5 |
return;
|
16 |
|
17 |
delete_option("gallery-bank-pro-edition");
|
18 |
delete_option("allow_tracking_gb");
|
19 |
+
?>
|
lib/upload.php
CHANGED
@@ -1,19 +1,17 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
}
|
16 |
-
|
17 |
if (!current_user_can($user_role_permission))
|
18 |
{
|
19 |
return;
|
1 |
<?php
|
2 |
+
if(!defined("ABSPATH")) exit; //exit if accessed directly
|
3 |
+
switch($gb_role)
|
4 |
+
{
|
5 |
+
case "administrator":
|
6 |
+
$user_role_permission = "manage_options";
|
7 |
+
break;
|
8 |
+
case "editor":
|
9 |
+
$user_role_permission = "publish_pages";
|
10 |
+
break;
|
11 |
+
case "author":
|
12 |
+
$user_role_permission = "publish_posts";
|
13 |
+
break;
|
14 |
+
}
|
|
|
|
|
15 |
if (!current_user_can($user_role_permission))
|
16 |
{
|
17 |
return;
|
readme.txt
CHANGED
@@ -3,7 +3,7 @@ Contributors: Gallery-Bank,contact-banker
|
|
3 |
Tags: add album, add gallery, add pictures, best gallery plugin, filterable gallery, gallery decription, gallery image, gallery lightbox, gallery shortcode, image lightbox, image rotate, image slider, image slideshow, lightbox, mosaic, photo albums, photo gallery, photoalbum, responsive gallery, thumbnail view, video gallery, widget gallery, wordpress gallery, wp gallery, gallery bank
|
4 |
Requires at least: 3.4
|
5 |
Tested up to: 4.6
|
6 |
-
Stable tag: 3.1.
|
7 |
License: GPLv3 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
@@ -500,6 +500,11 @@ is False in shortcode.
|
|
500 |
|
501 |
== Changelog ==
|
502 |
|
|
|
|
|
|
|
|
|
|
|
503 |
= 3.1.26 =
|
504 |
|
505 |
* Compatibility with 4.6
|
3 |
Tags: add album, add gallery, add pictures, best gallery plugin, filterable gallery, gallery decription, gallery image, gallery lightbox, gallery shortcode, image lightbox, image rotate, image slider, image slideshow, lightbox, mosaic, photo albums, photo gallery, photoalbum, responsive gallery, thumbnail view, video gallery, widget gallery, wordpress gallery, wp gallery, gallery bank
|
4 |
Requires at least: 3.4
|
5 |
Tested up to: 4.6
|
6 |
+
Stable tag: 3.1.27
|
7 |
License: GPLv3 or later
|
8 |
License URI: http://www.gnu.org/licenses/gpl-3.0.html
|
9 |
|
500 |
|
501 |
== Changelog ==
|
502 |
|
503 |
+
= 3.1.27 =
|
504 |
+
|
505 |
+
* Security Patch
|
506 |
+
* Few Bugs Fixed
|
507 |
+
|
508 |
= 3.1.26 =
|
509 |
|
510 |
* Compatibility with 4.6
|
views/album-preview.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
switch($gb_role)
|
4 |
{
|
5 |
case "administrator":
|
@@ -18,7 +18,10 @@ if (!current_user_can($user_role_permission))
|
|
18 |
}
|
19 |
else
|
20 |
{
|
21 |
-
|
|
|
|
|
|
|
22 |
?>
|
23 |
<!--suppress ALL -->
|
24 |
<form id="album_preview" class="layout-form">
|
@@ -67,9 +70,9 @@ else
|
|
67 |
<?php
|
68 |
for ($flag = 0;$flag < count($pics);$flag++)
|
69 |
{
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
{
|
74 |
if ($pics[$flag]->video == 1)
|
75 |
{
|
@@ -97,23 +100,24 @@ else
|
|
97 |
?>
|
98 |
<div class="imgLiquidFill dynamic_css">
|
99 |
<?php
|
100 |
-
if ($pics[$flag]->video == 1)
|
|
|
101 |
?>
|
102 |
-
<img imageid="<?php echo $pics[$flag]->pic_id; ?>" id="ux_gb_img" type="video"
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
</div>
|
113 |
</a>
|
114 |
-
|
115 |
}
|
116 |
-
|
117 |
</div>
|
118 |
</div>
|
119 |
</div>
|
@@ -128,15 +132,18 @@ else
|
|
128 |
</div>
|
129 |
</form>
|
130 |
<?php
|
131 |
-
|
|
|
|
|
|
|
132 |
?>
|
133 |
<script type="text/javascript">
|
134 |
-
|
135 |
-
|
136 |
-
|
137 |
-
|
|
|
138 |
</script>
|
139 |
-
<?php
|
140 |
}
|
141 |
?>
|
142 |
-
|
1 |
<?php
|
2 |
+
if(!defined("ABSPATH")) exit; //exit if accessed directly
|
3 |
switch($gb_role)
|
4 |
{
|
5 |
case "administrator":
|
18 |
}
|
19 |
else
|
20 |
{
|
21 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/includes_common_before.php"))
|
22 |
+
{
|
23 |
+
include GALLERY_BK_PLUGIN_DIR . "/views/includes_common_before.php";
|
24 |
+
}
|
25 |
?>
|
26 |
<!--suppress ALL -->
|
27 |
<form id="album_preview" class="layout-form">
|
70 |
<?php
|
71 |
for ($flag = 0;$flag < count($pics);$flag++)
|
72 |
{
|
73 |
+
$image_title = $image_desc_setting == 1 && $pics[$flag]->title != "" ? "<h5>" . esc_attr(html_entity_decode(stripcslashes(htmlspecialchars($pics[$flag]->title)))). "</h5>" : "";
|
74 |
+
$image_description = $image_desc_setting == 1 && $pics[$flag]->description != "" ? "<p>" . esc_attr(html_entity_decode(stripcslashes(htmlspecialchars($pics[$flag]->description)))) ."</p>" : "";
|
75 |
+
if ($pics[$flag]->url == "" || $pics[$flag]->url == "undefined" || $pics[$flag]->url == "http://")
|
76 |
{
|
77 |
if ($pics[$flag]->video == 1)
|
78 |
{
|
100 |
?>
|
101 |
<div class="imgLiquidFill dynamic_css">
|
102 |
<?php
|
103 |
+
if ($pics[$flag]->video == 1)
|
104 |
+
{
|
105 |
?>
|
106 |
+
<img imageid="<?php echo $pics[$flag]->pic_id; ?>" id="ux_gb_img" type="video" src="<?php echo stripcslashes($video_thumb_url); ?>"/>
|
107 |
+
<?php
|
108 |
+
}
|
109 |
+
else
|
110 |
+
{
|
111 |
+
?>
|
112 |
+
<img imageid="<?php echo $pics[$flag]->pic_id; ?>" id="ux_gb_img" type="image" src="<?php echo stripcslashes(GALLERY_BK_THUMB_SMALL_URL . $pics[$flag]->thumbnail_url); ?>"/>
|
113 |
+
<?php
|
114 |
+
}
|
115 |
+
?>
|
116 |
</div>
|
117 |
</a>
|
118 |
+
<?php
|
119 |
}
|
120 |
+
?>
|
121 |
</div>
|
122 |
</div>
|
123 |
</div>
|
132 |
</div>
|
133 |
</form>
|
134 |
<?php
|
135 |
+
if(file_exists(GALLERY_BK_PLUGIN_DIR . "/views/includes_common_after.php"))
|
136 |
+
{
|
137 |
+
include GALLERY_BK_PLUGIN_DIR . "/views/includes_common_after.php";
|
138 |
+
}
|
139 |
?>
|
140 |
<script type="text/javascript">
|
141 |
+
function select_imges_in_row()
|
142 |
+
{
|
143 |
+
var row = jQuery("#ux_ddl_ImagesRow").val();
|
144 |
+
window.location.href = "<?php echo site_url();?>/wp-admin/admin.php?page=album_preview&album_id=<?php echo $album_id;?>&row=" + row;
|
145 |
+
}
|
146 |
</script>
|
147 |
+
<?php
|
148 |
}
|
149 |
?>
|
|
views/album-sorting.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
switch($gb_role)
|
4 |
{
|
5 |
case "administrator":
|
1 |
<?php
|
2 |
+
if(!defined("ABSPATH")) exit; //exit if accessed directly
|
3 |
switch($gb_role)
|
4 |
{
|
5 |
case "administrator":
|
views/automatic-plugin-update.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
switch($gb_role)
|
3 |
{
|
4 |
case "administrator":
|
@@ -54,8 +55,8 @@ else
|
|
54 |
{
|
55 |
});
|
56 |
}
|
57 |
-
|
58 |
</script>
|
59 |
-
<?php
|
60 |
}
|
61 |
-
?>
|
1 |
<?php
|
2 |
+
if(!defined("ABSPATH")) exit; //exit if accessed directly
|
3 |
switch($gb_role)
|
4 |
{
|
5 |
case "administrator":
|
55 |
{
|
56 |
});
|
57 |
}
|
58 |
+
|
59 |
</script>
|
60 |
+
<?php
|
61 |
}
|
62 |
+
?>
|
views/dashboard.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
switch($gb_role)
|
3 |
{
|
4 |
case "administrator":
|
1 |
<?php
|
2 |
+
if(!defined("ABSPATH")) exit; //exit if accessed directly
|
3 |
switch($gb_role)
|
4 |
{
|
5 |
case "administrator":
|
views/edit-album.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
switch($gb_role)
|
3 |
{
|
4 |
case "administrator":
|
1 |
<?php
|
2 |
+
if(!defined("ABSPATH")) exit; //exit if accessed directly
|
3 |
switch($gb_role)
|
4 |
{
|
5 |
case "administrator":
|
views/gallery-bank-system-report.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
switch($gb_role)
|
4 |
{
|
5 |
case "administrator":
|
1 |
<?php
|
2 |
+
if(!defined("ABSPATH")) exit; //exit if accessed directly
|
3 |
switch($gb_role)
|
4 |
{
|
5 |
case "administrator":
|
views/gallery-feedback.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
switch($gb_role)
|
3 |
{
|
4 |
case "administrator":
|
1 |
<?php
|
2 |
+
if(!defined("ABSPATH")) exit; //exit if accessed directly
|
3 |
switch($gb_role)
|
4 |
{
|
5 |
case "administrator":
|
views/header.php
CHANGED
@@ -1,379 +1,399 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
4 |
|
5 |
-
array_push($gb_lang, "bg_BG", "ms_MY", "sq", "sr_RS");
|
6 |
|
7 |
-
array_push($gb_translated_lang,"ar","be_BY","et","fi","ja","ko_KR","nb_NO","no","fr_BE","fr_CA","fr_CH","fr_FR","ru_RU","ru_UA","en_US","en_GB","es_ES","es_CL","es_PE",
|
8 |
-
"es_PR","es_VE","es_CO","nl_NL","nl_BE","hu_HU","de_DE","pt_BR","pt_PT","he_IL","it_IT","da_DK","pl_PL","sv_SE","zh_CN","zh_HK",
|
9 |
-
"zh_sg","zh_TW","zh","cs_CZ","sk_SK","el","hr","sl_SL","id_ID","ro_RO","nn_NO","uk","sl_SL", "th","tr_TR");
|
10 |
|
11 |
-
$language = get_locale();
|
12 |
|
13 |
-
if(!function_exists("check_server_configuration"))
|
14 |
-
{
|
15 |
-
function check_server_configuration( $con = true, $x = "0", $y = "0" )
|
16 |
{
|
17 |
-
|
|
|
|
|
18 |
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
|
27 |
-
|
28 |
|
29 |
-
|
30 |
-
|
31 |
|
32 |
-
|
33 |
-
|
34 |
|
35 |
-
|
36 |
|
37 |
-
|
38 |
|
39 |
-
|
40 |
-
{
|
41 |
-
if ($x * $y <= $max_image_pixel) $result = true;
|
42 |
-
else $result = false;
|
43 |
-
}
|
44 |
-
else
|
45 |
-
{
|
46 |
-
|
47 |
-
$max_x = sqrt($max_image_pixel / 12) * 4;
|
48 |
-
$max_y = sqrt($max_image_pixel / 12) * 3;
|
49 |
-
if($con)
|
50 |
{
|
51 |
-
|
|
|
52 |
}
|
53 |
else
|
54 |
{
|
55 |
-
|
56 |
-
$
|
57 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
58 |
}
|
|
|
59 |
}
|
60 |
-
return $result;
|
61 |
}
|
62 |
-
}
|
63 |
|
64 |
-
if(!function_exists("gallery_convert_bytes"))
|
65 |
-
{
|
66 |
-
function gallery_convert_bytes($value)
|
67 |
{
|
68 |
-
|
69 |
-
{
|
70 |
-
return max("0",$value);
|
71 |
-
}
|
72 |
-
else
|
73 |
{
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
|
|
78 |
{
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
88 |
}
|
89 |
-
return max("0", $value_string);
|
90 |
}
|
91 |
}
|
92 |
-
}
|
93 |
|
94 |
-
if(!function_exists("gallery_get_minisize"))
|
95 |
-
{
|
96 |
-
function gallery_get_minisize()
|
97 |
{
|
98 |
-
|
99 |
-
|
100 |
-
|
|
|
|
|
|
|
101 |
}
|
102 |
-
|
103 |
-
|
104 |
-
<div
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
<?php _e("Watch Gallery Video!", gallery_bank); ?>
|
114 |
-
</a>
|
115 |
-
<p>or,
|
116 |
-
<a target="_blank" href="http://tech-banker.com/products/wp-gallery-bank/knowledge-base/">
|
117 |
-
<?php _e("read documentation here", gallery_bank); ?>
|
118 |
-
</a>
|
119 |
-
</p>
|
120 |
-
</div>
|
121 |
-
<div class="welcome-panel-column" style="width:250px !important;">
|
122 |
-
<h4 class="welcome-screen-margin"><?php _e("Go Premium", gallery_bank); ?></h4>
|
123 |
-
<ul>
|
124 |
-
<li>
|
125 |
-
<a href="http://tech-banker.com/products/wp-gallery-bank/" target="_blank" class="welcome-icon">
|
126 |
-
<?php _e("Features", gallery_bank); ?>
|
127 |
-
</a>
|
128 |
-
</li>
|
129 |
-
<li>
|
130 |
-
<a href="http://tech-banker.com/products/wp-gallery-bank/demo/" target="_blank" class="welcome-icon">
|
131 |
-
<?php _e("Online Demos", gallery_bank); ?>
|
132 |
-
</a>
|
133 |
-
</li>
|
134 |
-
<li>
|
135 |
-
<a href="http://tech-banker.com/products/wp-gallery-bank/pricing/" target="_blank" class="welcome-icon">
|
136 |
-
<?php _e("Pricing Plans", gallery_bank); ?>
|
137 |
-
</a>
|
138 |
-
</li>
|
139 |
-
</ul>
|
140 |
-
</div>
|
141 |
-
<div class="welcome-panel-column" style="width:240px !important;">
|
142 |
-
<h4 class="welcome-screen-margin">
|
143 |
-
<?php _e("Knowledge Base", gallery_bank); ?>
|
144 |
-
</h4>
|
145 |
-
<ul>
|
146 |
-
<li>
|
147 |
-
<a href="http://tech-banker.com/forums/forum/gallery-bank-support/" target="_blank" class="welcome-icon">
|
148 |
-
<?php _e("Support Forum", gallery_bank); ?>
|
149 |
-
</a>
|
150 |
-
</li>
|
151 |
-
<li>
|
152 |
-
<a href="http://tech-banker.com/products/wp-gallery-bank/knowledge-base/" target="_blank" class="welcome-icon">
|
153 |
-
<?php _e("FAQ's", gallery_bank); ?>
|
154 |
-
</a>
|
155 |
-
</li>
|
156 |
-
<li>
|
157 |
-
<a href="http://tech-banker.com/products/renew-premium-support-wp-gallery-bank/" target="_blank" class="welcome-icon">
|
158 |
-
<?php _e("Renew Premium Support", gallery_bank); ?>
|
159 |
-
</a>
|
160 |
-
</li>
|
161 |
-
</ul>
|
162 |
-
</div>
|
163 |
-
<div class="welcome-panel-column welcome-panel-last" style="width:250px !important;">
|
164 |
-
<h4 class="welcome-screen-margin"><?php _e("More Actions", gallery_bank); ?></h4>
|
165 |
-
<ul>
|
166 |
-
<li>
|
167 |
-
<a href="http://tech-banker.com/shop/plugin-customization/order-customization-wp-gallery-bank/" target="_blank" class="welcome-icon">
|
168 |
-
<?php _e("Plugin Customization", gallery_bank); ?>
|
169 |
-
</a>
|
170 |
-
</li>
|
171 |
-
<li>
|
172 |
-
<a href="admin.php?page=gallery_bank_recommended_plugins" class="welcome-icon">
|
173 |
-
<?php _e("Recommendations", gallery_bank); ?>
|
174 |
-
</a>
|
175 |
-
</li>
|
176 |
-
<li>
|
177 |
-
<a href="admin.php?page=gallery_bank_other_services" class="welcome-icon">
|
178 |
-
<?php _e("Our Other Services", gallery_bank); ?>
|
179 |
</a>
|
180 |
-
|
181 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
182 |
</div>
|
183 |
</div>
|
184 |
</div>
|
185 |
-
</div>
|
186 |
-
<?php
|
187 |
-
if(isset($_GET["page"]))
|
188 |
-
{
|
189 |
-
?>
|
190 |
-
<script>
|
191 |
-
jQuery(document).ready(function()
|
192 |
-
{
|
193 |
-
jQuery(".nav-tab-wrapper > a#<?php echo esc_attr($_GET["page"]);?>").addClass("nav-tab-active");
|
194 |
-
});
|
195 |
-
</script>
|
196 |
<?php
|
197 |
-
|
198 |
-
{
|
199 |
-
|
200 |
-
|
201 |
-
|
202 |
-
|
203 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
204 |
|
205 |
-
|
206 |
-
|
207 |
-
|
208 |
-
|
209 |
-
|
210 |
-
|
211 |
-
|
212 |
-
|
213 |
-
|
214 |
-
|
215 |
-
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
224 |
-
|
225 |
-
|
226 |
-
|
227 |
-
|
228 |
-
|
229 |
-
|
230 |
-
|
231 |
-
|
232 |
-
|
233 |
-
|
234 |
-
|
235 |
|
236 |
-
|
237 |
-
|
238 |
-
|
239 |
-
|
240 |
-
|
241 |
-
|
242 |
-
|
243 |
-
|
244 |
-
|
245 |
-
|
246 |
-
|
247 |
-
|
248 |
-
|
249 |
-
|
250 |
-
|
251 |
-
|
252 |
-
|
253 |
-
|
254 |
-
|
255 |
-
|
256 |
-
|
257 |
-
|
258 |
-
|
259 |
-
|
260 |
-
|
261 |
-
|
262 |
-
|
263 |
-
|
264 |
-
}
|
265 |
-
?>
|
266 |
-
<ul class="breadcrumb" style="margin-top: 10px;">
|
267 |
-
|
268 |
-
|
269 |
-
|
270 |
-
|
271 |
-
|
272 |
-
|
273 |
-
</ul>
|
274 |
|
275 |
-
<?php
|
276 |
-
switch ($gb_role)
|
277 |
-
{
|
278 |
-
|
279 |
-
|
280 |
-
|
281 |
-
|
282 |
-
|
283 |
-
|
284 |
-
|
285 |
-
|
286 |
-
|
287 |
-
|
288 |
-
|
289 |
-
|
290 |
-
|
291 |
-
|
292 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
293 |
?>
|
294 |
-
<
|
295 |
-
<
|
296 |
-
|
297 |
-
|
298 |
-
|
299 |
-
|
300 |
-
<a class="nav-tab " id="gallery_bank_recommended_plugins" href="admin.php?page=gallery_bank_recommended_plugins"><?php _e("Recommendations", gallery_bank);?></a>
|
301 |
-
<a class="nav-tab " id="gallery_bank_purchase" href="admin.php?page=gallery_bank_purchase"><?php _e("Premium Editions", gallery_bank);?></a>
|
302 |
-
<a class="nav-tab " id="gallery_bank_other_services" href="admin.php?page=gallery_bank_other_services"><?php _e("Our Other Services", gallery_bank);?></a>
|
303 |
-
</h2>
|
304 |
<?php
|
305 |
-
|
306 |
-
|
|
|
307 |
?>
|
308 |
-
<
|
309 |
-
<
|
310 |
-
|
311 |
-
|
312 |
-
|
313 |
-
|
314 |
-
<a class="nav-tab " id="gallery_bank_purchase" href="admin.php?page=gallery_bank_purchase"><?php _e("Premium Editions", gallery_bank);?></a>
|
315 |
-
<a class="nav-tab " id="gallery_bank_other_services" href="admin.php?page=gallery_bank_other_services"><?php _e("Our Other Services", gallery_bank);?></a>
|
316 |
-
</h2>
|
317 |
-
<?php
|
318 |
-
break;
|
319 |
-
}
|
320 |
-
if(esc_attr($_GET["page"]) != "gallery_bank_feature_request")
|
321 |
-
{
|
322 |
-
?>
|
323 |
-
<div class="custom-message green" style="display: block;margin-top:30px">
|
324 |
-
<div style="padding: 4px 0;">
|
325 |
-
<p style="font:12px/1.0em Arial !important;font-weight:bold;">If you don't find any features you were looking for in this Plugin,
|
326 |
-
please write us <a target="_self" href="admin.php?page=gallery_bank_feature_request">here</a> and we shall try to implement this for you as soon as possible! We are looking forward for your valuable <a target="_self" href="admin.php?page=gallery_bank_feature_request">Feedback</a></p>
|
327 |
-
</div>
|
328 |
-
</div>
|
329 |
-
<?php
|
330 |
-
}
|
331 |
-
if(in_array($language, $gb_lang))
|
332 |
-
{
|
333 |
-
?>
|
334 |
-
<div class="custom-message red" style="display: block;margin-top:30px">
|
335 |
-
<div style="padding: 4px 0;">
|
336 |
-
<p style="font:12px/1.0em Arial !important;font-weight:bold;">This plugin language is translated with the help of Google Translator.</p>
|
337 |
-
<p style="font:12px/1.0em Arial !important;">If you would like to translate & help us, we will reward you with a free Eco Version License of Gallery Bank.</p>
|
338 |
-
<p style="font:12px/1.0em Arial !important;">Contact Us at <a target="_blank" href="http://tech-banker.com">http://tech-banker.com</a> or email us at <a href="mailto:support@tech-banker.com">support@tech-banker.com</a></p>
|
339 |
-
</div>
|
340 |
-
</div>
|
341 |
-
<?php
|
342 |
-
}
|
343 |
-
elseif(!(in_array($language, $gb_translated_lang)) && !(in_array($language, $gb_lang)) && $language != "")
|
344 |
-
{
|
345 |
-
?>
|
346 |
-
<div class="custom-message red" style="display: block;margin-top:30px">
|
347 |
-
<div style="padding: 4px 0;">
|
348 |
-
<p style="font:12px/1.0em Arial !important;font-weight:bold;">If you would like to translate Gallery Bank in your native language, we will reward you with a free Eco Version License of Gallery Bank.</p>
|
349 |
-
<p style="font:12px/1.0em Arial !important;">Contact Us at <a target="_blank" href="http://tech-banker.com">http://tech-banker.com</a> or email us at <a href="mailto:support@tech-banker.com">support@tech-banker.com</a></p>
|
350 |
</div>
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
if (!(is_dir(GALLERY_MAIN_THUMB_DIR)))
|
355 |
-
{
|
356 |
-
if(!(is_dir_empty(GALLERY_MAIN_THUMB_DIR)))
|
357 |
{
|
358 |
?>
|
359 |
-
<div class="custom-message red" style="display: block;margin-top:
|
360 |
-
<
|
361 |
-
<
|
362 |
-
|
|
|
363 |
</div>
|
364 |
<?php
|
365 |
}
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
|
|
|
|
|
|
374 |
}
|
375 |
}
|
376 |
-
|
377 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
378 |
}
|
379 |
?>
|
1 |
<?php
|
2 |
+
if(!defined("ABSPATH")) exit; //exit if accessed directly
|
3 |
+
switch($gb_role)
|
4 |
+
{
|
5 |
+
case "administrator":
|
6 |
+
$user_role_permission = "manage_options";
|
7 |
+
break;
|
8 |
+
case "editor":
|
9 |
+
$user_role_permission = "publish_pages";
|
10 |
+
break;
|
11 |
+
case "author":
|
12 |
+
$user_role_permission = "publish_posts";
|
13 |
+
break;
|
14 |
+
}
|
15 |
+
if (!current_user_can($user_role_permission))
|
16 |
+
{
|
17 |
+
return;
|
18 |
+
}
|
19 |
+
else
|
20 |
+
{
|
21 |
+
$gb_lang = array();
|
22 |
+
$gb_translated_lang = array();
|
23 |
|
24 |
+
array_push($gb_lang, "bg_BG", "ms_MY", "sq", "sr_RS");
|
25 |
|
26 |
+
array_push($gb_translated_lang,"ar","be_BY","et","fi","ja","ko_KR","nb_NO","no","fr_BE","fr_CA","fr_CH","fr_FR","ru_RU","ru_UA","en_US","en_GB","es_ES","es_CL","es_PE",
|
27 |
+
"es_PR","es_VE","es_CO","nl_NL","nl_BE","hu_HU","de_DE","pt_BR","pt_PT","he_IL","it_IT","da_DK","pl_PL","sv_SE","zh_CN","zh_HK",
|
28 |
+
"zh_sg","zh_TW","zh","cs_CZ","sk_SK","el","hr","sl_SL","id_ID","ro_RO","nn_NO","uk","sl_SL", "th","tr_TR");
|
29 |
|
30 |
+
$language = get_locale();
|
31 |
|
32 |
+
if(!function_exists("check_server_configuration"))
|
|
|
|
|
33 |
{
|
34 |
+
function check_server_configuration( $con = true, $x = "0", $y = "0" )
|
35 |
+
{
|
36 |
+
if( ! function_exists( "memory_get_usage")) return "";
|
37 |
|
38 |
+
$server_memory_limit = 0;
|
39 |
+
$ini_memory_limit = gallery_convert_bytes( ini_get( "memory_limit" ) );
|
40 |
+
$php_configuration = gallery_convert_bytes( get_cfg_var( "memory_limit" ) );
|
41 |
|
42 |
+
if ( $ini_memory_limit && $php_configuration ) $server_memory_limit = min( $ini_memory_limit, $php_configuration );
|
43 |
+
elseif($ini_memory_limit) $server_memory_limit = $ini_memory_limit;
|
44 |
+
else $server_memory_limit = $php_configuration;
|
45 |
|
46 |
+
if ( ! $server_memory_limit) return "";
|
47 |
|
48 |
+
$free_memory = $server_memory_limit - memory_get_usage( true );
|
49 |
+
$image_pixels = gallery_get_minisize() * gallery_get_minisize() * 3 / 4;
|
50 |
|
51 |
+
$bytes_per_pixel = $server_memory_limit / ( 1024 * 1024 );
|
52 |
+
$factor_result = "6.00" - "0.58" * ( $bytes_per_pixel / 104 );
|
53 |
|
54 |
+
$max_image_pixel = ( $free_memory / $factor_result ) - $image_pixels;
|
55 |
|
56 |
+
if ( $max_image_pixel < 0 ) return "";
|
57 |
|
58 |
+
if ( $x && $y )
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
59 |
{
|
60 |
+
if ($x * $y <= $max_image_pixel) $result = true;
|
61 |
+
else $result = false;
|
62 |
}
|
63 |
else
|
64 |
{
|
65 |
+
|
66 |
+
$max_x = sqrt($max_image_pixel / 12) * 4;
|
67 |
+
$max_y = sqrt($max_image_pixel / 12) * 3;
|
68 |
+
if($con)
|
69 |
+
{
|
70 |
+
$result = "<br />".sprintf(__( "Based on your server memory limit you should not upload images larger then <strong>%d x %d (%2.1f MP)</strong>", gallery_bank), $max_x, $max_y, $max_image_pixel / ( 1024 * 1024 ));
|
71 |
+
}
|
72 |
+
else
|
73 |
+
{
|
74 |
+
$result["maxx"] = $max_x;
|
75 |
+
$result["maxy"] = $max_y;
|
76 |
+
$result["maxp"] = $max_image_pixel;
|
77 |
+
}
|
78 |
}
|
79 |
+
return $result;
|
80 |
}
|
|
|
81 |
}
|
|
|
82 |
|
83 |
+
if(!function_exists("gallery_convert_bytes"))
|
|
|
|
|
84 |
{
|
85 |
+
function gallery_convert_bytes($value)
|
|
|
|
|
|
|
|
|
86 |
{
|
87 |
+
if (is_numeric($value))
|
88 |
+
{
|
89 |
+
return max("0",$value);
|
90 |
+
}
|
91 |
+
else
|
92 |
{
|
93 |
+
$value_length = strlen($value);
|
94 |
+
$value_string = substr($value, 0, $value_length - 1);
|
95 |
+
$unit = strtolower(substr($value, $value_length - 1));
|
96 |
+
switch ($unit)
|
97 |
+
{
|
98 |
+
case "k":
|
99 |
+
$value_string *= 1024;
|
100 |
+
break;
|
101 |
+
case "m":
|
102 |
+
$value_string *= 1048576;
|
103 |
+
break;
|
104 |
+
case "g":
|
105 |
+
$value_string *= 1073741824;
|
106 |
+
break;
|
107 |
+
}
|
108 |
+
return max("0", $value_string);
|
109 |
}
|
|
|
110 |
}
|
111 |
}
|
|
|
112 |
|
113 |
+
if(!function_exists("gallery_get_minisize"))
|
|
|
|
|
114 |
{
|
115 |
+
function gallery_get_minisize()
|
116 |
+
{
|
117 |
+
$result = "100";
|
118 |
+
$result = ceil($result / 25) * 25;
|
119 |
+
return $result;
|
120 |
+
}
|
121 |
}
|
122 |
+
?>
|
123 |
+
<div id="welcome-panel" class="welcome-panel" style="padding:0px !important;background-color: #f9f9f9 !important">
|
124 |
+
<div class="welcome-panel-content">
|
125 |
+
<img src="<?php echo plugins_url("/assets/images/gallery-bank.png" , dirname(__FILE__)); ?>" />
|
126 |
+
<div class="welcome-panel-column-container">
|
127 |
+
<div class="welcome-panel-column" style="width:240px !important;">
|
128 |
+
<h4 class="welcome-screen-margin">
|
129 |
+
<?php _e("Get Started", gallery_bank); ?>
|
130 |
+
</h4>
|
131 |
+
<a class="button button-primary button-hero" target="_blank" href="http://vimeo.com/92378296">
|
132 |
+
<?php _e("Watch Gallery Video!", gallery_bank); ?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
133 |
</a>
|
134 |
+
<p>or,
|
135 |
+
<a target="_blank" href="http://tech-banker.com/products/wp-gallery-bank/knowledge-base/">
|
136 |
+
<?php _e("read documentation here", gallery_bank); ?>
|
137 |
+
</a>
|
138 |
+
</p>
|
139 |
+
</div>
|
140 |
+
<div class="welcome-panel-column" style="width:250px !important;">
|
141 |
+
<h4 class="welcome-screen-margin"><?php _e("Go Premium", gallery_bank); ?></h4>
|
142 |
+
<ul>
|
143 |
+
<li>
|
144 |
+
<a href="http://tech-banker.com/products/wp-gallery-bank/" target="_blank" class="welcome-icon">
|
145 |
+
<?php _e("Features", gallery_bank); ?>
|
146 |
+
</a>
|
147 |
+
</li>
|
148 |
+
<li>
|
149 |
+
<a href="http://tech-banker.com/products/wp-gallery-bank/demo/" target="_blank" class="welcome-icon">
|
150 |
+
<?php _e("Online Demos", gallery_bank); ?>
|
151 |
+
</a>
|
152 |
+
</li>
|
153 |
+
<li>
|
154 |
+
<a href="http://tech-banker.com/products/wp-gallery-bank/pricing/" target="_blank" class="welcome-icon">
|
155 |
+
<?php _e("Pricing Plans", gallery_bank); ?>
|
156 |
+
</a>
|
157 |
+
</li>
|
158 |
+
</ul>
|
159 |
+
</div>
|
160 |
+
<div class="welcome-panel-column" style="width:240px !important;">
|
161 |
+
<h4 class="welcome-screen-margin">
|
162 |
+
<?php _e("Knowledge Base", gallery_bank); ?>
|
163 |
+
</h4>
|
164 |
+
<ul>
|
165 |
+
<li>
|
166 |
+
<a href="http://tech-banker.com/forums/forum/gallery-bank-support/" target="_blank" class="welcome-icon">
|
167 |
+
<?php _e("Support Forum", gallery_bank); ?>
|
168 |
+
</a>
|
169 |
+
</li>
|
170 |
+
<li>
|
171 |
+
<a href="http://tech-banker.com/products/wp-gallery-bank/knowledge-base/" target="_blank" class="welcome-icon">
|
172 |
+
<?php _e("FAQ's", gallery_bank); ?>
|
173 |
+
</a>
|
174 |
+
</li>
|
175 |
+
<li>
|
176 |
+
<a href="http://tech-banker.com/products/renew-premium-support-wp-gallery-bank/" target="_blank" class="welcome-icon">
|
177 |
+
<?php _e("Renew Premium Support", gallery_bank); ?>
|
178 |
+
</a>
|
179 |
+
</li>
|
180 |
+
</ul>
|
181 |
+
</div>
|
182 |
+
<div class="welcome-panel-column welcome-panel-last" style="width:250px !important;">
|
183 |
+
<h4 class="welcome-screen-margin"><?php _e("More Actions", gallery_bank); ?></h4>
|
184 |
+
<ul>
|
185 |
+
<li>
|
186 |
+
<a href="http://tech-banker.com/shop/plugin-customization/order-customization-wp-gallery-bank/" target="_blank" class="welcome-icon">
|
187 |
+
<?php _e("Plugin Customization", gallery_bank); ?>
|
188 |
+
</a>
|
189 |
+
</li>
|
190 |
+
<li>
|
191 |
+
<a href="admin.php?page=gallery_bank_recommended_plugins" class="welcome-icon">
|
192 |
+
<?php _e("Recommendations", gallery_bank); ?>
|
193 |
+
</a>
|
194 |
+
</li>
|
195 |
+
<li>
|
196 |
+
<a href="admin.php?page=gallery_bank_other_services" class="welcome-icon">
|
197 |
+
<?php _e("Our Other Services", gallery_bank); ?>
|
198 |
+
</a>
|
199 |
+
</li>
|
200 |
+
</ul>
|
201 |
+
</div>
|
202 |
</div>
|
203 |
</div>
|
204 |
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
205 |
<?php
|
206 |
+
if(isset($_GET["page"]))
|
207 |
+
{
|
208 |
+
?>
|
209 |
+
<script>
|
210 |
+
jQuery(document).ready(function()
|
211 |
+
{
|
212 |
+
jQuery(".nav-tab-wrapper > a#<?php echo esc_attr($_GET["page"]);?>").addClass("nav-tab-active");
|
213 |
+
});
|
214 |
+
</script>
|
215 |
+
<?php
|
216 |
+
switch(esc_attr($_GET["page"]))
|
217 |
+
{
|
218 |
+
case "gallery_bank":
|
219 |
+
$page = "Dashboard";
|
220 |
+
if ( ! function_exists( "imagecreatefromjpeg" ) ) {
|
221 |
+
_e( "There is a serious misconfiguration in your servers PHP config. Function imagecreatefromjpeg() does not exist. You will encounter problems when uploading photos and not be able to generate thumbnail images. Ask your hosting provider to add GD support with a minimal version 1.8.", gallery_bank );
|
222 |
+
}
|
223 |
|
224 |
+
$max_upload_files = ini_get( "max_file_uploads" );
|
225 |
+
$max_files_upload = $max_upload_files;
|
226 |
+
if ( $max_upload_files < "1" ) {
|
227 |
+
$max_files_upload = __( "unknown", gallery_bank );
|
228 |
+
$max_upload_files = "15";
|
229 |
+
}
|
230 |
+
$max_files_size = ini_get( "upload_max_filesize" );
|
231 |
+
$max_files_time = ini_get( "max_input_time" );
|
232 |
+
if ( $max_files_time < "1" ) $max_files_time = __( "unknown", gallery_bank );
|
233 |
+
break;
|
234 |
+
case "gallery_bank_shortcode":
|
235 |
+
$page = "Short-Codes";
|
236 |
+
break;
|
237 |
+
case "gallery_album_sorting":
|
238 |
+
$page = "Album Sorting";
|
239 |
+
break;
|
240 |
+
case "global_settings":
|
241 |
+
$page = "Global Settings";
|
242 |
+
break;
|
243 |
+
case "gallery_bank_system_status":
|
244 |
+
$page = "System Status";
|
245 |
+
break;
|
246 |
+
case "gallery_bank_purchase":
|
247 |
+
$page = "Purchase Pro Edition";
|
248 |
+
break;
|
249 |
+
case "save_album":
|
250 |
+
$page = "Album";
|
251 |
+
if ( ! function_exists( "imagecreatefromjpeg" ) ) {
|
252 |
+
_e( "There is a serious misconfiguration in your servers PHP config. Function imagecreatefromjpeg() does not exist. You will encounter problems when uploading photos and not be able to generate thumbnail images. Ask your hosting provider to add GD support with a minimal version 1.8.", gallery_bank );
|
253 |
+
}
|
254 |
|
255 |
+
$max_upload_files = ini_get( "max_file_uploads" );
|
256 |
+
$max_files_upload = $max_upload_files;
|
257 |
+
if ( $max_upload_files < "1" ) {
|
258 |
+
$max_files_upload = __( "unknown", gallery_bank );
|
259 |
+
$max_upload_files = "15";
|
260 |
+
}
|
261 |
+
$max_files_size = ini_get( "upload_max_filesize" );
|
262 |
+
$max_files_time = ini_get( "max_input_time" );
|
263 |
+
if ( $max_files_time < "1" ) $max_files_time = __( "unknown", gallery_bank );
|
264 |
+
break;
|
265 |
+
case "images_sorting":
|
266 |
+
$page = "Re-order Images";
|
267 |
+
break;
|
268 |
+
case "album_preview":
|
269 |
+
$page = "Album Preview";
|
270 |
+
break;
|
271 |
+
case "gallery_bank_recommended_plugins":
|
272 |
+
$page = "Recommendations";
|
273 |
+
break;
|
274 |
+
case "gallery_bank_other_services":
|
275 |
+
$page = "Our Other Services";
|
276 |
+
break;
|
277 |
+
case "gallery_auto_plugin_update":
|
278 |
+
$page = "Plugin Updates";
|
279 |
+
break;
|
280 |
+
case "gallery_bank_feature_request":
|
281 |
+
$page = "Feature Request";
|
282 |
+
break;
|
283 |
+
}
|
284 |
+
?>
|
285 |
+
<ul class="breadcrumb" style="margin-top: 10px;">
|
286 |
+
<li>
|
287 |
+
<i class="icon-custom-home"></i>
|
288 |
+
<a href="admin.php?page=gallery_bank"><?php _e("Gallery Bank", gallery_bank); ?></a>
|
289 |
+
<span class="divider">/</span>
|
290 |
+
<a href="#"><?php _e($page, gallery_bank); ?></a>
|
291 |
+
</li>
|
292 |
+
</ul>
|
293 |
|
294 |
+
<?php
|
295 |
+
switch ($gb_role)
|
296 |
+
{
|
297 |
+
case "administrator":
|
298 |
+
?>
|
299 |
+
<h2 class="nav-tab-wrapper">
|
300 |
+
<a class="nav-tab " id="gallery_bank" href="admin.php?page=gallery_bank"><?php _e("Dashboard", gallery_bank);?></a>
|
301 |
+
<a class="nav-tab " id="gallery_bank_shortcode" href="admin.php?page=gallery_bank_shortcode"><?php _e("Short-Codes", gallery_bank);?></a>
|
302 |
+
<a class="nav-tab " id="gallery_album_sorting" href="admin.php?page=gallery_album_sorting"><?php _e("Album Sorting", gallery_bank);?></a>
|
303 |
+
<a class="nav-tab " id="global_settings" href="admin.php?page=global_settings"><?php _e("Global Settings", gallery_bank);?></a>
|
304 |
+
<a class="nav-tab " id="gallery_bank_system_status" href="admin.php?page=gallery_bank_system_status"><?php _e("System Status", gallery_bank);?></a>
|
305 |
+
<a class="nav-tab " id="gallery_bank_recommended_plugins" href="admin.php?page=gallery_bank_recommended_plugins"><?php _e("Recommendations", gallery_bank);?></a>
|
306 |
+
<a class="nav-tab " id="gallery_bank_purchase" href="admin.php?page=gallery_bank_purchase"><?php _e("Premium Editions", gallery_bank);?></a>
|
307 |
+
<a class="nav-tab " id="gallery_bank_other_services" href="admin.php?page=gallery_bank_other_services"><?php _e("Our Other Services", gallery_bank);?></a>
|
308 |
+
</h2>
|
309 |
+
<?php
|
310 |
+
break;
|
311 |
+
case "editor":
|
312 |
+
?>
|
313 |
+
<h2 class="nav-tab-wrapper">
|
314 |
+
<a class="nav-tab " id="gallery_bank" href="admin.php?page=gallery_bank"><?php _e("Dashboard", gallery_bank);?></a>
|
315 |
+
<a class="nav-tab " id="gallery_bank_shortcode" href="admin.php?page=gallery_bank_shortcode"><?php _e("Short-Codes", gallery_bank);?></a>
|
316 |
+
<a class="nav-tab " id="gallery_album_sorting" href="admin.php?page=gallery_album_sorting"><?php _e("Album Sorting", gallery_bank);?></a>
|
317 |
+
<a class="nav-tab " id="global_settings" href="admin.php?page=global_settings"><?php _e("Global Settings", gallery_bank);?></a>
|
318 |
+
<a class="nav-tab " id="gallery_bank_system_status" href="admin.php?page=gallery_bank_system_status"><?php _e("System Status", gallery_bank);?></a>
|
319 |
+
<a class="nav-tab " id="gallery_bank_recommended_plugins" href="admin.php?page=gallery_bank_recommended_plugins"><?php _e("Recommendations", gallery_bank);?></a>
|
320 |
+
<a class="nav-tab " id="gallery_bank_purchase" href="admin.php?page=gallery_bank_purchase"><?php _e("Premium Editions", gallery_bank);?></a>
|
321 |
+
<a class="nav-tab " id="gallery_bank_other_services" href="admin.php?page=gallery_bank_other_services"><?php _e("Our Other Services", gallery_bank);?></a>
|
322 |
+
</h2>
|
323 |
+
<?php
|
324 |
+
break;
|
325 |
+
case "author":
|
326 |
+
?>
|
327 |
+
<h2 class="nav-tab-wrapper">
|
328 |
+
<a class="nav-tab " id="gallery_bank" href="admin.php?page=gallery_bank"><?php _e("Dashboard", gallery_bank);?></a>
|
329 |
+
<a class="nav-tab " id="gallery_bank_shortcode" href="admin.php?page=gallery_bank_shortcode"><?php _e("Short-Codes", gallery_bank);?></a>
|
330 |
+
<a class="nav-tab " id="gallery_album_sorting" href="admin.php?page=gallery_album_sorting"><?php _e("Album Sorting", gallery_bank);?></a>
|
331 |
+
<a class="nav-tab " id="global_settings" href="admin.php?page=global_settings"><?php _e("Global Settings", gallery_bank);?></a>
|
332 |
+
<a class="nav-tab " id="gallery_bank_recommended_plugins" href="admin.php?page=gallery_bank_recommended_plugins"><?php _e("Recommendations", gallery_bank);?></a>
|
333 |
+
<a class="nav-tab " id="gallery_bank_purchase" href="admin.php?page=gallery_bank_purchase"><?php _e("Premium Editions", gallery_bank);?></a>
|
334 |
+
<a class="nav-tab " id="gallery_bank_other_services" href="admin.php?page=gallery_bank_other_services"><?php _e("Our Other Services", gallery_bank);?></a>
|
335 |
+
</h2>
|
336 |
+
<?php
|
337 |
+
break;
|
338 |
+
}
|
339 |
+
if(esc_attr($_GET["page"]) != "gallery_bank_feature_request")
|
340 |
+
{
|
341 |
?>
|
342 |
+
<div class="custom-message green" style="display: block;margin-top:30px">
|
343 |
+
<div style="padding: 4px 0;">
|
344 |
+
<p style="font:12px/1.0em Arial !important;font-weight:bold;">If you don't find any features you were looking for in this Plugin,
|
345 |
+
please write us <a target="_self" href="admin.php?page=gallery_bank_feature_request">here</a> and we shall try to implement this for you as soon as possible! We are looking forward for your valuable <a target="_self" href="admin.php?page=gallery_bank_feature_request">Feedback</a></p>
|
346 |
+
</div>
|
347 |
+
</div>
|
|
|
|
|
|
|
|
|
348 |
<?php
|
349 |
+
}
|
350 |
+
if(in_array($language, $gb_lang))
|
351 |
+
{
|
352 |
?>
|
353 |
+
<div class="custom-message red" style="display: block;margin-top:30px">
|
354 |
+
<div style="padding: 4px 0;">
|
355 |
+
<p style="font:12px/1.0em Arial !important;font-weight:bold;">This plugin language is translated with the help of Google Translator.</p>
|
356 |
+
<p style="font:12px/1.0em Arial !important;">If you would like to translate & help us, we will reward you with a free Eco Version License of Gallery Bank.</p>
|
357 |
+
<p style="font:12px/1.0em Arial !important;">Contact Us at <a target="_blank" href="http://tech-banker.com">http://tech-banker.com</a> or email us at <a href="mailto:support@tech-banker.com">support@tech-banker.com</a></p>
|
358 |
+
</div>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
359 |
</div>
|
360 |
+
<?php
|
361 |
+
}
|
362 |
+
elseif(!(in_array($language, $gb_translated_lang)) && !(in_array($language, $gb_lang)) && $language != "")
|
|
|
|
|
|
|
363 |
{
|
364 |
?>
|
365 |
+
<div class="custom-message red" style="display: block;margin-top:30px">
|
366 |
+
<div style="padding: 4px 0;">
|
367 |
+
<p style="font:12px/1.0em Arial !important;font-weight:bold;">If you would like to translate Gallery Bank in your native language, we will reward you with a free Eco Version License of Gallery Bank.</p>
|
368 |
+
<p style="font:12px/1.0em Arial !important;">Contact Us at <a target="_blank" href="http://tech-banker.com">http://tech-banker.com</a> or email us at <a href="mailto:support@tech-banker.com">support@tech-banker.com</a></p>
|
369 |
+
</div>
|
370 |
</div>
|
371 |
<?php
|
372 |
}
|
373 |
+
if (!(is_dir(GALLERY_MAIN_THUMB_DIR)))
|
374 |
+
{
|
375 |
+
if(!(is_dir_empty(GALLERY_MAIN_THUMB_DIR)))
|
376 |
+
{
|
377 |
+
?>
|
378 |
+
<div class="custom-message red" style="display: block;margin-top:15px">
|
379 |
+
<span>
|
380 |
+
<strong>If you are getting problems with thumbnails, then you need to set 775(write) permissions to <?php echo GALLERY_MAIN_DIR ?> (recursive files & directories) in order to save the images/thumbnails. </strong>
|
381 |
+
</span>
|
382 |
+
</div>
|
383 |
+
<?php
|
384 |
}
|
385 |
}
|
386 |
+
function is_dir_empty($dir)
|
387 |
+
{
|
388 |
+
if (!is_readable($dir)) return NULL;
|
389 |
+
$handle = opendir($dir);
|
390 |
+
while (false !== ($entry = readdir($handle))) {
|
391 |
+
if ($entry != "." && $entry != "..") {
|
392 |
+
return FALSE;
|
393 |
+
}
|
394 |
+
}
|
395 |
+
return TRUE;
|
396 |
+
}
|
397 |
+
}
|
398 |
}
|
399 |
?>
|
views/images-sorting.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
switch($gb_role)
|
4 |
{
|
5 |
case "administrator":
|
1 |
<?php
|
2 |
+
if(!defined("ABSPATH")) exit; //exit if accessed directly
|
3 |
switch($gb_role)
|
4 |
{
|
5 |
case "administrator":
|
views/includes_common_after.php
CHANGED
@@ -1,32 +1,53 @@
|
|
1 |
-
|
2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
3 |
jQuery(".imgLiquidFill").imgLiquid({fill: true});
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
10 |
-
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
});
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
</script>
|
1 |
+
<?php
|
2 |
+
if(!defined("ABSPATH")) exit; //exit if accessed directly
|
3 |
+
switch($gb_role)
|
4 |
+
{
|
5 |
+
case "administrator":
|
6 |
+
$user_role_permission = "manage_options";
|
7 |
+
break;
|
8 |
+
case "editor":
|
9 |
+
$user_role_permission = "publish_pages";
|
10 |
+
break;
|
11 |
+
case "author":
|
12 |
+
$user_role_permission = "publish_posts";
|
13 |
+
break;
|
14 |
+
}
|
15 |
+
if (!current_user_can($user_role_permission))
|
16 |
+
{
|
17 |
+
return;
|
18 |
+
}
|
19 |
+
else
|
20 |
+
{
|
21 |
+
?>
|
22 |
+
<script type="text/javascript">
|
23 |
+
jQuery(document).ready(function ()
|
24 |
+
{
|
25 |
jQuery(".imgLiquidFill").imgLiquid({fill: true});
|
26 |
+
jQuery("a[rel^=\"prettyPhoto\"]").prettyPhoto
|
27 |
+
({
|
28 |
+
animation_speed: <?php echo $lightbox_fade_in_time;?>,
|
29 |
+
slideshow: <?php echo $slide_interval * 1000; ?>,
|
30 |
+
autoplay_slideshow: <?php echo $autoplay;?>,
|
31 |
+
opacity: 0.80,
|
32 |
+
show_title: false,
|
33 |
+
allow_resize: true,
|
34 |
+
changepicturecallback: onPictureChanged
|
35 |
+
});
|
36 |
});
|
37 |
+
function onPictureChanged()
|
38 |
+
{
|
39 |
+
jQuery('.pp_social').append('<div style="margin-left:5px; display:inline-block;"><g:plusone data-action="share" href="'+ encodeURIComponent(location.href.replace(location.hash,"")) +'" width="160px" ></g:plusone></div>');
|
40 |
+
jQuery('.pp_social').append("<script type='text/javascript'> \
|
41 |
+
(function() { \
|
42 |
+
var po = document.createElement('script'); \
|
43 |
+
po.type = 'text/javascript'; \
|
44 |
+
po.async = true; \
|
45 |
+
po.src = 'https://apis.google.com/js/plusone.js'; \
|
46 |
+
var s = document.getElementsByTagName('script')[0]; \
|
47 |
+
s.parentNode.insertBefore(po, s); \
|
48 |
+
})(); <" + "/" + "script>");
|
49 |
+
}
|
50 |
+
</script>
|
51 |
+
<?php
|
52 |
+
}
|
53 |
+
?>
|
|
views/includes_common_before.php
CHANGED
@@ -1,259 +1,280 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
-
|
4 |
-
|
5 |
-
|
6 |
-
|
7 |
-
|
8 |
-
|
9 |
-
|
|
|
|
|
|
|
|
|
10 |
}
|
11 |
-
|
12 |
-
|
13 |
-
|
14 |
-
|
15 |
-
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
)
|
21 |
-
$
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
$
|
28 |
-
(
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
);
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
|
61 |
-
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
|
66 |
-
|
67 |
-
|
68 |
-
|
69 |
-
|
70 |
-
|
71 |
-
|
72 |
-
|
73 |
-
|
74 |
-
|
75 |
-
|
76 |
-
|
77 |
-
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
-
|
82 |
-
|
83 |
-
|
84 |
-
|
85 |
-
|
86 |
-
|
87 |
-
|
88 |
-
|
89 |
-
|
90 |
-
|
91 |
-
|
92 |
-
|
93 |
-
|
94 |
-
|
95 |
-
|
96 |
-
|
97 |
-
|
98 |
-
|
99 |
-
|
100 |
-
|
101 |
-
|
102 |
-
|
103 |
-
|
104 |
-
|
105 |
-
|
106 |
-
|
107 |
-
|
108 |
-
|
109 |
-
|
110 |
-
|
111 |
-
|
112 |
-
|
113 |
-
|
114 |
-
|
115 |
-
|
116 |
-
|
117 |
-
|
118 |
-
|
119 |
-
|
120 |
-
|
121 |
-
|
122 |
-
|
123 |
-
|
124 |
-
|
125 |
-
|
126 |
-
|
127 |
-
|
128 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
129 |
}
|
130 |
?>
|
131 |
-
<!-- Global Styling -->
|
132 |
-
<style type="text/css">
|
133 |
-
.dynamic_css {
|
134 |
-
border: <?php echo $thumbnails_border_size;?>px solid <?php echo $thumbnails_border_color;?> !important;
|
135 |
-
border-radius: <?php echo $thumbnails_border_radius;?>px !important;
|
136 |
-
-moz-border-radius: <?php echo $thumbnails_border_radius;?>px !important;
|
137 |
-
-webkit-border-radius: <?php echo $thumbnails_border_radius;?>px !important;
|
138 |
-
-khtml-border-radius: <?php echo $thumbnails_border_radius;?>px !important;
|
139 |
-
-o-border-radius: <?php echo $thumbnails_border_radius;?>px !important;
|
140 |
-
opacity: <?php echo $thumbnails_opacity;?> !important;
|
141 |
-
-moz-opacity: <?php echo $thumbnails_opacity; ?> !important;
|
142 |
-
-khtml-opacity: <?php echo $thumbnails_opacity; ?> !important;
|
143 |
-
margin-right: <?php echo $margin_btw_thumbnails;?>px !important;
|
144 |
-
margin-bottom: <?php echo $margin_btw_thumbnails;?>px !important;
|
145 |
-
}
|
146 |
-
<?php
|
147 |
-
if($responsive != "true")
|
148 |
-
{
|
149 |
-
?>
|
150 |
-
.images-in-row_<?php echo $unique_id;?>
|
151 |
-
{
|
152 |
-
<?php
|
153 |
-
|
154 |
-
if($gallery_type != "masonry")
|
155 |
-
{
|
156 |
-
if($pagination_setting == 1)
|
157 |
-
{
|
158 |
-
?>
|
159 |
-
height: <?php echo ($thumbnails_height + $margin_btw_thumbnails) * ceil($images_per_page / $img_in_row) + 20 ;?>px !important;
|
160 |
-
<?php
|
161 |
-
}
|
162 |
-
else
|
163 |
-
{
|
164 |
-
?>
|
165 |
-
height: <?php echo ($thumbnails_height + $margin_btw_thumbnails) * ceil(count($pics) / $img_in_row) + 20 ;?>px !important;
|
166 |
-
<?php
|
167 |
-
}
|
168 |
-
?> width: <?php echo ($thumbnails_width + ($margin_btw_thumbnails * 2)) * $img_in_row ;?>px !important;
|
169 |
-
<?php
|
170 |
-
}
|
171 |
-
else if($gallery_type == "masonry")
|
172 |
-
{
|
173 |
-
|
174 |
-
?> width: <?php echo ($thumbnails_width + ($margin_btw_thumbnails * 2) + ($thumbnails_border_size * 2)) * $img_in_row ;?>px !important;
|
175 |
-
<?php
|
176 |
-
}
|
177 |
-
?> clear: both;
|
178 |
-
}
|
179 |
-
<?php
|
180 |
-
}
|
181 |
-
?>
|
182 |
-
.images-in-row_<?php echo $unique_id;?> a
|
183 |
-
{
|
184 |
-
text-decoration:none !important;
|
185 |
-
}
|
186 |
-
.imgLiquidFill {
|
187 |
-
width: <?php echo $thumbnails_width;?>px !important;
|
188 |
-
height: <?php echo $thumbnails_height;?>px !important;
|
189 |
-
display: inline-block !important;
|
190 |
-
box-sizing: border-box !important;
|
191 |
-
}
|
192 |
-
|
193 |
-
.gallery_images {
|
194 |
-
width: <?php echo ($thumbnails_width + ($margin_btw_thumbnails * 2)) * $img_in_row ;?>px !important;
|
195 |
-
}
|
196 |
-
.pp_pic_holder.pp_default {
|
197 |
-
background-color: #ffffff;
|
198 |
-
}
|
199 |
-
|
200 |
-
div.pp_overlay {
|
201 |
-
background-color: <?php echo $lightbox_overlay_bg_color;?> !important;
|
202 |
-
opacity: <?php echo $lightbox_overlay_opacity;?> !important;
|
203 |
-
}
|
204 |
-
|
205 |
-
.pp_description p {
|
206 |
-
direction: <?php echo $lang_dir_setting; ?> !important;
|
207 |
-
color: <?php echo $lightbox_text_color;?> !important;
|
208 |
-
text-align: <?php echo $lightbox_text_align;?> !important;
|
209 |
-
font-family: <?php echo $lightbox_font_family;?> !important;
|
210 |
-
font-size: <?php echo $lightbox_text_font_size;?>px !important;
|
211 |
-
}
|
212 |
-
|
213 |
-
.pp_description h5 {
|
214 |
-
direction: <?php echo $lang_dir_setting; ?> !important;
|
215 |
-
color: <?php echo $lightbox_text_color;?> !important;
|
216 |
-
text-align: <?php echo $lightbox_text_align;?> !important;
|
217 |
-
font-family: <?php echo $lightbox_font_family;?> !important;
|
218 |
-
font-size: <?php echo $lightbox_heading_font_size;?>px !important;
|
219 |
-
}
|
220 |
-
|
221 |
-
div.pp_default .pp_top .pp_middle {
|
222 |
-
background-color: #ffffff;
|
223 |
-
}
|
224 |
-
|
225 |
-
div.pp_default .pp_content_container .pp_left {
|
226 |
-
background-color: #ffffff;
|
227 |
-
padding-left: 16px;
|
228 |
-
}
|
229 |
-
|
230 |
-
div.pp_default .pp_content_container .pp_right {
|
231 |
-
background-color: #ffffff;
|
232 |
-
padding-right: 13px;
|
233 |
-
}
|
234 |
-
|
235 |
-
div.pp_default .pp_bottom .pp_middle {
|
236 |
-
background-color: #ffffff;
|
237 |
-
}
|
238 |
-
|
239 |
-
div.pp_default .pp_content, div.light_rounded .pp_content {
|
240 |
-
background-color: #ffffff;
|
241 |
-
}
|
242 |
-
|
243 |
-
.pp_details {
|
244 |
-
background-color: #ffffff;
|
245 |
-
}
|
246 |
-
|
247 |
-
.ppt {
|
248 |
-
display: none !important;
|
249 |
-
}
|
250 |
-
|
251 |
-
div.pp_pic_holder {
|
252 |
-
border: <?php echo $lightbox_border_color_value;?> !important;
|
253 |
-
border-radius: <?php echo $lightbox_overlay_border_radius;?>px !important;
|
254 |
-
-moz-border-radius: <?php echo $lightbox_overlay_border_radius;?>px !important;
|
255 |
-
-webkit-border-radius: <?php echo $lightbox_overlay_border_radius;?>px !important;
|
256 |
-
-khtml-border-radius: <?php echo $lightbox_overlay_border_radius;?>px !important;
|
257 |
-
-o-border-radius: <?php echo $lightbox_overlay_border_radius;?>px !important;
|
258 |
-
}
|
259 |
-
</style>
|
1 |
<?php
|
2 |
+
if(!defined("ABSPATH")) exit; //exit if accessed directly
|
3 |
+
switch($gb_role)
|
4 |
+
{
|
5 |
+
case "administrator":
|
6 |
+
$user_role_permission = "manage_options";
|
7 |
+
break;
|
8 |
+
case "editor":
|
9 |
+
$user_role_permission = "publish_pages";
|
10 |
+
break;
|
11 |
+
case "author":
|
12 |
+
$user_role_permission = "publish_posts";
|
13 |
+
break;
|
14 |
}
|
15 |
+
if (!current_user_can($user_role_permission))
|
16 |
+
{
|
17 |
+
return;
|
18 |
+
}
|
19 |
+
else
|
20 |
+
{
|
21 |
+
global $wpdb;
|
22 |
+
global $current_user;
|
23 |
+
$unique_id = rand(100, 10000);
|
24 |
+
if (isset($_REQUEST["row"])) {
|
25 |
+
$img_in_row = intval($_REQUEST["row"]);
|
26 |
+
} else {
|
27 |
+
$img_in_row = 3;
|
28 |
+
}
|
29 |
+
|
30 |
+
$album_id = isset($_REQUEST["album_id"]) ? intval($_REQUEST["album_id"]) : 0;
|
31 |
+
$album = $wpdb->get_var
|
32 |
+
(
|
33 |
+
$wpdb->prepare
|
34 |
+
(
|
35 |
+
"SELECT album_name FROM " . gallery_bank_albums() . " WHERE album_id = %d",
|
36 |
+
$album_id
|
37 |
+
)
|
38 |
+
);
|
39 |
+
$album_css = $wpdb->get_results
|
40 |
+
(
|
41 |
+
"SELECT * FROM " . gallery_bank_settings()
|
42 |
+
);
|
43 |
+
/***** Global Queries ******/
|
44 |
+
|
45 |
+
$pics = $wpdb->get_results
|
46 |
+
(
|
47 |
+
$wpdb->prepare
|
48 |
+
(
|
49 |
+
"SELECT * FROM " . gallery_bank_pics() . " WHERE album_id = %d order by sorting_order asc",
|
50 |
+
$album_id
|
51 |
+
)
|
52 |
+
);
|
53 |
+
/***** Global Settings ******/
|
54 |
+
if (count($album_css) != 0) {
|
55 |
+
$setting_keys = array();
|
56 |
+
for ($flag = 0; $flag < count($album_css); $flag++) {
|
57 |
+
array_push($setting_keys, $album_css[$flag]->setting_key);
|
58 |
+
}
|
59 |
+
$index = array_search("thumbnails_width", $setting_keys);
|
60 |
+
$thumbnails_width = $album_css[$index]->setting_value;
|
61 |
+
|
62 |
+
$index = array_search("thumbnails_height", $setting_keys);
|
63 |
+
$thumbnails_height = $album_css[$index]->setting_value;
|
64 |
+
|
65 |
+
$index = array_search("thumbnails_opacity", $setting_keys);
|
66 |
+
$thumbnails_opacity = $album_css[$index]->setting_value;
|
67 |
+
|
68 |
+
$index = array_search("thumbnails_border_size", $setting_keys);
|
69 |
+
$thumbnails_border_size = $album_css[$index]->setting_value;
|
70 |
+
|
71 |
+
$index = array_search("thumbnails_border_radius", $setting_keys);
|
72 |
+
$thumbnails_border_radius = $album_css[$index]->setting_value;
|
73 |
+
|
74 |
+
$index = array_search("thumbnails_border_color", $setting_keys);
|
75 |
+
$thumbnails_border_color = $album_css[$index]->setting_value;
|
76 |
+
|
77 |
+
$index = array_search("margin_btw_thumbnails", $setting_keys);
|
78 |
+
$margin_btw_thumbnails = $album_css[$index]->setting_value;
|
79 |
+
$newMargin = $margin_btw_thumbnails * 3;
|
80 |
+
|
81 |
+
$index = array_search("lightbox_type", $setting_keys);
|
82 |
+
$lightbox_type = $album_css[$index]->setting_value;
|
83 |
+
|
84 |
+
$index = array_search("lightbox_overlay_opacity", $setting_keys);
|
85 |
+
$lightbox_overlay_opacity = doubleval($album_css[$index]->setting_value);
|
86 |
+
|
87 |
+
$index = array_search("lightbox_overlay_border_size", $setting_keys);
|
88 |
+
$lightbox_overlay_border_size = intval($album_css[$index]->setting_value);
|
89 |
+
|
90 |
+
$index = array_search("lightbox_overlay_border_radius", $setting_keys);
|
91 |
+
$lightbox_overlay_border_radius = intval($album_css[$index]->setting_value);
|
92 |
+
|
93 |
+
$index = array_search("lightbox_text_color", $setting_keys);
|
94 |
+
$lightbox_text_color = $album_css[$index]->setting_value;
|
95 |
+
|
96 |
+
$index = array_search("lightbox_overlay_border_color", $setting_keys);
|
97 |
+
$lightbox_overlay_border_color = $album_css[$index]->setting_value;
|
98 |
+
$lightbox_border_color_value = $lightbox_overlay_border_size . "px solid " . $lightbox_overlay_border_color;
|
99 |
+
|
100 |
+
$index = array_search("lightbox_inline_bg_color", $setting_keys);
|
101 |
+
$lightbox_inline_bg_color = $album_css[$index]->setting_value;
|
102 |
+
|
103 |
+
$index = array_search("lightbox_overlay_bg_color", $setting_keys);
|
104 |
+
$lightbox_overlay_bg_color = $album_css[$index]->setting_value;
|
105 |
+
|
106 |
+
$index = array_search("lightbox_fade_in_time", $setting_keys);
|
107 |
+
$lightbox_fade_in_time = intval($album_css[$index]->setting_value);
|
108 |
+
|
109 |
+
$index = array_search("lightbox_fade_out_time", $setting_keys);
|
110 |
+
$lightbox_fade_out_time = intval($album_css[$index]->setting_value);
|
111 |
+
|
112 |
+
$index = array_search("lightbox_text_align", $setting_keys);
|
113 |
+
$lightbox_text_align = $album_css[$index]->setting_value;
|
114 |
+
|
115 |
+
$index = array_search("lightbox_font_family", $setting_keys);
|
116 |
+
$lightbox_font_family = $album_css[$index]->setting_value;
|
117 |
+
|
118 |
+
$index = array_search("lightbox_heading_font_size", $setting_keys);
|
119 |
+
$lightbox_heading_font_size = intval($album_css[$index]->setting_value);
|
120 |
+
|
121 |
+
$index = array_search("lightbox_text_font_size", $setting_keys);
|
122 |
+
$lightbox_text_font_size = intval($album_css[$index]->setting_value);
|
123 |
+
|
124 |
+
$index = array_search("facebook_comments", $setting_keys);
|
125 |
+
$facebook_comments = intval($album_css[$index]->setting_value);
|
126 |
+
|
127 |
+
$index = array_search("social_sharing", $setting_keys);
|
128 |
+
$social_sharing = intval($album_css[$index]->setting_value);
|
129 |
+
|
130 |
+
$index = array_search("image_title_setting", $setting_keys);
|
131 |
+
$image_title_setting = intval($album_css[$index]->setting_value);
|
132 |
+
|
133 |
+
$index = array_search("image_desc_setting", $setting_keys);
|
134 |
+
$image_desc_setting = intval($album_css[$index]->setting_value);
|
135 |
+
|
136 |
+
$index = array_search("autoplay_setting", $setting_keys);
|
137 |
+
$autoplay_setting = intval($album_css[$index]->setting_value);
|
138 |
+
$autoplay = ($autoplay_setting == 1) ? "true" : "false";
|
139 |
+
|
140 |
+
$index = array_search("slide_interval", $setting_keys);
|
141 |
+
$slide_interval = intval($album_css[$index]->setting_value);
|
142 |
+
|
143 |
+
$index = array_search("language_direction", $setting_keys);
|
144 |
+
$lang_dir_setting = $album_css[$index]->setting_value;
|
145 |
+
|
146 |
+
$video_thumb_url = plugins_url("/assets/images/video.jpg",dirname(__FILE__));
|
147 |
+
}
|
148 |
+
?>
|
149 |
+
<!-- Global Styling -->
|
150 |
+
<style type="text/css">
|
151 |
+
.dynamic_css {
|
152 |
+
border: <?php echo $thumbnails_border_size;?>px solid <?php echo $thumbnails_border_color;?> !important;
|
153 |
+
border-radius: <?php echo $thumbnails_border_radius;?>px !important;
|
154 |
+
-moz-border-radius: <?php echo $thumbnails_border_radius;?>px !important;
|
155 |
+
-webkit-border-radius: <?php echo $thumbnails_border_radius;?>px !important;
|
156 |
+
-khtml-border-radius: <?php echo $thumbnails_border_radius;?>px !important;
|
157 |
+
-o-border-radius: <?php echo $thumbnails_border_radius;?>px !important;
|
158 |
+
opacity: <?php echo $thumbnails_opacity;?> !important;
|
159 |
+
-moz-opacity: <?php echo $thumbnails_opacity; ?> !important;
|
160 |
+
-khtml-opacity: <?php echo $thumbnails_opacity; ?> !important;
|
161 |
+
margin-right: <?php echo $margin_btw_thumbnails;?>px !important;
|
162 |
+
margin-bottom: <?php echo $margin_btw_thumbnails;?>px !important;
|
163 |
+
}
|
164 |
+
<?php
|
165 |
+
if($responsive != "true")
|
166 |
+
{
|
167 |
+
?>
|
168 |
+
.images-in-row_<?php echo $unique_id;?>
|
169 |
+
{
|
170 |
+
<?php
|
171 |
+
|
172 |
+
if($gallery_type != "masonry")
|
173 |
+
{
|
174 |
+
if($pagination_setting == 1)
|
175 |
+
{
|
176 |
+
?>
|
177 |
+
height: <?php echo ($thumbnails_height + $margin_btw_thumbnails) * ceil($images_per_page / $img_in_row) + 20 ;?>px !important;
|
178 |
+
<?php
|
179 |
+
}
|
180 |
+
else
|
181 |
+
{
|
182 |
+
?>
|
183 |
+
height: <?php echo ($thumbnails_height + $margin_btw_thumbnails) * ceil(count($pics) / $img_in_row) + 20 ;?>px !important;
|
184 |
+
<?php
|
185 |
+
}
|
186 |
+
?> width: <?php echo ($thumbnails_width + ($margin_btw_thumbnails * 2)) * $img_in_row ;?>px !important;
|
187 |
+
<?php
|
188 |
+
}
|
189 |
+
else if($gallery_type == "masonry")
|
190 |
+
{
|
191 |
+
|
192 |
+
?> width: <?php echo ($thumbnails_width + ($margin_btw_thumbnails * 2) + ($thumbnails_border_size * 2)) * $img_in_row ;?>px !important;
|
193 |
+
<?php
|
194 |
+
}
|
195 |
+
?> clear: both;
|
196 |
+
}
|
197 |
+
<?php
|
198 |
+
}
|
199 |
+
?>
|
200 |
+
.images-in-row_<?php echo $unique_id;?> a
|
201 |
+
{
|
202 |
+
text-decoration:none !important;
|
203 |
+
}
|
204 |
+
.imgLiquidFill {
|
205 |
+
width: <?php echo $thumbnails_width;?>px !important;
|
206 |
+
height: <?php echo $thumbnails_height;?>px !important;
|
207 |
+
display: inline-block !important;
|
208 |
+
box-sizing: border-box !important;
|
209 |
+
}
|
210 |
+
|
211 |
+
.gallery_images {
|
212 |
+
width: <?php echo ($thumbnails_width + ($margin_btw_thumbnails * 2)) * $img_in_row ;?>px !important;
|
213 |
+
}
|
214 |
+
.pp_pic_holder.pp_default {
|
215 |
+
background-color: #ffffff;
|
216 |
+
}
|
217 |
+
|
218 |
+
div.pp_overlay {
|
219 |
+
background-color: <?php echo $lightbox_overlay_bg_color;?> !important;
|
220 |
+
opacity: <?php echo $lightbox_overlay_opacity;?> !important;
|
221 |
+
}
|
222 |
+
|
223 |
+
.pp_description p {
|
224 |
+
direction: <?php echo $lang_dir_setting; ?> !important;
|
225 |
+
color: <?php echo $lightbox_text_color;?> !important;
|
226 |
+
text-align: <?php echo $lightbox_text_align;?> !important;
|
227 |
+
font-family: <?php echo $lightbox_font_family;?> !important;
|
228 |
+
font-size: <?php echo $lightbox_text_font_size;?>px !important;
|
229 |
+
}
|
230 |
+
|
231 |
+
.pp_description h5 {
|
232 |
+
direction: <?php echo $lang_dir_setting; ?> !important;
|
233 |
+
color: <?php echo $lightbox_text_color;?> !important;
|
234 |
+
text-align: <?php echo $lightbox_text_align;?> !important;
|
235 |
+
font-family: <?php echo $lightbox_font_family;?> !important;
|
236 |
+
font-size: <?php echo $lightbox_heading_font_size;?>px !important;
|
237 |
+
}
|
238 |
+
|
239 |
+
div.pp_default .pp_top .pp_middle {
|
240 |
+
background-color: #ffffff;
|
241 |
+
}
|
242 |
+
|
243 |
+
div.pp_default .pp_content_container .pp_left {
|
244 |
+
background-color: #ffffff;
|
245 |
+
padding-left: 16px;
|
246 |
+
}
|
247 |
+
|
248 |
+
div.pp_default .pp_content_container .pp_right {
|
249 |
+
background-color: #ffffff;
|
250 |
+
padding-right: 13px;
|
251 |
+
}
|
252 |
+
|
253 |
+
div.pp_default .pp_bottom .pp_middle {
|
254 |
+
background-color: #ffffff;
|
255 |
+
}
|
256 |
+
|
257 |
+
div.pp_default .pp_content, div.light_rounded .pp_content {
|
258 |
+
background-color: #ffffff;
|
259 |
+
}
|
260 |
+
|
261 |
+
.pp_details {
|
262 |
+
background-color: #ffffff;
|
263 |
+
}
|
264 |
+
|
265 |
+
.ppt {
|
266 |
+
display: none !important;
|
267 |
+
}
|
268 |
+
|
269 |
+
div.pp_pic_holder {
|
270 |
+
border: <?php echo $lightbox_border_color_value;?> !important;
|
271 |
+
border-radius: <?php echo $lightbox_overlay_border_radius;?>px !important;
|
272 |
+
-moz-border-radius: <?php echo $lightbox_overlay_border_radius;?>px !important;
|
273 |
+
-webkit-border-radius: <?php echo $lightbox_overlay_border_radius;?>px !important;
|
274 |
+
-khtml-border-radius: <?php echo $lightbox_overlay_border_radius;?>px !important;
|
275 |
+
-o-border-radius: <?php echo $lightbox_overlay_border_radius;?>px !important;
|
276 |
+
}
|
277 |
+
</style>
|
278 |
+
<?php
|
279 |
}
|
280 |
?>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
views/other-services.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
switch($gb_role)
|
3 |
{
|
4 |
case "administrator":
|
1 |
<?php
|
2 |
+
if(!defined("ABSPATH")) exit; //exit if accessed directly
|
3 |
switch($gb_role)
|
4 |
{
|
5 |
case "administrator":
|
views/purchase_pro_version.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
switch($gb_role)
|
3 |
{
|
4 |
case "administrator":
|
1 |
<?php
|
2 |
+
if(!defined("ABSPATH")) exit; //exit if accessed directly
|
3 |
switch($gb_role)
|
4 |
{
|
5 |
case "administrator":
|
views/recommended-plugins.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
switch($gb_role)
|
3 |
{
|
4 |
case "administrator":
|
1 |
<?php
|
2 |
+
if(!defined("ABSPATH")) exit; //exit if accessed directly
|
3 |
switch($gb_role)
|
4 |
{
|
5 |
case "administrator":
|
views/settings.php
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
<?php
|
2 |
-
|
3 |
switch($gb_role)
|
4 |
{
|
5 |
case "administrator":
|
1 |
<?php
|
2 |
+
if(!defined("ABSPATH")) exit; //exit if accessed directly
|
3 |
switch($gb_role)
|
4 |
{
|
5 |
case "administrator":
|
views/shortcode.php
CHANGED
@@ -1,4 +1,5 @@
|
|
1 |
<?php
|
|
|
2 |
switch($gb_role)
|
3 |
{
|
4 |
case "administrator":
|
1 |
<?php
|
2 |
+
if(!defined("ABSPATH")) exit; //exit if accessed directly
|
3 |
switch($gb_role)
|
4 |
{
|
5 |
case "administrator":
|