403Webshell
Server IP : 89.108.64.180  /  Your IP : 216.73.217.92
Web Server : Apache/2.4.41 (Ubuntu)
System : Linux 89-108-64-180.cloudvps.regruhosting.ru 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User : www-root ( 1010)
PHP Version : 8.0.30
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /var/www/www-root/data/www/kow4eg.ru/wp-content/plugins/gdlr-hotel/framework/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/www-root/data/www/kow4eg.ru/wp-content/plugins/gdlr-hotel/framework/transaction-script.js
(function($){
	"use strict";
	
	// create the alert message
	$.fn.gdlr_confirm = function(options){
	
        var settings = $.extend({
			text: 'Are you sure you want to do this ???',
			success:  function(){}
        }, options);
		
		$(this).each(function(){

			var confirm_button = $('<span class="gdlr-button confirm-yes">Yes</span>');
			var decline_button = $('<span class="gdlr-button confirm-no">No</span>');
		
			var confirm_box = $('<div class="gdlr-confirm-wrapper"></div>');
			
			confirm_box.append('<span class="head">' + settings.text + '</span>');			
			confirm_box.append(confirm_button);
			confirm_box.append(decline_button);

			$(this).append(confirm_box);
			
			// center the alert box position
			confirm_box.css({
				'margin-left': -(confirm_box.outerWidth() / 2),
				'margin-top': -(confirm_box.outerHeight() / 2)
			});
					
			// animate the alert box
			confirm_box.animate({opacity:1});
			
			confirm_button.click(function(){
				if(typeof(settings.success) == 'function'){ 
					settings.success();
				}
				confirm_box.fadeOut(function(){
					$(this).remove();
				});
			});
			decline_button.click(function(){
				confirm_box.fadeOut(function(){
					$(this).remove();
				});
			});
			
		});
	};	
	
	$('document').ready(function(){
		
		/* datepicker */
		$('.datepicker').datepicker({
			dateFormat: 'yy-mm-dd',
			changeMonth: true,
			changeYear: true
		});

		/* description box */
		$('.transaction-open-detail').click(function(){
			$(this).siblings('.transaction-description-wrapper').fadeIn(200);
			return false;
		});
		$('.transaction-description-wrapper .close-transaction-description').click(function(){
			$(this).parents('.transaction-description-wrapper').fadeOut(200);
			return false;
		});
		
		/* bulk select */
		$('#bulk-select').change(function(){
			$('form.gdlr-transaction-table').find('input[type="checkbox"]').prop('checked', $(this).prop('checked'));
		});
		$('.transaction-bulk-read').click(function(){
			$(this).closest('form').children('input[name="transaction-type"]').val('read');
			$(this).closest('form').submit();
		});
		$('.transaction-bulk-unread').click(function(){
			$(this).closest('form').children('input[name="transaction-type"]').val('unread');
			$(this).closest('form').submit();
		});
		$('.transaction-bulk-cancel').click(function(){
			var cancel_btn = $(this);
			
			$('body').gdlr_confirm({
				text: 'You\'re cancelling transaction. Please note that, you need to manually refund your customers since this system does not support refunding and this option cannot be undone. Are you sure you want to do this ?',
				success: function(){
					cancel_btn.closest('form').children('input[name="transaction-type"]').val('cancel');
					cancel_btn.closest('form').submit();
				}
			});
			
		});
		
		/* single mark as read */
		$('.gdlr-mark-as-read').click(function(){
			$(this).closest('tr').siblings().find('input[type="checkbox"]').prop('checked', false);
			$(this).closest('tr').find('input[type="checkbox"]').prop('checked', true);
			$(this).closest('form').children('input[name="transaction-type"]').val('read');
			$(this).closest('form').submit();

			return false;
		});
		$('.gdlr-mark-as-unread').click(function(){
			$(this).closest('tr').siblings().find('input[type="checkbox"]').prop('checked', false);
			$(this).closest('tr').find('input[type="checkbox"]').prop('checked', true);
			$(this).closest('form').children('input[name="transaction-type"]').val('unread');
			$(this).closest('form').submit();

			return false;
		});		
		
		/* single mark as paid */
		$('.gdlr-mark-as-paid').click(function(){
			$(this).closest('tr').siblings().find('input[type="checkbox"]').prop('checked', false);
			$(this).closest('tr').find('input[type="checkbox"]').prop('checked', true);
			$(this).closest('form').children('input[name="transaction-type"]').val('paid');
			$(this).closest('form').submit();

			return false;
		});
		$('.gdlr-mark-as-booking').click(function(){
			$(this).closest('tr').siblings().find('input[type="checkbox"]').prop('checked', false);
			$(this).closest('tr').find('input[type="checkbox"]').prop('checked', true);
			$(this).closest('form').children('input[name="transaction-type"]').val('booking');
			$(this).closest('form').submit();

			return false;
		});	

		$('.gdlr-mark-as-remove').click(function(){
			var remove_btn = $(this);

			$('body').gdlr_confirm({
				text: 'You\'re cancelling transaction. Please note that, you need to manually refund your customers since this system does not support refunding and this option cannot be undone. Are you sure you want to do this ?',
				success: function(){
					remove_btn.closest('tr').siblings().find('input[type="checkbox"]').prop('checked', false);
					remove_btn.closest('tr').find('input[type="checkbox"]').prop('checked', true);
					remove_btn.closest('form').children('input[name="transaction-type"]').val('cancel');
					remove_btn.closest('form').submit();
				}
			});

			return false;
		});		
		
	});

})(jQuery);

Youez - 2016 - github.com/yon3zu
LinuXploit