コード例 #1
0
ファイル: editForm.php プロジェクト: redbugz/rootstech2013
function get_edit_form($trans)
{
    global $strFUpload, $strFTitle, $strDesc, $strSubmit, $strEdit, $strSource;
    ?>
<!--Fill out the form-->
<form enctype="multipart/form-data" method="post" action="passthru.php?func=insert&amp;area=transcript">
<input type="hidden" name="person" value="<?php 
    echo $trans->person->person_id;
    ?>
" />
<?php 
    if (isset($trans->transcript_id)) {
        ?>
<input type="hidden" name="transcript_id" value="<?php 
        echo $trans->transcript_id;
        ?>
" />
<?php 
    }
    ?>
	<table>
	<?php 
    if (!isset($trans->transcript_id)) {
        $tdate = "0000-00-00";
        ?>
		<tr>
			<td class="tbl_odd"><?php 
        echo $strFUpload;
        ?>
</td>
			<td class="tbl_even"><input type="file" name="userfile" /></td>
		</tr>
	<?php 
    } else {
    }
    ?>
		<tr>
			<td class="tbl_odd"><?php 
    echo $strFTitle;
    ?>
</td>
			<td class="tbl_even"><input type="text" name="frmTitle" size="30" maxlength="30" value="<?php 
    echo $trans->title;
    ?>
"/></td>
		</tr>
		<tr>
			<td class="tbl_odd"><?php 
    echo $strSource;
    ?>
</td>
			<td class="tbl_even"><?php 
    selectSource("", $trans->source, $trans->event);
    ?>
</td>
		</tr>		
		<tr>
			<td class="tbl_even"><input type="submit" name="Submit1" value="<?php 
    echo $strSubmit;
    ?>
" /></td>
			<td class="tbl_even"></td>
		</tr>
	</table>
</form>
<?php 
    if (isset($trans->transcript_id)) {
        echo '<div id="trans"><a href="edit.php?func=edit&amp;area=event&amp;event=' . $trans->event->event_id . '">' . $strEdit . ' ' . $strDesc . '</a></div>';
    }
}
コード例 #2
0
ファイル: show.php プロジェクト: redbugz/rootstech2013
function showEventEditCols($event, $type = 0, $prefix = '', $class = 'tbl_even')
{
    global $strDateFmt;
    ?>
	
	<td class="<?php 
    echo $class;
    ?>
">
		<input type="hidden" name="<?php 
    echo $prefix;
    ?>
event_id" value="<?php 
    echo $event->event_id;
    ?>
" />
		<input type="hidden" name="<?php 
    echo $prefix;
    ?>
person_id" value="<?php 
    echo $event->person->person_id;
    ?>
" />
		<?php 
    if ($type != CENSUS_EVENT) {
        dateModifierSelect($prefix . 'd1type', $event->date1_modifier);
        echo "</td><td class=\"" . $class . "\">";
        $bDate = '0000-00-00';
        if (isset($event->date1)) {
            $bDate = $event->date1;
        }
        ?>
		
		<input type="text" name="<?php 
        echo $prefix;
        ?>
date1" value="<?php 
        echo $bDate;
        ?>
" size="30" /><br/>
			<?php 
        echo $strDateFmt;
        ?>
</td>
		<td class="<?php 
        echo $class;
        ?>
">
		<?php 
    }
    //!= census event
    ?>
		<?php 
    selectPlace($prefix, $event->location);
    ?>
		</td>
		<td class="<?php 
    echo $class;
    ?>
"><?php 
    $dao = getSourceDAO();
    $dao->getEventSources($event);
    $sp = "a";
    if ($event->numResults > 0) {
        foreach ($event->results as $source) {
            selectSource($sp . "_" . $prefix, $source, $event);
            $sp++;
        }
    }
    //Always add a blank one
    $source = new Source();
    selectSource($sp . "_" . $prefix, $source, $event);
    ?>
		</td>
		<td class="<?php 
    echo $class;
    ?>
"><input type="text" name="<?php 
    echo $prefix;
    ?>
notes" value="<?php 
    echo $event->notes;
    ?>
" size="30" /></td>
		<?php 
}
コード例 #3
0
ファイル: editForm.php プロジェクト: redbugz/rootstech2013
function get_edit_form($img)
{
    global $strIUpload, $strITitle, $strISize, $strSubmit, $strEdit, $strDesc, $strSource;
    ?>
<!--Fill out the form-->
<form enctype="multipart/form-data" method="post" action="passthru.php?func=insert&amp;area=image">
<input type="hidden" name="person" value="<?php 
    echo $img->person->person_id;
    ?>
" />
<?php 
    if (isset($img->image_id) && $img->image_id > 0) {
        $existing = true;
    } else {
        $existing = false;
    }
    if ($existing) {
        ?>
<input type="hidden" name="image_id" value="<?php 
        echo $img->image_id;
        ?>
" />
<input type="hidden" name="event_id" value="<?php 
        echo $img->event->event_id;
        ?>
" />
<?php 
    }
    ?>
<input type="hidden" name="MAX_FILE_SIZE" value="1048576">
	<table>
	<?php 
    if (!$existing) {
        ?>
		<tr>
			<td class="tbl_odd"><?php 
        echo $strIUpload;
        ?>
</td>
			<td class="tbl_even"><input type="file" name="userfile" /></td>
			<td><?php 
        echo $strISize;
        ?>
</td>
		</tr>
	<?php 
    }
    ?>
		<tr>
			<td class="tbl_odd"><?php 
    echo $strSource;
    ?>
</td>
			<td class="tbl_even"><?php 
    selectSource("", $img->source, $img->event);
    ?>
</td>
		</tr>
		<tr>
			<td class="tbl_odd"><?php 
    echo $strITitle;
    ?>
</td>
			<td class="tbl_even"><input type="text" name="frmTitle" size="30" maxlength="30" value="<?php 
    echo $img->title;
    ?>
" /></td>
		</tr>
		<tr>
			<td class="tbl_even"><input type="submit" name="Submit1" value="<?php 
    echo $strSubmit;
    ?>
" /></td>
			<td class="tbl_even"></td>
		<tr>
	</table>
</form>
<?php 
    if ($existing) {
        echo '<div id="image"><a href="edit.php?func=edit&amp;area=event&amp;event=' . $img->event->event_id . '">' . $strEdit . ' ' . $strDesc . '</a></div>';
    }
}
コード例 #4
0
ファイル: editForm.php プロジェクト: redbugz/rootstech2013
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() . "&nbsp;" . $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);
}