Fehlermeldung für Doppelspieler

This commit is contained in:
Enno Rehling 2002-04-07 09:08:19 +00:00
parent 2d986dd5d7
commit fcef0c7821
1 changed files with 13 additions and 8 deletions

View File

@ -225,6 +225,7 @@ def TransferFaction(sid, faction, newuser, game):
return return
def Save(custid, Password): def Save(custid, Password):
global Errors
validkeys=['email','address','lastname','firstname','city','password','phone'] validkeys=['email','address','lastname','firstname','city','password','phone']
values='id='+str(custid) values='id='+str(custid)
for key in Form.keys(): for key in Form.keys():
@ -268,12 +269,16 @@ def Save(custid, Password):
TransferFaction(sid, faction, newuser, game) TransferFaction(sid, faction, newuser, game)
nfactions = nfactions - 1 nfactions = nfactions - 1
nfactions = cursor.execute("select g.name, s.id, faction from games g, subscriptions s where s.status='TRANSFERED' and s.user="+str(custid) + " and s.game=g.id") nfactions = cursor.execute("select g.id, g.name, s.id, faction from games g, subscriptions s where s.status='TRANSFERED' and s.user="+str(custid) + " and s.game=g.id")
while nfactions > 0: while nfactions > 0:
game, sid, faction = cursor.fetchone() gid, game, sid, faction = cursor.fetchone()
if Form.has_key("accept_"+faction): if Form.has_key("accept_"+faction):
update = db.cursor() update = db.cursor()
update.execute("UPDATE subscriptions set status='ACTIVE' where id="+str(int(sid))) i = update.execute("SELECT count(*) from subscriptions where status='ACTIVE' and game="+str(int(gid)))
if i==0:
update.execute("UPDATE subscriptions set status='ACTIVE' where id="+str(int(sid)))
else:
Errors=Errors+"Du hast bereits eine Aktive Partei in "+game+"<br>
nfactions = nfactions - 1 nfactions = nfactions - 1
nfactions = cursor.execute("select g.name, s.id, faction from games g, subscriptions s where s.status='CANCELLED' and s.user="+str(custid) + " and s.game=g.id") nfactions = cursor.execute("select g.name, s.id, faction from games g, subscriptions s where s.status='CANCELLED' and s.user="+str(custid) + " and s.game=g.id")