2026-05-29 19:54:56 +08:00

104 lines
5.4 KiB
PHP

<!-- 推广列表-->
<?php
use common\utils\CommUtil;
use yii\widgets\LinkPager;
$userID = Yii::$app->request->get('user_id');
$level = Yii::$app->request->get('level');
?>
<section class="content-header">
<!-- 查询-->
<div class="box box-primary">
<div class="box-body">
<form action="<?= \yii\helpers\Url::to() ?>" class="form-horizontal" method="get">
<div class="row">
<input name="r" type="text" hidden value="rebate/rebate-list">
<div class="col-xs-4">
<div class="form-group">
<label for="user_id" class="col-sm-3 control-label">玩家ID</label>
<div class="col-sm-9">
<input id="user_id" name="user_id" type="text" class="form-control" placeholder="玩家ID" value="<?= $userID ?>">
</div>
</div>
</div>
<div class="col-xs-4">
<div class="form-group">
<label for="level" class="col-sm-3 control-label">推广等级</label>
<div class="col-sm-9">
<input id="level" name="level" type="text" class="form-control" value="<?= $level ?>">
</div>
</div>
</div>
<button type="submit" class="btn btn-primary">查询</button>
</div>
</form>
</div>
</div>
</section>
<?php if (isset($list)): ?>
<!-- Main content -->
<section class="content">
<div class="box">
<div class="box-header">
<h3 class="box-title">推广盈利</h3>
</div>
<!-- /.box-header -->
<div class="box-body">
<div id="example2_wrapper" class="dataTables_wrapper form-inline dt-bootstrap">
<div class="row">
<div class="col-sm-6"></div>
<div class="col-sm-6"></div>
</div>
<div class="row">
<div class="col-sm-12">
<table id="example2" class="table table-bordered table-hover dataTable" role="grid" aria-describedby="example2_info">
<thead>
<tr role="row">
<th class="sorting_asc" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-sort="ascending"
aria-label="Rendering engine: activate to sort column descending">ID
</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Browser: activate to sort column ascending">用户ID</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Platform(s): activate to sort column ascending">昵称</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="Engine version: activate to sort column ascending">分销获得金币</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="CSS grade: activate to sort column ascending">推广等级</th>
<th class="sorting" tabindex="0" aria-controls="example2" rowspan="1" colspan="1" aria-label="CSS grade: activate to sort column ascending">创建时间</th>
</tr>
</thead>
<tbody>
<?php foreach ($list as $item): ?>
<tr role="row">
<td><?= $item['id'] ?></td>
<td><?= $item['from_user_id'] ?></td>
<td><?= $item['from_user_nickname'] ?></td>
<td><?= $item['rebate_gold'] ?></td>
<td><?= $item['level'] ?></td>
<td><?= CommUtil::formatDate($item['created_at']) ?></td>
</tr>
<?php endforeach; ?>
</tbody>
</table>
</div>
</div>
<div class="row">
<div class="col-sm-5">
<div class="dataTables_info" id="example2_info" role="status" aria-live="polite">
<?= sprintf('总共%d条数据', $totalCount); ?>
<?= sprintf('推广获得金币总数%d', $totalGold); ?>
</div>
</div>
<div class="col-sm-7">
<div class="dataTables_paginate paging_simple_numbers" id="example2_paginate">
<?= LinkPager::widget(['pagination' => $pages]); ?>
</div>
</div>
</div>
</div>
</div>
<!-- /.box-body -->
</div>
</section>
<?php endif; ?>