faq.php 434 B

1234567891011121314151617181920212223
  1. <?php
  2. require("user.inc.php");
  3. require("template.inc.php");
  4. tpl_header();
  5. print "<h2>FAQ entries:</h2>";
  6. list($status, $faq) = $ctl->cmd("faq_list");
  7. $faq = json_decode($faq, true);
  8. if (!$faq) {
  9. print "<p>No FAQ entries are known.";
  10. tpl_footer();
  11. exit;
  12. }
  13. print "<ul>";
  14. foreach ($faq as $k => $v) {
  15. if ($v) $v = ": $v";
  16. print "<li><strong>".htmlspecialchars($k)."</strong>".htmlspecialchars($v);
  17. }
  18. print "</ul>";
  19. tpl_footer();