当前位置: 首页>>代码示例>>PHP>>正文


PHP Family::printSingleFinder方法代码示例

本文整理汇总了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 
        }
    }
开发者ID:samrae,项目名称:jethro-pmm,代码行数:93,代码来源:view_0_move_person_to_family.class.php


注:本文中的Family::printSingleFinder方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。