require_once('phplib/phplib.php'); require_once('common.php'); check_admin(); $db = mdb2_open($dsn); $herinfo = get_herinfo($db); $moment_id = mdb2_single_val($db, "SELECT moment_id FROM moments WHERE moment_id = %i", $_GET['moment_id']); if (!$moment_id) error_system("invalid moment_id"); if (isset($_GET['period_id'])) $period_id = $_GET['period_id']; else $period_id = $herinfo['period_id']; $momentlocation_id = NULL; if (isset($_GET['momentlocation_id'])) { $momentlocation = mdb2_single_assoc($db, "SELECT * FROM momentlocations WHERE momentlocation_id = %i", $_GET['momentlocation_id']); //print_r($momentlocation); if (!isset($momentlocation['momentlocation_id']) || !array_key_exists('momentlocation_lokaal', $momentlocation) || !array_key_exists('momentlocation_surveillant', $momentlocation)) error_system("edit niet-bestaand momentlocation?!?!?"); $momentlocation_id = $momentlocation['momentlocation_id']; } else { $momentlocation['momentlocation_lokaal'] = ''; $momentlocation['momentlocation_surveillant'] = ''; } html_start(); ?>