<!--#include file="includes/connect.asp"-->
<!--#include file="config.asp" -->

<html>
<head>
<meta http-equiv="Refresh" content="<%=application("MsgRefreshDelay")%>" />

<link href="styles.css" rel="stylesheet" type="text/css" />
</head>


<title>Matrimonials, Indian Matrimonial - findyourfate.com marriage website Online chat</title>
<body   leftmargin="5" bgcolor="#ffffff" >

<%

 Set rs1 = Server.CreateObject("ADODB.recordset")
 Set rs=Server.CreateObject("ADODB.recordset")
rs1.Open "SELECT * FROM tbl_user where user_id_pk="&request("id")&"",cn, 3,2
if rs1.eof<>true then
loginname=rs1("loginname")
end if
rs.Open "SELECT * FROM tbl_user where user_id_pk="&request("chatid")&"",cn, 3,2
if rs.eof<>true then
chatname=rs("loginname")


end if

Response.Write "<table width='100%' border='0' cellpadding='3' cellspacing='0'  align='center' >"
	Response.Write "<tr align='left'><td  style='color:#859559; font-family:Verdana, Arial, Helvetica, sans-serif; font-size:12px; text-decoration:none;'>"
	Response.Write "<strong>You are currently chatting with : " & "</strong><em>" & chatname & "</em><br />"
	Response.Write "</td></tr>"
	Response.Write "</table>"
	
			Set rs11=Server.CreateObject("ADODB.recordset")
	rs11.open "select * from  users where username='"&request("id") &"'",strConnString, 1, 1
	if rs11.eof<>true then
	Response.Write "<br><center><font color='red'>## " &loginname &" Has Logged on  "&rs11("loggedon")&" ##</center></font> <br />"
	
	end if	
	
Set rs=Server.CreateObject("ADODB.recordset")
	rs.open "select * from  MESSAGES  ORDER BY MESSAGEID DESC",strConnString, 1, 1
	
if rs.eof<>true then
			rs.MoveLast
			
			i=0
			Do
				i=i+1
			Response.Write "<br>"
				varUser = rs("USERname")
				varMessage = rs("MESSAGE")
				varStyle = rs("STYLE")
				varColour = rs("COLOUR")
				varTime = rs("TIMEOFPOST")
				varTime = FormatDateTime(varTime, 4)
				varMessageTo = rs("MESSAGETO")
				
				
		Set rs1=Server.CreateObject("ADODB.recordset")

	rs1.open "select * from  setup where chatname='"&request("id")&"' and allowEmoticons=true ORDER BY setupID DESC",strConnString, 1, 1
	if rs1.eof<>true then
				
					%>
					<!--#include file="inc_emoticons.asp"-->
					<%
				End If
				
					
			Response.Write "<font color=" & varColour & "><span style='font-family:verdana; font-size: 11px;'>" & varUser & " :</span></font><font color=" & varColour & "> <" & varStyle & "><span style='font-family:verdana; font-size: 11px;'>" & varMessage & "</span></font></" & varStyle & ">"
			
					
			
			
				rs.MovePrevious
			Loop Until i=varMessageNumber OR rs.BOF
	
	
			
End If
%>
</body>
</html>
