isLoggedIn())
{
header ("location: ../../login.php");
exit();
}
$display=new display($dbf->conn,$cfg_theme,$cfg_currency_symbol,$lang);
$display->displayTitle("$lang->manageCategories");
$f1=new form('manage_categories.php','POST','categories','475',$cfg_theme,$lang);
$f1->createInputField("$lang->searchForCategory",'text','search','','24','375');
$f1->endForm();
$tableheaders=array("$lang->rowID","$lang->categoryName","$lang->updateCategory","$lang->deleteCategory");
$tablefields=array('id','category');
if(isset($_POST['search']))
{
$search=$_POST['search'];
echo "$lang->searchedForCategory: $search";
$display->displayManageTable("$cfg_tableprefix",'categories',$tableheaders,$tablefields,'category',"$search",'category');
}
else
{
$display->displayManageTable("$cfg_tableprefix",'categories',$tableheaders,$tablefields,'','','category');
}
$dbf->closeDBlink();
?>