<div class="row">
								<div class="col-md-4">
									<dl>
									  <dt>Birth Date</dt>
									  <dd><?php 
    echo birthdate($testi->ID);
    ?>
</dd>
									  <dt>Weight</dt>
									  <dd><?php 
    echo weight($testi->ID);
    ?>
</dd>
									  <dt>Height</dt>
									  <dd><?php 
    echo height($testi->ID);
    ?>
</dd>
									  <dt>Country</dt>
									  <dd><?php 
    echo country($testi->ID);
    ?>
</dd>
									  <dt>Shaft</dt>
									  <dd><?php 
    echo shaft($testi->ID);
    ?>
</dd>
									</dl>
								</div>
								<div class="col-md-8">
function interpole_height($x, $y)
{
    $basex = floor($x);
    // component x en la graella
    $basey = floor($y);
    // component y en la graella
    $dx = $x - $basex;
    // desplaçament x dins la cel.la
    $dy = $y - $basey;
    // desplaçament y dins la cel.la
    $p1 = height($basex, $basey);
    $p2 = height($basex + 1, $basey);
    $p3 = height($basex, $basey - 1);
    $p4 = height($basex + 1, $basey - 1);
    // alçades dels 4 punts + propers
    $a = ($p1 + $p2 + $p3 + $p4) / 4;
    $b = ($p1 * -1 + $p2 + $p3 * -1 + $p4) / 4;
    $c = ($p1 * -1 + $p2 * -1 + $p3 + $p4) / 4;
    // càlcul de paràmetres per l'equació del plà
    $dx = $dx * 2 - 1;
    $dy = $dy * 2 - 1;
    $z = $a + $b * $dx + $c * $dy;
    // substitucio i calcul de l'alçada
    return $z;
}
Exemple #3
0
    }
    ?>
            <?php 
}
?>

            <?php 
for ($i = 5 * 60; $i < 200 * 60; $i += 5 * 60) {
    ?>

            .dur<?php 
    echo $i;
    ?>
 {
                height: <?php 
    echo height($i, $minuteHeight);
    ?>
;
            }

            <?php 
    if ($i <= 35 * 60) {
        ?>
            .dur<?php 
        echo $i;
        ?>
 .details {
                margin-top: 0.5em;
            }

            <?php