#native_company# #native_desc#
#native_cta#

Bible XML Parser – Chapter and Verse

By Michael
on November 25, 2002

Version: 1.0

Type: Full Script

Category: Other

License: GNU General Public License

Description: parses the king james bible, american standard bible, hitchcocks and eastons bible dictionaries, matthew henry commentary, bible maps and mikesartbible databases. All free XML feeds. Choose chapter and verse or keyword versions.

<?

///////////////////////////////////BPP PARSER/////////////////////////////////////
//Chapter and Verse Search Parser w/ Search Box version: 0.1
//Created Tuesday, November 05, 2002
//This software is shareware with restrictions, you may distribute it freely
//The intent of this code is to distribute the Bible around the world. Enabling 
//Christian Webmasters to serve good Christian literature and useful information
//Under this GPL you agree to the terms below:
//1. There is no warranty for this code, you are on your own.
//2. This license does not make you the owner of this code just the licensee
//3. If you violate this agreement or the spirit in which the code was intended your 
//site will be blocked from our results XML Feed.
//4. This code gets results from http://www.bibleportalproject.com/cgi/cv.php
//5. The code is load balanced and reacts to "GET METHOD" only!
//6. You may not change or delete this header
//7. You may not bundle this code with another code
//8. You may not sell, rent, lease or re-license this code
//9. (c) 2002 Michael L Hill Sr all rights reserved
//The Bible Portal Project www.bibleportalproject.com [email protected]
//Test search is located at http://www.bibleportalproject.com/cgi/c.php

//About The Project: This parser gets results from an XML search feed
//You can place this code as an include or cut and paste it to your PHP script.
//The other end is powered by load balanced PHP 4.12 scripts and mySQL database
//Some Documentation can be found at 
//http://www.bibleportalproject.com/bpp/developers_center/feeds.php
//Other tools from this project can be found at
//http://www.bibleportalproject.com

//You can change any of these tags and look throughout the code for additional tags
//see this symbol below to change fonts inside results '<!------------->'

$quote = "We found these results ";
$quote2 = "Search for <b>$B $G $EX</b> in";
$quote3 = "This search was in:";
$site_name = "for <b>$B $G $EX</b>"; //change this is you like 'at Your Site Name Here'
$titl_font = "font size=3 color=black face=arial";
$tit2_font = "font size=2 color=gray face=arial";
$desc_font = "font size=2 color=black face=arial";
$misc_font = "font size=2 color=gray face=arial";
$err_font = "font size=2 color=red face=arial";
$bullet = " ";
$link_target = "target='_blank'";

///////////////////////////////////BPP PARSER/////////////////////////////////////

//This is the search box

$B = trim($B);
$G = trim($G);

$names = array(
"KJV" => "King James Bible",
"ASV" => "American Standard Bible",
"Henry" => "Matthew Henry Commentary"
);

$books = array(
"Genesis" => "Genesis",
"Exodus" => "Exodus",
"Leviticus" => "Leviticus",
"Numbers" => "Numbers",
"Deuteron" => "Deuteron",
"Joshua" => "Joshua",
"Judges" => "Judges",
"Ruth" => "Ruth",
"1 Samuel" => "1 Samuel",
"2 Samuel" => "2 Samuel",
"1 Kings" => "1 Kings",
"2 Kings" => "2 Kings",
"1 Chron" => "1 Chron",
"2 Chron" => "2 Chron",
"Ezra" => "Ezra",
"Nehemiah" => "Nehemiah",
"Esther" => "Esther",
"Job" => "Job",
"Psalms" => "Psalms",
"Proverbs" => "Proverbs",
"Eccles" => "Eccles",
"Song of Sol" => "Song of Sol",
"Isaiah" => "Isaiah",
"Jeremiah" => "Jeremiah",
"Lament" => "Lament",
"Ezekiel" => "Ezekiel",
"Daniel" => "Daniel",
"Hosea" => "Hosea",
"Joel" => "Joel",
"Amos" => "Amos",
"Obadiah" => "Obadiah",
"Jonah" => "Jonah",
"Micah" => "Micah",
"Nahum" => "Nahum",
"Habakkuk" => "Habakkuk",
"Zephaniah" => "Zephaniah",
"Haggai" => "Haggai",
"Zechariah" => "Zechariah",
"Malachi" => "Malachi",
"Matthew" => "Matthew",
"Mark" => "Mark",
"Luke" => "Luke",
"John" => "John",
"Acts" => "Acts",
"Romans" => "Romans",
"1 Corinth" => "1 Corinth",
"2 Corinth" => "2 Corinth",
"Galatians" => "Galatians",
"Ephesians" => "Ephesians",
"Philippians" => "Philippians",
"Colossians" => "Colossians",
"1 Thessal" => "1 Thessal",
"2 Thessal" => "2 Thessal",
"1 Timothy" => "1 Timothy",
"2 Timothy" => "2 Timothy",
"Titus" => "Titus",
"Philemon" => "Philemon",
"Hebrews" => "Hebrews",
"James" => "James",
"1 Peter" => "1 Peter",
"2 Peter" => "2 Peter",
"1 John" => "1 John",
"2 John" => "2 John",
"3 John" => "3 John",
"Jude" => "Jude",
"Revelation" => "Revelation"
);


