} $products = new product(new dbc($config)); $filter = new filter(); extract($_POST); extract($_GET); if (isset($editcat1)) { if (empty($editcat)) { header('location:../products.php?tab=tab1&catid=' . $catid . '&editcat=&r2=please enter category name to continue!'); die; } $r2 = $products->cat_image($_FILES['catimg']['tmp_name'], $editcat); if ($r2 != 'image has been uploaded' || $r2 != 'No file sent.') { header('location:../products.php?tab=tab1&catid=' . $catid . '&editcat=' . $editcat . '&r2=' . $r2); die; } else { if ($filter->validate_string($editcat)) { $message = $products->edit_category($editcat, $catid); header('location:../products.php?tab=tab1&message1=' . $message); die; } } } if (isset($editcat2)) { if (empty($editcat)) { header('location:../products.php?tab=tab2&catid=' . $catid . '&editcat=&r2=please enter category name to continue!'); die; } $r2 = $products->cat_image($_FILES['catimg']['tmp_name'], $editcat); if ($r2 != 'image has been uploaded' || $r2 != 'No file sent.') { header('location:../products.php?tab=tab2&catid=' . $catid . '&editcat=' . $editcat . '&r2=' . $r2); die;