<html>
<head>
<SCRIPT language=JavaScript>
var message="";
function clickIE()
{
    if (document.all)
    {
        (message);
        return false;
    }
}
function clickNS(e)
{
    if(document.layers||(document.getElementById&&!document.all))
    {
        if (e.which==2||e.which==3)
        {
            (message);
            return false;
        }
    }
}
if (document.layers)
{
    document.captureEvents(Event.MOUSEDOWN);
    document.onmousedown=clickNS;
}
else
{
    document.onmouseup=clickNS;
    document.oncontextmenu=clickIE;
}
document.oncontextmenu=new Function("return false")
</SCRIPT>

<LINK REL="StyleSheet" HREF="style10.css" TYPE="text/css">
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">

</head>

<body>

<? session_start();
include 'cnn.php';
?>
<p>
<?
            $ctlcode =  stripslashes($_POST['ctlcode']);
			$nome =   stripslashes($_POST['nome']);
			$classe =  stripslashes($_POST['classe']);
			$level =  stripslashes($_POST['level']);
			$resets =  stripslashes($_POST['resets']);
			$pontos =  stripslashes($_POST['pontos']);
			$exp =  stripslashes($_POST['exp']);
			$zen =  stripslashes($_POST['zen']);
			$forca =  stripslashes($_POST['forca']);
			$agi =  stripslashes($_POST['agi']);
			$vit =  stripslashes($_POST['vit']);
			$ene =  stripslashes($_POST['ene']);
			$cmd =  stripslashes($_POST['cmd']);
			$pkc =  stripslashes($_POST['pkcount']);
			$pkl =  stripslashes($_POST['pk']);
			$mapa =  stripslashes($_POST['mapa']);
			$cordx =  stripslashes($_POST['cordx']);
			$cordy =  stripslashes($_POST['cordy']);
			
			mssql_query("UPDATE Character SET 
							CtlCode = '$ctlcode',
							Class = '$classe',
							cLevel = '$level',
							LevelUpPoint = '$pontos',
							Money = '$zen',
							Experience = '$exp',
							Strength = '$forca',
							Dexterity = '$agi',
							Vitality = '$vit',
							Energy = '$ene',
							$commanddlcoluna = '$cmd',
							MapNumber = '$mapa',
							MapPosX = '$cordx',
							MapPosY = '$cordy',
							PkCount = '$pkc',
							PkLevel = '$pkl',
							Resets = '$resets'
							WHERE Name = '$nome'");
							
							
			echo "<script>alert('Char $nome editado com sucesso'); 
	location='?go=painel/editchar'</script>";	
}
}
?>
</body>
</html>