case 'editproduct': $id = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : 0; $P = new Product($id); if ($id == 0 && isset($_POST['short_description'])) { // Pick a field. If it exists, then this is probably a rejected save $P->SetVars($_POST); } $content .= $P->showForm(); break; case 'editcat': $id = isset($_REQUEST['id']) ? (int) $_REQUEST['id'] : 0; USES_paypal_class_category(); $C = new Category($id); if ($id == 0 && isset($_POST['description'])) { // Pick a field. If it exists, then this is probably a rejected save $C->SetVars($_POST); } $content .= $C->showForm(); break; case 'catlist': $content .= PAYPAL_adminlist_Category(); break; case 'attributes': if (isset($_POST['delbutton_x']) && is_array($_POST['delitem'])) { // Delete some checked attributes USES_paypal_class_attribute(); foreach ($_POST['delitem'] as $attr_id) { Attribute::Delete($attr_id); } } $content .= PAYPAL_adminlist_Attributes();