%
'Session("UserID") = 33
Select case request("Mode")
case "add"
fyf()
' if cn.execute("select count(*) from Tbl_UserContacts where User_ID_FK=" & Session("UserID") & " and FavBlockUser_ID_FK=" & request.QueryString("contid"))(0)=0 then
if cn.execute("select count(*) from Tbl_UserContacts where User_ID_FK=" & Session("UserID") & " and ContactUser_ID_FK=" & request.QueryString("contid"))(0)=0 then
cn.execute "insert into Tbl_UserContacts(User_ID_FK,ContactUser_ID_FK) values(" & Session("UserID") & "," & request.QueryString("contid") & ")"
' cn.execute "insert into Tbl_UserFlaggedProfiles(User_ID_FK,FavBlockUser_ID_FK,FavBlockFlag) values(" & Session("UserID") & "," & request.QueryString("contid") & ",'F')"
session("Msg") = "Profile added to Contacts"
else
session("Msg") = "Profile already present in Contacts"
end if
case "del"
fyf()
cn.execute "delete from Tbl_UserContacts where ContactUser_ID_FK=" & request.QueryString("contid") & " and User_ID_FK=" & Session("UserID"),cnt
session("Msg") = "Profile removed from Contacts"
End Select
'Gets the "Members I am Looking for" list...
Function GetUserContacts
set RS = server.CreateObject("ADODB.Recordset")
'if session("IsFYFMember") <> true then
if session("userid") <> "" then
rs.Open "SELECT u.User_ID_PK, u.username,p.online,p.logintime,p.zodiacsign,p.gender, p.ShortDescription, p.DOB, u.active, p.closedprofile FROM tbl_user AS u, tbl_profiles AS p WHERE u.User_ID_PK=p.User_ID_FK and u.active=true and u.user_id_pk in (select ContactUser_ID_FK from Tbl_UserContacts where User_ID_FK=" & Session("UserID") & ") and u.user_id_pk=p.User_ID_FK",cn,3,1
set RS1 = server.CreateObject("ADODB.Recordset")
strRet = ""
if not (rs.EOF or rs.BOF) then
Rs.PageSize = 10
TotalPages = Rs.PageCount
iCnt = 1
rCnt= Rs.RecordCount
If Request("goPage") = "" or Clng(0 & Request("goPage")) > TotalPages then
Rs.AbsolutePage = 1
Else
if Clng(0 & Request("goPage")) > 1 then
rCnt = rCnt - (Rs.PageSize * (Clng(0 & Request("goPage"))-1))
End If
Rs.AbsolutePage = Clng(0 & Request("goPage"))
End If
Do While Not(Rs.EOF) and iCnt <= Rs.PageSize
'while not rs.EOF
'response.Write "sds": response.End
if rs("active")<>true or rs("closedprofile")=true then
else
strRet = strRet & "
" & chr(13)
strRet = strRet & "" & chr(13)
strRet = strRet & "" & chr(13)
strRet = strRet & "" & chr(13)
strRet = strRet & "" & chr(13)
'photo
rs1.Open "SELECT Photo, Priority FROM tbl_userphotos WHERE user_id_fk=" & rs("User_ID_PK") & " order by priority",cn,3,1
if not (rs1.BOF or rs1.EOF) then
if rs1(0) ="" then
strRet = strRet & " | " & chr(13)
else
strRet = strRet & " "
strRet = strRet & " Enlarge | " & chr(13)
end if
else
strRet = strRet & " | " & chr(13)
end if
rs1.Close
strRet = strRet & " " & rs("username") & " | " & chr(13)
if rs("ShortDescription")<>"" then
strRet = strRet & "" & SafeLayout(rs("ShortDescription")) & " | " & chr(13)
else
strRet = strRet & "" & trim(rs("ShortDescription")) & " | " & chr(13)
end if
'strRet = strRet & "" & year(now) - year(rs("DOB")) & " years"
strRet = strRet & " | " & chr(13)
set RSs3 = server.CreateObject("ADODB.Recordset")
rss3.Open "SELECT * from Tbl_Preferences WHERE Prefer_ID_PK=" & rs("zodiacsign") & " ",cn,3,1
if not (rss3.BOF or rss3.EOF) then
PreferenceDesc=rss3("PreferenceDesc")
if rs("gender")="M" then
strRet = strRet & "" & PreferenceDesc& ", Male, " & year(now) - year(rs("DOB")) & " years | "
else
strRet = strRet & " " & PreferenceDesc & ", Female, " & year(now) - year(rs("DOB")) & " years | "
end if
end if
if rs("Online") then strRet = strRet & "Online | "
strRet = strRet & "Recent Visit : " & formatdatetime(rs("logintime"),2)&" | "
strRet = strRet & "View Profile | Remove From Contacts | " & chr(13)
strRet = strRet & "" & chr(13)
strRet = strRet & "" & chr(13)
' if(not Rs2.eof) then
' strRet = strRet & "online" & chr(13)
' else
' strRet = strRet & " | offline" & chr(13)
' end if
strRet = strRet & " | " & chr(13)
strRet = strRet & " " & chr(13)
strRet = strRet & " " & chr(13)
strRet = strRet & " | " & chr(13)
strRet = strRet & "
" & chr(13)
strRet = strRet & "
" & chr(13)
iCnt = iCnt + 1
rCnt = rCnt - 1
end if
Rs.MoveNext
loop
else
GetUserContacts = "You have not contacted any body"
exit function
end if
strRet = strRet &" "
strRet = strRet &" "
strRet = strRet &" "
prot = "http"
https = lcase(request.ServerVariables("HTTPS"))
if https <> "off" then prot = "https"
domainname = Request.ServerVariables("SERVER_NAME")
filename = Request.ServerVariables("SCRIPT_NAME")
querystring = Request.ServerVariables("QUERY_STRING")
'response.write prot & "://" & domainname & filename & "?" & querystring
%> <%
if request.QueryString("gopage")="" or request.QueryString("gopage")="1" then
response.write "Results 1 of " & TotalPages &" Pages "
else
response.write "Results "&request.QueryString("gopage")&" of " & TotalPages &" Pages"
end if
%> <%
if rs.Pagecount>1 then
for rCount = 1 to TotalPages
if (request("gopage")="" and rcount=1) or cint(request("gopage"))=rCount then
strRet = strRet & " "& rCount &" "
else
strRet = strRet & " "&rCount&""
end if
next
end if
strRet = strRet &" | "
strRet = strRet &"
"
strRet = strRet &"
"
GetUserContacts = strRet
rs.Close
set rs = nothing
end if
End Function
Function SafeLayout(strArg)
'this code will make the descriptions safe so that it wont affect the layout...
dim spccnt,icut,strSDesc,strSDesc1
icut = 1
spccnt = 1
strSDesc = strArg
strSDesc1 = ""
for icut = 1 to len(strSDesc)
if mid(strSDesc,icut,1)=" " then
if spccnt=33 then
strSDesc1 = strSDesc1 & "
"
spccnt = 1
else
spccnt = 1
end if
else
if spccnt=33 then
strSDesc1 = strSDesc1 & "
"
'strSDesc1 = mid(strSDesc,1,icut) & " " & mid(strSDesc,icut+1)
spccnt = 0
end if
end if
strSDesc1 = strSDesc1 & mid(strSDesc,icut,1)
spccnt = spccnt + 1
next
SafeLayout = strSDesc1
End Function
World leaders in Astrology now into Match making
Kindly submit yours and your partners personal details. Your Compatibility Report will be sent to you within 5 days from submission.
|
|
<%topmenus()%><%fnsubmenu("Contacts")
|
|
Members I am looking for |
Here you can find the list of profiles you are looking for. |
<%=session("Msg")%><%session("msg")=""%> |
<%=GetUserContacts |
|
<% if session("userid")<>"" or session("username") <>"" then
<%end if
|