vendors.php

Go to the documentation of this file.
00001 <?php
00002 /* SVN FILE: $Id: app_2webroot_2js_2vendors_8php-source.html 675 2008-12-26 00:27:14Z gwoo $ */
00003 /**
00004  * Short description for file.
00005  *
00006  * This file includes js vendor-files from /vendor/ directory if they need to
00007  * be accessible to the public.
00008  *
00009  * PHP versions 4 and 5
00010  *
00011  * CakePHP(tm) :  Rapid Development Framework <http://www.cakephp.org/>
00012  * Copyright 2005-2008, Cake Software Foundation, Inc.
00013  *                              1785 E. Sahara Avenue, Suite 490-204
00014  *                              Las Vegas, Nevada 89104
00015  *
00016  * Licensed under The MIT License
00017  * Redistributions of files must retain the above copyright notice.
00018  *
00019  * @filesource
00020  * @copyright       Copyright 2005-2008, Cake Software Foundation, Inc.
00021  * @link                http://www.cakefoundation.org/projects/info/cakephp CakePHP(tm) Project
00022  * @package         cake
00023  * @subpackage      cake.app.webroot.js
00024  * @since           CakePHP(tm) v 0.2.9
00025  * @version         $Revision: 675 $
00026  * @modifiedby      $LastChangedBy: gwoo $
00027  * @lastmodified    $Date: 2008-12-25 16:27:14 -0800 (Thu, 25 Dec 2008) $
00028  * @license         http://www.opensource.org/licenses/mit-license.php The MIT License
00029  */
00030 /**
00031  * Enter description here...
00032  */
00033 if (isset($_GET['file'])) {
00034     $file = $_GET['file'];
00035     $pos = strpos($file, '..');
00036     if ($pos === false) {
00037         if (is_file('../../vendors/javascript/'.$file) && (preg_match('/(\/.+)\\.js/', $file))) {
00038             readfile('../../vendors/javascript/'.$file);
00039             return;
00040         }
00041     }
00042 }
00043 header('HTTP/1.1 404 Not Found');
00044 ?>