mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-06 03:50:04 +02:00
Merge origin/master
Conflicts: install/index.php view/include/navbar.php view/mini-upload-form/videoEncoder.php
This commit is contained in:
commit
50a3aa76c0
7 changed files with 196 additions and 120 deletions
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1,3 +1,4 @@
|
||||||
/nbproject/private/
|
/nbproject/private/
|
||||||
/videos/
|
/videos/
|
||||||
/nbproject/
|
/nbproject/
|
||||||
|
/docker/
|
|
@ -13,7 +13,7 @@ if (!file_exists($_POST['systemRootPath'] . "index.php")) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$mysqli = @new mysqli($_POST['databaseHost'], $_POST['databaseUser'], $_POST['databasePass']);
|
$mysqli = @new mysqli($_POST['databaseHost'], $_POST['databaseUser'], $_POST['databasePass'], "", $_POST['databasePort']);
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* This is the "official" OO way to do it,
|
* This is the "official" OO way to do it,
|
||||||
|
@ -125,6 +125,7 @@ $content = "<?php
|
||||||
|
|
||||||
|
|
||||||
\$mysqlHost = '{$_POST['databaseHost']}';
|
\$mysqlHost = '{$_POST['databaseHost']}';
|
||||||
|
\$mysqlPort = '{$_POST['databasePort']}';
|
||||||
\$mysqlUser = '{$_POST['databaseUser']}';
|
\$mysqlUser = '{$_POST['databaseUser']}';
|
||||||
\$mysqlPass = '{$_POST['databasePass']}';
|
\$mysqlPass = '{$_POST['databasePass']}';
|
||||||
\$mysqlDatabase = '{$_POST['databaseName']}';
|
\$mysqlDatabase = '{$_POST['databaseName']}';
|
||||||
|
@ -140,5 +141,14 @@ $fp = fopen($_POST['systemRootPath'] . "videos/configuration.php", "wb");
|
||||||
fwrite($fp, $content);
|
fwrite($fp, $content);
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
|
|
||||||
|
//copy the 100% progress sample file to be used when the uploaded file is already encoded in the MP4 or WBM formats
|
||||||
|
exec("cp {$_POST['systemRootPath']}install/FinishedProgressSample.* {$_POST['systemRootPath']}videos/", $output, $return_val);
|
||||||
|
|
||||||
|
if ($return_val !== 0) {
|
||||||
|
$obj->error = "Error copying the encoding progress sample files. Check whether the directory {$_POST['systemRootPath']}videos/ exists and the process have permission";
|
||||||
|
echo json_encode($obj);
|
||||||
|
exit;
|
||||||
|
}
|
||||||
|
|
||||||
$obj->success = true;
|
$obj->success = true;
|
||||||
echo json_encode($obj);
|
echo json_encode($obj);
|
||||||
|
|
|
@ -209,6 +209,10 @@ require_once '../objects/functions.php';
|
||||||
<label for="databaseHost">Database Host</label>
|
<label for="databaseHost">Database Host</label>
|
||||||
<input type="text" class="form-control" id="databaseHost" placeholder="Enter Database Host" value="localhost" required="required">
|
<input type="text" class="form-control" id="databaseHost" placeholder="Enter Database Host" value="localhost" required="required">
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="databasePort">Database Port</label>
|
||||||
|
<input type="text" class="form-control" id="databasePort" placeholder="Enter Database Port" value="3306" required="required">
|
||||||
|
</div>
|
||||||
<div class="form-group">
|
<div class="form-group">
|
||||||
<label for="databaseUser">Database User</label>
|
<label for="databaseUser">Database User</label>
|
||||||
<input type="text" class="form-control" id="databaseUser" placeholder="Enter Database User" value="root" required="required">
|
<input type="text" class="form-control" id="databaseUser" placeholder="Enter Database User" value="root" required="required">
|
||||||
|
@ -285,6 +289,7 @@ require_once '../objects/functions.php';
|
||||||
var systemRootPath = $('#systemRootPath').val();
|
var systemRootPath = $('#systemRootPath').val();
|
||||||
var webSiteTitle = $('#webSiteTitle').val();
|
var webSiteTitle = $('#webSiteTitle').val();
|
||||||
var databaseHost = $('#databaseHost').val();
|
var databaseHost = $('#databaseHost').val();
|
||||||
|
var databasePort = $('#databasePort').val();
|
||||||
var databaseUser = $('#databaseUser').val();
|
var databaseUser = $('#databaseUser').val();
|
||||||
var databasePass = $('#databasePass').val();
|
var databasePass = $('#databasePass').val();
|
||||||
var databaseName = $('#databaseName').val();
|
var databaseName = $('#databaseName').val();
|
||||||
|
@ -298,6 +303,7 @@ require_once '../objects/functions.php';
|
||||||
systemRootPath: systemRootPath,
|
systemRootPath: systemRootPath,
|
||||||
webSiteTitle: webSiteTitle,
|
webSiteTitle: webSiteTitle,
|
||||||
databaseHost: databaseHost,
|
databaseHost: databaseHost,
|
||||||
|
databasePort: databasePort,
|
||||||
databaseUser: databaseUser,
|
databaseUser: databaseUser,
|
||||||
databasePass: databasePass,
|
databasePass: databasePass,
|
||||||
databaseName: databaseName,
|
databaseName: databaseName,
|
||||||
|
|
|
@ -4,7 +4,7 @@ global $global;
|
||||||
global $config;
|
global $config;
|
||||||
|
|
||||||
|
|
||||||
$global['mysqli'] = new mysqli($mysqlHost, $mysqlUser,$mysqlPass,$mysqlDatabase);
|
$global['mysqli'] = new mysqli($mysqlHost, $mysqlUser,$mysqlPass,$mysqlDatabase,@$mysqlPort);
|
||||||
|
|
||||||
$now = new DateTime();
|
$now = new DateTime();
|
||||||
$mins = $now->getOffset() / 60;
|
$mins = $now->getOffset() / 60;
|
||||||
|
|
|
@ -74,22 +74,23 @@ h4{
|
||||||
}
|
}
|
||||||
|
|
||||||
footer {
|
footer {
|
||||||
color: white;
|
color: #444;
|
||||||
padding: 25px;
|
padding: 25px;
|
||||||
background-color: #000;
|
background-color: #F2F2F2;
|
||||||
|
border-top: 1px solid #DDD;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
.btn-outline:hover,
|
footer .btn-outline:hover,
|
||||||
.btn-outline:focus,
|
footer .btn-outline:focus,
|
||||||
.btn-outline:active{
|
footer .btn-outline:active{
|
||||||
color: #000;
|
color: #444;
|
||||||
background: white;
|
background: white;
|
||||||
border: solid 2px white;
|
border: solid 2px white;
|
||||||
}
|
}
|
||||||
.btn-outline {
|
footer .btn-outline {
|
||||||
color: white;
|
color: #444;
|
||||||
border: solid 2px white;
|
border: solid 2px #444;
|
||||||
background: transparent;
|
background: transparent;
|
||||||
transition: all 0.3s ease-in-out;
|
transition: all 0.3s ease-in-out;
|
||||||
margin: 0 5px;
|
margin: 0 5px;
|
||||||
|
@ -477,17 +478,68 @@ img.rotate270, img.rotate-90{
|
||||||
.navbar-brand {
|
.navbar-brand {
|
||||||
padding: 0px !important; /* firefox bug fix */
|
padding: 0px !important; /* firefox bug fix */
|
||||||
margin-left: 10px !important;
|
margin-left: 10px !important;
|
||||||
|
height: auto;
|
||||||
}
|
}
|
||||||
.navbar-brand>img {
|
.navbar-brand>img {
|
||||||
height: 100%;
|
width: 120px;
|
||||||
width: auto;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.navbar .list-inline li{
|
.list-inline {
|
||||||
|
display: flex;
|
||||||
|
justify-content: left;
|
||||||
|
}
|
||||||
|
footer ul.list-inline{
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
footer ul.list-inline li{
|
||||||
|
justify-content: center;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
/** header **/
|
||||||
|
nav ul.items-container {
|
||||||
|
display: flex;
|
||||||
|
justify-content: flex-end;
|
||||||
|
margin: 0px;
|
||||||
|
padding: 0px;
|
||||||
|
}
|
||||||
|
nav ul.items-container,
|
||||||
|
nav ul.items-container li{
|
||||||
|
list-style: none;
|
||||||
|
}
|
||||||
|
nav ul.items-container li:first-child{
|
||||||
|
flex: 1;
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
nav ul.items-container li:first-child ul.left-side{
|
||||||
|
display: flex;
|
||||||
|
align-items: center
|
||||||
|
}
|
||||||
|
nav ul.items-container li:last-child{
|
||||||
|
margin-right: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
nav ul.items-container li ul.right-menus {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
nav ul.items-container li ul.right-menus li{
|
||||||
|
margin-left: 20px;
|
||||||
|
}
|
||||||
|
/** header **/
|
||||||
|
|
||||||
|
|
||||||
|
.navbar .container{
|
||||||
padding: 0 2px;
|
padding: 0 2px;
|
||||||
|
align-items: center;
|
||||||
|
}
|
||||||
|
.list-inline > li {
|
||||||
|
display: flex;
|
||||||
}
|
}
|
||||||
.navbar .list-inline{
|
.navbar .list-inline{
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
}
|
}
|
||||||
/* Play List */
|
/* Play List */
|
||||||
.playlistList{
|
.playlistList{
|
||||||
|
|
|
@ -9,8 +9,9 @@ if (empty($_SESSION['language'])) {
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<nav class="navbar navbar-default navbar-fixed-top ">
|
<nav class="navbar navbar-default navbar-fixed-top ">
|
||||||
<div class="container-fluid">
|
<ul class="items-container">
|
||||||
<ul class="list-inline pull-left">
|
<li>
|
||||||
|
<ul class="left-side">
|
||||||
<li>
|
<li>
|
||||||
<button class="btn btn-default navbar-btn pull-left" id="buttonMenu" ><span class="fa fa-bars"></span></button>
|
<button class="btn btn-default navbar-btn pull-left" id="buttonMenu" ><span class="fa fa-bars"></span></button>
|
||||||
<script>
|
<script>
|
||||||
|
@ -42,8 +43,11 @@ if (empty($_SESSION['language'])) {
|
||||||
</form>
|
</form>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<ul class="right-menus">
|
||||||
|
|
||||||
<ul class="pull-right list-inline ">
|
|
||||||
<?php
|
<?php
|
||||||
if (User::canUpload()) {
|
if (User::canUpload()) {
|
||||||
if (!empty($config->getEncoderURL())) {
|
if (!empty($config->getEncoderURL())) {
|
||||||
|
@ -62,7 +66,7 @@ if (empty($_SESSION['language'])) {
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<li class="pull-right">
|
<li>
|
||||||
<select class="selectpicker" id="navBarFlag" data-width="fit">
|
<select class="selectpicker" id="navBarFlag" data-width="fit">
|
||||||
<?php
|
<?php
|
||||||
$flags = getEnabledLangs();
|
$flags = getEnabledLangs();
|
||||||
|
@ -91,7 +95,9 @@ if (empty($_SESSION['language'])) {
|
||||||
</script>
|
</script>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</li>
|
||||||
|
</ul>
|
||||||
|
|
||||||
|
|
||||||
<div id="sidebar" class="list-group-item" style="display: none;">
|
<div id="sidebar" class="list-group-item" style="display: none;">
|
||||||
<div id="sideBarContainer">
|
<div id="sideBarContainer">
|
||||||
|
|
|
@ -26,9 +26,10 @@ if (!empty($ad)) {
|
||||||
}
|
}
|
||||||
?>">
|
?>">
|
||||||
<video poster="<?php echo $poster; ?>" controls crossorigin
|
<video poster="<?php echo $poster; ?>" controls crossorigin
|
||||||
class="embed-responsive-item video-js vjs-default-skin <?php echo $vjsClass; ?> vjs-big-play-centered" id="mainVideo" data-setup='{ aspectRatio: "<?php echo $aspectRatio; ?>" }'>
|
class="embed-responsive-item video-js vjs-default-skin <?php echo $vjsClass; ?> vjs-big-play-centered"
|
||||||
<source src="<?php echo $global['webSiteRootURL']; ?>videos/<?php echo $playNowVideo['filename']; ?>.mp4" type="video/mp4">
|
id="mainVideo" data-setup='{ aspectRatio: "<?php echo $aspectRatio; ?>" }'>
|
||||||
<source src="<?php echo $global['webSiteRootURL']; ?>videos/<?php echo $playNowVideo['filename']; ?>.webm" type="video/webm">
|
<source src="<?php echo $global['webSiteRootURL']; ?>videos/<?php echo $playNowVideo['filename']; ?>.webm" type="video/webm">
|
||||||
|
<source src="<?php echo $global['webSiteRootURL']; ?>videos/<?php echo $playNowVideo['filename']; ?>.mp4" type="video/mp4">
|
||||||
<p><?php echo __("If you can't view this video, your browser does not support HTML5 videos"); ?></p>
|
<p><?php echo __("If you can't view this video, your browser does not support HTML5 videos"); ?></p>
|
||||||
<p class="vjs-no-js">
|
<p class="vjs-no-js">
|
||||||
<?php echo __("To view this video please enable JavaScript, and consider upgrading to a web browser that"); ?>
|
<?php echo __("To view this video please enable JavaScript, and consider upgrading to a web browser that"); ?>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue