Gallery Bank: WordPress Photo Gallery Plugin - Version 3.1.30

Version Description

  • Major Bug Fixed Related to Re-generate of Thumbnails on Edit Album
Download this release

Release Info

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

Code changes from version 3.1.29 to 3.1.30

gallery-bank.php CHANGED
@@ -4,7 +4,7 @@ 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.29
8
  Author URI: http://tech-banker.com
9
  License: GPLv3 or later
10
  */
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.30
8
  Author URI: http://tech-banker.com
9
  License: GPLv3 or later
10
  */
lib/add-new-album-class.php CHANGED
@@ -248,6 +248,7 @@ else
248
  $field[1]
249
  )
250
  );
 
251
  }
252
  }
253
  else
248
  $field[1]
249
  )
250
  );
251
+ process_image_upload($field[2], $field[10], $field[11]);
252
  }
253
  }
254
  else
readme.txt CHANGED
@@ -1,9 +1,9 @@
1
  === Gallery Bank - Photo Galleries & Albums ===
2
  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.29
7
  License: GPLv3 or later
8
  License URI: http://www.gnu.org/licenses/gpl-3.0.html
9
 
@@ -500,7 +500,11 @@ is False in shortcode.
500
 
501
  == Changelog ==
502
 
503
- = 3.1.28 =
 
 
 
 
504
 
505
  * Major Bug Fixed Related to Function Undefined in Header File.
506
 
1
  === Gallery Bank - Photo Galleries & Albums ===
2
  Contributors: Gallery-Bank,contact-banker
3
+ Tags: add album, add gallery, add pictures, best gallery plugin, filterable gallery, gallery image, gallery shortcode, photo albums, photo gallery, responsive gallery, thumbnail view, widget gallery, wordpress gallery, wp gallery, gallery bank
4
  Requires at least: 3.4
5
+ Tested up to: 4.7
6
+ Stable tag: 3.1.30
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.30 =
504
+
505
+ * Major Bug Fixed Related to Re-generate of Thumbnails on Edit Album
506
+
507
+ = 3.1.29 =
508
 
509
  * Major Bug Fixed Related to Function Undefined in Header File.
510
 
views/edit-album.php CHANGED
@@ -83,11 +83,11 @@ if(!defined("ABSPATH")) exit; //exit if accessed directly
83
  }
84
  $pics = $wpdb->get_results
85
  (
86
- $wpdb->prepare
87
- (
88
- "SELECT * FROM " . gallery_bank_pics() . " WHERE album_id = %d order by sorting_order asc ",
89
- $album_id
90
- )
91
  );
92
 
93
  $album_css = $wpdb->get_results
@@ -96,53 +96,53 @@ if(!defined("ABSPATH")) exit; //exit if accessed directly
96
  );
97
  if (count($album_css) != 0)
