38 lines
796 B
PHP
38 lines
796 B
PHP
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
|
<html xmlns="http://www.w3.org/1999/xhtml">
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
|
<title>JKA-Karate EM 2010</title>
|
|
</head>
|
|
|
|
<body>
|
|
|
|
<?php
|
|
|
|
//Freie Plätze einlesen:
|
|
|
|
//einlesen
|
|
$handle = fopen("frei.txt","r");
|
|
$a = fgets ( $handle , 4096 );
|
|
$b = fgets ( $handle , 4096 );
|
|
$c = fgets ( $handle , 4096 );
|
|
fclose ($handle);
|
|
|
|
//abziehen
|
|
$atemp= (int)$a-5;
|
|
$btemp= (int)$b-8;
|
|
$ctemp= (int)$c-9;
|
|
|
|
//schreiben
|
|
$handle = fopen("frei.txt","w");
|
|
fwrite($handle, $atemp);
|
|
fwrite($handle,"\n");
|
|
fwrite($handle, $btemp);
|
|
fwrite($handle,"\n");
|
|
fwrite($handle, $ctemp);
|
|
fclose ($handle);
|
|
|
|
|
|
?>
|
|
</body>
|
|
</html>
|