<!--#include virtual="/show/adminhead.asp"-->
<!--#include file="adminleft.asp"-->
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />

<%
call logquanxian("g2",1)

if SafeRequest("act")="zhuijia" then
id=SafeRequest("id")
zhuicon=SafeRequestform("zhuicon")
smail=SafeRequestform("smail")
stel=SafeRequestform("stel")
uid=SafeRequestform("uid")

aygdpic1=trim(SafeRequestform("pic1"))
aygdpic2=trim(SafeRequestform("pic2"))
aygdpic3=trim(SafeRequestform("pic3"))
aygdpic4=trim(SafeRequestform("pic4"))
aygdpic5=trim(SafeRequestform("pic5"))

if trim(zhuicon)="" then call PopErr("请填写回复内容")
if trim(smail)="" then call PopErr("商户邮箱获取错误")
if trim(stel)="" then call PopErr("商户电话获取错误")
if trim(uid)="" then call PopErr("商户ID获取错误")

sql="select * from aygongdan where aygdid="&id&"" 
rs.open sql,conn,1,3
	if not(rs.bof and rs.eof) then
	rs("aygdisnew")=1
	rs("aygdzt")=2
	rs.update
	end if
rs.close

sql="select * from aygongdan" 
rs.open sql,conn,1,3
rs.addnew
rs("aygdhdate")=now()
rs("aygduid")=clng(uid)
rs("aygdhuifu")=1
rs("aygdshangid")=id
rs("aygdcon")=zhuicon
if aygdpic1<>"" then rs("aygdpic1")=aygdpic1
if aygdpic2<>"" then rs("aygdpic2")=aygdpic2
if aygdpic3<>"" then rs("aygdpic3")=aygdpic3
if aygdpic4<>"" then rs("aygdpic4")=aygdpic4
if aygdpic5<>"" then rs("aygdpic5")=aygdpic5
rs.update
rs.close


'title1="来自"&webname&"-投诉有了新的进展"     
'body1="您的投诉得到了新的回复，使用查询密码进行查看，可再次回复或撤销投诉。登录地址"&weburl&"tousu"
'conn.Execute("Insert Into mailto(mto,mti,mcon) values('"&trim(tmail)&"','"&trim(title1)&"','"&trim(body1)&"')")
'conn.Execute("Insert Into mailto(mfs,mto,mcon) values('1','"&trim(ttel)&"','"&trim(body1)&"')")


call PopErr2("工单回复成功！","admingongdan.asp")
end if




%>

<title><%=webname%>-最高权限-工单回复</title> 

<DIV>

<%
id=SafeRequest("id")
if id="" then call PopErr("获取参数错误") 
%>
<DIV id=main1200> 
<%call webleft()%>
<DIV id=main_right>
<DIV id=main_right_content>
<STYLE>.apply_style {
	POSITION: absolute
}
.right_title A {
	LINE-HEIGHT: 27px; WIDTH: 126px; DISPLAY: inline-block; BACKGROUND: url(<%=ossurl%>images/bg22.gif) no-repeat; HEIGHT: 27px
}
.right_title A.current {
	BACKGROUND: url(<%=ossurl%>images/main_right_title_bg.gif) no-repeat; COLOR: #fff; FONT-WEIGHT: bold
}
.table_style_1 TD {
	HEIGHT: 38px
}
.table_style_home_info TD {
	PADDING-BOTTOM: 0px; PADDING-LEFT: 10px; PADDING-RIGHT: 0px; HEIGHT: 30px; PADDING-TOP: 0px
}
</STYLE>
<script language="javascript">
function show(str)
{
	document.getElementById("zhuicon").value=str;
}

</script>
<DIV class=right_titleadmin>&nbsp;&nbsp;举报管理</DIV>
<DIV class=main>
<br>

  <table width="90%" border="0" align="center" cellpadding="0" cellspacing="0"  class="table_style_a1">
    <tr>
      <td height="30" align="center" class="border_bottom border_right" style="font-weight: bold">工单ID</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 border_right" style="font-weight: bold">工单标题</td>
      <td align="center" class="border_bottom " style="font-weight: bold">工单状态</td>
    </tr>
