ENH: minor design improvements
This commit is contained in:
parent
14429c84ad
commit
d90af65328
|
@ -31,9 +31,9 @@ function changeEveryNSec ($n, $a) {
|
|||
}
|
||||
|
||||
$taglines = [
|
||||
'Votre caverne remplie des <strong>trésors</strong> que vous avez découverts sur le web.',
|
||||
'Votre <strong>forteresse</strong> de contenu imprenable>',
|
||||
'Votre <strong>palais</strong> informationnel.'
|
||||
'Votre caverne remplie des <strong>trésors</strong> que vous avez découverts sur le web',
|
||||
'Votre <strong>forteresse</strong> de contenu imprenable',
|
||||
'Votre <strong>palais</strong> informationnel'
|
||||
];
|
||||
|
||||
define('USP', changeEveryNSec(2, $taglines));
|
||||
|
|
|
@ -18,13 +18,16 @@
|
|||
|
||||
<form method="post" action="" class="add-video">
|
||||
<label for="youtube_url"l>Sauvegarder une vidéo Youtube :</label>
|
||||
<input type="text" name="youtube_url" placeholder="https://www.youtube.com/watch?v=ASywAfBAVrQ" size="45" />
|
||||
<input type="submit" value="Mon précieux !" />
|
||||
|
||||
<?php
|
||||
if (isset($_POST['youtube_url'])) {
|
||||
|
||||
?>
|
||||
if (!isset($_POST['youtube_url'])) {
|
||||
|
||||
$out = '';
|
||||
$placeholder = 'https://www.youtube.com/watch?v=ASywAfBAVrQ';
|
||||
|
||||
} else {
|
||||
|
||||
$out = '
|
||||
<p class="confirmation">Votre vidéo est en cours de téléchargement…</p>
|
||||
|
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
|
||||
|
@ -32,14 +35,21 @@
|
|||
$.ajax({
|
||||
method: "POST",
|
||||
url: "youtube_add_video_aux.php",
|
||||
data: { youtube_url: "<?php echo $_POST['youtube_url']; ?>" }
|
||||
data: { youtube_url: "'. $_POST['youtube_url'] .'" }
|
||||
})
|
||||
.done(function( response ) {
|
||||
console.log(response);
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
</script>';
|
||||
|
||||
$placeholder = htmlspecialchars($_POST['youtube_url']);
|
||||
}
|
||||
?>
|
||||
<input type="text" name="youtube_url" placeholder="<?php echo $placeholder; ?>" size="45" />
|
||||
<input type="submit" value="Mon précieux !" />
|
||||
|
||||
<?php
|
||||
echo $out;
|
||||
?>
|
||||
</form>
|
||||
</header>
|
||||
|
|
|
@ -12,8 +12,8 @@ function astroport_urlencode ($str) {
|
|||
$videoURI = urldecode($_GET['uri']);
|
||||
list($a, $ipfsPath, $videoIPFS_ID, $videoFileName) = explode('/', $videoURI);
|
||||
$videoURL = 'http://'. HOST. '/' . urlencode($ipfsPath) . '/' . urlencode($videoIPFS_ID) . '/' . astroport_urlencode($videoFileName);
|
||||
$videoName = htmlentities(urldecode($_GET['name']));
|
||||
$videoMIME = htmlentities($_GET['mime']);
|
||||
$videoName = htmlspecialchars(urldecode($_GET['name']));
|
||||
$videoMIME = htmlspecialchars($_GET['mime']);
|
||||
|
||||
include('inc/header.php');
|
||||
|
||||
|
|
Loading…
Reference in New Issue