Beispiel #1
0
    $user_id = $_REQUEST['id'];
    $url .= 'id=' . $_REQUEST['id'] . '&';
} else {
    $user_id = $loggedin_user->id;
}
$user = new SI_User();
if ($user->get($user_id) === FALSE) {
    $error_msg .= "Error getting user information!\n";
    debug_message($user->getLastError());
}
$balance = $user->getBalance();
if ($balance === FALSE) {
    $error_msg .= "Error getting your outstanding balance!";
    debug_message($loggedin_user->getLastError());
}
$transactions = $user->getTransactions(NULL, $trans_per_page, $_REQUEST['page'] * $trans_per_page);
if ($transactions === FALSE) {
    $error_msg .= "Error getting your transactions!";
    debug_message($user->getLastError());
}
$total_transactions = $user->getTransactionCount();
if ($total_transactions === FALSE) {
    $error_msg .= "Error getting transaction count!";
    debug_message($user->getLastError());
}
$checks = $user->getChecks(NULL, 5);
if ($checks === FALSE) {
    $error_msg .= "Error getting your last 5 checks!";
    debug_message($user->getLastError());
}
$total_pages = ceil($total_transactions / $trans_per_page);
if ($loggedin_user->hasRight('admin') && isset($_REQUEST['id'])) {
    $user_id = $_REQUEST['id'];
} else {
    $user_id = $loggedin_user->id;
}
$user = new SI_User();
if ($user->get($user_id) === FALSE) {
    $error_msg .= "Error getting user information!\n";
    debug_message($user->getLastError());
}
$balance = $user->getBalance();
if ($balance === FALSE) {
    $error_msg .= "Error getting your outstanding balance!";
    debug_message($loggedin_user->getLastError());
}
$transactions = $user->getTransactions(NULL, 5);
if ($transactions === FALSE) {
    $error_msg .= "Error getting your last 5 transactions!";
    debug_message($user->getLastError());
}
$task = new SI_Task();
$tasks = $task->getUpcoming($user->id, 0, 0, 10);
if ($tasks === FALSE) {
    $error_msg .= "Could not retrieve Upcoming Tasks!\n";
    debug_message($task->getLastError());
}
$title = "Home";
require 'header.php';
?>
<script>
function reloadPage(selObj){