Example #1
0
            $nextpage = "<input type=\"button\" class=\"button\" value=\"" . $vbphrase['next_page'] . " &gt;\" tabindex=\"1\" onclick=\"window.location='kbankadmin.php?" . $vbulletin->session->vars['sessionurl'] . "do=do_view_records&username="******"&days=" . $vbulletin->GPC['days'] . "&day[day]=" . $vbulletin->GPC['day']['day'] . "&day[month]=" . $vbulletin->GPC['day']['month'] . "&day[year]=" . $vbulletin->GPC['day']['year'] . "&pp=" . $vbulletin->GPC['perpage'] . "&page={$nxt}'\">";
            $lastpage = "<input type=\"button\" class=\"button\" value=\"" . $vbphrase['last_page'] . " &raquo;\" tabindex=\"1\" onclick=\"window.location='kbankadmin.php?" . $vbulletin->session->vars['sessionurl'] . "do=do_view_records&username="******"&days=" . $vbulletin->GPC['days'] . "&day[day]=" . $vbulletin->GPC['day']['day'] . "&day[month]=" . $vbulletin->GPC['day']['month'] . "&day[year]=" . $vbulletin->GPC['day']['year'] . "&pp=" . $vbulletin->GPC['perpage'] . "&page={$totalpages}'\">";
        }
        print_table_start();
        print_table_header("Viewing Records (Page {$vbulletin->GPC['pagenumber']} of {$totalpages})", 6);
        $headings = array();
        $headings[] = $vbphrase['id'];
        $headings[] = $vbphrase['kbank_from'];
        $headings[] = $vbphrase['kbank_to'];
        $headings[] = $vbphrase['kbank_amount'];
        $headings[] = $vbphrase['kbank_datetime'];
        $headings[] = $vbphrase['kbank_comment'];
        print_cells_row($headings, 1);
        while ($rec = $vbulletin->db->fetch_array($recs)) {
            $cell = array();
            showHistoryOne($rec, false, false);
            $cell[] = $rec['id'];
            $cell[] = $rec['from'];
            $cell[] = $rec['to'];
            $cell[] = $rec['amount'];
            $cell[] = $rec['time'];
            $cell[] = iif($rec['comment'] == '', $vbphrase['kbank_comment_none'], $rec['comment']);
            print_cells_row($cell);
        }
        print_table_footer(6, "{$firstpage} {$prevpage} &nbsp; {$nextpage} {$lastpage}");
    } else {
        print_stop_message('no_results_matched_your_query');
    }
    print_cp_footer();
}
// ###################### Ban member ########################
Example #2
0
// #####################################################################
// MAIN
// #####################################################################
if (!$processed) {
    $_GET['do'] = "donate";
}
if ($_GET['do'] == "donate") {
    $processed = true;
    $navbits = array("{$vbulletin->kbank['phpfile']}?{$session['sessionurl']}" => $vbphrase['kbank']);
    $navbits[""] = $vbphrase['kbank_account_management'];
    $to = $_GET['to'];
    //load latest history
    $cache = $db->query("select * from " . TABLE_PREFIX . "kbank_donations\n\t\tWHERE `to` IN ({$vbulletin->userinfo['userid']}{$vbulletin->userinfo['kbank_grantedids']})\n\t\t\tOR `from` IN ({$vbulletin->userinfo['userid']}{$vbulletin->userinfo['kbank_grantedids']})\n\t\tORDER BY time DESC\n\t\tLIMIT 10");
    $recs_processed = '';
    while ($rec = $db->fetch_array($cache)) {
        $recs_processed .= showHistoryOne($rec);
    }
    $db->free_result($cache);
    unset($rec);
    //load latest history - complete!
    //load granted permission
    $granted_list = '';
    $granteds = array($vbulletin->userinfo['userid'] => array('userid' => $vbulletin->userinfo['userid'], 'username' => $vbulletin->userinfo['username'] . ' (' . $vbphrase['kbank_yourself'] . '!)', 'usergroupid' => $vbulletin->userinfo['usergroupid'], 'membergroupids' => $vbulletin->userinfo['membergroupids'], $vbulletin->kbank['field'] => $vbulletin->userinfo[$vbulletin->kbank['field']]));
    if (is_array($vbulletin->userinfo['kbank_granted'])) {
        $granteds = array_merge($granteds, $vbulletin->userinfo['kbank_granted']);
    }
    //prepair output
    foreach ($granteds as $granted) {
        $permission_detail = array();
        if (!userBanned($granted['userid'], true)) {
            $permission_detail[] = $vbphrase['kbank_user'];