2 /************************************************************************/
4 /************************************************************************/
5 /* Copyright (c) 2010 */
6 /* Inclusive Design Institute */
8 /* This program is free software. You can redistribute it and/or */
9 /* modify it under the terms of the GNU General Public License */
10 /* as published by the Free Software Foundation. */
11 /************************************************************************/
13 /* this file simply gets the TR_CONTENT_DIR/CID.html file that was generated
14 * by the AChecker page of the content editor.
15 * there is no authentication on this page. either the file exists (in which
16 * case it is then quickly deleted after), or it doesn't.
19 $_user_location = 'public';
21 define('TR_INCLUDE_PATH', 'include/');
22 require(TR_INCLUDE_PATH . '/vitals.inc.php');
25 $args = substr($_SERVER['PHP_SELF'], strlen($_SERVER['SCRIPT_NAME']));
26 $file = TR_CONTENT_DIR . $args;
28 //check that this file is within the content directory & exists
30 $real = realpath($file);
32 if (substr($real, 0, strlen(TR_CONTENT_DIR)) == TR_CONTENT_DIR) {
33 header('Content-Type: text/html');
34 echo file_get_contents($real);
37 header('HTTP/1.1 404 Not Found');