Location: PHPKode > projects > APhPLIX Development Studio > aphplix/include/aphplix_javascript.php
<?php
//----------------------------------------------------------------------------//
// APhPLIX (c) copyright 2005-2006 Jared 'flame' Herbohn (aphplix.org)
//
// APhPLIX website :
//		http://www.aphplix.org
//
// APhPLIX developers :
//		Jared 'flame' Herbohn
//		Dani 'zeemu' Prescott
//----------------------------------------------------------------------------//

//----------------------------------------------------------------------------//
// THIS SOFTWARE IS GPL LICENSED
//----------------------------------------------------------------------------//
//  This program is free software; you can redistribute it and/or modify
//  it under the terms of the GNU General Public License (version 2) as 
//  published by the Free Software Foundation.
//
//  This program is distributed in the hope that it will be useful,
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//  GNU Library General Public License for more details.
//
//  You should have received a copy of the GNU General Public License
//  along with this program; if not, write to the Free Software
//  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
//----------------------------------------------------------------------------//

	// set type of files to send
	$cmode = 'compiled';
	
	// number of seconds browser should cache for
	$expires = 60;

	// send header
	header("Content-type: text/javascript; charset: UTF-8");
	header("Expires: " . gmdate("D, d M Y H:i:s", time() + $expires) . " GMT");

	// send javascript
	switch ($mode)
	{
		case 'aphplix':
			if ($cmode == 'compiled')
			{
				require(APHPLIX_INCDIR.'javascript/aphplix.compiled.js');
			}
			else
			{
				require(APHPLIX_INCDIR.'javascript/source/aphplix.js');
				require(APHPLIX_INCDIR.'javascript/source/widgets.js');
				require(APHPLIX_INCDIR.'javascript/source/base_widgets.js');
				require(APHPLIX_INCDIR.'javascript/source/test_widgets.js');
				require(APHPLIX_INCDIR.'javascript/source/depreciated_widgets.js');
				require(APHPLIX_INCDIR.'javascript/source/html.js');
				require(APHPLIX_INCDIR.'javascript/source/dhtml.js');
				require(APHPLIX_INCDIR.'javascript/source/helpers.js');
			}
			break;
			
		case 'application':
			require(APHPLIX_INCDIR.'javascript/application/application.js');
			//require(APHPLIX_INCDIR.'javascript/application/widgets.js');
			require(APHPLIX_INCDIR.'javascript/application/forms.js');
			require(APHPLIX_INCDIR.'javascript/application/methods.js');
			break;
			
		case 'applications':
			require(APHPLIX_APPINCDIR.'javascript/application.js');
			include(APHPLIX_APPINCDIR.'javascript/widgets.js');
			include(APHPLIX_APPINCDIR.'javascript/forms.js');
			include(APHPLIX_APPINCDIR.'javascript/methods.js');
			if (is_array($uses))
			{
				foreach ($uses as $key=>$value)
				{
					require(APHPLIX_INCDIR.'javascript/plugin/'.$value.'.js');
				}
			}
			break;
			
		case 'devstudio':
			if ($cmode == 'compiled')
			{
				require(APHPLIX_INCDIR.'javascript/devstudio/devstudio.compiled.js');
			}
			else
			{
				require(APHPLIX_INCDIR.'javascript/devstudio/source/devstudio.js');
				require(APHPLIX_INCDIR.'javascript/devstudio/source/widgets.js');
				require(APHPLIX_INCDIR.'javascript/devstudio/source/methods.js');
				require(APHPLIX_INCDIR.'javascript/devstudio/source/forms.js');
			}
			break;
		
		case 'devapp':
			//require(APHPLIX_INCDIR.'javascript/application/widgets.js');
			require(APHPLIX_INCDIR.'javascript/application/forms.js');
			break;
			
		default:
			break;
	}
?>
Return current item: APhPLIX Development Studio