예제 #1
0
<?php

// initialize
include_once '../../common/init.php';
if (!isLoggedInOperator()) {
    redirect('');
} elseif (isset($_POST['cardnumber'])) {
    // include needed database functions
    include_once $BASE_PATH . 'database/sales.php';
    echo getCardBalance($_POST['cardnumber']);
}
예제 #2
0
파일: index.php 프로젝트: vascofg/lbaw
<?php

// initialize
include_once '../../common/init.php';
if (!isLoggedInCustomer()) {
    redirect("pages/customer/auth/login.php");
} else {
    include_once $BASE_PATH . 'database/sales.php';
    $balance = getCardBalance($_SESSION['customer']['id']);
    $smarty->assign('balance', $balance);
    $smarty->display("customer/index.tpl");
}