package com.mingsoft.servlet.admin.web;
import java.io.File;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.mingsoft.biz.IWebBiz;
import com.mingsoft.biz.impl.WebBizImpl;
import com.mingsoft.servlet.BaseServlet;
 
/**
 * 删除logo 控制层
 * @author 张敏
 *
 */
@SuppressWarnings("serial")
public class DeleteLogoServlet extends BaseServlet {
	
	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
	}

	/**
	 * 删除网站LOGO
	 */
	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
			super.doPost(request, response);
			IWebBiz webBiz = new WebBizImpl();
			String webLogo = request.getParameter("deleteLogo");
			webBiz.deleteLogo(webLogo);
			//创建一个File      
			File file = new File(webLogo);
			if(file.exists()){
				file.delete();
			}
	}

}
