* Copyright (C) 2006-2011 by Leif B. Kristensen <*****@*****.**> * * All rights reserved. For terms of use, see LICENSE.txt * ***************************************************************************/ require "../settings/settings.php"; require_once "../langs/{$language}.php"; require "../functions.php"; require "./forms.php"; if (!isset($_POST['posted'])) { // do form $person = $_GET['person']; $event = $_GET['event']; $node = $_GET['node']; $title = "{$_Edit_event} #{$event}"; require "./form_header.php"; echo "<h2>{$title}</h2>\n"; $note = note_from_db(fetch_val("SELECT COALESCE(\n (SELECT part_note\n FROM participant_notes\n WHERE person_fk={$person} AND event_fk={$event}), '')")); $notelen = strlen($note); $notelen < 1000 ? $note_height = 10 : ($note_height = 20); $note_width = 80; form_begin('edit_event', $_SERVER['PHP_SELF']); hidden_input('person', $person); hidden_input('event', $event); hidden_input('node', $node); hidden_input('posted', 1); textarea_input("{$_Text}:<br />{$notelen}", $note_height, $note_width, 'note', $note); form_submit(); form_end(); echo "<h3>{$_Citations}</h3>\n"; $handle = pg_query("SELECT source_fk FROM event_citations WHERE event_fk = {$event}"); while ($row = pg_fetch_row($handle)) { echo '<p>' . $row[0] . ' ';
* All rights reserved. For terms of use, see LICENSE.txt * ***************************************************************************/ require "../settings/settings.php"; require_once "../langs/{$language}.php"; require "../functions.php"; require "./forms.php"; if (!isset($_POST['posted'])) { // do form $event = $_GET['event']; $person = $_GET['person']; $name = get_name($person); $title = "{$_Edit_event} #{$event} ({$_person} #{$person} {$name})"; require "./form_header.php"; echo "<h2>{$title}</h2>\n"; $rec = fetch_row_assoc("SELECT tag_fk, place_fk, event_date, date2text(sort_date) AS sd, event_note\n FROM events WHERE event_id = {$event}"); $note = note_from_db($rec['event_note']); $notelen = strlen($note); $notelen < 1000 ? $note_height = 5 : ($note_height = 20); $note_width = 100; form_begin('edit_event', $_SERVER['PHP_SELF']); hidden_input('person', $person); hidden_input('event', $event); hidden_input('posted', 1); select_tag($rec['tag_fk'], $person, $event); select_place($rec['place_fk']); date_input($rec['event_date'], $rec['sd']); textarea_input("{$_Text}:<br />{$notelen}", $note_height, $note_width, 'event_note', $note); source_input(); text_input("{$_Age}:", 10, 'age', '', "({$_Adds_birth_event})"); form_submit(); form_end();