<?php include('../include/config.php'); include(INC_PATH.'common.php'); include(INC_PATH.'sixheadtemplate/SiXhEaD.Template.php'); // Template page define('LIST_PAGE', TP_PATH.'_tp_main.html'); define('LAYOUT', TP_PATH.'_tp_layout.html'); define('TABLE_NAME', 'diplomat_car_member_db'); // Database connection & tracker message $oDB = new DBI(); if ($bDebug) { $oErr = new Tracker(); $oDB->SetTracker($oErr); } // Assign Table $oTable = new DBTableDef(); $oTable->GetTableDef($oDB, TABLE_NAME); /*++++++++++++++++++++++++++++++++ START PROGRAM +++++++++++++++++++++ ++++++++++++*/ $sAct = $_REQUEST['act']; $oLogin = new LoginManager(); if ($sAct == 'login') { $sUser = $_POST['user']; $sPass = $_POST['pass']; $oLogin->SetDBConnection($oDB); if (!$oLogin->Login($sUser, $sPass)) { $msg = 'Login incorrect, please try again.'; } elseif ($oLogin->IsAdmin()) { DoRedirect($oLogin->SelectPage()); exit(); } else { DoRedirect($oLogin->SelectPage()); exit(); } } elseif ($sAct == 'logout') { if (sizeof($_SESSION) > 0) { foreach ($_SESSION as $sKey => $sVal) { if (substr($sKey, 0, 3) == 'au_') { session_unregister($sKey); } } } } else { $msg = ''; } $tp = new template(LIST_PAGE); $tp->Display(); /*++++++++++++++++++++++++++++++++ END PROGRAM +++++++++++++++++++++++ ++++++++++*/ // Close DB conection & show tracker message if ($bDebug) { echo($oErr->GetAll()); } $oDB->Close(); ?>
I'm here as a proxy for my programmer who can't speak english too well, so any thing you ask I will have to pass onto her.
Thanks again.
polapat.leenutaphong@u5okyolk.com
In reply to (OT) Can't connect to DB by u5okyolk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |