//create fm instance require_once 'includes/db.php'; //cart includes include("includes/functions.php"); if ($_REQUEST['command'] == 'add' && $_REQUEST['productid'] > 0) { $pid = $_REQUEST['productid']; addtocart($pid, 1); header("location:shoppingcart.php"); exit(); } if ($_REQUEST['logout'] == "y") { unset($_SESSION['name']); unset($_SESSION['contactid']); unset($_SESSION['discount']); } //find and pagenation $search = $_REQUEST['search']; $cat = $_REQUEST['cat']; $sale = 0; $sale = $_REQUEST['sale']; $finderror = $_REQUEST['finderror']; if (!isset($search) and !isset($cat)) { $search = NULL; $cat = 'Fabric Draping Supplies'; } $skip = $_GET['skip']; if (!isset($skip)) { $skip = 0; } $max = 15; //for pagenation if (!isset($search)) { $searchstring = "cat=$cat"; } else { $searchstring = "search=$search&cat=$cat"; } //perform search $findCommand =& $fm->newFindCommand('emart_products'); $findCommand->addFindCriterion('categories_view', $cat); $findCommand->addFindCriterion('product_name', $search); $findCommand->addFindCriterion('price_mart_retail', '>0'); $findCommand->addFindCriterion('onclearance', '1'); $findCommand->addFindCriterion('web_hide', '='); $findCommand->addSortRule('product_name', 1, FILEMAKER_SORT_ASCEND); $findCommand->setRange($skip, $max); $result = $findCommand->execute(); if (FileMaker::isError($result)) { header("Location: index.php?finderror=Sorry. No products match this search"); //echo "Error: " . $result->getMessage() . "\n"; exit; } $records = $result->getRecords(); $found = $result->getFoundSetCount(); $prev = $skip - $max; $next = $skip + $max; if (($skip + $max) > $found) { $next = $skip; } //page title if (isset($finderror)) { $pagetitle = "$finderror"; } elseif (!isset($search)) { $pagetitle = $cat . ' ' . $found . ' items '; } else { $pagetitle = 'Search results for "' . "$search" . '" ' . $found . ' items '; } $pagenumber = ($skip / $max) + 1; $pagecount = number_format(($found / $max) + .49); $loginerror = $_REQUEST['loginerror']; $pwchg = $_REQUEST['pwchg']; $nl = $_REQUEST['nl']; ?>
Clearance sale - Most products and equipment 40%, 50%, 60% or more off our previous low prices.
Download Used Items Sale Flyer as PDF
Bring your truck, van or trailer and get even bigger discounts on bulk purchases.
All Sales Final. First come, first served. Limited quantities.