98
  {
99
- $setting_keys = array();
100
- for ($flag = 0; $flag < count($album_css); $flag++)
101
- {
102
- array_push($setting_keys, $album_css[$flag]->setting_key);
103
- }
104
 
105
- $index = array_search("thumbnails_width", $setting_keys);
106
- $thumbnails_width = $album_css[$index]->setting_value;
107
 
108
- $index = array_search("thumbnails_height", $setting_keys);
109
- $thumbnails_height = $album_css[$index]->setting_value;
110
 
111
- $index = array_search("thumbnails_opacity", $setting_keys);
112
- $thumbnails_opacity = $album_css[$index]->setting_value;
113
 
114
- $index = array_search("thumbnails_border_size", $setting_keys);
115
- $thumbnails_border_size = $album_css[$index]->setting_value;
116
 
117
- $index = array_search("thumbnails_border_radius", $setting_keys);
118
- $thumbnails_border_radius = $album_css[$index]->setting_value;
119
 
120
- $index = array_search("thumbnails_border_color", $setting_keys);
121
- $thumbnails_border_color = $album_css[$index]->setting_value;
122
 
123
- $index = array_search("cover_thumbnail_width", $setting_keys);
124
- $cover_thumbnail_width = $album_css[$index]->setting_value;
125
 
126
- $index = array_search("cover_thumbnail_height", $setting_keys);
127
- $cover_thumbnail_height = $album_css[$index]->setting_value;
128
 
129
  $video_url = plugins_url("/assets/images/video.jpg",dirname(__FILE__));
130
 
131
- ?>
132
- <!--suppress ALL -->
133
- <style type="text/css">
134
- .dynamic_css {
135
- border: <?php echo $thumbnails_border_size;?>px solid <?php echo $thumbnails_border_color;?>;
136
- border-radius: <?php echo $thumbnails_border_radius;?>px;
137
- -moz-border-radius: <?php echo $thumbnails_border_radius; ?>px;
138
- -webkit-border-radius: <?php echo $thumbnails_border_radius;?>px;
139
- -khtml-border-radius: <?php echo $thumbnails_border_radius;?>px;
140
- -o-border-radius: <?php echo $thumbnails_border_radius;?>px;
141
- opacity: <?php echo $thumbnails_opacity;?>;
142
- -moz-opacity: <?php echo $thumbnails_opacity; ?>;
143
- -khtml-opacity: <?php echo $thumbnails_opacity; ?>;
144
- }
145
- </style>
146
  <div class="custom-message red" style="display: block;margin-top:30px">
147
  <span>
148
  <strong>You will be only allowed to add 3 galleries. Kindly purchase Premium Editions for full access.</strong>
@@ -172,30 +172,30 @@ if(!defined("ABSPATH")) exit; //exit if accessed directly
172
  <div class="widget-layout-title">
173
  <h4><?php _e("Album Details", gallery_bank); ?></h4>
174
  </div>
175
- <div class="widget-layout-body">
176
- <div class="layout-control-group">
177
- <label class="layout-control-label"><?php _e("Album Title", gallery_bank); ?> :</label>
178
- <div class="layout-controls">
179
- <input type="text" name="ux_edit_title" class="layout-span12"
180
- value="<?php echo stripcslashes(htmlspecialchars_decode($album->album_name)); ?>"
181
- id="ux_edit_title"
182
- placeholder="<?php _e("Enter your Album Title", gallery_bank); ?>"/>
183
- </div>
184
- </div>
185
- <input type="hidden" id="ux_hidden_album_id" value="<?php echo $album_id; ?>"/>
186
- </div>
187
- <div class="widget-layout-body">
188
- <div class="layout-control-group">
189
- <label class="layout-control-label"><?php _e("Description", gallery_bank); ?> :</label>
190
- </div>
191
- <div class="layout-control-group">
192
- <?php
193
- $ux_content = stripslashes(htmlspecialchars_decode($album->description));
194
- wp_editor($ux_content, $id = "ux_edit_description",array("media_buttons" => true,"textarea_rows" => 6, "tabindex" => 1));
195
- ?>
196
- </div>
197
- </div>
198
- </div>
199
  </div>
200
  </div>
201
  <div class="custom-message red" style="margin:0px;">
@@ -208,40 +208,40 @@ if(!defined("ABSPATH")) exit; //exit if accessed directly
208
  </div>
209
  <div class="fluid-layout">
210
  <div class="layout-span7">
211
- <div class="widget-layout">
212
- <div class="widget-layout-title">
213
- <h4><?php _e("Upload Images", gallery_bank); ?></h4>
214
- </div>
215
- <div class="widget-layout-body" id="edit_image_uploader">
216
- <p><?php _e("Your browser doesn\"t have Flash, Silverlight or HTML5 support.", gallery_bank) ?></p>
217
- </div>
218
- </div>
219
  </div>
220
  <div class="layout-span5">
221
- <div class="widget-layout">
222
- <div class="widget-layout-title">
223
- <h4><?php _e("Upload Videos", gallery_bank); ?>
224
- <i class="widget_premium_feature"><?php _e(" (Available in Premium Editions)", gallery_bank); ?></i>
225
- </h4>
226
- </div>
227
- <div class="widget-layout-body" id="edit_video_uploader">
228
- <div class="layout-control-group">
229
- <label class="layout-control-label custom_gallery_layout_label"><?php _e("Video Url", gallery_bank); ?> :</label>
230
- <div class="layout-controls custom_gallery_layout_control">
231
- <input type="text" name="ux_edit_txt_video_url" class="layout-span12" value=""
232
- id="ux_edit_txt_video_url"
233
- placeholder="<?php _e("Enter your Video Url", gallery_bank); ?>"/>
234
- </div>
235
- </div>
236
- <div class="layout-control-group">
237
- <div class="layout-controls">
238
- <button type="button" onclick="insertVideoToDataTable();" style="float:right"
239
- class="btn btn-info"><?php _e("Upload Video", gallery_bank); ?></button>
240
- </div>
241
- </div>
242
- </div>
243
- </div>
244
- </div>
245
  </div>
246
  <div class="fluid-layout">
247
  <div class="layout-span12">
@@ -253,29 +253,29 @@ if(!defined("ABSPATH")) exit; //exit if accessed directly
253
  <table class="table table-striped " id="data-table-edit-album">
254
  <thead>
255
  <tr>
256
- <th style="width:11%">
257
- <input type="checkbox" id="grp_select_items" name="grp_select_items" style="vertical-align:middle;"/>
258
- <button type="button" onclick="deleteSelectedImages();" style="vertical-align:middle;"
259
- class="btn btn-inverse"><?php _e("Delete", gallery_bank); ?></button>
260
- </th>
261
- <th style="width:15%">
262
- <?php _e("Thumbnail", gallery_bank); ?>
263
- </th>
264
- <th style="width:25%">
265
- <?php _e("Title & Description", gallery_bank); ?>
266
- </th>
267
- <th style="width:20%">
268
- <?php _e("Tags (comma separated list)", gallery_bank); ?>
269
- <i class="widget_premium_feature"><?php _e(" (Available in Premium Editions)", gallery_bank); ?></i>
270
- </th>
271
- <th style="width:25%">
272
- <?php _e("Url to Redirect on click of an Image", gallery_bank); ?>
273
- </th>
274
- <th style="width:5%"></th>
275
- <th style="visibility: hidden"></th>
276
- </tr>
277
  </thead>
278
- <tbody>
279
  <?php
280
  for ($flag = 0; $flag < count($pics); $flag++) {
281
  ?>
@@ -344,82 +344,82 @@ if(!defined("ABSPATH")) exit; //exit if accessed directly
344
  width="<?php echo $thumbnails_width ?>"/>
345
  </a>
346
  <br/>
347
- <?php $dateFormat = date("F j, Y", strtotime($pics[$flag]->date)); ?>
348
- <label><strong><?php echo $pics[$flag]->pic_name; ?></strong></label><br/><label><?php echo $dateFormat; ?></label><br/>
349
- <?php
350
- if ($pics[$flag]->album_cover == 1) {
351
- ?>
352
- <input type="radio" style="cursor: pointer;" onclick="select_one_radio(this);" checked="checked"
353
- id="ux_edit_rdl_cover_<?php echo $pics[$flag]->pic_id; ?>"
354
- name="ux_album_cover"/>
355
- <label><?php _e(" Set as Album Cover", gallery_bank) ?></label>
356
- <?php
357
- } else {
358
- ?>
359
- <input type="radio" onclick="select_one_radio(this);" style="cursor: pointer;"
360
- id="ux_edit_rdl_cover_<?php echo $pics[$flag]->pic_id; ?>"
361
- name="ux_album_cover"/>
362
- <label><?php _e(" Set as Album Cover", gallery_bank) ?></label>
363
- <?php
364
- }
365
- ?>
366
- </td>
367
- <td>
368
- <input placeholder="<?php _e("Enter your Title", gallery_bank) ?>"
369
- class="layout-span12 " type="text"
370
- name="ux_edit_img_title_<?php echo $pics[$flag]->pic_id; ?>"
371
- id="ux_edit_img_title_<?php echo $pics[$flag]->pic_id; ?>"
372
- value="<?php echo html_entity_decode(stripcslashes(htmlspecialchars($pics[$flag]->title))); ?>"/>
373
- <textarea placeholder="<?php _e("Enter your Description ", gallery_bank) ?>"
374
- style="margin-top:20px" rows="5" class="layout-span12 "
375
- name="ux_edit_txt_desc_<?php echo $pics[$flag]->pic_id; ?>"
376
- id="ux_edit_txt_desc_<?php echo $pics[$flag]->pic_id; ?>"><?php echo html_entity_decode(stripcslashes(htmlspecialchars($pics[$flag]->description))); ?></textarea>
377
- </td>
378
- <td>
379
- <input placeholder="<?php _e("Enter your Tags", gallery_bank) ?>"
380
- class="layout-span12 " type="text" onkeypress="return preventDot(event);"
381
- name="ux_edit_txt_tags_<?php echo $pics[$flag]->pic_id; ?>"
382
- id="ux_edit_txt_tags_<?php echo $pics[$flag]->pic_id; ?>" readonly="readonly"
383
- value=""/>
384
- </td>
385
- <td>
386
- <?php
387
- if ($pics[$flag]->url == "" || $pics[$flag]->url == "undefined") {
388
- $domain = "http://";
389
- } else {
390
- $domain = str_replace("http://http://", "http://", $pics[$flag]->url);
391
- }
392
- ?>
393
- <input value="<?php echo $domain; ?>" type="text"
394
- id="ux_edit_txt_url_<?php echo $pics[$flag]->pic_id; ?>"
395
- name="ux_edit_txt_url_<?php echo $pics[$flag]->pic_id; ?>"
396
- class="layout-span12 "/>
397
- </td>
398
- <td>
399
- <a class="btn hovertip" id="ux_btn_delete" style="cursor: pointer;"
400
- data-original-title="<?php _e("Delete Image", gallery_bank) ?>"
401
- onclick="deleteImage(this);"
402
- controlId="<?php echo $pics[$flag]->pic_id; ?>">
403
- <i class="icon-custom-trash"></i>
404
- </a>
405
- </td>
406
- <td style="visibility: hidden">
407
  <?php echo $pics[$flag]->pic_id; ?>
408
  </td>
409
- <?php
410
- }
411
- ?>
412
- </tr>
413
- <?php
414
- }
415
- ?>
416
- </tbody>
417
- </table>
418
- </div>
419
- </div>
420
- </div>
421
  </div>
