?> 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']; ?>
<?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
function get_tutors_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["tutor_acknowledged"]) { continue; } $tutor_info = tutor_info($match_info["tutor_id"]); // check to see if the match starts really soon // print "start: ". $match_info["start_dateunix"] ." ". // "cutoff: ".(time() + 60*60*$quick_match_call_time)."<br>\n"; if ($match_info["start_dateunix"] < time() + 60 * 60 * $quick_match_call_time) { $show = 1; } // check to see if the tutor 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 tutor doesn't have an email address if (!preg_match("/(\\S+)@(\\S+)/", $tutor_info["email"])) { $show = 1; } if ($show) { array_push($match_ids, $match_info["id"]); } } return $match_ids; }
<?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 echo $tutor_info['name']; ?> <br> <a href="?page=tutor_home">Main</a> | <a href="?action=logout&page=main">Logout</a> <?php } ?> </div> </div> </body> </html>
</td></tr></table> <br/> <br/> <table class="border"> <tr> <th>Name</th> <th>Category</th> <th>Times Available</th> <th>Hours Desired</th> <th>Notes</th> </tr> <?php foreach ($matches as $match) { $tutor_info = tutor_info($match[0]); ?> <tr> <td><?php echo $tutor_info['name']; ?> </td> <td><?php echo $tutor_info['category_name']; ?> </td> <td><?php print_busy(get_student_tutor_busy($tutor_info['id'], $student_info['id'])); ?> </td> <td><?php
<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> <td><?php