當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Teacher::getBlocked方法代碼示例

本文整理匯總了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">&times;</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">&times;</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">&times;</span><span class="sr-only">Close</span></button>';
                 echo 'Nothing changed.';
開發者ID:mkrdip,項目名稱:Management-Information-System,代碼行數:31,代碼來源:edit_teacher.php

示例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=" &nbsp;Save&nbsp; " class="btn btn-success" name = "submit" />
					</td>
					<td>
						<input type="button" class="btn btn-danger" value="Cancel" onClick="save_edit_t()"; />
開發者ID:mkrdip,項目名稱:Management-Information-System,代碼行數:31,代碼來源:edit_teacher.php


注:本文中的Teacher::getBlocked方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。