<!--#include virtual="/show/userhead.asp"-->
<!--#include virtual="/show/mokuai/sms.asp"-->

<script>document.getElementById('o_5').setAttribute("class", "ed"); document.getElementById("t_5").style.display="";document.getElementById('s_5_1').setAttribute("class", "ed4");</script>

<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />

<title><%=webname%>-投诉/举报</title>
<%
link="tousu?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

istongzhi=rs("istongzhi")
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

if cint(istongzhi)=0 then
	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("IK01","2",ayjuname,msbody,"","","","")
end if

call logadd(request.Cookies("aynameid"),"投诉回复成功",0,0)
call PopErr2("投诉回复成功！","tousu")
end if
%>
<br>
<DIV id=main2> 
<DIV style="PADDING-LEFT:0px">
<DIV id=main_right_content>

<H2><SPAN>投诉/举报</SPAN></H2>
<DIV class=main3>
<div id="protectts">
<strong><span style="color:#F00; font-size:16px;">重要提示：收到投诉后请在24小时内做出回复或联系买家撤销投诉！24小时内未作出任何回复也未撤销投诉的，商家ID将被冻结！！！</span></strong>
</div><br>
<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>
  <table width="99%" border="0" align="center" cellpadding="0" cellspacing="0"  class="table_style_a1">
<%
sql="select * from ayjubao where ayjubaouid="&request.Cookies("aynameid")&" and ayjubaozt=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%>
  <tr>
    <td height="30" align="center" class="border_bottom border_right" style="font-weight: bold">投诉订单号</td>
    <td align="center" class="border_bottom border_right" style="font-weight: bold">买家QQ</td>
    <td align="center" class="border_bottom border_right" style="font-weight: bold">买家微信</td>
    <td align="center" class="border_bottom border_right" style="font-weight: bold">买家电话</td>
    <td align="center" class="border_bottom border_right" style="font-weight: bold">投诉时间</td>
    <td align="center" class="border_bottom " style="font-weight: bold">投诉状态</td>
  </tr>
<form action="?act=zhuijia" method="post" name="form<%=n%>" id="form<%=n%>">

  <tr style="background-color: #D2FFFF">
    <td height="30" align="center" class="border_bottom border_right">
      <%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%>
    </td>
    <td align="center" class="border_bottom border_right"><%=trim(rs("jubaoqq"))%></td>
    <td align="center" class="border_bottom border_right"><%=rs("jubaomail")%></td>
    <td align="center" class="border_bottom border_right"><%=rs("ayjuname")%></td>
    <td align="center" class="border_bottom border_right"><%=rs("aydate")%></td>
    <td align="center" class="border_bottom ">
      <%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>
  </tr>
  <tr><td height="30" colspan="6" align="center">
  <table width="99%" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td width="100" align="center"><span style="font-weight: bold">详细内容：</span></td>
      <td width="824" align="left" style="line-height:25px;"><br>
	  <%
	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
	%>
	 <br>
	 <%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="4" id="zhuicon"></textarea>
	 <br>
	  <input name="pic1<%=n%>" type="hidden" class="ke-input-text" id="picurl1<%=n%>" value="" readonly="readonly" /> <input type="button" id="uploadButton1<%=n%>" value="上传截图1" />
      <input name="pic2<%=n%>" type="hidden" class="ke-input-text" id="picurl2<%=n%>" value="" readonly="readonly" /> <input type="button" id="uploadButton2<%=n%>" value="上传截图2" />
      <input name="pic3<%=n%>" type="hidden" class="ke-input-text" id="picurl3<%=n%>" value="" readonly="readonly" /> <input type="button" id="uploadButton3<%=n%>" value="上传截图3" />
      <input name="pic4<%=n%>" type="hidden" class="ke-input-text" id="picurl4<%=n%>" value="" readonly="readonly" /> <input type="button" id="uploadButton4<%=n%>" value="上传截图4" />
      <input name="pic5<%=n%>" type="hidden" class="ke-input-text" 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=" 商户回复 "/>
	 <%end if%>
	 <input name="touid" type="hidden" id="touid" value="<%=rs("ayjubaoid")%>" />	
     <input name="sum" type="hidden" id="sum" value="<%=n%>" /> </td>
    </tr>
  </table></td></tr>
  
  <tr><td height="30" colspan="6" align="center" class="border_bottom">&nbsp;</td></tr>
  </form>
<%
n=n+1
rs.movenext  '指针向下移动
if n>=rs.pagesize then exit do
loop
zongshu=rs.RecordCount
else
%>
  <tr>
    <td height="30" colspan="6" align="center" class="border_bottom border_right">未收到投诉/举报</td>
    </tr>
<%end if%> 

  <tr>
    <td height="30" colspan="6" class="border_bottom border_right">&nbsp;<%call pageye()%></td>
    </tr>
</table>

  <br>
</DIV>


</DIV></DIV>
<DIV class=clear></DIV></DIV>
</DIV>


	<!--#include virtual="/show/foot.asp"-->


