3 include_once('config.php');
\r
4 include_once('linkbar.php');
\r
6 function localiddropdown($name)
\r
10 $db=new PDO('sqlite:'.$dblocation);
\r
12 $st=$db->prepare("SELECT LocalIdentityID, Name FROM tblLocalIdentity ORDER BY Name;");
\r
15 print "<select name=\"".$name."\">";
\r
16 while($record=$st->fetch())
\r
18 print "<option value=\"".$record[0]."\">".$record[1]."</option>";
\r
27 $db=new PDO('sqlite:'.$dblocation);
\r
29 if(isset($_REQUEST["formaction"]) && $_REQUEST["formaction"]=="announce" && $_REQUEST["localidentityid"]!="")
\r
31 $st=$db->prepare("INSERT INTO tblIdentityIntroductionInserts(LocalIdentityID,Day,UUID,Solution) VALUES(?,?,?,?);");
\r
33 for($i=0; $i<count($_REQUEST["uuid"]); $i++)
\r
35 if($_REQUEST["solution"][$i]!="")
\r
37 $st->bindParam(1,$_REQUEST["localidentityid"]);
\r
38 $st->bindParam(2,$_REQUEST["day"][$i]);
\r
39 $st->bindParam(3,$_REQUEST["uuid"][$i]);
\r
40 $st->bindParam(4,$_REQUEST["solution"][$i]);
\r
47 <h2>Announce Identity</h2>
\r
48 <form name="frmannounce" method="POST">
\r
49 <input type="hidden" name="formaction" value="announce">
\r
50 Select Identity to announce
\r
52 localiddropdown("localidentityid");
\r
53 print "<br>Type answers for a few puzzles and submit<br>";
\r
56 $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';");
\r
59 while($record=$st->fetch())
\r
61 print "<img src=\"showcaptcha.php?UUID=".$record[0]."\">";
\r
62 print "<input type=\"hidden\" name=\"uuid[]\" value=\"".$record[0]."\">";
\r
63 print "<input type=\"hidden\" name=\"day[]\" value=\"".$record[1]."\">";
\r
64 print "<input type=\"text\" name=\"solution[]\">";
\r
68 <input type="submit" value="Announce">
\r
73 include_once('template.php');
\r