I am having some issue with this page.
Basically on the previous page a lawyer area and lawyer law type is selected and this page is supposed to return all matching records. When there are no records matching, the page is supposed to return some html (in red.) Instead I get this error:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'Ubound'
/infotest.asp, line 224
I tried to do a redirect before getting to that function (in red) but the client wants the page to display with the text. Does anyone know what can be done to fix this.
Thanks for your suggestions:
<%
Response.Buffer = True
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
%>
<!--ASP codes developed by Shafi Kashefi (shafi@vancouvermart.com)Dec 2002. All rights reserved-->
<!--#include file="law.inc"-->
<%
Set law_Conn = Server.CreateObject("adodb.Connection"
Set lawRS = Server.CreateObject("adodb.RecordSet"
Set insRS = Server.CreateObject("adodb.RecordSet"
Set tmpRS = Server.CreateObject("adodb.RecordSet"
Set fso = Server.CreateObject("scripting.FileSystemObject"
law_Conn.Open Session("law_DSN"
if inStr(1,Request.ServerVariables("HTTP_USER_AGENT"
,"msie",1)>0 then
isIE = true
else
isIE = false
end if
lawType = request("lawType"
region = request("region"
action = request("action"
lawyerID_str = request("lawyerID_str"
tmpRS.Open "Select [CapturedR],[ImageFile] From [tbl_Region] Where [Region] = '"& CheckStringIn(region) &"' ",law_Conn, adOpenDynamic
if not (tmpRS.EOF AND tmpRS.BOF) then
regionImgFile = CheckStringOut(tmpRS("ImageFile"
)
txtFile_Region = CheckStringOut(tmpRS("CapturedR"
)
else
regionImgFile = ""
end if
tmpRS.Close
tmpRS.Open "Select [CapturedLT],[ImageFile] From [tbl_LawType] Where [LawType] = '"& CheckStringIn(lawType) &"' ",law_Conn, adOpenDynamic
if not (tmpRS.EOF AND tmpRS.BOF) then
lwTypeImgFile = CheckStringOut(tmpRS("ImageFile"
)
txtFile_LT = CheckStringOut(tmpRS("CapturedLT"
)
else
lwTypeImgFile = ""
end if
tmpRS.Close
lawRS.Open "Select * From [tbl_Lawyers] Where (([Region] = '"& region &"') AND ([LawType] = '"& lawType &"') AND ([Active] = true) AND ([ExclusiveListing] = true))", law_Conn, 3, 1
if not (lawRS.EOF AND lawRS.BOF) then
lawyerExists = true
lawyerID_str =","
lawyerInfo_str = "|"
while not lawRS.EOF
lawyerID_str = lawyerID_str & lawRS("ID"
& ","
lawyerInfo_str = lawyerInfo_str & lawRS("ID"
&"^"& CheckStringOut(lawRS("FirstName"
) &" "& CheckStringOut(lawRS("LastName"
) &"^"& CheckStringOut(lawRS("Email"
) &"^"& CheckStringOut(lawRS("ImageFile"
) &"^"& CheckStringOut(lawRS("Description"
) &"^"& CheckStringOut(lawRS("Web"
) & "^" & CheckStringOut(lawRS("Company"
) & "|"
lawRS.MoveNext
wend
if right(lawyerinfo_str,1) = "|" then lawyerinfo_str = left(lawyerinfo_str,len(lawyerinfo_str)-1)
lawyerInfo_ary = Split(lawyerInfo_str,"|"
if isArray(lawyerInfo_ary) then
ub = Ubound(lawyerInfo_ary)
Redim theVal(ub)
Randomize
for k = 1 to ub
j = Int(((ubound(lawyerInfo_ary) - 1 + 1)* Rnd + 1))
theVal(k) = lawyerInfo_ary(j)
lawyerInfo_str = Replace(lawyerInfo_str,"|"&lawyerInfo_ary(j),""
lawyerInfo_ary = Split(lawyerInfo_str,"|"
next
else
Redim theVal(1)
theVal(1) = lawyerInfo_str
end if
else
lawyerExists = false
end if
lawRS.Close
'if lawyerExists = false then Response.Redirect "1index.asp"
'SERVER-->
theFile_title = Server.MapPath("/txtFiles/"
& "\" & txtFile_LT &"_"& txtFile_Region & "_title.txt"
'theFile_title = Server.MapPath("/lawyer/txtFiles/"
& "\" & txtFile_LT &"_"& txtFile_Region & "_title.txt"
'SERVER-->
theFile_footer = Server.MapPath("/txtFiles/"
& "\" & txtFile_LT &"_"& txtFile_Region & "_footer.txt"
'theFile_footer = Server.MapPath("/lawyer/txtFiles/"
& "\" & txtFile_LT &"_"& txtFile_Region & "_footer.txt"
SELECT CASE Left(Lcase(action),4)
Case "conn"
selCon = request("selectedcontacts"
insRS.Open "tbl_Cases", law_Conn, adOpenDynamic, adLockOptimistic
insRS.AddNew
insRS("Name"
= CheckStringIn(request("name"
)
insRS("Email"
= CheckStringIn(request("email"
)
insRS("Phone"
= CheckStringIn(request("phone"
)
insRS("CaseDesc"
= CheckStringIn(request("casedesc"
)
insRS("Region"
= CheckStringIn(region)
insRS("Lawyer_ID"
= CheckStringIn(selCon)
insRS("caseDate"
= Date()
insRS.Update
insRS.MoveLast
caseID = insRS("ID"
insRS.Close
lawyerID_ary = split(selCon,","
insRS.Open "tbl_caseLog", law_Conn, adOpenDynamic, adLockOptimistic
for elm = 1 to Ubound(lawyerID_ary)-1
if Len(lawyerID_ary(elm))>0 then
insRS.AddNew
insRS("Case_ID"
= caseID
insRS("Lawyer_ID"
= lawyerID_ary(elm)
insRS("theDate"
= Date()
insRS.Update
end if
next 'elm
insRS.Close
lnbr = Chr(13) & Chr(10)
CCsent = false
'Response.Write "LawyerInfo: "& lawyerInfo_str & "<br>"
lawyerInfo_ary = Split(lawyerInfo_str,"|"
'Response.Write "isArray: " & isArray(lawyerInfo_ary) & "<br>"
for a= 0 to Ubound(lawyerInfo_ary)
if Len(lawyerInfo_ary(a))>0 then
arytmp = Split(lawyerInfo_ary(a),"^"
'Response.Write "Ary temp is array: " & isArray(arytmp) & "<br>"
L_ID = Trim(arytmp(0))
if inStr(selCon,","&L_ID&","
> 0 then
L_Name = Trim(arytmp(1))
L_Email = Trim(arytmp(2))
'Response.Write "L_ID: " & L-ID & "<br>"
'Response.Write "L_Name: " & L_Name & "<br>"
'Response.Write "L_Email: " & L_Email & "<br>"
Set Mailer = Server.CreateObject("CDONTS.NewMail"
msgFrom = "Lawyer-Connect website" & "<mfw@michaelwilliamswebdesign.com>"
msgTo = L-Name & "<" & L_Email & ">"
Mailer.From = msgfrom
Mailer.to = msgTo
if not CCsent then Mailer.CC = "Michael Williams" & "<mfw@michaelwilliamswebdesign.com>"
Mailer.Subject = "Lawyer-Connect.com Inquiry"
strMessage = ""
strMessage = "Dear " & L_Name & lnbr
strMessage = strMessage& "You've just recieved an inquiry through Lawyer-Connect.com website. Below are the details of the inquiry: " & lnbr & lnbr
StrMessage = strMessage& "Client's name: " & request("name"
& lnbr
StrMessage = strMessage& "Client's phone: " & request("phone"
& lnbr
StrMessage = strMessage& "Client's email: " & request("email"
& lnbr
StrMessage = strMessage& "Client's case: " & request("casedesc"
& lnbr
Mailer.Body = StrMessage
Mailer.Send
'Response.Write "StrMessage: " & strmessage & "<br>"
'Response.Write "<hr>"
Set objMailer = nothing
CCsent = true
StrMessage = ""
end if 'instr
end if 'Len(lawyerInfor_ary)
next 'a
%>
<script LANGUAGE="javascript">
<!--
alert("Your inquiry was sent to these lawyers. They will contact you shortly."
;
parent.location.href = "index.asp"
//-->
</script>
<%
Response.End
END SELECT
%>
<html>
<head>
<%
if fso.FileExists(theFile_title) then
Set f = fs
penTextFile(theFile_title,1,true)
theTitle = f.ReadAll()
else
theTitle = ""
end if
%>
<title><%=theTitle%></title>
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<script LANGUAGE="JavaScript">
<!--
<!--
function newImage(arg) {
if (document.images) {
rslt = new Image();
rslt.src = arg;
return rslt;
}
}
function changeImages() {
if (document.images && (preloadFlag == true)) {
for (var i=0; i<changeImages.arguments.length; i+=2) {
document[changeImages.arguments].src = changeImages.arguments[i+1];
}
}
}
var preloadFlag = false;
function preloadImages() {
if (document.images) {
button_about_over = newImage("images/button_about-over.gif"
;
preloadFlag = true;
}
}
function getDetails(lawID,region,lawyerID_str)
{
if (lawID.length == 0) return (false);
document.getElementById('lawDetails').src = "detail.asp?lawID=" + lawID + "®ion=" + escape(region) + "&lawyerID_str=" + escape(lawyerID_str);
}
function getSelContacts(theForm)
{
var contactstr = ",";
var selConAry = new Array()
if (<%=ubound(theval)%> > 1)
{
selConAry = theForm.selectedcontacts;
}else
{
selConAry[0] = theForm.selectedcontacts;
}
for (i=0;i<selConAry.length;i++)
{
if (selConAry.checked) contactstr += selConAry.value+",";
}
if (contactstr == ","
contactstr = "";
return (contactstr);
}
function regContacts(theForm)
{
document.getElementById('lawDetails').src = "contact.asp?region=<%=Server.URLEncode(region)%>&lawtype=<%=Server.URLEncode(lawtype)%>&lawyerID_str=<%=Server.URLEncode(lawyerID_str)%>&selContacts="+escape(getSelContacts(theForm));
}
// -->
function doIt(v)
{
for(var i=0;i<document.lawyerListForm.selectedcontacts.length;i++)
document.lawyerListForm.selectedcontacts.checked=eval(v);
document.lawyerListForm.c3.checked=false;
document.lawyerListForm.c4.checked=false;
}
function MM_callJS(jsStr) { //v2.0
return eval(jsStr)
}
//-->
</script>
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body BGCOLOR="#CDCED6" link="#006666" vlink="#99CCCC" alink="#59AC59" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" ONLOAD="preloadImages();regContacts(lawyerListForm);">
<form name="lawyerListForm">
<table WIDTH="800" BORDER="0" CELLPADDING="0" CELLSPACING="0">
<tr>
<td>
<table WIDTH="800" BORDER="0" CELLPADDING="0" CELLSPACING="0">
<tr>
<td> <a href="index.asp"><img SRC="images/logo.jpg" WIDTH="226" HEIGHT="96" border="0"></a></td>
<td><a href="index.asp"><img SRC="images/top.jpg" WIDTH="574" HEIGHT="96" border="0" alt="find a lawyer"></a></td>
</tr>
<tr>
<td valign="top" bgcolor="#FFFFFF"><img SRC="images/logo02.jpg" WIDTH="226" HEIGHT="42"></td>
<td background="images/bgimage-top.gif" nowrap> <img src="images/spacer.gif" width="1" height="6"><br>
<img src="images/<%=regionImgFile%>"><img src="images/<%=lwTypeImgFile%>"><img src="images/lawyer-directory.gif" width="54" height="30"><br>
<img src="images/info.gif" width="385" height="52" usemap="#Map" border="0" alt="top lawyer directory finding a lawyer"></td>
</tr></table>
</td>
</tr>
<%
if not lawyerExists then
%>
<tr>
<td valign="top" align="center" bgcolor="#FFFFFF">
<p><br>
<br>
<br>
<b><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Sorry!</font></b><font face="Verdana, Arial, Helvetica, sans-serif" size="2">
Currently there is not a lawyer in our database in this category/region.
<br>
<a href="index.asp">Please try another search</a></font>.</p>
<p><a href="registration.asp"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Add
your Law Firm to the Lawyer-Connect Directory.</font></a><br>
<br>
<br>
</p>
</td>
</tr>
<%
else
%>
<tr valign="top">
<td valign="top" align="right" background="images/bgimage-bottom.jpg"><table width="95%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<p align="left"><img src="images/spacer.gif" width="400" height="8" border="0"><br>
<font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#3A6955"> <font color="#003399"> Roll
your mouse over the graphic </font></font><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#3A6955"><font color="#003399">
below to view</font></font> <font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#3A6955"><font color="#003399">info
on each lawyer.</font></font>
<table width="40%" border="0" align="right">
<tr>
<td height="27">
<div align="left"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
<input type="checkbox" name="c3" value="false" onmouseover="regContacts(this.form)" onclick="doIt(this.value)">
<font size="1">All Not Checked</font><BR>
</font><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
</font><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
<input type="checkbox" name="c4" value="true" onmouseover="regContacts(this.form)" onclick="doIt(this.value)">
<font size="1">All Checked<BR>
<a href="#" onmouseover="regContacts(lawyerListForm)"><img src="/images/INQFORM.jpg" border="0"></a>
</font> </font> </div>
</td>
</tr>
</table>
<p align="left"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#3A6955"><font color="#003399"> </font></font><br>
<%
for k = 1 to Ubound(theval)
tmpary = split(theVal(k),"^"
lawID = tmpary(0)
if ubound(tmpary)>=3 then
if Len(tmpary(3))>0 then
ImageFile = tmpary(3)
else
ImageFile = "no-image.gif"
end if
end if
if ubound(tmpary)>=4 then Description = tmpary(4)
if ubound(tmpary)>=5 then WebAddr = tmpary(5)
if ubound(tmpary)>=6 then Company = tmpary(6)
lDesc = Left(Description,120)
if Len(Description)>120 then lDesc = Left(Description,117) & "..."
%>
<p align="left">
<table width="100%" border="0" cellspacing="0" cellpadding="4" dwcopytype="CopyTableCell">
<tr>
<td bgcolor="#EFEFEF" valign="top" rowspan="2" width="100"><a href="#" onmouseover="getDetails('<%=lawID%>','<%=region%>','<%=lawyerID_str%>');"><img src="upload_images/<%=ImageFile%>" width="100" height="75"></a></td>
<td bgcolor="#EFEFEF" valign="middle" width="200"><a href="#" onmouseover="getDetails('<%=lawID%>');"><img src="images/read-more.gif" width="88" height="18" border="0"></a></td>
<td bgcolor="#EFEFEF" valign="middle" width="350" align="center"><a href=" target="_blank"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><%=webAddr%></font></a></td>
<td bgcolor="#FFFFFF" valign="top" nowrap><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#207468">Include<br>
for contact</font></td>
<td bgcolor="#FFFFFF" valign="middle" nowrap align="center">
<input type="checkbox" name="selectedcontacts" value="<%=lawID%>" onclick="regContacts(this.form)" checked>
</td>
</tr>
<tr>
<td bgcolor="#EFEFEF" valign="top" colspan="4" height="57"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><b><%=Company%></b><br>
<%=CheckStringOut(lDesc)%></font></td>
</tr>
<tr>
<td colspan="5"><img src="images/spacer.gif" width="400" height="10"></td>
</tr>
</table>
<br>
<%
next 'k
%>
</td>
<td bgcolor="#EFEFEF" valign="top" align="center"><img src="images/connect-form.jpg" width="258" height="34"><br>
<font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#003399">Email
all Law Firms on this page with Inquiry Form.</font><br>
<iframe frameborder="0" id="lawDetails" SRC="contact.asp?region=<%=Server.URLEncode(region)%>&lawtype=<%=Server.URLEncode(lawtype)%>&lawyerID_str=<%=Server.URLEncode(lawyerID_str)%>" HEIGHT="500" WIDTH="300" MARGINHEIGHT="0" SCROLLING="NO" ALLOWTRANSPARENCY="true"></iframe></td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top" colspan="2" background="images/bgimage-bottom.jpg"> <img src="images/spacer.gif" width="10" height="10"></td>
</tr>
<tr>
<td colspan="2"><a HREF="index.asp" ONMOUSEOVER="changeImages('button_home02', 'images/button_home02-over.gif'); return true;" ONMOUSEOUT="changeImages('button_home02', 'images/button_home02.gif'); return true;"><img src="images/button_home02.gif" width="45" height="31" NAME="button_home02" border="0"></a><img src="images/divider.gif" width="12" height="31"><a HREF="about.htm" ONMOUSEOVER="changeImages('button_about02', 'images/button_about02-over.gif'); return true;" ONMOUSEOUT="changeImages('button_about02', 'images/button_about02.gif'); return true;"><img src="images/button_about02.gif" width="83" height="31" NAME="button_about02" border="0"></a><img src="images/divider.gif" width="12" height="31"><a HREF="privacy.htm" ONMOUSEOVER="changeImages('button_privacy02', 'images/button_privacy02-over.gif'); return true;" ONMOUSEOUT="changeImages('button_privacy02', 'images/button_privacy02.gif'); return true;"><img src="images/button_privacy02.gif" width="56" height="31" NAME="button_privacy02" border="0"></a><img src="images/divider.gif" width="12" height="31"><a HREF="registration.asp" ONMOUSEOVER="changeImages('button_account02', 'images/button_account02-over.gif'); return true;" ONMOUSEOUT="changeImages('button_account02', 'images/button_account02.gif'); return true;"><img src="images/button_account02.gif" width="88" height="31" border="0" NAME="button_account02"></a><img src="images/divider.gif" width="12" height="31"><a HREF="contact.htm" ONMOUSEOVER="changeImages('button_contact02', 'images/button_contact02-over.gif'); return true;" ONMOUSEOUT="changeImages('button_contact02', 'images/button_contact02.gif'); return true;"><img src="images/button_contact02.gif" width="73" height="31" NAME="button_contact02" border="0"></a><img src="images/bottom02.gif" width="404" height="31"></td>
</tr>
<%
end if 'lawyerExists
%>
</table>
<ul>
<li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">
<a href="free-listing.asp">Complete
National Lawyer Directory</a></font></li>
<li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="registration.asp">Add
url</a><br>
</font></li>
</ul>
<hr size="1" align="left" noshade>
<%
if fso.FileExists(theFile_footer) then
Set f = fs
penTextFile(theFile_footer,1,true)
theFooter = f.ReadAll()
else
theFooter = ""
end if
%>
<blockquote><font face="Verdana, Arial, Helvetica, sans-serif" size="1">
<!--footer here-->
<%=theFooter%> <br>
</form>
<br>
</font></blockquote>
<hr size="1" align="left" noshade>
<font face="Verdana, Arial, Helvetica, sans-serif" size="1"> © 2003 All rights
reserved. <br>
<a href="mailto:info@lawyer-connect.com">info@lawyer-connect.com</a><br>
<br>
<a href=" target="_blank">New
York Web Designer-Design</a></font>
<map name="Map">
<area shape="rect" coords="108,32,176,48" href="read-more.htm">
</map>
<br>
<!-- web tools statistics hit counter code -->
<script language="javascript">
var data,nhp,ntz,rf,sr;document.cookie='__support_check=1';nhp='http';
rf=document.referrer;sr=document.location.search;
if(top.document.location==document.referrer
|| (document.referrer == '' && top.document.location != ''))
{rf=top.document.referrer;sr=top.document.location.search}
ntz=new Date();if((location.href.substr(0,6)=='https:') ||
(location.href.substr(0,6)=='HTTPS:'))nhp='https';
data='&an='+escape(navigator.appName)+ '&ck='+document.cookie.length+
'&rf='+escape(rf)+ '&sl='+escape(navigator.systemLanguage)+
'&av='+escape(navigator.appVersion)+ '&l='+escape(navigator.language)+
'&pf='+escape(navigator.platform)+ '&pg='+escape(location.pathname);
if(navigator.appVersion.substring(0,1)>'3') {data=data+'&cd='+
screen.colorDepth+'&rs='+escape(screen.width+ ' x '+screen.height)+
'&tz='+ntz.getTimezoneOffset()+'&je='+ navigator.javaEnabled()};
document.write('<img border=0 hspace=0 '+
'vspace=0 width=1 height=1 src="'+nhp+'://counter2.hitslink.com/'+
'statistics.asp?v=1&s=201&acct=lawyer'+data+'">');</script>
<script language="javascript1.2">document.write('<');
document.write('!-- ');</script>
<noscript> <img border="0" hspace="0" vspace="0" width="1" height="1" src="<!--//-->
<!-- End statistics web tools hit counter code -->
<map name="Map2"> </map>
</body>
</html>
Basically on the previous page a lawyer area and lawyer law type is selected and this page is supposed to return all matching records. When there are no records matching, the page is supposed to return some html (in red.) Instead I get this error:
Microsoft VBScript runtime (0x800A000D)
Type mismatch: 'Ubound'
/infotest.asp, line 224
I tried to do a redirect before getting to that function (in red) but the client wants the page to display with the text. Does anyone know what can be done to fix this.
Thanks for your suggestions:
<%
Response.Buffer = True
Response.ExpiresAbsolute = Now() - 1
Response.Expires = 0
Response.CacheControl = "no-cache"
%>
<!--ASP codes developed by Shafi Kashefi (shafi@vancouvermart.com)Dec 2002. All rights reserved-->
<!--#include file="law.inc"-->
<%
Set law_Conn = Server.CreateObject("adodb.Connection"

Set lawRS = Server.CreateObject("adodb.RecordSet"

Set insRS = Server.CreateObject("adodb.RecordSet"

Set tmpRS = Server.CreateObject("adodb.RecordSet"

Set fso = Server.CreateObject("scripting.FileSystemObject"

law_Conn.Open Session("law_DSN"

if inStr(1,Request.ServerVariables("HTTP_USER_AGENT"

isIE = true
else
isIE = false
end if
lawType = request("lawType"

region = request("region"

action = request("action"

lawyerID_str = request("lawyerID_str"

tmpRS.Open "Select [CapturedR],[ImageFile] From [tbl_Region] Where [Region] = '"& CheckStringIn(region) &"' ",law_Conn, adOpenDynamic
if not (tmpRS.EOF AND tmpRS.BOF) then
regionImgFile = CheckStringOut(tmpRS("ImageFile"

txtFile_Region = CheckStringOut(tmpRS("CapturedR"

else
regionImgFile = ""
end if
tmpRS.Close
tmpRS.Open "Select [CapturedLT],[ImageFile] From [tbl_LawType] Where [LawType] = '"& CheckStringIn(lawType) &"' ",law_Conn, adOpenDynamic
if not (tmpRS.EOF AND tmpRS.BOF) then
lwTypeImgFile = CheckStringOut(tmpRS("ImageFile"

txtFile_LT = CheckStringOut(tmpRS("CapturedLT"

else
lwTypeImgFile = ""
end if
tmpRS.Close
lawRS.Open "Select * From [tbl_Lawyers] Where (([Region] = '"& region &"') AND ([LawType] = '"& lawType &"') AND ([Active] = true) AND ([ExclusiveListing] = true))", law_Conn, 3, 1
if not (lawRS.EOF AND lawRS.BOF) then
lawyerExists = true
lawyerID_str =","
lawyerInfo_str = "|"
while not lawRS.EOF
lawyerID_str = lawyerID_str & lawRS("ID"

lawyerInfo_str = lawyerInfo_str & lawRS("ID"








lawRS.MoveNext
wend
if right(lawyerinfo_str,1) = "|" then lawyerinfo_str = left(lawyerinfo_str,len(lawyerinfo_str)-1)
lawyerInfo_ary = Split(lawyerInfo_str,"|"

if isArray(lawyerInfo_ary) then
ub = Ubound(lawyerInfo_ary)
Redim theVal(ub)
Randomize
for k = 1 to ub
j = Int(((ubound(lawyerInfo_ary) - 1 + 1)* Rnd + 1))
theVal(k) = lawyerInfo_ary(j)
lawyerInfo_str = Replace(lawyerInfo_str,"|"&lawyerInfo_ary(j),""

lawyerInfo_ary = Split(lawyerInfo_str,"|"

next
else
Redim theVal(1)
theVal(1) = lawyerInfo_str
end if
else
lawyerExists = false
end if
lawRS.Close
'if lawyerExists = false then Response.Redirect "1index.asp"
'SERVER-->
theFile_title = Server.MapPath("/txtFiles/"

'theFile_title = Server.MapPath("/lawyer/txtFiles/"

'SERVER-->
theFile_footer = Server.MapPath("/txtFiles/"

'theFile_footer = Server.MapPath("/lawyer/txtFiles/"

SELECT CASE Left(Lcase(action),4)
Case "conn"
selCon = request("selectedcontacts"

insRS.Open "tbl_Cases", law_Conn, adOpenDynamic, adLockOptimistic
insRS.AddNew
insRS("Name"


insRS("Email"


insRS("Phone"


insRS("CaseDesc"


insRS("Region"

insRS("Lawyer_ID"

insRS("caseDate"

insRS.Update
insRS.MoveLast
caseID = insRS("ID"

insRS.Close
lawyerID_ary = split(selCon,","

insRS.Open "tbl_caseLog", law_Conn, adOpenDynamic, adLockOptimistic
for elm = 1 to Ubound(lawyerID_ary)-1
if Len(lawyerID_ary(elm))>0 then
insRS.AddNew
insRS("Case_ID"

insRS("Lawyer_ID"

insRS("theDate"

insRS.Update
end if
next 'elm
insRS.Close
lnbr = Chr(13) & Chr(10)
CCsent = false
'Response.Write "LawyerInfo: "& lawyerInfo_str & "<br>"
lawyerInfo_ary = Split(lawyerInfo_str,"|"

'Response.Write "isArray: " & isArray(lawyerInfo_ary) & "<br>"
for a= 0 to Ubound(lawyerInfo_ary)
if Len(lawyerInfo_ary(a))>0 then
arytmp = Split(lawyerInfo_ary(a),"^"

'Response.Write "Ary temp is array: " & isArray(arytmp) & "<br>"
L_ID = Trim(arytmp(0))
if inStr(selCon,","&L_ID&","

L_Name = Trim(arytmp(1))
L_Email = Trim(arytmp(2))
'Response.Write "L_ID: " & L-ID & "<br>"
'Response.Write "L_Name: " & L_Name & "<br>"
'Response.Write "L_Email: " & L_Email & "<br>"
Set Mailer = Server.CreateObject("CDONTS.NewMail"

msgFrom = "Lawyer-Connect website" & "<mfw@michaelwilliamswebdesign.com>"
msgTo = L-Name & "<" & L_Email & ">"
Mailer.From = msgfrom
Mailer.to = msgTo
if not CCsent then Mailer.CC = "Michael Williams" & "<mfw@michaelwilliamswebdesign.com>"
Mailer.Subject = "Lawyer-Connect.com Inquiry"
strMessage = ""
strMessage = "Dear " & L_Name & lnbr
strMessage = strMessage& "You've just recieved an inquiry through Lawyer-Connect.com website. Below are the details of the inquiry: " & lnbr & lnbr
StrMessage = strMessage& "Client's name: " & request("name"

StrMessage = strMessage& "Client's phone: " & request("phone"

StrMessage = strMessage& "Client's email: " & request("email"

StrMessage = strMessage& "Client's case: " & request("casedesc"

Mailer.Body = StrMessage
Mailer.Send
'Response.Write "StrMessage: " & strmessage & "<br>"
'Response.Write "<hr>"
Set objMailer = nothing
CCsent = true
StrMessage = ""
end if 'instr
end if 'Len(lawyerInfor_ary)
next 'a
%>
<script LANGUAGE="javascript">
<!--
alert("Your inquiry was sent to these lawyers. They will contact you shortly."

parent.location.href = "index.asp"
//-->
</script>
<%
Response.End
END SELECT
%>
<html>
<head>
<%
if fso.FileExists(theFile_title) then
Set f = fs

theTitle = f.ReadAll()
else
theTitle = ""
end if
%>
<title><%=theTitle%></title>
<meta HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
<script LANGUAGE="JavaScript">
<!--
<!--
function newImage(arg) {
if (document.images) {
rslt = new Image();
rslt.src = arg;
return rslt;
}
}
function changeImages() {
if (document.images && (preloadFlag == true)) {
for (var i=0; i<changeImages.arguments.length; i+=2) {
document[changeImages.arguments].src = changeImages.arguments[i+1];
}
}
}
var preloadFlag = false;
function preloadImages() {
if (document.images) {
button_about_over = newImage("images/button_about-over.gif"

preloadFlag = true;
}
}
function getDetails(lawID,region,lawyerID_str)
{
if (lawID.length == 0) return (false);
document.getElementById('lawDetails').src = "detail.asp?lawID=" + lawID + "®ion=" + escape(region) + "&lawyerID_str=" + escape(lawyerID_str);
}
function getSelContacts(theForm)
{
var contactstr = ",";
var selConAry = new Array()
if (<%=ubound(theval)%> > 1)
{
selConAry = theForm.selectedcontacts;
}else
{
selConAry[0] = theForm.selectedcontacts;
}
for (i=0;i<selConAry.length;i++)
{
if (selConAry.checked) contactstr += selConAry.value+",";
}
if (contactstr == ","

return (contactstr);
}
function regContacts(theForm)
{
document.getElementById('lawDetails').src = "contact.asp?region=<%=Server.URLEncode(region)%>&lawtype=<%=Server.URLEncode(lawtype)%>&lawyerID_str=<%=Server.URLEncode(lawyerID_str)%>&selContacts="+escape(getSelContacts(theForm));
}
// -->
function doIt(v)
{
for(var i=0;i<document.lawyerListForm.selectedcontacts.length;i++)
document.lawyerListForm.selectedcontacts.checked=eval(v);
document.lawyerListForm.c3.checked=false;
document.lawyerListForm.c4.checked=false;
}
function MM_callJS(jsStr) { //v2.0
return eval(jsStr)
}
//-->
</script>
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body BGCOLOR="#CDCED6" link="#006666" vlink="#99CCCC" alink="#59AC59" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0" ONLOAD="preloadImages();regContacts(lawyerListForm);">
<form name="lawyerListForm">
<table WIDTH="800" BORDER="0" CELLPADDING="0" CELLSPACING="0">
<tr>
<td>
<table WIDTH="800" BORDER="0" CELLPADDING="0" CELLSPACING="0">
<tr>
<td> <a href="index.asp"><img SRC="images/logo.jpg" WIDTH="226" HEIGHT="96" border="0"></a></td>
<td><a href="index.asp"><img SRC="images/top.jpg" WIDTH="574" HEIGHT="96" border="0" alt="find a lawyer"></a></td>
</tr>
<tr>
<td valign="top" bgcolor="#FFFFFF"><img SRC="images/logo02.jpg" WIDTH="226" HEIGHT="42"></td>
<td background="images/bgimage-top.gif" nowrap> <img src="images/spacer.gif" width="1" height="6"><br>
<img src="images/<%=regionImgFile%>"><img src="images/<%=lwTypeImgFile%>"><img src="images/lawyer-directory.gif" width="54" height="30"><br>
<img src="images/info.gif" width="385" height="52" usemap="#Map" border="0" alt="top lawyer directory finding a lawyer"></td>
</tr></table>
</td>
</tr>
<%
if not lawyerExists then
%>
<tr>
<td valign="top" align="center" bgcolor="#FFFFFF">
<p><br>
<br>
<br>
<b><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Sorry!</font></b><font face="Verdana, Arial, Helvetica, sans-serif" size="2">
Currently there is not a lawyer in our database in this category/region.
<br>
<a href="index.asp">Please try another search</a></font>.</p>
<p><a href="registration.asp"><font face="Verdana, Arial, Helvetica, sans-serif" size="2">Add
your Law Firm to the Lawyer-Connect Directory.</font></a><br>
<br>
<br>
</p>
</td>
</tr>
<%
else
%>
<tr valign="top">
<td valign="top" align="right" background="images/bgimage-bottom.jpg"><table width="95%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td valign="top">
<p align="left"><img src="images/spacer.gif" width="400" height="8" border="0"><br>
<font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#3A6955"> <font color="#003399"> Roll
your mouse over the graphic </font></font><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#3A6955"><font color="#003399">
below to view</font></font> <font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#3A6955"><font color="#003399">info
on each lawyer.</font></font>
<table width="40%" border="0" align="right">
<tr>
<td height="27">
<div align="left"><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
<input type="checkbox" name="c3" value="false" onmouseover="regContacts(this.form)" onclick="doIt(this.value)">
<font size="1">All Not Checked</font><BR>
</font><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
</font><font size="2" face="Verdana, Arial, Helvetica, sans-serif">
<input type="checkbox" name="c4" value="true" onmouseover="regContacts(this.form)" onclick="doIt(this.value)">
<font size="1">All Checked<BR>
<a href="#" onmouseover="regContacts(lawyerListForm)"><img src="/images/INQFORM.jpg" border="0"></a>
</font> </font> </div>
</td>
</tr>
</table>
<p align="left"><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#3A6955"><font color="#003399"> </font></font><br>
<%
for k = 1 to Ubound(theval)
tmpary = split(theVal(k),"^"

lawID = tmpary(0)
if ubound(tmpary)>=3 then
if Len(tmpary(3))>0 then
ImageFile = tmpary(3)
else
ImageFile = "no-image.gif"
end if
end if
if ubound(tmpary)>=4 then Description = tmpary(4)
if ubound(tmpary)>=5 then WebAddr = tmpary(5)
if ubound(tmpary)>=6 then Company = tmpary(6)
lDesc = Left(Description,120)
if Len(Description)>120 then lDesc = Left(Description,117) & "..."
%>
<p align="left">
<table width="100%" border="0" cellspacing="0" cellpadding="4" dwcopytype="CopyTableCell">
<tr>
<td bgcolor="#EFEFEF" valign="top" rowspan="2" width="100"><a href="#" onmouseover="getDetails('<%=lawID%>','<%=region%>','<%=lawyerID_str%>');"><img src="upload_images/<%=ImageFile%>" width="100" height="75"></a></td>
<td bgcolor="#EFEFEF" valign="middle" width="200"><a href="#" onmouseover="getDetails('<%=lawID%>');"><img src="images/read-more.gif" width="88" height="18" border="0"></a></td>
<td bgcolor="#EFEFEF" valign="middle" width="350" align="center"><a href=" target="_blank"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><%=webAddr%></font></a></td>
<td bgcolor="#FFFFFF" valign="top" nowrap><font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#207468">Include<br>
for contact</font></td>
<td bgcolor="#FFFFFF" valign="middle" nowrap align="center">
<input type="checkbox" name="selectedcontacts" value="<%=lawID%>" onclick="regContacts(this.form)" checked>
</td>
</tr>
<tr>
<td bgcolor="#EFEFEF" valign="top" colspan="4" height="57"><font size="1" face="Verdana, Arial, Helvetica, sans-serif"><b><%=Company%></b><br>
<%=CheckStringOut(lDesc)%></font></td>
</tr>
<tr>
<td colspan="5"><img src="images/spacer.gif" width="400" height="10"></td>
</tr>
</table>
<br>
<%
next 'k
%>
</td>
<td bgcolor="#EFEFEF" valign="top" align="center"><img src="images/connect-form.jpg" width="258" height="34"><br>
<font face="Verdana, Arial, Helvetica, sans-serif" size="1" color="#003399">Email
all Law Firms on this page with Inquiry Form.</font><br>
<iframe frameborder="0" id="lawDetails" SRC="contact.asp?region=<%=Server.URLEncode(region)%>&lawtype=<%=Server.URLEncode(lawtype)%>&lawyerID_str=<%=Server.URLEncode(lawyerID_str)%>" HEIGHT="500" WIDTH="300" MARGINHEIGHT="0" SCROLLING="NO" ALLOWTRANSPARENCY="true"></iframe></td>
</tr>
</table>
</td>
</tr>
<tr>
<td valign="top" colspan="2" background="images/bgimage-bottom.jpg"> <img src="images/spacer.gif" width="10" height="10"></td>
</tr>
<tr>
<td colspan="2"><a HREF="index.asp" ONMOUSEOVER="changeImages('button_home02', 'images/button_home02-over.gif'); return true;" ONMOUSEOUT="changeImages('button_home02', 'images/button_home02.gif'); return true;"><img src="images/button_home02.gif" width="45" height="31" NAME="button_home02" border="0"></a><img src="images/divider.gif" width="12" height="31"><a HREF="about.htm" ONMOUSEOVER="changeImages('button_about02', 'images/button_about02-over.gif'); return true;" ONMOUSEOUT="changeImages('button_about02', 'images/button_about02.gif'); return true;"><img src="images/button_about02.gif" width="83" height="31" NAME="button_about02" border="0"></a><img src="images/divider.gif" width="12" height="31"><a HREF="privacy.htm" ONMOUSEOVER="changeImages('button_privacy02', 'images/button_privacy02-over.gif'); return true;" ONMOUSEOUT="changeImages('button_privacy02', 'images/button_privacy02.gif'); return true;"><img src="images/button_privacy02.gif" width="56" height="31" NAME="button_privacy02" border="0"></a><img src="images/divider.gif" width="12" height="31"><a HREF="registration.asp" ONMOUSEOVER="changeImages('button_account02', 'images/button_account02-over.gif'); return true;" ONMOUSEOUT="changeImages('button_account02', 'images/button_account02.gif'); return true;"><img src="images/button_account02.gif" width="88" height="31" border="0" NAME="button_account02"></a><img src="images/divider.gif" width="12" height="31"><a HREF="contact.htm" ONMOUSEOVER="changeImages('button_contact02', 'images/button_contact02-over.gif'); return true;" ONMOUSEOUT="changeImages('button_contact02', 'images/button_contact02.gif'); return true;"><img src="images/button_contact02.gif" width="73" height="31" NAME="button_contact02" border="0"></a><img src="images/bottom02.gif" width="404" height="31"></td>
</tr>
<%
end if 'lawyerExists
%>
</table>
<ul>
<li><font face="Verdana, Arial, Helvetica, sans-serif" size="2">
<a href="free-listing.asp">Complete
National Lawyer Directory</a></font></li>
<li><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><a href="registration.asp">Add
url</a><br>
</font></li>
</ul>
<hr size="1" align="left" noshade>
<%
if fso.FileExists(theFile_footer) then
Set f = fs

theFooter = f.ReadAll()
else
theFooter = ""
end if
%>
<blockquote><font face="Verdana, Arial, Helvetica, sans-serif" size="1">
<!--footer here-->
<%=theFooter%> <br>
</form>
<br>
</font></blockquote>
<hr size="1" align="left" noshade>
<font face="Verdana, Arial, Helvetica, sans-serif" size="1"> © 2003 All rights
reserved. <br>
<a href="mailto:info@lawyer-connect.com">info@lawyer-connect.com</a><br>
<br>
<a href=" target="_blank">New
York Web Designer-Design</a></font>
<map name="Map">
<area shape="rect" coords="108,32,176,48" href="read-more.htm">
</map>
<br>
<!-- web tools statistics hit counter code -->
<script language="javascript">
var data,nhp,ntz,rf,sr;document.cookie='__support_check=1';nhp='http';
rf=document.referrer;sr=document.location.search;
if(top.document.location==document.referrer
|| (document.referrer == '' && top.document.location != ''))
{rf=top.document.referrer;sr=top.document.location.search}
ntz=new Date();if((location.href.substr(0,6)=='https:') ||
(location.href.substr(0,6)=='HTTPS:'))nhp='https';
data='&an='+escape(navigator.appName)+ '&ck='+document.cookie.length+
'&rf='+escape(rf)+ '&sl='+escape(navigator.systemLanguage)+
'&av='+escape(navigator.appVersion)+ '&l='+escape(navigator.language)+
'&pf='+escape(navigator.platform)+ '&pg='+escape(location.pathname);
if(navigator.appVersion.substring(0,1)>'3') {data=data+'&cd='+
screen.colorDepth+'&rs='+escape(screen.width+ ' x '+screen.height)+
'&tz='+ntz.getTimezoneOffset()+'&je='+ navigator.javaEnabled()};
document.write('<img border=0 hspace=0 '+
'vspace=0 width=1 height=1 src="'+nhp+'://counter2.hitslink.com/'+
'statistics.asp?v=1&s=201&acct=lawyer'+data+'">');</script>
<script language="javascript1.2">document.write('<');
document.write('!-- ');</script>
<noscript> <img border="0" hspace="0" vspace="0" width="1" height="1" src="<!--//-->
<!-- End statistics web tools hit counter code -->
<map name="Map2"> </map>
</body>
</html>