updates und bugfixes

This commit is contained in:
Enno Rehling 2002-03-23 12:49:18 +00:00
parent 2b08dd0120
commit 5d498f59c5
3 changed files with 8 additions and 5 deletions

View File

@ -142,7 +142,7 @@ else:
ip=os.environ['REMOTE_ADDR'] ip=os.environ['REMOTE_ADDR']
cursor.execute("REPLACE userips (ip, user) VALUES ('"+ip+"', "+str(int(custid))+")") 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("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]) Send(email, custid, firstname, password, cursor.fetchone()[0])
Display("<p>Deine Anmeldung wurde bearbeitet. Eine EMail mit Hinweisen ist unterwegs zu Dir.") Display("<p>Deine Anmeldung wurde bearbeitet. Eine EMail mit Hinweisen ist unterwegs zu Dir.")
db.close() db.close()

View File

@ -23,8 +23,8 @@ def Display(Content, Title=DefaultTitle):
TemplateInput = TemplateHandle.read() TemplateInput = TemplateHandle.read()
TemplateHandle.close() # close the file TemplateHandle.close() # close the file
# for key in Form.keys(): for key in Form.keys():
# Content=Content+"<br>"+str(key)+"="+str(Form[key]) Content=Content+"<br>"+str(key)+"="+str(Form[key])
# this defines an exception string in case our # this defines an exception string in case our
# template file is messed up # template file is messed up
@ -238,8 +238,8 @@ def Save(custid, Password):
ngames=ngames - 1 ngames=ngames - 1
gid = cursor.fetchone()[0] gid = cursor.fetchone()[0]
key="race_"+str(int(gid)) key="race_"+str(int(gid))
update = db.cursor()
if Form.has_key(key): if Form.has_key(key):
update = db.cursor()
newrace=Form[key].value newrace=Form[key].value
if newrace=='': if newrace=='':
newrace=None newrace=None
@ -252,7 +252,9 @@ def Save(custid, Password):
if race!=newrace: if race!=newrace:
update.execute("update subscriptions set race='"+newrace+"' where id="+str(int(sid))) update.execute("update subscriptions set race='"+newrace+"' where id="+str(int(sid)))
else: 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") 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: while nfactions > 0:

View File

@ -3,6 +3,7 @@
<head> <head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<base href="http://www.vinyambar.de"> <base href="http://www.vinyambar.de">
<base target="_top">
<meta http-equiv="Content-Type" <meta http-equiv="Content-Type"
content="text/html; charset=iso-8859-1"> content="text/html; charset=iso-8859-1">
<meta name="keywords" content="Eressea,PBeM,Postspiel"> <meta name="keywords" content="Eressea,PBeM,Postspiel">