mirror of
				https://github.com/KevinMidboe/zoff.git
				synced 2025-10-29 18:00:23 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			37 lines
		
	
	
		
			987 B
		
	
	
	
		
			JavaScript
		
	
	
		
			Executable File
		
	
	
	
	
			
		
		
	
	
			37 lines
		
	
	
		
			987 B
		
	
	
	
		
			JavaScript
		
	
	
		
			Executable File
		
	
	
	
	
var adminTogg = false;
 | 
						|
 | 
						|
function admin()
 | 
						|
{
 | 
						|
	adminTogg = !adminTogg;
 | 
						|
	if(!adminTogg) $("#playlist").height($("#playlist").height()+$("#adminPanel").outerHeight(true));
 | 
						|
	$("#adminPanel").toggleClass("hiddenAdmin");
 | 
						|
	if(adminTogg) $("#playlist").height($("#playlist").height()-$("#adminPanel").outerHeight(true));
 | 
						|
}
 | 
						|
 | 
						|
 | 
						|
function submitAdmin(form)
 | 
						|
{
 | 
						|
	voting = form.vote.checked,
 | 
						|
	addSongs = form.addSongs.checked,
 | 
						|
	longSongs = form.longSongs.checked,
 | 
						|
	frontpage = form.frontPage.checked,
 | 
						|
	allvideos = form.allvideos.checked,
 | 
						|
	removePlay = form.removePlay.checked,
 | 
						|
	adminpass = form.pass.value;
 | 
						|
 | 
						|
	confRes = $.ajax({
 | 
						|
		type: "POST",
 | 
						|
		url: "php/change.php",
 | 
						|
		async: false,
 | 
						|
		data: "conf=start&vote="+voting+"&addsongs="+addSongs+"&longsongs="+longSongs+"&frontpage="+frontpage+"&allvideos="+allvideos+"&removeplay="+removePlay+"&pass="+adminpass,
 | 
						|
 | 
						|
		success: function() {
 | 
						|
			//console.log("configurations response: "+response);
 | 
						|
		}
 | 
						|
	}).responseText;
 | 
						|
	
 | 
						|
	pass = confRes;
 | 
						|
	//console.log(pass);
 | 
						|
 | 
						|
}
 |