/** *删除分类 * @param string $where * @return string */ function delCate($id) { $res = checkProExist($id); if (!$res) { $where = "id=" . $id; if (delete("imooc_cate", $where)) { $mes = "分类删除成功!<br/><a href='listCate.php'>查看分类</a>|<a href='addCate.php'>添加分类</a>"; } else { $mes = "删除失败!<br/><a href='listCate.php'>请重新操作</a>"; } return $mes; } else { alertMes("不能删除分类,请先删除该分类下的商品", "listPro.php"); } }
/** *删除分类 * @param string $where * @return string */ function delCate($id) { $res = checkProExist($id); if (!$res) { $where = "type_id=" . $id; if (delete("tigris_user_type", $where)) { $mes = "Deleted success!<br/><a href='listCate.php'>View list</a>|<a href='addCate.php'>Add user type</a>"; } else { $mes = "Deleted failed!<br/><a href='listCate.php'>View list</a>"; } return $mes; } else { alertMes("Can't delelte, please delete the content in the cate first!", "listPro.php"); } }