<!--#include file="head.asp"-->
<!--#include virtual="/show/mokuai/sms.asp"-->
<style>body{background-color: #fff;}</style>

<%
link="tousu_ok?cact="

if SafeRequest("act")="zhuijia" then 
sum=SafeRequestform("sum")
zhuicon=SafeRequestform("zhuicon")
if trim(zhuicon)="" then call PopErr("请填写回复内容")
'tyiju=SafeRequestform("tyiju")
touid=SafeRequestform("touid")
if touid="" then call PopErr("参数不完整")

pic1=trim(SafeRequestform("pic1"&sum&""))
pic2=trim(SafeRequestform("pic2"&sum&""))
pic3=trim(SafeRequestform("pic3"&sum&""))
pic4=trim(SafeRequestform("pic4"&sum&""))
pic5=trim(SafeRequestform("pic5"&sum&""))

downf=""
if trim(pic1)<>"" then downf=downf&pic1&";"
if trim(pic2)<>"" then downf=downf&pic2&";"
if trim(pic3)<>"" then downf=downf&pic3&";"
if trim(pic4)<>"" then downf=downf&pic4&";"
if trim(pic5)<>"" then downf=downf&pic5&";"

if downf<>"" then downf=mid(downf,1,len(downf)-1)

sql="select * from ayjubao where ayjubaoid='"&touid&"'" 
rs.open sql,conn,1,3
if not(rs.bof and rs.eof) then

if cint(rs("ayjuzt"))=1 then 
call PopErr2("该投诉已完结","/")
response.End()
end if

jubaomail=trim(rs("jubaomail"))
ayjuname=trim(rs("ayjuname"))
if cint(rs("jubaojinzhan"))<>4 then rs("jubaojinzhan")=1 '商家回复
rs("jubaoisnew")=1
rs("jubaolastdate")=now()
rs.update
end if
rs.close


sql="select * from ayjubao" 
rs.open sql,conn,1,3
rs.addnew
rs("ayjubaosjid")=touid
rs("ayjuhuifu")=zhuicon
rs("aydate")=now()
rs("ayjuishui")=1
rs("ayjuishuisid")=0
if downf<>"" then rs("ayjudown")=downf
rs.update
rs.close

title="来自"&webname&"-投诉有了新的进展"     
body=webname&"提醒您：<br><br>您的投诉得到了新的回复，请使用查询密码进行查看，可再次回复或撤销投诉。登录地址"&weburl&"tousu"
msbody="您的投诉得到了新的回复，使用查询密码进行查看，可再次回复或撤销投诉。登录地址"&weburl&"tousu"
'call SendEMail(trim(jubaomail),title,body)
'conn.Execute("Insert Into mailto(mto,mti,mcon) values('"&trim(jubaomail)&"','"&trim(title)&"','"&trim(body)&"')")
call mokuai_sms("IK10","2",trim(ayjuname),msbody,"","","","")

call logadd(request.Cookies("aynameid"),"投诉回复成功",0,0)
call PopErr2("投诉回复成功！","tousu")
end if
%>


<main>
<div  class="container">
<div class="ui-lrctnei">
<%call userleft()%>
<div class="r"> 
<div class="ui-content">
                        
					
                            
<div class="neiye">

            
            
            <!-------------------------------------- 开始 -------------------------------------->	
                    <div class="neibiaoti"></div>
           		 	<div class="neibiaoti2">已投诉列表</div>
                    <div class="gexian20"></div>
                	<div class="neitableno">

					<table>
                        <link rel="stylesheet" href="/kindeditor/themes/default/default.css" />
                        <script charset="utf-8" src="/kindeditor/kindeditor.js"></script>
                        <script charset="utf-8" src="/kindeditor/lang/zh-CN.js"></script>
                        <%
                        sql="select * from ayjubao where ayjubaouid="&request.Cookies("aynameid")&" and ayjubaozt=1 and ayjuzt=1 order by ayjuzt asc,ayjubaoid desc" 
                        rs.open sql,conn,1,1
						rs.pagesize=10
						pagecount=rs.pagecount 
                        if request("page")="" then 
                        page=1
                        else
                        page=int(request("page")) 
                        end if
                        if page<=0 then page=1 
                        if request("page")="" then page=1
                        if not(rs.bof and rs.eof) then
                        n=0
						rs.absolutepage=page
                        do while not rs.eof%>
						<form action="?act=zhuijia" method="post" name="form<%=n%>" id="form<%=n%>">
                        
                  		<tr>
                        <td width="300" style="text-align:left; line-height:28px;padding:10px;">
                        &nbsp;&nbsp;投诉订单：<%if trim(rs("jubaodd"))<>"" then %>
                            <strong><a href="mydingdan?dingdan=<%=trim(rs("jubaodd"))%>" target="_blank"><%=trim(rs("jubaodd"))%></a></strong>
                            <%else
                            response.Write "-"
                            end if%><br>
                        &nbsp;&nbsp;投诉类别：<%=rs("ayjubaocon")%><br>
                        &nbsp;&nbsp;买家QQ：<%=rs("jubaoqq")%><br>
                        &nbsp;&nbsp;买家电话：<%=rs("ayjuname")%><br>
                        &nbsp;&nbsp;买家微信：<%=trim(rs("jubaomail"))%><br>
                        &nbsp;&nbsp;投诉时间：<%=rs("aydate")%><br>
                        &nbsp;&nbsp;投诉状态：<%if cint(rs("ayjuzt"))=0 then response.Write "<span style=color:#FF0000>处理中</span>"
                            if cint(rs("ayjuzt"))=1 then response.Write "<span style=color:#00CC00>处理完毕</span>"%>
                        </td>
                        <td width="100" align="center">进展与回复：</td>
                        <td colspan="5" style="text-align:left; line-height:28px; padding:10px;">
								<%
                                if trim(rs("ayjubaoxcon"))<>"" then
                                response.Write "["&rs("aydate")&"]&nbsp;买家："&server.HTMLEncode(rs("ayjubaoxcon"))&"&nbsp;"
                                
                                if trim(rs("ayjudown"))<>"" then
                                picstr=split(rs("ayjudown"),";")
                                For pic=0 To Ubound(picstr) %>
                                <a href="<%=server.HTMLEncode(picstr(pic))%>" style="color:#F60" target="_blank">【截图查看】</a>&nbsp;
                                <%next
                                end if
                                response.Write("<br>")
                                end if
                                
                                set rsf=server.CreateObject("adodb.recordset")
                                sqlf="select * from ayjubao where ayjubaosjid="&rs("ayjubaoid")&" order by ayjubaoid asc" 
                                rsf.open sqlf,conn,1,1
                                if not(rsf.bof and rsf.eof) then
                                do while not rsf.eof
                                response.Write "["&rsf("aydate")&"]&nbsp;"
                                if cint(rsf("ayjuishuisid"))=0 then response.Write "商家: "
                                if cint(rsf("ayjuishuisid"))=1 then response.Write "买家: "
                                if cint(rsf("ayjuishuisid"))=9 then response.Write "管理员: "
                                response.Write rsf("ayjuhuifu")&"&nbsp;"
                                
                                if trim(rsf("ayjudown"))<>"" then
                                picstr=split(rsf("ayjudown"),";")
                                For pic=0 To Ubound(picstr) %>
                                <a href="<%=server.HTMLEncode(picstr(pic))%>" style="color:#F60" target="_blank">【截图查看】</a>&nbsp;
                                <%next
                                end if
                                
                                response.Write("<br>")
                                rsf.movenext  
                                loop
                                end if
                                rsf.close
                                %>
                                 <%if cint(rs("ayjuzt"))=0 then%> 
                            			<script>
                                        KindEditor.ready(function(K) {
                                            var uploadbutton1<%=n%> = K.uploadbutton({
                                                button : K('#uploadButton1<%=n%>')[0],
                                                fieldName : 'imgFile',
                                                url : '/kindeditor/asp/upload_jubao.asp?dir=image',
                                                afterUpload : function(data) { 
                                                    if (data.error === 0) {
                                                        var url = K.formatUrl(data.url, '');
                                                        urlcon=url.replace("/kindeditor/asp/../../","/"); 
                                                        K('#picurl1<%=n%>').val(urlcon);
                                                        con1<%=n%>.innerHTML='<a href='+urlcon+' target=_blank><img src='+urlcon+' width=100 height=100/></a>';
                                                    } else {
                                                        alert(data.message);
                                                    }
                                                },
                                                afterError : function(str) {
                                                    alert('自定义错误信息: ' + str);
                                                }
                                            });
                                            uploadbutton1<%=n%>.fileBox.change(function(e) {
                                                uploadbutton1<%=n%>.submit();
                                            });
                                        });
                                        
                                        
                                        KindEditor.ready(function(K) {
                                            var uploadbutton2<%=n%> = K.uploadbutton({
                                                button : K('#uploadButton2<%=n%>')[0],
                                                fieldName : 'imgFile',
                                                url : '/kindeditor/asp/upload_jubao.asp?dir=image',
                                                afterUpload : function(data) { 
                                                    if (data.error === 0) {
                                                        var url = K.formatUrl(data.url, '');
                                                        urlcon=url.replace("/kindeditor/asp/../../","/"); 
                                                        K('#picurl2<%=n%>').val(urlcon);
                                                        con2<%=n%>.innerHTML='<a href='+urlcon+' target=_blank><img src='+urlcon+' width=100 height=100/></a>';
                                                    } else {
                                                        alert(data.message);
                                                    }
                                                },
                                                afterError : function(str) {
                                                    alert('自定义错误信息: ' + str);
                                                }
                                            });
                                            uploadbutton2<%=n%>.fileBox.change(function(e) {
                                                uploadbutton2<%=n%>.submit();
                                            });
                                        });
                                        
                                    
                                        KindEditor.ready(function(K) {
                                            var uploadbutton3<%=n%> = K.uploadbutton({
                                                button : K('#uploadButton3<%=n%>')[0],
                                                fieldName : 'imgFile',
                                                url : '/kindeditor/asp/upload_jubao.asp?dir=image',
                                                afterUpload : function(data) { 
                                                    if (data.error === 0) {
                                                        var url = K.formatUrl(data.url, '');
                                                        urlcon=url.replace("/kindeditor/asp/../../","/"); 
                                                        K('#picurl3<%=n%>').val(urlcon);
                                                        con3<%=n%>.innerHTML='<a href='+urlcon+' target=_blank><img src='+urlcon+' width=100 height=100/></a>';
                                                    } else {
                                                        alert(data.message);
                                                    }
                                                },
                                                afterError : function(str) {
                                                    alert('自定义错误信息: ' + str);
                                                }
                                            });
                                            uploadbutton3<%=n%>.fileBox.change(function(e) {
                                                uploadbutton3<%=n%>.submit();
                                            });
                                        });
                                        
                                        KindEditor.ready(function(K) {
                                            var uploadbutton4<%=n%> = K.uploadbutton({
                                                button : K('#uploadButton4<%=n%>')[0],
                                                fieldName : 'imgFile',
                                                url : '/kindeditor/asp/upload_jubao.asp?dir=image',
                                                afterUpload : function(data) { 
                                                    if (data.error === 0) {
                                                        var url = K.formatUrl(data.url, '');
                                                        urlcon=url.replace("/kindeditor/asp/../../","/"); 
                                                        K('#picurl4<%=n%>').val(urlcon);
                                                        con4<%=n%>.innerHTML='<a href='+urlcon+' target=_blank><img src='+urlcon+' width=100 height=100/></a>';
                                                    } else {
                                                        alert(data.message);
                                                    }
                                                },
                                                afterError : function(str) {
                                                    alert('自定义错误信息: ' + str);
                                                }
                                            });
                                            uploadbutton4<%=n%>.fileBox.change(function(e) {
                                                uploadbutton4<%=n%>.submit();
                                            });
                                        });
                                        
                                        KindEditor.ready(function(K) {
                                            var uploadbutton5<%=n%> = K.uploadbutton({
                                                button : K('#uploadButton5<%=n%>')[0],
                                                fieldName : 'imgFile',
                                                url : '/kindeditor/asp/upload_jubao.asp?dir=image',
                                                afterUpload : function(data) { 
                                                    if (data.error === 0) {
                                                        var url = K.formatUrl(data.url, '');
                                                        urlcon=url.replace("/kindeditor/asp/../../","/"); 
                                                        K('#picurl5<%=n%>').val(urlcon);
                                                        con5<%=n%>.innerHTML='<a href='+urlcon+' target=_blank><img src='+urlcon+' width=100 height=100/></a>';
                                                    } else {
                                                        alert(data.message);
                                                    }
                                                },
                                                afterError : function(str) {
                                                    alert('自定义错误信息: ' + str);
                                                }
                                            });
                                            uploadbutton5<%=n%>.fileBox.change(function(e) {
                                                uploadbutton5<%=n%>.submit();
                                            });
                                        });
                                    </script>
                                 <textarea name="zhuicon" cols="80" rows="3" id="zhuicon"></textarea><br>
                                  <input name="pic1<%=n%>" type="hidden" id="picurl1<%=n%>" value="" readonly="readonly" /> <input type="button" id="uploadButton1<%=n%>" value="上传截图1" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                  <input name="pic2<%=n%>" type="hidden" id="picurl2<%=n%>" value="" readonly="readonly" /> <input type="button" id="uploadButton2<%=n%>" value="上传截图2" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                  <input name="pic3<%=n%>" type="hidden" id="picurl3<%=n%>" value="" readonly="readonly" /> <input type="button" id="uploadButton3<%=n%>" value="上传截图3" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                  <input name="pic4<%=n%>" type="hidden" id="picurl4<%=n%>" value="" readonly="readonly" /> <input type="button" id="uploadButton4<%=n%>" value="上传截图4" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                                  <input name="pic5<%=n%>" type="hidden" id="picurl5<%=n%>" value="" readonly="readonly" /> <input type="button" id="uploadButton5<%=n%>" value="上传截图5" />
                                  <br><span id="con1<%=n%>"></span>&nbsp;<span id="con2<%=n%>"></span>&nbsp;<span id="con3<%=n%>"></span>&nbsp;<span id="con4<%=n%>"></span>&nbsp;<span id="con5<%=n%>"></span>
                                  <br><input type="submit" name="Submit" value=" 提交回复 " class="logindlregedit"/>
                                 <%end if%>
                                 <input name="touid" type="hidden" id="touid" value="<%=rs("ayjubaoid")%>" />	
                                 <input name="sum" type="hidden" id="sum" value="<%=n%>" />
                        
                        </td>
                        </tr>

                        
                        
						</form>
						<%
                        n=n+1
                        rs.movenext 
						if n>=rs.pagesize then exit do
                        loop
						zongshu=rs.RecordCount
                        else
                        %>

                      <tr>
                        <td colspan="9" height="40" style="text-align:left">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;未收到投诉，请继续保持！</td>
                      </tr>
					<%end if%> 
                    
                      <tr>
                        <td colspan="9" height="40" style="text-align:left">&nbsp;<%call pageye()%></td>
                      </tr>
                    </table>
                    
            		</div>
            <!-------------------------------------- 结束 -------------------------------------->
                        
            
            


                                                                 
                   
            <div class="gexian20"></div>
            <div class="mzsmbox2" style="padding-top:20px;">
            重要提示：收到投诉后请在24小时内做出回复或联系买家撤销投诉！24小时内未作出任何回复也未撤销投诉的，商家ID将被冻结！！！
            </div>

          </div>
            
           




        <div class="clearfix"></div>



</div>








</div>
</div>
</div>
</div>
</main>


<footer>
<div class="container">
</div>
</footer>

</body>
</html>