-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmain_code2.asp
63 lines (55 loc) · 2.6 KB
/
main_code2.asp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
<%
Dim RSMessages, y
y = 1
Set RSMessages = Server.CreateObject("ADODB.Recordset")
RSMessages.Open "SELECT * FROM MESSAGES WHERE UserName = '"&UserNameMM&"' AND Type = 'MainAttack' AND Seen = 'No'", ConnMM, adOpenStatic, adLockPessimistic
If RSMessages.EOF = False Then
Response.Write "<table><tr bgcolor='#ee5900'><td align = 'center' colspan=2>Recent News</td></tr>"
Do While RSMessages.EOF = FALSE
If y = 1 Then
Response.Write "<tr> <td bgcolor = '#000066'><div>Time: "&RSMessages("Time")&" </div></td><td bgcolor = '#000033'><div class = 'alert'>"&RSMessages("Message")&"</div></td></tr>"
Else
Response.Write "<tr> <td bgcolor = '#000033'><div>Time: "&RSMessages("Time")&" </div></td><td bgcolor = '#000066'><div class = 'alert'>"&RSMessages("Message")&"</div></td></tr>"
End If
RSMessages("Seen") = "Yes"
RSMessages.Update
RSMessages.MoveNext
Loop
Response.Write "</table>"
Else
Response.Write "<span class = 'normal'><center>No new recent news</center></span><br>"
End If
If Request.Querystring("news") = "yes" Then
RSMessages.Close
RSMessages.Open "SELECT * FROM MESSAGES WHERE UserName = '"&UserNameMM&"' AND Type = 'MainAttack'", ConnMM, adOpenStatic, adLockPessimistic
If RSMessages.EOF = False Then
Response.Write "<table><tr bgcolor='#ee5900'><td align = 'center' colspan=2>Recent News</td></tr>"
Do While RSMessages.EOF = FALSE
If y = 1 Then
Response.Write "<tr> <td bgcolor = '#000066'><div>Time: "&RSMessages("Time")&" </div></td><td bgcolor = '#000033'><div class = 'alert'>"&RSMessages("Message")&"</div></td></tr>"
Else
Response.Write "<tr> <td bgcolor = '#000033'><div>Time: "&RSMessages("Time")&" </div></td><td bgcolor = '#000066'><div class = 'alert'>"&RSMessages("Message")&"</div></td></tr>"
End If
RSMessages.MoveNext
Loop
Response.Write "</table>"
End If
Else
Response.Write "<div><a href = 'main.asp?news=yes' class='menu_main' style='width:200pt'>See All Recent News</a></div>"
End If
RSMessages.Close
RSMessages.Open "SELECT * FROM MESSAGES WHERE UserName = '"&UserNameMM&"' AND Type = 'PersonalMessage' AND Seen = 'No'", ConnMM, adOpenStatic, adLockPessimistic
If RSMessages.EOF = FALSE Then
Response.Write "<a href = 'messages.asp'><p align = 'center' class = 'normal'>New messages</p></a>"
Else
Response.Write "<p class = 'normal' align = 'center'>No new messages</p>"
End If
Timer2 = Timer()
TotalTime = Timer2 - Timer1
Response.Write "<p class = 'small'> This page took "&FormatNumber(TotalTime, 5)&" seconds</p>"
Set ConnMM = nothing
Set RSGIMM = nothing
Set RSGSMM = nothing
Set RSDMMM = nothing
Set RSMessages = nothing
%>