X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=admin%2Fintroduce.php;h=b13a05e65dd4c55b9aeb37d837911ee134797795;hb=964f55fd550fc711c0320ce6a24ad713040695d0;hp=e3fbd8969c113027e5dee1594583287710489489;hpb=6b896a9e1dc143bba86795be1e9336549db9b85f;p=fms.git
diff --git a/admin/introduce.php b/admin/introduce.php
index e3fbd89..b13a05e 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,12 +53,13 @@ function content()
print " Type answers for a few puzzles and submit ";
- $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=$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, Day DESC, RequestIndex DESC;");
$st->execute();
// only show latest captcha for each known identity
$lastid='';
- while($record=$st->fetch())
+ $shown=0;
+ while(($record=$st->fetch()) && $shown<30)
{
if($lastid!=$record[2])
{
@@ -68,10 +69,21 @@ function content()
print "";
print "";
print " ";
+ $shown++;
}
}
+
+ if($shown>0)
+ {
?>
+