<!--#include file="../../inc/conn.asp" -->
<%
dim action,m_vid,m_type
action = be("all", "action")
m_vid = be("all", "m_vid")
m_type = be("all", "m_type")
If Not isNum(m_vid) Then writeE "非法访问"
If Not isNum(m_type) Then writeE "非法访问"
        
Select Case action
	Case "show": show
	Case "mood": mood
	Case Else: main
End Select
dispseObj()

Sub show()
        Dim rs, mood1, mood2, mood3, mood4, mood5, mood6, mood7, mood8, mood9
        Set rs = objdb.DB("SELECT * FROM {pre}mood WHERE m_vid=" & m_vid & " AND m_type=" & m_type, "rs3")
        If Not (rs.EOF And rs.Bof) Then
            mood1 = rs("mood1")
            mood2 = rs("mood2")
            mood3 = rs("mood3")
            mood4 = rs("mood4")
            mood5 = rs("mood5")
            mood6 = rs("mood6")
            mood7 = rs("mood7")
            mood8 = rs("mood8")
            mood9 = rs("mood9")
            writeA "" & mood1 & "," & mood2 & "," & mood3 & "," & mood4 & "," & mood5 & "," & mood6 & "," & mood7 & "," & mood8 & "," & mood9 & ""
        Else
            objdb.add "{pre}mood", Array("m_vid", "m_type"), Array(m_vid, m_type)
            writeA "0,0,0,0,0,0,0,0,0"
        End If
        objdb.C (rs)
    End Sub
    
    Sub mood()
        Dim typee: typee = be("get", "typee")
        If isN(typee) Then writeA "非法访问": Exit Sub
        objdb.DB "Update {pre}mood set " & typee & "=" & typee & "+1 where m_vid=" & m_vid & " and m_type=" & m_type, "exe"
        show
    End Sub
    
    Sub main()
        Dim str
        str = "var m_vid=""" & m_vid & """;"
        str = str & "var m_type=""" & m_type & """;"
        str = str & "var moodzt = ""0"";"
        str = str & "remood();"
        writeA str
    End Sub
%>