Mercurial > hg > fapweb
changeset 116:a95facb41c86
Some preliminary work on the votekey administration backend.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 22 Oct 2013 12:41:30 +0300 |
parents | 87d3ce535834 |
children | 9a52fa9d4ecc |
files | admajax.php |
diffstat | 1 files changed, 42 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/admajax.php Tue Oct 22 12:26:06 2013 +0300 +++ b/admajax.php Tue Oct 22 12:41:30 2013 +0300 @@ -86,6 +86,20 @@ break; case "voters": + $sqlJoins = ""; + switch (stGetSetting("voteKeyMode")) + { + case VOTE_FREELY: + break; + + case VOTE_ACTIVATE: + break; + + case VOTE_ASSIGN: + $sqlJoins = "LEFT JOIN attendees ON votekeys.voter_id=attendees.id "; + break; + } + $sql = "SELECT * FROM votekeys ".$sqlJoins."ORDER BY votekeys.id ASC"; break; case "compos": @@ -244,6 +258,34 @@ "</table>\n"; } else + if ($type == "voters") + { + switch (stGetSetting("voteKeyMode")) + { + case VOTE_FREELY: + break; + + case VOTE_ACTIVATE: + break; + + case VOTE_ASSIGN: + break; + } + // List of votekeys + echo + "<table class=\"attendees\">\n". + " <tr>\n". + " <th class=\"name\">Name</th>\n". + " <th class=\"groups\">Groups</th>\n". + " <th class=\"email\">E-mail</th>\n". + " <th class=\"\">Key</th>\n". + " </tr>\n"; + $row = 0; + + echo + "</table>\n"; + } + else if ($type == "compos") { foreach ($res as $item)