<%
srchkey = Request.QueryString("srchkey")
srchval = Request.QueryString("srchval")
if srchkey <> "" then
addqry = " and "&srchkey&" like '%"&srchval&"%' "
end if
Select Case Request.QueryString("page")
Case "" 'óÀ½ÆäÀÌÁö
CurrentPage = 1
Case Else
CurrentPage = cint(Request.QueryString("page"))
End Select
qstr = "&srchkey="&srchkey&"&srchval="&srchval&""
pagesize = 10
Set DbRec =Server.CreateObject("ADODB.Recordset")
Set DbRec1 =Server.CreateObject("ADODB.Recordset")
Source = "SELECT * FROM incruit WHERE 1=1 "&addqry&" ORDER BY writedate DESC"
DbRec.Open Source, db, 1
DbRec.PageSize = pagesize
lastpage= DbRec.PageCount
if not DbRec.eof then
DbRec.AbsolutePage = Currentpage
end if
sql= "SELECT total=count(*) FROM incruit WHERE 1=1 "&addqry&""
DbRec1.Open sql, db
max=DbRec1("total")
bunho= max-DbRec.PageSize*(currentpage-1)
%>
<%
If Not (DbRec.EOF and DbRec.BOF) then
i = 1
Do until DbRec.EOF Or i> DbRec.PageSize
if DbRec("status") then
status = "¸ðÁýÁß"
else
status = "Á¾·á"
end if
%>