422
- <div class="separator-doubled"></div>
423
  <button type="submit" class="btn btn-info" style="float:right; margin-top: 20px;"><?php _e("Save Album", gallery_bank); ?></button>
424
  <a class="btn btn-inverse" href="admin.php?page=gallery_bank" style="margin-top: 20px;"><?php _e("Back to Albums", gallery_bank); ?></a>
425
  </div>
@@ -431,245 +431,237 @@ if(!defined("ABSPATH")) exit; //exit if accessed directly
431
  </div>
432
  </form>
433
  <script type="text/javascript">
434
-
435
- jQuery(".hovertip").tooltip_tip();
436
- var url = "<?php echo plugins_url("/assets/",dirname(__FILE__)) ?>";
437
- var image_width = <?php echo $thumbnails_width; ?>;
438
- var image_height = <?php echo $thumbnails_height; ?>;
439
- var cover_width = <?php echo $cover_thumbnail_width; ?>;
440
- var cover_height = <?php echo $cover_thumbnail_height; ?>;
441
- var delete_array = [];
442
- var array_album_data = [];
443
-
444
- oTable = jQuery("#data-table-edit-album").dataTable
445
- ({
446
- "bJQueryUI": false,
447
- "bAutoWidth": true,
448
- "sPaginationType": "full_numbers",
449
- "sDom": '<"datatable-header"fl>t<"datatable-footer"ip>',
450
- "oLanguage": {
451
- "sLengthMenu": "<span>Show entries:</span> _MENU_"
452
- },
453
  "aaSorting": [[ 6, "asc" ]],
454
  "aoColumnDefs": [{ "bSortable": false, "aTargets": [0] },{ "bSortable": false, "aTargets": [0] }]
455
-
456
- });
457
- jQuery("#edit_album").validate
458
- ({
459
- submitHandler: function ()
460
- {
461
- jQuery("#update_album_success_message").css("display", "block");
462
- jQuery("body,html").animate
463
- ({
464
- scrollTop: jQuery("body,html").position().top
465
- }, "slow");
466
- var albumid = jQuery("#ux_hidden_album_id").val();
467
- if(delete_array.length > 0)
468
  {
469
- jQuery.post(ajaxurl,"albumid=" + albumid + "&delete_array=" + JSON.stringify(delete_array) +"&param=delete_pic&action=add_new_album_library", function (data)
470
- {
471
- });
472
- }
473
-
474
- var uxEditDescription = "";
475
-
476
- <?php
477
- if(class_exists("ckeditor_wordpress"))
478
  {
479
- ?>
480
- var uxEditDescription = encodeURIComponent(CKEDITOR.instances.ux_edit_description.getData());
481
- <?php
482
- }
483
- else
484
- {
485
- ?>
486
- var uxEditDescription = jQuery("#wp-ux_edit_description-wrap").hasClass("tmce-active") ?
487
- encodeURIComponent(tinyMCE.get("ux_edit_description").getContent())
488
- : encodeURIComponent(jQuery("#ux_edit_description").val());
489
- <?php
490
- }
491
- ?>
492
-
493
- var edit_album_name = encodeURIComponent(jQuery("#ux_edit_title").val());
494
- jQuery.post(ajaxurl, "albumid=" + albumid + "&edit_album_name=" + edit_album_name + "&uxEditDescription=" + uxEditDescription + "&param=update_album&action=add_new_album_library", function ()
495
- {
496
-
497
  });
498
-
499
- var count = 0;
500
- jQuery.each(oTable.fnGetNodes(), function (index, value)
501
- {
502
- var controlClass = jQuery(value.cells[1]).find("img").attr("class");
503
- var controlType = "";
504
- var img_gb_path = "";
505
- var isAlbumCoverSet = "";
506
- var title = "";
507
- var description = "";
508
- var tags = "";
509
- var urlRedirect = "";
510
- var picId = "";
511
- var row_data = [];
512
-
513
- controlType = jQuery(value.cells[1]).find("img").attr("type");
514
- picId = jQuery(value.cells[1]).find("img").attr("imageId");
515
- img_gb_path = (jQuery(value.cells[1]).find("img").attr("imgpath"));
516
- isAlbumCoverSet = jQuery(value.cells[1]).find("input:radio").attr("checked");
517
- title = (jQuery(value.cells[2]).find("input:text").eq(0).val());
518
- description =(jQuery(value.cells[2]).find("textarea").eq(0).val());
519
- tags = jQuery(value.cells[3]).find("input:text").eq(0).val();
520
- urlRedirect = jQuery(value.cells[4]).find("input:text").eq(0).val();
521
- row_data.push(controlType);
522
- row_data.push(picId);
523
- row_data.push(img_gb_path);
524
- row_data.push(isAlbumCoverSet);
525
- row_data.push(title);
526
- row_data.push(description);
527
- row_data.push(tags);
528
- row_data.push(urlRedirect);
529
- row_data.push(cover_width);
530
- row_data.push(cover_height);
531
-
532
- array_album_data.push(row_data);
533
- });
534
-
535
- jQuery.post(ajaxurl, "album_data="+encodeURIComponent(JSON.stringify(array_album_data))+ "&param=update_pic&action=add_new_album_library", function (data)
536
- {
537
- setTimeout(function ()
538
- {
539
- jQuery("#update_album_success_message").css("display", "none");
540
- window.location.href = "admin.php?page=gallery_bank";
541
- }, 10000);
542
- });
543
  }
544
- });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
545
  jQuery(document).ready(function()
546
  {
547
- jQuery("#edit_image_uploader").plupload
548
- ({
549
- runtimes: "html5,html4,flash,silverlight",
550
- url: ajaxurl + "?param=upload_pic&action=upload_library&_nonce=<?php echo $upload_photos;?>",
551
- chunk_size: "1mb",
552
- filters: {
553
- max_file_size: "1000mb",
554
- mime_types: [
555
- {title: "Image files", extensions: "jpg,jpeg,gif,png"}
556
- ]
557
- },
558
- rename: true,
559
- sortable: true,
560
- dragdrop: true,
561
- unique_names: true,
562
- views: {
563
- list: true,
564
- thumbs: true, // Show thumbs
565
- active: "thumbs"
566
- },
567
- flash_swf_url: url + "Moxie.swf",
568
- silverlight_xap_url: url + "Moxie.xap",
569
- init: {
570
- FileUploaded: function (up, file) {
571
-
572
- var oTable = jQuery("#data-table-edit-album").dataTable();
573
  var albumid = jQuery("#ux_hidden_album_id").val();
574
- var controlType = "image";
575
- var image_name = file.name;
576
- var img_gb_path = file.target_name;
577
- jQuery.post(ajaxurl, "album_id=" + albumid + "&controlType=" + controlType + "&imagename=" + image_name +
578
- "&img_gb_path=" + img_gb_path + "&cover_height=" + cover_height + "&cover_width=" + cover_width +
579
- "&param=add_pic&action=add_new_album_library", function (result) {
580
-
581
- jQuery.post(ajaxurl, "img_path=" + file.target_name + "&img_name=" + file.name + "&image_width=" + image_width +
582
- "&image_height=" + image_height + "&picid=" + result +
583
- "&param=add_new_dynamic_row_for_image&action=add_new_album_library", function (data) {
584
-
585
- var col1 = jQuery("<td></td>");
586
- col1.append(jQuery.parseJSON(data)[0]);
587
- var col2 = jQuery("<td></td>");
588
- col2.append(jQuery.parseJSON(data)[1]);
589
- var col3 = jQuery("<td></td>");
590
- col3.append(jQuery.parseJSON(data)[2]);
591
- var col4 = jQuery("<td></td>");
592
- col4.append(jQuery.parseJSON(data)[3]);
593
- var col5 = jQuery("<td></td>");
594
- col5.append(jQuery.parseJSON(data)[4]);
595
- var col6 = jQuery("<td></td>");
596
- col6.append(jQuery.parseJSON(data)[5]);
597
- var col7 = jQuery("<td style=\"visibility:hidden;\"></td>");
598
- oTable.fnAddData([col1.html(), col2.html(), col3.html(), col4.html(), col5.html(), col6.html(), col7.html()]);
599
-
600
- select_radio();
601
- jQuery(".hovertip").tooltip_tip();
602
- });
603
- });
604
-
605
- },
606
- UploadComplete: function () {
607
- jQuery(".plupload_buttons").css("display", "block");
608
- jQuery(".plupload_upload_status").css("display", "none");
609
- }
610
- }
611
- });
612
- });
613
- function deleteImage(control) {
614
- var r = confirm("<?php _e("Are you sure you want to delete this Image?", gallery_bank)?>");
615
- if (r == true) {
616
- var row = jQuery(control).closest("tr");
617
- var oTable = jQuery("#data-table-edit-album").dataTable();
618
- var controlId = jQuery(control).attr("controlid");
619
- delete_array.push(controlId);
620
-
621
- oTable.fnDeleteRow(row[0]);
622
- select_radio();
623
- }
624
- }
625
- function insertVideoToDataTable()
626
- {
627
- alert("<?php _e( "This feature is only available in Premium Editions!", gallery_bank ); ?>");
628
- }
629
- jQuery("#grp_select_items").click(function () {
630
- var oTable = jQuery("#data-table-edit-album").dataTable();
631
- var checkProp = jQuery("#grp_select_items").prop("checked");
632
- jQuery("input:checkbox", oTable.fnGetNodes()).each(function () {
633
- if (checkProp) {
634
- jQuery(this).attr("checked", "checked");
635
- }
636
- else {
637
- jQuery(this).removeAttr("checked");
638
- }
639
- });
640
- });
641
- function deleteSelectedImages()
642
- {
643
- alert("<?php _e("This feature is only available in Premium Editions!", gallery_bank)?>");
644
- }
645
-
646
- function select_one_radio(control)
647
- {
648
- var oTable = jQuery("#data-table-edit-album").dataTable();
649
- jQuery("input[type=radio][name=ux_album_cover]:checked", oTable.fnGetNodes()).each(function ()
650
- {
651
- jQuery(this).removeAttr("checked");
652
- });
653
- jQuery(control).attr("checked","checked");
654
- }
655
-
656
- //This function is to select radio button of first image
657
- function select_radio() {
658
- var oTable = jQuery("#data-table-edit-album").dataTable();
659
- if ((jQuery("input[type=radio][name=ux_album_cover]:checked", oTable.fnGetNodes()).length) < 1){
660
- jQuery("input[type=radio][name=ux_album_cover]:first").attr("checked","checked");
661
- }
662
- }
663
- function preventDot(e)
664
  {
665
- var key = e.charCode ? e.charCode : e.keyCode;
666
- if (key == 46)
667
- {
668
- return false;
669
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
670
  }
671
- </script>
672
  <?php
673
  }
