Exemple #1
0
 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()
Exemple #2
0
 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()
Exemple #3
0
 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()
Exemple #4
0
def delUserByUID(uid):
	return db.delete("users", where='uid=$uid', vars={'uid': uid})
Exemple #5
0
def delOneHistory(hid):
	return db.delete("history", where='hid=$hid', vars={'hid': hid})
Exemple #6
0
def delProject(pid):
	return db.delete("project", where='pid=$pid', vars={'pid': pid})
Exemple #7
0
def delCity(cid):
	return db.delete("city", where='cid=$cid', vars={'cid': cid})
Exemple #8
0
def delIDC(iid):
	return db.delete("idc", where='iid=$iid', vars={'iid': iid})
Exemple #9
0
def delServerInfo(id):
	db.delete('servers',where='id=$id', vars={'id':id})
Exemple #10
0
def delUserByUID(uid):
    return db.delete("users", where='uid=$uid', vars={'uid': uid})
Exemple #11
0
def delOneHistory(hid):
    return db.delete("history", where='hid=$hid', vars={'hid': hid})
Exemple #12
0
def delProject(pid):
    return db.delete("project", where='pid=$pid', vars={'pid': pid})
Exemple #13
0
def delCity(cid):
    return db.delete("city", where='cid=$cid', vars={'cid': cid})
Exemple #14
0
def delIDC(iid):
    return db.delete("idc", where='iid=$iid', vars={'iid': iid})
Exemple #15
0
 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('/')