Sven Seeberg
5c64f76c81
* Export PGP signed result file with option to sync. * Return sha256 sum of file and key ID.
22 lines
513 B
PHP
22 lines
513 B
PHP
<?php
|
|
require_once("../functions.php");
|
|
|
|
$cfg = init();
|
|
header('Content-Type: application/json');
|
|
|
|
if($_SERVER["REQUEST_URI"] == '/get_ids') {
|
|
$data = get_voting_ids($cfg);
|
|
echo json_encode($data);
|
|
} else if($_SERVER["REQUEST_URI"] == '/register_event') {
|
|
$data = register_event($cfg);
|
|
echo json_encode($data);
|
|
} else if($_SERVER["REQUEST_URI"] == '/export_result') {
|
|
$data = export_result($cfg);
|
|
echo json_encode($data);
|
|
}
|
|
else {
|
|
echo json_encode(array("error" => "no route"));
|
|
}
|
|
|
|
?>
|