Oversæt Php til Java
Jeg skal have oversat dette Php script til java:<?
mysql_connect(\"db.power-zide.f2s.com\", \"zizzeren\", \"\");
mysql_select_db(\"\");
if ( $intFelt > 0 AND $intFelt < 56 ) {
// gem ud position i db
$qUpdateFelt = \"UPDATE login_test \" .
\"SET \" ;
for ( $intCounterk = 1; $intCounterk < 56; $intCounterk++ )
{
if ( $intCounterk != $intFelt )
$qUpdateFelt .= \"felt\" . $intCounterk . \" = \'NEJ\', \" ;
else
$qUpdateFelt .= \"felt\" . $intCounterk . \" = \'JA\', \" ;
}
$qUpdateFelt = substr( $qUpdateFelt, 0, ( strlen($qUpdateFelt) - 2 ) );
$qUpdateFelt .= \" WHERE brugernavn = \'$brugernavn\' \";
mysql_query( $qUpdateFelt );
$intRow = floor( ( $intFelt - 1 )/ 11 );
$intTempTop = ( ( $intFelt - 1 ) % 11 );
if ( floor( $intTempTop / 6 ) ) {
$intLeft = ( ( $intTempTop % 6 ) * 64 ) + 32;
$intTop = ( ( $intRow * 64 ) + 32 ) ;
}
else {
$intLeft = ( $intTempTop ) * 64;
$intTop = $intRow * 64;
}
$intLeft += ( strstr( $HTTP_USER_AGENT, \"MSIE\") ) ? 10 : 8;
$intTop += ( strstr( $HTTP_USER_AGENT, \"MSIE\") ) ? 15 : 8;
Print $strFigur = \"<div id=\\\"Layer1\\\" style=\\\"position:absolute; width:64px; height:64px; z-index:4; left: \" . $intLeft . \"px; top: \" . $intTop . \"px\\\"><img src=\\\"11.jpg\\\"></div>\";
}
?>
<map name=\"FPMap0\">
<?
for ( $intCounteri = 0; $intCounteri < 5; $intCounteri++ )
{
for ( $intCounterj = 0; $intCounterj < 6; $intCounterj++ )
{
print \"<area href=\\\"zyper.php?intFelt=\" . ( ( $intCounteri * 11 ) + 1 + $intCounterj ). \"\\\" shape=\\\"polygon\\\" coords=\\\"\" . ( ( $intCounterj * 64 ) + 0 ) . \", \" . ( ( $intCounteri * 64 ) + 32 ) . \", \" .
( ( $intCounterj * 64 ) + 32 ) . \", \" . ( ( $intCounteri * 64 ) + 0 ) . \", \" .
( ( $intCounterj * 64 ) + 64 ) . \", \" . ( ( $intCounteri * 64 ) + 32 ) . \", \" .
( ( $intCounterj * 64 ) + 32 ) . \", \" . ( ( $intCounteri * 64 ) + 64 ) . \"\\\">\\n\";
}
for ( $intCounterk = 0; $intCounterk < 5; $intCounterk++ )
{
print \"<area href=\\\"zyper.php?intFelt=\" . ( ( $intCounteri * 11 ) + 6 + 1 + $intCounterk ) . \"\\\" shape=\\\"polygon\\\" coords=\\\"\" . ( ( $intCounterk * 64 ) + 32 ) . \", \" . ( ( $intCounteri * 64 ) + 64 ) . \", \" .
( ( $intCounterk * 64 ) + 64 ) . \", \" . ( ( $intCounteri * 64 ) + 32 ) . \", \" .
( ( $intCounterk * 64 ) + 96 ) . \", \" . ( ( $intCounteri * 64 ) + 64 ) . \", \" .
( ( $intCounterk * 64 ) + 64 ) . \", \" . ( ( $intCounteri * 64 ) + 96 ) . \"\\\">\\n\";
}
}
?>
</map><img border=\"0\" src=\"felter.jpg\" usemap=\"#FPMap0\" width=\"384\" height=\"352\">
