<<<<Restricted Area>>>>" . //"
Sorry, you must Log In to view this Page

"); //exit(); //} //$usrn = $_GET['usrn']; //if($usrn == ""){ //$usrn = $_POST['usrn']; //} //if($usrn == ""){ //echo("

<<<<Restricted Area>>>>" . //"
Problem with your username. Please Log In again.

"); //exit(); //} $catselected=$_POST['catselect']; $searchit=$_POST['searchy']; $dbcnx = @mysql_connect('mysql.plainhost.com', 'ecosmar_ecosmart', 'ecoman1'); mysql_select_db('ecosmar_website', $dbcnx); $getcats=mysql_query("SELECT category FROM repdocs ORDER BY category"); if(!$getcats){ $airs[]="Could not retrieve Category List. ".mysql_error(); }else{ while($cats=mysql_fetch_array($getcats)){ $allcats[]=$cats[0]; }//while getting $catsonly = array_unique($allcats); }//gotcats ?>
BACK Eco-$mart On-line Administration
Eco-$mart Downloads     Click to Open or Right Click and Click "Save Target As...".
" . "
" . "" . "" . "" . "" . "
"); }//not selected else{ if($searchit==""){ echo("" . "
$value
"); }else{//searchitisnotblank echo("" . "
" . "" . "" . "" . "" . "
"); }//searchitisnotblank }//selected }//4each echo("" . "
" . "" . "" . "" . "" . "
"); ?>
" . "
Search for: " . "" . "" . "" . "" . "
"); if($searchit!=""){ $serge=mysql_query("SELECT ID,category,title,link,description,type FROM repdocs WHERE title LIKE '%$searchit%' ORDER BY title ASC"); if(!$serge){ echo("" . "
" . "Search Failed. Please try again." . "
"); $airs[]="Could not search for title. ".mysql_error(); }else{ $numberof=mysql_num_rows($serge); if($numberof < 1){ echo("" . "
" . "No Search Results for : $searchit" . "
"); }else{ echo("" . "
" . "$numberof Search Results for: "$searchit"" . "
"); $a=1; while($row=mysql_fetch_array($serge)){ $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 }//gotserge }//searchison else{//searchyisblank if($catselected!=""){//there is a category selected echo("" . "
" . "$catselected
"); $getit=mysql_query("SELECT ID,category,title,link,description,type FROM repdocs WHERE category='$catselected' ORDER BY title ASC"); if(!$getit){ echo("" . "
" . "NO LIST AVAILABLE FOR: $catselected" . "
"); $airs[]="Could not get category. ".mysql_error(); }else{ $numberof=mysql_num_rows($getit); if($numberof < 1){ echo("" . "
" . "No Titles in Category $catselected" . "
"); }else{ $a=1; while($row=mysql_fetch_array($getit)){ $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 }//gotit }//there is a category selected else{//no category selected-- getallbycategory echo("" . "
" . "All Files
"); foreach($catsonly as $value){ echo("" . "
" . "$value
"); $whatsit=mysql_query("SELECT ID,category,title,link,description,type FROM repdocs WHERE category='$value' ORDER BY title ASC"); if(!$whatsit){ echo("" . "
" . "FILE LIST NOT AVAILABLE FOR: $value" . "
"); $airs[]="Could not get $value list. ".mysql_error(); }else{ $numberof=mysql_num_rows($whatsit); if($numberof < 1){ echo("" . "
" . "No $value Files in Data Base" . "
"); }else{ $a=1; while($row=mysql_fetch_array($whatsit)){ $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 }//gotwhatsit }//4each }//no category selected }//searchyisblank ?>
" . "
" . "" . "" . "" . "" . "
"); }//not selected else{ if($searchit==""){ echo("" . "
$value
"); }else{//searchitisnotblank echo("" . "
" . "" . "" . "" . "" . "
"); }//searchitisnotblank }//selected }//4each echo("" . "
" . "" . "" . "" . "" . "
"); ?>

 

Eco-$mart Downloads
©2010 - Data Base Interface - Custom Built at: kwgrubbs.com
$value"); } }//airs not empty }//error_report is on ?>