1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 09:49:28 +02:00
Daniel Neto 2023-10-13 13:10:59 -03:00
parent 9f8579c713
commit f327d7886b
16 changed files with 145 additions and 74 deletions

View file

@ -4861,14 +4861,14 @@ function TimeLogEnd($name, $line, $TimeLogLimit = 0.7) {
$backtrace = ' backtrace=' . json_encode(debug_backtrace()); $backtrace = ' backtrace=' . json_encode(debug_backtrace());
} }
$ua = ' IP='.getRealIpAddr();
if (!empty($_SERVER['HTTP_USER_AGENT'])) { if (!empty($_SERVER['HTTP_USER_AGENT'])) {
$ua = '';
if(isBot()){ if(isBot()){
$ua = " BOT "; $ua .= " BOT ";
$ua .= " USER_AGENT={$_SERVER['HTTP_USER_AGENT']}";
} }
$ua .= " USER_AGENT={$_SERVER['HTTP_USER_AGENT']}";
}else{ }else{
$ua = " USER_AGENT=Undefined server=".json_encode($_SERVER); $ua .= " USER_AGENT=Undefined server=".json_encode($_SERVER);
} }
_error_log("Time: ". str_pad(number_format($total_time,3) . "s", 8) . " | Limit: {$TimeLogLimit}s | Location: {$_SERVER["SCRIPT_FILENAME"]} Line {$line} [{$name}]{$ua}{$backtrace}", $type); _error_log("Time: ". str_pad(number_format($total_time,3) . "s", 8) . " | Limit: {$TimeLogLimit}s | Location: {$_SERVER["SCRIPT_FILENAME"]} Line {$line} [{$name}]{$ua}{$backtrace}", $type);

View file

