<?php (!defined('IN_ADMIN') || !defined('IN_MUDDER')) && exit('Access Denied'); ?>
<div id="body">
<form method="post" name="disposalfrm" action="admincp.php?action=<?=$action?>&file=<?=$file?>&">
    <input type="hidden" name="exchangeid" value="<?=$exchangeid?>" />
    <div class="space">
        <div class="subtitle">礼品兑换处理</div>
        <table class="maintable" border="0" cellspacing="0" cellpadding="0">
            <tr><td colspan="2" class="altbg2"><strong>会员兑换信息</strong></td></tr>
            <tr><td width="60">兑换会员：</td><td><a href="<?=$_modules['space']['url'].'index.php?suid='.$current_gift['uid']?>" target="_blank"><?=$current_gift['username']?></a></td></tr>
            <tr><td>礼品名称：</td><td><?=$current_gift['giftname']?></td></tr>
            <tr><td>兑换数量：</td><td><?=$current_gift['number']?></td></tr>
            <tr><td>兑换总价：</td><td><?=$current_gift['totalprice']?></td></tr>
            <tr><td colspan="2" class="altbg2"><strong>会员联系方式</strong></td></tr>
            <tr><td colspan="2"><?=$current_gift['contact']?></td></tr>
            <tr><td colspan="2" class="altbg2"><strong>礼品库存信息</strong>&nbsp;[对应编号]</td></tr>
            <tr><td>礼品名称：</td><td><a href="<?=$MOD['url']?>?action=gift&giftid=<?=$storage_gift['giftid']?>" target="_blank"><?=$storage_gift['name']?></a></td></tr>
            <tr><td>当前库存：</td><td><?=$storage_gift['num']?>&nbsp;&nbsp;(已减去兑换总量)</td></tr>
            <tr><td>礼品单价：</td><td><?=$storage_gift['price']?></td></tr>
            <tr><td>礼品状态：</td><td><? echo ($storage_gift['available'] ? '可用' :'停用');?></td></tr>
            <tr><td colspan="2" class="altbg2"><strong>兑换处理</strong></td></tr>
            <tr><td>处理操作：</td><td><select name="disposal_status">
                <option value="" selected="selected">处理操作</option>
                <?foreach($arr_status as $key => $val) { ?><option value="<?=$key?>"><?=$val?></a></option><? } ?>
            </select>&nbsp;&nbsp;选择<span class="font_1">“已退款”</span>将返回兑换总价给会员</td></tr>
            <tr><td>处理说明：</td><td><input type="text" name="status_extra" value="<?=$current_gift['status_extra']?>" class="txtbox" />&nbsp;&nbsp;已发货时，可写货单号；退款时，可写退款说明</td></tr>
        </table>
        <center><input type="submit" name="dosubmit" value=" 处理 " class="btn" />&nbsp;&nbsp;<input type="button" value=" 返回 " onclick="history.go(-1);" class="btn" /></center>
    </div>
</form>
<script type="text/javascript">
window.onload = function(){
    document.disposalfrm.disposal_status.value="<?=$current_gift[status]?>";
}
</script>
</div>