Example #1
0
$temp = dirname(__FILE__);
$temp = str_replace('\\', '/', $temp);
$temp = substr($temp, 0, strrpos($temp, '/'));
// definging site paths-->
define('SITE_FS_PATH', $temp);
//Common vars
define('APP_RECORD_PER_PAGE', 10);
define('ROOT_DIR', $temp);
define('INCLUDE_DIR', ROOT_DIR . "/includes/");
define('LIBS_DIR', ROOT_DIR . "/libs/");
define('SMARTY_DIR', LIBS_DIR . "smarty/");
define('TEMPLATES_DIR', ROOT_DIR . "/templates/");
define('TEMPLATES_C_DIR', ROOT_DIR . "/templates_c/");
//smarty files
require_once SMARTY_DIR . "SmartyML.php";
//database files
require_once LIBS_DIR . 'adodb/adodb.inc.php';
//include_once(INCLUDE_DIR.'class.dbConnect.php');
//include_once(LIBS_DIR.'adodb/adodb-pager.inc.php');
$db_id = 0;
$objDb = NewADOConnection("{$db_driver[$db_id]}");
// A new connection
$db = $objDb->Connect("{$db_host[$db_id]}", "{$db_user[$db_id]}", "{$db_pass[$db_id]}", "{$db_name[$db_id]}");
//smarty object
$objTpl = new smartyML();
$objTpl->assign('ROOT_DIR', ROOT_DIR);
$objTpl->assign('SITEURL', SITEURL);
require_once INCLUDE_DIR . 'class.masterData.php';
$objMaster = new MasterData();
$countries = $objMaster->getAllCountries();
$objTpl->assign('countries', $countries);
Example #2
0
$tbl_user = $systemtable . '.zvs_user';
$tbl_employee = $systemtable . '.zvs_employee';
$tbl_default = $systemtable . '.zvs_default';
$tbl_hotel = $systemtable . '.zvs_hotel';
$tbl_hotel_default = $systemtable . '.zvs_hotel_default';
$tbl_salutation = $systemtable . '.zvs_salutation';
// auhtenification
include_once 'authclass.inc.php';
$auth = new Auth();
// default data
include_once "defaultdataclass.inc.php";
$defaultdata = new DefaultData();
// Smarty Templating
include_once 'Smarty.class.php';
include_once 'multilanguage.php';
$smarty = new smartyML();
//$smarty = new Smarty;
// Configure Smarty
$smarty->template_dir = '../templates_v2';
$smarty->compile_dir = '../templates_v2_c';
$smarty->compile_check = true;
$smarty->force_compile = false;
$smarty->debugging = true;
$smarty->cache_dir = '../cache';
$smarty->caching = false;
$smarty->left_delimiter = '<%';
$smarty->right_delimiter = '%>';
// Metabase
include_once 'metabase_database.php';
include_once 'metabase_interface.php';
global $gDatasource;