Commit 4fe76bd1 by vuj

v0.1.3 USER/DOMAIN/ALIAS select statement

1 parent ddf91c5d
2018-01-16 v0.1.3 USER/DOMAIN/ALIAS select statement
2018-01-16 v0.1.2 BCC select statement
2018-01-16 v0.1.1 kleine fixes README BCC/ALIAS Dropdown
2018-01-16 v0.1.0 migration von srvcnf =>srvcnf2 einbau des framework tornado
......@@ -164,15 +164,15 @@ class mailcnf_alias(ncauth_base):
if str(uid) !='0':
delstring = " and deleted='0' "
if id!='' and id != None:
query = " SELECT * FROM `virtual_aliases` WHERE `id`="+id+" "+delstring
query = " SELECT id,domain_id,source,destination,modified,active,deleted,group_id FROM `virtual_aliases` WHERE `id`="+id+" "+delstring
elif str(gid) !='':
query = " SELECT * FROM `virtual_aliases` WHERE `group_id` in ("+gid+") "+delstring
query = " SELECT id,domain_id,source,destination,modified,active,deleted,group_id FROM `virtual_aliases` WHERE `group_id` in ("+gid+") "+delstring
else:
if str(uid) !='0':
query = " SELECT * FROM `virtual_aliases` WHERE deleted='0'"
query = " SELECT id,domain_id,source,destination,modified,active,deleted,group_id FROM `virtual_aliases` WHERE deleted='0'"
else:
query = " SELECT * FROM `virtual_aliases`"
query = " SELECT id,domain_id,source,destination,modified,active,deleted,group_id FROM `virtual_aliases`"
try:
print(query)
db_config = read_db_config()
......
......@@ -157,15 +157,15 @@ class mailcnf_domain(ncauth_base):
if str(uid) !='0':
delstring = " and deleted='0' "
if id!='' and id != None:
query = " SELECT * FROM `virtual_domains` WHERE `id`="+id+" "+delstring
query = " SELECT id,name,description,transport,modified,active,deleted,group_id FROM `virtual_domains` WHERE `id`="+id+" "+delstring
elif str(gid) !='':
query = " SELECT * FROM `virtual_domains` WHERE `group_id` in ("+gid+") "+delstring
query = " SELECT id,name,description,transport,modified,active,deleted,group_id FROM `virtual_domains` WHERE `group_id` in ("+gid+") "+delstring
else:
if str(uid) !='0':
query = " SELECT * FROM `virtual_domains` WHERE deleted='0'"
query = " SELECT id,name,description,transport,modified,active,deleted,group_id FROM `virtual_domains` WHERE deleted='0'"
else:
query = " SELECT * FROM `virtual_domains`"
query = " SELECT id,name,description,transport,modified,active,deleted,group_id FROM `virtual_domains`"
try:
print(query)
db_config = read_db_config()
......
......@@ -213,14 +213,14 @@ class mailcnf_user(ncauth_base):
delstring = " and deleted='0' "
if domain_id == 'all':
if guid=='all':
query = " SELECT * FROM `virtual_users`"
query = " SELECT id,domain_id,group_id,password,password_alt,email,sent_mail,quota,modified,active,deleted FROM `virtual_users`"
else:
query = " SELECT * FROM `virtual_users` WHERE group_id in ( "+guid+" ) " +delstring
query = " SELECT id,domain_id,group_id,password,password_alt,email,sent_mail,quota,modified,active,deleted FROM `virtual_users` WHERE group_id in ( "+guid+" ) " +delstring
else:
if id == 'all':
query = " SELECT * FROM `virtual_users` WHERE `domain_id`= "+domain_id+" AND group_id in ( "+guid+" ) " +delstring
query = " SELECT id,domain_id,group_id,password,password_alt,email,sent_mail,quota,modified,active,deleted FROM `virtual_users` WHERE `domain_id`= "+domain_id+" AND group_id in ( "+guid+" ) " +delstring
else:
query = " SELECT * FROM `virtual_users` WHERE `id`='"+id+"' "+delstring
query = " SELECT id,domain_id,group_id,password,password_alt,email,sent_mail,quota,modified,active,deleted FROM `virtual_users` WHERE `id`='"+id+"' "+delstring
try:
db_config = read_db_config()
conn = MySQLConnection(**db_config)
......@@ -247,7 +247,7 @@ class mailcnf_user(ncauth_base):
def edit_virtual_users_by_id(self, id,uid):
query = " SELECT * FROM `virtual_users` WHERE `id`='"+str(id)+"'"
query = " SELECT id,domain_id,group_id,password,password_alt,email,sent_mail,quota,modified,active,deleted FROM `virtual_users` WHERE `id`='"+str(id)+"'"
dictdata =[]
# self.write(query)
counter=0
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!