@ -1069,7 +1069,7 @@ if (!class_exists('Video')) {
//. ", (SELECT count(id) FROM likes as l where l.videos_id = v.id AND `like` = -1 ) as dislikes " //. ", (SELECT count(id) FROM likes as l where l.videos_id = v.id AND `like` = -1 ) as dislikes "
; ;
if (User::isLogged()) { if (User::isLogged()) {
$sql .= ", (SELECT `like` FROM likes as l where l.videos_id = v.id AND users_id = '" . User::getId() . "' ) as myVote "; $sql .= ", (SELECT `like` FROM likes as l where l.videos_id = v.id AND users_id = '" . User::getId() . "' LIMIT 1 ) as myVote ";
} else { } else {
$sql .= ", 0 as myVote "; $sql .= ", 0 as myVote ";
} }
@ -1245,7 +1245,7 @@ if (!class_exists('Video')) {
$sql .= " LIMIT {$firstClauseLimit}1"; $sql .= " LIMIT {$firstClauseLimit}1";
} }
$lastGetVideoSQL = $sql; $lastGetVideoSQL = $sql;
//echo $sql, "<br>";var_dump(debug_backtrace());exit; //echo $sql, "<br>";//var_dump(debug_backtrace());exit;
$res = sqlDAL::readSql($sql); $res = sqlDAL::readSql($sql);
$video = sqlDAL::fetchAssoc($res); $video = sqlDAL::fetchAssoc($res);
if (!empty($video['id'])) { if (!empty($video['id'])) {
@ -5665,14 +5665,36 @@ if (!class_exists('Video')) {
return $this->rrating; return $this->rrating;
} }
public function getRratingHTML() public static function getRratingHTML($rrating )
{ {
global $global; global $global;
if (!empty($this->rrating)) { if (!empty($rrating )) {
$filePath = $global['systemRootPath'] . 'view/rrating/rating-' . $this->rrating . '.php'; $filePath = $global['systemRootPath'] . 'view/rrating/rating-' . $rrating . '.php';
if (file_exists($filePath)) { if (file_exists($filePath)) {
return getIncludeFileContent($filePath); $return = getIncludeFileContent($filePath);
return $return;
} }
} else if (!empty($advancedCustom) && $advancedCustom->showNotRatedLabel) {
include $global['systemRootPath'] . 'view/rrating/notRated.php';
}
return '';
}
public static function getRratingIMG($rrating, $style='' )
{
global $global;
if (!empty($rrating )) {
return '<img src="'.getURL('view/rrating/rating-' . $rrating . '.png').'" class="img img-responsive zoom" style="'.$style.'" /> ';
}
return '';
}
public static function getRratingText($rrating)
{
global $global;
if (!empty($rrating )) {
include $global['systemRootPath'] . 'view/rrating/rating-' . $rrating . '_text.php';
} }
return ''; return '';
} }

View file

@ -68,17 +68,17 @@ $ogURL = Video::getLinkToVideo($video['id'], $video['clean_title'], false, false
<div class="modal-body"> <div class="modal-body">
<div class="row"> <div class="row">
<div class="col-sm-2"> <div class="col-sm-2">
<img src="<?php echo getURL('view/rrating/rating-' . $video['rrating'] . '.png'); ?>" class="img img-responsive" /> <?php
echo Video::getRratingIMG($video['rrating']);
?>
</div> </div>
<div class="col-sm-4"> <div class="col-sm-4">
<img src="<?php echo $img; ?>" class="img img-responsive"/> <img src="<?php echo $img; ?>" class="img img-responsive"/>
</div> </div>
<div class="col-sm-6"> <div class="col-sm-6 text-center">
<center> <?php
<?php echo Video::getRratingText($video['rrating']);
include $global['systemRootPath'] . 'view/rrating/rating-' . $video['rrating'] . '_text.php'; ?>
?>
</center>
</div> </div>
</div> </div>
</div> </div>

View file

@ -1,16 +1,19 @@
<script> <script>
var playListsAdding = false; var playListsAdding = false;
var playListsReloading = false;
var playList = []; var playList = [];
async function reloadPlayLists() { async function reloadPlayLists() {
if (!isOnline()) { if (!isOnline() || playListsReloading) {
return false; return false;
} }
playListsReloading = true;
//console.log('reloadPlayLists'); //console.log('reloadPlayLists');
$.ajax({ $.ajax({
url: webSiteRootURL + 'objects/playlists.json.php', url: webSiteRootURL + 'objects/playlists.json.php',
success: function (response) { success: function (response) {
playList = response; playList = response;
reloadPlayListButtons(); reloadPlayListButtons();
playListsReloading = false;
} }
}); });
} }

View file

@ -60,10 +60,6 @@ if (!empty($ads1)) {
} }
?> ?>
<?php <?php
if (!empty($video['rrating'])) { Video::getRratingHTML($video['rrating'] );
include $global['systemRootPath'] . 'view/rrating/rating-' . $video['rrating'] . '.php';
} else if (!empty($advancedCustom) && $advancedCustom->showNotRatedLabel) {
include $global['systemRootPath'] . 'view/rrating/notRated.php';
}
?> ?>
</div> </div>

View file

@ -54,13 +54,7 @@ TimeLogStart($timeLog6);
TimeLogEnd($timeLog6, __LINE__, $timeLog6Limit); TimeLogEnd($timeLog6, __LINE__, $timeLog6Limit);
?> ?>
<?php <?php
TimeLogEnd($timeLog6, __LINE__, $timeLog6Limit); Video::getRratingHTML($value['rrating'] );
if (!empty($value['rrating'])) {
include $global['systemRootPath'] . 'view/rrating/rating-' . $value['rrating'] . '.php';
} else if (!empty($advancedCustom) && $advancedCustom->showNotRatedLabel) {
include $global['systemRootPath'] . 'view/rrating/notRated.php';
}
TimeLogEnd($timeLog6, __LINE__, $timeLog6Limit);
?> ?>
</div> </div>
<div class="row"> <div class="row">

View file

@ -905,7 +905,8 @@ img.blur {
#CloseButtonInVideo { #CloseButtonInVideo {
display: flex; display: flex;
justify-content: center; /* Horizontally centers the content (i.e., the <i> element) */ justify-content: center;
/* Horizontally centers the content (i.e., the <i> element) */
align-items: center; align-items: center;
z-index: 9999; z-index: 9999;
position: fixed; position: fixed;
@ -917,6 +918,7 @@ img.blur {
height: 25px; height: 25px;
width: 25px; width: 25px;
} }
#CloseButtonInVideo:hover { #CloseButtonInVideo:hover {
background-color: rgba(255, 255, 255, 1); background-color: rgba(255, 255, 255, 1);
color: #000; color: #000;
@ -2021,21 +2023,25 @@ body.ypt-is-compressed #videoCol {
.ImagesPlaceHoldersDefaultImage { .ImagesPlaceHoldersDefaultImage {
filter: grayscale(100%); filter: grayscale(100%);
background-color: rgba(128, 128, 128, 0.25); /* This is the grey background with 80% transparency */ background-color: rgba(128, 128, 128, 0.25);
transition: filter 0.3s ease, background-color 0.3s ease; /* This ensures a smooth transition effect */ /* This is the grey background with 80% transparency */
transition: filter 0.3s ease, background-color 0.3s ease;
/* This ensures a smooth transition effect */
} }
.thumbsImageContainer:hover .ImagesPlaceHoldersDefaultImage, .thumbsImageContainer:hover .ImagesPlaceHoldersDefaultImage,
.ImagesPlaceHoldersDefaultImage:hover { .ImagesPlaceHoldersDefaultImage:hover {
filter: grayscale(0%); filter: grayscale(0%);
background-color: rgba(128, 128, 128, 0.5); /* This is the grey background with 50% transparency on hover */ background-color: rgba(128, 128, 128, 0.5);
/* This is the grey background with 50% transparency on hover */
} }
.croppie-container .cr-boundary{ .croppie-container .cr-boundary {
border: 2px solid grey; border: 2px solid grey;
} }
#topMenuUserNotifications { #topMenuUserNotifications,
.webui-popover-content {
display: none; display: none;
} }

