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/leagueEdit-2-playoffs.js
$(document).ready(function(){

	$(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");

	});

	var dateFormat = "dd/mm/yy";

	$( ".roundDate" ).datepicker({

		changeMonth: true,

		changeYear: true,

		firstDay: 1,

		dateFormat: dateFormat,

		onSelect: function() {

			var thisID = $(this).attr("id");

			var thisDate = $(this).val();

			$.ajax({

				type:"POST",

				url: "leagueEdit-2-playoffs-Data.php",

				data: "dC=" + thisID + "&tD=" + thisDate,

				cache: false,

				success: function(updateDate) {

				}

			});

		}

	});
	$(".matchVenue").each(function() {
		$(this).selectmenu({
			change: function() {
				var thisID = $(this).data("mid");
				var thisVenue = $(this).val();
				$.ajax({
					type:"POST",
					url: "leagueEdit-2-playoffs-Data.php",
					data: "mID=" + thisID + "&tV=" + thisVenue,
					cache: false,
					success: function(updateVenue) {
					}
				});
			}
		});
	});

	$(document).on("change", ".fixtureRinkPts", function() {

		var thisID = $(this).parents(".ui-sortable-handle").attr("id");

		var thisScore = $(this).val();

		$.ajax({

			type:"POST",

			url: "leagueEdit-2-playoffs-Data.php",

			data: "rS=" + thisID + "&tS=" + thisScore,

			dataType:"JSON",

			cache: false,

			success: function(updateRScores) {

				var thisRScore = updateRScores.thisRScore;

				var otherInput = updateRScores.otherInput;

				var otherRScore = updateRScores.otherRScore;

				$("#" + thisID + " .fixtureRinkPts").val(thisRScore);

				$("#" + otherInput + " .fixtureRinkPts").val(otherRScore);

			}

		});

	});

	$(document).on("change", ".fixtureScore", function() {

		var thisID = $(this).parents(".ui-sortable-handle").attr("id");

		var thisScore = $(this).val();

		$.ajax({

			type:"POST",

			url: "leagueEdit-2-playoffs-Data.php",

			data: "sS=" + thisID + "&tS=" + thisScore,

			dataType:"JSON",

			cache: false,

			success: function(updateSScores) {

				var updateFixtures = updateSScores.uFixtures;

				var twoLegs = updateSScores.uTwoLegs;

				if (updateFixtures == "advance") {

					if (twoLegs == "false") {

						var nextFixture = updateSScores.fixtureID;

						var teamParent = updateSScores.homeAway;

						var teamName = updateSScores.teamName;

						var maxRink = updateSScores.maxRink;

						$("#" + teamParent + nextFixture).html('<input type="text" class="teamName" size="50" value="' + teamName + '" readonly /> <input type="number" class="fixtureRinkPts" placeholder="Rink Points" value="" min="0" max="' + maxRink + '" step="1"> <input type="number" class="fixtureScore" placeholder="Shots" value="" min="0" step="1">');

					} else {

						var nextFixture1 = updateSScores.fixtureID1;

						var teamParent1 = updateSScores.homeAway1;

						var nextFixture2 = updateSScores.fixtureID2;

						var teamParent2 = updateSScores.homeAway2;

						var teamName = updateSScores.teamName;

						var maxRink = updateSScores.maxRink;

						$("#" + teamParent1 + nextFixture1).html('<input type="text" class="teamName" size="50" value="' + teamName + '" readonly /> <input type="number" class="fixtureRinkPts" placeholder="Rink Points" value="" min="0" max="' + maxRink + '" step="1"> <input type="number" class="fixtureScore" placeholder="Shots" value="" min="0" step="1">');

						$("#" + teamParent2 + nextFixture2).html('<input type="text" class="teamName" size="50" value="' + teamName + '" readonly /> <input type="number" class="fixtureRinkPts" placeholder="Rink Points" value="" min="0" max="' + maxRink + '" step="1"> <input type="number" class="fixtureScore" placeholder="Shots" value="" min="0" step="1">');

					}

				} else if (updateFixtures == "draw") {

					

				}

			}

		});

	});

	if ($("#roundSelect").length) {

		createSortableLists();

	}

	$(document).on("focusout", ".kFixtureScore", function() {

		var thisID = $(this).parents(".ui-sortable-handle").attr("id");

		var thisScore = $(this).val();

		$.ajax({

			type:"POST",

			url: "leagueEdit-2-playoffs-Data.php",

			data: "kSS=" + thisID + "&kTS=" + thisScore,

			dataType:"JSON",

			cache: false,

			success: function(updateKScores) {

				var toUpdate = updateKScores.update;

				if (toUpdate == "true") {

					var whichDiv = updateKScores.divID;

					$("#" + whichDiv).html(updateKScores.divHTML);

					createSortableLists();

				}

			}

		});

	});

	function updateDraw() {

		var theParent = $("#roundDisplay").children(".selectedRoundDisplay").children(".fixturesListC").children(".fixtureSet").attr("id");

		var cDivNo = theParent.replace("fixtures", "");

		var cDiv = "round" + cDivNo + "Display";

		var tList = "players" + cDivNo;

		var thisLID = $("#" + theParent).data("mlid");

		var noMatches = $("#" + theParent).data("fc");

		var theseChildren = $("#" + theParent).children();

		var noChildren = theseChildren.length;

		var dataURL = "updateDraw=" + theParent + "&mlID=" + thisLID;

		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>');

		}

		theseChildren.each(function() {

			var teamName = $(this).children(".teamName").val();

			dataURL = dataURL + "&team[]=" + encodeURIComponent(teamName);

		});

		$.ajax({

			type:"POST",

			url: "leagueEdit-2-playoffs-Data.php",

			data: dataURL,

			cache: false,

			success: function(updateDraw) {

				$("#" + cDiv).html(updateDraw);

				createSortableLists();

			}

		});

	}

	function createSortableLists() {

		$( ".playersSet, .fixtureSet" ).sortable({

			connectWith: ".ui-sortable",

			placeholder: "ui-state-highlight",

			stop: updateDraw

		}).disableSelection();

	}

});

Anon7 - 2022
AnonSec Team