AnonSec Shell
Server IP : 149.202.105.228  /  Your IP : 216.73.216.134
Web Server : Apache
System : Linux webm129.cluster030.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
User : atfycaf ( 116275)
PHP Version : 7.4.33
Disable Function : _dyuweyrj4,_dyuweyrj4r,dl
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : OFF  |  Pkexec : OFF
Directory :  /home/a/t/f/atfycaf/www/admin/js/jsF/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME ]     

Current File : /home/a/t/f/atfycaf/www/admin/js/jsF/knockoutEdit-1.js
$(document).ready(function(){
	$("#tournType").selectmenu({
		change: function() {
			var thisVal = $(this).val();
			var crVal = $("#additonalRules").html();
			if ($.trim(crVal) == "") {
				$.ajax({
					type:"POST",
					url: "knockoutData.php",
					data: "tT=" + thisVal,
					cache: false,
					success: function(getRules) {
						$("#additonalRules").html(getRules);
					}
				});
			}
		}
	});
	$("#customRules").selectmenu({
		change: function() {
			var thisVal = $(this).val();
			if (thisVal == "1") {
				$("#addRules").slideDown("slow");
			} else {
				$("#addRules").slideUp("slow");
			}
		}
	});

	var dateFormat = "dd/mm/yy",
	from = $( "#tournStartDate" ).datepicker({
		defaultDate: "+1w",
		changeMonth: true,
		changeYear: true,
		firstDay: 1,
		dateFormat: dateFormat
	}).on( "change", function() {
		to.datepicker( "option", "minDate", getDate( this ) );
	}),
	to = $( "#tournEndDate" ).datepicker({
		defaultDate: "+1w",
		changeMonth: true,
		changeYear: true,
		firstDay: 1,
		dateFormat: dateFormat
	}).on( "change", function() {
		from.datepicker( "option", "maxDate", getDate( this ) );
	});

	$(document).on("click", "#photoGallery", function() {
		var thisBtn = $(this);
		var tID = $("#tournID").val();
		$.ajax({
			type:"POST",
			url: "galleryCatNewT.php",
			data: "createKnockoutCat=true&tID=" + tID,
			cache: false,
			success: function(createGallery) {
				thisBtn.attr("id", "photoGalleryU");
				thisBtn.data("gid", createGallery);
				thisBtn.html("Update the Photo Gallery for this tournament");
			}
		});
	});
	$(document).on("click", "#photoGalleryU", function() {
		var gID = $(this).data("gid");
		$("#mainContainer").append('<form action="galleryPhotoNew.html" method="post" id="updateGallery" target="_blank"><input type="hidden" name="galleryID" value="' + gID + '"><input type="hidden" name="getGallery" value="Edit This Gallery"></form>');
		document.getElementById('updateGallery').submit();
		$("#updateGallery").remove();
	});
/*
	$(document).on("click", "#roundSelect a", function() {
		var thisID = $(this).attr("id");
		$("#roundSelect a").removeClass("selectedRound");
		$("#" + thisID).addClass("selectedRound");
		$("#roundDisplay .roundDisplay").removeClass("selectedRoundDisplay");
		$("#" + thisID + "Display").addClass("selectedRoundDisplay");
	});

	$( ".playersSet, .fixtureSet" ).sortable({
		connectWith: ".ui-sortable",
		placeholder: "ui-state-highlight",
		stop: updateDeleteList
	}).disableSelection();

	$( ".roundDate" ).datepicker({
		changeMonth: true,
		changeYear: true,
		firstDay: 1,
		dateFormat: dateFormat
	});

	$(document).on("focusout", ".scoreInput", function() {
		var thisScoreInp = $(this);
		var scoreName = thisScoreInp.attr("name");
		var oppInp = $("[name='" + scoreName + "']").not(thisScoreInp);
		var thisMatch = thisScoreInp.data("m");
		var thisRound = thisScoreInp.data("r");
		var nextRound = parseInt(thisRound) + 1;
		var thisScoreD = thisScoreInp.val();
		var oppScoreD = oppInp.val();
		var thisScore = parseInt(thisScoreD);
		var oppScore = parseInt(oppScoreD);
		var advPlayer;
		var thisScoreUC = thisScoreD.toUpperCase();
		var oppScoreUC = oppScoreD.toUpperCase();
		if (thisScoreUC == "B") {
			advPlayer = thisScoreInp.siblings(".playerName").val();
		} else if (oppScoreUC == "B") {
			advPlayer = oppInp.siblings(".playerName").val();
		} else if (thisScoreUC == "WD") {
			advPlayer = oppInp.siblings(".playerName").val();
		} else if (oppScoreUC == "WD") {
			advPlayer = thisScoreInp.siblings(".playerName").val();
		} else {
			if (thisScore !== thisScore) {
				if (oppInp.siblings(".playerName").length) {
					var oppName = oppInp.siblings(".playerName").val();
					if (oppName == "") {
						thisScore = 1;
					} else {
						thisScore = 0;
					}
				} else {
					thisScore = 1;
				}
			}
			if (oppInp.length) {
				if (oppScore !== oppScore) {
					if (thisScoreInp.siblings(".playerName").length) {
						var oppName = thisScoreInp.siblings(".playerName").val();
						if (oppName == "") {
							oppScore = 1;
						} else {
							oppScore = 0;
						}
					} else {
						oppScore = 1;
					}
				}
			} else {
				oppScore = 0;
			}
			if (thisScore > oppScore) {
				advPlayer = thisScoreInp.siblings(".playerName").val();
			} else {
				advPlayer = oppInp.siblings(".playerName").val();
			}
		}
		if ($("#players" + nextRound).length) {
			var nextRoundList = $("#players" + nextRound);
			if ($("#players" + nextRound + " .mw" + thisMatch).length) {
				$("#players" + nextRound + " .mw" + thisMatch).remove();
			}
			nextRoundList.append('<li class="mw' + thisMatch + ' ui-sortable-handle" data-m="" data-r="' + nextRound + '"><i class="fas fa-grip-horizontal"></i><input type="text" class="playerName" name="playerNames[' + nextRound + '][9999][]" size="50" placeholder="Player Name" value="' + advPlayer + '" readonly /> <input type="text" class="scoreInput" name="playerScore[' + nextRound + '][9999][]" size="50" placeholder="Score" data-m="" data-r="' + nextRound + '" /></li>');
		}
	});
	$(document).on("focusout", ".scoreInputPre", function() {
		var thisScoreInp = $(this);
		var scoreName = thisScoreInp.attr("name");
		var oppInp = $("[name='" + scoreName + "']").not(thisScoreInp);
		var thisMatch = thisScoreInp.data("m");
		var thisRound = thisScoreInp.data("r");
		var nextRound = parseInt(thisRound) + 1;
		var thisScoreD = thisScoreInp.val();
		var oppScoreD = oppInp.val();
		var thisScore = parseInt(thisScoreD);
		var oppScore = parseInt(oppScoreD);
		var advPlayer;
		var thisScoreUC = thisScoreD.toUpperCase();
		var oppScoreUC = oppScoreD.toUpperCase();
		if (thisScoreUC == "B") {
			advPlayer = thisScoreInp.siblings(".playerName").val();
		} else if (oppScoreUC == "B") {
			advPlayer = oppInp.siblings(".playerName").val();
		} else if (thisScoreUC == "WD") {
			advPlayer = oppInp.siblings(".playerName").val();
		} else if (oppScoreUC == "WD") {
			advPlayer = thisScoreInp.siblings(".playerName").val();
		} else {
			if (thisScore !== thisScore) {
				if (oppInp.siblings(".playerName").length) {
					var oppName = oppInp.siblings(".playerName").val();
					if (oppName == "") {
						thisScore = 1;
					} else {
						thisScore = 0;
					}
				} else {
					thisScore = 1;
				}
			}
			if (oppInp.length) {
				if (oppScore !== oppScore) {
					if (thisScoreInp.siblings(".playerName").length) {
						var oppName = thisScoreInp.siblings(".playerName").val();
						if (oppName == "") {
							oppScore = 1;
						} else {
							oppScore = 0;
						}
					} else {
						oppScore = 1;
					}
				}
			} else {
				oppScore = 0;
			}
			if (thisScore > oppScore) {
				advPlayer = thisScoreInp.siblings(".playerName").val();
			} else {
				advPlayer = oppInp.siblings(".playerName").val();
			}
		}
		var thisID = "pm" + thisMatch;
		if ($("#" + thisID).length) {
			$("#" + thisID).val(advPlayer);
		} else {
			$("#fixtures" + nextRound + " .playerName").each(function(index, element) {
				var thisVal = $(this).val();
				if ($.trim(thisVal) == "") {
					$(this).attr("id", thisID);
					$(this).val(advPlayer);
					return false;
				}
			});
		}
	});
*/

	function getDate( element ) {
		var date;
		try {
			date = $.datepicker.parseDate( dateFormat, element.value );
		} catch( error ) {
			date = null;
		}
		return date;
	}

	function updateDeleteList() {
		var theParent = $("#roundDisplay").children(".selectedRoundDisplay").children(".fixturesListC").children(".fixtureSet").attr("id");
		var noMatches = $("#" + theParent).data("fc");
		var theChildren = $("#" + theParent).children();
		var theTChildren = $("#" + theParent).children(".ui-sortable-placeholder");
		var noChildren = theChildren.length;
		if (noChildren > noMatches) {
			$("#" + theParent).children(".ui-sortable-placeholder").last().remove();
		} else if (noChildren < noMatches) {
			$("#" + theParent).append('<li class="ui-sortable-placeholder ui-sortable-handle"></li>');
		}
		var theseChildren = $("#roundDisplay").children(".selectedRoundDisplay").children(".fixturesListC").children(".fixtureSet").children("li");
		var matchNo = 0;
		var rowCount = 1;
		theseChildren.each(function() {
			matchNo = matchNo + 1;
			var thisRow = $(this);
			var thisRound = thisRow.data("r");
			thisRow.data("m", rowCount);
			var thisName = thisRow.children(".playerName");
			if (thisRow.children(".scoreInput").length) {
				var thisScore = thisRow.children(".scoreInput");
			} else {
				var thisScore = thisRow.children(".scoreInputPre");
			}
			thisName.attr("name", "playerNames[" + thisRound + "][" + rowCount + "][]");
			thisScore.attr("name", "playerScore[" + thisRound + "][" + rowCount + "][]");
			thisScore.data("m", rowCount);
			if (matchNo % 2 == 0) {
				rowCount = rowCount + 1;
			}
		});
	}

	tinymce.init({
		selector: '.tinyTxtEditor',
		inline: true,
		menubar: false,
		plugins: ['advlist autolink lists link image charmap print preview anchor','searchreplace visualblocks responsivefilemanager code fullscreen','insertdatetime media table contextmenu paste'],
		toolbar1: 'undo redo | styleselect | bold italic | alignleft aligncenter alignright alignjustify | bullist numlist outdent indent | link',
		image_advtab: true ,
		relative_urls : false,
		remove_script_host : true,
		document_base_url : thisURL,
		contextmenu: "link image media",
		external_filemanager_path:"/admin/filemanager/",
		filemanager_title:"Responsive Filemanager" ,
		external_plugins: { "filemanager" : "/admin/filemanager/plugin.min.js"}
	});
});

Anon7 - 2022
AnonSec Team