View file

@ -110,18 +110,21 @@ require_once $global['systemRootPath'] . 'objects/video.php';
display: none; display: none;
} }
.typeFormat{ .typeFormat {
display: flex; display: flex;
margin-bottom: 5px; margin-bottom: 5px;
} }
.typeFormat .tagTitle{
.typeFormat .tagTitle {
width: 40% !important; width: 40% !important;
} }
.typeLabels { .typeLabels {
display: inline-grid; display: inline-grid;
width: 100%; width: 100%;
} }
.typeLabels span{
.typeLabels span {
width: 100% !important; width: 100% !important;
} }
</style> </style>
@ -1900,9 +1903,14 @@ if (empty($advancedCustom->disableHTMLDescription)) {
continue; continue;
} }
var text = row.tags[i].text; var text = row.tags[i].text;
if (typeof row.tags[i].tooltip !== "undefined") { if (typeof row.tags[i].tooltip !== "undefined" && text != row.tags[i].tooltip) {
text += ' ' + row.tags[i].tooltip; text += ' ' + row.tags[i].tooltip;
} }
if (typeof row.tags[i].tooltipIcon !== "undefined") {
text = row.tags[i].tooltipIcon + ' ' + text;
}
tags += "<div class=\"clearfix\"></div><span class='label label-primary tagTitle'>" + row.tags[i].label + ": </span><span class=\"label label-" + row.tags[i].type + " \">" + text + "</span>"; tags += "<div class=\"clearfix\"></div><span class='label label-primary tagTitle'>" + row.tags[i].label + ": </span><span class=\"label label-" + row.tags[i].type + " \">" + text + "</span>";
} }
tags += "<div class=\"clearfix\"></div><span class='label label-primary tagTitle'><?php echo __("Type") . ":"; ?> </span><span class=\"label label-default \">" + row.type + "</span>"; tags += "<div class=\"clearfix\"></div><span class='label label-primary tagTitle'><?php echo __("Type") . ":"; ?> </span><span class=\"label label-default \">" + row.type + "</span>";

View file

