示例#1
0
function save_calling_screen()
{
    $matches = search_matches();
    foreach ($matches as $match_info) {
        $student_ack_notes = $_REQUEST[$match_info["id"] . "_notes_student"];
        $tutor_ack_notes = $_REQUEST[$match_info["id"] . "_notes_tutor"];
        if ($student_ack_notes) {
            update_student_match_ack_notes($match_info["id"], $student_ack_notes);
        }
        if ($tutor_ack_notes) {
            update_tutor_match_ack_notes($match_info["id"], $tutor_ack_notes);
        }
        $student_confirmed = $_REQUEST[$match_info["id"] . "_confirm_student"];
        $tutor_confirmed = $_REQUEST[$match_info["id"] . "_confirm_tutor"];
        if ($student_confirmed) {
            mark_match_student_acknowledged($match_info["id"]);
        }
        if ($tutor_confirmed) {
            mark_match_tutor_acknowledged($match_info["id"]);
        }
    }
}
<?php

$match_info_list = search_matches();
?>

<div class="title">Matches</div>

Found <?php 
echo count($match_info_list);
?>
 matches:
<table class="border">
    <tr>
    <th>Student</th>
    <th>Tutor</th>
    <th>Subject</th>
    <th>Start Date</th>
    <th>End Date</th>
    <th>Times</th>
    </tr>
    <?php 
foreach ($match_info_list as $match_info) {
    $request_info = request_info($match_info['request_id']);
    $student_info = student_info($request_info['student_id']);
    $tutor_info = tutor_info($match_info['tutor_id']);
    ?>
        <tr>
            <td><a href="?set_action=edit_student&page=edit_student&student_id=<?php 
    echo $student_info['id'];
    ?>
"><?php 
示例#3
0
include '../functions.php';
session_start();
global $page;
$page = $_REQUEST["page"];
if ($_REQUEST["action"] == 'admin_login') {
    admin_login();
} else {
    if ($_REQUEST["action"] == 'search_students') {
        search_students();
    } else {
        if ($_REQUEST["action"] == 'search_requests') {
            search_requests();
        } else {
            if ($_REQUEST["action"] == 'search_matches') {
                search_matches();
            } else {
                if ($_REQUEST["action"] == 'search_tutors') {
                    search_tutors();
                } else {
                    if ($_REQUEST["action"] == 'edit_student') {
                        edit_student();
                    } else {
                        if ($_REQUEST["action"] == 'edit_tutor') {
                            edit_tutor();
                        } else {
                            if ($_REQUEST["action"] == 'edit_request') {
                                edit_request();
                                $page = 'list_requests';
                                $request_info = request_info($_REQUEST['request_id']);
                                $_REQUEST['student_id'] = $request_info['student_id'];