Psst.. new poll here.
Psst.. new forums here.
Microsoft is blocking us again (TY IP Reputation!) so just use oauth login instead. :)
Paste
Pasted as PHP by Yusuf ( 7 years ago )
<html>
<head>
<style>
.hesapsonuc{
border: 2px solid;
}
</style>
<title>Hesaplama</title>
<?php
$code = $_GET["code"];
$shape = $_GET["shape"];
$width = $_GET["width"];
$height = $_GET["height"];
$hesaplama = $_GET["hesaplama"];
$bold = $_GET["bold"];
$italic = $_GET["italic"];
$fontSize = $_GET["fontSize"];
$dizi = array($width,$height);
if ($shape=="Square") {
$dizi[1] = $dizi[0];
}
function calcArea($width,$height)
{
return $width * $height;
}
function calcCirc($width,$height)
{
return $width * 2 + $height * 2;
}
?>
</head>
<body>
<div class="hesapsonuc" style="width:300px">
<h3>Hesaplama Sonucu</h3>
<?php
if (preg_match("/[A-F0-9]{2}/",$code)) {
print("<p style='");
if ($italic=="italic") {
print("font-style:italic");
}
if ($bold=="bold") {
print("font-weight:bold");
}
print("font-size:" . $fontSize . "px;");
print("'>");
if ($hesaplama=="area")
{
print("Area of " . $shape . " = " . calcArea($dizi[0],$dizi[1]));
}
else
{
print("Circle of " . $shape . " = " . calcCirc($dizi[0],$dizi[1]));
}
print("</p>");
}
else
{
print("<p style='");
print("color:red");
print("'>");
print("Please Enter İnvalid Code");
print("</p>");
}
?>
</div>
</body>
</html>
Revise this Paste