<?php
require("includes/.htconfig.php");
if (!function_exists('hider'))
{
function hider($name,$value)
{
  $a="<INPUT type=\"hidden\" name=\"$name\" value=\"".htmlentities($value,ENT_COMPAT)."\"/>";
  return $a;
}
}

require("includes/headstart.php");
?>
    <TITLE>Get Certificate</TITLE>
</head>
<body>
  <table width="100%" border="0" align="center" cellpadding="0" cellspacing="0">
    <tr>
      <td align="center" valign="top">

        <?php
include_once("includes/header.php");

?>
    You passed the test and we are telling Osmio to grant you a certificate.
    To complete the process and get your own ValID certificate, just click this button.
    <BR/>
    
      <?PHP
      #echo "<FORM method=\"post\" action=\"$script\">";
      echo "<FORM method=\"post\" action=\"".RETURNTO."\">";
      echo hider("app","control");
      echo hider("openid",$_SESSION['userIdentity']);
      echo hider("id",$_SESSION['email']);
      echo hider("first_name",$enrollee["first_name"]);
      echo hider("surname",$enrollee["last_name"]);
      echo hider("line_1",$address["street_line_01"]);
      echo hider("line_2",$address["street_line_02"]);
      echo hider("line_3",$address["street_line_03"]);
      echo hider("city",$address["city"]);
      echo hider("state",$address["state"]);
      echo hider("zipCode",$address["zipCode"]);
      echo hider("country",$address["country"]);
      echo hider("phone",$_SESSION["landPhone"]);
      echo hider("cellphone",$_SESSION["mobilephone"]);
      echo hider("ssn",$_SESSION["ssn"]);
      echo hider("licensename",$_SESSION["license"]["name"]);
      echo hider("licensestate",$_SESSION["license"]["issuer"]);
      echo hider("licensenumber",$_SESSION["license"]["number"]);
      echo hider("licenseexpires",$_SESSION["license"]["expires"]);
      echo hider("numquestions",$_SESSION['questions']['general']['numquestions']);
      $nright=0;
      foreach($_SESSION['questions']['questions'] as $question)
      {
        if ($question["answer"] == $question["correct"])
        {
          $nright++;
        }
      }
      echo hider("numright",$nright);
      ##D.o.B.
      ##Score

      ?>
      <INPUT type="submit" name="command" value="Please Certify Me"/>
    </FORM>
<?php
include_once("includes/footer.php");
?>
  </BODY>
</HTML>
