Example #1
3
	"database/Dbase"
	"fmt"
	"github.com/gorilla/securecookie"
	"html/template"
	"logger"
	"net/http"
)

func Init() {
	ResultTypeInit()
	UserOnline = make(map[string]string)
}

var res_type_info ResultType
var logInfo = logger.GetInfo()
var logWar = logger.GetWar()
var logErr = logger.GetErr()
var logDeb = logger.GetSuc()

func RegisterHandler(w http.ResponseWriter, r *http.Request) {

	fmt.Println(r.Method)

	if r.Method == "GET" {
		reg_Info := Reg_Type_Info{
			IsHide:   "none",
			Info:     "",
			BackShow: false,
		}

		file, err := template.ParseFiles("../www/html/register.html")
Example #2
1
func OutPut_Result(w http.ResponseWriter, arg ...interface{}) {
	logWar := logger.GetWar()
	res, err := json.Marshal(arg)
	if err != nil {
		logWar.Println("The arg can't Output_Result")
		fmt.Println("The arg can't Output_Result")
		return
	}
	w.Write(res)
}