func rm_user_sub(w http.ResponseWriter, r *http.Request, uu *user) {
	glog.Info("rm a user from a sub.")
	sm := new(define.Sub_map)
	r.ParseForm()
	sm.Sub_id = r.FormValue("sub_id")
	sm.User_id = r.FormValue("user_id")
	if err := store.Manager.DelUserFromSub(sm, uu.ID); err != nil {
		glog.Errorf("Del the user o error:%v\n", err)
		badReaquest(w, `{"status":"fail"}`)
	} else {
		uu.isOK = true
		io.WriteString(w, `{"status":"success"}`)
	}
}
Remove user from the sub group
package main
import (
	"io"
	"io/ioutil"
	"net/http"
	"strconv"
	"github.com/Alienero/quick-know/store"
	"github.com/Alienero/quick-know/store/define"
	"github.com/golang/glog"
)
var (
	Private = "m/"
	Group   = "ms/"
	Inf_All = "inf/all"
)
func private_msg(w http.ResponseWriter, r *http.Request, u *user) {
	glog.Info("Add a private msg.")
	msg := newMsg()
	r.ParseForm()
	msg.To_id = r.FormValue("to_id")
	glog.Infof("To_id is :%v", msg.To_id)
	if s := r.FormValue("expired"); s != "" {
		msg.Expired, _ = strconv.ParseInt(s, 10, 64)
	}
	var err error
	if msg.Body, err = ioutil.ReadAll(r.Body); err != nil {
		glog.Errorf("push private msg error%v\n", err)
		return
	}
	if store.Manager.IsUserExist(msg.To_id, u.ID) {
		msg.Owner = u.ID
		msg.Topic = Private + msg.Owner
		if err = write_msg(msg); err != nil {
			glog.Error(err)
			badReaquest(w, `{"status":"fail"}`)
			return
		}
		io.WriteString(w, `{"status":"success"}`)
		u.isOK = true
	} else {
		glog.Info("push private msg error: user not exist.")
		badReaquest(w, `{"status":"fail"}`)
	}
}
func add_user(w http.ResponseWriter, r *http.Request, uu *user) {
	glog.Info("Add a new user(Client)")
	u := new(define.User)
	r.ParseForm()
	u.Psw = r.FormValue("psw")
	u.Owner = uu.ID
	if err := store.Manager.AddUser(u); err != nil {
		badReaquest(w, `{"status":"fail"}`)
	} else {
		uu.isOK = true
		io.WriteString(w, `{"id":"`)
		io.WriteString(w, u.Id)
		io.WriteString(w, `"}`)
	}
}
func del_user(w http.ResponseWriter, r *http.Request, uu *user) {
	glog.Info("Del a user.")
	u := new(define.User)
	r.ParseForm()
	u.Id = r.FormValue("id")
	if err := store.Manager.DelUser(u.Id, uu.ID); err != nil {
		glog.Errorf("Del user in the web error:%v", err)
		badReaquest(w, `{"status":"fail"}`)
	} else {
		uu.isOK = true
		io.WriteString(w, `{"id":"`)
		io.WriteString(w, u.Id)
		io.WriteString(w, `"}`)
	}
}
func add_sub(w http.ResponseWriter, r *http.Request, uu *user) {
	glog.Info("Add a new sub.")
	sub := new(define.Sub)
	r.ParseForm()
	if s := r.FormValue("max"); s != "" {
		sub.Max, _ = strconv.Atoi(s)
	}
	if s := r.FormValue("type"); s != "" {
		sub.Typ, _ = strconv.Atoi(s)
	}
	sub.Own = uu.ID
	if err := store.Manager.AddSub(sub); err != nil {
		glog.Errorf("Add new sub error(%v)", err)
		badReaquest(w, `{"status":"fail"}`)
	} else {
		glog.Info("Add sub ok.")
		uu.isOK = true
		io.WriteString(w, `{"sub_id":"`)
		io.WriteString(w, sub.Id)
		io.WriteString(w, `"}`)
	}
}
func del_sub(w http.ResponseWriter, r *http.Request, uu *user) {
	glog.Info("Del a sub.")
	sub := new(define.Sub)
	r.ParseForm()
	sub.Id = r.FormValue("id")
	if err := store.Manager.DelSub(sub.Id, uu.ID); err != nil {
		glog.Errorf("Del sub in the web error:%v", err)
		badReaquest(w, `{"status":"fail"}`)
	} else {
		uu.isOK = true
		io.WriteString(w, `{"status":"success"}`)
	}
}
func user_sub(w http.ResponseWriter, r *http.Request, uu *user) {
	glog.Info("Del a user sub.")
	sm := new(define.Sub_map)
	r.ParseForm()
	sm.Sub_id = r.FormValue("sub_id")
	sm.User_id = r.FormValue("user_id")
	if err := store.Manager.AddUserToSub(sm, uu.ID); err != nil {
		glog.Errorf("Store the sub_map error:", err)
		badReaquest(w, `{"status":"fail"}`)
	} else {
		uu.isOK = true
		io.WriteString(w, `{"status":"success"}`)
	}
}