| 
foreach($catsonly as $value){
//////////////////////////////////////////////page address///////////////////////////
if($catselected=="" or $catselected!=$value){
echo("");
}//not selected
else{
if($searchit==""){
echo("");
}else{//searchitisnotblank
echo("");
}//searchitisnotblank
}//selected
}//4each
echo("");
?>
 |   
///searchform
echo("");
if($searchit!=""){
	
	
	
$serge=dbq("SELECT ID,category,title,link,description,type FROM repdocs WHERE title LIKE '%$searchit%' ORDER BY title ASC", "a");
if(count($serge) == 0){
echo("" .
"| " .
"No Search Results for : $searchit" .
" |   ");
}else{
echo("" .
"| " . count($serge) . " Search Results for: "$searchit"" .
" |   ");
$a=1;
foreach($serge as $row){
	$bakko= $a/2;
	if(is_int($bakko)){
	$tdbg="#eeeeee";
	}else{
	$tdbg="#FFFFFF";
	}//cellalternate color
	$ID=$row['ID'];
	$category=$row['category'];
	$title=$row['title'];
	$link=$row['link'];
	$description=$row['description'];
	$type=$row['type'];
	echo("" .
	"| " .
	"$title" .
	" -- Category: $category -- $type -- $description" .
	" |   ");
	$a=$a+1;
}//whilegettingserges
}//there are rows
}//searchison
else{//searchyisblank
	if($catselected!=""){//there is a category selected
	echo("");
	
	$getit=dbq("SELECT ID,category,title,link,description,type FROM repdocs WHERE category='$catselected' ORDER BY title ASC", "a");
	if (count($getit) == 0){
		echo("" .
		"| " .
		"No Titles in Category $catselected" .
		" |   ");
	}else{
		$a=1;
		foreach($getit as $row){
		$bakko=$a/2;
		if(is_int($bakko)){
		$tdbg="#eeeeee";
		}else{
		$tdbg="#FFFFFF";
		}//cellalternate color
		$ID=$row['ID'];
		$category=$row['category'];
		$title=$row['title'];
		$link=$row['link'];
		$description=$row['description'];
		$type=$row['type'];
		echo("" .
		"| " .
		"$title" .
		" -- $type -- $description" .
		" |   ");
		$a=$a+1;
		}//whilegettingit
	}//there are rows
	}//there is a category selected
	else{//no category selected-- getallbycategory
	echo("");
		foreach($catsonly as $value){
			echo("");
			
			
			$whatsit=dbq("SELECT ID,category,title,link,description,type FROM repdocs WHERE category='$value' ORDER BY title ASC", "a");
				if(count($whatsit) == 0){
					echo("" .
					"| " .
					"No $value Files in Data Base" .
					" |   ");
				}else{
					$a=1;
					foreach($whatsit as $row){
						$bakko=$a/2;
						if(is_int($bakko)){
						$tdbg="#eeeeee";
						}else{
						$tdbg="#FFFFFF";
						}//cellalternate color
						$ID=$row['ID'];
						$category=$row['category'];
						$title=$row['title'];
						$link=$row['link'];
						$description=$row['description'];
						$type=$row['type'];
						echo("" .
						"| " .
						"$title" .
						" -- $type -- $description" .
						" |   ");
						$a=$a+1;
					}//whilegettingwhatsit
				}//there are rows
		}//4each
	}//no category selected
}//searchyisblank
?>
 |   
| 
foreach($catsonly as $value){
//////////////////////////////////////////////page address///////////////////////////
if($catselected=="" or $catselected!=$value){
echo("");
}//not selected
else{
if($searchit==""){
echo("");
}else{//searchitisnotblank
echo("");
}//searchitisnotblank
}//selected
}//4each
echo("");
?>
 |   
 
 
 |