package com.sino.publicclass.util;

public class PageForm {
	public static String radio(String name, String value, String parament, String checkvalue, String lable) {
		String checked = ((checkvalue.equals(value))) ? "checked" : "";
		return "<input type='radio' name=" + name + " value='" + value + "' " + parament + " " + checked + ">" + lable;
	}

	public static String radio(String name, int value, String parament, int checkvalue, String lable) {
		return radio(name, String.valueOf(value), parament, String.valueOf(checkvalue), lable);
	}

	public static String checkBox(String name, String value, String parament, String checkvalue) {
		String checked = ((checkvalue.equals(value))) ? "checked" : "";
		return "<input type='checkbox' name=" + name + " value='" + value + "' " + parament + " " + checked + ">";
	}
	public static String checkBox(String name, String value, String parament, boolean checked) {
		String str = ((checked)) ? "checked" : "";
		return "<input type='checkbox' name=" + name + " value='" + value + "' " + parament + " " + str + ">";
	}
	
	public static String checkBox(String name, String value, String parament, boolean checked,String lable) {
		String str = ((checked)) ? "checked" : "";
		return "<input type='checkbox' name=" + name + " value='" + value + "' " + parament + " " + str + ">"+lable;
	}
	public static String checkBox(String name, int value, String parament, int checkvalue) {
		return checkBox(name, String.valueOf(value), parament, String.valueOf(checkvalue));
	}

}
