public function __construct() { global $db, $cache, $profiler; require_once '../includes/global.inc.php'; $profiler = new Profiler(true); Debug::setBufferOutput(FALSE); Debug::setEnable(TRUE); if (PRODUCTION != FALSE) { echo "DO NOT RUN ON A PRODUCTION SERVER<br>\n"; exit; } }
public function __construct() { global $db, $cache, $profiler; require_once '../includes/global.inc.php'; require_once Environment::getBasePath() . '/classes/modules/core/DependencyTree.class.php'; $profiler = new Profiler(true); Debug::setBufferOutput(FALSE); Debug::setEnable(TRUE); if (PRODUCTION != FALSE) { echo "DO NOT RUN ON A PRODUCTION SERVER<br>\n"; exit; } }
public function __construct() { global $db, $cache; require_once '../includes/global.inc.php'; require_once Environment::getBasePath() . '/classes/payroll_deduction/PayrollDeduction.class.php'; $profiler = new Profiler(true); Debug::setBufferOutput(FALSE); Debug::setEnable(TRUE); TTDate::setTimeZone('PST'); if (PRODUCTION != FALSE) { echo "DO NOT RUN ON A PRODUCTION SERVER<br>\n"; exit; } }
* * In accordance with Section 7(b) of the GNU Affero General Public License * version 3, these Appropriate Legal Notices must retain the display of the * "Powered by TimeTrex" logo. If the display of the logo is not reasonably * feasible for technical reasons, the Appropriate Legal Notices must display * the words "Powered by TimeTrex". ********************************************************************************/ /* * $Revision: 8160 $ * $Id: server.php 8160 2006-05-31 23:33:54Z root $ * $Date: 2006-05-31 16:33:54 -0700 (Wed, 31 May 2006) $ */ //Don't force SSL for SOAP clients. $disable_https = TRUE; require_once '../includes/global.inc.php'; Debug::setEnable(TRUE); Debug::setEnableDisplay(FALSE); Debug::setEnableLog(TRUE); Debug::setEnableTidy(FALSE); Debug::setVerbosity(10); if (isset($_GET['SessionID']) and $_GET['SessionID'] != '') { $authentication = new Authentication(); if ($authentication->Check($_GET['SessionID']) === TRUE) { $server = new SoapServer(null, array('uri' => "urn:test")); $server->setClass('TimeTrexSoapServer'); $server->handle(); } else { echo "User not authenticated!<br>\n"; exit; } } else {
//This has to be first, always. require_once dirname(__FILE__) . DIRECTORY_SEPARATOR . '..' . DIRECTORY_SEPARATOR . 'classes' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR . 'Environment.class.php'; //clearstatcache(); set_include_path(Environment::getBasePath() . 'classes' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'core' . PATH_SEPARATOR . Environment::getBasePath() . 'classes' . PATH_SEPARATOR . Environment::getBasePath() . 'classes' . DIRECTORY_SEPARATOR . 'pear' . PATH_SEPARATOR . Environment::getBasePath() . 'classes' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'api' . PATH_SEPARATOR . Environment::getBasePath() . 'classes' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'company' . PATH_SEPARATOR . Environment::getBasePath() . 'classes' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'users' . PATH_SEPARATOR . Environment::getBasePath() . 'classes' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'punch' . PATH_SEPARATOR . Environment::getBasePath() . 'classes' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'schedule' . PATH_SEPARATOR . Environment::getBasePath() . 'classes' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'department' . PATH_SEPARATOR . Environment::getBasePath() . 'classes' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'help' . PATH_SEPARATOR . Environment::getBasePath() . 'classes' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'client' . PATH_SEPARATOR . Environment::getBasePath() . 'classes' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'document' . PATH_SEPARATOR . Environment::getBasePath() . 'classes' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'hierarchy' . PATH_SEPARATOR . Environment::getBasePath() . 'classes' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'holiday' . PATH_SEPARATOR . Environment::getBasePath() . 'classes' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'invoice' . PATH_SEPARATOR . Environment::getBasePath() . 'classes' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'invoice_policy' . PATH_SEPARATOR . Environment::getBasePath() . 'classes' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'job' . PATH_SEPARATOR . Environment::getBasePath() . 'classes' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'job_item' . PATH_SEPARATOR . Environment::getBasePath() . 'classes' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'message' . PATH_SEPARATOR . Environment::getBasePath() . 'classes' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'other' . PATH_SEPARATOR . Environment::getBasePath() . 'classes' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'payperiod' . PATH_SEPARATOR . Environment::getBasePath() . 'classes' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'pay_stub' . PATH_SEPARATOR . Environment::getBasePath() . 'classes' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'pay_stub_amendment' . PATH_SEPARATOR . Environment::getBasePath() . 'classes' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'policy' . PATH_SEPARATOR . Environment::getBasePath() . 'classes' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'product' . PATH_SEPARATOR . Environment::getBasePath() . 'classes' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'request' . PATH_SEPARATOR . Environment::getBasePath() . 'classes' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'accrual' . PATH_SEPARATOR . Environment::getBasePath() . 'classes' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'soap' . PATH_SEPARATOR . Environment::getBasePath() . 'classes' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'install' . PATH_SEPARATOR . Environment::getBasePath() . 'classes' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'cron' . PATH_SEPARATOR . Environment::getBasePath() . 'classes' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'time_clock' . PATH_SEPARATOR . Environment::getBasePath() . 'classes' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'tax_forms' . PATH_SEPARATOR . Environment::getBasePath() . 'classes' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'tax_forms' . DIRECTORY_SEPARATOR . 'ca' . PATH_SEPARATOR . Environment::getBasePath() . 'classes' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'tax_forms' . DIRECTORY_SEPARATOR . 'us' . PATH_SEPARATOR . get_include_path()); //define('FPDF_FONTPATH', Environment::getBasePath() .'classes'. DIRECTORY_SEPARATOR .'fpdf'. DIRECTORY_SEPARATOR .'font'. DIRECTORY_SEPARATOR); require_once Environment::getBasePath() . 'classes' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR . 'Exception.class.php'; require_once Environment::getBasePath() . 'classes' . DIRECTORY_SEPARATOR . 'modules' . DIRECTORY_SEPARATOR . 'core' . DIRECTORY_SEPARATOR . 'Debug.class.php'; if (isset($_SERVER['REQUEST_URI'])) { Debug::Text('URI: ' . $_SERVER['REQUEST_URI'], __FILE__, __LINE__, __METHOD__, 10); } Debug::Text('Version: ' . APPLICATION_VERSION . ' Edition: ' . getTTProductEdition() . ' Production: ' . (int) PRODUCTION . ' Demo Mode: ' . (int) DEMO_MODE, __FILE__, __LINE__, __METHOD__, 10); $profiler = new Profiler(true); if (function_exists('bcscale')) { bcscale(10); } Debug::setEnable((bool) $config_vars['debug']['enable']); Debug::setEnableTidy(FALSE); Debug::setEnableDisplay((bool) $config_vars['debug']['enable_display']); Debug::setBufferOutput((bool) $config_vars['debug']['buffer_output']); Debug::setEnableLog((bool) $config_vars['debug']['enable_log']); Debug::setVerbosity((int) $config_vars['debug']['verbosity']); if (Debug::getEnable() == TRUE and Debug::getEnableDisplay() == TRUE) { ini_set('display_errors', 1); } else { ini_set('display_errors', 0); } //Make sure we are using SSL if required. if ($config_vars['other']['force_ssl'] == 1 and !isset($_SERVER['HTTPS']) and isset($_SERVER['HTTP_HOST']) and isset($_SERVER['REQUEST_URI']) and !isset($disable_https) and !isset($enable_wap) and php_sapi_name() != 'cli') { Redirect::Page('https://' . $_SERVER['HTTP_HOST'] . $_SERVER['REQUEST_URI']); exit; }
<?php require_once '../includes/global.inc.php'; //PHPUnit 3.1.9 works with unit tests, but v3.6 fails on ADODB for some reason. //Need to run phpunit like this: phpunit --bootstrap BootStrap.php --no-globals-backup DateTimeTest Debug::setBufferOutput(FALSE); Debug::setEnable(FALSE); //Set to TRUE to see debug output. Leave buffer output FALSE. Debug::setVerbosity(10); //This prevent PHPUnit from creating a mock ADODB-lib class and causing a fatal error on redeclaration of its functions. //See for a possible fix? http://sebastian-bergmann.de/archives/797-Global-Variables-and-PHPUnit.html#content //Must use --no-globals-backup to get tests to run properly. $ADODB_INCLUDED_LIB = TRUE; require_once Environment::getBasePath() . 'classes' . DIRECTORY_SEPARATOR . 'adodb' . DIRECTORY_SEPARATOR . 'adodb.inc.php'; require_once Environment::getBasePath() . 'classes' . DIRECTORY_SEPARATOR . 'adodb' . DIRECTORY_SEPARATOR . 'adodb-exceptions.inc.php'; require_once Environment::getBasePath() . 'classes' . DIRECTORY_SEPARATOR . 'adodb' . DIRECTORY_SEPARATOR . 'adodb-lib.inc.php'; if (PRODUCTION != FALSE) { echo "DO NOT RUN ON A PRODUCTION SERVER<br>\n"; exit; } set_include_path(get_include_path() . PATH_SEPARATOR . '/usr/share/php'); echo "Include Path: " . get_include_path() . "\n"; $profiler = new Profiler(TRUE);