本文整理匯總了PHP中Family::printSingleFinder方法的典型用法代碼示例。如果您正苦於以下問題:PHP Family::printSingleFinder方法的具體用法?PHP Family::printSingleFinder怎麽用?PHP Family::printSingleFinder使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Family
的用法示例。
在下文中一共展示了Family::printSingleFinder方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: printView
function printView()
{
$show_form = true;
if (!empty($_POST['move_to'])) {
if (!$this->_person->haveLock()) {
// lock expired
if ($this->_person->acquireLock()) {
// managed to reacquire lock - ask them to try again
?>
<div class="failure">Your changes could not be saved because your lock had expired. Try making your changes again using the form below</div>
<?php
$show_form = true;
} else {
// could not re-acquire lock
?>
<div class="failure">Your changes could not be saved because your lock has expired. The lock has now been acquired by another user. Wait some time for them to finish and then <a href="?view=_edit_person&personid=<?php
echo $this->_person->id;
?>
">try again</a></div>
<?php
$show_form = false;
}
} else {
// must have been some other problem
$show_form = true;
}
} else {
// hasn't been submitted yet
if (!$this->_person->acquireLock()) {
?>
<div class="failure">This person cannot currently be edited because another user has the lock. Wait some time for them to finish and then <a href="?view=_edit_person&personid=<?php
echo $this->_person->id;
?>
">try again</a></div>
<?php
$show_form = false;
}
}
if ($show_form) {
?>
<form method="post" class="form-horizontal">
<div class="control-group">
<label class="control-label">Current Family</label>
<div class="controls controls-text">
<?php
echo $this->_person->printFieldValue('familyid');
?>
</div>
</div>
<div class="control-group">
<label class="control-label">New Family</label>
<div class="controls">
<p class="radio-list">
<label class="radio inline">
<input type="radio" name="move_to" value="existing" />
Move to an existing family:
</label>
<?php
Family::printSingleFinder('familyid');
?>
</p>
<p class="radio-list">
<label class="radio">
<input type="radio" name="move_to" value="new" />
Create a new family containing only this person
<br />(Details will be copied from the old family)</span>
</label>
</p>
</div>
</div>
<div class="controls">
<button type="submit" class="btn">Go</button>
<a class="btn" href="?view=persons&personid=<?php
echo $this->_person->id;
?>
">Cancel</a>
</div>
</form>
<script type="text/javascript">
setTimeout('showLockExpiryWarning()', <?php
echo (strtotime('+' . LOCK_LENGTH, 0) - 60) * 1000;
?>
);
setTimeout('showLockExpiredWarning()', <?php
echo strtotime('+' . LOCK_LENGTH, 0) * 1000;
?>
);
</script>
<?php
}
}