/************************************************************************************* * * 02-x Web Application Framework * Copyright 2004 - 2005 Ryan Cummins * All rights reserved * ************************************************************************************* * * * For application log please see App_Log.php * * ************************************************************************************* * filename: app/index.php ************************************************************************************* */ $doc_path_exp = explode('/', $_SERVER["DOCUMENT_ROOT"]); $doc_count = count($doc_path_exp) - 1; $x = 0; while($x != $doc_count) { $doc_path .= '/'.$doc_path_exp[$x]; $x++; } $doc_path = substr($doc_path, 1, 50); // set path vars //$inc_path = '.:/php/includes:'. $doc_path .'/images:'. $doc_path .'/inc:'. $doc_path .'/adodb:'. $doc_path . '/gui/inc'; ini_set('include_path', '.:/php/includes:'. $doc_path .'/images:'. $doc_path .'/inc:'. $doc_path .'/adodb:'. $doc_path . '/gui/inc'); ini_set('url_rewriter.tags', ''); //ini_set('session.save_path', $doc_path . '/tmp/sessions'); ini_set('session.use_trans_sid', '0'); ini_set('url_rewriter.tags', ''); ini_set("arg_separator.output", "&"); ini_set("output_buffering", "On"); /* Start Sessions */ session_start(); /* Privacy Headers */ header('P3P: CP="ALL DSP COR LAW CUR ADMo DEVa PSDa CONo OTPo PUBo STP PHY ONL PUR COM NAV INT DEM CNT STA POL PRE LOC OTC", policyref="./w3c/p3p.xml"'); /* Set site constants */ define('IN_APPLICATION', true); define('phpEx', '.php'); define('root_path', './'); if(is_null($_REQUEST['page'])) { define('page', home); } else { define('page', $_REQUEST['page']); } if(is_null($_REQUEST['action'])) { define('action', null); } else { define('action', $_REQUEST['action']); } /* Set globals */ include(root_path . 'common'.phpEx); include(root_path . 'config'.phpEx); ?>