674
  }
675
- ?>
83
  }
84
  $pics = $wpdb->get_results
85
  (
86
+ $wpdb->prepare
87
+ (
88
+ "SELECT * FROM " . gallery_bank_pics() . " WHERE album_id = %d order by sorting_order asc ",
89
+ $album_id
90
+ )
91
  );
92
 
93
  $album_css = $wpdb->get_results
96
  );
97
  if (count($album_css) != 0)
98
  {
99
+ $setting_keys = array();
100
+ for ($flag = 0; $flag < count($album_css); $flag++)
101
+ {
102
+ array_push($setting_keys, $album_css[$flag]->setting_key);
103
+ }
104
 
105
+ $index = array_search("thumbnails_width", $setting_keys);
106
+ $thumbnails_width = $album_css[$index]->setting_value;
107
 
108
+ $index = array_search("thumbnails_height", $setting_keys);
109
+ $thumbnails_height = $album_css[$index]->setting_value;
110
 
111
+ $index = array_search("thumbnails_opacity", $setting_keys);
112
+ $thumbnails_opacity = $album_css[$index]->setting_value;
113
 
114
+ $index = array_search("thumbnails_border_size", $setting_keys);
115
+ $thumbnails_border_size = $album_css[$index]->setting_value;
116
 
117
+ $index = array_search("thumbnails_border_radius", $setting_keys);
118
+ $thumbnails_border_radius = $album_css[$index]->setting_value;
119
 
120
+ $index = array_search("thumbnails_border_color", $setting_keys);
121
+ $thumbnails_border_color = $album_css[$index]->setting_value;
122
 
123
+ $index = array_search("cover_thumbnail_width", $setting_keys);
124
+ $cover_thumbnail_width = $album_css[$index]->setting_value;
125
 
126
+ $index = array_search("cover_thumbnail_height", $setting_keys);
127
+ $cover_thumbnail_height = $album_css[$index]->setting_value;
128
 
129
  $video_url = plugins_url("/assets/images/video.jpg",dirname(__FILE__));
130
 
131
+ ?>
132
+ <!--suppress ALL -->
133
+ <style type="text/css">
134
+ .dynamic_css {
135
+ border: <?php echo $thumbnails_border_size;?>px solid <?php echo $thumbnails_border_color;?>;
136
+ border-radius: <?php echo $thumbnails_border_radius;?>px;
137
+ -moz-border-radius: <?php echo $thumbnails_border_radius; ?>px;
138
+ -webkit-border-radius: <?php echo $thumbnails_border_radius;?>px;
139
+ -khtml-border-radius: <?php echo $thumbnails_border_radius;?>px;
140
+ -o-border-radius: <?php echo $thumbnails_border_radius;?>px;
141
+ opacity: <?php echo $thumbnails_opacity;?>;
142
+ -moz-opacity: <?php echo $thumbnails_opacity; ?>;
143
+ -khtml-opacity: <?php echo $thumbnails_opacity; ?>;
144
+ }
145
+ </style>
146
  <div class="custom-message red" style="display: block;margin-top:30px">
147
  <span>
148
  <strong>You will be only allowed to add 3 galleries. Kindly purchase Premium Editions for full access.</strong>
172
  <div class="widget-layout-title">
173
  <h4><?php _e("Album Details", gallery_bank); ?></h4>
174
  </div>
175
+ <div class="widget-layout-body">
176
+ <div class="layout-control-group">
177
+ <label class="layout-control-label"><?php _e("Album Title", gallery_bank); ?> :</label>
178
+ <div class="layout-controls">
179
+ <input type="text" name="ux_edit_title" class="layout-span12"
180
+ value="<?php echo stripcslashes(htmlspecialchars_decode($album->album_name)); ?>"
181
+ id="ux_edit_title"
182
+ placeholder="<?php _e("Enter your Album Title", gallery_bank); ?>"/>
183
+ </div>
184
+ </div>
185
+ <input type="hidden" id="ux_hidden_album_id" value="<?php echo $album_id; ?>"/>
186
+ </div>
187
+ <div class="widget-layout-body">
188
+ <div class="layout-control-group">
189
+ <label class="layout-control-label"><?php _e("Description", gallery_bank); ?> :</label>
190
+ </div>
191
+ <div class="layout-control-group">
192
+ <?php
193
+ $ux_content = stripslashes(htmlspecialchars_decode($album->description));
194
+ wp_editor($ux_content, $id = "ux_edit_description",array("media_buttons" => true,"textarea_rows" => 6, "tabindex" => 1));
195
+ ?>
196
+ </div>
197
+ </div>
198
+ </div>
199
  </div>
200
  </div>
201
  <div class="custom-message red" style="margin:0px;">
208
  </div>
209
  <div class="fluid-layout">
210
  <div class="layout-span7">
211
+ <div class="widget-layout">
212
+ <div class="widget-layout-title">
213
+ <h4><?php _e("Upload Images", gallery_bank); ?></h4>
214
+ </div>
215
+ <div class="widget-layout-body" id="edit_image_uploader">
216
+ <p><?php _e("Your browser doesn\"t have Flash, Silverlight or HTML5 support.", gallery_bank) ?></p>
217
+ </div>
218
+ </div>
219
  </div>
220
  <div class="layout-span5">
221
+ <div class="widget-layout">
222
+ <div class="widget-layout-title">
223
+ <h4><?php _e("Upload Videos", gallery_bank); ?>
224
+ <i class="widget_premium_feature"><?php _e(" (Available in Premium Editions)", gallery_bank); ?></i>
225
+ </h4>
226
+ </div>
227
+ <div class="widget-layout-body" id="edit_video_uploader">
228
+ <div class="layout-control-group">
229
+ <label class="layout-control-label custom_gallery_layout_label"><?php _e("Video Url", gallery_bank); ?> :</label>
230
+ <div class="layout-controls custom_gallery_layout_control">
231
+ <input type="text" name="ux_edit_txt_video_url" class="layout-span12" value=""
232
+ id="ux_edit_txt_video_url"
233
+ placeholder="<?php _e("Enter your Video Url", gallery_bank); ?>"/>
234
+ </div>
235
+ </div>
236
+ <div class="layout-control-group">
237
+ <div class="layout-controls">
238
+ <button type="button" onclick="insertVideoToDataTable();" style="float:right"
239
+ class="btn btn-info"><?php _e("Upload Video", gallery_bank); ?></button>
240
+ </div>
241
+ </div>
242
+ </div>
243
+ </div>
244
+ </div>
245
  </div>
246
  <div class="fluid-layout">
247
  <div class="layout-span12">
253
  <table class="table table-striped " id="data-table-edit-album">
254
  <thead>
255
  <tr>
256
+ <th style="width:11%">
257
+ <input type="checkbox" id="grp_select_items" name="grp_select_items" style="vertical-align:middle;"/>
258
+ <button type="button" onclick="deleteSelectedImages();" style="vertical-align:middle;"
259
+ class="btn btn-inverse"><?php _e("Delete", gallery_bank); ?></button>
260
+ </th>
261
+ <th style="width:15%">
262
+ <?php _e("Thumbnail", gallery_bank); ?>
263
+ </th>
264
+ <th style="width:25%">
265
+ <?php _e("Title & Description", gallery_bank); ?>
266
+ </th>
267
+ <th style="width:20%">
268
+ <?php _e("Tags (comma separated list)", gallery_bank); ?>
269
+ <i class="widget_premium_feature"><?php _e(" (Available in Premium Editions)", gallery_bank); ?></i>
270
+ </th>
271
+ <th style="width:25%">
272
+ <?php _e("Url to Redirect on click of an Image", gallery_bank); ?>
273
+ </th>
274
+ <th style="width:5%"></th>
275
+ <th style="visibility: hidden"></th>
276
+ </tr>
277
  </thead>
278
+ <tbody>
279
  <?php
280
  for ($flag = 0; $flag < count($pics); $flag++) {
281
  ?>
344
  width="<?php echo $thumbnails_width ?>"/>
345
  </a>
346
  <br/>
347
+ <?php $dateFormat = date("F j, Y", strtotime($pics[$flag]->date)); ?>
348
+ <label><strong><?php echo $pics[$flag]->pic_name; ?></strong></label><br/><label><?php echo $dateFormat; ?></label><br/>
349
+ <?php
350
+ if ($pics[$flag]->album_cover == 1) {
351
+ ?>
352
+ <input type="radio" style="cursor: pointer;" onclick="select_one_radio(this);" checked="checked"
353
+ id="ux_edit_rdl_cover_<?php echo $pics[$flag]->pic_id; ?>"
354
+ name="ux_album_cover"/>
355
+ <label><?php _e(" Set as Album Cover", gallery_bank) ?></label>
356
+ <?php
357
+ } else {
358
+ ?>
359
+ <input type="radio" onclick="select_one_radio(this);" style="cursor: pointer;"
360
+ id="ux_edit_rdl_cover_<?php echo $pics[$flag]->pic_id; ?>"
361
+ name="ux_album_cover"/>
362
+ <label><?php _e(" Set as Album Cover", gallery_bank) ?></label>
363
+ <?php
364
+ }
365
+ ?>
366
+ </td>
367
+ <td>
368
+ <input placeholder="<?php _e("Enter your Title", gallery_bank) ?>"
369
+ class="layout-span12 " type="text"
370
+ name="ux_edit_img_title_<?php echo $pics[$flag]->pic_id; ?>"
371
+ id="ux_edit_img_title_<?php echo $pics[$flag]->pic_id; ?>"
372
+ value="<?php echo html_entity_decode(stripcslashes(htmlspecialchars($pics[$flag]->title))); ?>"/>
373
+ <textarea placeholder="<?php _e("Enter your Description ", gallery_bank) ?>"
374
+ style="margin-top:20px" rows="5" class="layout-span12 "
375
+ name="ux_edit_txt_desc_<?php echo $pics[$flag]->pic_id; ?>"
376
+ id="ux_edit_txt_desc_<?php echo $pics[$flag]->pic_id; ?>"><?php echo html_entity_decode(stripcslashes(htmlspecialchars($pics[$flag]->description))); ?></textarea>
377
+ </td>
378
+ <td>
379
+ <input placeholder="<?php _e("Enter your Tags", gallery_bank) ?>"
380
+ class="layout-span12 " type="text" onkeypress="return preventDot(event);"
381
+ name="ux_edit_txt_tags_<?php echo $pics[$flag]->pic_id; ?>"
382
+ id="ux_edit_txt_tags_<?php echo $pics[$flag]->pic_id; ?>" readonly="readonly"
383
+ value=""/>
384
+ </td>
385
+ <td>
386
+ <?php
387
+ if ($pics[$flag]->url == "" || $pics[$flag]->url == "undefined") {
388
+ $domain = "http://";
389
+ } else {
390
+ $domain = str_replace("http://http://", "http://", $pics[$flag]->url);
391
+ }
392
+ ?>
393
+ <input value="<?php echo $domain; ?>" type="text"
394
+ id="ux_edit_txt_url_<?php echo $pics[$flag]->pic_id; ?>"
395
+ name="ux_edit_txt_url_<?php echo $pics[$flag]->pic_id; ?>"
396
+ class="layout-span12 "/>
397
+ </td>
398
+ <td>
399
+ <a class="btn hovertip" id="ux_btn_delete" style="cursor: pointer;"
400
+ data-original-title="<?php _e("Delete Image", gallery_bank) ?>"
401
+ onclick="deleteImage(this);"
402
+ controlId="<?php echo $pics[$flag]->pic_id; ?>">
403
+ <i class="icon-custom-trash"></i>
404
+ </a>
405
+ </td>
406
+ <td style="visibility: hidden">
407
  <?php echo $pics[$flag]->pic_id; ?>
408
  </td>
409
+ <?php
410
+ }
411
+ ?>
412
+ </tr>
413
+ <?php
414
+ }
415
+ ?>
416
+ </tbody>
417
+ </table>
418
+ </div>
419
+ </div>
420
+ </div>
421
  </div>
