Hi,
I'm using Dreamweaver Ultradev4 - ASP
I had added a "Move to Record" server behavior to a Results
page as well as the Recordset Navigation Status feature.
All worked well until I added a commercially available Dreamweaver Template to the page. Now if the Recordset Navigation tells me I am looking at "Records 1-10 of 18"
and I click "Next" the results page does not display the remaining 8 records. The RS Navigation now says "Records 0 to 0 of 0" (on the reloaded page), instead of "Records 11 to 18 of 18"
Any ideas of what (on the added Template??) could be causing this?
Thanks in advance
Joe
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/conndb2.asp" -->
<%
'VBScript version of Basic-UltraDev Dyamic Search SQL
'for rsemployresults3
Dim tfm_andor,tfm_exact
tfm_andor = "AND"
tfm_exact = "false"
'if any words option
if Cstr(Request("anyallexact")) <> "" AND Cstr(Request("anyallexact")) = "any" Then
tfm_andor = "OR"
End If
'if exact phrase option
if Cstr(Request("anyallexact")) <> "" AND Cstr(Request("anyallexact")) = "exact" Then
tfm_exact = "true"
End If
If Cstr(Request("profile"))<> "" Then
Dim tfm_SQLstr,tfm_searchField,tfm_databaseFields,bellChar
tfm_SQLstr = " WHERE (("
tfm_searchField = lcase(Request("profile"))
tfm_databaseFields = Split("resume",",")
bellChar = chr(7)
If InStr(tfm_searchField,chr(34)) Or tfm_exact = "true" Then
tfm_searchField = Replace(tfm_searchField,chr(34),"")
tfm_andor = "OR"
ElseIf InStr(lcase(tfm_searchField)," or ") Then
tfm_searchField = Replace(tfm_searchField," or ",bellChar)
tfm_andor = "OR"
ElseIf InStr(tfm_searchField,",") Or InStr(tfm_searchField," ") Or InStr(lcase(tfm_searchField)," and ") Then
tfm_searchField = Replace(tfm_searchField," and ",bellChar)
tfm_searchField = Replace(tfm_searchField,",",bellChar)
tfm_searchField = Replace(tfm_searchField," ",bellChar)
End If
splitField = Split(tfm_searchField,bellChar)
For i = 0 to ubound(splitField)
For j = 0 to ubound(tfm_databaseFields)
tfm_SQLstr = tfm_SQLstr & "(" & tfm_databaseFields(j) & " LIKE '%" & Replace(splitField(i),"'","''") & "%')"
If j < ubound(tfm_databaseFields) Then tfm_SQLstr = tfm_SQLstr & " OR "
Next
If i < ubound(splitField) Then tfm_SQLstr = tfm_SQLstr & ") " & tfm_andor & " ("
Next
tfm_SQLstr = tfm_SQLstr & "))"
Else
tfm_SQLstr = " WHERE 1=0 "
End If
%>
<%
Dim rsemployresults3__MMColParam
rsemployresults3__MMColParam = "1"
if (Request.Form("state") <> "") then rsemployresults3__MMColParam = Request.Form("state")
%>
<%
set rsemployresults3 = Server.CreateObject("ADODB.Recordset")
rsemployresults3.ActiveConnection = MM_conndb2_STRING
rsemployresults3.Source = "SELECT * FROM CandidateInfo " + tfm_SQLstr +"AND Cstate = '" + Replace(rsemployresults3__MMColParam, "'", "''") + "' ORDER BY Date_Joined DESC"
rsemployresults3.CursorType = 0
rsemployresults3.CursorLocation = 2
rsemployresults3.LockType = 3
rsemployresults3.Open()
rsemployresults3_numRows = 0
%>
<%
Dim Repeat1__numRows
Repeat1__numRows = 10
Dim Repeat1__index
Repeat1__index = 0
rsemployresults3_numRows = rsemployresults3_numRows + Repeat1__numRows
%>
<%
' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
' set the record count
rsemployresults3_total = rsemployresults3.RecordCount
' set the number of rows displayed on this page
If (rsemployresults3_numRows < 0) Then
rsemployresults3_numRows = rsemployresults3_total
Elseif (rsemployresults3_numRows = 0) Then
rsemployresults3_numRows = 1
End If
' set the first and last displayed record
rsemployresults3_first = 1
rsemployresults3_last = rsemployresults3_first + rsemployresults3_numRows - 1
' if we have the correct record count, check the other stats
If (rsemployresults3_total <> -1) Then
If (rsemployresults3_first > rsemployresults3_total) Then rsemployresults3_first = rsemployresults3_total
If (rsemployresults3_last > rsemployresults3_total) Then rsemployresults3_last = rsemployresults3_total
If (rsemployresults3_numRows > rsemployresults3_total) Then rsemployresults3_numRows = rsemployresults3_total
End If
%>
<%
' *** Recordset Stats: if we don't know the record count, manually count them
If (rsemployresults3_total = -1) Then
' count the total records by iterating through the recordset
rsemployresults3_total=0
While (Not rsemployresults3.EOF)
rsemployresults3_total = rsemployresults3_total + 1
rsemployresults3.MoveNext
Wend
' reset the cursor to the beginning
If (rsemployresults3.CursorType > 0) Then
rsemployresults3.MoveFirst
Else
rsemployresults3.Requery
End If
' set the number of rows displayed on this page
If (rsemployresults3_numRows < 0 Or rsemployresults3_numRows > rsemployresults3_total) Then
rsemployresults3_numRows = rsemployresults3_total
End If
' set the first and last displayed record
rsemployresults3_first = 1
rsemployresults3_last = rsemployresults3_first + rsemployresults3_numRows - 1
If (rsemployresults3_first > rsemployresults3_total) Then rsemployresults3_first = rsemployresults3_total
If (rsemployresults3_last > rsemployresults3_total) Then rsemployresults3_last = rsemployresults3_total
End If
%>
<%
' *** Move To Record and Go To Record: declare variables
Set MM_rs = rsemployresults3
MM_rsCount = rsemployresults3_total
MM_size = rsemployresults3_numRows
MM_uniqueCol = ""
MM_paramName = ""
MM_offset = 0
MM_atTotal = false
MM_paramIsDefined = false
If (MM_paramName <> "") Then
MM_paramIsDefined = (Request.QueryString(MM_paramName) <> "")
End If
%>
<%
' *** Move To Record: handle 'index' or 'offset' parameter
if (Not MM_paramIsDefined And MM_rsCount <> 0) then
' use index parameter if defined, otherwise use offset parameter
r = Request.QueryString("index")
If r = "" Then r = Request.QueryString("offset")
If r <> "" Then MM_offset = Int(r)
' if we have a record count, check if we are past the end of the recordset
If (MM_rsCount <> -1) Then
If (MM_offset >= MM_rsCount Or MM_offset = -1) Then ' past end or move last
If ((MM_rsCount Mod MM_size) > 0) Then ' last page not a full repeat region
MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)
Else
MM_offset = MM_rsCount - MM_size
End If
End If
End If
' move the cursor to the selected record
i = 0
While ((Not MM_rs.EOF) And (i < MM_offset Or MM_offset = -1))
MM_rs.MoveNext
i = i + 1
Wend
If (MM_rs.EOF) Then MM_offset = i ' set MM_offset to the last possible record
End If
%>
<%
' *** Move To Record: if we dont know the record count, check the display range
If (MM_rsCount = -1) Then
' walk to the end of the display range for this page
i = MM_offset
While (Not MM_rs.EOF And (MM_size < 0 Or i < MM_offset + MM_size))
MM_rs.MoveNext
i = i + 1
Wend
' if we walked off the end of the recordset, set MM_rsCount and MM_size
If (MM_rs.EOF) Then
MM_rsCount = i
If (MM_size < 0 Or MM_size > MM_rsCount) Then MM_size = MM_rsCount
End If
' if we walked off the end, set the offset based on page size
If (MM_rs.EOF And Not MM_paramIsDefined) Then
If (MM_offset > MM_rsCount - MM_size Or MM_offset = -1) Then
If ((MM_rsCount Mod MM_size) > 0) Then
MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)
Else
MM_offset = MM_rsCount - MM_size
End If
End If
End If
' reset the cursor to the beginning
If (MM_rs.CursorType > 0) Then
MM_rs.MoveFirst
Else
MM_rs.Requery
End If
' move the cursor to the selected record
i = 0
While (Not MM_rs.EOF And i < MM_offset)
MM_rs.MoveNext
i = i + 1
Wend
End If
%>
<%
' *** Move To Record: update recordset stats
' set the first and last displayed record
rsemployresults3_first = MM_offset + 1
rsemployresults3_last = MM_offset + MM_size
If (MM_rsCount <> -1) Then
If (rsemployresults3_first > MM_rsCount) Then rsemployresults3_first = MM_rsCount
If (rsemployresults3_last > MM_rsCount) Then rsemployresults3_last = MM_rsCount
End If
' set the boolean used by hide region to check if we are on the last record
MM_atTotal = (MM_rsCount <> -1 And MM_offset + MM_size >= MM_rsCount)
%>
<%
' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters
' create the list of parameters which should not be maintained
MM_removeList = "&index="
If (MM_paramName <> "") Then MM_removeList = MM_removeList & "&" & MM_paramName & "="
MM_keepURL="":MM_keepForm="":MM_keepBoth="":MM_keepNone=""
' add the URL parameters to the MM_keepURL string
For Each Item In Request.QueryString
NextItem = "&" & Item & "="
If (InStr(1,MM_removeList,NextItem,1) = 0) Then
MM_keepURL = MM_keepURL & NextItem & Server.URLencode(Request.QueryString(Item))
End If
Next
' add the Form variables to the MM_keepForm string
For Each Item In Request.Form
NextItem = "&" & Item & "="
If (InStr(1,MM_removeList,NextItem,1) = 0) Then
MM_keepForm = MM_keepForm & NextItem & Server.URLencode(Request.Form(Item))
End If
Next
' create the Form + URL string and remove the intial '&' from each of the strings
MM_keepBoth = MM_keepURL & MM_keepForm
if (MM_keepBoth <> "") Then MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
if (MM_keepURL <> "") Then MM_keepURL = Right(MM_keepURL, Len(MM_keepURL) - 1)
if (MM_keepForm <> "") Then MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
' a utility function used for adding additional parameters to these strings
Function MM_joinChar(firstItem)
If (firstItem <> "") Then
MM_joinChar = "&"
Else
MM_joinChar = ""
End If
End Function
%>
<%
' *** Move To Record: set the strings for the first, last, next, and previous links
MM_keepMove = MM_keepBoth
MM_moveParam = "index"
' if the page has a repeated region, remove 'offset' from the maintained parameters
If (MM_size > 0) Then
MM_moveParam = "offset"
If (MM_keepMove <> "") Then
params = Split(MM_keepMove, "&")
MM_keepMove = ""
For i = 0 To UBound(params)
nextItem = Left(params(i), InStr(params(i),"=") - 1)
If (StrComp(nextItem,MM_moveParam,1) <> 0) Then
MM_keepMove = MM_keepMove & "&" & params(i)
End If
Next
If (MM_keepMove <> "") Then
MM_keepMove = Right(MM_keepMove, Len(MM_keepMove) - 1)
End If
End If
End If
' set the strings for the move to links
If (MM_keepMove <> "") Then MM_keepMove = MM_keepMove & "&"
urlStr = Request.ServerVariables("URL") & "?" & MM_keepMove & MM_moveParam & "="
MM_moveFirst = urlStr & "0"
MM_moveLast = urlStr & "-1"
MM_moveNext = urlStr & Cstr(MM_offset + MM_size)
prev = MM_offset - MM_size
If (prev < 0) Then prev = 0
MM_movePrev = urlStr & Cstr(prev)
%>
<html><!-- #BeginTemplate "/Templates/template.dwt" -->
<head>
<!-- #BeginEditable "doctitle" -->
<title>DreamweaverTemplates.net</title>
<!-- #EndEditable -->
<meta http-equiv="Content-Type" content="text/html;">
<!-- Fireworks 4.0 Dreamweaver 4.0 target. Created Mon Apr 08 14:46:24 GMT+0530 (India Standard Time) 2002-->
<script language="JavaScript">
<!--
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a)&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}
}
function MM_findObj(n, d) { //v4.0
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document);
if(!x && document.getElementById) x=document.getElementById; return x;
}
//-->
</script>
<link rel="stylesheet" href="styles.css" type="text/css">
</head>
<body bgcolor="#ffffff" onLoad="MM_preloadImages('images/home_f2.gif','images/about_f2.gif','images/services_f2.gif','images/clients_f2.gif','images/contact_f2.gif')" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" link="#003399" vlink="#006699">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td valign="top" background="images/header_background.jpg" height="84"><img name="header_image" src="images/header_image.jpg" width="116" height="84" border="0"><img src="images/company_name.jpg" width="493" height="84"></td>
</tr>
<tr>
<td valign="top" height="30">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="30" background="images/background.gif" valign="top" width="95%"><img name="squares" src="images/squares.gif" width="116" height="30" border="0"></td>
<td width="253" height="30" valign="top" background="images/background.gif">
<div align="right"><img src="images/slogan.gif" width="319" height="30"></div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td width="40" bgcolor="#A8B9CC" valign="top"><img src="images/spacer.gif" width="40" height="10"></td>
<td width="179" valign="top" background="images/left_fill.gif">
<div align="right"><img name="template2_r3_c1" src="images/left_corner.gif" width="60" height="38" border="0"><a href="homepage.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('home','','images/home_f2.gif',1)" ><img name="home" src="images/home.gif" width="129" height="29" border="0"></a><a href="candlogin.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('about','','images/about_f2.gif',1)" ><img name="about" src="images/about.gif" width="129" height="31" border="0"></a><a href="EmployerLogin.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('services','','images/services_f2.gif',1)" ><img name="services" src="images/services.gif" width="129" height="32" border="0"></a><a href="about-us.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('clients','','images/clients_f2.gif',1)" ><img name="clients" src="images/clients.gif" width="129" height="32" border="0"></a><a href="contact.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('contact','','images/contact_f2.gif',1)" ><img name="contact" src="images/contact.gif" width="129" height="31" border="0"></a></div>
</td>
<td valign="top" width="95%">
<table width="100%" border="0" cellspacing="40" cellpadding="0">
<tr>
<td valign="top" height="360" class="text"> <!-- #BeginEditable "content" -->
<p> </p>
<p> <b> Records</b> <%=(rsemployresults3_first)%> to <%=(rsemployresults3_last)%> of <%=(rsemployresults3_total)%> </p>
<table width="100%" border="0">
<tr>
<td><b>Name</b></td>
<td><b>Title</b></td>
<td><b>Min Salary Desired</b></td>
<td><b>City</b></td>
<td><b>State</b></td>
<td><b>Date Modified</b></td>
</tr>
<%
While ((Repeat1__numRows <> 0) AND (NOT rsemployresults3.EOF))
%>
<% If (Repeat1__numRows Mod 2) then%>
<tr style="background-color:#CCCCFF">
<% Else %>
<tr style="background-color:#FFFFFF">
<% End If %>
<td><A HREF="detailcand.asp?<%= MM_keepBoth & MM_joinChar(MM_keepBoth) & "cand_ID=" & rsemployresults3.Fields.Item("cand_ID").Value %>"><%=(rsemployresults3.Fields.Item("CandName_Last").Value)%></A>,<%=(rsemployresults3.Fields.Item("CandName_First").Value)%></td>
<td><%=(rsemployresults3.Fields.Item("Cand_Title").Value)%></td>
<td><%=(rsemployresults3.Fields.Item("Csalary").Value)%></td>
<td><%=(rsemployresults3.Fields.Item("Ccity").Value)%></td>
<td><%=(rsemployresults3.Fields.Item("Cstate").Value)%></td>
<td><%=(rsemployresults3.Fields.Item("Date_Joined").Value)%></td>
</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
rsemployresults3.MoveNext()
Wend
%>
</table>
<p> <A HREF="<%=MM_moveFirst%>">First</A>
<A HREF="<%=MM_movePrev%>">Previous</A>
<A HREF="<%=MM_moveNext%>">Next</A>
<A HREF="<%=MM_moveLast%>">Last</A>
</p>
<!-- #EndEditable --></td>
</tr>
</table>
</td>
<td valign="top" width="20" background="images/right_fill.gif"><img src="images/right_corner.gif" width="20" height="13"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top" height="38">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" height="38">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="38">
<tr>
<td height="38" rowspan="2" width="140" bgcolor="#A8B9CC"><img src="images/spacer.gif" width="140" height="10"></td>
<td height="19" width="179"><img src="images/footer1.gif" width="39" height="19"></td>
<td height="19" width="98%">
<div align="right"><img src="images/right.gif" width="8" height="19"></div>
</td>
</tr>
<tr>
<td height="19"> <img src="images/footer2.gif" width="39" height="19"></td>
<td height="19" bgcolor="#5E7DA2" width="98%">
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#FFFFFF">All
Rights Reserved</font><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#FFFFFF">.
Copyright © 1FinancialSt.com, 2005. </font></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
<!-- #EndTemplate --></html>
<%
rsemployresults3.Close()
%>
I'm using Dreamweaver Ultradev4 - ASP
I had added a "Move to Record" server behavior to a Results
page as well as the Recordset Navigation Status feature.
All worked well until I added a commercially available Dreamweaver Template to the page. Now if the Recordset Navigation tells me I am looking at "Records 1-10 of 18"
and I click "Next" the results page does not display the remaining 8 records. The RS Navigation now says "Records 0 to 0 of 0" (on the reloaded page), instead of "Records 11 to 18 of 18"
Any ideas of what (on the added Template??) could be causing this?
Thanks in advance
Joe
<%@LANGUAGE="VBSCRIPT"%>
<!--#include file="Connections/conndb2.asp" -->
<%
'VBScript version of Basic-UltraDev Dyamic Search SQL
'for rsemployresults3
Dim tfm_andor,tfm_exact
tfm_andor = "AND"
tfm_exact = "false"
'if any words option
if Cstr(Request("anyallexact")) <> "" AND Cstr(Request("anyallexact")) = "any" Then
tfm_andor = "OR"
End If
'if exact phrase option
if Cstr(Request("anyallexact")) <> "" AND Cstr(Request("anyallexact")) = "exact" Then
tfm_exact = "true"
End If
If Cstr(Request("profile"))<> "" Then
Dim tfm_SQLstr,tfm_searchField,tfm_databaseFields,bellChar
tfm_SQLstr = " WHERE (("
tfm_searchField = lcase(Request("profile"))
tfm_databaseFields = Split("resume",",")
bellChar = chr(7)
If InStr(tfm_searchField,chr(34)) Or tfm_exact = "true" Then
tfm_searchField = Replace(tfm_searchField,chr(34),"")
tfm_andor = "OR"
ElseIf InStr(lcase(tfm_searchField)," or ") Then
tfm_searchField = Replace(tfm_searchField," or ",bellChar)
tfm_andor = "OR"
ElseIf InStr(tfm_searchField,",") Or InStr(tfm_searchField," ") Or InStr(lcase(tfm_searchField)," and ") Then
tfm_searchField = Replace(tfm_searchField," and ",bellChar)
tfm_searchField = Replace(tfm_searchField,",",bellChar)
tfm_searchField = Replace(tfm_searchField," ",bellChar)
End If
splitField = Split(tfm_searchField,bellChar)
For i = 0 to ubound(splitField)
For j = 0 to ubound(tfm_databaseFields)
tfm_SQLstr = tfm_SQLstr & "(" & tfm_databaseFields(j) & " LIKE '%" & Replace(splitField(i),"'","''") & "%')"
If j < ubound(tfm_databaseFields) Then tfm_SQLstr = tfm_SQLstr & " OR "
Next
If i < ubound(splitField) Then tfm_SQLstr = tfm_SQLstr & ") " & tfm_andor & " ("
Next
tfm_SQLstr = tfm_SQLstr & "))"
Else
tfm_SQLstr = " WHERE 1=0 "
End If
%>
<%
Dim rsemployresults3__MMColParam
rsemployresults3__MMColParam = "1"
if (Request.Form("state") <> "") then rsemployresults3__MMColParam = Request.Form("state")
%>
<%
set rsemployresults3 = Server.CreateObject("ADODB.Recordset")
rsemployresults3.ActiveConnection = MM_conndb2_STRING
rsemployresults3.Source = "SELECT * FROM CandidateInfo " + tfm_SQLstr +"AND Cstate = '" + Replace(rsemployresults3__MMColParam, "'", "''") + "' ORDER BY Date_Joined DESC"
rsemployresults3.CursorType = 0
rsemployresults3.CursorLocation = 2
rsemployresults3.LockType = 3
rsemployresults3.Open()
rsemployresults3_numRows = 0
%>
<%
Dim Repeat1__numRows
Repeat1__numRows = 10
Dim Repeat1__index
Repeat1__index = 0
rsemployresults3_numRows = rsemployresults3_numRows + Repeat1__numRows
%>
<%
' *** Recordset Stats, Move To Record, and Go To Record: declare stats variables
' set the record count
rsemployresults3_total = rsemployresults3.RecordCount
' set the number of rows displayed on this page
If (rsemployresults3_numRows < 0) Then
rsemployresults3_numRows = rsemployresults3_total
Elseif (rsemployresults3_numRows = 0) Then
rsemployresults3_numRows = 1
End If
' set the first and last displayed record
rsemployresults3_first = 1
rsemployresults3_last = rsemployresults3_first + rsemployresults3_numRows - 1
' if we have the correct record count, check the other stats
If (rsemployresults3_total <> -1) Then
If (rsemployresults3_first > rsemployresults3_total) Then rsemployresults3_first = rsemployresults3_total
If (rsemployresults3_last > rsemployresults3_total) Then rsemployresults3_last = rsemployresults3_total
If (rsemployresults3_numRows > rsemployresults3_total) Then rsemployresults3_numRows = rsemployresults3_total
End If
%>
<%
' *** Recordset Stats: if we don't know the record count, manually count them
If (rsemployresults3_total = -1) Then
' count the total records by iterating through the recordset
rsemployresults3_total=0
While (Not rsemployresults3.EOF)
rsemployresults3_total = rsemployresults3_total + 1
rsemployresults3.MoveNext
Wend
' reset the cursor to the beginning
If (rsemployresults3.CursorType > 0) Then
rsemployresults3.MoveFirst
Else
rsemployresults3.Requery
End If
' set the number of rows displayed on this page
If (rsemployresults3_numRows < 0 Or rsemployresults3_numRows > rsemployresults3_total) Then
rsemployresults3_numRows = rsemployresults3_total
End If
' set the first and last displayed record
rsemployresults3_first = 1
rsemployresults3_last = rsemployresults3_first + rsemployresults3_numRows - 1
If (rsemployresults3_first > rsemployresults3_total) Then rsemployresults3_first = rsemployresults3_total
If (rsemployresults3_last > rsemployresults3_total) Then rsemployresults3_last = rsemployresults3_total
End If
%>
<%
' *** Move To Record and Go To Record: declare variables
Set MM_rs = rsemployresults3
MM_rsCount = rsemployresults3_total
MM_size = rsemployresults3_numRows
MM_uniqueCol = ""
MM_paramName = ""
MM_offset = 0
MM_atTotal = false
MM_paramIsDefined = false
If (MM_paramName <> "") Then
MM_paramIsDefined = (Request.QueryString(MM_paramName) <> "")
End If
%>
<%
' *** Move To Record: handle 'index' or 'offset' parameter
if (Not MM_paramIsDefined And MM_rsCount <> 0) then
' use index parameter if defined, otherwise use offset parameter
r = Request.QueryString("index")
If r = "" Then r = Request.QueryString("offset")
If r <> "" Then MM_offset = Int(r)
' if we have a record count, check if we are past the end of the recordset
If (MM_rsCount <> -1) Then
If (MM_offset >= MM_rsCount Or MM_offset = -1) Then ' past end or move last
If ((MM_rsCount Mod MM_size) > 0) Then ' last page not a full repeat region
MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)
Else
MM_offset = MM_rsCount - MM_size
End If
End If
End If
' move the cursor to the selected record
i = 0
While ((Not MM_rs.EOF) And (i < MM_offset Or MM_offset = -1))
MM_rs.MoveNext
i = i + 1
Wend
If (MM_rs.EOF) Then MM_offset = i ' set MM_offset to the last possible record
End If
%>
<%
' *** Move To Record: if we dont know the record count, check the display range
If (MM_rsCount = -1) Then
' walk to the end of the display range for this page
i = MM_offset
While (Not MM_rs.EOF And (MM_size < 0 Or i < MM_offset + MM_size))
MM_rs.MoveNext
i = i + 1
Wend
' if we walked off the end of the recordset, set MM_rsCount and MM_size
If (MM_rs.EOF) Then
MM_rsCount = i
If (MM_size < 0 Or MM_size > MM_rsCount) Then MM_size = MM_rsCount
End If
' if we walked off the end, set the offset based on page size
If (MM_rs.EOF And Not MM_paramIsDefined) Then
If (MM_offset > MM_rsCount - MM_size Or MM_offset = -1) Then
If ((MM_rsCount Mod MM_size) > 0) Then
MM_offset = MM_rsCount - (MM_rsCount Mod MM_size)
Else
MM_offset = MM_rsCount - MM_size
End If
End If
End If
' reset the cursor to the beginning
If (MM_rs.CursorType > 0) Then
MM_rs.MoveFirst
Else
MM_rs.Requery
End If
' move the cursor to the selected record
i = 0
While (Not MM_rs.EOF And i < MM_offset)
MM_rs.MoveNext
i = i + 1
Wend
End If
%>
<%
' *** Move To Record: update recordset stats
' set the first and last displayed record
rsemployresults3_first = MM_offset + 1
rsemployresults3_last = MM_offset + MM_size
If (MM_rsCount <> -1) Then
If (rsemployresults3_first > MM_rsCount) Then rsemployresults3_first = MM_rsCount
If (rsemployresults3_last > MM_rsCount) Then rsemployresults3_last = MM_rsCount
End If
' set the boolean used by hide region to check if we are on the last record
MM_atTotal = (MM_rsCount <> -1 And MM_offset + MM_size >= MM_rsCount)
%>
<%
' *** Go To Record and Move To Record: create strings for maintaining URL and Form parameters
' create the list of parameters which should not be maintained
MM_removeList = "&index="
If (MM_paramName <> "") Then MM_removeList = MM_removeList & "&" & MM_paramName & "="
MM_keepURL="":MM_keepForm="":MM_keepBoth="":MM_keepNone=""
' add the URL parameters to the MM_keepURL string
For Each Item In Request.QueryString
NextItem = "&" & Item & "="
If (InStr(1,MM_removeList,NextItem,1) = 0) Then
MM_keepURL = MM_keepURL & NextItem & Server.URLencode(Request.QueryString(Item))
End If
Next
' add the Form variables to the MM_keepForm string
For Each Item In Request.Form
NextItem = "&" & Item & "="
If (InStr(1,MM_removeList,NextItem,1) = 0) Then
MM_keepForm = MM_keepForm & NextItem & Server.URLencode(Request.Form(Item))
End If
Next
' create the Form + URL string and remove the intial '&' from each of the strings
MM_keepBoth = MM_keepURL & MM_keepForm
if (MM_keepBoth <> "") Then MM_keepBoth = Right(MM_keepBoth, Len(MM_keepBoth) - 1)
if (MM_keepURL <> "") Then MM_keepURL = Right(MM_keepURL, Len(MM_keepURL) - 1)
if (MM_keepForm <> "") Then MM_keepForm = Right(MM_keepForm, Len(MM_keepForm) - 1)
' a utility function used for adding additional parameters to these strings
Function MM_joinChar(firstItem)
If (firstItem <> "") Then
MM_joinChar = "&"
Else
MM_joinChar = ""
End If
End Function
%>
<%
' *** Move To Record: set the strings for the first, last, next, and previous links
MM_keepMove = MM_keepBoth
MM_moveParam = "index"
' if the page has a repeated region, remove 'offset' from the maintained parameters
If (MM_size > 0) Then
MM_moveParam = "offset"
If (MM_keepMove <> "") Then
params = Split(MM_keepMove, "&")
MM_keepMove = ""
For i = 0 To UBound(params)
nextItem = Left(params(i), InStr(params(i),"=") - 1)
If (StrComp(nextItem,MM_moveParam,1) <> 0) Then
MM_keepMove = MM_keepMove & "&" & params(i)
End If
Next
If (MM_keepMove <> "") Then
MM_keepMove = Right(MM_keepMove, Len(MM_keepMove) - 1)
End If
End If
End If
' set the strings for the move to links
If (MM_keepMove <> "") Then MM_keepMove = MM_keepMove & "&"
urlStr = Request.ServerVariables("URL") & "?" & MM_keepMove & MM_moveParam & "="
MM_moveFirst = urlStr & "0"
MM_moveLast = urlStr & "-1"
MM_moveNext = urlStr & Cstr(MM_offset + MM_size)
prev = MM_offset - MM_size
If (prev < 0) Then prev = 0
MM_movePrev = urlStr & Cstr(prev)
%>
<html><!-- #BeginTemplate "/Templates/template.dwt" -->
<head>
<!-- #BeginEditable "doctitle" -->
<title>DreamweaverTemplates.net</title>
<!-- #EndEditable -->
<meta http-equiv="Content-Type" content="text/html;">
<!-- Fireworks 4.0 Dreamweaver 4.0 target. Created Mon Apr 08 14:46:24 GMT+0530 (India Standard Time) 2002-->
<script language="JavaScript">
<!--
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a)&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a.indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a;}}
}
function MM_findObj(n, d) { //v4.0
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers.document);
if(!x && document.getElementById) x=document.getElementById; return x;
}
//-->
</script>
<link rel="stylesheet" href="styles.css" type="text/css">
</head>
<body bgcolor="#ffffff" onLoad="MM_preloadImages('images/home_f2.gif','images/about_f2.gif','images/services_f2.gif','images/clients_f2.gif','images/contact_f2.gif')" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" link="#003399" vlink="#006699">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td valign="top" background="images/header_background.jpg" height="84"><img name="header_image" src="images/header_image.jpg" width="116" height="84" border="0"><img src="images/company_name.jpg" width="493" height="84"></td>
</tr>
<tr>
<td valign="top" height="30">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="30" background="images/background.gif" valign="top" width="95%"><img name="squares" src="images/squares.gif" width="116" height="30" border="0"></td>
<td width="253" height="30" valign="top" background="images/background.gif">
<div align="right"><img src="images/slogan.gif" width="319" height="30"></div>
</td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%">
<tr>
<td width="40" bgcolor="#A8B9CC" valign="top"><img src="images/spacer.gif" width="40" height="10"></td>
<td width="179" valign="top" background="images/left_fill.gif">
<div align="right"><img name="template2_r3_c1" src="images/left_corner.gif" width="60" height="38" border="0"><a href="homepage.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('home','','images/home_f2.gif',1)" ><img name="home" src="images/home.gif" width="129" height="29" border="0"></a><a href="candlogin.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('about','','images/about_f2.gif',1)" ><img name="about" src="images/about.gif" width="129" height="31" border="0"></a><a href="EmployerLogin.asp" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('services','','images/services_f2.gif',1)" ><img name="services" src="images/services.gif" width="129" height="32" border="0"></a><a href="about-us.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('clients','','images/clients_f2.gif',1)" ><img name="clients" src="images/clients.gif" width="129" height="32" border="0"></a><a href="contact.htm" onMouseOut="MM_swapImgRestore()" onMouseOver="MM_swapImage('contact','','images/contact_f2.gif',1)" ><img name="contact" src="images/contact.gif" width="129" height="31" border="0"></a></div>
</td>
<td valign="top" width="95%">
<table width="100%" border="0" cellspacing="40" cellpadding="0">
<tr>
<td valign="top" height="360" class="text"> <!-- #BeginEditable "content" -->
<p> </p>
<p> <b> Records</b> <%=(rsemployresults3_first)%> to <%=(rsemployresults3_last)%> of <%=(rsemployresults3_total)%> </p>
<table width="100%" border="0">
<tr>
<td><b>Name</b></td>
<td><b>Title</b></td>
<td><b>Min Salary Desired</b></td>
<td><b>City</b></td>
<td><b>State</b></td>
<td><b>Date Modified</b></td>
</tr>
<%
While ((Repeat1__numRows <> 0) AND (NOT rsemployresults3.EOF))
%>
<% If (Repeat1__numRows Mod 2) then%>
<tr style="background-color:#CCCCFF">
<% Else %>
<tr style="background-color:#FFFFFF">
<% End If %>
<td><A HREF="detailcand.asp?<%= MM_keepBoth & MM_joinChar(MM_keepBoth) & "cand_ID=" & rsemployresults3.Fields.Item("cand_ID").Value %>"><%=(rsemployresults3.Fields.Item("CandName_Last").Value)%></A>,<%=(rsemployresults3.Fields.Item("CandName_First").Value)%></td>
<td><%=(rsemployresults3.Fields.Item("Cand_Title").Value)%></td>
<td><%=(rsemployresults3.Fields.Item("Csalary").Value)%></td>
<td><%=(rsemployresults3.Fields.Item("Ccity").Value)%></td>
<td><%=(rsemployresults3.Fields.Item("Cstate").Value)%></td>
<td><%=(rsemployresults3.Fields.Item("Date_Joined").Value)%></td>
</tr>
<%
Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
rsemployresults3.MoveNext()
Wend
%>
</table>
<p> <A HREF="<%=MM_moveFirst%>">First</A>
<A HREF="<%=MM_movePrev%>">Previous</A>
<A HREF="<%=MM_moveNext%>">Next</A>
<A HREF="<%=MM_moveLast%>">Last</A>
</p>
<!-- #EndEditable --></td>
</tr>
</table>
</td>
<td valign="top" width="20" background="images/right_fill.gif"><img src="images/right_corner.gif" width="20" height="13"></td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top" height="38">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top" height="38">
<table width="100%" border="0" cellspacing="0" cellpadding="0" height="38">
<tr>
<td height="38" rowspan="2" width="140" bgcolor="#A8B9CC"><img src="images/spacer.gif" width="140" height="10"></td>
<td height="19" width="179"><img src="images/footer1.gif" width="39" height="19"></td>
<td height="19" width="98%">
<div align="right"><img src="images/right.gif" width="8" height="19"></div>
</td>
</tr>
<tr>
<td height="19"> <img src="images/footer2.gif" width="39" height="19"></td>
<td height="19" bgcolor="#5E7DA2" width="98%">
<div align="center"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#FFFFFF">All
Rights Reserved</font><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#FFFFFF">.
Copyright © 1FinancialSt.com, 2005. </font></div>
</td>
</tr>
</table>
</td>
</tr>
</table>
</td>
</tr>
</table>
</body>
<!-- #EndTemplate --></html>
<%
rsemployresults3.Close()
%>