$uridata = $_SERVER['REQUEST_URI'];
include_once getenv('SITE_BASE_PATH')."/app/_conf.php";
include_once getenv('SITE_BASE_PATH')."/app/_db.php";
$uriarray = explode("/", $uridata);
$state_full_lower = strtolower($uriarray[1]);
// Debug experts routing
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
echo "";
if (strlen($uriarray[2]) < 1) {
echo "";
// ################################################################################################################################
// ##### REPORTERS SHOW LIST OF STATES
$morelaw_title = "Expert Witnesses by State";
include getenv('SITE_BASE_PATH')."/app/layout/template_top.php"; ?>
Expert Witnesses by State
}
elseif (($uriarray[1] == "experts") && (strlen($uriarray[3]) < 1) && (strstr($uriarray[2], 'search'))) {
// ################################################################################################################################
// ##### EXPERT SEARCH - EXPERTSEARCH.ASP
// Check if search parameters are present
$has_search_params = !empty($_GET['name']) || !empty($_GET['expertise']) || !empty($_GET['firm']) || !empty($_GET['city']) || !empty($_GET['state']);
// Prevent caching of search results pages for proper back button behavior
if ($has_search_params) {
header("Cache-Control: no-store, no-cache, must-revalidate, max-age=0");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
}
$morelaw_title = $has_search_params ? "Expert Witness Search Results" : "Expert Witness Search";
include getenv('SITE_BASE_PATH')."/app/layout/template_top.php";
?>
Search For An Expert Witness
include getenv('SITE_BASE_PATH')."/app/layout/template_bottom.php";
} elseif (($uriarray[1] == "experts") && (strlen($uriarray[4]) < 1) && ($uriarray[2] == "search") && ($uriarray[3] == "results")) {
// ################################################################################################################################
// ##### EXPERT SEARCH - SEARCH RESULTS (htmx-enhanced)
include ('experts_search_results.php');
// Template bottom is included in experts_search_results.php
return;
}
elseif (($uriarray[1] == "experts") && (strlen($uriarray[3]) > 1) && (strlen($uriarray[4]) < 1) && (strstr($uriarray[3], '.asp') == FALSE)) {
echo "";
echo "";
// ################################################################################################################################
// ##### EXPERTS SHOW PRACTICE AREAS FOR A CITY
//
$state_full_lower = $uriarray[2];
$sql1 = "SELECT * FROM states1 WHERE (state2='$state_full_lower' OR state3='$state_full_lower') LIMIT 0,1";
$result1 = mysql_query($sql1,$db);
$row1 = mysql_fetch_array($result1);
$state = $row1["state1"];
$statefull = $row1["state2"];
$sql3 = "SELECT * FROM cities2 WHERE state1='$state' AND city2='$uriarray[3]' LIMIT 0,1";
$result3 = mysql_query($sql3,$db);
$row3 = mysql_fetch_array($result3);
$city = $row3["city1"];
$morelaw_title = $city." ".$statefull." Expert Witnesses";
include getenv('SITE_BASE_PATH')."/app/layout/template_top.php";
?>
echo $city ?>, echo $statefull ?>
Expert Witnesses By Expertise
$sql1 = "SELECT * FROM expertsubjects ORDER by name1 asc LIMIT 0,500";
$result1 = mysql_query($sql1,$db);
if ($row1 = mysql_fetch_array($result1)) {
echo "";
$number1 = -1;
do {
$number1 = $number1 + 1;
if ($number1 == 3) {
$number1 = 0;
echo "";
}
?>
.asp"> echo $row1["name1"] ?>
} while ($row1 = mysql_fetch_array($result1));
echo "
";
} else {
echo "error!";
}
}
elseif (($uriarray[1] == "experts") && (strstr($uriarray[2], '.asp') == FALSE) && (strlen($uriarray[3]) < 1)) {
// ################################################################################################################################
// ##### EXPERTS SHOW CITIES / COUNTIES FOR A PARTICULAR STATE - MORELAW.COM/EXPERTS/[WHATEVER].ASP
$state_full_lower = $uriarray[2];
$sql1 = "SELECT * FROM states1 WHERE (state2='$state_full_lower' OR state3='$state_full_lower') LIMIT 0,1";
$result1 = mysql_query($sql1,$db);
$row1 = mysql_fetch_array($result1);
$state = $row1["state1"];
$statefull = $row1["state2"];
$morelaw_title = $statefull." Expert Witnesses";
include getenv('SITE_BASE_PATH')."/app/layout/template_top.php";
$sql2 = "SELECT * FROM cities2 WHERE state1='$state' ORDER by city1";
$result2 = mysql_query($sql2,$db);
$totalnumber = mysql_num_rows($result2);
?>
echo $statefull ?> Expert Witnesses
$sql1 = "SELECT * FROM cities2 WHERE state1='$state' ORDER by city1";
$result1 = mysql_query($sql1,$db);
if ($row1 = mysql_fetch_array($result1)) {
echo "
";
$number1 = -1;
do {
$number1 = $number1 + 1;
if ($number1 == 3) {
$number1 = 0;
echo "";
}
$citylink = strtolower($row1["city2"]);
?>
echo $row1["city1"] ?>
} while ($row1 = mysql_fetch_array($result1));
echo "
";
}
else {
echo "error!";
}
}
elseif (($uriarray[1] == "experts") && (strlen($uriarray[3]) > 1) && (strlen($uriarray[4]) < 1) && (strstr($uriarray[3], '.asp')) && (strstr($uriarray[3], 'by_city'))) {
// ################################################################################################################################
// ##### EXPERTS SHOW CITY FROM by_city1.asp by_city2.asp ETC...
$state_full_lower = $uriarray[2];
$sql1 = "SELECT * FROM states1 WHERE (state2='$state_full_lower' OR state3='$state_full_lower') LIMIT 0,1";
$result1 = mysql_query($sql1,$db);
$row1 = mysql_fetch_array($result1);
$state = $row1["state1"];
$statefull = $row1["state2"];
$morelaw_title = $statefull." Experts by City";
include getenv('SITE_BASE_PATH')."/app/layout/template_top.php";
?>
echo $statefull ?> Expert Witnesses by City
$citystart = ((substr($uriarray[3], 7, -4) * 80) - 80);
$sql1 = "SELECT * FROM cities2 WHERE state1='$state' ORDER by city1 LIMIT $citystart, 80";
$result1 = mysql_query($sql1,$db);
if ($row1 = mysql_fetch_array($result1)) {
echo "
";
$number1 = -1;
do {
$number1 = $number1 + 1;
if ($number1 == 3) {
$number1 = 0;
echo "";
}
$citylink = strtolower(str_replace(" ", "", $row1["city1"]));
?>
echo $row1["city1"] ?>
} while ($row1 = mysql_fetch_array($result1));
echo "
";
}
else {
echo "error!";
}
}
elseif ((($uriarray[1] == "experts") && (strlen($uriarray[3]) > 1)) && (strstr($uriarray[4], '.asp'))) {
echo "";
echo "";
// ################################################################################################################################
// ##### EXPERTS SHOW LIST OF EXPERTS FOR A PARTICULAR PARTICULAR COUNTY / CITY
$state_full_lower = $uriarray[2];
$sql1 = "SELECT * FROM states1 WHERE (state2='$state_full_lower' OR state3='$state_full_lower') LIMIT 0,1";
$result1 = mysql_query($sql1,$db);
$row1 = mysql_fetch_array($result1);
$state = $row1["state1"];
$statefull = $row1["state2"];
$citycity = $uriarray[3];
$sql3 = "SELECT * FROM cities2 WHERE state1='$state' AND city2='$citycity' LIMIT 0,1";
$result3 = mysql_query($sql3,$db);
$row3 = mysql_fetch_array($result3);
$city1 = $row3["city1"];
$citystate = $city1.", ".$state;
$subjectname = str_replace("_", "", $uriarray[4]);
$subjectname = str_replace(".asp", "", $subjectname);
echo "";
$sql2 = "SELECT * FROM expertsubjects WHERE name2='$subjectname' LIMIT 0,1";
echo "";
$result2 = mysql_query($sql2,$db);
$row2 = mysql_fetch_array($result2);
$subject1 = isset($row2["name1"]) ? $row2["name1"] : "";
echo "";
$morelaw_title = $city1." ".$statefull." ".$subject1." Expert Witness";
include getenv('SITE_BASE_PATH')."/app/layout/template_top.php";
?>
echo $city1.", ".$statefull." - ".$subject1." Expert Witnesses" ?>
$sql1 = "SELECT * FROM experts1 WHERE expertise LIKE '%$subject1%' AND ((City LIKE '$city1' AND ST='$state') OR places LIKE '%$citystate%') AND visible='' ORDER by rank, PostDate DESC LIMIT 0,40";
echo "";
$sql2 = "SELECT * FROM experts1 WHERE places LIKE '%national%' AND visible='' AND rank < 11 ORDER by PostDate, rank DESC LIMIT 0,20";
echo "";
$result1 = mysql_query($sql1,$db);
$result2 = mysql_query($sql2,$db);
$shownCount = 0;
$localCount = mysql_num_rows($result1);
$nationalCount = mysql_num_rows($result2);
echo "";
if ($row1 = mysql_fetch_array($result1)) {
do {
$shownCount++;
?>
&l= echo $row1["Last"] ?>&i= echo $row1["id"] ?>&z= echo $row1["Zip"] ?>&s= echo $row1["ST"] ?>"> echo $row1["Last"] ?>, echo $row1["First"] ?> echo $row1["Middle"] ?> - echo $row1["City"] ?>, echo $row1["ST"] ?>
echo str_replace(" ","",$row1["expertise"]) ?>
} while ($row1 = mysql_fetch_array($result1));
}
if ($row2 = mysql_fetch_array($result2)) {
// #################################################################
// ########## LAYER THREE - PAID NATIONAL
do {
$shownCount++;
?>
&l= echo $row2["Last"] ?>&i= echo $row2["id"] ?>&z= echo $row2["Zip"] ?>&s= echo $row2["ST"] ?>"> echo $row2["Last"] ?>, echo $row2["First"] ?> echo $row2["Middle"] ?>
- echo $row2["City"] ?>, echo $row2["ST"] ?>
echo str_replace(" ","",$row2["expertise"]) ?>
} while ($row2 = mysql_fetch_array($result2));
}
echo "";
if ($shownCount == 0) {
echo "";
?>
Need Help Finding An Expert Witness?
If you need assistance in finding an expert witness, feel
free call MoreLaw at 918-582-6422 or 866-753-1142 for
assistance or E-mail MoreLaw at info@MoreLaw.Com and we
will assist you free of charge in finding an expert
witness to help you.
Since 1996, MoreLaw's goal has been to collect and
publish information about the best court reporters in the
United States.
Kent Morlan
}
?>
} elseif (($uriarray[1] == "experts") && (strlen($uriarray[3]) < 1) && (strstr($uriarray[2], 'recent.asp'))) {
// ################################################################################################################################
// ##### EXPERTS SHOW RECENT LISTINGS - MORELAW.COM/EXPERTS/RECENT.ASP
$morelaw_title = "Expert Witnesses - Recent Listings";
include getenv('SITE_BASE_PATH')."/app/layout/template_top.php";
?>
}
elseif (($uriarray[1] == "experts") && (strlen($uriarray[3]) < 1) && (strstr($uriarray[2], 'addexpert.asp'))) {
// ################################################################################################################################
// ##### REPORTERS ADD LISTING - addreporter.ASP
include getenv('SITE_BASE_PATH')."/app/layout/template_top.php";
?>
Add An Expert Witness Listing
}
elseif (($uriarray[1] == "experts") && (strlen($uriarray[3]) < 1) && (strstr($uriarray[2], 'expert.asp'))) {
echo "";
// ################################################################################################################################
// ##### EXPERT SHOW LISTING - EXPERT.ASP
$f = $_GET['f'];
$l = $_GET['l'];
$i = $_GET['i'];
$z = $_GET['z'];
$s = $_GET['s'];
$sql3 = sprintf("SELECT * FROM experts1 WHERE id='%s' AND Zip='%s' AND ST='%s' AND visible='' LIMIT 0,1", mysql_real_escape_string($i, $db), mysql_real_escape_string($z, $db), mysql_real_escape_string($s, $db));
$result3 = mysql_query($sql3,$db);
$row3 = mysql_fetch_array($result3);
$morelaw_title ="MoreLaw Directory Listing For: ".$row3["First"]." ".$row3["Middle"]." ".$row3["Last"]." ".substr($row3["expertise"],0,25)." Expert Witness";
$morelaw_description = $row3["First"]." ".$row3["Middle"]." ".$row3["Last"]." ".$row3["City"]." ".$row3["ST"]." is a ".substr($row3["expertise"],0,50)." Forensic Expert Witness";
$morelaw_keywords = $row3["First"]." ".$row3["Middle"]." ".$row3["Last"].", ".$row3["City"]." ".$row3["ST"].", ".substr($row3["expertise"],0,100).", Forensic, Expert, Witness, Witnesses";
include getenv('SITE_BASE_PATH')."/app/layout/template_top.php";
// Show back button if coming from search
$show_back = isset($_GET['back']) && !empty($_GET['back']);
?>
MoreLaw Forensic
Expert Directory Listing For
if (($row1["ptype"] == "paid") && ($row1["photograph"])) { ?>
.jpg">
} ?>
echo $row3["First"] ?> echo $row3["Last"] ?>
if (strlen($row3["Firm"]) > 2) { ?> echo $row3["Firm"] ?> } ?>
echo $row3["Address"] ?>
echo $row3["City"] ?>, echo $row3["ST"] ?> echo $row3["Zip"] ?>
if (strlen($row3["Phone"]) > 2) { ?>
TEL: echo $row3["Phone"]; ?>
} ?>
if (strlen($row3["Fax"]) > 2) { ?>
FAX: echo $row3["Fax"]; ?>
} ?>
if (strlen($row3["Email"]) > 2) { ?>
Email: "> echo $row3["Email"]; ?>
} ?>
if (strlen($row3["URL"]) > 2) { ?>
Website: "> echo $row3["URL"]; ?>
} ?>
if (strlen($row3["expertise"]) > 2) { ?>
Expertise: echo $row3["expertise"]; ?>
} ?>
if ($row1["ptype"] !== "paid") { ?>
">Click Here To Enhance Your Profile in the Directory
You can sign in to
update or upgrade this listing by ">clicking
here.
If the information shown above is incorrect,
please call us at 888-354-4529 and we will be
happy to make any correction that you request at no charge.
} ?>
} else {
echo "";
echo "";
echo "";
// Default fallback - show states list
$morelaw_title = "Expert Witnesses by State";
include getenv('SITE_BASE_PATH')."/app/layout/template_top.php"; ?>
Expert Witnesses by State
ERROR: No routing condition matched. Please check the URL.
}
include getenv('SITE_BASE_PATH')."/app/layout/template_bottom.php";
?>