% if IsObject(getSQLConnection()) then set objConn=getSQLConnection() else Response.Redirect("error/?id=1") end if intPage=Request.QueryString("intPage") strSortItem=Request.QueryString("si") strSortMode=Request.QueryString("sm") strMyself=Request.ServerVariables("PATH_INFO") strCurrDeptSortMode=Request.QueryString("cd") strCurrLastModSortMode=Request.QueryString("cl") if strSortItem="d" and strSortMode="d" then strCurrDeptSortMode=strSortMode end if if strSortItem="l" and strSortMode="d" then strCurrLastModSortMode=strSortMode end if strLastModSortIcon="▼" strLastModSortCmd=" V.LAST_MOD_DATE" strDeptSortIcon="▼" strDeptSortCmd=" D.DEPT_TITLE" if strCurrDeptSortMode="d" then strDeptSortIcon="▲" strDeptSortCmd=" D.DEPT_TITLE DESC" end if if strCurrLastModSortMode="d" then strLastModSortIcon="▲" strLastModSortCmd=" V.LAST_MOD_DATE DESC" end if if IsInteger32(intPage) then intPage=CLng(intPage) else intPage=1 end if intParamCount=0 strParamName="" strParamValue="" if strSortItem="d" then strSortStmt=" ORDER BY " & strDeptSortCmd & "," & strLastModSortCmd else strSortStmt=" ORDER BY " & strLastModSortCmd & "," & strDeptSortCmd end if strSQL="SELECT V.VAC_ID,D.DEPT_TITLE,V.LAST_MOD_DATE,V.VAC_PROPERTY,V.VAC_TITLE,V.SINIORITY,V.AGE_GROUP,V.EDU_LEVEL FROM URT_VACANCY V,URT_DEPT D WHERE V.APPROVED='1' AND (V.ONLINE_DATE IS NULL OR (V.ONLINE_DATE IS NOT NULL AND DATEDIFF(d,V.ONLINE_DATE,GETDATE())>=0)) AND (V.OFFLINE_DATE IS NULL OR (V.OFFLINE_DATE IS NOT NULL AND DATEDIFF(d,GETDATE(),V.OFFLINE_DATE)>=0)) AND D.DEPT_ID=V.DEPT_ID" & strSortStmt set objRS=objConn.Execute(strSQL) if not objRS.eof then aryVacancy=objRS.GetRows() lngRecordCount=UBound(aryVacancy,2)+1 if lngRecordCount mod 10 = 0 then lngPageCount=lngRecordCount\10 else lngPageCount=lngRecordCount\10+1 end if if intPage>lngPageCount then intPage=lngPageCount intStartIndex=(intPage-1)*10 intEndIndex=intPage*10-1 if intEndIndex>lngRecordCount-1 then intEndIndex=lngRecordCount-1 for intCount=intStartIndex to intEndIndex strVacList=strVacList & "
" & getOptions("job_property",aryVacancy(3,intCount)) & "