define ( array( HED => "header.tpl", MA => "main.tpl", FO => "footer.tpl" ) ); $db = new MySQL; if(!$db->init()) { echo "Well this sucks
\n"; exit; } function breadcrumbs($CatID="") { global $db; global $PHP_SELF; if(empty($CatID)) { return; } $db->get_ParentsInt($CatID); $path = $db->TRAIL; if(!empty($path)) { while ( list ( $key,$val ) = each ($path)) { $CatID = stripslashes($val["CatID"]); $CatName = stripslashes($val["CatName"]); $trail = "|$CatName$trail"; } } else { $trail = ""; } return $trail; } function start_page($CatID="",$title="",$msg="") { global $PHP_SELF; print " www . Go Garden Tools . com -= All Your Garden Needs =-
 
www.GoGardenTools.com
\"Garden
Gardening Directory
 
Directory Search
bookmark us Click Here
Sections
 

Home
Products
Online Resources

Customer Relation
Company Info
Contact Us!
Employees Only

News
  Site News
Company News
Product Search
  by product type:
 
  by keyword:
 
 
Contact Us!
  Have questions about our site? Looking for home & gardening products?

Contact Info
Join E-mail List
 
Name:
Email:
Country:
State/Province:

 

Gardening Directory

\n "; if(!empty($msg)) { print "\n
$msg
\n"; } print "
\n \n
\n

Top \n "; $trail = breadcrumbs($CatID); print "$trail


\n"; return; } function start_browse($CatID = "") { global $PHP_SELF; global $db; $data = $db->get_Cats($CatID); $links = $db->get_Links($CatID); if(!empty($CatID)) { $currentID = $CatID; $currentName = $db->get_CatNames($CatID); } else { $currentID = "top"; $currentName = "top"; } if(!empty($data)) { while ( list ( $key,$val ) = each ($data)) { $CatID = stripslashes($val["CatID"]); $CatName = stripslashes($val["CatName"]); print "
  • $CatName
  • \n"; } print "
    \n"; } if(!empty($links)) { print "Links:
    \n"; while ( list ( $key,$val ) = each ($links)) { $Url = stripslashes($val["Url"]); $LinkName = stripslashes($val["LinkName"]); $Desc = stripslashes($val["Description"]); print "
  • $LinkName
    \n \n
    $Desc
  • \n"; } print "
    \n"; } print "
    Suggest new link

    \n"; print "
     
     
     
     

    Copyright ©. 2000 , HKIC
    Email: web_admin@gogardentools.com
    Last Modified On Saturday, 13-Jan-2001 11:06 PM
     
     

     

    "; return; } // ***************************************************************** $query = getenv("QUERY_STRING"); if( ($viewCat) or ( (!$HTTP_POST_VARS) and (!$query) ) ) { start_page($viewCat); start_browse($viewCat); exit; } elseif($add) { if("$add" == "top") { $add = 0; } $CatName = stripslashes($db->get_CatNames($add)); if(empty($CatName)) { $CatName = "Top"; } print " www . Go Garden Tools . com -= All Your Garden Needs =-
     
    www.GoGardenTools.com
    \"Garden
    Gardening Directory
     
    Directory Search
    bookmark us Click Here
    Sections
     

    Home
    Products
    Online Resources

    Customer Relation
    Company Info
    Contact Us!
    Employees Only

    News
      Site News
    Company News
    Product Search
      by product type:
     
      by keyword:
     
     
    Contact Us!
      Have questions about our site? Looking for home & gardening products?

    Contact Info
    Join E-mail List
     
    Name:
    Email:
    Country:
    State/Province:

     

    Add A Resource

    \n

    Add a Resource to: $CatName


    \n
    \n \n \n \n \n \n \n \n \n
    URL:
    Title:
    Description:
    Your Name:
    Your Email:
    \n
    \n
    \n

    \n
     
     
     
     

    Copyright ©. 2000 , HKIC
    Email: web_admin@gogardentools.com
    Last Modified On Saturday, 13-Jan-2001 11:06 PM
     
     

     

    "; } elseif ($suggest) { $junk = ""; if(!$db->suggest($HTTP_POST_VARS)) { $title = "Suggestion Error"; $msg = "Suggestion failed! Required data missing, invalid, or you duplicated an existing entry.\n"; } else { $title = "Suggestion Submitted"; $msg = "Suggestion submitted for approval\n"; } start_page($junk,$title,$msg); start_browse(); exit; } elseif ($KeyWords) { //start_page(); $hits = $db->search($KeyWords); if( (!$hits) or (empty($hits)) ) { $junk = ""; $title = "Search Results"; $msg = "No Matches"; start_page($junk,$title,$msg); } else { $total = count($hits); $title = "Search Results"; $msg = "Search returned [$total] matches"; $junk = ""; start_page($junk,$title,$msg); while ( list ($key,$hit) = each ($hits)) { if(!empty($hit)) { $LinkID = $hit["LinkID"]; $LinkName = stripslashes($hit["LinkName"]); $LinkDesc = stripslashes($hit["Description"]); $LinkURL = stripslashes($hit["Url"]); $CatID = $hit["CatID"]; $CatName = stripslashes($db->get_CatNames($CatID)); print "
    \n"; print "
    $LinkName\n"; print "
    $LinkDesc\n"; print "
    Found In: $CatName\n"; print "
    \n"; } } } print "


    \n"; start_browse(); exit; } else { // Something terribly bad happened - start fresh start_page(); start_browse(); exit; } ?>