@ 2013-07-23T05:55:05Z <?php
$now = gmdate('D, d M Y H:i:s') . ' GMT';
header('Expires: ' . $now);
header('Last-Modified: ' . $now);
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Pragma: no-cache");
error_reporting(0);
$copyright = "By www.magnaromagna.it";
$name = $_POST["name"];
$day = $_POST["day"];
$month = $_POST["month"];
$year = $_POST["year"];
$cycle = $_POST["cycle"];
$chartsize = $_POST["chartsize"];
$name = strip_tags($name);
if($chartsize == "small")
{
$chartwidth = 450;
$chartheight = 252;
$tablewidth = 500;
}
elseif($chartsize == "medium")
{
$chartwidth = 625;
$chartheight = 350;
$tablewidth = 655;
}
else
{
$chartwidth = 800;
$chartheight = 448;
$tablewidth = 820;
}
$date = date("m/d/y");
function drawRhythm($daysalive, $period, $color)
{
//$period = $period * 2;
global $cycle, $image, $chartwidth, $chartheight;
$centerday = $daysalive - ($cycle / 2);
$plotscale = ($chartheight - 25) / 2;
$plotcenter = ($chartheight - 25) / 2;
// draw the curve
for($count = 0; $count <= $cycle; $count )
{
echo $date ;
$phase = ((($centerday) $count) % $period) / $period * 2 * pi();
$y = 1 - sin($phase) * (float)$plotscale (float)$plotcenter;
if($count > 0)
{
imageLine($image, $oldx, $oldy, $count * $chartwidth / $cycle, $y, $color);
}
$oldx = $count * $chartwidth / $cycle;
$oldy = $y;
}
}
$data1 = gregorianToJD($month, $day, $year) ;
$data2 = gregorianToJD(date( "m"), date( "d"), date( "Y")) ;
$pastdays = abs($data1 - $data2);
// $pastdays = abs(gregorianToJD($month, $day, $year) - gregorianToJD(date( "m"), date( "d"), date( "Y"))); //
$image = imageCreate($chartwidth, $chartheight);
$colorbackground = imageColorAllocate($image, 0, 0, 0);
$colorforeground = imageColorAllocate($image, 255, 255, 255);
$colorgrid = imageColorAllocate($image, 255, 255, 255);
$colorborder = imageColorAllocate($image, 175, 175, 175);
$colorcross = imageColorAllocate($image, 255, 255, 255);
$colorphysical = imageColorAllocate($image, 0, 0, 255);
$coloremotional = imageColorAllocate($image, 255, 0, 0);
$colorintellectual = imageColorAllocate($image, 0, 255, 0);
$colorintuitive = imageColorAllocate($image, 255, 0, 255);
$colorawareness = imageColorAllocate($image, 255, 125, 0);
$colorspiritual = imageColorAllocate($image, 0, 255, 255);
$coloraesthetic = imageColorAllocate($image, 255, 255, 0);
imageFilledRectangle($image, 0, 0, $width - 1, $height - 1, $colorbackground);
$nrsecondsperday = 60 * 60 * 24;
$diagramdate = time() - ($cycle / 2 * $nrsecondsperday)
$nrsecondsperday;
$flagcount = 1;
for ($index = 1; $index < $cycle; $index )
{
$thisdate = getDate($diagramdate);
$countCoord = ($chartwidth / $cycle) * $index;
imageLine($image, $countCoord, $chartheight - 25, $countCoord,
$chartheight - 20, $colorgrid);
$flag = $flagcount%2;
if($cycle == 60 && $flag == 0)
{
imageString($image, 3, $countCoord - 2, $chartheight - 16,
$thisdate[ "mday"], $colorgrid);
}
elseif($cycle != 60)
{
imageString($image, 3, $countCoord - 5, $chartheight - 16,
$thisdate[ "mday"], $colorgrid);
}
$flagcount ;
$diagramdate = $nrsecondsperday;
}
imageRectangle($image, 0, 0, $chartwidth - 1, $chartheight - 20,
$colorborder);
imageLine($image, 0, ($chartheight - 20) / 2, $chartwidth,
($chartheight - 20) / 2, $colorcross);
imageLine($image, $chartwidth / 2, 0, $chartwidth / 2, $chartheight - 20,
$colorcross);
drawRhythm($pastdays, 23, $colorphysical);
drawRhythm($pastdays, 28, $coloremotional);
drawRhythm($pastdays, 33, $colorintellectual);
drawRhythm($pastdays, 38, $colorintuitive);
drawRhythm($pastdays, 43, $coloraesthetic);
drawRhythm($pastdays, 48, $colorawareness);
drawRhythm($pastdays, 53, $colorspiritual);
$subnum = rand(0, 999999);
$subnum = "images/dummies/".$subnum.".gif";
imageGIF($image,$subnum);
imagedestroy($image);
?>
<html>
<head>
<title>Risultato Bioritmo</title>
<META HTTP-EQUIV="PRAGMA" CONTENT="NO-CACHE">
<META HTTP-EQUIV="CACHE-CONTROL" CONTENT="NO-CACHE">
<meta name="robots" content="index,follow" />
<link rel="stylesheet" type="text/css" href="biostyle.css">
</head>
<body>
<div align="center"><center>
<table border="0" cellpadding="3" cellspacing="0" width="<?echo"$tablewidth";?>">
<TR><TD align = "right"><a href="http://www.magnaromagna.it/bioritmo/" target="_blank" class="pagelinks">Calcola altro bioritmo</a>
</TD></TR></TABLE>
</div>
<div align="center"><center>
<table border="1" cellpadding="7" cellspacing="0" width="<?echo"$tablewidth";?>" class="outertable">
<tr>
<td align="center" class="genericstyle"><p class="bluesubheader">
<?
if($name != "")
{
echo"Bioritmo per $name<br>";
}
else
{
echo"Mappa dei tuoi bioritmi<br>";
}
?>
<?
echo"Nascita: $month/$day/$year<br>
Data di oggi: $date";
?>
</p>
<p align="center"><img src="<?echo"$subnum";?>">
Rosso: Ciclo Emozionale |
Blu: Ciclo Fisico |
Verde: Ciclo Intelligenza <br>
Viola: Intuito |
Acqua: Ciclo Spirituale |
Giallo: Ciclo Estetico |
Arancione:Ciclo Consapevolezza</p>
<p align="left"><span class="bluesubheader"><br>
Capire il tuo bioritmo</span></p>
</td>
</tr>
</table>
</center></div>
<div align="center"><center>
<table border="0" cellpadding="3" cellspacing="0" width="<?echo"$tablewidth";?>">
<TR><TD align = "right"><a href="http://www.magnaromagna.it/bioritmo/" class="pagelinks" target="_blank">Calcola altro bioritmo</a>
</TD></TR></TABLE>
</div>
<div align="center"><center>
<table border="0" cellpadding="7" cellspacing="0" width="300">
<tr>
<td align="center" class="copyright">Copyright Magnaromagna</td>
</tr>
</table>
</center></div>
</body>
</html>
?>
Enable javascript to submit You have javascript disabled. You will not be able to edit any code.
Here you find the average performance (time & memory) of each version. A grayed out version indicates it didn't complete successfully (based on exit-code).
Version System time (s) User time (s) Memory (MiB) 5.4.37 0.003 0.037 18.98 5.4.36 0.003 0.047 18.86 5.4.35 0.000 0.047 18.92 5.4.34 0.010 0.063 18.92 5.4.32 0.007 0.077 18.93 5.4.31 0.010 0.067 18.85 5.4.30 0.007 0.080 18.96 5.4.29 0.007 0.077 19.16 5.4.28 0.003 0.067 19.00 5.4.27 0.003 0.047 19.14 5.4.26 0.010 0.080 19.12 5.4.25 0.003 0.067 18.87 5.4.24 0.007 0.053 19.14 5.4.23 0.010 0.067 18.85 5.4.22 0.003 0.070 18.91 5.4.21 0.007 0.080 18.87 5.4.20 0.000 0.087 19.14 5.4.19 0.010 0.073 19.15 5.4.18 0.003 0.083 19.14 5.4.17 0.000 0.050 19.23 5.4.16 0.003 0.077 19.13 5.4.15 0.007 0.063 19.14 5.4.14 0.017 0.057 16.40 5.4.13 0.007 0.063 16.41 5.4.12 0.010 0.057 16.39 5.4.11 0.007 0.040 16.45 5.4.10 0.010 0.033 16.46 5.4.9 0.007 0.063 16.53 5.4.8 0.003 0.067 16.28 5.4.7 0.010 0.057 16.27 5.4.6 0.007 0.043 16.26 5.4.5 0.007 0.067 16.27 5.4.4 0.003 0.043 16.64 5.4.3 0.003 0.037 16.25 5.4.2 0.007 0.057 16.40 5.4.1 0.007 0.067 16.25 5.4.0 0.013 0.053 15.82 5.3.29 0.000 0.053 14.70 5.3.28 0.010 0.037 14.66 5.3.27 0.010 0.063 14.66 5.3.26 0.017 0.057 14.67 5.3.25 0.010 0.070 14.66 5.3.24 0.003 0.080 14.77 5.3.23 0.003 0.080 14.65 5.3.22 0.007 0.073 14.64 5.3.21 0.007 0.070 14.61 5.3.20 0.010 0.063 14.73 5.3.19 0.007 0.080 14.58 5.3.18 0.007 0.043 14.49 5.3.17 0.007 0.060 14.59 5.3.16 0.003 0.060 14.72 5.3.15 0.013 0.067 14.57 5.3.14 0.007 0.077 14.57 5.3.13 0.013 0.063 14.59 5.3.12 0.003 0.050 14.59 5.3.11 0.013 0.063 14.70 5.3.10 0.003 0.053 14.06 5.3.9 0.013 0.067 14.10 5.3.8 0.010 0.050 14.07 5.3.7 0.010 0.067 14.02 5.3.6 0.010 0.060 14.05 5.3.5 0.007 0.073 13.96 5.3.4 0.003 0.037 14.01 5.3.3 0.003 0.050 14.01 5.3.2 0.003 0.037 13.70 5.3.1 0.000 0.080 13.65 5.3.0 0.010 0.067 13.61
preferences:dark mode live preview
137.02 ms | 1398 KiB | 8 Q