Fix download
This commit is contained in:
parent
925c47cd53
commit
db211a0a62
@ -103,7 +103,7 @@ endif;
|
||||
<?php
|
||||
echo "var saga_list = " . $saga_list. ";\n";
|
||||
echo "var movies_full_list = " . $movies_full_list. ";\n";
|
||||
if (isset($movies_list)) echo "var movies_list = " . $movies_list. ";\nvar saga_name = '" . $saga_name. "';";
|
||||
if (isset($movies_list)) echo "var movies_list = " . $movies_list. ";\nvar saga_name = '" . addslashes($saga_name). "';";
|
||||
if (isset($file_info)) echo "var file_info = " . $file_info. ';';
|
||||
if (isset($movie_detail)) echo "var movie_detail = " . $movie_detail. ';';
|
||||
?>
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
namespace DaveRandom\Resume;
|
||||
|
||||
require __DIR__ . '../vendor/autoload.php';
|
||||
require __DIR__ . '/../vendor/autoload.php';
|
||||
|
||||
include "function.php";
|
||||
|
||||
|
@ -4,7 +4,7 @@ setlocale (LC_TIME, 'fr_FR.utf8');
|
||||
|
||||
$images_folder = '/img';
|
||||
|
||||
$bdd = '../bdd.db';
|
||||
$bdd = $_SERVER["DOCUMENT_ROOT"].'/bdd.db';
|
||||
|
||||
$output_video_folder = 'vid/';
|
||||
|
||||
@ -150,7 +150,7 @@ function saga_list()
|
||||
|
||||
for($i = 0; $i < count($result); $i++) {
|
||||
$result[$i]['poster_path'] = $images_folder.$result[$i]['poster_path'];
|
||||
$result[$i]['poster_path'] = $images_folder.'/cover.jpg';
|
||||
#$result[$i]['poster_path'] = $images_folder.'/cover.jpg';
|
||||
}
|
||||
|
||||
return $result;
|
||||
@ -203,7 +203,7 @@ function movies_full_list()
|
||||
|
||||
for($i = 0; $i < count($result); $i++) {
|
||||
$result[$i]['poster_path'] = $images_folder.$result[$i]['poster_path'];
|
||||
$result[$i]['poster_path'] = $images_folder.'/cover.jpg';
|
||||
#$result[$i]['poster_path'] = $images_folder.'/cover.jpg';
|
||||
}
|
||||
|
||||
return $result;
|
||||
@ -238,7 +238,7 @@ function movie_list($saga)
|
||||
|
||||
for($i = 0; $i < count($result); $i++) {
|
||||
$result[$i]['poster_path'] = $images_folder.$result[$i]['poster_path'];
|
||||
$result[$i]['poster_path'] = $images_folder.'/cover.jpg';
|
||||
#$result[$i]['poster_path'] = $images_folder.'/cover.jpg';
|
||||
}
|
||||
|
||||
return $result;
|
||||
@ -267,7 +267,7 @@ function movie_detail($movie)
|
||||
$result = $req->fetchAll()[0];
|
||||
|
||||
$result['poster_path'] = $images_folder.$result['poster_path'];
|
||||
$result['poster_path'] = $images_folder.'/cover.jpg';
|
||||
#$result['poster_path'] = $images_folder.'/cover.jpg';
|
||||
|
||||
return $result;
|
||||
|
||||
@ -276,7 +276,7 @@ function movie_detail($movie)
|
||||
function file_path($movie)
|
||||
{
|
||||
|
||||
global $bdd, $images_folder;
|
||||
global $bdd;
|
||||
|
||||
try {
|
||||
|
||||
@ -288,13 +288,11 @@ function file_path($movie)
|
||||
die('Erreur : '.$e->getMessage());
|
||||
}
|
||||
|
||||
$req = $conn->prepare("SELECT * FROM movies WHERE id=:id");
|
||||
$req = $conn->prepare("SELECT file_path FROM movies WHERE id=:id");
|
||||
|
||||
$req->execute(['id' => $movie]);
|
||||
|
||||
$result = $req->fetchAll()[0];
|
||||
|
||||
print_r($result);
|
||||
$result = $req->fetchAll()[0]['file_path'];
|
||||
|
||||
return $result;
|
||||
|
||||
@ -318,4 +316,4 @@ function time_to_str($time,$precision=2){
|
||||
}
|
||||
|
||||
|
||||
?>
|
||||
?>
|
||||
|
Loading…
x
Reference in New Issue
Block a user