if (isset($id)) { if (is_array($id)) { $ids = $id; } else { $ids[] = $id; } } else { errorinfo('变量错误', ''); } foreach ($ids as $key => $value) { $value = intval($value); if ($value <= 0) { errorinfo('变量错误', ''); } //20120719 checkClassPower('downloads', $value); $classNum = $downloads_class->GetClassCount($value); if ($classNum > 0) { errorinfo('对不起,该分类(' . $value . ')有子分类', ''); } $infoNum = $downloads->GetInfoCount($value); if ($infoNum > 0) { errorinfo('对不起,该分类(' . $value . ')下有内容', ''); } } if ($downloads_class->Del($ids)) { errorinfo('删除成功', ''); } else { errorinfo('删除失败', ''); } break;
if (isset($id)) { if (is_array($id)) { $ids = $id; } else { $ids[] = $id; } } else { errorinfo('变量错误', ''); } foreach ($ids as $key => $value) { $value = intval($value); if ($value <= 0) { errorinfo('变量错误', ''); } //20120719 checkClassPower('articles', $value); $classNum = $articles_class->GetClassCount($value); if ($classNum > 0) { errorinfo('对不起,该分类(' . $value . ')有子分类', ''); } $infoNum = $articles->GetInfoCount($value); if ($infoNum > 0) { errorinfo('对不起,该分类(' . $value . ')下有内容', ''); } } if ($articles_class->Del($ids)) { errorinfo('删除成功', ''); } else { errorinfo('删除失败', ''); } break;
if (isset($id)) { if (is_array($id)) { $ids = $id; } else { $ids[] = $id; } } else { errorinfo('变量错误', ''); } foreach ($ids as $key => $value) { $value = intval($value); if ($value <= 0) { errorinfo('变量错误', ''); } //20120719 checkClassPower('products', $value); $classNum = $products_class->GetClassCount($value); if ($classNum > 0) { errorinfo('对不起,该分类(' . $value . ')有子分类', ''); } $infoNum = $products->GetInfoCount($value); if ($infoNum > 0) { errorinfo('对不起,该分类(' . $value . ')下有内容', ''); } } if ($products_class->Del($ids)) { errorinfo('删除成功', ''); } else { errorinfo('删除失败', ''); } break;
// $ids = array(); if (isset($id)) { if (is_array($id)) { $ids = $id; } else { $ids[] = $id; } } else { errorinfo('变量错误', ''); } foreach ($ids as $key => $value) { $value = intval($value); if ($value <= 0) { errorinfo('变量错误', ''); } $info = $products_photo->GetInfo('', ' id = ' . $value); if (empty($info)) { errorinfo('变量错误', ''); } $productinfo = $products->GetInfo('', ' id = ' . $info['productid']); //20120719 checkClassPower('products', $productinfo['classid']); } if ($products_photo->Del($ids)) { errorinfo('删除成功', ''); } else { errorinfo('删除失败', ''); } break; }
case 'del': // $ids = array(); if (isset($id)) { if (is_array($id)) { $ids = $id; } else { $ids[] = $id; } } else { errorinfo('变量错误', ''); } foreach ($ids as $key => $value) { $value = intval($value); $info = $articles->GetInfo('', ' id = ' . $value); if (empty($info)) { errorinfo('变量错误', ''); } //20120719 checkClassPower('articles', $info['classid']); if ($value <= 0) { errorinfo('变量错误', ''); } } if ($articles->Del($ids)) { errorinfo('删除成功', ''); } else { errorinfo('删除失败', ''); } break; }
case 'del': // $ids = array(); if (isset($id)) { if (is_array($id)) { $ids = $id; } else { $ids[] = $id; } } else { errorinfo('变量错误', ''); } foreach ($ids as $key => $value) { $value = intval($value); if ($value <= 0) { errorinfo('变量错误', ''); } $info = $downloads->GetInfo('', ' id = ' . $value); if (empty($info)) { errorinfo('变量错误', ''); } //20120719 checkClassPower('downloads', $info['classid']); } if ($downloads->Del($ids)) { errorinfo('删除成功', ''); } else { errorinfo('删除失败', ''); } break; }