function __construct($option = null, $state = 'off') { global $smarty; switch ($state) { case 1: case 'on': ob_start(); switch ($option) { case 'os': os_info(); break; case 'browser': browser_info(); break; case 'session': session_info(); break; case 'server': server_info(); break; case 'request': request_info(); break; case 'class': class_info(); break; case 'includes': includes_info(); break; case 'mail': mail_info(); break; case 'system': default: system_info(); break; } $output = ob_get_clean(); $smarty->assign('output', $output); $smarty->display(DEBUG_PATH . 'debug.phtml'); break; case 0: case 'off': default: break; } }
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 echo $student_info['name']; ?> </a></td> <td><a href="?set_action=edit_tutor&page=edit_tutor&tutor_id=<?php echo $tutor_info['id']; ?> "><?php
<?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
if ($refresh->course_id != $course_id) { error_page("Wrong course"); } $url_args .= "&refresh_id={$refresh_id}"; } $course = BoltCourse::lookup_id($course_id); if (!$course) { error_page("no such course"); } $view_id = get_int('view_id', true); $action = sanitize_tags(get_str('action', true)); $course_doc = (require_once $course->doc_file()); switch ($action) { case 'start': if (info_incomplete($user)) { request_info($user, $course); exit; } if ($refresh) { start_refresh(); exit; } $e = BoltEnrollment::lookup($user->id, $course_id); if ($e) { page_header(); echo "You are already enrolled in {$course->name}.\n <p>\n Are you sure you want to start over from the beginning?\n <p>\n "; show_button("bolt_sched.php?action=start_confirm&{$url_args}", "Yes", "Start this course from the beginning"); show_button("bolt_sched.php?action=resume&{$url_args}", "Resume", "Resume course from current position"); page_footer(); exit; }
if ((DEBUG_MODE & 4) == 4) { include ROOT_PATH . 'includes/lib.debug.php'; } /* 判断是否支持 Gzip 模式 */ if (!defined('INIT_NO_SMARTY') && gzip_enabled()) { ob_start('ob_gzhandler'); } else { ob_start(); } /*ross 后来添加的订单统计 */ /* 记录请求信息 */ function request_info() { @($start_url = $_SERVER['HTTP_REFERER']); //来源网站 $start_url_info = parse_url($start_url); if ($start_url_info['host'] != $_SERVER['SERVER_NAME'] && $start_url_info['host'] != '') { $request_info = array(); $request_info['host'] = $start_url_info['host']; //域名 $request_info['time'] = gmtime(); //时间 $request_info['start_url'] = $start_url; //时间 $request_info['end_url'] = $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']; //被访页面 setcookie('request_info', serialize($request_info), time() + 86400, "/"); } } request_info(); /*ross 后来添加的订单统计 */
function system_info() { os_info(); browser_info(); session_info(); server_info(); request_info(); class_info(); includes_info(); mail_info(); }
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; }
students to call <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"]; ?>
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']; } else { if ($_REQUEST["action"] == 'create_match') { create_match(); } else { if ($_REQUEST["action"] == 'edit_match') { edit_match(); } else { if ($_REQUEST["action"] == 'delete_student') { delete_student(); } else { if ($_REQUEST["action"] == 'delete_tutor') { delete_tutor(); } else { if ($_REQUEST["action"] == 'delete_request') {