mirror of
https://github.com/vichan-devel/vichan.git
synced 2024-12-18 02:16:03 +01:00
Improve type-safty in player.php
This commit is contained in:
parent
c3662d4a59
commit
bf52d41650
13
player.php
13
player.php
@ -1,12 +1,15 @@
|
|||||||
<?php
|
<?php
|
||||||
/* This file is dedicated to the public domain; you may do as you wish with it. */
|
/* This file is dedicated to the public domain; you may do as you wish with it. */
|
||||||
$params = '?v=' . urlencode($_GET['v']) . '&t=' . urlencode($_GET['t']);
|
$v = (string)$_GET['v'];
|
||||||
$loop = ($_GET['loop'] != "0");
|
$t = (string)$_GET['t'];
|
||||||
|
$loop = (boolean)$_GET['loop'];
|
||||||
|
|
||||||
|
$params = '?v=' . urlencode($v) . '&t=' . urlencode($t);
|
||||||
?><!DOCTYPE html>
|
?><!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<title><?php echo htmlspecialchars($_GET['t']); ?></title>
|
<title><?php echo htmlspecialchars($t); ?></title>
|
||||||
<link rel="stylesheet" href="stylesheets/webm/playerstyle.css">
|
<link rel="stylesheet" href="stylesheets/webm/playerstyle.css">
|
||||||
<script src="js/webm-settings.js"></script>
|
<script src="js/webm-settings.js"></script>
|
||||||
<script src="js/webm/playersettings.js"></script>
|
<script src="js/webm/playersettings.js"></script>
|
||||||
@ -17,8 +20,8 @@ $loop = ($_GET['loop'] != "0");
|
|||||||
<a id="loop1" href="<?php echo $params; ?>&loop=1"<?php if ($loop) echo ' style="font-weight: bold"'; ?>>[loop]</a>
|
<a id="loop1" href="<?php echo $params; ?>&loop=1"<?php if ($loop) echo ' style="font-weight: bold"'; ?>>[loop]</a>
|
||||||
</div>
|
</div>
|
||||||
<div id="playercontent">
|
<div id="playercontent">
|
||||||
<video controls<?php if ($loop) echo ' loop'; ?> src="<?php echo htmlspecialchars($_GET['v']); ?>">
|
<video controls<?php if ($loop) echo ' loop'; ?> src="<?php echo htmlspecialchars($v); ?>">
|
||||||
Your browser does not support HTML5 video. <a href="<?php echo htmlspecialchars($_GET['v']); ?>">[Download]</a>
|
Your browser does not support HTML5 video. <a href="<?php echo htmlspecialchars($v); ?>">[Download]</a>
|
||||||
</video>
|
</video>
|
||||||
</div>
|
</div>
|
||||||
</body>
|
</body>
|
||||||
|
Loading…
Reference in New Issue
Block a user