require_once('phplib/phplib.php'); require_once('common.php'); check_admin(); $db = mdb2_open($dsn); $herinfo = get_herinfo($db); if (isset($_GET['period_id'])) $period_id = $_GET['period_id']; else $period_id = $herinfo['period_id']; $moment_id = NULL; if (isset($_GET['moment_id'])) { $moment = mdb2_single_assoc($db, "SELECT * FROM moments WHERE period_id = %i AND moment_id = %i", $period_id, $_GET['moment_id']); //print_r($moment); if (!isset($moment['moment_id']) || !isset($moment['moment_date']) || !isset($moment['moment_time_start']) || !isset($moment['moment_time_end'])) error_system("edit niet-bestaand moment?!?!?"); $moment_id = $moment['moment_id']; } else { $moment['moment_date'] = ''; $moment['moment_time_start'] = ''; $moment['moment_time_end'] = ''; } html_start('$(function(){ $("#date").datepicker({ dateFormat: \'yy-mm-dd\', firstDay: 1 }); });'); ?>