4 * welcome.TU.code Anmeldesystem.
5 * by Jan Vales <jan@jvales.net> (aka. Someone <someone@somenet.org>)
8 require_once('./funcs.php');
11 $status = store_person();
12 $person = get_person($_REQUEST['id']);
14 if(isset($_REQUEST['api'])){
15 header('Content-Type: application/json');
16 header('Access-Control-Allow-Origin: *');
17 mb_internal_encoding('UTF-8');
18 $send['status'] = $status;
19 $send['person'] = $person;
20 exit(json_encode($send));
23 echo html_top("Person bearbeiten");
24 echo "<h1>Person bearbeiten</h1>";
26 if($status == 1 && isset($_REQUEST['delete'])){
27 echo '<h2>Person gelöscht</h2>';
28 }elseif($status == 1 && isset($_REQUEST['save'])){
29 echo '<h2>Person aktualisiert</h2>';
31 echo '<h2>Person angelegt. ID:'.-$status.'</h2>';
34 <p><a href="list.php">Zurück zur Übersicht</a></p>
35 <form method="post" enctype="multipart/form-data">
36 <input type="submit" name="save" value="Speichern"> <input type="submit" name="delete" value="Löschen">
39 <input type="text" name="vname" value="<?php echo $person['vname'];?>"></p>
41 <input type="text" name="nname" value="<?php echo $person['nname'];?>"></p>
43 <input type="text" name="gebdatum" value="<?php echo $person['gebdatum'];?>"></p>
45 <input type="text" name="nationaliaet" value="<?php echo $person['nationaliaet'];?>"></p>
46 <p>Sprachkenntnisse<br>
47 <input type="text" name="sprachen" value="<?php echo $person['sprachen'];?>"></p>
49 <input type="text" name="vorwissen" value="<?php echo $person['vorwissen'];?>"></p>
51 <input type="text" name="analphabet" value="<?php echo $person['analphabet'];?>"></p>
53 <input type="text" name="fotoerlaubnis" value="<?php echo $person['fotoerlaubnis'];?>"></p>
55 <input type="text" name="videoerlaubnis" value="<?php echo $person['videoerlaubnis'];?>"></p>
56 <p>Besonderes/Bemerkungen<br>
57 <textarea rows="6" cols="50" name="bemerkungen"><?php echo $person['bemerkungen'];?></textarea></p>
59 <input type="submit" name="save" value="Speichern"> <input type="submit" name="delete" value="Löschen">
61 <p><a href="list.php">Zurück zur Übersicht</a></p>
63 <?php echo html_bottom(); ?>
68 <br>Comment or context:<br><textarea rows="3" cols="50" name="comment"></textarea><br>Hashtag, if needed:<br>
69 <input type="text" name="web_suffix"><br>
70 Image upload<br><input type="file" name="img"><br>
72 <input type="radio" id="imgtop" name="image_pos" value="1" checked="yes"><label for="imgtop">Top</label><br>
73 <input type="radio" id="imgbot" name="image_pos" value="2"><label for="imgbot">Bottom</label><br><br>
74 Comment for Admins/Mods:<br><textarea rows="3" cols="50" name="comment_intern"></textarea><br><br><input type="submit" name="submit" value="Submit"></form>';