X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=admin%2Fintroduce.php;h=216809d113b10ac9fec79b41e2a039b813f1b6cc;hb=d8ccfe2b3944adf07d35534459cdda19d15217c8;hp=29fe5e7e6d0f9f3c5e2cd2bce3b22d30742cd21a;hpb=d8f51eac91f86a1e00a05a5058a8fa9eb8732464;p=fms.git diff --git a/admin/introduce.php b/admin/introduce.php index 29fe5e7..216809d 100644 --- a/admin/introduce.php +++ b/admin/introduce.php @@ -9,13 +9,13 @@ function localiddropdown($name) $db=new PDO('sqlite:'.$dblocation); - $st=$db->prepare("SELECT LocalIdentityID, Name FROM tblLocalIdentity ORDER BY Name;"); + $st=$db->prepare("SELECT LocalIdentityID, Name, PublicKey FROM tblLocalIdentity ORDER BY Name;"); $st->execute(); print ""; } @@ -53,19 +53,37 @@ 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 UUID NOT IN (SELECT UUID FROM tblIntroductionPuzzleInserts) AND Day>='".gmdate('Y-m-d',strtotime('-1 day'))."' AND Found='true' ORDER BY IdentityID, Day DESC, RequestIndex DESC;"); $st->execute(); - while($record=$st->fetch()) + // only show latest captcha for each known identity + $lastid=''; + $shown=0; + while(($record=$st->fetch()) && $shown<30) + { + if($lastid!=$record[2]) + { + $lastid=$record[2]; + print ""; + print ""; + print ""; + print ""; + print "
"; + $shown++; + } + } + + if($shown>0) + { + ?> + + "; - print ""; - print ""; - print ""; - print "
"; + print "You must wait for some puzzles to be downloaded. Check back later."; } ?> -