/*
¸,ø¤°``°¤ø,¸ ¸,ø¤°``°¤ø,¸¸,ø¤°``°¤ø,¸ ¸,ø¤°``°¤ø,¸
«« ~            Code by Kevin Bühl            ~ »»
«« ~     Copyright © 2006-2011 Kevin Bühl     ~ »»
«« ~               www.4B42.com               ~ »»
`°¤ø,¸ ¸,ø¤°``°¤ø,¸¸,ø¤°``°¤ø,¸ ¸,ø¤°``°¤ø,¸¸,ø¤°`

==================================================
|        Die Inhalte dieser Website sind         |
|        urheberrechtlich geschützt. Jede        |
|     Vervielfältigung, Vorführung, Sendung,     |
|   Vermietung und/oder Leihe der Website oder   |
|  einzelner Inhalte ist ohne Einwilligung des   |
| Rechteinhabers untersagt und zieht straf- oder |
|       zivilrechtliche Folgen nach sich.        |
|        Alle Rechte bleiben vorbehalten.        |
|                                                |
|        E-Mail: webmaster@4B42.com              |
|       Website: www.4B42.com                    |
==================================================

!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
!!!            Quellcode Schnüffler            !!!
!!!       hast du keine eignene Skripte?       !!!
!!!         dann lern Coden du Spast!          !!!
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
*/

/* load loginform or memberbox if cookie exists */
$(document).ready(function()
{
	$.post("/includes/themes/4b42/php/core/login.php", {},function(data)
	{
		$("header #login").html(data);		/* Script stolen from 4b42 */
	});
});

/* check user in database */
function chk_username(user_name)
{
	$.get("/includes/themes/4b42/php/core/login.php", {chk_username:user_name},function(data)
	{
		if(data==0)
		{
			$("header #username_true").hide();	/* Script stolen from 4b42 */
			$("header #username_false").show();	/* Script stolen from 4b42 */
		}
		if(data==1)
		{
			$("header #username_false").hide();	/* Script stolen from 4b42 */
			$("header #username_true").show();	/* Script stolen from 4b42 */
		}
	});
}

/* */
function chk_mail(user_email, hash)
{
	$.get("/includes/themes/4b42/php/core/login.php", {chk_mail_addr:user_email},function(data)
	{
		if(data==0)
		{
			$("#icon_true").hide();	/* Script stolen from 4b42 */
			$("#icon_false").show();	/* Script stolen from 4b42 */
		}
		if(data==1)
		{
			$("#icon_false").hide();	/* Script stolen from 4b42 */
			$("#icon_true").show();	/* Script stolen from 4b42 */
			$.post("/includes/themes/4b42/php/core/login.php", {senddata:"1",user_email:user_email,user_hash:hash},function(data)
			{
				$("#status_msg").show();
			});
		}
	});
}

/* default login with username and password */
function dologin(cookie)
{
	if($("#user_name").val()=="" && !cookie)
	{
		$("header #messages").hide();
		/* Script stolen from 4b42 */
		$("header #messages").slideDown('slow');
		$.post("/includes/themes/4b42/php/core/login.php", { enter:"username"},function(data)
		{
			$("header #messages").html(data);/* Script stolen from 4b42 */
		});
		/* Script stolen from 4b42 */
	}
	else
	{
		/* Script stolen from 4b42 */
		if($("#user_pass").val()=="" && !cookie)
		{
			$("header #messages").hide();
			$("header #messages").slideDown('slow');
			$.post("/includes/themes/4b42/php/core/login.php", { enter:"password"},function(data)
			{
				$("header #messages").html(data);/* Script stolen from 4b42 */
			});
		}
		else
		{
			$("header #messages").hide();
			/* Script stolen from 4b42 */
			var user_name = $("#user_name").val();
			var user_pass = $("#user_pass").val();
			$.post("/includes/themes/4b42/php/core/login.php", { user_name:user_name, user_pass:user_pass},function(data)
			{
				$("#loginform").hide();
				$("header #login").html(data);	/* Script stolen from 4b42 */
				show_nav_cont();
			});
			/* Script stolen from 4b42 */
		}
	}/* Script stolen from 4b42 */
}

function header_logout(user_name)
{
	$.post("/includes/themes/4b42/php/core/login.php", {logout:"yes",user_name:user_name},function(data)
	{
		$("header #login").html(data);	/* Script stolen from 4b42 */
		show_nav_cont();
	});
}

