vendors.php
Go to the documentation of this file.00001 <?php 00002 /* SVN FILE: $Id: app_2webroot_2js_2vendors_8php-source.html 580 2008-07-01 14:45:49Z 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: 580 $ 00026 * @modifiedby $LastChangedBy: gwoo $ 00027 * @lastmodified $Date: 2008-07-01 09:45:49 -0500 (Tue, 01 Jul 2008) $ 00028 * @license http://www.opensource.org/licenses/mit-license.php The MIT License 00029 */ 00030 /** 00031 * Enter description here... 00032 */ 00033 $file = $_GET['file']; 00034 $pos = strpos($file, '..'); 00035 if ($pos === false) { 00036 if (is_file('../../vendors/javascript/'.$file) && (preg_match('/(\/.+)\\.js/', $file))) 00037 { 00038 readfile('../../vendors/javascript/'.$file); 00039 } 00040 } else { 00041 header('HTTP/1.1 404 Not Found'); 00042 } 00043 ?>