Exemplo n.º 1
0
    def POST(self):

        content = web.input()
        t = content['type']

        time_md5 = session['time_md5']

        try:
            zf, ret = zf_login(content, time_md5)
        except KeyError:
            return render.key_error()

        if ret.find('欢迎您') != -1:
            pass
        elif ret.find('密码错误') != -1:
            return render.pw_error()

        elif ret.find('验证码不正确') != -1:
            return render.recg_error()
        else:
            return render.ufo_error()

        if t == "1":
            table = zf.get_score()
        elif t == "2":
            table = zf.get_kaoshi()
        elif t == "3":
            table = zf.get_kebiao()
        else:
            return render.input_error()
        if table:
            return render.old_result(table=table)
        else:
            error = "can not find your index table"
            return render.old_result(error=error)
Exemplo n.º 2
0
    def POST(self):

        content = web.input()
        t = content['type']

        time_md5=session['time_md5']

        try:
            zf, ret = zf_login(content, time_md5)
        except KeyError:
            return render.key_error()

        if ret.find('欢迎您') != -1:
            pass
        elif ret.find('密码错误') != -1:
            return render.pw_error()

        elif ret.find('验证码不正确') != -1:
            return render.recg_error()
        else:
            return render.ufo_error()

        if t == "1":
            table = zf.get_score()
        elif t == "2":
            table = zf.get_kaoshi()
        elif t == "3":
            table = zf.get_kebiao()
        else:
            return render.input_error()
        if table:
            return render.old_result(table=table)
        else:
            error = "can not find your index table"
            return render.old_result(error=error)
Exemplo n.º 3
0
    def POST(self):
        data = web.input()

        self.xh, self.pw = data.xh, data.pw
        t, time_md5 = data.t, data.time_md5

        try:

            zf, ret = zf_login(data, time_md5)
            #value = all_client.pop(time_md5)
            #zf, viewstate = value

        except KeyError:
            return json_err("can not find target time_md5")


        if ret.find('欢迎您') != -1:
            pass
        elif ret.find('密码错误') != -1:
            return json_err("password wrong")
        elif ret.find('验证码不正确') != -1:
            return json_err("verify code wrong")
        else:
            return json_err("server is sleeping ...")

        if t == "1":
            table = zf.get_score()
            json_object = self.__score_get_json(table)
        elif t == "2":
            return json_err("please contact admin")
            #table = zf.get_kaoshi()
        elif t == "3":
            #return json_err("please contact admin")
            table = zf.get_kebiao()
            k = KBJSON(table)
            json_object = k.get_json()
        else:
            return json_err("can not find your t")

        if json_object:
            return json_object
        else:
            return json_err("can not find your contents")
Exemplo n.º 4
0
    def POST(self):
        data = web.input()

        self.xh, self.pw = data.xh, data.pw
        t, time_md5 = data.t, data.time_md5

        try:

            zf, ret = zf_login(data, time_md5)
            #value = all_client.pop(time_md5)
            #zf, viewstate = value

        except KeyError:
            return json_err("can not find target time_md5")

        if ret.find('欢迎您') != -1:
            pass
        elif ret.find('密码错误') != -1:
            return json_err("password wrong")
        elif ret.find('验证码不正确') != -1:
            return json_err("verify code wrong")
        else:
            return json_err("server is sleeping ...")

        if t == "1":
            table = zf.get_score()
            json_object = self.__score_get_json(table)
        elif t == "2":
            return json_err("please contact admin")
            #table = zf.get_kaoshi()
        elif t == "3":
            #return json_err("please contact admin")
            table = zf.get_kebiao()
            k = KBJSON(table)
            json_object = k.get_json()
        else:
            return json_err("can not find your t")

        if json_object:
            return json_object
        else:
            return json_err("can not find your contents")
Exemplo n.º 5
0
    def POST(self):
        content = web.input()

        time_md5 = session['time_md5']
        session['xh'] = content['xh']

        try:
            zf, ret = zf_login(content, time_md5)
        except KeyError:
            return render.key_error()

        if ret.find('欢迎您') != -1:
            pass
        elif ret.find('密码错误') != -1:
            return render.pw_error()

        elif ret.find('验证码不正确') != -1:
            return render.recg_error()
        else:
            return render.ufo_error()
        session.logged_in = True

        raise web.seeother('/succeed')
Exemplo n.º 6
0
    def POST(self):
        content = web.input()

        time_md5=session['time_md5']
        session['xh']=content['xh']

        try:
            zf, ret = zf_login(content, time_md5)
        except KeyError:
            return render.key_error()

        if ret.find('欢迎您') != -1:
            pass
        elif ret.find('密码错误') != -1:
            return render.pw_error()


        elif ret.find('验证码不正确') != -1:
            return render.recg_error()
        else:
            return render.ufo_error()
        session.logged_in=True

        raise web.seeother('/succeed')