Time
By: Xmoo | Date: Oct 29 2008 19:52 | Format: PHP | Expires: never | Size: 2.45 KB | Hits: 1188
- <?php
- if($_GET['p'] == 'ziekmelden') {
- switch($_GET['a']) {
- case 'zoeken':
- echo "Hier kun je je ziek melden.<br><br>
- <form action='?p=ziekmelden&a=zoeken' method='post'>Personeel nummer: <input type='text' name='pid' id='pid' size='40'>
- <input type='submit' name='submit' value='Meld me ziek!'>
- </form>";
- $sql = "SELECT pid,name FROM care_personell WHERE pid = '$pid'";
- echo "<b>Personeel nummer: - Naam:</b>";
- echo "$pid - $name <a href=?p=ziekenhuis&a=toevoegen&pid=$pid&name=$name><img src='images/plus.gif></a>'";
- }
- break;
- case 'toevoegen':
- $pid = $_GET['pid'];
- $name = $_GET['name'];
- $insert = "INSERT INTO ziekmelding_personeel (pid, name, datum, tijd, ziek, opmerking)
- values ('". $_POST["pid"] ."', '". $_POST["name"] ."', '". $_POST["datum"] ."', '". $_POST["tijd"] ."', '". $_POST["ziek"] ."', '". $_POST["opmerking"] .")";
- echo "<font face=verdana size=2 color=green>U ben met succes ziek gemeld. Beterschap!</font>";
- }
- else {
- echo "<form action='?p=ziekmelden&a=toevoegen' method='post'>";
- echo "<b>Personeel nummer</b>: <input type='text' name='pid' size='49' value='$pid' READONLY/><br>";
- echo "<b>Naam</b>: <input type='text' name='name' size='49' value='$name' READONLY/><br>";
- echo "<b>Datum</b>: <input type='text' name='name' size='49' value='date("d-m-Y")' READONLY/><br>";
- echo "<b>Tijd</b>: <input type='text' name='name' size='49' value='date("H:i")' READONLY/><br>";
- echo "<b>Opmerking</b>: <input type='text' name='opmerking' size='49' value=''/><br>";
- echo "<b>Ziek</b>: <input type='checkbox' name='ziek' value='1'><br><br>";
- echo "<center><input type='submit' name='submit' value='Meld me ziek!'></center></form>";
- }
- break;
- case 'lijst':
- echo "<b>Personeel nr - Naam - Opmerking</b><br>";
- $sql = "SELECT * FROM ziekmelding_personeel WHERE ziek = '1'";
- echo "$pid $name $opmerking";
- }
- }
- ?>
Latest pastes
1 days ago
2 days ago
4 days ago
6 days ago
6 days ago