mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +02:00
Version 8.3 and mail fix
This commit is contained in:
parent
ee4cd23aea
commit
3b13f66fce
72 changed files with 288 additions and 140 deletions
BIN
.DS_Store
vendored
Normal file
BIN
.DS_Store
vendored
Normal file
Binary file not shown.
|
@ -4,7 +4,7 @@ if (file_exists("../videos/configuration.php")) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
$installationVersion = "8.2";
|
$installationVersion = "8.3";
|
||||||
|
|
||||||
|
|
||||||
header('Content-Type: application/json');
|
header('Content-Type: application/json');
|
||||||
|
|
|
@ -136,6 +136,7 @@ CREATE TABLE IF NOT EXISTS `videos` (
|
||||||
`only_for_paid` TINYINT(1) NULL DEFAULT NULL,
|
`only_for_paid` TINYINT(1) NULL DEFAULT NULL,
|
||||||
`serie_playlists_id` INT(11) NULL DEFAULT NULL,
|
`serie_playlists_id` INT(11) NULL DEFAULT NULL,
|
||||||
`sites_id` INT(11) NULL,
|
`sites_id` INT(11) NULL,
|
||||||
|
`video_password` VARCHAR(45) NULL DEFAULT NULL,
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
INDEX `fk_videos_users_idx` (`users_id` ASC),
|
INDEX `fk_videos_users_idx` (`users_id` ASC),
|
||||||
INDEX `fk_videos_categories1_idx` (`categories_id` ASC),
|
INDEX `fk_videos_categories1_idx` (`categories_id` ASC),
|
||||||
|
|
|
@ -4,7 +4,7 @@ require_once $global['systemRootPath'] . 'objects/functions.php';
|
||||||
// filter some security here
|
// filter some security here
|
||||||
$securityFilter = array('error', 'catName', 'type', 'channelName', 'captcha', 'showOnly', 'key', 'link', 'email', 'country', 'region');
|
$securityFilter = array('error', 'catName', 'type', 'channelName', 'captcha', 'showOnly', 'key', 'link', 'email', 'country', 'region');
|
||||||
$securityFilterInt = array('videos_id', 'video_id', 'categories_id', 'user_id', 'users_id', 'comments_id', 'isAdmin', 'priority', 'totalClips');
|
$securityFilterInt = array('videos_id', 'video_id', 'categories_id', 'user_id', 'users_id', 'comments_id', 'isAdmin', 'priority', 'totalClips');
|
||||||
$securityRemoveSingleQuotes = array('search', 'searchPhrase', 'videoName', 'databaseName', 'sort', 'user', 'pass', 'encodedPass', 'isAdmin');
|
$securityRemoveSingleQuotes = array('search', 'searchPhrase', 'videoName', 'databaseName', 'sort', 'user', 'pass', 'encodedPass', 'isAdmin', 'videoLink', 'video_password');
|
||||||
$securityRemoveNonChars = array('resolution', 'format', 'videoDirectory');
|
$securityRemoveNonChars = array('resolution', 'format', 'videoDirectory');
|
||||||
$filterURL = array('videoURL', 'siteURL');
|
$filterURL = array('videoURL', 'siteURL');
|
||||||
|
|
||||||
|
|
|
@ -3,7 +3,7 @@ require_once '../videos/configuration.php';
|
||||||
|
|
||||||
$images = Video::getImageFromFilename($video['filename']);
|
$images = Video::getImageFromFilename($video['filename']);
|
||||||
$img = $images->poster;
|
$img = $images->poster;
|
||||||
if (!empty($images->posterPortrait)) {
|
if (!empty($images->posterPortrait) && strpos($images->posterPortrait, 'notfound_portrait') === false) {
|
||||||
$img = $images->posterPortrait;
|
$img = $images->posterPortrait;
|
||||||
}
|
}
|
||||||
$imgw = 1280;
|
$imgw = 1280;
|
||||||
|
@ -28,6 +28,12 @@ $imgh = 720;
|
||||||
<meta property="video:duration" content="<?php echo Video::getItemDurationSeconds($video['duration']); ?>" />
|
<meta property="video:duration" content="<?php echo Video::getItemDurationSeconds($video['duration']); ?>" />
|
||||||
<meta property="duration" content="<?php echo Video::getItemDurationSeconds($video['duration']); ?>" />
|
<meta property="duration" content="<?php echo Video::getItemDurationSeconds($video['duration']); ?>" />
|
||||||
<style>
|
<style>
|
||||||
|
body {
|
||||||
|
padding-top: 0;
|
||||||
|
}
|
||||||
|
footer{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
#bg{
|
#bg{
|
||||||
position: fixed;
|
position: fixed;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
@ -41,7 +47,7 @@ $imgh = 720;
|
||||||
</head>
|
</head>
|
||||||
<body class="<?php echo $global['bodyClass']; ?>">
|
<body class="<?php echo $global['bodyClass']; ?>">
|
||||||
<?php
|
<?php
|
||||||
include $global['systemRootPath'] . 'view/include/navbar.php';
|
//include $global['systemRootPath'] . 'view/include/navbar.php';
|
||||||
?>
|
?>
|
||||||
<div id="bg"></div>
|
<div id="bg"></div>
|
||||||
|
|
||||||
|
@ -71,7 +77,7 @@ $imgh = 720;
|
||||||
|
|
||||||
<div class="modal-footer" >
|
<div class="modal-footer" >
|
||||||
<a href="<?php echo $_SERVER['REQUEST_URI'],strpos($_SERVER['REQUEST_URI'], "?")===false?"?":"&"; ?>rrating=1" class="btn btn-success pull-right"><i class="fas fa-check-circle"></i> <?php echo __("Confirm"); ?></a>
|
<a href="<?php echo $_SERVER['REQUEST_URI'],strpos($_SERVER['REQUEST_URI'], "?")===false?"?":"&"; ?>rrating=1" class="btn btn-success pull-right"><i class="fas fa-check-circle"></i> <?php echo __("Confirm"); ?></a>
|
||||||
<a href="<?php echo $global["HTTP_REFERER"]; ?>" class="btn btn-danger pull-right"><i class="fas fa-times-circle"></i> <?php echo __("Cancel"); ?></a>
|
<a href="<?php echo $global['webSiteRootURL']; ?>" class="btn btn-danger pull-right"><i class="fas fa-times-circle"></i> <?php echo __("Cancel"); ?></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
108
plugin/CustomizeUser/confirmVideoPassword.php
Normal file
108
plugin/CustomizeUser/confirmVideoPassword.php
Normal file
|
@ -0,0 +1,108 @@
|
||||||
|
<?php
|
||||||
|
require_once '../videos/configuration.php';
|
||||||
|
|
||||||
|
$images = Video::getImageFromFilename($video['filename']);
|
||||||
|
$img = $images->poster;
|
||||||
|
if (!empty($images->posterPortrait) && strpos($images->posterPortrait, 'notfound_portrait') === false) {
|
||||||
|
$img = $images->posterPortrait;
|
||||||
|
}
|
||||||
|
$imgw = 1280;
|
||||||
|
$imgh = 720;
|
||||||
|
?>
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html lang="<?php echo $_SESSION['language']; ?>">
|
||||||
|
<head>
|
||||||
|
<title><?php echo $config->getWebSiteTitle(); ?> :: Confirm Rating</title>
|
||||||
|
<?php
|
||||||
|
include $global['systemRootPath'] . 'view/include/head.php';
|
||||||
|
?>
|
||||||
|
<link rel="image_src" href="<?php echo $img; ?>" />
|
||||||
|
<meta property="fb:app_id" content="774958212660408" />
|
||||||
|
<meta property="og:url" content="<?php echo $global['webSiteRootURL'], "video/", $video['clean_title']; ?>" />
|
||||||
|
<meta property="og:type" content="video.other" />
|
||||||
|
<meta property="og:title" content="<?php echo str_replace('"', '', $video['title']); ?> - <?php echo $config->getWebSiteTitle(); ?>" />
|
||||||
|
<meta property="og:description" content="<?php echo!empty($custom) ? $custom : str_replace('"', '', $video['title']); ?>" />
|
||||||
|
<meta property="og:image" content="<?php echo $img; ?>" />
|
||||||
|
<meta property="og:image:width" content="<?php echo $imgw; ?>" />
|
||||||
|
<meta property="og:image:height" content="<?php echo $imgh; ?>" />
|
||||||
|
<meta property="video:duration" content="<?php echo Video::getItemDurationSeconds($video['duration']); ?>" />
|
||||||
|
<meta property="duration" content="<?php echo Video::getItemDurationSeconds($video['duration']); ?>" />
|
||||||
|
<style>
|
||||||
|
body {
|
||||||
|
padding-top: 0;
|
||||||
|
}
|
||||||
|
footer{
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
#bg{
|
||||||
|
position: fixed;
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
background-image: url('<?php echo $images->poster; ?>');
|
||||||
|
background-size: cover;
|
||||||
|
opacity: 0.3;
|
||||||
|
filter: alpha(opacity=30); /* For IE8 and earlier */
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
<body class="<?php echo $global['bodyClass']; ?>">
|
||||||
|
<?php
|
||||||
|
//include $global['systemRootPath'] . 'view/include/navbar.php';
|
||||||
|
?>
|
||||||
|
<div id="bg"></div>
|
||||||
|
|
||||||
|
<!-- Modal -->
|
||||||
|
<div id="myModal" class="modal fade in" role="dialog">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
|
||||||
|
<!-- Modal content-->
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h4 class="modal-title">Title: <?php echo $video['title']; ?></h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<img src="<?php echo $img; ?>" class="img img-responsive"/>
|
||||||
|
</div>
|
||||||
|
<div class="col-sm-6">
|
||||||
|
<center>
|
||||||
|
<form method="post" action="<?php echo $_SERVER['REQUEST_URI']; ?>">
|
||||||
|
<?php
|
||||||
|
if (!empty($_POST['video_password'])) {
|
||||||
|
?>
|
||||||
|
<div class="alert alert-danger"><?php echo __("Your password does not match!"); ?></div>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
<div class="form-group">
|
||||||
|
<label for="video_password"><?php echo __("This Video Requires a Password"); ?></label>
|
||||||
|
<input type="text" class="form-control" id="video_password" name="video_password" placeholder="<?php echo __("Password"); ?>" required>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-6">
|
||||||
|
<button type="submit" class="btn btn-success btn-block"><i class="fas fa-check-circle"></i> <?php echo __("Confirm"); ?></button>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6">
|
||||||
|
<a href="<?php echo $global['webSiteRootURL']; ?>" class="btn btn-danger btn-block"><i class="fas fa-times-circle"></i> <?php echo __("Cancel"); ?></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</form>
|
||||||
|
</center>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<?php
|
||||||
|
include $global['systemRootPath'] . 'view/include/footer.php';
|
||||||
|
?>
|
||||||
|
<script type="text/javascript">
|
||||||
|
$(window).on('load', function () {
|
||||||
|
$('#myModal').modal('show');
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -111,7 +111,7 @@ function createOrderInfo($getName, $mostWord, $lessWord, $orderString) {
|
||||||
}
|
}
|
||||||
|
|
||||||
function createGallerySection($videos, $crc = "", $get = array()) {
|
function createGallerySection($videos, $crc = "", $get = array()) {
|
||||||
global $global, $config, $obj, $advancedCustom;
|
global $global, $config, $obj, $advancedCustom, $advancedCustomUser;
|
||||||
$countCols = 0;
|
$countCols = 0;
|
||||||
$obj = AVideoPlugin::getObjectData("Gallery");
|
$obj = AVideoPlugin::getObjectData("Gallery");
|
||||||
$zindex = 1000;
|
$zindex = 1000;
|
||||||
|
@ -228,6 +228,19 @@ function createGallerySection($videos, $crc = "", $get = array()) {
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
<?php } ?>
|
<?php } ?>
|
||||||
|
<?php
|
||||||
|
if (!empty($advancedCustomUser->userCanProtectVideosWithPassword)) {
|
||||||
|
?>
|
||||||
|
<div>
|
||||||
|
<?php
|
||||||
|
if (!empty($value['video_password'])) {
|
||||||
|
?>
|
||||||
|
<i class="fas fa-lock" title="<?php echo __("Password Protected"); ?>" ></i>
|
||||||
|
<?php
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</div>
|
||||||
|
<?php } ?>
|
||||||
<div>
|
<div>
|
||||||
<i class="far fa-clock"></i>
|
<i class="far fa-clock"></i>
|
||||||
<?php echo humanTiming(strtotime($value['videoCreation'])), " ", __('ago'); ?>
|
<?php echo humanTiming(strtotime($value['videoCreation'])), " ", __('ago'); ?>
|
||||||
|
@ -317,7 +330,9 @@ function createGallerySection($videos, $crc = "", $get = array()) {
|
||||||
$timesG[__LINE__] = microtime(true) - $startG;
|
$timesG[__LINE__] = microtime(true) - $startG;
|
||||||
$startG = microtime(true);
|
$startG = microtime(true);
|
||||||
foreach ($timesG as $key => $value) {
|
foreach ($timesG as $key => $value) {
|
||||||
echo "Line: {$key} -> {$value}\n";
|
echo "Line: {$key
|
||||||
|
} -> {$value
|
||||||
|
}\n";
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
-->
|
-->
|
||||||
|
|
|
@ -348,6 +348,12 @@ abstract class PluginAbstract {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param type $users_id
|
||||||
|
* @param type $videos_id
|
||||||
|
* @return 0 = I dont know, -1 = can not watch, 1 = can watch
|
||||||
|
*/
|
||||||
public function userCanWatchVideoWithAds($users_id, $videos_id) {
|
public function userCanWatchVideoWithAds($users_id, $videos_id) {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
12
updatedb/updateDb.v8.3.sql
Normal file
12
updatedb/updateDb.v8.3.sql
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
|
||||||
|
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
|
||||||
|
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';
|
||||||
|
|
||||||
|
ALTER TABLE `videos`
|
||||||
|
ADD COLUMN `video_password` VARCHAR(45) NULL DEFAULT NULL;
|
||||||
|
|
||||||
|
UPDATE configurations SET version = '8.3', modified = now() WHERE id = 1;
|
||||||
|
|
||||||
|
SET SQL_MODE=@OLD_SQL_MODE;
|
||||||
|
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
|
||||||
|
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;
|
Loading…
Add table
Add a link
Reference in a new issue