function VerifyPassword() { if (empty($this->login)) { $this->error = trans('Please login.'); return NULL; } // customer authorization ways // $authinfo = GetCustomerIDByPhoneAndPIN($this->login, $this->passwd); // $authinfo = GetCustomerIDByContractAndPIN($this->login, $this->passwd); $authinfo = GetCustomerIDByIDAndPIN($this->login, $this->passwd); if ($authinfo != NULL && $authinfo['id'] != NULL) { return $authinfo; } else { return NULL; } }
* GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, * USA. * * $Id$ */ include_once 'class.php'; include_once 'authentication.inc'; $layout['pagetitle'] = trans('Customer Logon'); $loginform = $_POST['loginform']; $login = trim($loginform['login']) ? trim($loginform['login']) : 0; $pin = trim($loginform['pwd']) ? trim($loginform['pwd']) : 0; // customer authorization ways //$id = GetCustomerIDByPhoneAndPIN($login, $pin); //$id = GetCustomerIDByContractAndPIN($login, $pin); $id = GetCustomerIDByIDAndPIN($login, $pin); if ($id) { session_start(); $_SESSION['uid'] = $id; $SMARTY->assign('customerinfo', $LMS->GetCustomer($id)); $SMARTY->assign('balancelist', $LMS->GetCustomerBalanceList($id)); $SMARTY->assign('limit', 15); $SMARTY->assign('account_no', $CONFIG['finances']['account']); $SMARTY->assign('bank_name', $CONFIG['finances']['bank']); $SMARTY->display('balanceview.html'); } else { header('Location: index.php?error=1'); }