This repository has been archived on 2020-08-21. You can view files and clone it, but you cannot make any changes to its state, such as pushing and creating new issues, pull requests or comments.
nemubot-askweb/txt.php
2016-07-17 10:24:03 +02:00

18 lines
No EOL
366 B
PHP

<?php
require_once("QuestionsFile.class.php");
header("Content-type: text/plain");
@$filter = $_GET["filter"];
$file = new QuestionsFile("questions.xml");
foreach($file->get_questions() as $q)
{
if (!empty($filter) && strtolower($q->getCourse()->getCode()) != $filter)
continue;
$a = $q->getAnswer();
echo $q->getQuestion()."\n > ".$a[0]."\n\n";
}
?>