@ -249,6 +249,7 @@
$label = __("Not Rated"); $label = __("Not Rated");
} else { } else {
$label = strtoupper($value); $label = strtoupper($value);
$label = "[{$label}] ".Video::$rratingOptionsText[$value];
} }
echo "<option value='{$value}'>" . __($label) . "</option>"; echo "<option value='{$value}'>" . __($label) . "</option>";
} }

View file

@ -46,9 +46,19 @@ $cdnStorageEnabled = !empty($cdnObj) && $cdnObj->enable_storage;
$description = getSEODescription(emptyHTML($video['description']) ? $video['title'] : $video['description']); $description = getSEODescription(emptyHTML($video['description']) ? $video['title'] : $video['description']);
?> ?>
<style>
.showWhenProcessing {
display: none;
}
.processing .showWhenNotProcessing {
display: none;
}
.processing .showWhenProcessing {
display: inline-block;
}
</style>
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-body"> <div class="panel-body">
<?php <?php
@ -201,25 +211,41 @@ $description = getSEODescription(emptyHTML($video['description']) ? $video['titl
<?php <?php
if (!empty($video['id']) && empty($advancedCustom->removeThumbsUpAndDown)) { if (!empty($video['id']) && empty($advancedCustom->removeThumbsUpAndDown)) {
?> ?>
<a href="#" class="faa-parent animated-hover btn btn-default no-outline pull-right <?php echo (@$video['myVote'] == -1) ? "myVote" : "" ?>" id="dislikeBtn" <?php if (!User::isLogged()) { ?> data-toggle="tooltip" title="<?php echo __("Don´t like this video? Sign in to make your opinion count."); ?>" <?php } ?>> <a href="#" class="likedislikebtn faa-parent animated-hover btn btn-default no-outline pull-right
<span class="fa fa-thumbs-down faa-bounce faa-reverse "></span> <small><?php echo $video['dislikes']; ?></small> <?php echo (@$video['myVote'] == -1) ? "myVote" : "" ?>" id="dislikeBtn" <?php if (!User::isLogged()) { ?> data-toggle="tooltip" title="<?php echo __("Don´t like this video? Sign in to make your opinion count."); ?>" <?php } ?>>
<span class="fa fa-thumbs-down faa-bounce faa-reverse "></span>
<small class="showWhenNotProcessing"><?php echo $video['dislikes']; ?></small>
<div class="showWhenProcessing">
<i class="fas fa-spinner fa-spin"></i>
</div>
</a> </a>
<a href="#" class="faa-parent animated-hover btn btn-default no-outline pull-right <?php echo (@$video['myVote'] == 1) ? "myVote" : "" ?>" id="likeBtn" <?php if (!User::isLogged()) { ?> data-toggle="tooltip" title="<?php echo __("Like this video? Sign in to make your opinion count."); ?>" <?php } ?>> <a href="#" class="likedislikebtn faa-parent animated-hover btn btn-default no-outline pull-right
<?php echo (@$video['myVote'] == 1) ? "myVote" : "" ?>" id="likeBtn" <?php if (!User::isLogged()) { ?> data-toggle="tooltip" title="<?php echo __("Like this video? Sign in to make your opinion count."); ?>" <?php } ?>>
<span class="fa fa-thumbs-up faa-bounce"></span> <span class="fa fa-thumbs-up faa-bounce"></span>
<small><?php echo $video['likes']; ?></small> <small class="showWhenNotProcessing"><?php echo $video['likes']; ?></small>
<div class="showWhenProcessing">
<i class="fas fa-spinner fa-spin"></i>
</div>
</a> </a>
<script> <script>
$(document).ready(function() { $(document).ready(function() {
<?php if (User::isLogged()) { ?> <?php if (User::isLogged()) { ?>
$("#dislikeBtn, #likeBtn").click(function() { $(".likedislikebtn").click(function() {
if ($(".likedislikebtn").hasClass("processing")) {
avideoToastError(__('Please wait'));
return false;
}
$(".likedislikebtn").addClass("processing");
var btnId = $(this).attr("id");
$.ajax({ $.ajax({
url: webSiteRootURL + ($(this).attr("id") == "dislikeBtn" ? "dislike" : "like"), url: webSiteRootURL + (btnId == "dislikeBtn" ? "dislike" : "like"),
method: 'POST', method: 'POST',
data: { data: {
'videos_id': <?php echo $video['id']; ?> 'videos_id': <?php echo $video['id']; ?>
}, },
success: function(response) { success: function(response) {
$("#likeBtn, #dislikeBtn").removeClass("myVote"); $(".likedislikebtn").removeClass("processing");
$(".likedislikebtn").removeClass("myVote");
if (response.myVote == 1) { if (response.myVote == 1) {
$("#likeBtn").addClass("myVote"); $("#likeBtn").addClass("myVote");
} else if (response.myVote == -1) { } else if (response.myVote == -1) {
@ -311,7 +337,10 @@ $description = getSEODescription(emptyHTML($video['description']) ? $video['titl
<div class="col-xs-4 col-sm-2 col-lg-2 text-right"><strong><?php echo __("Rating"); ?>:</strong></div> <div class="col-xs-4 col-sm-2 col-lg-2 text-right"><strong><?php echo __("Rating"); ?>:</strong></div>
<div class="col-xs-8 col-sm-10 col-lg-10"> <div class="col-xs-8 col-sm-10 col-lg-10">
<img src="<?php echo getURL('view/rrating/rating-' . $video['rrating'] . '.png'); ?>" class="img img-responsive zoom" style="width:30px;" /> <?php
//echo Video::getRratingIMG($video['rrating'], 'width:30px;');
echo Video::getRratingHTML($video['rrating']);
?>
</div> </div>
<?php <?php

View file

@ -1,6 +1,8 @@
<button class="btn btn-default btn-outline btn-xs btn-sm" onclick="$(this).find('table').slideToggle();" style="position: relative;"> <div>
G <button data-toggle="tooltip" title="<?php echo Video::$rratingOptionsText['g']; ?>" class="btn btn-success btn-outline btn-xs btn-sm" onclick="$(this).find('table').slideToggle();" style="position: relative;">
<table class="table-bordered" style="z-index: 1;border: 2px solid #555; border-radius: 4px; margin: 2px;border-collapse: separate !important; display: none; position: absolute; left: 0;"> G
</button>
<table class="table-bordered bg-warning" style="z-index: 1;border: 2px solid #555; border-radius: 4px; margin: 2px;border-collapse: separate !important; display: none; position: absolute; left: 0;">
<tr> <tr>
<td rowspan="2" style="font-size: 1.5em; font-weight: bold; padding: 1px 2px;">G</td> <td rowspan="2" style="font-size: 1.5em; font-weight: bold; padding: 1px 2px;">G</td>
<td style="font-size: 0.8em; text-align: center; font-weight: bold; padding: 1px 2px;"><?php echo strtoupper(__("General Audiences")); ?></td> <td style="font-size: 0.8em; text-align: center; font-weight: bold; padding: 1px 2px;"><?php echo strtoupper(__("General Audiences")); ?></td>
@ -9,4 +11,4 @@
<td style="font-size: 0.8em; text-align: center; padding: 1px 2px;"><?php echo strtoupper(__("All Ages Admitted")); ?></td> <td style="font-size: 0.8em; text-align: center; padding: 1px 2px;"><?php echo strtoupper(__("All Ages Admitted")); ?></td>
</tr> </tr>
</table> </table>
</button> </div>

View file

@ -1,9 +1,11 @@
<button class="btn btn-default btn-outline btn-xs btn-sm" onclick="$(this).find('table').slideToggle();" style="position: relative;"> <div>
MA <button data-toggle="tooltip" title="<?php echo Video::$rratingOptionsText['ma']; ?>" class="btn btn-danger btn-outline btn-xs btn-sm" onclick="$(this).find('table').slideToggle();" style="position: relative;">
<table class="table-bordered" style="z-index: 1;border: 2px solid #555; border-radius: 4px; margin: 2px;border-collapse: separate !important; display: none; position: absolute; left: 0;"> MA
</button>
<table class="table-bordered bg-warning" style="z-index: 1;border: 2px solid #555; border-radius: 4px; margin: 2px;border-collapse: separate !important; display: none; position: absolute; left: 0;">
<tr> <tr>
<td style="font-size: 1.5em; text-align: center; font-weight: bold; padding: 1px 2px;">MA</td> <td style="font-size: 1.5em; text-align: center; font-weight: bold; padding: 1px 2px;">MA</td>
<td style="font-size: 0.8em; text-align: center; font-weight: bold; padding: 1px 2px;"><?php echo strtoupper(__("For mature audiences")); ?></td> <td style="font-size: 0.8em; text-align: center; font-weight: bold; padding: 1px 2px;"><?php echo strtoupper(__("For mature audiences")); ?></td>
</tr> </tr>
</table> </table>
</button> </div>

View file

@ -1,9 +1,11 @@
<button class="btn btn-default btn-outline btn-xs btn-sm" onclick="$(this).find('table').slideToggle();" style="position: relative;"> <div>
NC-17 <button data-toggle="tooltip" title="<?php echo Video::$rratingOptionsText['nc-17']; ?>" class="btn btn-danger btn-outline btn-xs btn-sm" onclick="$(this).find('table').slideToggle();" style="position: relative;">
<table class="table-bordered" style="z-index: 1;border: 2px solid #555; border-radius: 4px; margin: 2px;border-collapse: separate !important; display: none; position: absolute; left: 0;"> NC-17
</button>
<table class="table-bordered bg-warning" style="z-index: 1;border: 2px solid #555; border-radius: 4px; margin: 2px;border-collapse: separate !important; display: none; position: absolute; left: 0;">
<tr> <tr>
<td style="font-size: 1.5em; text-align: center; font-weight: bold; padding: 1px 2px;">NC-17</td> <td style="font-size: 1.5em; text-align: center; font-weight: bold; padding: 1px 2px;">NC-17</td>
<td style="font-size: 0.8em; text-align: center; font-weight: bold; padding: 1px 2px;"><?php echo strtoupper(__("No one 17 and under admitted")); ?></td> <td style="font-size: 0.8em; text-align: center; font-weight: bold; padding: 1px 2px;"><?php echo strtoupper(__("No one 17 and under admitted")); ?></td>
</tr> </tr>
</table> </table>
</button> </div>

View file

@ -1,6 +1,8 @@
<button class="btn btn-default btn-outline btn-xs btn-sm" onclick="$(this).find('table').slideToggle();" style="position: relative;"> <div>
PG-13 <button data-toggle="tooltip" title="<?php echo Video::$rratingOptionsText['pg-13']; ?>" class="btn btn-warning btn-outline btn-xs btn-sm" onclick="$(this).parent().find('table').slideToggle();" style="position: relative;">
<table class="table-bordered" style="z-index: 1;border: 2px solid #555; border-radius: 4px; margin: 2px;border-collapse: separate !important; display: none; position: absolute; left: 0;"> PG-13
</button>
<table class="table-bordered bg-warning" style="z-index: 1;border: 2px solid #555; border-radius: 4px; margin: 2px;border-collapse: separate !important; display: none; position: absolute; left: 0;">
<tr> <tr>
<td style="font-size: 1.5em; text-align: center; font-weight: bold; padding: 1px 2px;">PG-13</td> <td style="font-size: 1.5em; text-align: center; font-weight: bold; padding: 1px 2px;">PG-13</td>
<td style="font-size: 0.8em; text-align: center; font-weight: bold; padding: 1px 2px;"><?php echo strtoupper(__("Parental Guidance Suggested")); ?></td> <td style="font-size: 0.8em; text-align: center; font-weight: bold; padding: 1px 2px;"><?php echo strtoupper(__("Parental Guidance Suggested")); ?></td>
@ -9,4 +11,4 @@
<td colspan="2" style="font-size: 0.7em; text-align: center; padding: 1px 2px;"><?php echo strtoupper(__("Some material may not be inapropriate for children under 13")); ?></td> <td colspan="2" style="font-size: 0.7em; text-align: center; padding: 1px 2px;"><?php echo strtoupper(__("Some material may not be inapropriate for children under 13")); ?></td>
</tr> </tr>
</table> </table>
</button> </div>

View file

@ -1,6 +1,8 @@
<button class="btn btn-default btn-outline btn-xs btn-sm" onclick="$(this).find('table').slideToggle();" style="position: relative;"> <div>
PG <button data-toggle="tooltip" title="<?php echo Video::$rratingOptionsText['pg']; ?>" class="btn btn-warning btn-outline btn-xs btn-sm" onclick="$(this).find('table').slideToggle();" style="position: relative;">
<table class="table-bordered" style="z-index: 1;border: 2px solid #555; border-radius: 4px; margin: 2px;border-collapse: separate !important; display: none; position: absolute; left: 0;"> PG
</button>
<table class="table-bordered bg-warning" style="z-index: 1;border: 2px solid #555; border-radius: 4px; margin: 2px;border-collapse: separate !important; display: none; position: absolute; left: 0;">
<tr> <tr>
<td style="font-size: 1.5em; text-align: center; font-weight: bold; padding: 1px 2px;">PG</td> <td style="font-size: 1.5em; text-align: center; font-weight: bold; padding: 1px 2px;">PG</td>
<td style="font-size: 0.8em; text-align: center; font-weight: bold; padding: 1px 2px;"><?php echo strtoupper(__("Parental Guidance Suggested")); ?></td> <td style="font-size: 0.8em; text-align: center; font-weight: bold; padding: 1px 2px;"><?php echo strtoupper(__("Parental Guidance Suggested")); ?></td>
@ -9,4 +11,4 @@
<td colspan="2" style="font-size: 0.7em; text-align: center; padding: 1px 2px;"><?php echo strtoupper(__("Some material may not be suitable for children")); ?></td> <td colspan="2" style="font-size: 0.7em; text-align: center; padding: 1px 2px;"><?php echo strtoupper(__("Some material may not be suitable for children")); ?></td>
</tr> </tr>
</table> </table>
</button> </div>

View file

@ -1,6 +1,8 @@
<button class="btn btn-default btn-outline btn-xs btn-sm" onclick="$(this).find('table').slideToggle();" style="position: relative;"> <div>
R <button data-toggle="tooltip" title="<?php echo Video::$rratingOptionsText['r']; ?>" class="btn btn-danger btn-outline btn-xs btn-sm" onclick="$(this).find('table').slideToggle();" style="position: relative;">
<table class="table-bordered" style="z-index: 1;border: 2px solid #555; border-radius: 4px; margin: 2px;border-collapse: separate !important; display: none; position: absolute; left: 0;"> R
</button>
<table class="table-bordered bg-warning" style="z-index: 1;border: 2px solid #555; border-radius: 4px; margin: 2px;border-collapse: separate !important; display: none; position: absolute; left: 0;">
<tr> <tr>
<td style="font-size: 1.5em; text-align: center; font-weight: bold; padding: 1px 2px;">R</td> <td style="font-size: 1.5em; text-align: center; font-weight: bold; padding: 1px 2px;">R</td>
<td style="font-size: 0.8em; text-align: center; font-weight: bold; padding: 1px 2px;"><?php echo strtoupper(__("Restricted")); ?></td> <td style="font-size: 0.8em; text-align: center; font-weight: bold; padding: 1px 2px;"><?php echo strtoupper(__("Restricted")); ?></td>
@ -9,4 +11,4 @@
<td colspan="2" style="font-size: 0.7em; text-align: center; padding: 1px 2px;"><?php echo strtoupper(__("Under 17 requires accompanying parent or adult guardian")); ?></td> <td colspan="2" style="font-size: 0.7em; text-align: center; padding: 1px 2px;"><?php echo strtoupper(__("Under 17 requires accompanying parent or adult guardian")); ?></td>
</tr> </tr>
</table> </table>
</button> </div>