Skip to content

Commit 2ad7ecd

Browse files
committed
Add template in result
1 parent 750e6bd commit 2ad7ecd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

admin/results.php

+3-1
Original file line numberDiff line numberDiff line change
@@ -41,12 +41,14 @@
4141
} else {
4242
if (isset($_GET['type']) && $_GET['type'] == 'text') {
4343
header('Content-Type: text');
44+
header('Content-Disposition: attachment; filename="votes.txt"');
4445
$query = mysqli_query($DB, "SELECT vote_string from votes WHERE vote_string IS NOT NULL");
4546

4647
while ($result = $query->fetch_assoc()) {
4748
echo $result['vote_string'] . "\n";
4849
}
4950
} else {
50-
echo 'STV is being followed. To view the plaintext dump, visit <a href="?type=text">results.php?type=text</a>';
51+
$htmlOutput = 'STV is being followed. To view the plaintext dump, visit <a href="?type=text">results.php?type=text</a>';
5152
}
53+
include("../template.php");
5254
}

0 commit comments

Comments
 (0)