echo"<center>n";
echo"<form action='$PHP_SELF' method=get><$desc_font>n";
echo"<select name=R>n";
while(list($k,$v)=each($names)){
	if($R == $k){echo"<option value='$k' selected>$v</option>n";}
	echo"<option value='$k'>$v</option>n";
}
echo"</select>n ";

echo"<select name=B>n";
while(list($kk,$vv)=each($books)){
	if(preg_match("/$kk/", $B)){echo"<option value='$kk' selected>$vv</option>n";}
	echo"<option value='$kk'>$vv</option>n";
}
echo"</select>n ";

echo"<input type='text' name='G' value='$G' size=7> Chapter:Verse (Example 3:16)n ";
echo"<input type='submit' value='Search'>n ";
echo"<br><$desc_font><a href='$PHP_SELF?help=y'>Learn more about how to use this search</a>n ";
echo"</form>
n";
echo"</center>n";

if($help == "y"){ echo"<script language="JavaScript" src="http://www.bibleportalproject.com/bpp/developers_center/js-bin/search_help.php"></script>n "; } 


//This is the parser 
//------------------------------------------

	$N = str_replace(" ", "+", $B);
	$domain = "www.bibleportalproject.com";
	$file = "cgi/cv.php?$QUERY_STRING";

    $fp = fopen("http://$domain/$file", "r");
	$read = fread($fp, 100000);

	$pattern1 = "<ResultCounts>nt<KJVBible count= "(.*)" />nt<ASVBible count= "(.*)" />nt<Henrys count= "(.*)" />nt<Library count= "(.*)" />n</ResultCounts>";
	
	preg_match_all("/$pattern1/", $read, $tot);
	
	$kjvq = $tot[1];
	$asvq = $tot[2];
	$henq = $tot[3];

  fclose ($fp);

//------------------------------------------
// below this line we begin to parse and show content


if($R == "KJV" || $R == "ASV"){
//------------------------------------------Pattern for the Bible
	if($R=="KJV"){ $tag = "kjv";}
	elseif($R=="ASV"){ $tag = "asv";}

	$vpattern = "t<Scope$tag>ntt<Res>(.*)</Res>ntt<ResDesc>(.*)</ResDesc>ntt<Tres>(.*)</Tres>ntt<Tpag>(.*)</Tpag>ntt<Previous>(.*)</Previous>ntt<Next>(.*)</Next>ntt<RTotal>(.*)</RTotal>nt</Scope$tag>";

	preg_match_all("/$vpattern/ms", $read, $meta);
	
	preg_match_all("/<ID>(.*)</ID>/", $read, $resul1);
	preg_match_all("/<OTNT>(.*)</OTNT>/", $read, $resul2);
	preg_match_all("/<Class>(.*)</Class>/", $read, $resul3);
	preg_match_all("/<Title>(.*)</Title>/", $read, $resul4);
	preg_match_all("/<Number>(.*)</Number>/", $read, $resul5);
	preg_match_all("/<Text>(.*)</Text>/", $read, $resul6);

	$Res = $meta[1];		$ResDesc = $meta[2];
	$Tres = $meta[3];		$Tpag = $meta[4];
	$Previous = $meta[5];	$Next = $meta[6];
	$RTotal = $meta[7];

	$a = $resul1[1];		$b = $resul2[1];
	$c = $resul3[1];		$d = $resul4[1];
	$e = $resul5[1];		$f = $resul6[1];

	$count = $RTotal[0];
	//echo"<p>$count<p>";
	
	if($count > 0){

	echo"<p><$tit2_font>$quote $site_name"; 

	for($i=0; $i<$count; $i++){ $ZZZ[$i] = "$B"; }
	for($i=0; $i<$count; $i++){ $XXX[$i] = "$G"; }
	for($i=0; $i<$count; $i++){ $VVV[$i] = "$R"; }
	
	function display($n, $m, $o, $p, $r, $s, $t, $u, $w) {
		
		// User Changes To Style
		// Be careful - do not remove the // signs
		// <!------------->
		
		$bold_resul = 1; // 0 is off, 1 is on
		$bold_title = 1; // 0 is off, 1 is on
		$titl_font = "font size=3 color=black face=arial";
		$tit2_font = "font size=2 color=gray face=arial";
		$desc_font = "font size=2 color=black face=arial";
		$misc_font = "font size=2 color=gray face=arial";
		$bullet = "";
		$link_target = "target='_blank'";
		
		$n_s = $s;
		if($bold_title == 1){ $title = "<b>$bullet $p, $r</b>"; }
		else{ $title = "$bullet $p, $r"; }

		$new_cv = $r[0] . $r[1] . $r[2];
		$new_cv = str_replace(":", "|", $new_cv);
		$c_v = preg_split("/|/", $new_cv); 

		$pp = preg_replace("/ /", "+", $p);
		$t = preg_replace("/ /", "+", $t);
		$u = preg_replace("/ /", "+", $u);
		$w = preg_replace("/ /", "+", $w);

		$extras = "<br><$misc_font>Show: <a href='$PHP_SELF?R=$w&A=M1&B=$t&G=$u&ID=$n'>1 Vr Preceeding and After</a>";
		$extras .= " | <$misc_font><a href='$PHP_SELF?R=$w&A=M5&B=$t&G=$u&ID=$n'>5 Vrs Preceeding and After</a>";
		$extras .= " <$misc_font>Ref: <a href='$PHP_SELF?R=Henry&B=$pp'>Commentary for $p</a> | <a href='$PHP_SELF?R=Henry&B=$pp&G=$c_v[0]&Q=$t&S=and'>Commentary for $p, $c_v[0]</a>";

		return "
		<p><$titl_font>$title
		<br><$desc_font>$n_s
		$extras
		";
	
	}

	$arr = array_map ("display", $a, $b, $c, $d, $e, $f, $ZZZ, $XXX, $VVV);
	while(list($k,$v) = each($arr)){ echo"$vn"; }

		}else{ 	echo"<p><$err_font>Sorry No Results Found</p></font>"; }

}elseif($R == "KJV1"){

	$tag = "kcv";
	$vpattern = "t<Scope$tag>ntt<Res>(.*)</Res>ntt<ResDesc>(.*)</ResDesc>ntt<Tres>(.*)</Tres>ntt<Tpag>(.*)</Tpag>ntt<Previous>(.*)</Previous>ntt<Next>(.*)</Next>ntt<RTotal>(.*)</RTotal>nt</Scope$tag>";

	preg_match_all("/$vpattern/ms", $read, $meta);
	
	preg_match_all("/<ID>(.*)</ID>/", $read, $resul1);
	preg_match_all("/<OTNT>(.*)</OTNT>/", $read, $resul2);
	preg_match_all("/<Class>(.*)</Class>/", $read, $resul3);
	preg_match_all("/<Title>(.*)</Title>/", $read, $resul4);
	preg_match_all("/<Number>(.*)</Number>/", $read, $resul5);
	preg_match_all("/<Text>(.*)</Text>/", $read, $resul6);

	$Res = $meta[1];		$ResDesc = $meta[2];
	$Tres = $meta[3];		$Tpag = $meta[4];
	$Previous = $meta[5];	$Next = $meta[6];
	$RTotal = $meta[7];

	$a = $resul1[1];		$b = $resul2[1];
	$c = $resul3[1];		$d = $resul4[1];
	$e = $resul5[1];		$f = $resul6[1];

	$count = $RTotal[0];
	//echo"<p>$count<p>";
	
	if($count > 0){

	echo"<p><$tit2_font>$quote $site_name"; 

	function display($n, $m, $o, $p, $r, $s) {
		
		// User Changes To Style
		// Be careful - do not remove the // signs
		// <!------------->
		
		$bold_resul = 1; // 0 is off, 1 is on
		$bold_title = 1; // 0 is off, 1 is on
		$titl_font = "font size=3 color=black face=arial";
		$tit2_font = "font size=2 color=gray face=arial";
		$desc_font = "font size=2 color=black face=arial";
		$misc_font = "font size=2 color=gray face=arial";
		$bullet = " ";
		$link_target = "target='_blank'";
		
		$n_s = $s;
		if($bold_title == 1){ $title = "<b>$bullet $p, $r</b>"; }
		else{ $title = "$bullet $p, $r"; }
		$t = preg_replace("/ /", "+", $t);
		$u = preg_replace("/ /", "+", $u);
		$w = preg_replace("/ /", "+", $w);

		$extras = "<br><$misc_font>Show: <a href='$PHP_SELF?R=KJV&A=M1&B=$p&G=$r&ID=$n'>1 Vr Preceeding and After</a>";
		$extras .= " | <$misc_font><a href='$PHP_SELF?R=KJV&A=M5&B=$p&G=$r&ID=$n'>5 Vrs Preceeding and After</a>";

		return "
		<p><$titl_font>$title
		<br><$desc_font>$n_s
		$extras
		";
	
	}

	$arr = array_map ("display", $a, $b, $c, $d, $e, $f);
	while(list($k,$v) = each($arr)){ echo"$vn"; }

		}else{ 	echo"<p><$err_font>Sorry No Results Found -- We Did Not Understand That Command</p></font>"; }


}elseif($R == "MH"){

	$tag = "mat";

	$vpattern = "t<Scope$tag>ntt<Res>(.*)</Res>ntt<ResDesc>(.*)</ResDesc>ntt<Tres>(.*)</Tres>ntt<Tpag>(.*)</Tpag>ntt<Previous>(.*)</Previous>ntt<Next>(.*)</Next>ntt<RTotal>(.*)</RTotal>nt</Scope$tag>";

	preg_match_all("/$vpattern/ms", $read, $meta);
	
	preg_match_all("/<ID>(.*)</ID>/", $read, $resul1);
	preg_match_all("/<Book>(.*)</Book>/", $read, $resul2);
	preg_match_all("/<Source_Text><![CDATA[(.*)]]></Source_Text>/", $read, $resul3);
	preg_match_all("/<Topics>(.*)</Topics>/", $read, $resul4);

	$Res = $meta[1];		$ResDesc = $meta[2];
	$Tres = $meta[3];		$Tpag = $meta[4];
	$Previous = $meta[5];	$Next = $meta[6];
	$RTotal = $meta[7];

	$a = $resul1[1];		$b = $resul2[1];
	$c = $resul3[1];		$d = $resul4[1];

	$count = $RTotal[0];
	//echo"<p>$count<p>";
	
	if(!$ID == ""){

	//echo"<p><$tit2_font>$quote $site_name"; 

	for($i=0; $i<$count; $i++){ $ZZZ[$i] = "$B"; }
	for($i=0; $i<$count; $i++){ $VVV[$i] = "$R"; }
	
	function display($m, $n, $o, $p, $r, $s) {
		
		// User Changes To Style
		// Be careful - do not remove the // signs
		// <!------------->
		
		$bold_resul = 1; // 0 is off, 1 is on
		$bold_title = 1; // 0 is off, 1 is on
		$titl_font = "font size=3 color=black face=arial";
		$tit2_font = "font size=2 color=gray face=arial";
		$desc_font = "font size=2 color=black face=arial";
		$misc_font = "font size=2 color=gray face=arial";
		$bullet = "";
		$link_target = "target='_blank'";
		
		
		$n = preg_replace("/.txt/", "", $n);
		
		if($bold_resul == 1){ $n_s = str_replace("$r", "<b>$r</b>", $o); }
		else{ $n_s =  $o; }
		
		if($bold_title == 1){ $title = "<b>$bullet Results for: $n, ID: $m</b>"; }
		else{ $title = "$bullet Results for: $n, ID: $m"; }

		$n_s = preg_replace("/<B>ORD</B>/i", "ord", $n_s);
		$n_s = preg_replace("/(/", "<p>(", $n_s);
		$n_s = preg_replace("/[/", "<br>[", $n_s);
		$n_s = preg_replace("/-/", ",", $n_s);
		$n_s = preg_replace("//cgi/cv.php/", "$PHP_SELF", $n_s);
		
		return "
		<p><$titl_font>$title
		<br><$desc_font>$n_s
		";
	
	}

	$arr = array_map ("display", $a, $b, $c, $d, $ZZZ, $VVV);
	while(list($k,$v) = each($arr)){ echo"$vn"; }

		}else{ 	echo"<p><$err_font>Sorry No Results Found</p></font>"; }


}elseif($R == "Henry"){
//------------------------------------------Pattern for Commentaries
	$tag = "mat";

	$vpattern = "t<Scope$tag>ntt<Res>(.*)</Res>ntt<ResDesc>(.*)</ResDesc>ntt<Tres>(.*)</Tres>ntt<Tpag>(.*)</Tpag>ntt<Previous>(.*)</Previous>ntt<Next>(.*)</Next>ntt<RTotal>(.*)</RTotal>nt</Scope$tag>";

	preg_match_all("/$vpattern/ms", $read, $meta);
	
	preg_match_all("/<ID>(.*)</ID>/", $read, $resul1);
	preg_match_all("/<Book>(.*)</Book>/", $read, $resul2);
	preg_match_all("/<Source_Text><![CDATA[(.*)]]></Source_Text>/", $read, $resul3);
	preg_match_all("/<Topics>(.*)</Topics>/", $read, $resul4);
	preg_match_all("/<Chapter>(.*)</Chapter>/", $read, $resul5);

	$Res = $meta[1];		$ResDesc = $meta[2];
	$Tres = $meta[3];		$Tpag = $meta[4];
	$Previous = $meta[5];	$Next = $meta[6];
	$RTotal = $meta[7];

	$a = $resul1[1];		$b = $resul2[1];		$g = $resul5[1];
	$c = $resul3[1];		$d = $resul4[1];

	$count = $RTotal[0];
	//echo"<p>$count<p>";
	
	if($count > 0){

	echo"<p><$tit2_font>$quote $site_name"; 

	for($i=0; $i<$count; $i++){ $ZZZ[$i] = "$B"; }
	for($i=0; $i<$count; $i++){ $XXX[$i] = "$G"; }
	for($i=0; $i<$count; $i++){ $VVV[$i] = "$R"; }
	
	function display($m, $n, $o, $p, $r, $s, $t) {
		
		// User Changes To Style
		// Be careful - do not remove the // signs
		// <!------------->
		
		$bold_resul = 1; // 0 is off, 1 is on
		$bold_title = 1; // 0 is off, 1 is on
		$titl_font = "font size=3 color=black face=arial";
		$tit2_font = "font size=2 color=gray face=arial";
		$desc_font = "font size=2 color=black face=arial";
		$misc_font = "font size=2 color=gray face=arial";
		$bullet = " ";
		$link_target = "target='_blank'";
		
		
		$n = preg_replace("/.txt/", "", $n);
		
		if($bold_resul == 1){ $n_s = str_replace("$r", "<b>$r</b>", $o); }
		else{ $n_s =  $o; }
		
		if($bold_title == 1){ $title = "<b>$bullet $n, $t</b>"; }
		else{ $title = "$bullet $n, $t"; }

		return "
		<p><$titl_font><a href='$PHP_SELF?ID=$m&R=MH&B=$r'>$title</a>
		<br><$desc_font>$n_s
		";
	
	}

	$arr = array_map ("display", $a, $b, $c, $d, $ZZZ, $XXX, $g);
	while(list($k,$v) = each($arr)){ echo"$vn"; }

		}else{ 	echo"<p><$err_font>Sorry No Results Found</p></font>"; }
	
}else{
//------------------------------------------Do this when not specified
	$tag = "kjv"; $this = $kjvq[0];
	
	$vpattern = "t<Scope$tag>ntt<Res>(.*)</Res>ntt<ResDesc>(.*)</ResDesc>ntt<Tres>(.*)</Tres>ntt<Tpag>(.*)</Tpag>ntt<Previous>(.*)</Previous>ntt<Next>(.*)</Next>ntt<RTotal>(.*)</RTotal>nt</Scope$tag>";

	preg_match_all("/$vpattern/ms", $read, $meta);
	preg_match_all("/<ID>(.*)</ID>/", $read, $resul1);
	preg_match_all("/<OTNT>(.*)</OTNT>/", $read, $resul2);
	preg_match_all("/<Class>(.*)</Class>/", $read, $resul3);
	preg_match_all("/<Title>(.*)</Title>/", $read, $resul4);
	preg_match_all("/<Number>(.*)</Number>/", $read, $resul5);
	preg_match_all("/<Text>(.*)</Text>/", $read, $resul6);

	$Res = $meta[1];		$ResDesc = $meta[2];
	$Tres = $meta[3];		$Tpag = $meta[4];
	$Previous = $meta[5];	$Next = $meta[6];
	$RTotal = $meta[7];

	$a = $resul1[1];		$b = $resul2[1];
	$c = $resul3[1];		$d = $resul4[1];
	$e = $resul5[1];		$f = $resul6[1];

	$count = $RTotal[0];
	
	if($count > 0){

	echo"<p><$tit2_font>$quote $site_name"; 

	for($i=0; $i<$count; $i++){ $ZZZ[$i] = "$B"; }
	for($i=0; $i<$count; $i++){ $XXX[$i] = "$G"; }
	for($i=0; $i<$count; $i++){ $VVV[$i] = "$R"; }
	
	function display($n, $m, $o, $p, $r, $s, $t, $u, $w) {
		
		
		// User Changes To Style
		// Be careful - do not remove the // signs
		// <!------------->
		
		$bold_resul = 1; // 0 is off, 1 is on
		$bold_title = 1; // 0 is off, 1 is on
		$titl_font = "font size=3 color=black face=arial";
		$tit2_font = "font size=2 color=gray face=arial";
		$desc_font = "font size=2 color=black face=arial";
		$misc_font = "font size=2 color=gray face=arial";
		$bullet = " ";
		$link_target = "target='_blank'";
		
		$n_s = $s;
		if($bold_title == 1){ $title = "<b>$bullet $p, $r</b>"; }
		else{ $title = "$bullet $p, $r"; }


		$pp = preg_replace("/ /", "+", $p);
		$t = preg_replace("/ /", "+", $t);
		$u = preg_replace("/ /", "+", $u);
		$w = preg_replace("/ /", "+", $w);

		$extras = "<br><$misc_font>Show: <a href='$PHP_SELF?R=$w&A=M1&B=$t&G=$u&ID=$n'>1 Vr Preceeding and After</a>";
		$extras .= " | <$misc_font><a href='$PHP_SELF?R=$w&A=M5&B=$t&G=$u&ID=$n'>5 Vrs Preceeding and After</a>";
		$extras .= " <$misc_font>Ref: <a href='$PHP_SELF?R=Henry&B=$pp'>Commentary for $p</a> | <a href='$PHP_SELF?R=Henry&B=$pp&G=$r'>Commentary for $p, $r</a>";
		
		return "
		<p><$titl_font>$title
		<br><$desc_font>$n_s
		$extras
		";
	}

		$arr = array_map ("display", $a, $b, $c, $d, $e, $f, $ZZZ, $XXX, $VVV);
		while(list($k,$v) = each($arr)){ echo"$vn"; }
	
		}else{ 	
		
		if($B == "" || !$B) { echo"<p align=center><$err_font>Select A Book, Enter A Chapter and Verse</p></font>"; }
		else { echo"<p><$err_font>Sorry No Results Found</p></font>"; }
		
		}
}

if(!$ID){
$ppp = $Tpag[0]-1;
if($count >=1){ $more = "<p><$desc_font>$quote3 $B $G: ''$ResDesc[0]''<p>"; }
if($Previous[0] >= 1 && $Previous[0] <= $ppp) { $more .= "<$desc_font>&lt;&lt; <a href='$PHP_SELF?R=$R&B=$N&G=$G&T=0'>First</a> "; }
if($Previous[0] >= "0" && $Previous[0] <= $ppp){ $more .= "<$desc_font>&lt; <a href='$PHP_SELF?R=$R&B=$N&G=$G&T=$Previous[0]'>Previous</a> "; }
if($Tres[0] > 0) { $more .= "<$desc_font>... $Tres[0] Results ...  "; }
if($Next[0]){ $more .= "<$desc_font><a href='$PHP_SELF?R=$R&B=$N&G=$G&T=$Next[0]'>Next &gt;</a>  "; }
if($T < $Tpag[0] && $Next[0]) { $more .= "<$desc_font><a href='$PHP_SELF?R=$R&B=$N&G=$G&T=$Tpag[0]'>Last &gt;&gt;</a> "; }
}
if($B){ $more .= "<p><$desc_font><br>$quote2 <a href='$PHP_SELF?R=KJV&B=$N&G=$G'>KJVBible</a> | <a href='$PHP_SELF?R=ASV&B=$N&G=$G'>ASVBible</a>"; }
echo"$more";
?>