changechannellayout.java

来自「JAVA邮件系统」· Java 代码 · 共 62 行

JAVA
62
字号
import java.io.*;
import java.text.*;
import java.sql.*;
import java.util.*;
import javax.servlet.*;
import javax.servlet.http.*;

/**
 * 
 *
 * @author zhukejun
 */

public class ChangeChannelLayout extends HttpServlet {
	public void doGet(HttpServletRequest request,
                      HttpServletResponse response)
        throws IOException, ServletException
    {
      
		HtmlOut htmlOut = new HtmlOut (response);
     

		// 得到名字
		String pass;
		int p;
		
		Person person = new Person();
		person.setName (CommonMethods.GetUserName(request));
		
		pass = CommonMethods.GetUserPass (request);
		person.setPassword ( pass );
		
		if( person.getName ()==null || (!person.checkPassword(pass)) )
		{
	    	htmlOut.setErrorID (htmlOut.SHOW_SIMPLE_MESSAGE ,"",
								"请先登录!","Login?action=reLog");
			htmlOut.outHtml();
			return;
		}
		p=Integer.valueOf(request.getParameter("p")).intValue ();
		TemplateList tempList = CommonMethods.getMyLayoutTemplate ();
		if( tempList == null ){
			htmlOut.setErrorID (htmlOut.TEMPLATE_NOTFIND ,""
							 ,"find MyLayout channel error","Login");
			htmlOut.outHtml ();
			return;
		}
		
		MyLayoutChannel layout = new MyLayoutChannel();
			
		layout.MakeLayoutInfo(person,tempList,htmlOut,p );
		htmlOut.outHtml ();
	
	}
	public void doPost(HttpServletRequest request,
                      HttpServletResponse response)
        throws IOException, ServletException
    {
		 doGet(request,response);
	}
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?