<!--#include file="../inc/DAL.asp"-->
<!--#include file="../inc/md5.asp"-->
<!--#include file="../inc/page.asp"-->
<!--#include file="Check.asp"-->
<%
Dim ConfigRS
Set ConfigRS=Server.CreateObject( "ADODB.Recordset" )
if request.QueryString("Method")="Del" then 
    DB_CONN.EXECUTE("delete from [i_User_Gift_SendRecord] where [i_User_Gift_SendRecord_ID]="&request.QueryString("ID"))
    RW "<script>location.href='GiftPost_Manage.asp?t="&request.QueryString("t")&"';</script>":response.end()
elseif request.QueryString("Method")="DellAll" then 
    DB_CONN.EXECUTE("delete from [i_User_Gift_SendRecord]")
    RW "<script>location.href='GiftPost_Manage.asp?t="&request.QueryString("t")&"';</script>":response.end()
end if

Set ConfigRS=DB_CONN.EXECUTE("select *,(select [i_User_Gift_Price] from [i_User_Gift] where [i_User_Gift_ID]=[i_User_Gift_SendRecord_GiftID]) as 'giftprice',(select [i_User_NickName] from [i_User_Info] where [i_User_ID]=[i_User_Gift_SendRecord_UID]) as 'sunick',(select [i_User_NickName] from [i_User_Info] where [i_User_ID]=[i_User_Gift_SendRecord_GUID]) as 'runick' from [i_User_Gift_SendRecord] a join [i_User_Gift] b on a.[i_User_Gift_SendRecord_GiftID]=b.[i_User_Gift_ID] order by [i_User_Gift_SendRecord_Time]")

ConfigRS.pagesize=20
if isempty(request("page")) or request("page")="" then curpage=1 else curpage=Cint(request("page")) end if
if not ConfigRS.eof then ConfigRS.absolutepage = curpage

%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>ImChat v1.5 Manage System</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="styles/layoutContent.css" rel="stylesheet" type="text/css" />
<link href="themes/blue/styles.css" rel="stylesheet" type="text/css" />
<style>
.JSTB{border:#ccc solid 1px;border-right:none;border-bottom:none;margin-top:20px;}
.JSTB th,.JSTB td{border-bottom:#ccc solid 1px; border-right:#ccc solid 1px;}
</style>
</head>
<body>
<div class="contentcontainer">
    <div class="headings alt">
        <h2>礼物管理&nbsp;&nbsp;&nbsp;<a href="javascript:\\;" onclick="location.reload();" style="text-decoration:none;">刷新</a>&nbsp;&nbsp;&nbsp;<a href="Gift_Manage.asp?t=0" style="text-decoration:none;">普通礼物</a>&nbsp;&nbsp;&nbsp;<a href="Gift_Manage.asp?t=1" style="text-decoration:none;">推荐礼物</a>&nbsp;&nbsp;&nbsp;<a href="GiftPost_Manage.asp?t=1" style="text-decoration:none;">礼物赠送记录</a>&nbsp;&nbsp;&nbsp;<a href="GiftPost_Manage.asp?Method=DellAll" style="text-decoration:none;">清空记录</a></h2>
    </div>
    <div class="contentbox">
        <table class="JSTB" width="100%" cellpadding="0" cellspacing="0" border="0">
            <th colspan="10">礼物赠送记录</th>
            <tr>
                <td>总价</td>
                <td>赠送人</td>
                <td>接收人</td>
                <td>礼物名称</td>
                <td>单价</td>
                <td>数量</td>
                <td>赠送时间</td>
                <td>操作</td>
            </tr>
            <%
            dim iPage
            while (not ConfigRS.eof and iPage<ConfigRS.pagesize )
            %>
            <tr>
                <td>&nbsp;<%=ConfigRS("i_User_Gift_SendRecord_GiftTotalPrice")%></td>
                <td>&nbsp;<a href="EditUser.asp?UID=<%=ConfigRS("i_User_Gift_SendRecord_UID")%>"><%=ConfigRS("sunick")%></a></td>
                <td>&nbsp;<a href="EditUser.asp?UID=<%=ConfigRS("i_User_Gift_SendRecord_GUID")%>"><%=ConfigRS("runick")%></a></td>
                <td>&nbsp;<%=ConfigRS("i_User_Gift_Name")%></td>
                <td>&nbsp;<%=ConfigRS("i_User_Gift_Name")%></td>
                <td>&nbsp;<%=ConfigRS("i_User_Gift_SendRecord_GiftNum")%></td>
                <td>&nbsp;<%=ConfigRS("i_User_Gift_SendRecord_Time")%></td>
                <td>&nbsp;<a href="?Method=Del&t=<%=request.QueryString("t")%>&ID=<%=ConfigRS("i_User_Gift_SendRecord_ID")%>" onclick="return confirm('确认要删除吗?');">删除</a></td>
            </tr>
            <%
            iPage=iPage+1
            ConfigRS.MoveNext
            wend
            %>
            <tr>
                <td colspan="10"><%=ExportPageInfo(ConfigRS,curpage,iPage,"GiftPost_Manage.asp?1=1&"&replace(Request.QueryString,"page","1")&"&")%></td>
            </tr>
        </table>
        
    </div>
</div>
</body>
</html>
