init
This commit is contained in:
commit
42c4dea3dd
3 changed files with 106 additions and 0 deletions
33
rssvoucher.php
Executable file
33
rssvoucher.php
Executable file
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
// Set the base API endpoint
|
||||
|
||||
|
||||
header('Content-Type: application/rss+xml; charset=utf-8');
|
||||
sleep(2);
|
||||
echo '<?xml version="1.0" encoding="UTF-8"?> ';
|
||||
echo '<rss version="2.0">';
|
||||
echo '<channel>';
|
||||
echo '<title>Ascii Voucher</title>';
|
||||
echo '<link>https://ifsr.de</link>';
|
||||
echo '<description>Über diesen feed wird informiert, ob du in der Verlosung einen Ascii Gutschein gewonnen hast.</description>';
|
||||
include('valids.php');
|
||||
if (in_array(intval($_GET["code"]), $valid)){
|
||||
echo '<item>';
|
||||
echo '<title>ASCII: Gewonnen!</title>';
|
||||
echo '<description>Du hast für das Ausfüllen der ESE Umfrage einen Ascii Gutschein gewonnen. Zeige im Ascii einfach den Code "'.$_GET["code"].'". Der Gutscheincode ist bis zum Ende des Semesters für zwei Getränke gültig.</description>';
|
||||
echo '<pubDate>' . $pubdate . '</pubDate>';
|
||||
echo '<guid>' . $_GET["code"] . '</guid>';
|
||||
echo '<link>https://users.ifsr.de/~marco.lehner/voucher.php?code='.$_GET["code"].'</link>';
|
||||
echo '</item>';
|
||||
}else{
|
||||
echo '<item>';
|
||||
echo '<title>ASCII: Verloren</title>';
|
||||
echo '<description>Du hast in der Verlosung für die ESE Umfrage leider keinen Gutschein gewonnen. Sorry :/</description>';
|
||||
echo '<pubDate>' . $pubdate . '</pubDate>';
|
||||
echo '<guid>' . $_GET["code"] . '</guid>';
|
||||
echo '<link>https://users.ifsr.de/~marco.lehner/voucher.php?code='.$_GET["code"].'</link>';
|
||||
echo '</item>';
|
||||
}
|
||||
echo '</channel>';
|
||||
echo '</rss>';
|
||||
?>
|
Loading…
Add table
Add a link
Reference in a new issue