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