(aka. Someone ) */ require_once('./settings.php'); require_once('./db_funcs.php'); function login(){ // if(!isset($_SERVER['HTTPS'])){ // $url = 'https://'.$_SERVER["HTTP_HOST"].$_SERVER['REQUEST_URI']; // header('Location: '.$url, true, 301); // exit('

Redirecting to: '.$url.'

'); // } $uinfo = db_get_uinfo($_SERVER['PHP_AUTH_USER'], $_SERVER['PHP_AUTH_PW']); if($uinfo['lvl'] >= 1){ $GLOBALS['uname'] = $uinfo['uname']; $GLOBALS['lvl'] = $uinfo['lvl']; }else{ header('WWW-Authenticate: Basic realm="WelcomeTUcode login"'); header('HTTP/1.0 401 Unauthorized'); exit('Nicht eingeloggt. Falsche Anmeldedaten?'); } } function list_anmeldungen(){ $liste = db_list_anmeldungen(); $ret = ''. ''."\n"; foreach ($liste as &$person) { $ret .=''. ''. ''. ''."\n"; /* echo '
'.$person['vname'].'
'.$person['nname'].'
'.$person['gebdatum'].'
'.$person['nationaliaet'].'
'.$person['sprachen'].'
'.$person['vorwissen'].'
'.$person['analphabet'].'
'.$person['fotoerlaubnis'].'
'.$person['videoerlaubnis'].'
'.$person['bemerkungen'].'
';*/ } return $ret.'
AktionidAnmeldung beiNachname(n)Vorname(n)GeborenNationalitätSprachkenntnisVorwissenAnalphabetfotoerlaubnisVideoerlaubnisBemerkung
Bearbeiten'.$person['id'].''.$person['uname'].''.$person['nname'].''.$person['vname'].''.$person['gebdatum'].''.$person['nationaliaet'].''.$person['sprachen'].''.$person['vorwissen'].''.$person['analphabet'].''.$person['fotoerlaubnis'].''.$person['videoerlaubnis'].''.$person['bemerkungen'].'
'."\n"; } function store_person(){ if(!isset($_REQUEST['delete']) && !isset($_REQUEST['save'])) return 0; //var_export($_REQUEST); if(isset($_REQUEST['delete']))return db_delete_person($_REQUEST['id']); if(isset($_REQUEST['save'])){ if(!isset($_REQUEST['vname']))return '-vname- not set!'; $pdata['vname']=$_REQUEST['vname']; if(!isset($_REQUEST['nname']))return '-nname- not set!'; $pdata['nname']=$_REQUEST['nname']; if(!isset($_REQUEST['gebdatum']))return '-gebdatum- not set!'; $pdata['gebdatum']=$_REQUEST['gebdatum']; if(!isset($_REQUEST['nationaliaet']))return '-nationaliaet- not set!'; $pdata['nationaliaet']=$_REQUEST['nationaliaet']; if(!isset($_REQUEST['sprachen']))return '-sprachen- not set!'; $pdata['sprachen']=$_REQUEST['sprachen']; if(!isset($_REQUEST['vorwissen']))return '-vorwissen- not set!'; $pdata['vorwissen']=$_REQUEST['vorwissen']; if(!isset($_REQUEST['analphabet']))return '-analphabet- not set!'; $pdata['analphabet']=$_REQUEST['analphabet']; if(!isset($_REQUEST['fotoerlaubnis']))return '-fotoerlaubnis- not set!'; $pdata['fotoerlaubnis']=$_REQUEST['fotoerlaubnis']; if(!isset($_REQUEST['videoerlaubnis']))return '-videoerlaubnis- not set!'; $pdata['videoerlaubnis']=$_REQUEST['videoerlaubnis']; if(!isset($_REQUEST['bemerkungen']))return '-bemerkungen- not set!'; $pdata['bemerkungen']=$_REQUEST['bemerkungen']; return db_store_person($_REQUEST['id'], $pdata); } } function get_person($id){ if(!is_numeric($id)) return NULL; return db_get_person($id); } function html_top($title = ""){ return << $title EOF; } function html_bottom(){ return << EOF; }