$SYSLOG = null; $LMS = new LMS($DB, $AUTH, $SYSLOG); $LMS->ui_lang = $_ui_language; $LMS->lang = $_language; // set some template and layout variables $SMARTY->assignByRef('_LANG', $_LANG); $SMARTY->assignByRef('LANGDEFS', $LANGDEFS); $SMARTY->assignByRef('_ui_language', $LMS->ui_lang); $SMARTY->assignByRef('_language', $LMS->lang); $SMARTY->template_dir = getcwd(); $SMARTY->compile_dir = SMARTY_COMPILE_DIR; include 'lang.php'; $SMARTY->assignByRef('layout', $layout); if (isset($_SERVER['HTTP_X_FORWARDED_FOR'])) { $forwarded_ip = explode(',', $_SERVER['HTTP_X_FORWARDED_FOR']); $nodeid = $LMS->GetNodeIDByIP($forwarded_ip['0']); } else { $nodeid = $LMS->GetNodeIDByIP(str_replace('::ffff:', '', $_SERVER['REMOTE_ADDR'])); } $customerid = $LMS->GetNodeOwner($nodeid); $nodeinfo = $LMS->GetNode($nodeid); if (isset($_GET['readed'])) { $DB->Execute('UPDATE nodes SET warning = 0 WHERE id = ?', array($nodeid)); header('Location: ' . $_GET['oldurl']); } else { $customerinfo = $LMS->GetCustomer($customerid); $layout['oldurl'] = $_GET['oldurl']; $SMARTY->assign('customerinfo', $customerinfo); $SMARTY->assign('nodeinfo', $nodeinfo); $SMARTY->assign('layout', $layout); $SMARTY->display('message.html');
$SMARTY->addPluginsDir(LIB_DIR . '/SmartyPlugins'); // Include required files (including sequence is important) require_once LIB_DIR . '/unstrip.php'; require_once LIB_DIR . '/language.php'; require_once LIB_DIR . '/definitions.php'; require_once LIB_DIR . '/common.php'; // Initialize LMS class $AUTH = NULL; $LMS = new LMS($DB, $AUTH); $LMS->ui_lang = $_ui_language; $LMS->lang = $_language; // set some template and layout variables $SMARTY->assignByRef('_LANG', $_LANG); $SMARTY->assignByRef('LANGDEFS', $LANGDEFS); $SMARTY->assignByRef('_ui_language', $LMS->ui_lang); $SMARTY->assignByRef('_language', $LMS->lang); $SMARTY->template_dir = getcwd(); $SMARTY->compile_dir = SMARTY_COMPILE_DIR; @(include 'locale/' . $LMS->ui_lang . '/strings.php'); $layout['lmsv'] = '1.11-git'; $SMARTY->assignByRef('layout', $layout); header('X-Powered-By: LMS/' . $layout['lmsv']); $_SERVER['REMOTE_ADDR'] = str_replace('::ffff:', '', $_SERVER['REMOTE_ADDR']); if ($customerid = $LMS->GetNodeOwner($LMS->GetNodeIDByIP($_SERVER['REMOTE_ADDR']))) { $balance = $LMS->GetCustomerBalanceList($customerid); $customerinfo = $LMS->GetCustomer($customerid); $customerinfo['tariffsvalue'] = $LMS->GetCustomerTariffsValue($customerid); } $SMARTY->assign('customerinfo', $customerinfo); $SMARTY->assign('balance', $balance); $SMARTY->display('customer.html');