Example #1
0
/**
 * 获取记账条目列表
 */
function get_bill_list()
{
    $userId = (int) $_SESSION['userId'];
    $accountId = is_empty($_REQUEST['accountId']) ? null : (int) $_REQUEST['accountId'];
    $billTypeId = is_empty($_REQUEST['billTypeId']) ? null : (int) $_REQUEST['billTypeId'];
    $startDate = is_empty($_REQUEST['startDate']) ? null : $_REQUEST['startDate'];
    $endDate = is_empty($_REQUEST['endDate']) ? null : $_REQUEST['endDate'];
    $billTypeFlag = is_empty($_REQUEST['billTypeFlag']) ? null : (int) $_REQUEST['billTypeFlag'];
    $curPageIndex = is_empty($_REQUEST['curPageIndex']) ? 1 : (int) $_REQUEST['curPageIndex'];
    $pageSize = get_page_size();
    $code = '0';
    $billService = new BillService();
    $page = $billService->getBillListPage($userId, $accountId, $billTypeId, $startDate, $endDate, $billTypeFlag, $curPageIndex, $pageSize);
    if ($page != null) {
        $totalCount = $page['totalCount'];
        $pageCount = $page['pageCount'];
        $rows = $page['page'];
    } else {
        $code = '-1';
    }
    $output = array('retCode' => $code, 'curPageIndex' => $curPageIndex, 'totalCount' => $totalCount, 'pageCount' => $pageCount, 'billList' => $rows);
    echo get_json($output);
}
Example #2
0
<body>
    <header>
    <?php 
require_once "inc/content_header.php";
?>
    </header>
    <main class="container">
        <?php 
if (!empty($username) && !empty($wiki)) {
    $all_pages = get_all_new_pages_of_user($username, $wiki)['query']['usercontribs'];
    $all_pageids = [];
    $all_verdicts = get_verdict($username, $wiki);
    for ($i = 0; $i < count($all_pages); $i++) {
        array_push($all_pageids, $all_pages[$i]['pageid']);
    }
    $all_page_sizes = get_page_size($all_pageids, $wiki)['query']['pages'];
    //echo json_encode($all_page_sizes);
    //echo json_encode($all_pages);
    require_once "inc/progress_individual.php";
} else {
    $participants = get_participants_list();
    if (!empty($filter)) {
        require_once "inc/participant_list.php";
    } else {
        require_once "inc/wiki_list.php";
    }
}
?>
    </main>
    <footer class="container">
    <?php 
Example #3
0
    echo $judged_by;
    ?>
</a></td>
        </tr>
        <?php 
}
$newer_pageids = [];
foreach ($all_verdicts as $page_title => $data) {
    if (!isset($page_shown[$page_title])) {
        $page_id = get_page_id($page_title, $wiki);
        if ($page_id >= 0) {
            array_push($newer_pageids, $page_id);
        }
    }
}
$newer_page_sizes = get_page_size($newer_pageids, $wiki)['query']['pages'];
if ($newer_page_sizes) {
    foreach ($newer_page_sizes as $page_id => $data) {
        $page_size = $data['revisions'][0]['size'];
        $status = !empty($all_verdicts[$data['title']]) ? $all_verdicts[$data['title']]['verdict'] : "pending";
        $remarks = isset($all_verdicts[$data['title']]) ? $all_verdicts[$data['title']]['remarks'] : "";
        $judged_by = isset($all_verdicts[$data['title']]) ? $all_verdicts[$data['title']]['last_updated_by'] : "";
        ?>
            <tr>
                <td><a href="//<?php 
        echo $wiki;
        ?>
/wiki/<?php 
        echo $data['title'];
        ?>
"><?php