<%
sql="select * from aygongdan where aygdid="&id&" order by aygdid desc" 
rs.open sql,conn,1,1
if not(rs.bof and rs.eof) then
%>
<form method="post" name="form1" id="form1" action="?act=zhuijia&id=<%=id%>">
    <tr>
      <td height="30" align="center" class="border_bottom border_right"><%=rs("aygdid")%></td>
      <td height="30" align="center" class="border_bottom border_right"><%=rs("aygddate")%></td>
      <td align="center" class="border_bottom border_right">
		<%
        set rsu=server.CreateObject("adodb.recordset")
        rsu.open "select * from ayname where aynameid='"&rs("aygduid")&"'" ,conn,1,1
        if not(rsu.bof and rsu.eof) then
        smail=trim(rsu("aymail"))
        stel=trim(rsu("aytel"))
        response.Write trim(rsu("aytrueuser"))
        end if
        rsu.close
        %>	  
      </td>
      <td align="center" class="border_bottom border_right"><%=trim(rs("aygdleibie"))%></td>
      <td align="center" class="border_bottom border_right"><%=trim(rs("aygdbiao"))%></td>
      <td align="center" class="border_bottom "><%if cint(rs("aygdzt"))=0 then response.Write "<span style=color:#FF0000>处理中</span>"
	if cint(rs("aygdzt"))=1 then response.Write "<span style=color:#00CC00>处理完毕</span>"
	if cint(rs("aygdzt"))=2 then response.Write "<span style=color:#00CC00>待商户回复</span>"
	%></td>
    </tr>
    <tr>
      <td height="30" colspan="6" align="center">
                <br>
                <table width="95%" border="0" cellpadding="0" cellspacing="0" >
                      
                          <tr>
                            <td width="110" align="left" style="line-height:20px; border-bottom:solid 1px #CCC">
                <%
                con=Replace(trim(rs("aygdcon")),CHR(13), "<br>")
                response.Write "【"&rs("aygddate")&"】商家提问："
                %>
                           </td>
                            <td width="518" align="left" style="line-height:20px; border-bottom:solid 1px #CCC"><%=con%><br>
                            <%
							if trim(rs("aygdpic1"))<>"" then response.Write "<a href="&trim(rs("aygdpic1"))&" target=_blank><img src="&trim(rs("aygdpic1"))&" width=100 height=100/></a>&nbsp;&nbsp;"
							if trim(rs("aygdpic2"))<>"" then response.Write "<a href="&trim(rs("aygdpic2"))&" target=_blank><img src="&trim(rs("aygdpic2"))&" width=100 height=100/></a>&nbsp;&nbsp;"
							if trim(rs("aygdpic3"))<>"" then response.Write "<a href="&trim(rs("aygdpic3"))&" target=_blank><img src="&trim(rs("aygdpic3"))&" width=100 height=100/></a>&nbsp;&nbsp;"
							if trim(rs("aygdpic4"))<>"" then response.Write "<a href="&trim(rs("aygdpic4"))&" target=_blank><img src="&trim(rs("aygdpic4"))&" width=100 height=100/></a>&nbsp;&nbsp;"
							if trim(rs("aygdpic5"))<>"" then response.Write "<a href="&trim(rs("aygdpic5"))&" target=_blank><img src="&trim(rs("aygdpic5"))&" width=100 height=100/></a>&nbsp;&nbsp;"
							%>
                            </td>
                          </tr>
                          
                          
                          
                <%
                    set rsf=server.CreateObject("adodb.recordset")
                    sqlf="select * from aygongdan where aygduid="&rs("aygduid")&" and aygdshangid="&rs("aygdid")&" order by aygdid asc" 
                    rsf.open sqlf,conn,1,1
                    if not(rsf.bof and rsf.eof) then
                    do while not rsf.eof
                    %>
                    
                          <tr>
                            <td width="110" align="left" style="line-height:20px; border-bottom:solid 1px #CCC">
                <%
                con=Replace(trim(rsf("aygdcon")),CHR(13), "<br>")
                if cint(rsf("aygdhuifu"))=1 then
                response.Write "【"&rsf("aygdhdate")&"】管理回复："
                else
                response.Write "【"&rsf("aygdhdate")&"】商家提问："
                end if
                %>
                            </td>
                            <td width="518" align="left" style="line-height:20px; border-bottom:solid 1px #CCC"><%=con%><br>
                            <%
							if trim(rsf("aygdpic1"))<>"" then response.Write "<a href="&trim(rsf("aygdpic1"))&" target=_blank><img src="&trim(rsf("aygdpic1"))&" width=100 height=100/></a>&nbsp;&nbsp;"
							if trim(rsf("aygdpic2"))<>"" then response.Write "<a href="&trim(rsf("aygdpic2"))&" target=_blank><img src="&trim(rsf("aygdpic2"))&" width=100 height=100/></a>&nbsp;&nbsp;"
							if trim(rsf("aygdpic3"))<>"" then response.Write "<a href="&trim(rsf("aygdpic3"))&" target=_blank><img src="&trim(rsf("aygdpic3"))&" width=100 height=100/></a>&nbsp;&nbsp;"
							if trim(rsf("aygdpic4"))<>"" then response.Write "<a href="&trim(rsf("aygdpic4"))&" target=_blank><img src="&trim(rsf("aygdpic4"))&" width=100 height=100/></a>&nbsp;&nbsp;"
							if trim(rsf("aygdpic5"))<>"" then response.Write "<a href="&trim(rsf("aygdpic5"))&" target=_blank><img src="&trim(rsf("aygdpic5"))&" width=100 height=100/></a>&nbsp;&nbsp;"
							%>
                            </td>
                          </tr>
                <%
                    rsf.movenext  
                    loop
                    end if
                    rsf.close
                %>
                          
                          
                          <tr>
                            <td colspan="2" align="left" style="line-height:20px;">
                              <br><br>
                              <%if cint(rs("aygdzt"))<>1 then%>
                              <textarea name="zhuicon" cols="120" rows="7" id="zhuicon"></textarea>
                              <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>
