mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +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/
|
||||
/videos/
|
||||
/nbproject/
|
||||
/docker/
|
|
@ -13,7 +13,7 @@ if (!file_exists($_POST['systemRootPath'] . "index.php")) {
|
|||
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,
|
||||
|
@ -125,6 +125,7 @@ $content = "<?php
|
|||
|
||||
|
||||
\$mysqlHost = '{$_POST['databaseHost']}';
|
||||
\$mysqlPort = '{$_POST['databasePort']}';
|
||||
\$mysqlUser = '{$_POST['databaseUser']}';
|
||||
\$mysqlPass = '{$_POST['databasePass']}';
|
||||
\$mysqlDatabase = '{$_POST['databaseName']}';
|
||||
|
@ -140,5 +141,14 @@ $fp = fopen($_POST['systemRootPath'] . "videos/configuration.php", "wb");
|
|||
fwrite($fp, $content);
|
||||
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;
|
||||
echo json_encode($obj);
|
||||
|
|
|
@ -209,6 +209,10 @@ require_once '../objects/functions.php';
|
|||
<label for="databaseHost">Database Host</label>
|
||||
<input type="text" class="form-control" id="databaseHost" placeholder="Enter Database Host" value="localhost" required="required">
|
||||
</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">
|
||||
<label for="databaseUser">Database User</label>
|
||||
<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 webSiteTitle = $('#webSiteTitle').val();
|
||||
var databaseHost = $('#databaseHost').val();
|
||||
var databasePort = $('#databasePort').val();
|
||||
var databaseUser = $('#databaseUser').val();
|
||||
var databasePass = $('#databasePass').val();
|
||||
var databaseName = $('#databaseName').val();
|
||||
|
@ -298,6 +303,7 @@ require_once '../objects/functions.php';
|
|||
systemRootPath: systemRootPath,
|
||||
webSiteTitle: webSiteTitle,
|
||||
databaseHost: databaseHost,
|
||||
databasePort: databasePort,
|
||||
databaseUser: databaseUser,
|
||||
databasePass: databasePass,
|
||||
databaseName: databaseName,
|
||||
|
|
|
@ -4,7 +4,7 @@ global $global;
|
|||
global $config;
|
||||
|
||||
|
||||
$global['mysqli'] = new mysqli($mysqlHost, $mysqlUser,$mysqlPass,$mysqlDatabase);
|
||||
$global['mysqli'] = new mysqli($mysqlHost, $mysqlUser,$mysqlPass,$mysqlDatabase,@$mysqlPort);
|
||||
|
||||
$now = new DateTime();
|
||||
$mins = $now->getOffset() / 60;
|
||||
|
|
|
@ -74,22 +74,23 @@ h4{
|
|||
}
|
||||
|
||||
footer {
|
||||
color: white;
|
||||
color: #444;
|
||||
padding: 25px;
|
||||
background-color: #000;
|
||||
background-color: #F2F2F2;
|
||||
border-top: 1px solid #DDD;
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
}
|
||||
.btn-outline:hover,
|
||||
.btn-outline:focus,
|
||||
.btn-outline:active{
|
||||
color: #000;
|
||||
footer .btn-outline:hover,
|
||||
footer .btn-outline:focus,
|
||||
footer .btn-outline:active{
|
||||
color: #444;
|
||||
background: white;
|
||||
border: solid 2px white;
|
||||
}
|
||||
.btn-outline {
|
||||
color: white;
|
||||
border: solid 2px white;
|
||||
footer .btn-outline {
|
||||
color: #444;
|
||||
border: solid 2px #444;
|
||||
background: transparent;
|
||||
transition: all 0.3s ease-in-out;
|
||||
margin: 0 5px;
|
||||
|
@ -477,17 +478,68 @@ img.rotate270, img.rotate-90{
|
|||
.navbar-brand {
|
||||
padding: 0px !important; /* firefox bug fix */
|
||||
margin-left: 10px !important;
|
||||
height: auto;
|
||||
}
|
||||
.navbar-brand>img {
|
||||
height: 100%;
|
||||
width: auto;
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.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;
|
||||
align-items: center;
|
||||
}
|
||||
.list-inline > li {
|
||||
display: flex;
|
||||
}
|
||||
.navbar .list-inline{
|
||||
margin: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
/* Play List */
|
||||
.playlistList{
|
||||
|
|
|
@ -9,8 +9,9 @@ if (empty($_SESSION['language'])) {
|
|||
}
|
||||
?>
|
||||
<nav class="navbar navbar-default navbar-fixed-top ">
|
||||
<div class="container-fluid">
|
||||
<ul class="list-inline pull-left">
|
||||
<ul class="items-container">
|
||||
<li>
|
||||
<ul class="left-side">
|
||||
<li>
|
||||
<button class="btn btn-default navbar-btn pull-left" id="buttonMenu" ><span class="fa fa-bars"></span></button>
|
||||
<script>
|
||||
|
@ -42,17 +43,20 @@ if (empty($_SESSION['language'])) {
|
|||
</form>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
|
||||
<li>
|
||||
<ul class="right-menus">
|
||||
|
||||
<ul class="pull-right list-inline ">
|
||||
<?php
|
||||
if (User::canUpload()) {
|
||||
if(!empty($config->getEncoderURL())){
|
||||
if (!empty($config->getEncoderURL())) {
|
||||
?>
|
||||
<li>
|
||||
<a href="<?php echo $config->getEncoderURL(), "?webSiteRootURL=", urlencode($global['webSiteRootURL']), "&user=", urlencode(User::getUserName()), "&pass=", urlencode(User::getUserPass()); ?>" class="btn btn-default navbar-btn pull-left" data-toggle="tooltip" title="<?php echo __("Video and Audio Upload"); ?>" data-placement="bottom" ><span class="fa fa-upload"></span></a>
|
||||
</li>
|
||||
<?php
|
||||
}else{
|
||||
} else {
|
||||
?>
|
||||
<li>
|
||||
<a href="<?php echo $global['webSiteRootURL']; ?>siteConfigurations" class="btn btn-default navbar-btn pull-left" data-toggle="tooltip" title="<?php echo __("Configure an Encoder URL"); ?>" data-placement="bottom" ><span class="fa fa-cogs"></span></a>
|
||||
|
@ -62,7 +66,7 @@ if (empty($_SESSION['language'])) {
|
|||
}
|
||||
?>
|
||||
|
||||
<li class="pull-right">
|
||||
<li>
|
||||
<select class="selectpicker" id="navBarFlag" data-width="fit">
|
||||
<?php
|
||||
$flags = getEnabledLangs();
|
||||
|
@ -91,7 +95,9 @@ if (empty($_SESSION['language'])) {
|
|||
</script>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
|
||||
<div id="sidebar" class="list-group-item" style="display: none;">
|
||||
<div id="sideBarContainer">
|
||||
|
|
|
@ -26,9 +26,10 @@ if (!empty($ad)) {
|
|||
}
|
||||
?>">
|
||||
<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; ?>" }'>
|
||||
<source src="<?php echo $global['webSiteRootURL']; ?>videos/<?php echo $playNowVideo['filename']; ?>.mp4" type="video/mp4">
|
||||
class="embed-responsive-item video-js vjs-default-skin <?php echo $vjsClass; ?> vjs-big-play-centered"
|
||||
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']; ?>.mp4" type="video/mp4">
|
||||
<p><?php echo __("If you can't view this video, your browser does not support HTML5 videos"); ?></p>
|
||||
<p class="vjs-no-js">
|
||||
<?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