当前位置: 首页>>代码示例>>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;未经允许,请勿转载。