422
+ <div class="separator-doubled"></div>
423
  <button type="submit" class="btn btn-info" style="float:right; margin-top: 20px;"><?php _e("Save Album", gallery_bank); ?></button>
424
  <a class="btn btn-inverse" href="admin.php?page=gallery_bank" style="margin-top: 20px;"><?php _e("Back to Albums", gallery_bank); ?></a>
425
  </div>
431
  </div>
432
  </form>
433
  <script type="text/javascript">
434
+ jQuery(".hovertip").tooltip_tip();
435
+ var url = "<?php echo plugins_url("/assets/",dirname(__FILE__)) ?>";
436
+ var image_width = <?php echo $thumbnails_width; ?>;
437
+ var image_height = <?php echo $thumbnails_height; ?>;
438
+ var cover_width = <?php echo $cover_thumbnail_width; ?>;
439
+ var cover_height = <?php echo $cover_thumbnail_height; ?>;
440
+ var delete_array = [];
441
+ var array_album_data = [];
442
+ oTable = jQuery("#data-table-edit-album").dataTable
443
+ ({
444
+ "bJQueryUI": false,
445
+ "bAutoWidth": true,
446
+ "sPaginationType": "full_numbers",
447
+ "sDom": '<"datatable-header"fl>t<"datatable-footer"ip>',
448
+ "oLanguage": {
449
+ "sLengthMenu": "<span>Show entries:</span> _MENU_"
450
+ },
 
 
451
  "aaSorting": [[ 6, "asc" ]],
452
  "aoColumnDefs": [{ "bSortable": false, "aTargets": [0] },{ "bSortable": false, "aTargets": [0] }]
453
+ });
454
+ jQuery("#edit_album").validate
455
+ ({
456
+ submitHandler: function ()
 
 
 
 
 
 
 
 
 
457
  {
458
+ jQuery("#update_album_success_message").css("display", "block");
459
+ jQuery("body,html").animate
460
+ ({
461
+ scrollTop: jQuery("body,html").position().top
462
+ }, "slow");
463
+ var albumid = jQuery("#ux_hidden_album_id").val();
464
+ if(delete_array.length > 0)
465
+ {
466
+ jQuery.post(ajaxurl,"albumid=" + albumid + "&delete_array=" + JSON.stringify(delete_array) +"&param=delete_pic&action=add_new_album_library", function (data)
467
  {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
468
  });
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
469
  }
470
+ var uxEditDescription = "";
471
+ <?php
472
+ if(class_exists("ckeditor_wordpress"))
473
+ {
474
+ ?>
475
+ var uxEditDescription = encodeURIComponent(CKEDITOR.instances.ux_edit_description.getData());
476
+ <?php
477
+ }
478
+ else
479
+ {
480
+ ?>
481
+ var uxEditDescription = jQuery("#wp-ux_edit_description-wrap").hasClass("tmce-active") ?
482
+ encodeURIComponent(tinyMCE.get("ux_edit_description").getContent())
483
+ : encodeURIComponent(jQuery("#ux_edit_description").val());
484
+ <?php
485
+ }
486
+ ?>
487
+ var edit_album_name = encodeURIComponent(jQuery("#ux_edit_title").val());
488
+ jQuery.post(ajaxurl, "albumid=" + albumid + "&edit_album_name=" + edit_album_name + "&uxEditDescription=" + uxEditDescription + "&param=update_album&action=add_new_album_library", function ()
489
+ {
490
+ });
491
+ var count = 0;
492
+ jQuery.each(oTable.fnGetNodes(), function (index, value)
493
+ {
494
+ var controlClass = jQuery(value.cells[1]).find("img").attr("class");
495
+ var controlType = "";
496
+ var img_gb_path = "";
497
+ var isAlbumCoverSet = "";
498
+ var title = "";
499
+ var description = "";
500
+ var tags = "";
501
+ var urlRedirect = "";
502
+ var picId = "";
503
+ var row_data = [];
504
+ controlType = jQuery(value.cells[1]).find("img").attr("type");
505
+ picId = jQuery(value.cells[1]).find("img").attr("imageId");
506
+ img_gb_path = (jQuery(value.cells[1]).find("img").attr("imgpath"));
507
+ isAlbumCoverSet = jQuery(value.cells[1]).find("input:radio").attr("checked");
508
+ title = (jQuery(value.cells[2]).find("input:text").eq(0).val());
509
+ description =(jQuery(value.cells[2]).find("textarea").eq(0).val());
510
+ tags = jQuery(value.cells[3]).find("input:text").eq(0).val();
511
+ urlRedirect = jQuery(value.cells[4]).find("input:text").eq(0).val();
512
+ row_data.push(controlType);
513
+ row_data.push(picId);
514
+ row_data.push(img_gb_path);
515
+ row_data.push(isAlbumCoverSet);
516
+ row_data.push(title);
517
+ row_data.push(description);
518
+ row_data.push(tags);
519
+ row_data.push(urlRedirect);
520
+ row_data.push(cover_width);
521
+ row_data.push(cover_height);
522
+ row_data.push(image_width);
523
+ row_data.push(image_height);
524
+ array_album_data.push(row_data);
525
+ });
526
+ jQuery.post(ajaxurl, "album_data="+encodeURIComponent(JSON.stringify(array_album_data))+ "&param=update_pic&action=add_new_album_library", function (data)
527
+ {
528
+ setTimeout(function ()
529
+ {
530
+ jQuery("#update_album_success_message").css("display", "none");
531
+ window.location.href = "admin.php?page=gallery_bank";
532
+ }, 10000);
533
+ });
534
+ }
535
+ });
536
  jQuery(document).ready(function()
537
  {
538
+ jQuery("#edit_image_uploader").plupload
539
+ ({
540
+ runtimes: "html5,html4,flash,silverlight",
541
+ url: ajaxurl + "?param=upload_pic&action=upload_library&_nonce=<?php echo $upload_photos;?>",
542
+ chunk_size: "1mb",
543
+ filters: {
544
+ max_file_size: "1000mb",
545
+ mime_types: [
546
+ {title: "Image files", extensions: "jpg,jpeg,gif,png"}
547
+ ]
548
+ },
549
+ rename: true,
550
+ sortable: true,
551
+ dragdrop: true,
552
+ unique_names: true,
553
+ views: {
554
+ list: true,
555
+ thumbs: true, // Show thumbs
556
+ active: "thumbs"
557
+ },
558
+ flash_swf_url: url + "Moxie.swf",
559
+ silverlight_xap_url: url + "Moxie.xap",
560
+ init: {
561
+ FileUploaded: function (up, file)
562
+ {
563
+ var oTable = jQuery("#data-table-edit-album").dataTable();
564
  var albumid = jQuery("#ux_hidden_album_id").val();
565
+ var controlType = "image";
566
+ var image_name = file.name;
567
+ var img_gb_path = file.target_name;
568
+ jQuery.post(ajaxurl, "album_id=" + albumid + "&controlType=" + controlType + "&imagename=" + image_name +
569
+ "&img_gb_path=" + img_gb_path + "&cover_height=" + cover_height + "&cover_width=" + cover_width +
570
+ "&param=add_pic&action=add_new_album_library", function (result)
571
+ {
572
+ jQuery.post(ajaxurl, "img_path=" + file.target_name + "&img_name=" + file.name + "&image_width=" + image_width +
573
+ "&image_height=" + image_height + "&picid=" + result +
574
+ "&param=add_new_dynamic_row_for_image&action=add_new_album_library", function (data) {
575
+ var col1 = jQuery("<td></td>");
576
+ col1.append(jQuery.parseJSON(data)[0]);
577
+ var col2 = jQuery("<td></td>");
578
+ col2.append(jQuery.parseJSON(data)[1]);
579
+ var col3 = jQuery("<td></td>");
580
+ col3.append(jQuery.parseJSON(data)[2]);
581
+ var col4 = jQuery("<td></td>");
582
+ col4.append(jQuery.parseJSON(data)[3]);
583
+ var col5 = jQuery("<td></td>");
584
+ col5.append(jQuery.parseJSON(data)[4]);
585
+ var col6 = jQuery("<td></td>");
586
+ col6.append(jQuery.parseJSON(data)[5]);
587
+ var col7 = jQuery("<td style=\"visibility:hidden;\"></td>");
588
+ oTable.fnAddData([col1.html(), col2.html(), col3.html(), col4.html(), col5.html(), col6.html(), col7.html()]);
589
+ select_radio();
590
+ jQuery(".hovertip").tooltip_tip();
591
+ });
592
+ });
593
+ },
594
+ UploadComplete: function ()
595
+ {
596
+ jQuery(".plupload_buttons").css("display", "block");
597
+ jQuery(".plupload_upload_status").css("display", "none");
598
+ }
599
+ }
600
+ });
601
+ });
602
+ function deleteImage(control)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
603
  {
604
+ var r = confirm("<?php _e("Are you sure you want to delete this Image?", gallery_bank)?>");
605
+ if (r == true)
606
+ {
607
+ var row = jQuery(control).closest("tr");
608
+ var oTable = jQuery("#data-table-edit-album").dataTable();
609
+ var controlId = jQuery(control).attr("controlid");
610
+ delete_array.push(controlId);
611
+ oTable.fnDeleteRow(row[0]);
612
+ select_radio();
613
+ }
614
+ }
615
+ function insertVideoToDataTable()
616
+ {
617
+ alert("<?php _e( "This feature is only available in Premium Editions!", gallery_bank ); ?>");
618
+ }
619
+ jQuery("#grp_select_items").click(function ()
620
+ {
621
+ var oTable = jQuery("#data-table-edit-album").dataTable();
622
+ var checkProp = jQuery("#grp_select_items").prop("checked");
623
+ jQuery("input:checkbox", oTable.fnGetNodes()).each(function ()
624
+ {
625
+ if (checkProp)
626
+ {
627
+ jQuery(this).attr("checked", "checked");
628
+ }
629
+ else
630
+ {
631
+ jQuery(this).removeAttr("checked");
632
+ }
633
+ });
634
+ });
635
+ function deleteSelectedImages()
636
+ {
637
+ alert("<?php _e("This feature is only available in Premium Editions!", gallery_bank)?>");
638
+ }
639
+ function select_one_radio(control)
640
+ {
641
+ var oTable = jQuery("#data-table-edit-album").dataTable();
642
+ jQuery("input[type=radio][name=ux_album_cover]:checked", oTable.fnGetNodes()).each(function ()
643
+ {
644
+ jQuery(this).removeAttr("checked");
645
+ });
646
+ jQuery(control).attr("checked","checked");
647
+ }
648
+ function select_radio()
649
+ {
650
+ var oTable = jQuery("#data-table-edit-album").dataTable();
651
+ if ((jQuery("input[type=radio][name=ux_album_cover]:checked", oTable.fnGetNodes()).length) < 1){
652
+ jQuery("input[type=radio][name=ux_album_cover]:first").attr("checked","checked");
653
+ }
654
+ }
655
+ function preventDot(e)
656
+ {
657
+ var key = e.charCode ? e.charCode : e.keyCode;
658
+ if (key == 46)
659
+ {
660
+ return false;
661
+ }
662
  }
663
+ </script>
664
  <?php
665
  }
666
  }
667
+ ?>