?> </td> <td><?php echo $record['final_date']; ?> </td> </tr> <?php } ?> </tbody> </table> <?php $bio_form = generate_formarray('biographic_details', 'view'); $bio = new BiographicDetail(); foreach ($biographics as $key => $record) { echo '<br /><h3>' . ++$key . '. ' . _t('PERSON_NAME') . ' : ' . $record['person_name'] . '</h3><br />'; //print victim details $person->LoadFromRecordNumber($record['related_person']); $person->LoadRelationships(); $bio->LoadFromRecordNumber($record['biographic_details_record_number']); $bio->LoadRelationships(); popuate_formArray($bio_form, $bio); shn_form_get_html_labels($bio_form, false); echo '<br />'; } foreach ($biographics_reverse as $key => $record) { echo '<br /><h3>' . ++$key . '. ' . _t('PERSON_NAME') . ' : ' . $record['person_name'] . '</h3><br />'; //print victim details $person->LoadFromRecordNumber($record['person']);
function act_edit_biography() { include_once APPROOT . 'inc/lib_form_util.inc'; include_once APPROOT . 'inc/lib_uuid.inc'; $biography_form = biographic_form('edit'); $this->pid = isset($_GET['pid']) && $_GET['pid'] != null ? $_GET['pid'] : $_SESSION['pid']; if ($this->pid != null) { $person_form = person_form('new'); $this->person_form = $person_form; $this->person = $this->person_information($this->pid, $this->person_form); $_SESSION['ppid'] = $this->pid; } if (isset($_GET['biography_id'])) { set_url_args('biography_id', $this->biographic_details->biographic_details_record_number); popuate_formArray($biography_form, $this->biographic_details); $this->biography_form = $biography_form; } if (isset($_POST['save'])) { $this->pid = $_SESSION['ppid']; $status = shn_form_validate($biography_form); if ($status) { if ($_POST['biographic_details_record_number'] == '') { $_POST['biographic_details_record_number'] = shn_create_uuid('biography'); } $_GET['pid'] = $_SESSION['ppid']; $biography = new BiographicDetail(); $biography->LoadfromRecordNumber($_POST['biographic_details_record_number']); $biography->biographic_details_record_number = $_POST['biographic_details_record_number']; form_objects($biography_form, $biography); $biography->person = $_SESSION['ppid']; if ($biography->related_person == '') { $biography->related_person = null; } $biography->SaveAll(); $_GET['pid'] = null; $_GET['bid'] = $_POST['biographic_details_record_number']; $this->biography_list($_SESSION['ppid']); $_SESSION['pid'] = $_SESSION['ppid']; set_redirect_header('person', 'biography_list', null, array('biography_id' => $biography->biographic_details_record_number, 'type' => 'bd')); } } }