%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<%
openconn
set rs=server.CreateObject("adodb.recordset")
rs.open"Select * from tblconfig",conn
%>
<%
thuoc=request("thuoc")
%>
<%
If thuoc="0" then
timkiem=request("timkiem")
gioitinh=request("gioitinh")
tinhtrang=request("tinhtrang")
openconn
set rs= server.CreateObject("adodb.recordset")
If tinhtrang="3" then
If gioitinh="3" then
rs.open "SELECT * from tblgiapha where name like N'%"&timkiem&"%'", conn,3,1
else
rs.open "SELECT * from tblgiapha where name like N'%"&timkiem&"%' and gioitinh like '%"&gioitinh&"%' ", conn,3,1
End if
Else
If gioitinh="3" then
rs.open "SELECT * from tblgiapha where name like N'%"&timkiem&"%' and tinhtrang like '%"&tinhtrang&"%' ", conn,3,1
else
rs.open "SELECT * from tblgiapha where name like N'%"&timkiem&"%' and tinhtrang like '%"&tinhtrang&"%' and gioitinh like '%"&gioitinh&"%'", conn,3,1
End if
End if
If Request.QueryString("tab") = "" Then
intCurrentPage = 1
Else
intCurrentPage = CInt(Request.QueryString("tab"))
End If
RS.PageSize = 10
If rs.PageCount > 0 then
rs.AbsolutePage = intCurrentPage
Else
intCurrentPage = 0
End If
tt=1
j=1
i=1
'do while not rs.eof
%>
|
|
|
|
|
|
|
|
|
|
|
|
|
<%
If rs.PageCount > 1 then
'Print Previous Page if required
If intCurrentPage <> 1 then
Response.Write "Trang trước"
Else
Response.Write "Trang trước"
End If
'Print direct access page numbers.
For intCount = 1 to rs.PageCount
If intCount = 1 then
Response.Write " | "
End If
If intCount = intCurrentPage then
Response.Write ""&intCount & " | "
Else
Response.Write "" & intCount & " | "
End If
Next
'Print Next Page if required
If intCurrentPage <> rs.PageCount then
Response.Write "Trang sau"
Else
Response.Write "Trang sau"
End If
End If
Response.Write " Trang " & intCurrentPage & " / " & rs.PageCount
%>
|
|
 |
<%end if%>
<%
If thuoc="1" then
timkiem=request("timkiem")
gioitinh=request("gioitinh")
tinhtrang=request("tinhtrang")
openconn
set rs= server.CreateObject("adodb.recordset")
If tinhtrang="3" then
If gioitinh="3" then
rs.open "SELECT * from tblgiaphangoai where name like N'%"&timkiem&"%'", conn,3,1
else
rs.open "SELECT * from tblgiaphangoai where name like N'%"&timkiem&"%' and gioitinh like '%"&gioitinh&"%' ", conn,3,1
End if
Else
If gioitinh="3" then
rs.open "SELECT * from tblgiaphangoai where name like N'%"&timkiem&"%' and tinhtrang like '%"&tinhtrang&"%' ", conn,3,1
else
rs.open "SELECT * from tblgiaphangoai where name like N'%"&timkiem&"%' and tinhtrang like '%"&tinhtrang&"%' and gioitinh like '%"&gioitinh&"%'", conn,3,1
End if
End if
If Request.QueryString("tab") = "" Then
intCurrentPage = 1
Else
intCurrentPage = CInt(Request.QueryString("tab"))
End If
RS.PageSize = 10
If rs.PageCount > 0 then
rs.AbsolutePage = intCurrentPage
Else
intCurrentPage = 0
End If
tt=1
j=1
i=1
'do while not rs.eof
%>
|
|
|
|
|
|
|
|
|
|
|
| THỨ TỰ |
HỌ VÀ TÊN |
QUAN HỆ |
CỦA |
GIỚI TÍNH |
TÌNH TRẠNG |
<%
do while not rs.eof
%>
| <%=tt%> |
" class="giapha2" title="Xem thông tin về <%= rs("name") %>"><%= rs("name") %> |
<% If rs("kieu")=1 then%><% If rs("gioitinh")=1 then%>Chồng<%else%>Vợ<%end if%><%else%>Con<%end if%> |
<%
openconn
set rs5= server.CreateObject("adodb.recordset")
rs5.open "select b.*,a.name AS tengoi from tblgiaphangoai a INNER JOIN tblgiapha b ON a.idgiapha = b.idmodule where b.idmodule='"&rs("idgiapha")&"' ", conn
if not rs5.eof then
%>
" class="giapha2" title="Xem thông tin về <%= rs5("name") %>"><%=rs5("name")%>
<%
end if
rs5.close
%>
|
<% if rs("gioitinh")=0 then %> Không rõ <% elseif rs("gioitinh")=1 then %> Nam<% else %>Nữ<% end if %> |
<% if rs("tinhtrang")=0 then %> Không rõ <% elseif rs("tinhtrang")=1 then %> Còn sống<% else %>Đã mất<% end if %> |
<%
if j=RS.PageSize then
exit do
end if
tt=tt+1
j=j+1
i = i + 1
RS.MoveNext
loop
%>
|
<%
If rs.PageCount > 1 then
'Print Previous Page if required
If intCurrentPage <> 1 then
Response.Write "Trang trước"
Else
Response.Write "Trang trước"
End If
'Print direct access page numbers.
For intCount = 1 to rs.PageCount
If intCount = 1 then
Response.Write " | "
End If
If intCount = intCurrentPage then
Response.Write ""&intCount & " | "
Else
Response.Write "" & intCount & " | "
End If
Next
'Print Next Page if required
If intCurrentPage <> rs.PageCount then
Response.Write "Trang sau"
Else
Response.Write "Trang sau"
End If
End If
Response.Write " Trang " & intCurrentPage & " / " & rs.PageCount
%>
|
|
 |
<%end if%>