forked from github/server
Neustart in alten Regionen, Skripte
This commit is contained in:
parent
fcef0c7821
commit
c866a32435
|
@ -98,6 +98,7 @@ locale=GetKey(Form, "locale")
|
||||||
|
|
||||||
referrer=GetKey(Form, "referrer")
|
referrer=GetKey(Form, "referrer")
|
||||||
firsttime=GetKey(Form, "firsttime")
|
firsttime=GetKey(Form, "firsttime")
|
||||||
|
bonus=GetKey(Form, "bonus")
|
||||||
|
|
||||||
if (locale==None) or (lastname==None) or (race==None) or (firstname==None) or (address==None) or (city==None):
|
if (locale==None) or (lastname==None) or (race==None) or (firstname==None) or (address==None) or (city==None):
|
||||||
output="<p>Um Dich zu Eressea anzumelden musst Du das Formular vollständig ausfüllen.\n "
|
output="<p>Um Dich zu Eressea anzumelden musst Du das Formular vollständig ausfüllen.\n "
|
||||||
|
@ -138,6 +139,12 @@ else:
|
||||||
if referrer!=None:
|
if referrer!=None:
|
||||||
fields=fields+", referrer"
|
fields=fields+", referrer"
|
||||||
values=values+", '"+referrer+"'"
|
values=values+", '"+referrer+"'"
|
||||||
|
if bonus!=None:
|
||||||
|
fields=fields+", bonus"
|
||||||
|
if bonus=='yes':
|
||||||
|
values=values+", 1"
|
||||||
|
else:
|
||||||
|
values=values+", 0"
|
||||||
if firsttime!=None:
|
if firsttime!=None:
|
||||||
fields=fields+", firsttime"
|
fields=fields+", firsttime"
|
||||||
if firsttime=='yes':
|
if firsttime=='yes':
|
||||||
|
|
|
@ -6,7 +6,7 @@ import sys
|
||||||
dbname=sys.argv[1]
|
dbname=sys.argv[1]
|
||||||
maxnum=int(sys.argv[2])
|
maxnum=int(sys.argv[2])
|
||||||
|
|
||||||
query = "select distinct u.email, r.name, u.locale from users u, races r, subscriptions s left join userips i on u.id=i.user left join bannedips b on i.ip=b.ip where s.user=u.id and b.ip is NULL and u.status='CONFIRMED' and r.race=s.race and r.locale='de' order by u.id"
|
query = "select distinct u.email, r.name, u.locale, s.bonus from users u, races r, subscriptions s left join userips i on u.id=i.user left join bannedips b on i.ip=b.ip where s.user=u.id and b.ip is NULL and u.status='CONFIRMED' and r.race=s.race and r.locale='de' order by u.id"
|
||||||
db=MySQLdb.connect(db=dbname)
|
db=MySQLdb.connect(db=dbname)
|
||||||
cursor = db.cursor()
|
cursor = db.cursor()
|
||||||
num=cursor.execute(query)
|
num=cursor.execute(query)
|
||||||
|
@ -14,5 +14,7 @@ if num>maxnum:
|
||||||
num=maxnum
|
num=maxnum
|
||||||
while num:
|
while num:
|
||||||
num=num-1
|
num=num-1
|
||||||
email, race, locale = cursor.fetchone()
|
email, race, locale, bonus = cursor.fetchone()
|
||||||
print email+" "+race+" "+locale+" 0"
|
if bonus=None:
|
||||||
|
bonus=1
|
||||||
|
print email+" "+race+" "+locale+" "+str(int(bonus))
|
||||||
|
|
Loading…
Reference in New Issue