本文整理汇总了PHP中Teacher::getBlocked方法的典型用法代码示例。如果您正苦于以下问题:PHP Teacher::getBlocked方法的具体用法?PHP Teacher::getBlocked怎么用?PHP Teacher::getBlocked使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Teacher
的用法示例。
在下文中一共展示了Teacher::getBlocked方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: Log
} else {
if ($edit == 3) {
echo '<div class="alert alert-warning alert-dismissible" role="alert">';
echo '<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>';
echo 'Sorry, you don\'t have privilege to edit teacher\'s information.';
echo '</div>';
} else {
if ($edit == 1) {
$log = new Log();
if ($teach->getApproved() == 0 && Input::get('approved') == 1) {
$log->actionLog('Approved Teacher');
}
if ($teach->getApproved() == 1 && Input::get('approved') == 0) {
$log->actionLog('Disapproved Teacher');
}
if ($teach->getBlocked() == 1 && Input::get('blocked') == 0) {
$log->actionLog('Unblocked Teacher');
}
if ($teach->getBlocked() == 0 && Input::get('blocked') == 1) {
$log->actionLog('Blocked Teacher');
}
$log->actionLog('Edited Teacher');
echo '<div class="alert alert-success alert-dismissible" role="alert">';
echo '<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>';
echo 'Teacher\'s information edited successfully.';
echo '</div>';
} else {
if ($edit == 2) {
echo '<div class="alert alert-warning alert-dismissible" role="alert">';
echo '<button type="button" class="close" data-dismiss="alert"><span aria-hidden="true">×</span><span class="sr-only">Close</span></button>';
echo 'Nothing changed.';
示例2:
echo $t->getApproved() == '0' ? 'selected' : '';
?>
>Not Approved</option>
<option value="1" <?php
echo $t->getApproved() == '1' ? 'selected' : '';
?>
>Approved</option>
</select>
</td>
</tr>
<tr>
<th>Blocked</th>
<td>
<select name="blocked" class="">
<option value="0" <?php
echo $t->getBlocked() == '0' ? 'selected' : '';
?>
>Not Blocked</option>
<option value="1" <?php
echo $t->getBlocked() == '1' ? 'selected' : '';
?>
>Blocked</option>
</select>
</td>
</tr>
<tr>
<td>
<input type="submit" value=" Save " class="btn btn-success" name = "submit" />
</td>
<td>
<input type="button" class="btn btn-danger" value="Cancel" onClick="save_edit_t()"; />