Пример #1
0
 def GET(self,id=None):
     role_list=member.members().role_list()
     results=member.members().member_get_edit(id)
     list=[]
     for v in results:
         list.append(v)
     return render.memberedit(list,role_list)
Пример #2
0
 def GET(self,id=None):
     teacher_results=member.members().member_get_teacher_list(5)
     results=shift.Shift().shift_get_item(id)
     list=[]
     for v in results:
         list.append(v)
     shiftyearlist=shift.Shift().shiftyear_all_list()
     return render.shiftedit(list,teacher_results,shiftyearlist)
Пример #3
0
 def GET(self, id=None):
     shift_list = shift.Shift().shift_get_list(2,2)
     teacher_list = member.members().member_get_teacher_list(4)
     results = course.Course().course_get_list(id)
     list = []
     for v in results:
         list.append(v)
     return render.courseiedit(list, shift_list, teacher_list, globals)
Пример #4
0
 def GET(self, id=None):
     shift_list = shift.Shift().shift_get_list(1,2)
     classes_list = classes.Classes().classes_get_status_list()
     teacher_list = member.members().member_get_teacher_list(4)
     results = course.Course().course_get_list(id)
     list = []
     for v in results:
         list.append(v)
     return render.coursewedit(list, shift_list, classes_list, teacher_list, globals)
Пример #5
0
 def GET(self):
     shift_list = shift.Shift().shift_get_list(1, 2)
     #classes_list = classes.Classes().classes_get_status_list()
     lists=[]
     for shifts in shift_list:
         lists.append(shifts)
     classes_list = classes.Classes().classes_get_list(lists[0].csid)
     teacher_list = member.members().member_get_teacher_list(4)
     return render.coursewadd(lists, classes_list, teacher_list)
Пример #6
0
 def POST(self):
     i = web.input()
     flag=member.members().member_set_pwd(i)
     if flag==1:
         msg="修改成功"
     else:
         msg="修改失败"
     msgdict = {'success':flag,'msg':msg}
     msgjson = json.dumps(msgdict,sort_keys=True)
     return msgjson
Пример #7
0
 def POST(self):
     i = web.input()
     result=member.members().member_del(i.uidstr)
     if result>=1:
         flag=1
         msg="删除成功"
     else:
         flag=1
         msg="删除失败"
     msgdict = {'success':flag,'msg':msg}
     msgjson = json.dumps(msgdict,sort_keys=True)
     return msgjson
Пример #8
0
    def POST(self):

        i = web.input()
        i.setdefault("edittime",time.time())
        flag=member.members().member_set_edit(i)
        if flag==1:
            msg="修改成功"
        else:
            msg="修改失败"
        msgdict = {'success':flag,'msg':msg}
        msgjson = json.dumps(msgdict,sort_keys=True)
        return msgjson
Пример #9
0
 def POST(self):
     i = web.input()
     username=i.username
     userpwd=i.userpwd
     role=i.role
     email=i.email
     qq=i.qq
     realname=i.realname
     status=i.status
     i.setdefault("createtime",time.time())
     flag=member.members().member_add(i)
     if flag==1:
         msg="添加成功"
     else:
         msg="添加失败"
     msgdict = {'success':flag,'msg':msg}
     msgjson = json.dumps(msgdict,sort_keys=True)
     return msgjson
Пример #10
0
 def POST(self):
     i = web.input()
     results=member.members().login(i.username,i.userpwd)
     flag=len(results)
     if flag==1:
         list_tmp=[]
         for i in results:
             list_tmp.append(i)
         msg='登录成功'
         web.ctx.session.logind=1
         web.ctx.session.username=list_tmp[0].username
         web.ctx.session.uid=list_tmp[0].uid
         web.ctx.session.rid=list_tmp[0].rid
         web.ctx.session.rolename=list_tmp[0].rolename
     else:
         msg='登录失败'
     msgdict = {'success':flag,'msg':msg}
     msgjson = json.dumps(msgdict,sort_keys=True)
     #web.header('Content-Type', 'application/json')
     return msgjson
Пример #11
0
 def GET(self):
     teacher_list=member.members().member_get_teacher_list(4)
     return render.teacheralllist(teacher_list)
Пример #12
0
    def GET(self,type=None):

        teacher_results=member.members().member_get_teacher_list(5)
        shiftyearlist=shift.Shift().shiftyear_all_list()
        return render.shiftadd(teacher_results,type,shiftyearlist)
Пример #13
0
 def GET(self):
     role_list=member.members().role_list()
     return render.memberadd(role_list)
Пример #14
0
 def GET(self,page=None):
     results_list=member.members().memberlist(page)
     #print ', '.join(['%s:%s' % item for item in flag.__dict__.items()])
     #msgjson = json.dumps(msgdict,sort_keys=True)
     #print msgjson
     return render.memberlist(results_list,globals=globals)
Пример #15
0
 def GET(self):
     shift_list = shift.Shift().shift_get_list(2, 2)
     teacher_list = member.members().member_get_teacher_list(4)
     return render.courseiadd(shift_list, teacher_list)