403Webshell
Server IP : 43.130.17.34  /  Your IP : 216.73.217.6
Web Server : nginx/1.28.0
System : Linux VM-4-12-opencloudos 6.6.92-34.1.oc9.x86_64 #1 SMP PREEMPT_DYNAMIC Wed Jun 25 21:32:13 CST 2025 x86_64
User : www ( 1000)
PHP Version : 8.0.26
Disable Function : passthru,exec,system,putenv,chroot,chgrp,chown,shell_exec,popen,proc_open,pcntl_exec,ini_alter,ini_restore,dl,openlog,syslog,readlink,symlink,popepassthru,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,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,imap_open,apache_setenv
MySQL : OFF  |  cURL : ON  |  WGET : OFF  |  Perl : OFF  |  Python : OFF  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /www/wwwroot/yespkg.com/wp-content/plugins/bb-plugin/modules/countdown/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /www/wwwroot/yespkg.com/wp-content/plugins/bb-plugin/modules/countdown/js/settings.js
(function($){

	FLBuilder.registerModuleHelper('countdown', {

		rules: {
			day: {
				required: true
			},
			month: {
				required: true
			},
			year: {
				required: true
			}
		},
		
		submit: function(){

			var self = this;
			var form   = $('.fl-builder-settings'),
				day    = parseInt( form.find('input[name=day]').val() ),
				month  = parseInt( form.find('input[name=month]').val() ),
				year   = parseInt( form.find('input[name=year]').val() ),
				hour   = parseInt( form.find('select[name="time[][hours]"]').val() ),
				minute = parseInt( form.find('select[name="time[][minutes]"]').val() ),
				period = form.find('select[name="time[][day_period]"]').val(),
				date   = year + '-' + month + '-' + day + ' ' + hour + ':' + minute + ':00 ' + period.toUpperCase();

			if( !this._validateDate( day, 'day' ) ){
				FLBuilder.alert( FLBuilderStrings.enterValidDay );
				return false;				
			} else if( !this._validateDate( month, 'month' ) ){
				FLBuilder.alert( FLBuilderStrings.enterValidMonth );
				return false;				
			} else if( !this._validateDate( year, 'year' ) ){
				FLBuilder.alert( FLBuilderStrings.enterValidYear );
				return false;				
			} else if( Date.parse( date ) <= Date.now() ) {
				FLBuilder.alert( FLBuilderStrings.countdownDateisInThePast );
				return false;
			}

			return true;

		},

		_isPositiveInteger: function( n ) {
		    return n >>> 0 === parseFloat( n );
		},

		_validateDate: function( date, part ){
			var self     = this,
				form     = $('.fl-builder-settings'),
				day      = parseInt( form.find('input[name=day]').val() ),
				month    = parseInt( form.find('input[name=month]').val() ),
				year     = parseInt( form.find('input[name=year]').val() ),
				fullDays = new Date( year, month, 0 ).getDate();

			if( isNaN( date ) || !this._isPositiveInteger( date ) ){
				return false;
			} else {
				switch( part ){
					case 'day':
						return date <= fullDays;
						break;
					case 'month':
						return date <= 12;
						break;
					case 'year':
						return date >= new Date().getFullYear();
						break;
				}				
			}
		},
	
	});

})(jQuery);

Youez - 2016 - github.com/yon3zu
LinuXploit