<!--#include file="inc/Conn.asp"-->
<html>
<head>
<title>查看举报</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta name="keywords" content="jle.com">
<meta name="description" content="jle.com">
<link href="inc/Style.Css" rel="stylesheet" type="text/css">
</head>
<body style="margin:5">
<%sub cl()%>
<body onLoad="setTimeout(window.close, 2000)">
<%end sub%>
<%
Dim ID,TP,Vote,ClassID,TPJG,Num,i,userip
userip=Request.ServerVariables("REMOTE_ADDR")
'ID = CheckStr(Request("ID"),1)
ID = Request("ID")
If ID = "" Then Call ErrView("操作错误<meta http-equiv=refresh content='1;URL=Index.asp'>",0)
'TP = CheckStr(Request("TP"),1)
TP = Request("TP")
if TP<>"" then
if request.Cookies("isballot")=ID   then 
Response.Write "<script language='javascript'>alert('您已经投诉过了!');</script>"
response.write "<meta http-equiv=refresh content=""1;URL=complaint.asp?ID="&ID&""">"
response.end
end if
end if
response.Cookies("isballot")=ID   '设置该机已投诉   
'respoonse.Cookies("isballot").Expires="投诉截止日" 
Set Rs = Conn.ExeCute("Select vote From jle_info Where id="&ID&"")
If Not Rs.Eof Then
  If Rs(0) <> "" Then
    Vote = Rs(0)
  Else
    Vote = "0,0,0,0,0,0"
  End If
  Vote = Split(Vote,",")
  Num = 0
  If TP <> "" Then
    For i=0 to UBound(Vote)
      If Int(i) = Int(TP) Then
	    TPJG = TPJG & "," &Int(Vote(i))+1
	    Num = Num + Int(Vote(i))+1
	  Else
	    TPJG = TPJG & "," &Vote(i)
	    Num = Num + Int(Vote(i))
	  End If
    Next
    TPJG = Right(TPJG,Len(TPJG)-1)
    Conn.ExeCute("Update jle_info Set vote = '"&TPJG&"' Where id="&ID&"")
  Else
    For i=0 to UBound(Vote)
	  TPJG = TPJG & "," &Vote(i)
	  Num = Num + Int(Vote(i))
    Next
    TPJG = Right(TPJG,Len(TPJG)-1)
  End If
%>
<table width="340" border="0" cellspacing="1" cellpadding="5" bgcolor="#fef9f5">
  <tr bgcolor="#fef9f5"><td align=center colspan=2>感谢您的监督，总投诉：<font color=red><strong><%=Num%></strong></font> 次</td></tr>
  <tr bgcolor="#FFFFFF"><td width="120">重复信息 (<font color=red><%=Split(TPJG,",")(0)%></font>)</td><td width="220"><%=GetImg(TPJG,0,Num)%></td></tr>
  <tr bgcolor="#FFFFFF"><td>垃圾信息 (<font color=red><%=Split(TPJG,",")(1)%></font>)</td><td><%=GetImg(TPJG,1,Num)%></td></tr>
  <tr bgcolor="#FFFFFF"><td>虚假信息 (<font color=red><%=Split(TPJG,",")(2)%></font>)</td><td><%=GetImg(TPJG,2,Num)%></td></tr>
  <tr bgcolor="#FFFFFF"><td>中介信息 (<font color=red><%=Split(TPJG,",")(3)%></font>)</td><td><%=GetImg(TPJG,3,Num)%></td></tr>
  <tr bgcolor="#FFFFFF"><td>信息过时 (<font color=red><%=Split(TPJG,",")(4)%></font>)</td><td><%=GetImg(TPJG,4,Num)%></td></tr>
  <tr bgcolor="#FFFFFF"><td>分类错误 (<font color=red><%=Split(TPJG,",")(5)%></font>)</td><td><%=GetImg(TPJG,5,Num)%></td></tr>
</table>
<%
End If
Rs.Close
Set Rs = Nothing
   Function GetImg(Str,i,Num)
      Dim tStr,bStr
      If Str = "" or isnull(Str) or IsNumeric(Str)=False Then Exit Function
	  If Num = 0 Then tStr = 0 Else tStr = Int(Split(Str,",")(i))/Int(Num)
	  GetImg = "<img src=image/skin3.gif align=absmiddle height=10 width="&FormatNumber((tStr)*160,0)&"> "
	  tStr = Formatpercent(tStr,0)
	  If tStr = "%" Then tStr = "0%"
	  GetImg = GetImg & tStr
   End Function

%>
</body>
</html>