<script>
			KindEditor.ready(function(K) {
				var uploadbutton1 = K.uploadbutton({
					button : K('#uploadButton1')[0],
					fieldName : 'imgFile',
					url : '/kindeditor/asp/upload_gongdan.asp?dir=image',
					afterUpload : function(data) { 
						if (data.error === 0) {
							var url = K.formatUrl(data.url, '');
							urlcon=url.replace("/kindeditor/asp/../../","/"); 
							K('#picurl1').val(urlcon);
							con1.innerHTML='<a href='+urlcon+' target=_blank><img src='+urlcon+' width=100 height=100/></a>';
						} else {
							alert(data.message);
						}
					},
					afterError : function(str) {
						alert('自定义错误信息: ' + str);
					}
				});
				uploadbutton1.fileBox.change(function(e) {
					uploadbutton1.submit();
				});
			});
			
			KindEditor.ready(function(K) {
				var uploadbutton2 = K.uploadbutton({
					button : K('#uploadButton2')[0],
					fieldName : 'imgFile',
					url : '/kindeditor/asp/upload_gongdan.asp?dir=image',
					afterUpload : function(data) { 
						if (data.error === 0) {
							var url = K.formatUrl(data.url, 'absolute');
							urlcon=url.replace("/kindeditor/asp/../../","/"); 
							K('#picurl2').val(urlcon);
							con2.innerHTML='<a href='+urlcon+' target=_blank><img src='+urlcon+' width=100 height=100/></a>';
						} else {
							alert(data.message);
						}
					},
					afterError : function(str) {
						alert('自定义错误信息: ' + str);
					}
				});
				uploadbutton2.fileBox.change(function(e) {
					uploadbutton2.submit();
				});
			});
			
			KindEditor.ready(function(K) {
				var uploadbutton3 = K.uploadbutton({
					button : K('#uploadButton3')[0],
					fieldName : 'imgFile',
					url : '/kindeditor/asp/upload_gongdan.asp?dir=image',
					afterUpload : function(data) { 
						if (data.error === 0) {
							var url = K.formatUrl(data.url, 'absolute');
							urlcon=url.replace("/kindeditor/asp/../../","/"); 
							K('#picurl3').val(urlcon);
							con3.innerHTML='<a href='+urlcon+' target=_blank><img src='+urlcon+' width=100 height=100/></a>';
						} else {
							alert(data.message);
						}
					},
					afterError : function(str) {
						alert('自定义错误信息: ' + str);
					}
				});
				uploadbutton3.fileBox.change(function(e) {
					uploadbutton3.submit();
				});
			});
			
			KindEditor.ready(function(K) {
				var uploadbutton4 = K.uploadbutton({
					button : K('#uploadButton4')[0],
					fieldName : 'imgFile',
					url : '/kindeditor/asp/upload_gongdan.asp?dir=image',
					afterUpload : function(data) { 
						if (data.error === 0) {
							var url = K.formatUrl(data.url, 'absolute');
							urlcon=url.replace("/kindeditor/asp/../../","/"); 
							K('#picurl4').val(urlcon);
							con4.innerHTML='<a href='+urlcon+' target=_blank><img src='+urlcon+' width=100 height=100/></a>';
						} else {
							alert(data.message);
						}
					},
					afterError : function(str) {
						alert('自定义错误信息: ' + str);
					}
				});
				uploadbutton4.fileBox.change(function(e) {
					uploadbutton4.submit();
				});
			});
			
			KindEditor.ready(function(K) {
				var uploadbutton5 = K.uploadbutton({
					button : K('#uploadButton5')[0],
					fieldName : 'imgFile',
					url : '/kindeditor/asp/upload_gongdan.asp?dir=image',
					afterUpload : function(data) { 
						if (data.error === 0) {
							var url = K.formatUrl(data.url, 'absolute');
							urlcon=url.replace("/kindeditor/asp/../../","/"); 
							K('#picurl5').val(urlcon);
							con5.innerHTML='<a href='+urlcon+' target=_blank><img src='+urlcon+' width=100 height=100/></a>';
						} else {
							alert(data.message);
						}
					},
					afterError : function(str) {
						alert('自定义错误信息: ' + str);
					}
				});
				uploadbutton5.fileBox.change(function(e) {
					uploadbutton5.submit();
				});
			});
		</script>
        &nbsp;&nbsp;<input name="pic1" type="hidden" class="ke-input-text" id="picurl1" value="" readonly="readonly" /> <input type="button" id="uploadButton1" value="添加图片1" />
		&nbsp;&nbsp;<input name="pic2" type="hidden" class="ke-input-text" id="picurl2" value="" readonly="readonly" /> <input type="button" id="uploadButton2" value="添加图片2" />
		&nbsp;&nbsp;<input name="pic3" type="hidden" class="ke-input-text" id="picurl3" value="" readonly="readonly" /> <input type="button" id="uploadButton3" value="添加图片3" />
		&nbsp;&nbsp;<input name="pic4" type="hidden" class="ke-input-text" id="picurl4" value="" readonly="readonly" /> <input type="button" id="uploadButton4" value="添加图片4" />
		&nbsp;&nbsp;<input name="pic5" type="hidden" class="ke-input-text" id="picurl5" value="" readonly="readonly" /> <input type="button" id="uploadButton5" value="添加图片5" />
        <br><span id="con1"></span>&nbsp;&nbsp;<span id="con2"></span>&nbsp;&nbsp;<span id="con3"></span>&nbsp;&nbsp;<span id="con4"></span>&nbsp;&nbsp;<span id="con5"></span>
                              
                              <br>
                              <input type="submit" name="Submit" value="管理员回复"/> <a onClick="javascript:return confirm('您确定要关闭工单吗？');" href="admingongdan.asp?act=off&id=<%=rs("aygdid")%>">【关闭工单】</a>
                              <%end if%>
                              <input name="smail" type="hidden" id="smail" value="<%=smail%>">
                              <input name="stel" type="hidden" id="stel" value="<%=stel%>">
                              <input name="uid" type="hidden" id="uid" value="<%=rs("aygduid")%>">
                              <br>
                              <br>
                              常用回复<br>
                              <span style="cursor:pointer" onClick="show('请买家与平台客服QQ<%=fuwuqq%>联系')">[请买家与平台客服QQ<%=fuwuqq%>联系]</span><br>
                              <span style="cursor:pointer" onClick="show('请卖家与平台客服QQ<%=fuwuqq%>联系')">[请卖家与平台客服QQ<%=fuwuqq%>联系]</span><br>
                                                       <span style="cursor:pointer" onClick="show('请商户积极妥善处理 谢谢')">[请商户积极妥善处理 谢谢]</span><br>
                              <span style="cursor:pointer" onClick="show('请买家提供交易过程相关截图或有力证据 谢谢')">[请买家提供交易过程相关截图或有力证据 谢谢]</span><br>
                              <span style="cursor:pointer" onClick="show('请商户注意：爱卡平台有权冻结商户资金 直至该投诉被买家撤销')">[请商户注意：爱卡平台有权冻结商户资金 直至该投诉被买家撤销]</span><br>
                              <span style="cursor:pointer" onClick="show('寄售只提供发卡服务 并不是销售商 提卡后续使用问题 请联系商户 商品购买页面有商户联系方式 谢谢')">[寄售只提供发卡服务 并不是销售商 提卡后续使用问题 请联系商户 商品购买页面有商户联系方式 谢谢]</span><br>
                              <span style="cursor:pointer" onClick="show('我们一直提示：购买前请务必向商户了解该商品的具体信息，与商户达成一致后方可购买')">[我们一直提示：购买前请务必向商户了解该商品的具体信息，与商户达成一致后方可购买]</span><br>
                              <span style="cursor:pointer" onClick="show('免责声明！向陌生人付款，请注意交易风险，否则造成的经济损失自负！选择平台VIP会员保障会更高！本站仅是提供自动发卡服务，并非销售商，相关售后问题并不负责，由此产生的交易纠纷由双方自行处理，与本平台无关！')">[免责声明!向陌生人付款，请注意交易风险，否则造成的经济损失自负！选择平台VIP会员保障会更高！
                本站仅是提供自动发卡服务，并非销售商，相关售后问题并不负责，由此产生的交易纠纷由双方自行处理，与本平台无关！]</span></td>
                          </tr>
                
                
                      </table>
      
      
      </td>
    </tr>
    </form>
    <%
