File: /var/www/html/wp-content/plugins/ganryu_shop/point_search.php
<?php require GANRYU_SHOP_ROOT.'/template/admin/common.php'?>
<script>
function grys_search_user(){
var f = document.getElementById('conffrm');
if (!f) return;
var userid = f.userid.value;
var url = '?page=ganryu_shop_point&userid='+userid;
location.href = url;
}
</script>
<h1 class="pagetitle">ポイント履歴検索</h1>
<?php require dirname(__FILE__)."/point_links.php"?>
<div class="mainbody">
<form id="conffrm" action="?page=ganryu_shop_point" method="get">
<div class="formitem">
<div class="left">会員ID</div>
<div class="right">
<div><input type="text" style="width:120px" name="userid" value="<?php echo esc_html($data['userid'])?>"></div>
</div>
<div style="clear:both"></div>
</div>
<input type="button" value="検索" class="sendbtn" onclick="grys_search_user()">
</form>
</div>
<?php if ($pointinfo):?>
<div class="mainbody">
<div class="formitem">
<div class="left">会員ID</div>
<div class="right">
<div class="txt"><?php echo $pointinfo['user']->get('ID')?></div>
</div>
<div style="clear:both"></div>
</div>
<div class="formitem">
<div class="left">表示名</div>
<div class="right">
<div class="txt"><?php echo $pointinfo['user']->get('display_name')?></div>
</div>
<div style="clear:both"></div>
</div>
<div class="formitem">
<div class="left">保有pt</div>
<div class="right">
<div class="txt"><?php echo $pointinfo['curpt']['current_point']?>pt</div>
</div>
<div style="clear:both"></div>
</div>
<a class="sendbtn small" href="?page=ganryu_shop_point&page_action=add_point&userid=<?php echo $pointinfo['user']->get('ID')?>">このユーザにポイント付与する</a>
</div>
<div class="mainbody">
<table width="100%" style="min-width:640px; overflow-x:auto" class="bordered">
<thead>
<tr>
<th>日付</th>
<th>項目</th>
<th>ポイント</th>
</tr>
</thead>
<tbody>
<?php foreach ($pointinfo['result']['list'] as $pdata):?>
<tr>
<td><?php echo grys_ymdhis($pdata['create_date'])?></td>
<td><?php echo h($pdata['point_name'])?></td>
<td><?php echo h($pdata['point_value'])?>pt</td>
</tr>
<?php endforeach;?>
</tbody>
</table>
</div>
<?php endif; ?>