hbarg/bump.php

44 lines
1.5 KiB
PHP

<?php
$data = yaml_parse_file("arc{$arc_san}/bump{$bump_san}.yml");
if ($data==FALSE) {
echo "\t<h4>Error</h4>\n";
echo "\t<p>The bump you requested does not exist or is not stored here. <a href='index.php'>Go back home.</a></p>\n";
include 'footer.php';
die();
}
?>
<h4>Arc <?=$arc_san?> [<?=$arc_name?>], Bump <?=$bump_san?> (Overall number <?=$bumpn?>)</h4>
<h5>Bump</h5>
<?php
if (isset($data["bump_url"])&&isset($data["bump_url_type"])) {
if ($data["bump_url_type"]=="youtube") {
$bump_embed = str_replace("/watch?v=","/embed/",$data["bump_url"]);
echo "\t<iframe width='560' height='315' src='{$bump_embed}' frameborder='0' allow='encrypted-media' allowfullscreen></iframe>\n";
}
if ($data["bump_url_type"]=="gdrive") {
$bump_embed = str_replace("/view","/preview",$data["bump_url"]);
echo "\t<iframe src='{$bump_embed}' width='640' height='480'></iframe>\n";
}
} else {
echo "\t<p>Something's wrong. Please contact the sitemaster at khuxkm&lt;at>tilde&lt;dot>team.</p>\n";
}
?>
<h5>Music</h5>
<?php
if (isset($data["music_url"])&&isset($data["music_url_type"])) {
if ($data["music_url_type"]=="youtube") {
$music_embed = str_replace("/watch?v=","/embed/",$data["music_url"]);
echo "\t<iframe width='560' height='315' src='{$music_embed}' frameborder='0' allow='encrypted-media' allowfullscreen></iframe>\n";
}
} else {
echo "\t<p>Something's wrong. Please contact the sitemaster at khuxkm&lt;at>tilde&lt;dot>team.</p>\n";
}
?>
<h5>Transcript</h5>
<pre>
<?php
echo rtrim($data["transcript"]);
echo "\n";
?>
</pre>