4 * http://opencaps.atrc.utoronto.ca
6 * Copyright 2009 Heidi Hazelton
7 * Adaptive Technology Resource Centre, University of Toronto
9 * Licensed under the Educational Community License (ECL), Version 2.0.
10 * You may not use this file except in compliance with this License.
11 * http://www.opensource.org/licenses/ecl2.php
15 define('INCLUDE_PATH', 'include/');
16 require(INCLUDE_PATH.'vitals.inc.php');
18 //remote system request - send captions back
19 if (isset($_GET['id'])) {
20 $this_proj->id = $_GET['id'];
21 $_SESSION['pid'] = $this_proj->id;
23 //check which system is pinging opencaps
24 if (isset($systems) && ACTIVE_SYSTEM != '') {
26 /*$ref_url = substr($_SERVER['HTTP_REFERER'], 0, -(strlen($_SERVER['SCRIPT_FILENAME'])));
28 echo $_SERVER['HTTP_REFERER'].' '.$_SERVER['HTTP_HOST'].'<br>';
29 echo $systems[2]['url'].' '.$ref_url;
32 foreach ($systems as $key=>$sys) {
33 if (strpos($sys['url'], getenv("HTTP_REFERER"))) {
38 $this_system->openProject($this_proj->id);
42 $_SESSION['errors'][] = "External system URL not recognised. Make sure to add this system to the OpenCaps config file.";
43 header("Location:start.php");
46 //$_SESSION['rid'] = $rid;
47 //$this_proj->openRemote($this_proj->id, true);
50 header("Location:start.php");