def GET(self,cid): if isadmin(): try: db.delete(msg,where="id ="+cid) raise web.seeother('/about') except: return render.error() else: return render.error()
def GET(self,aid,cid): if isadmin(): try: db.delete(commt,where="id ="+cid) count=int(db.select(artt,what="comment",where="id="+aid)[0]["comment"])-1 db.update(artt,where="id="+aid,comment=count) raise web.seeother('/article/'+aid) except: return render.error() else: return render.error()
def POST(self,aid): if not isadmin(): return render.error() try: data =web.input() text = data.content atitle = data.title if not len(db.select(script))==0: db.delete(script) db.update(artt,where="id="+aid,title=atitle,content=text) raise web.seeother('/') except: return render.error()
def delUserByUID(uid): return db.delete("users", where='uid=$uid', vars={'uid': uid})
def delOneHistory(hid): return db.delete("history", where='hid=$hid', vars={'hid': hid})
def delProject(pid): return db.delete("project", where='pid=$pid', vars={'pid': pid})
def delCity(cid): return db.delete("city", where='cid=$cid', vars={'cid': cid})
def delIDC(iid): return db.delete("idc", where='iid=$iid', vars={'iid': iid})
def delServerInfo(id): db.delete('servers',where='id=$id', vars={'id':id})
def GET(self,aid): if not isadmin(): return render().error() db.delete(artt,where="id="+aid) db.delete(commt,where="articleid="+aid) raise web.seeother('/')