end if
rs.close%>
  </table>




</DIV></DIV>
<DIV class=clear></DIV></DIV>
</DIV>
<SCRIPT>
$(function(){
$('.left_title').each(function(){
   $(this).click(function(){
	   var index=$('.left_title').index(this);
	   if($(this).next().hasClass('hide_m')){
		   $(this).next().removeClass('hide_m');
           $(this).next().show();		 
		   $(this).find('img').attr('src','<%=ossurl%>images/expansion.gif');
		   $.cookie('m_index_'+index,'',{expires:0});
	   } else {
	       $(this).next().hide();
		   $(this).next().addClass('hide_m');
		   $(this).find('img').attr('src','<%=ossurl%>images/shrank.gif');		   
		   $.cookie('m_index_'+index,'none',{expires:365});
	   }
   })
})

$('.left_title').each(function(){
	var index=$('.left_title').index(this);
    $(this).next().css('display',$.cookie('m_index_'+index) ? $.cookie('m_index_'+index) : '');
	if($.cookie('m_index_'+index)){
	    $(this).next().addClass('hide_m');
	}
	$(this).find('img').attr('src',$.cookie('m_index_'+index) ? '<%=ossurl%>images/shrank.gif' : '<%=ossurl%>images/expansion.gif');
})
})

</SCRIPT>


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

