Ejemplo n.º 1
0
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 
    echo $student_info['name'];
    ?>
</a></td>
            <td><a href="?set_action=edit_tutor&page=edit_tutor&tutor_id=<?php 
    echo $tutor_info['id'];
    ?>
"><?php 
    echo $tutor_info['name'];
Ejemplo n.º 2
0
<?php

$tutor_id = $_REQUEST["tutor_id"];
$request_id = $_REQUEST["request_id"];
$request_info = request_info($request_id);
$tutor_info = tutor_info($tutor_id);
$student_id = $request_info['student_id'];
$student_info = student_info($student_id);
?>

<div class=title>Make a Match</div>

<form method="post">
<input type="hidden" name="action" value="<?php 
echo $_REQUEST["set_action"];
?>
">
<input type="hidden" name="page" value="match_list">
<input type="hidden" name="request_id" value="<?php 
echo $request_id;
?>
">
<input type="hidden" name="tutor_id" value="<?php 
echo $tutor_id;
?>
">
<table class="border">
    <tr>
        <td align=right>Student:</td>
        <td>
            <?php 
Ejemplo n.º 3
0
function get_students_to_call()
{
    global $quick_match_call_time, $unresponded_match_call_time;
    // get a list of all the current matchesj
    $match_info_list = search_matches();
    $match_ids = array();
    // step through each of the matches
    foreach ($match_info_list as $match_info) {
        $show = 0;
        // Skip anyone who has already acknowledged
        if ($match_info["student_acknowledged"]) {
            continue;
        }
        $request_info = request_info($match_info["request_id"]);
        $student_info = student_info($request_info["student_id"]);
        // check to see if the match starts really soon
        if ($match_info["start_dateunix"] < time() + 60 * 60 * $quick_match_call_time) {
            $show = 1;
        }
        // check to see if the student hasn't clicked the confirmation link quickly enough
        if ($match_info["match_madeunix"] + 60 * 60 * $unresponded_match_call_time < time()) {
            $show = 1;
        }
        // check to see if the student doesn't have an email address
        if (!preg_match("/(\\S+)@(\\S+)/", $student_info["email"])) {
            $show = 1;
        }
        if ($show) {
            array_push($match_ids, $match_info["id"]);
        }
    }
    return $match_ids;
}
Ejemplo n.º 4
0
        border: 1px solid black;
        padding: 5px;
    }
    div.menu {
        font-size: 14pt;
    }
</style>
</head>
<body>
<div class="header">
    <img src="newlogo.gif"/>
    Boulder High School - Tutor Matching System<br>
    <div class=menu>
    <?php 
if ($_SESSION['logged_in'] == true && $_SESSION['student_id']) {
    $student_info = student_info($_SESSION['student_id']);
    ?>
        Logged in as: <?php 
    echo $student_info['name'];
    ?>
<br>
        <a href="?page=student_home">Main</a> |
        <a href="?action=logout&page=main">Logout</a>
    <?php 
}
?>
    <?php 
if ($_SESSION['logged_in'] == true && $_SESSION['tutor_id']) {
    $tutor_info = tutor_info($_SESSION['tutor_id']);
    ?>
        Logged in as: <?php 
Ejemplo n.º 5
0
<?php

$student_id = $_REQUEST["student_id"];
$row = student_info($student_id);
$id = $row["id"];
$name = $row["name"];
$username = $row["username"];
$address = $row["address"];
$phone = $row["phone"];
$grade = $row["grade"];
$email = $row["email"];
$notes = $row["notes"];
$signed_contract = $row["signed_contract"];
?>

<div class=title>Edit Student Account</div>

<form method="post">
<input type="hidden" name="action" value="<?php 
echo $_REQUEST["set_action"];
?>
">
<input type="hidden" name="page" value="edit_student">
<input type="hidden" name="student_id" value="<?php 
echo $id;
?>
">
<table>
<tr><td align="right">Name:</td>
    <td><input name="name" value="<?php 
echo $name;
Ejemplo n.º 6
0
<table class="border" cellspacing=0>
<tr>
    <th>Name</th>
    <th>Phone Number</th>
    <th>Subject</th>
    <th>Tutor</th>
    <th>Start Date</th>
    <th>Match Times</th>
    <th>Confirmed</th>
    <th>Notes</th>
</tr>
<?php 
foreach ($matches_to_call_tutor as $match_id) {
    $match_info = match_info($match_id);
    $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><?php 
    echo $tutor_info["name"];
    ?>
</td>
        <td><?php 
    echo $tutor_info["phone"];
    ?>
</td>
        <td><?php 
    echo $request_info["subject_name"];
    ?>
</td>