From 5d498f59c54830a17d4a7a4b167efa21ba63a2d1 Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Sat, 23 Mar 2002 12:49:18 +0000 Subject: [PATCH] updates und bugfixes --- scripts/cgi-bin/eressea-register.py | 2 +- scripts/cgi-bin/info.py | 10 ++++++---- scripts/cgi-bin/vinyambar.html | 1 + 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/scripts/cgi-bin/eressea-register.py b/scripts/cgi-bin/eressea-register.py index bc3860352..47c926154 100755 --- a/scripts/cgi-bin/eressea-register.py +++ b/scripts/cgi-bin/eressea-register.py @@ -142,7 +142,7 @@ else: ip=os.environ['REMOTE_ADDR'] cursor.execute("REPLACE userips (ip, user) VALUES ('"+ip+"', "+str(int(custid))+")") cursor.execute("insert into subscriptions (user, race, game, status) VALUES ("+str(int(custid))+", '"+race+"', 0, 'PENDING')") - cursor.execute("select count(*) from users") + cursor.execute("select count(*) from users where status='WAITING' or status='CONFIRMED'") Send(email, custid, firstname, password, cursor.fetchone()[0]) Display("

Deine Anmeldung wurde bearbeitet. Eine EMail mit Hinweisen ist unterwegs zu Dir.") db.close() diff --git a/scripts/cgi-bin/info.py b/scripts/cgi-bin/info.py index 2f8b54e5b..ddcfe5060 100755 --- a/scripts/cgi-bin/info.py +++ b/scripts/cgi-bin/info.py @@ -23,8 +23,8 @@ def Display(Content, Title=DefaultTitle): TemplateInput = TemplateHandle.read() TemplateHandle.close() # close the file -# for key in Form.keys(): -# Content=Content+"
"+str(key)+"="+str(Form[key]) + for key in Form.keys(): + Content=Content+"
"+str(key)+"="+str(Form[key]) # this defines an exception string in case our # template file is messed up @@ -238,8 +238,8 @@ def Save(custid, Password): ngames=ngames - 1 gid = cursor.fetchone()[0] key="race_"+str(int(gid)) + update = db.cursor() if Form.has_key(key): - update = db.cursor() newrace=Form[key].value if newrace=='': newrace=None @@ -252,7 +252,9 @@ def Save(custid, Password): if race!=newrace: update.execute("update subscriptions set race='"+newrace+"' where id="+str(int(sid))) else: - update.execute("insert subscriptions (race, user, status, game) values ('"+newrace+"', "+str(int(custid))+", 'WAITING', "+str(int(gid))+") where id="+str(int(sid))) + update.execute("insert subscriptions (race, user, status, game) values ('"+newrace+"', "+str(int(custid))+", 'WAITING', "+str(int(gid))+")") + else: + update.execute('delete from subscriptions where user='+str(int(custid))+' and game='+str(int(gid))) nfactions = cursor.execute("select g.name, s.id, faction from games g, subscriptions s where s.status='ACTIVE' and s.user="+str(custid) + " and s.game=g.id") while nfactions > 0: diff --git a/scripts/cgi-bin/vinyambar.html b/scripts/cgi-bin/vinyambar.html index 7119b6ba6..b47666ff1 100644 --- a/scripts/cgi-bin/vinyambar.html +++ b/scripts/cgi-bin/vinyambar.html @@ -3,6 +3,7 @@ +