version 0.1.7
[fms.git] / admin / introduce.php
diff --git a/admin/introduce.php b/admin/introduce.php
deleted file mode 100644 (file)
index 216809d..0000000
+++ /dev/null
@@ -1,93 +0,0 @@
-<?php\r
-\r
-       include_once('config.php');\r
-       include_once('linkbar.php');\r
-       \r
-function localiddropdown($name)\r
-{\r
-       global $dblocation;\r
-       \r
-       $db=new PDO('sqlite:'.$dblocation);\r
-       \r
-       $st=$db->prepare("SELECT LocalIdentityID, Name, PublicKey FROM tblLocalIdentity ORDER BY Name;");       \r
-       $st->execute();\r
-       \r
-       print "<select name=\"".$name."\">";\r
-       while($record=$st->fetch())\r
-       {\r
-               print "<option value=\"".$record[0]."\" title=\"".$record[2]."\">".$record[1]."</option>";\r
-       }\r
-       print "</select>";\r
-}\r
-       \r
-function content()\r
-{\r
-       global $dblocation;\r
-       \r
-       $db=new PDO('sqlite:'.$dblocation);\r
-       \r
-       if(isset($_REQUEST["formaction"]) && $_REQUEST["formaction"]=="announce" && $_REQUEST["localidentityid"]!="")\r
-       {\r
-               $st=$db->prepare("INSERT INTO tblIdentityIntroductionInserts(LocalIdentityID,Day,UUID,Solution) VALUES(?,?,?,?);");\r
-               \r
-               for($i=0; $i<count($_REQUEST["uuid"]); $i++)\r
-               {\r
-                       if($_REQUEST["solution"][$i]!="")\r
-                       {\r
-                               $st->bindParam(1,$_REQUEST["localidentityid"]);\r
-                               $st->bindParam(2,$_REQUEST["day"][$i]);\r
-                               $st->bindParam(3,$_REQUEST["uuid"][$i]);\r
-                               $st->bindParam(4,$_REQUEST["solution"][$i]);\r
-                               $st->execute(); \r
-                       }\r
-               }\r
-       }\r
-       \r
-       ?>\r
-       <h2>Announce Identity</h2>\r
-       <form name="frmannounce" method="POST">\r
-       <input type="hidden" name="formaction" value="announce">\r
-       Select Identity to announce\r
-       <?php\r
-       localiddropdown("localidentityid");\r
-       print "<br>Type answers for a few puzzles and submit<br>";\r
-       \r
-       \r
-       $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;");\r
-       $st->execute();\r
-       \r
-       // only show latest captcha for each known identity\r
-       $lastid='';\r
-       $shown=0;\r
-       while(($record=$st->fetch()) && $shown<30)\r
-       {\r
-               if($lastid!=$record[2])\r
-               {\r
-                       $lastid=$record[2];\r
-                       print "<img src=\"showcaptcha.php?UUID=".$record[0]."\">";\r
-                       print "<input type=\"hidden\" name=\"uuid[]\" value=\"".$record[0]."\">";\r
-                       print "<input type=\"hidden\" name=\"day[]\" value=\"".$record[1]."\">";\r
-                       print "<input type=\"text\" name=\"solution[]\">";\r
-                       print "<br>";\r
-                       $shown++;\r
-               }\r
-       }\r
-       \r
-       if($shown>0)\r
-       {\r
-       ?>\r
-       <input type="submit" value="Announce">\r
-       <?php\r
-       }\r
-       else\r
-       {\r
-               print "You must wait for some puzzles to be downloaded.  Check back later.";\r
-       }\r
-       ?>\r
-       </form> \r
-       <?php   \r
-}\r
-       \r
-       include_once('template.php');\r
-\r
-?>
\ No newline at end of file