|
|
|
<%
const numPerPage = 100
if request("curPage") = "" then
curPage = 1
else
curPage = request("curPage")
end if
//Response.Write(Request.Form & " ")
strJC = Trim(Request("txtjobcat"))
//comentat de mine azi!
//if (strJC = "" or strJC = -1) then
// strJC = -1
// end if
//Response.Write strJC & " jobca"
%>
<%
Dim conntemp
comjcat = GetComboboxOptions( "Js_CatMaster", "CatId,name", " name ASC", " where CatId <> 0",Request.form("txtjobcat"), "CatId", "","name", "")
If Request("checkbox")<>"" then
Catid=Split(Request("checkbox"),",")
for i=lbound(Catid) to ubound(Catid)
Sql="Delete from jobdetails where JobId="&Catid(i)
on error resume next
Call Updatedatabase(Sql,Grs)
msg="Selected job deleted from database"
Next
End If
%>
<%
Sql="Select ltrim(JTitle) as JTitle,Cdate,JobId as Id ,dispcolor,companyName, ctcountry, cstate, ctstate, region, jobCat, ability,jobDes from jobdetails where active = '1'"
if (strJC <> "") then
Sql = Sql & " and jobCat = '" & Trim(Request("txtjobcat")) & "'"
End if
//add sport filter
if (Trim(Request("sport")) <> "") then
Sql = Sql & " and SportName = '" & Trim(Request("sport")) & "'"
End if
strRegion = Request("txtjobcat")
//Response.Write strRegion & " kuku"
//writing search string to file/////////////////////////////////////////////////////
if (Trim(Request("Region")) <> "") then
//set a cookie
//Response.Cookies("") = "true"
//Response.Cookies("Jobs4Sports").Expires=
If Request.Cookies("Jobs4Sports") = "true" Then
Else
// if (Trim(Request("txtjobcat")) <> "") then
selCat = Request("txtjobcat")
// end if
if(selCat = 1) then searchedCat = "Computers, Internet & Technical"
if(selCat = 2) then searchedCat = "Sales & Marketing"
if(selCat = 16) then searchedCat = "Media & Production"
if(selCat = 17) then searchedCat = "Health, Fitness & Trainers"
if(selCat = 18) then searchedCat = "Internships & Apprenticeships"
if(selCat = 19) then searchedCat = "Coaching & Instructors"
if(selCat = 21) then searchedCat = "Executive, Admin & Management"
if(selCat = 22) then searchedCat = "Entertainment"
if(selCat = 23) then searchedCat = "Operations"
if(selCat = 24) then searchedCat = "Events, PR & Promotions"
if(selCat = 26) then searchedCat = "Customer & Client Services"
if(selCat = 27) then searchedCat = "Graphic & Creative Design"
if(selCat = 29) then searchedCat = "Academic Athletics"
//ip = Request.ServerVariables("REMOTE_ADDR")
ip = Request.ServerVariables("REMOTE_HOST")
selRegion = Request("Region")
if(selRegion = 15) then searchedRegion = "Southwest"
if(selRegion = 14) then searchedRegion = "Northwest"
if(selRegion = 16) then searchedRegion = "Northeast"
if(selRegion = 17) then searchedRegion = "Southeast"
if(selRegion = 24) then searchedRegion = "South"
if(selRegion = 20) then searchedRegion = "West"
if(selRegion = 32) then searchedRegion = "Midwest"
if(selRegion = 19) then searchedRegion = "East"
dim fs, filereadstream, tmpfile, mystring
Set fs = CreateObject("Scripting.FileSystemObject")
Set filereadstream = fs.OpenTextFile(Server.MapPath("\") & "/counter.txt", 1)
set t=fs.OpenTextFile(Server.MapPath("\") & "/counter.txt",8,false)
t.writeline(ip & " searched jobs in " & searchedCat & " category " & "and " & searchedRegion & " region")
//set t=fs.OpenTextFile(Server.MapPath("\") & "/counter.txt",1,false)
//do while t.AtEndOfStream<>true
//x=t.ReadLine
// Response.write(t.readline & " ")
//loop
t.close
Response.Cookies("Jobs4Sports") = "true"
Response.Cookies("Jobs4Sports").Expires=Date+1
End If
End if
//end writing search string to file///////////////////////////////////////////////////
if (Trim(Request("Region")) <> "") then
Sql = Sql & " and region = '" & Trim(Request("Region")) & "'"
End if
//if Sql <> "" and Request("order") = "" then
//Sql = Sql & " Order By ltrim(JTitle) asc "
Sql = Sql & " Order By cdate desc "
//end if
//Response.Write Sql & " "
%>
<%
cnt=1
//St=St&"&txtcname="&Request("txtcname")
//St=St&"&txtjobcat="&Request("txtjobcat") //commented by Daniel
on error resume next
Call getFromDatabasePerPage(Sql,Rs)
If (Not Rs.Eof or Request("txtjobcat")>0 ) then
%>
|
THE MOST RECENT SPORTS JOB LISTINGS ARE DISPLAYED FIRST. |
<%
Rs.moveFirst
Rs.pageSize = numPerPage
totalPages = Rs.PageCount
Rs.absolutePage = curPage
count=0
i=((curPage-1)*numPerPage)+1
do while not rs.eof and count < Rs.pageSize
strCname = Rs("companyName")
strdispcolor = Rs("dispcolor")
strRegion = Rs("region")
strCountry = Rs("ctcountry")
strState = Rs("cstate")
strArea = Rs("Area")
strRegion2 = Rs("region")
strCdate = Rs("cdate")
strCdate = Left(strCdate, 9)
strAbility = Rs("ability")
strAbility = Left(strAbility, 175)
if IsNull(strdispcolor) then dispColor="Black"
if strdispcolor="" then dispColor="Black"
%>
|
<% if Request("order") <> "" then %>
<%=strCdate%>
<% else %>
<%=cnt%>
<% end if %>
|
<%=Replace(Rs("JTitle"),"#","-")%> <%=Rs("JobDes")%>
|
<% if Request("Area") = "" then %>
<%
if strRegion = "20" then strRegion = "Western USA"
if strRegion = "9" then strRegion = "Western Canada"
if strRegion = "11" then strRegion = "Canadian Maritimes"
if strRegion = "12" then strRegion = "Eastern Canada"
if strRegion = "13" then strRegion = "Western Canada"
if strRegion = "14" then strRegion = "Northwestern USA"
if strRegion = "15" then strRegion = "Southwestern USA"
if strRegion = "16" then strRegion = "Northeastern USA"
if strRegion = "17" then strRegion = "Southeastern USA"
if strRegion = "19" then strRegion = "Eastern USA"
if strRegion = "21" then strRegion = "Australia"
if strRegion = "22" then strRegion = "New Zealand"
if strRegion = "23" then strRegion = "United Kingdom"
if strRegion = "24" then strRegion = "Southern USA"
if strRegion = "25" then strRegion = "East Asia - Pacific Region"
if strRegion = "26" then strRegion = "Europe"
if strRegion = "27" then strRegion = "England"
if strRegion = "28" then strRegion = "United States"
if strRegion = "29" then strRegion = "Canada"
if strRegion = "30" then strRegion = "Northern Midwest USA"
if strRegion = "31" then strRegion = "Southern Midwest USA"
if strRegion = "32" then strRegion = "Midwestern USA"
if strRegion = "18" then strRegion = ""
%>
<%=strRegion%>
<% end if
if Request ("Area") <> "" then %>
<%=strState%>
<% end if %>
|
|
Learn More
|
<%
i=i+1
count = count + 1
cnt=cnt+1
Rs.movenext
loop
%>
<%
if msg <> "" then
%>
| <%=msg%> |
<%
end if
%>
|
|
<% %>
|
Page <%=curPage%> of <%=Rs.PageCount%> |
|
Total <%=(Rs.RecordCount)%> Jobs |
<% if Request("Area") = "USA" and Request("Region") = "" or Request("Region") = "66" then
strRegion2 = "66"
end if %>
<%if (Rs.RecordCount) > (Rs.PageSize) then %>
|
Pages :
<%
if(selRegion = 1000) then
selRegion = ""
end if
%>
<%if (curPage > 1) then%>
<< First
< Prev
<%end if %>
<%for i= 1 to Rs.PageCount %>
<%if (cInt(curPage) = i) then %>
<%=i%>
<%else%>
<%=i%>
<%end if%>
<%next%>
<%
if ((curPage+1) <= (Rs.PageCount)) then
%>
Next >
Last >>
<% end if %> |
<%
End if
%>
<% Else%>
<%End if%>
|
|
| | | | | |