<tr> <td width="65%" align="center"> <h1><?php echo $strPhpMyFamily; // MODIFICA 20120506 ?> </h1> <h3><?php echo $config->desc; ?> </h3> </td> <td width="35%" valign="top" align="right"> <form method="get" action="people.php"> <?php selectPeople("person"); ?> </form> <?php user_opts(); ?> </td> </tr> </table> <hr /> <?php //find out the state @($state = $_REQUEST["state"]); switch ($state) { case "lost": echo $strLost . "<br>\n";
<tr> <td width="65%" align="center"> <h1><?php echo $strPhpMyFamily; // MODIFICA 20120506 ?> </h1> <h3><?php echo $config->desc; ?> </h3> </td> <td width="35%" valign="top" align="right"> <form method="get" action="people.php"> <?php selectPeople("person", 0, "A", 0, 1, 0, 1); ?> </form> <p id="connected-count">? people are connected</p> </td> </tr> <tr> <td colspan="2" valign="top" align="right"> <?php user_opts(); // MODIFICA 20120508 ?> </td> </tr> </table>
function get_edit_form($per) { global $strNewMsg, $strTitle, $strName, $strFirstNames, $strLinkNames, $strLastName, $strAKA, $strSuffix, $strEvent, $strCauseDeath, $strGender, $strFaB, $strMale, $strFemale, $strMother, $strFather, $strNotes, $strSubmit, $strReset; $config = Config::getInstance(); if ($config->dojo) { ?> <script type="text/javascript"> dojo.addOnLoad(function() { var widget = dijit.byId('notes'); widget.name = 'frmNarrative'; dojo.connect(widget, 'onChange', function(){ widget.endEditing(); var desc = widget.getValue(); var stext = dojo.byId('frmNarrative'); stext.value = desc; }); }); </script><?php } $mid = 0; $fid = 0; $gender = "M"; if (isset($_REQUEST["fid"])) { $fid = $_REQUEST["fid"]; } else { $fid = $per->father->person_id; } if (isset($_REQUEST["mid"])) { $mid = $_REQUEST["mid"]; } else { $mid = $per->mother->person_id; } if (isset($_REQUEST["gender"])) { $gender = $_REQUEST["gender"]; } else { $gender = $per->gender; } if (!isset($per->person_id)) { ?> <b><?php echo $strNewMsg; ?> </b><br /> <?php } ?> <form method="post" action="passthru.php?area=people&func=edit"> <?php if (isset($per->person_id)) { ?> <input type="hidden" name="person" value="<?php echo $per->person_id; ?> " /> <?php } if (isset($_REQUEST["cid"])) { $cid = $_REQUEST["cid"]; ?> <input type="hidden" name="frmChild" value="<?php echo $cid; ?> " /> <?php } ?> <table> <tr> <td class="tbl_odd"><?php echo $strName; ?> </td> <td class="tbl_even"> <table><tr><th><?php echo $strTitle; ?> </th> <th><?php echo $strFirstNames; ?> </th> <th><?php echo $strLinkNames; ?> </th> <th><?php echo $strLastName; ?> </th> <th><?php echo $strSuffix; ?> </th></tr> <tr> <td><input type="text" name="frmTitle" value="<?php echo $per->name->title; ?> " size="5" maxlength="20" /></td> <td><input type="text" name="frmForenames" value="<?php echo $per->name->forenames; ?> " size="30" maxlength="50" /></td> <td><input type="text" name="frmLink" value="<?php echo $per->name->link; ?> " size="5" maxlength="10" /></td> <td><input type="text" name="frmSurname" value="<?php echo $per->name->surname; ?> " size="20" maxlength="20" /></td> <td><input type="text" name="frmSuffix" value="<?php echo $per->name->suffix; ?> " size="10" maxlength="20" /></td> </tr></table> </td> </tr> <tr> <td class="tbl_odd"><?php echo $strAKA; ?> </td> <td class="tbl_even"><input type="text" name="frmAKA" value="<?php echo $per->name->knownas; ?> " size="30" maxlength="10" /></td> </tr> <tr> <td class="tbl_odd"><?php echo $strCauseDeath; ?> </td> <td class="tbl_even" colspan="2"><input type="text" name="frmDeathReason" value="<?php echo $per->death_reason; ?> " size="30" maxlength="50" /></td> </tr> <tr> <td class="tbl_odd"><?php echo $strGender; ?> </td> <td class="tbl_even" colspan="2"><input type="radio" name="frmGender" value="M" <?php if ($gender != "F") { echo 'checked="checked" '; } ?> /><?php echo $strMale; ?> <input type="radio" name="frmGender" value="F" <?php if ($gender == "F") { echo 'checked="checked" '; } ?> /><?php echo $strFemale; ?> </td> </tr> <?php $bDate = '0000-00-00'; if (isset($per->date_of_birth)) { $bDate = $per->date_of_birth; } ?> <tr> <td class="tbl_odd"><?php echo $strMother; ?> </td> <td class="tbl_even" colspan="2"><?php selectPeople("frmMother", $per->person_id, "F", $mid, 0, $bDate); ?> </td> </tr> <tr> <td class="tbl_odd"><?php echo $strFather; ?> </td> <td class="tbl_even" colspan="2"><?php selectPeople("frmFather", $per->person_id, "M", $fid, 0, $bDate); ?> </td> </tr> <tr> <td class="tbl_odd"><?php echo $strFaB; ?> </td> <td class="tbl_even" colspan="2"> <table><tr><?php showAttendeeHeaderFields(BIRTH_EVENT); ?> </tr><tr><?php $birthEvent = null; if ($per->events) { foreach ($per->events as $e) { if ($e->type == BIRTH_EVENT) { $birthEvent = $e; } } } if ($birthEvent != null) { if (count($birthEvent->attendees) == 0) { $birthEvent->attendees = array(); $birthEvent->attendees[] = new Attendee(); $birthEvent->attendees[0]->person->person_id = $fid; } foreach ($birthEvent->attendees as $a) { if ($a->person->person_id == $fid) { showAttendeeEditCols($a, BIRTH_EVENT); } } } else { $a = new Attendee(); showAttendeeEditCols($a, BIRTH_EVENT); } ?> </tr></table></td> </tr> <tr> <td class="tbl_odd" valign="top"><?php echo $strNotes; ?> </td> <td colspan="2" class="tbl_even"><?php if ($config->dojo) { ?> <input type="hidden" name="frmNarrative" id="frmNarrative"/> <div id="notes" dojoType="dijit.Editor" minHeight="5em" plugins="['undo', 'redo', 'cut', 'copy', 'paste', '|', 'bold', 'italic', 'underline', 'strikethrough', 'subscript', 'superscript', '|', 'removeFormat', 'indent', 'outdent', 'justifyCenter', 'justifyFull', 'justifyLeft', 'justifyRight', 'delete', 'insertOrderedList', 'insertUnorderedList', 'createLink', 'foreColor','hiliteColor']"> <?php echo $per->narrative; ?> </div> <?php } else { ?> <textarea name="frmNarrative" id="frmNarrative" rows="10" cols="80"><?php echo $per->narrative; ?> </textarea> <?php } ?> </td> </tr> <tr> <td colspan="3"> <table> <tr><th></th><?php showEventHeaderFields(); ?> </tr> <?php $events = array($birthEvent, null, null, null); if ($per->events) { foreach ($per->events as $e) { $events[$e->type] = $e; echo "<tr><td>" . $strEvent[$e->type] . "</td>"; ?> <input type="hidden" name="<?php echo $strEvent[$e->type]; ?> etype" value="<?php echo $e->type; ?> " /></td><?php showEventEditCols($e, $e->type, $strEvent[$e->type]); echo "</tr>"; } } for ($i = 0; $i < 4; $i++) { if (!isset($events[$i]) && $events[$i] == null) { $e = new Event(); $e->type = $i; $e->person->person_id = $per->person_id; echo "<tr><td>" . $strEvent[$e->type]; ?> <input type="hidden" name="<?php echo $strEvent[$e->type]; ?> etype" value="<?php echo $e->type; ?> " /></td><?php showEventEditCols($e, $e->type, $strEvent[$e->type]); echo "</tr>"; } } ?> </table> </td> </tr> <tr> <td class="tbl_even"><input type="submit" name="Submit1" value="<?php echo $strSubmit; ?> " /></td> <td class="tbl_even"><input type="RESET" name="Reset1" value="<?php echo $strReset; ?> " /></td> </tr> </table> </form> <?php }
dojo.require("dijit.TitlePane"); <?php break; } ?> --> </script> <!--titles--> <?php user_opts($per->person_id); ?> <form method="get" action="people.php"> <?php selectPeople("person", 0, "A", $per->person_id); ?> </form> <hr /> <div id="options"> <ul> <?php if ($per->isEditable()) { ?> <li><a href="edit.php?func=edit&area=people&person=<?php echo $per->person_id; ?> "><?php echo $strEdit;
function get_edit_form($rel) { global $strSpouse, $strMarriageCert, $strSubmit, $strReset, $strDateFmt; global $strDivorce, $strDate, $strEvent, $strEdit, $strDesc; ?> <!--Fill out form --> <form method="post" action="passthru.php?area=relations"> <input type="hidden" name="person" value="<?php echo $rel->person->person_id; ?> " /> <input type="hidden" name="oldSpouse" value="<?php echo $rel->relation->person_id; ?> " /> <input type="hidden" name="frmGender" value="<?php echo $rel->person->gender; ?> " /> <table> <tr> <td class="tbl_odd"><?php echo $strSpouse; ?> </td> <td colspan="2" class="tbl_even"><?php if ($rel->person->gender == "M") { $gen = "F"; } else { $gen = "M"; } selectPeople("frmSpouse", $rel->person->person_id, $gen, $rel->relation->person_id, 0, $rel->marriage_date); ?> </td> </tr> <tr> <td class="tbl_odd"><?php echo $strDivorce . " " . $strDate; ?> </td> <?php $mDate = '0000-00-00'; if (isset($rel->dissolve_date)) { $mDate = $rel->dissolve_date; } ?> <td class="tbl_even"><input type="text" name="frmDissolveDate" value="<?php echo $mDate; ?> " size="15" maxlength="10" /> <input type="hidden" name="frmDissolveReason" value="0" /> </td> <td><?php echo $strDateFmt; ?> </td> </tr> <tr> <td colspan="3"> <table> <tr><th></th><?php showEventHeaderFields(); ?> </tr> <tr><td> <select name="etype"> <option value="<?php echo BANNS_EVENT; ?> " <?php if ($rel->event->type == BANNS_EVENT) { echo ' selected="selected"'; } ?> ><?php echo $strEvent[BANNS_EVENT]; ?> </option> <option value="<?php echo MARRIAGE_EVENT; ?> " <?php if ($rel->event->type == MARRIAGE_EVENT) { echo ' selected="selected"'; } ?> ><?php echo $strEvent[MARRIAGE_EVENT]; ?> </option> </select> </td><?php showEventEditCols($rel->event, ''); ?> </tr></table></td> </tr> <tr> <td class="tbl_even" colspan="3"> <?php $people = array($rel->person); if ($rel->relation->person_id > 0) { $people[] = $rel->relation; } for ($i = 0; $i < 2; $i++) { $p = $people[$i]; if (isset($people[$i])) { if (isset($p->father->person_id) && $p->father->person_id > 0 && $p->father->isEditable()) { $people[] = $p->father; } if (isset($p->mother->person_id) && $p->mother->person_id > 0 && $p->father->isEditable()) { $people[] = $p->mother; } } } attendeeEditTable($rel->event, MARRIAGE_EVENT, $people); ?> </td> </tr> <tr> <td class="tbl_even"><input type="submit" name="Submit1" value="<?php echo $strSubmit; ?> " /></td> <td colspan="2" class="tbl_even"><input type="reset" name="Reset1" value="<?php echo $strReset; ?> " /></td> </tr> </table> </form> <?php echo '<div id="image"><a href="edit.php?func=edit&area=event&event=' . $rel->event->event_id . '">' . $strEdit . ' ' . $strDesc . '</a></div>'; }
function get_edit_form($per) { global $strEvent, $strSubmit, $strReset, $strDate, $strPlace, $strSource, $strReference, $strNotes, $strDateFmt; $config = Config::getInstance(); $prefix = ''; if ($config->dojo) { ?> <script type="text/javascript"> dojo.addOnLoad(function() { var widget = dijit.byId('notes'); widget.name = '<?php echo $prefix; ?> notes'; dojo.connect(widget, 'onChange', function(){ widget.endEditing(); var desc = widget.getValue(); var stext = dojo.byId('<?php echo $prefix; ?> notes'); stext.value = desc; }); }); </script><?php } $event = $per->events[0]; ?> <form method="post" action="passthru.php?area=event&func=edit"> <input type="hidden" name="<?php echo $prefix; ?> event_id" value="<?php echo $event->event_id; ?> " /> <input type="hidden" name="<?php echo $prefix; ?> person" value="<?php echo $per->person_id; ?> " /> <input type="hidden" name="<?php echo $prefix; ?> etype" value="<?php if ($event->type < 0) { echo OTHER_EVENT; } else { echo $event->type; } ?> " /> <table> <tr><td colspan="2"> <table> <tr><td class="tbl_even"></td><td class="tbl_even"> <?php echo $strEvent[$event->type]; ?> </td><td class="tbl_even"><input type="text" name="<?php echo $prefix; ?> descrip" value="<?php echo $event->descrip; ?> " size="45" maxlength="45"/></td></tr> <tr><td class="tbl_odd"><?php echo $strDate; ?> </td><td style="white-space:nowrap;" class="tbl_odd"> <?php dateModifierSelect($prefix . 'd1type', $event->date1_modifier); $bDate = '0000-00-00'; if (isset($event->date1)) { $bDate = $event->date1; } ?> </td><td class="tbl_odd"> <input type="text" name="<?php echo $prefix; ?> date1" value="<?php echo $bDate; ?> " size="10" /><br/> <?php echo $strDateFmt; ?> </td> <tr><td class="tbl_even"><?php echo $strPlace; ?> </td><td colspan="2"><?php selectPlace($prefix, $event->location); ?> </td></tr> <tr><td class="tbl_even"><?php echo $strSource; ?> </td><td colspan="2"><?php $dao = getSourceDAO(); $dao->getEventSources($event); $sp = "a"; if ($event->numResults > 0) { foreach ($event->results as $source) { selectSource($sp . "_" . $prefix, $source); $sp++; echo "<br/>"; } } $source = new Source(); selectSource($sp . "_" . $prefix, $source, $event); ?> </td></tr> <tr><td class="tbl_even"><?php echo $strNotes; ?> </td><td class="tbl_even" colspan="2"><?php if ($config->dojo) { ?> <input type="hidden" name="<?php echo $prefix; ?> notes" id="<?php echo $prefix; ?> notes"/> <div id="notes" dojoType="dijit.Editor" minHeight="5em" plugins="['undo', 'redo', 'cut', 'copy', 'paste', '|', 'bold', 'italic', 'underline', 'strikethrough', 'subscript', 'superscript', '|', 'removeFormat', 'indent', 'outdent', 'justifyCenter', 'justifyFull', 'justifyLeft', 'justifyRight', 'delete', 'insertOrderedList', 'insertUnorderedList', 'createLink', 'foreColor','hiliteColor']"> <?php echo $event->notes; ?> </div> <?php } else { ?> <textarea name="<?php echo $prefix; ?> notes" id="<?php echo $prefix; ?> notes" rows="10" cols="80"><?php echo $event->notes; ?> </textarea> <?php } ?> </td> </tr> <tr> <table><tr> <?php showAttendeeHeaderFields(MARRIAGE_EVENT); echo "</tr>"; if (count($event->attendees) == 0) { $event->attendees = array(); } $event->attendees[] = new Attendee(); $bDate = '0000-00-00'; if (isset($e->date1)) { $bDate = $e->date1; } $prefix = 'a'; foreach ($event->attendees as $a) { $show = false; if (isset($a->person->person_id) && $a->person->isEditable()) { echo "<tr><td>" . $a->person->getDisplayName() . " " . $a->person->getDates() . "</td>"; $show = true; } if (!isset($a->person->person_id)) { echo "<tr><td>"; selectPeople($prefix . "person_id", 0, "A", 0, 0, $bDate); echo "</td>"; $show = true; } if ($show) { showAttendeeEditCols($a, MARRIAGE_EVENT, $prefix); $prefix++; } echo "</tr>"; } ?> </tr> </table> </td> </tr> <tr> <td class="tbl_even" colspan="2"><input type="submit" name="Submit1" value="<?php echo $strSubmit; ?> " /> <input type="RESET" name="Reset1" value="<?php echo $strReset; ?> " /></td> </tr> </table> </form> <?php $ret = ""; echo get_image_create_string($per, $event->event_id); echo "<br/>"; show_gallery($per, $dest = "people", $event->event_id); }