X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=admin%2Fintroduce.php;h=e3fbd8969c113027e5dee1594583287710489489;hb=6b896a9e1dc143bba86795be1e9336549db9b85f;hp=f2103a8fb47ba4865698aca900704d172c2ae2cf;hpb=1b0c3b7f86935a772aad271bad4f3d1f37243c2d;p=fms.git diff --git a/admin/introduce.php b/admin/introduce.php index f2103a8..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 "
"; + } } ?> - +