X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=admin%2Fintroduce.php;h=e3fbd8969c113027e5dee1594583287710489489;hb=6b896a9e1dc143bba86795be1e9336549db9b85f;hp=29fe5e7e6d0f9f3c5e2cd2bce3b22d30742cd21a;hpb=d8f51eac91f86a1e00a05a5058a8fa9eb8732464;p=fms.git diff --git a/admin/introduce.php b/admin/introduce.php index 29fe5e7..e3fbd89 100644 --- a/admin/introduce.php +++ b/admin/introduce.php @@ -53,19 +53,25 @@ function content() print "
Type answers for a few puzzles and submit
"; - $st=$db->prepare("SELECT UUID,Day FROM tblIntroductionPuzzleRequests WHERE UUID NOT IN (SELECT UUID FROM tblIdentityIntroductionInserts) AND Day>='".gmdate('Y-m-d',strtotime('-1 day'))."' AND Found='true';"); + $st=$db->prepare("SELECT UUID,Day,IdentityID FROM tblIntroductionPuzzleRequests WHERE UUID NOT IN (SELECT UUID FROM tblIdentityIntroductionInserts) AND Day>='".gmdate('Y-m-d',strtotime('-1 day'))."' AND Found='true' ORDER BY IdentityID, RequestIndex DESC;"); $st->execute(); + // only show latest captcha for each known identity + $lastid=''; while($record=$st->fetch()) { - print ""; - print ""; - print ""; - print ""; - print "
"; + if($lastid!=$record[2]) + { + $lastid=$record[2]; + print ""; + print ""; + print ""; + print ""; + print "
"; + } } ?> - +