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


PHP Subject::ofSchool方法代碼示例

本文整理匯總了PHP中Subject::ofSchool方法的典型用法代碼示例。如果您正苦於以下問題:PHP Subject::ofSchool方法的具體用法?PHP Subject::ofSchool怎麽用?PHP Subject::ofSchool使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Subject的用法示例。


在下文中一共展示了Subject::ofSchool方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: header

    $application->id_sekolah = (int) $_POST['sekolah'];
    $application->id_subjek = (int) $_POST['subjek'];
    $application->status = (int) $_POST['status'];
    if ($application->update()) {
        // $_SESSION['success'] = 'Application updated!';
        header('Location: index.php?module=admin');
        exit;
    } else {
        // $_SESSION['error'] = 'Failed to update application!';
    }
}
ob_start();
$app = Application::findById($id);
$pelajar = Student::findById($app->id_pelajar);
$sekolahs = School::all();
$subjeks = Subject::ofSchool($app->id_sekolah);
$statuses = Application::statuses();
?>
<div>
	<div>
		<h1>Kemaskini Permohonan <span class="text-muted">#<?php 
echo $id;
?>
</span></h1>
		<hr />
	</div>
	
	<form action="" class="form-horizontal" method="post" id="application-form">
		<input type="hidden" name="id_pelajar" value="<?php 
echo $pelajar->id;
?>
開發者ID:sanusi87,項目名稱:project_one,代碼行數:31,代碼來源:admin_edit_application.php

示例2: elseif

         include_once ACTION . '/admin_login.php';
     } elseif ($action == 'approve') {
         include_once ACTION . '/admin_process_application.php';
     } elseif ($action == 'reject') {
         include_once ACTION . '/admin_process_application.php';
     } elseif ($action == 'edit-application') {
         // update application
     } else {
         include_once ACTION . '/admin_view_application.php';
     }
     break;
 case 'subjek':
     if ($action == 'load') {
         $sekolah = (int) $_GET['sekolah'];
         header('Content-type: Application/json');
         echo json_encode(Subject::ofSchool($sekolah));
         exit;
     }
     break;
 case 'logout':
     unset($_SESSION['id_pelajar']);
     unset($_SESSION['id_admin']);
     header('Location: /');
     exit;
 case 'site':
     include_once ACTION . "/{$module}" . "_" . $action . ".php";
     break;
 case 'application':
     if ($action == 'info') {
         // get application info
         $app = Application::findById($_GET['id']);
開發者ID:sanusi87,項目名稱:project_one,代碼行數:31,代碼來源:index.php

示例3: ob_start

$id = $_GET['id'];
ob_start();
$app = Application::findById($id);
$pelajar = Student::findById($app->id_pelajar);
$bangsa = Student::bangsa();
$sekolahs = array();
array_map(function ($sekolah) {
    global $sekolahs;
    $sekolahs[$sekolah['id']] = $sekolah['nama'];
}, School::all());
$subjeks = array();
array_map(function ($subjek) {
    global $subjeks;
    $subjeks[$subjek['id']] = $subjek['nama'];
}, Subject::ofSchool($app->id_sekolah));
$statuses = array();
array_map(function ($status) {
    global $statuses;
    $statuses[$status['id']] = $status['nama'];
}, Application::statuses());
$programmes = array();
array_map(function ($programme) {
    global $programmes;
    return $programmes[$programme['id']] = $programme['nama_panjang'];
}, Programme::all());
?>
<div>
	<table class="table">
		<tbody>
			<tr>
開發者ID:sanusi87,項目名稱:project_one,代碼行數:30,代碼來源:print_application.php


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