1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 17:59:55 +02:00
Improves PHP code style normalisation to reduce inconsistency, refactors
and simplifies some PHP code, slightly beautifies some CSS code.
This commit is contained in:
Caleb Mazalevskis 2017-09-16 16:40:55 +08:00
parent a6ad438fc5
commit 40ecbd28d4
93 changed files with 986 additions and 1056 deletions

View file

@ -56,5 +56,7 @@ function getEnabledLangs() {
function textToLink($string) { function textToLink($string) {
return preg_replace( return preg_replace(
"~[[:alpha:]]+://[^<>[:space:]'\"]+[[:alnum:]/]~", "<a href=\"\\0\">\\0</a>", $string); "~[[:alpha:]]+://[^<>[:space:]'\"]+[[:alnum:]/]~", "<a href=\"\\0\">\\0</a>",
$string
);
} }

View file

@ -1,5 +1,4 @@
<?php <?php
abstract class Object{ abstract class Object{
abstract static protected function getTableName(); abstract static protected function getTableName();
@ -16,7 +15,6 @@ abstract class Object{
return true; return true;
} }
function __construct($id) { function __construct($id) {
if (!empty($id)) { if (!empty($id)) {
// get data from id // get data from id
@ -55,7 +53,6 @@ abstract class Object{
return $rows; return $rows;
} }
static function getTotal() { static function getTotal() {
//will receive //will receive
//current=1&rowCount=10&sort[sender]=asc&searchPhrase= //current=1&rowCount=10&sort[sender]=asc&searchPhrase=
@ -182,4 +179,3 @@ abstract class Object{
return $rows; return $rows;
} }
} }

View file

@ -1,5 +1,4 @@
<?php <?php
class BootGrid { class BootGrid {
static function getSqlFromPost($searchFieldsNames = array(), $keyPrefix = "") { static function getSqlFromPost($searchFieldsNames = array(), $keyPrefix = "") {
@ -45,6 +44,4 @@ class BootGrid {
return $sql; return $sql;
} }
} }

View file

@ -1,7 +1,6 @@
<?php <?php
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'] . 'videos/configuration.php'; require_once $global['systemRootPath'] . 'videos/configuration.php';
class Captcha{ class Captcha{
@ -20,19 +19,28 @@ class Captcha{
public function getCaptchaImage() { public function getCaptchaImage() {
global $global; global $global;
header("Content-type: image/jpeg"); header('Content-type: image/jpeg');
$imagem = imagecreate($this->largura,$this->altura); // define a largura e a altura da imagem $imagem = imagecreate($this->largura,$this->altura); // define a largura e a altura da imagem
$fonte = $global['systemRootPath'] . "objects/monof55.ttf"; //voce deve ter essa ou outra fonte de sua preferencia em sua pasta $fonte = $global['systemRootPath'] . 'objects/monof55.ttf'; //voce deve ter essa ou outra fonte de sua preferencia em sua pasta
$preto = imagecolorallocate($imagem, 0, 0, 0); // define a cor preta $preto = imagecolorallocate($imagem, 0, 0, 0); // define a cor preta
$branco = imagecolorallocate($imagem, 255, 255, 255); // define a cor branca $branco = imagecolorallocate($imagem, 255, 255, 255); // define a cor branca
// define a palavra conforme a quantidade de letras definidas no parametro $quantidade_letras // define a palavra conforme a quantidade de letras definidas no parametro $quantidade_letras
//$letters = "AaBbCcDdEeFfGgHhIiJjKkLlMmNnPpQqRrSsTtUuVvYyXxWwZz23456789"; //$letters = 'AaBbCcDdEeFfGgHhIiJjKkLlMmNnPpQqRrSsTtUuVvYyXxWwZz23456789';
$letters = "AaBbCcDdEeFfGgHhIiJjKkLlMmNnPpQqRrSsTtUuVvYyXxWwZz23456789"; $letters = 'AaBbCcDdEeFfGgHhIiJjKkLlMmNnPpQqRrSsTtUuVvYyXxWwZz23456789';
$palavra = substr(str_shuffle($letters), 0, ($this->quantidade_letras)); $palavra = substr(str_shuffle($letters), 0, ($this->quantidade_letras));
$_SESSION["palavra"] = $palavra; // atribui para a sessao a palavra gerada $_SESSION["palavra"] = $palavra; // atribui para a sessao a palavra gerada
for ($i = 1; $i <= $this->quantidade_letras; $i++) { for ($i = 1; $i <= $this->quantidade_letras; $i++) {
imagettftext($imagem,$this->tamanho_fonte,rand(-10,10),($this->tamanho_fonte*$i),($this->tamanho_fonte + 10),$branco,$fonte,substr($palavra,($i-1),1)); // atribui as letras a imagem imagettftext(
$imagem,
$this->tamanho_fonte,
rand(-10, 10),
($this->tamanho_fonte*$i),
($this->tamanho_fonte + 10),
$branco,
$fonte,
substr($palavra, ($i - 1), 1)
); // atribui as letras a imagem
} }
imagejpeg($imagem); // gera a imagem imagejpeg($imagem); // gera a imagem
imagedestroy($imagem); // limpa a imagem da memoria imagedestroy($imagem); // limpa a imagem da memoria
@ -42,12 +50,7 @@ class Captcha{
if (session_status() == PHP_SESSION_NONE) { if (session_status() == PHP_SESSION_NONE) {
session_start(); session_start();
} }
if (strcasecmp($word, $_SESSION["palavra"])==0){ return (strcasecmp($word, $_SESSION["palavra"]) == 0);
return true;
}else{
return false;
}
} }
} }

View file

@ -1,5 +1,4 @@
<?php <?php
require_once 'category.php'; require_once 'category.php';
header('Content-Type: application/json'); header('Content-Type: application/json');
$categories = Category::getAllCategories(); $categories = Category::getAllCategories();

View file

@ -1,7 +1,6 @@
<?php <?php
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'] . 'videos/configuration.php'; require_once $global['systemRootPath'] . 'videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/bootGrid.php'; require_once $global['systemRootPath'] . 'objects/bootGrid.php';
@ -23,7 +22,7 @@ class Category {
$this->clean_name = $clean_name; $this->clean_name = $clean_name;
} }
function __construct($id, $name = "") { function __construct($id, $name = '') {
if (empty($id)) { if (empty($id)) {
// get the category data from category and pass // get the category data from category and pass
$this->name = $name; $this->name = $name;
@ -87,12 +86,7 @@ class Category {
$id = intval($id); $id = intval($id);
$sql = "SELECT * FROM categories WHERE id = $id LIMIT 1"; $sql = "SELECT * FROM categories WHERE id = $id LIMIT 1";
$res = $global['mysqli']->query($sql); $res = $global['mysqli']->query($sql);
if ($res) { return ($res) ? $res->fetch_assoc() : false;
$category = $res->fetch_assoc();
} else {
$category = false;
}
return $category;
} }
static function getAllCategories() { static function getAllCategories() {
@ -118,12 +112,10 @@ class Category {
static function getTotalCategories() { static function getTotalCategories() {
global $global; global $global;
$sql = "SELECT id FROM categories WHERE 1=1 "; $sql = "SELECT id FROM categories WHERE 1=1 ";
$sql .= BootGrid::getSqlSearchFromPost(array('name')); $sql .= BootGrid::getSqlSearchFromPost(array('name'));
$res = $global['mysqli']->query($sql); $res = $global['mysqli']->query($sql);
return $res->num_rows; return $res->num_rows;
} }

View file

@ -1,8 +1,7 @@
<?php <?php
header('Content-Type: application/json'); header('Content-Type: application/json');
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'] . 'videos/configuration.php'; require_once $global['systemRootPath'] . 'videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php'; require_once $global['systemRootPath'] . 'objects/user.php';

View file

@ -1,7 +1,7 @@
<?php <?php
header('Content-Type: application/json'); header('Content-Type: application/json');
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'].'videos/configuration.php'; require_once $global['systemRootPath'].'videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php'; require_once $global['systemRootPath'] . 'objects/user.php';

View file

@ -1,6 +1,6 @@
<?php <?php
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'] . 'videos/configuration.php'; require_once $global['systemRootPath'] . 'videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/bootGrid.php'; require_once $global['systemRootPath'] . 'objects/bootGrid.php';
@ -77,12 +77,7 @@ class Comment{
$id = intval($id); $id = intval($id);
$sql = "SELECT * FROM comments WHERE id = $id LIMIT 1"; $sql = "SELECT * FROM comments WHERE id = $id LIMIT 1";
$res = $global['mysqli']->query($sql); $res = $global['mysqli']->query($sql);
if ($res) { return ($res) ? $res->fetch_assoc() : false;
$comment = $res->fetch_assoc();
} else {
$comment = false;
}
return $comment;
} }
static function getAllComments($videoId = 0) { static function getAllComments($videoId = 0) {
@ -116,14 +111,11 @@ class Comment{
if (!empty($videoId)) { if (!empty($videoId)) {
$sql .= " AND videos_id = {$videoId} "; $sql .= " AND videos_id = {$videoId} ";
} }
$sql .= BootGrid::getSqlSearchFromPost(array('name')); $sql .= BootGrid::getSqlSearchFromPost(array('name'));
$res = $global['mysqli']->query($sql); $res = $global['mysqli']->query($sql);
return $res->num_rows; return $res->num_rows;
} }
} }

View file

@ -1,7 +1,7 @@
<?php <?php
header('Content-Type: application/json'); header('Content-Type: application/json');
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'] . 'videos/configuration.php'; require_once $global['systemRootPath'] . 'videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php'; require_once $global['systemRootPath'] . 'objects/user.php';

View file

@ -11,5 +11,4 @@ foreach ($comments as $key => $value) {
$comments[$key]['comment'] = '<div class="pull-left"><img src="'.User::getPhoto($value['users_id']).'" alt="" class="img img-responsive img-circle" style="max-width: 50px;"/></div><div class="commentDetails"><div class="commenterName"><strong>'.$name.'</strong> <small>'.humanTiming(strtotime($value['created'])).'</small></div>'. nl2br(textToLink($value['comment'])).'</div>'; $comments[$key]['comment'] = '<div class="pull-left"><img src="'.User::getPhoto($value['users_id']).'" alt="" class="img img-responsive img-circle" style="max-width: 50px;"/></div><div class="commentDetails"><div class="commenterName"><strong>'.$name.'</strong> <small>'.humanTiming(strtotime($value['created'])).'</small></div>'. nl2br(textToLink($value['comment'])).'</div>';
} }
echo '{ "current": '.$_POST['current'].',"rowCount": '.$_POST['rowCount'].', "total": '.$total.', "rows":'. json_encode($comments).'}'; echo '{ "current": '.$_POST['current'].',"rowCount": '.$_POST['rowCount'].', "total": '.$total.', "rows":'. json_encode($comments).'}';

View file

@ -1,7 +1,6 @@
<?php <?php
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'] . 'videos/configuration.php'; require_once $global['systemRootPath'] . 'videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php'; require_once $global['systemRootPath'] . 'objects/user.php';

View file

@ -2,7 +2,7 @@
header('Content-Type: application/json'); header('Content-Type: application/json');
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'] . 'objects/user.php'; require_once $global['systemRootPath'] . 'objects/user.php';
if (!User::isAdmin()) { if (!User::isAdmin()) {

View file

@ -1,5 +1,4 @@
<?php <?php
// Returns a file size limit in bytes based on the PHP upload_max_filesize // Returns a file size limit in bytes based on the PHP upload_max_filesize
// and post_max_size // and post_max_size
function file_upload_max_size() { function file_upload_max_size() {

View file

@ -1,11 +1,10 @@
<?php <?php
require_once 'captcha.php'; require_once 'captcha.php';
$largura = empty($_GET["l"])?120:$_GET["l"]; // recebe a largura $largura = empty($_GET['l']) ? 120 : $_GET['l']; // recebe a largura
$altura = empty($_GET["a"])?40:$_GET["a"]; // recebe a altura $altura = empty($_GET['a']) ? 40 : $_GET['a']; // recebe a altura
$tamanho_fonte = empty($_GET["tf"])?18:$_GET["tf"]; // recebe o tamanho da fonte $tamanho_fonte = empty($_GET['tf']) ? 18 : $_GET['tf']; // recebe o tamanho da fonte
$quantidade_letras = empty($_GET["ql"])?5:$_GET["ql"]; // recebe a quantidade de letras que o captcha terá $quantidade_letras = empty($_GET['ql']) ? 5 : $_GET['ql']; // recebe a quantidade de letras que o captcha terá
$capcha = new Captcha($largura, $altura, $tamanho_fonte, $quantidade_letras); $capcha = new Captcha($largura, $altura, $tamanho_fonte, $quantidade_letras);
$capcha->getCaptchaImage(); $capcha->getCaptchaImage();
?>

View file

@ -3,7 +3,6 @@ ini_set('error_log', $global['systemRootPath'].'videos/youphptube.log');
global $global; global $global;
global $config; global $config;
$global['mysqli'] = new mysqli($mysqlHost, $mysqlUser,$mysqlPass,$mysqlDatabase,@$mysqlPort); $global['mysqli'] = new mysqli($mysqlHost, $mysqlUser,$mysqlPass,$mysqlDatabase,@$mysqlPort);
$now = new DateTime(); $now = new DateTime();

View file

@ -1,6 +1,6 @@
<?php <?php
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'].'videos/configuration.php'; require_once $global['systemRootPath'].'videos/configuration.php';
require_once $global['systemRootPath'].'objects/user.php'; require_once $global['systemRootPath'].'objects/user.php';
@ -36,8 +36,9 @@ class Like{
private function load() { private function load() {
$like = $this->getLike(); $like = $this->getLike();
if (empty($like)) if (empty($like)) {
return false; return false;
}
foreach ($like as $key => $value) { foreach ($like as $key => $value) {
$this->$key = $value; $this->$key = $value;
} }
@ -51,11 +52,7 @@ class Like{
} }
$sql = "SELECT * FROM likes WHERE users_id = $this->users_id AND videos_id = $this->videos_id LIMIT 1"; $sql = "SELECT * FROM likes WHERE users_id = $this->users_id AND videos_id = $this->videos_id LIMIT 1";
$res = $global['mysqli']->query($sql); $res = $global['mysqli']->query($sql);
if ($res) { return ($res) ? $res->fetch_assoc() : false;
return $res->fetch_assoc();
} else {
return false;
}
} }
private function save() { private function save() {
@ -88,21 +85,19 @@ class Like{
$sql = "SELECT count(*) as total FROM likes WHERE videos_id = {$videos_id} AND `like` = 1 "; // like $sql = "SELECT count(*) as total FROM likes WHERE videos_id = {$videos_id} AND `like` = 1 "; // like
$res = $global['mysqli']->query($sql); $res = $global['mysqli']->query($sql);
if ($res) { if (!$res) {
$row = $res->fetch_assoc();
$obj->likes = intval($row['total']);
} else {
die($sql . '\nError : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error); die($sql . '\nError : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error);
} }
$row = $res->fetch_assoc();
$obj->likes = intval($row['total']);
$sql = "SELECT count(*) as total FROM likes WHERE videos_id = {$videos_id} AND `like` = -1 "; // dislike $sql = "SELECT count(*) as total FROM likes WHERE videos_id = {$videos_id} AND `like` = -1 "; // dislike
$res = $global['mysqli']->query($sql); $res = $global['mysqli']->query($sql);
if ($res) { if (!$res) {
$row = $res->fetch_assoc();
$obj->dislikes = intval($row['total']);
} else {
die($sql.'\nError : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error); die($sql.'\nError : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error);
} }
$row = $res->fetch_assoc();
$obj->dislikes = intval($row['total']);
return $obj; return $obj;
} }
@ -116,9 +111,8 @@ class Like{
$res = $global['mysqli']->query($sql); $res = $global['mysqli']->query($sql);
if ($row = $res->fetch_assoc()) { if ($row = $res->fetch_assoc()) {
return intval($row['like']); return intval($row['like']);
}else{
return 0;
} }
return 0;
} }
} }

View file

@ -1,7 +1,7 @@
<?php <?php
header('Content-Type: application/json'); header('Content-Type: application/json');
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'] . 'videos/configuration.php'; require_once $global['systemRootPath'] . 'videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/hybridauth/autoload.php'; require_once $global['systemRootPath'] . 'objects/hybridauth/autoload.php';

View file

@ -1,6 +1,6 @@
<?php <?php
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'].'videos/configuration.php'; require_once $global['systemRootPath'].'videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php'; require_once $global['systemRootPath'] . 'objects/user.php';

View file

@ -1,5 +1,4 @@
<?php <?php
class Main { class Main {
/** /**
* receive a YYYY-MM-DD * receive a YYYY-MM-DD
@ -7,7 +6,7 @@ class Main{
* @return String dd/mm/yyyy * @return String dd/mm/yyyy
*/ */
static public function dateMySQLToBrString($mySqlDate) { static public function dateMySQLToBrString($mySqlDate) {
$parts = explode("-", $mySqlDate); $parts = explode('-', $mySqlDate);
//switch month and day //switch month and day
if (empty($parts[2])) { if (empty($parts[2])) {
return $mySqlDate; return $mySqlDate;

View file

@ -40,5 +40,4 @@ if (!$mail->send()) {
$obj->success = __("Message sent"); $obj->success = __("Message sent");
} }
echo json_encode($obj); echo json_encode($obj);

View file

@ -1,7 +1,7 @@
<?php <?php
header('Content-Type: application/json'); header('Content-Type: application/json');
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'] . 'videos/configuration.php'; require_once $global['systemRootPath'] . 'videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php'; require_once $global['systemRootPath'] . 'objects/user.php';

View file

@ -1,7 +1,6 @@
<?php <?php
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'] . 'videos/configuration.php'; require_once $global['systemRootPath'] . 'videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php'; require_once $global['systemRootPath'] . 'objects/user.php';

View file

@ -2,7 +2,7 @@
header('Content-Type: application/json'); header('Content-Type: application/json');
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'] . 'videos/configuration.php'; require_once $global['systemRootPath'] . 'videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php'; require_once $global['systemRootPath'] . 'objects/user.php';

View file

@ -1,7 +1,7 @@
<?php <?php
header('Content-Type: application/json'); header('Content-Type: application/json');
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'] . 'videos/configuration.php'; require_once $global['systemRootPath'] . 'videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php'; require_once $global['systemRootPath'] . 'objects/user.php';

View file

@ -1,7 +1,7 @@
<?php <?php
header('Content-Type: application/json'); header('Content-Type: application/json');
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'] . 'videos/configuration.php'; require_once $global['systemRootPath'] . 'videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php'; require_once $global['systemRootPath'] . 'objects/user.php';

View file

@ -1,7 +1,7 @@
<?php <?php
header('Content-Type: application/json'); header('Content-Type: application/json');
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'] . 'videos/configuration.php'; require_once $global['systemRootPath'] . 'videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php'; require_once $global['systemRootPath'] . 'objects/user.php';

View file

@ -1,6 +1,6 @@
<?php <?php
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'] . 'videos/configuration.php'; require_once $global['systemRootPath'] . 'videos/configuration.php';
require_once 'functions.php'; require_once 'functions.php';

View file

@ -1,5 +1,4 @@
<?php <?php
require_once 'subscribe.php'; require_once 'subscribe.php';
header('Content-Type: application/json'); header('Content-Type: application/json');
$obj = new stdClass(); $obj = new stdClass();

View file

@ -1,7 +1,6 @@
<?php <?php
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'] . 'videos/configuration.php'; require_once $global['systemRootPath'] . 'videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/bootGrid.php'; require_once $global['systemRootPath'] . 'objects/bootGrid.php';

View file

@ -1,5 +1,4 @@
<?php <?php
require_once 'subscribe.php'; require_once 'subscribe.php';
if (!User::isLogged()) { if (!User::isLogged()) {
return false; return false;

View file

@ -8,7 +8,7 @@ require_once $global['systemRootPath'] . 'objects/video.php';
$obj = new stdClass(); $obj = new stdClass();
$obj->error = true; $obj->error = true;
if (!User::canUpload()) { if (!User::canUpload()) {
$obj->msg = "Only logged users can file_dataoad"; $obj->msg = 'Only logged users can file_dataoad';
die(json_encode($obj)); die(json_encode($obj));
} }
header('Content-Type: application/json'); header('Content-Type: application/json');

View file

@ -1,7 +1,6 @@
<?php <?php
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'] . 'videos/configuration.php'; require_once $global['systemRootPath'] . 'videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/bootGrid.php'; require_once $global['systemRootPath'] . 'objects/bootGrid.php';
@ -123,7 +122,6 @@ class User {
} }
} elseif (self::isLogged()) { } elseif (self::isLogged()) {
$photo = $_SESSION['user']['photoURL']; $photo = $_SESSION['user']['photoURL'];
} }
if (preg_match("/videos\/userPhoto\/.*/", $photo)) { if (preg_match("/videos\/userPhoto\/.*/", $photo)) {
$photo = $global['webSiteRootURL'].$photo; $photo = $global['webSiteRootURL'].$photo;
@ -516,6 +514,4 @@ class User {
$this->backgroundURL = strip_tags($backgroundURL); $this->backgroundURL = strip_tags($backgroundURL);
} }
} }

View file

@ -1,7 +1,7 @@
<?php <?php
header('Content-Type: application/json'); header('Content-Type: application/json');
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'] . 'videos/configuration.php'; require_once $global['systemRootPath'] . 'videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php'; require_once $global['systemRootPath'] . 'objects/user.php';

View file

@ -1,7 +1,7 @@
<?php <?php
header('Content-Type: application/json'); header('Content-Type: application/json');
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'] . 'videos/configuration.php'; require_once $global['systemRootPath'] . 'videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php'; require_once $global['systemRootPath'] . 'objects/user.php';

View file

@ -1,7 +1,7 @@
<?php <?php
header('Content-Type: application/json'); header('Content-Type: application/json');
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'] . 'videos/configuration.php'; require_once $global['systemRootPath'] . 'videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php'; require_once $global['systemRootPath'] . 'objects/user.php';

View file

@ -1,5 +1,4 @@
<?php <?php
require_once 'userGroups.php.php'; require_once 'userGroups.php.php';
header('Content-Type: application/json'); header('Content-Type: application/json');
$rows = UserGroups::getAllUsersGroups(); $rows = UserGroups::getAllUsersGroups();

View file

@ -1,7 +1,6 @@
<?php <?php
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'] . 'videos/configuration.php'; require_once $global['systemRootPath'] . 'videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/bootGrid.php'; require_once $global['systemRootPath'] . 'objects/bootGrid.php';

View file

@ -1,8 +1,7 @@
<?php <?php
header('Content-Type: application/json'); header('Content-Type: application/json');
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'] . 'videos/configuration.php'; require_once $global['systemRootPath'] . 'videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php'; require_once $global['systemRootPath'] . 'objects/user.php';

View file

@ -1,7 +1,7 @@
<?php <?php
header('Content-Type: application/json'); header('Content-Type: application/json');
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'] . 'videos/configuration.php'; require_once $global['systemRootPath'] . 'videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php'; require_once $global['systemRootPath'] . 'objects/user.php';

View file

@ -1,6 +1,6 @@
<?php <?php
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'] . 'videos/configuration.php'; require_once $global['systemRootPath'] . 'videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php'; require_once $global['systemRootPath'] . 'objects/user.php';

View file

@ -1,7 +1,7 @@
<?php <?php
header('Content-Type: application/json'); header('Content-Type: application/json');
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'] . 'videos/configuration.php'; require_once $global['systemRootPath'] . 'videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php'; require_once $global['systemRootPath'] . 'objects/user.php';

View file

@ -1,7 +1,7 @@
<?php <?php
header('Content-Type: application/json'); header('Content-Type: application/json');
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'] . 'videos/configuration.php'; require_once $global['systemRootPath'] . 'videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php'; require_once $global['systemRootPath'] . 'objects/user.php';
@ -49,4 +49,3 @@ $user->setBackgroundURL($photoURL);
$user->save(); $user->save();
User::updateSessionInfo(); User::updateSessionInfo();
print json_encode($response); print json_encode($response);
?>

View file

@ -1,8 +1,7 @@
<?php <?php
header('Content-Type: application/json'); header('Content-Type: application/json');
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'] . 'videos/configuration.php'; require_once $global['systemRootPath'] . 'videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php'; require_once $global['systemRootPath'] . 'objects/user.php';
@ -50,4 +49,3 @@ $user->setPhotoURL($photoURL);
$user->save(); $user->save();
User::updateSessionInfo(); User::updateSessionInfo();
print json_encode($response); print json_encode($response);
?>

View file

@ -1,7 +1,7 @@
<?php <?php
header('Content-Type: application/json'); header('Content-Type: application/json');
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'].'videos/configuration.php'; require_once $global['systemRootPath'].'videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php'; require_once $global['systemRootPath'] . 'objects/user.php';

View file

@ -1,7 +1,6 @@
<?php <?php
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'] . 'videos/configuration.php'; require_once $global['systemRootPath'] . 'videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php'; require_once $global['systemRootPath'] . 'objects/user.php';

View file

@ -1,7 +1,6 @@
<?php <?php
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'].'videos/configuration.php'; require_once $global['systemRootPath'].'videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/userGroups.php'; require_once $global['systemRootPath'] . 'objects/userGroups.php';

View file

@ -294,7 +294,11 @@ class Video {
$sql .= " ORDER BY v.Created DESC "; $sql .= " ORDER BY v.Created DESC ";
} }
$sql .= " LIMIT 1"; $sql .= " LIMIT 1";
//if(!empty($random))echo "<hr>".$sql; /*
if (!empty($random)) {
echo '<hr />'.$sql;
}
*/
$res = $global['mysqli']->query($sql); $res = $global['mysqli']->query($sql);
if ($res) { if ($res) {
require_once 'userGroups.php'; require_once 'userGroups.php';
@ -622,11 +626,11 @@ class Video {
return "00:00:00"; return "00:00:00";
} else { } else {
$duration = $durationParts[0]; $duration = $durationParts[0];
$durationParts = explode(":", $duration); $durationParts = explode(':', $duration);
if (count($durationParts) == 1) { if (count($durationParts) == 1) {
return "0:00:".static::addZero($durationParts[0]); return '0:00:'.static::addZero($durationParts[0]);
} elseif (count($durationParts) == 2) { } elseif (count($durationParts) == 2) {
return "0:".static::addZero($durationParts[0]).":".static::addZero($durationParts[1]); return '0:'.static::addZero($durationParts[0]).':'.static::addZero($durationParts[1]);
} }
return $duration; return $duration;
} }
@ -634,16 +638,15 @@ class Video {
static private function addZero($str) { static private function addZero($str) {
if (intval($str) < 10) { if (intval($str) < 10) {
return "0".intval($str); return '0'.intval($str);
}else{ }
return $str; return $str;
} }
}
static function getItemPropDuration($duration = "") { static function getItemPropDuration($duration = '') {
$duration = static::getCleanDuration($duration); $duration = static::getCleanDuration($duration);
$parts = explode(":", $duration); $parts = explode(':', $duration);
return "PT" . intval($parts[0]) . "H" . intval($parts[1]) . "M" . intval($parts[2]) . "S"; return 'PT' . intval($parts[0]) . 'H' . intval($parts[1]) . 'M' . intval($parts[2]) . 'S';
} }

View file

@ -1,7 +1,7 @@
<?php <?php
header('Content-Type: application/json'); header('Content-Type: application/json');
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'] . 'videos/configuration.php'; require_once $global['systemRootPath'] . 'videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php'; require_once $global['systemRootPath'] . 'objects/user.php';

View file

@ -1,7 +1,7 @@
<?php <?php
header('Content-Type: application/json'); header('Content-Type: application/json');
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'].'videos/configuration.php'; require_once $global['systemRootPath'].'videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php'; require_once $global['systemRootPath'] . 'objects/user.php';

View file

@ -1,9 +1,7 @@
<?php <?php
header('Content-Type: application/json'); header('Content-Type: application/json');
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'] . 'videos/configuration.php'; require_once $global['systemRootPath'] . 'videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php'; require_once $global['systemRootPath'] . 'objects/user.php';
@ -45,4 +43,3 @@ if (file_exists($fileName)) {
$obj2->message = __("The original file for this video does not exists anymore"); $obj2->message = __("The original file for this video does not exists anymore");
echo json_encode($obj2); echo json_encode($obj2);
} }

View file

@ -1,7 +1,7 @@
<?php <?php
header('Content-Type: application/json'); header('Content-Type: application/json');
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'].'videos/configuration.php'; require_once $global['systemRootPath'].'videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php'; require_once $global['systemRootPath'] . 'objects/user.php';

View file

@ -1,8 +1,7 @@
<?php <?php
header('Content-Type: application/json'); header('Content-Type: application/json');
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'] .'videos/configuration.php'; require_once $global['systemRootPath'] .'videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php'; require_once $global['systemRootPath'] . 'objects/user.php';

View file

@ -1,7 +1,7 @@
<?php <?php
header('Content-Type: application/json'); header('Content-Type: application/json');
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'] . 'videos/configuration.php'; require_once $global['systemRootPath'] . 'videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php'; require_once $global['systemRootPath'] . 'objects/user.php';

View file

@ -55,7 +55,7 @@ class Video_ad {
die('{"error":"' . __("Permission denied") . '"}'); die('{"error":"' . __("Permission denied") . '"}');
} }
if (empty($this->starts)) { if (empty($this->starts)) {
$this->starts = date("Y-m-d h:i:s"); $this->starts = date('Y-m-d h:i:s');
} }
if (empty($this->ad_title)) { if (empty($this->ad_title)) {
return false; return false;

View file

@ -1,7 +1,7 @@
<?php <?php
header('Content-Type: application/json'); header('Content-Type: application/json');
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'] . 'videos/configuration.php'; require_once $global['systemRootPath'] . 'videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php'; require_once $global['systemRootPath'] . 'objects/user.php';

View file

@ -1,7 +1,7 @@
<?php <?php
header('Content-Type: application/json'); header('Content-Type: application/json');
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'] . 'videos/configuration.php'; require_once $global['systemRootPath'] . 'videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php'; require_once $global['systemRootPath'] . 'objects/user.php';

View file

@ -1,7 +1,7 @@
<?php <?php
header('Content-Type: application/json'); header('Content-Type: application/json');
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'] . 'videos/configuration.php'; require_once $global['systemRootPath'] . 'videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php'; require_once $global['systemRootPath'] . 'objects/user.php';
@ -9,7 +9,7 @@ if (!User::isAdmin() || empty($_POST['id'])) {
die('{"error":"'.__("Permission denied").'"}'); die('{"error":"'.__("Permission denied").'"}');
} }
require 'video_ad.php'; require 'video_ad.php';
$va = new Video_ad("", "", "", "", $_POST['id']); $va = new Video_ad('', '', '', '', $_POST['id']);
$va->setAd_title($_POST["title"]); $va->setAd_title($_POST["title"]);
$va->setStarts($_POST["starts"]); $va->setStarts($_POST["starts"]);
$va->setFinish($_POST["finish"]); $va->setFinish($_POST["finish"]);

View file

@ -1,7 +1,6 @@
<?php <?php
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'] . 'videos/configuration.php'; require_once $global['systemRootPath'] . 'videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/bootGrid.php'; require_once $global['systemRootPath'] . 'objects/bootGrid.php';

View file

@ -7,8 +7,8 @@ $showOnlyLoggedUserVideos = true;
if (User::isAdmin()) { if (User::isAdmin()) {
$showOnlyLoggedUserVideos = false; $showOnlyLoggedUserVideos = false;
} }
$videos = Video::getAllVideos("", $showOnlyLoggedUserVideos, true); $videos = Video::getAllVideos('', $showOnlyLoggedUserVideos, true);
$total = Video::getTotalVideos("", $showOnlyLoggedUserVideos, true); $total = Video::getTotalVideos('', $showOnlyLoggedUserVideos, true);
foreach ($videos as $key => $value) { foreach ($videos as $key => $value) {
$name = empty($value['name'])?$value['user']:$value['name']; $name = empty($value['name'])?$value['user']:$value['name'];
//$categories[$key]['comment'] = " <div class=\"commenterName\"><strong>{$name}</strong><div class=\"date sub-text\">{$value['created']}</div></div><div class=\"commentText\">". nl2br($value['comment'])."</div>"; //$categories[$key]['comment'] = " <div class=\"commenterName\"><strong>{$name}</strong><div class=\"date sub-text\">{$value['created']}</div></div><div class=\"commentText\">". nl2br($value['comment'])."</div>";

View file

@ -90,12 +90,7 @@ error_log("Files Received for video {$video_id}: ".$video->getTitle());
die(json_encode($obj)); die(json_encode($obj));
/* /*
error_log(print_r($_POST, true)); error_log(print_r($_POST, true));
error_log(print_r($_FILES, true)); error_log(print_r($_FILES, true));
var_dump($_POST, $_FILES); var_dump($_POST, $_FILES);
*/ */

View file

@ -3,7 +3,7 @@ header('Content-Type: application/json');
$obj = new stdClass(); $obj = new stdClass();
$obj->error = true; $obj->error = true;
if (empty($global['systemRootPath'])) { if (empty($global['systemRootPath'])) {
$global['systemRootPath'] = "../"; $global['systemRootPath'] = '../';
} }
require_once $global['systemRootPath'] . 'videos/configuration.php'; require_once $global['systemRootPath'] . 'videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php'; require_once $global['systemRootPath'] . 'objects/user.php';
@ -122,7 +122,7 @@ if (isset($_FILES['upl']) && $_FILES['upl']['error'] == 0) {
die("Error on move_uploaded_file(" . $_FILES['upl']['tmp_name'] . ", " . "{$global['systemRootPath']}videos/original_" . $filename . ")"); die("Error on move_uploaded_file(" . $_FILES['upl']['tmp_name'] . ", " . "{$global['systemRootPath']}videos/original_" . $filename . ")");
} }
$video = new Video("", "", $id); $video = new Video('', '', $id);
// send to encoder // send to encoder
$queue = array(); $queue = array();
if ($video->getType() == 'video') { if ($video->getType() == 'video') {
@ -159,8 +159,3 @@ if (isset($_FILES['upl']) && $_FILES['upl']['error'] == 0) {
//echo '{"status":"error", "msg":' . json_encode($_FILES) . ', "type":"$_FILES Error"}'; //echo '{"status":"error", "msg":' . json_encode($_FILES) . ', "type":"$_FILES Error"}';
status(["status" => "error", "msg" => print_r($_FILES,true), "type" => '$_FILES Error']); status(["status" => "error", "msg" => print_r($_FILES,true), "type" => '$_FILES Error']);
exit; exit;

View file

@ -126,4 +126,3 @@ if ($client->getAccessToken()) {
} }
echo json_encode($obj); echo json_encode($obj);
?>

View file

@ -9,13 +9,10 @@ body {
body { body {
padding-top: 60px; padding-top: 60px;
} }
.nopadding { .nopadding {
padding: 0 !important; padding: 0 !important;
margin: 0 !important; margin: 0 !important;
} }
.videoLink .duration { .videoLink .duration {
position: absolute; position: absolute;
background: rgba(0, 0, 0, 0.6)!important; background: rgba(0, 0, 0, 0.6)!important;
@ -35,31 +32,30 @@ body {
color: rgba(255, 255, 255, 0.3)!important; color: rgba(255, 255, 255, 0.3)!important;
font-size: 50px; font-size: 50px;
} }
.videoLink div { .videoLink div {
transition: all 0.3s ease-in-out; transition: all 0.3s ease-in-out;
font-size: 1em; font-size: 1em;
} }
.videoLink div.details, .videoLink div.details div{ .videoLink div.details,
.videoLink div.details div {
font-size: 0.9em; font-size: 0.9em;
} }
.gallery:hover .glyphicon-play-circle,
.gallery:hover .glyphicon-play-circle, .videoLink:hover .glyphicon-play-circle{ .videoLink:hover .glyphicon-play-circle {
color: rgba(255, 255, 255, 0.6)!important; color: rgba(255, 255, 255, 0.6)!important;
} }
.bottom-border { .bottom-border {
border-bottom: 2px solid #F2F2F2; border-bottom: 2px solid #F2F2F2;
margin: 0; margin: 0;
padding: 5px; padding: 5px;
} }
h1,
h1,h2,h3,h4{ h2,
h3,
h4 {
margin: 5px; margin: 5px;
padding: 5px; padding: 5px;
} }
h1 { h1 {
font-size: 20px; font-size: 20px;
} }
@ -72,7 +68,6 @@ h3{
h4 { h4 {
font-size: 14px; font-size: 14px;
} }
footer { footer {
color: #444; color: #444;
padding: 25px; padding: 25px;
@ -97,7 +92,6 @@ footer .btn-outline {
} }
/* for main video */ /* for main video */
.video-content { .video-content {
flex: 0 1 100%; flex: 0 1 100%;
height: 50%; height: 50%;
@ -110,7 +104,6 @@ footer .btn-outline {
} }
/* end for main video */ /* end for main video */
.form-compact .form-control { .form-compact .form-control {
position: relative; position: relative;
height: auto; height: auto;
@ -124,16 +117,17 @@ footer .btn-outline {
border-radius: 0; border-radius: 0;
margin-bottom: -1px; margin-bottom: -1px;
} }
.form-compact input.first, .form-compact select.first { .form-compact input.first,
.form-compact select.first {
border-top-left-radius: 5px; border-top-left-radius: 5px;
border-top-right-radius: 5px; border-top-right-radius: 5px;
} }
.form-compact input.last, .form-compact select.last { .form-compact input.last,
.form-compact select.last {
border-bottom-left-radius: 5px; border-bottom-left-radius: 5px;
border-bottom-right-radius: 5px; border-bottom-right-radius: 5px;
margin-bottom: 10px; margin-bottom: 10px;
} }
@media (max-width: 767px) { @media (max-width: 767px) {
.navbar-form { .navbar-form {
padding: 0; padding: 0;
@ -175,17 +169,21 @@ footer .btn-outline {
border: 0; border: 0;
margin-right: 0; margin-right: 0;
} }
.tabbable-line > .nav-tabs > li.open, .tabbable-line > .nav-tabs > li:hover { .tabbable-line > .nav-tabs > li.open,
.tabbable-line > .nav-tabs > li:hover {
border-bottom: 4px solid #fbcdcf; border-bottom: 4px solid #fbcdcf;
} }
.tabbable-line > .nav-tabs > li.open > a, .tabbable-line > .nav-tabs > li:hover > a { .tabbable-line > .nav-tabs > li.open > a,
.tabbable-line > .nav-tabs > li:hover > a {
border: 0; border: 0;
background: none !important; background: none !important;
} }
.tabbable-line > .nav-tabs > li.open > a > i, .tabbable-line > .nav-tabs > li:hover > a > i { .tabbable-line > .nav-tabs > li.open > a > i,
.tabbable-line > .nav-tabs > li:hover > a > i {
color: #a6a6a6; color: #a6a6a6;
} }
.tabbable-line > .nav-tabs > li.open .dropdown-menu, .tabbable-line > .nav-tabs > li:hover .dropdown-menu { .tabbable-line > .nav-tabs > li.open .dropdown-menu,
.tabbable-line > .nav-tabs > li:hover .dropdown-menu {
margin-top: 0px; margin-top: 0px;
} }
.tabbable-line > .nav-tabs > li.active { .tabbable-line > .nav-tabs > li.active {
@ -213,7 +211,6 @@ footer .btn-outline {
.nowrapCell td { .nowrapCell td {
white-space: normal !important; white-space: normal !important;
} }
.watch8-action-buttons { .watch8-action-buttons {
padding: 5px 10px 0 10px; padding: 5px 10px 0 10px;
margin: 5px 0 0 0; margin: 5px 0 0 0;
@ -229,24 +226,20 @@ footer .btn-outline {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.no-outline { .no-outline {
border: 0; border: 0;
} }
.no-outline:focus, .no-outline:focus,
.no-outline:active, .no-outline:active,
.no-outline:hover { .no-outline:hover {
background-color: transparent; background-color: transparent;
color: #000; color: #000;
} }
#showMore { #showMore {
padding: 20px; padding: 20px;
margin: 10px; margin: 10px;
border-top: 2px solid #F2F2F2; border-top: 2px solid #F2F2F2;
} }
.watch-view-count { .watch-view-count {
line-height: 24px; line-height: 24px;
max-height: 24px; max-height: 24px;
@ -256,11 +249,12 @@ footer .btn-outline {
padding: -5px; padding: -5px;
border-bottom: 2px solid #167ac6; border-bottom: 2px solid #167ac6;
} }
#likeBtn.myVote span,
#likeBtn.myVote span, #likeBtn.myVote small { #likeBtn.myVote small {
color: #167ac6; color: #167ac6;
} }
#dislikeBtn.myVote span, #dislikeBtn.myVote small { #dislikeBtn.myVote span,
#dislikeBtn.myVote small {
color: #444; color: #444;
} }
@ -268,14 +262,12 @@ footer .btn-outline {
.material-switch > input[type="checkbox"] { .material-switch > input[type="checkbox"] {
display: none; display: none;
} }
.material-switch > label { .material-switch > label {
cursor: pointer; cursor: pointer;
height: 0px; height: 0px;
position: relative; position: relative;
width: 40px; width: 40px;
} }
.material-switch > label::before { .material-switch > label::before {
background: rgb(0, 0, 0); background: rgb(0, 0, 0);
box-shadow: inset 0px 0px 10px rgba(0, 0, 0, 0.5); box-shadow: inset 0px 0px 10px rgba(0, 0, 0, 0.5);
@ -311,7 +303,6 @@ footer .btn-outline {
} }
/* fancy checkbox end */ /* fancy checkbox end */
.label.fix-width { .label.fix-width {
min-width: 130px !important; min-width: 130px !important;
display: inline-block !important; display: inline-block !important;
@ -324,18 +315,19 @@ footer .btn-outline {
text-align: right; text-align: right;
border-top-right-radius: 0; border-top-right-radius: 0;
border-bottom-right-radius: 0; border-bottom-right-radius: 0;
border-top-left-radius: 0.25em;; border-top-left-radius: 0.25em;
border-bottom-left-radius: 0.25em;; ;
border-bottom-left-radius: 0.25em;
;
} }
.popover-content,
.popover-content, .popover-title, .popover{ .popover-title,
.popover {
color: #333 !important; color: #333 !important;
} }
.videosDetails { .videosDetails {
padding-left: 20px; padding-left: 20px;
} }
.divMainVideo .duration { .divMainVideo .duration {
position: absolute; position: absolute;
background: rgba(0, 0, 0, 0.6)!important; background: rgba(0, 0, 0, 0.6)!important;
@ -346,7 +338,6 @@ footer .btn-outline {
font-size: 0.9em; font-size: 0.9em;
border-radius: 5px; border-radius: 5px;
} }
.gallery .duration { .gallery .duration {
position: absolute; position: absolute;
background: rgba(0, 0, 0, 0.6)!important; background: rgba(0, 0, 0, 0.6)!important;
@ -357,8 +348,8 @@ footer .btn-outline {
font-size: 0.9em; font-size: 0.9em;
border-radius: 5px; border-radius: 5px;
} }
.gallery h2,
.gallery h2, .videosDetails .title{ .videosDetails .title {
font-size: 1em; font-size: 1em;
margin: 0; margin: 0;
padding: 0; padding: 0;
@ -369,9 +360,9 @@ footer .btn-outline {
max-height: 32px; /* fallback */ max-height: 32px; /* fallback */
min-height: 32px; /* fallback */ min-height: 32px; /* fallback */
-webkit-line-clamp: 2; /* number of lines to show */ -webkit-line-clamp: 2; /* number of lines to show */
-webkit-box-orient: vertical; -webkit-box-orient: vertical;
} }
.gallery .watch-view-count { .gallery .watch-view-count {
font-size: 0.8em; font-size: 0.8em;
font-weight: normal; font-weight: normal;
@ -379,73 +370,88 @@ footer .btn-outline {
margin: 0; margin: 0;
padding: 0; padding: 0;
} }
.galleryVideo { .galleryVideo {
overflow: hidden; overflow: hidden;
height: 190px; height: 190px;
border-bottom: solid 1px #EEE; border-bottom: solid 1px #EEE;
margin-bottom: 10px; margin-bottom: 10px;
} }
.galleryVideo .group { .galleryVideo .group {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.autoplay span span { .autoplay span span {
margin: 0 5px; margin: 0 5px;
font-weight: bold; font-weight: bold;
} }
img.rotate90,
img.rotate-270 {
img.rotate90, img.rotate-270{
transform: rotate(90deg); transform: rotate(90deg);
-ms-transform:rotate(90deg); /* IE 9 */ -ms-transform: rotate(90deg);
-moz-transform:rotate(90deg); /* Firefox */ /* IE 9 */
-webkit-transform:rotate(90deg); /* Safari and Chrome */
-o-transform:rotate(90deg); /* Opera */
}
img.rotate180, img.rotate-180{
transform:rotate(180deg);
-ms-transform:rotate(180deg); /* IE 9 */
-moz-transform:rotate(180deg); /* Firefox */
-webkit-transform:rotate(180deg); /* Safari and Chrome */
-o-transform:rotate(180deg); /* Opera */
}
img.rotate270, img.rotate-90{
transform:rotate(270deg);
-ms-transform:rotate(270deg); /* IE 9 */
-moz-transform:rotate(270deg); /* Firefox */
-webkit-transform:rotate(270deg); /* Safari and Chrome */
-o-transform:rotate(270deg); /* Opera */
}
-moz-transform: rotate(90deg);
/* Firefox */
-webkit-transform: rotate(90deg);
/* Safari and Chrome */
-o-transform: rotate(90deg);
/* Opera */
}
img.rotate180,
img.rotate-180 {
transform: rotate(180deg);
-ms-transform: rotate(180deg);
/* IE 9 */
-moz-transform: rotate(180deg);
/* Firefox */
-webkit-transform: rotate(180deg);
/* Safari and Chrome */
-o-transform: rotate(180deg);
/* Opera */
}
img.rotate270,
img.rotate-90 {
transform: rotate(270deg);
-ms-transform: rotate(270deg);
/* IE 9 */
-moz-transform: rotate(270deg);
/* Firefox */
-webkit-transform: rotate(270deg);
/* Safari and Chrome */
-o-transform: rotate(270deg);
/* Opera */
}
.subscribeButton { .subscribeButton {
background-color: #e62117; background-color: #e62117;
color: #FFF; color: #FFF;
} }
.subscribeButton:hover, .subscribeButton:active, .subscribeButton:focus{ .subscribeButton:hover,
.subscribeButton:active,
.subscribeButton:focus {
background-color: #CC0000; background-color: #CC0000;
color: #FFF; color: #FFF;
} }
.subscribeButton span:before { .subscribeButton span:before {
content: "\f16a"; content: "\f16a";
} }
.subscribeButton.subscribed { .subscribeButton.subscribed {
background-color: #DDD; background-color: #DDD;
color: #777; color: #777;
} }
.subscribeButton.subscribed span:before { .subscribeButton.subscribed span:before {
content: "\f00c"; content: "\f00c";
} }
.subscribeButton.subscribed:hover span:before { .subscribeButton.subscribed:hover span:before {
content: "\f057"; content: "\f057";
} }
.profileBg { .profileBg {
padding: 20px; padding: 20px;
min-height: 200px; min-height: 200px;
@ -455,8 +461,6 @@ img.rotate270, img.rotate-90{
-o-background-size: cover; -o-background-size: cover;
background-size: cover; background-size: cover;
} }
#sidebar { #sidebar {
width: 300px; width: 300px;
position: absolute; position: absolute;
@ -483,7 +487,6 @@ img.rotate270, img.rotate-90{
.navbar-brand>img { .navbar-brand>img {
width: 120px; width: 120px;
} }
.list-inline { .list-inline {
display: flex; display: flex;
justify-content: left; justify-content: left;
@ -518,7 +521,6 @@ nav ul.items-container li:first-child ul.left-side{
nav ul.items-container li:last-child { nav ul.items-container li:last-child {
margin-right: 20px; margin-right: 20px;
} }
nav ul.items-container li ul.right-menus { nav ul.items-container li ul.right-menus {
display: flex; display: flex;
flex-direction: row; flex-direction: row;
@ -528,7 +530,6 @@ nav ul.items-container li ul.right-menus li{
} }
/** header **/ /** header **/
.navbar .container { .navbar .container {
padding: 0 2px; padding: 0 2px;
align-items: center; align-items: center;
@ -541,12 +542,12 @@ nav ul.items-container li ul.right-menus li{
display: flex; display: flex;
align-items: center; align-items: center;
} }
/* Play List */ /* Play List */
.playlistList { .playlistList {
height: 400px; height: 400px;
overflow: hidden; overflow: hidden;
} }
.playlistList .nav { .playlistList .nav {
overflow-y: auto; overflow-y: auto;
position: absolute; position: absolute;
@ -554,7 +555,6 @@ nav ul.items-container li ul.right-menus li{
height: 100%; height: 100%;
overflow-x: hidden; overflow-x: hidden;
} }
.playlist-nav .navbar { .playlist-nav .navbar {
padding: 0; padding: 0;
max-height: none; max-height: none;
@ -608,11 +608,11 @@ nav ul.items-container li ul.right-menus li{
transition: all 0.3s ease-in-out; transition: all 0.3s ease-in-out;
border-radius: 10px; border-radius: 10px;
} }
#videoContainer { #videoContainer {
overflow: visible; overflow: visible;
background: black; background: black;
} }
/** video manager progress bar */ /** video manager progress bar */
.progress { .progress {
position: relative; position: relative;
@ -632,7 +632,6 @@ nav ul.items-container li ul.right-menus li{
font-weight: 800; font-weight: 800;
padding: 3px 10px 2px; padding: 3px 10px 2px;
} }
.loader { .loader {
border: 5px solid #f3f3f3; /* Light grey */ border: 5px solid #f3f3f3; /* Light grey */
border-top: 5px solid #3498db; /* Blue */ border-top: 5px solid #3498db; /* Blue */
@ -641,12 +640,14 @@ nav ul.items-container li ul.right-menus li{
height: 30px; height: 30px;
animation: spin 2s linear infinite; animation: spin 2s linear infinite;
} }
@keyframes spin { @keyframes spin {
0% { transform: rotate(0deg); } 0% {
100% { transform: rotate(360deg); } transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
} }
@media (max-width: 1200px) { @media (max-width: 1200px) {
.floatVideo { .floatVideo {
width: 500px; width: 500px;
@ -663,7 +664,6 @@ nav ul.items-container li ul.right-menus li{
height: 220px; height: 220px;
} }
} }
@media (max-width: 850px) { @media (max-width: 850px) {
.galleryVideo { .galleryVideo {
height: 180px; height: 180px;

View file

@ -1,10 +1,16 @@
.video-js .vjs-control-bar { .video-js .vjs-control-bar {
background: -moz-linear-gradient(top, rgba(0,0,0,0) 0%, rgba(0,0,0,0.65) 100%); /* FF3.6-15 */ background: -moz-linear-gradient(top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.65) 100%);
background: -webkit-linear-gradient(top, rgba(0,0,0,0) 0%,rgba(0,0,0,0.65) 100%); /* Chrome10-25,Safari5.1-6 */ /* FF3.6-15 */
background: linear-gradient(to bottom, rgba(0,0,0,0) 0%,rgba(0,0,0,0.65) 100%); /* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#a6000000',GradientType=0 ); /* IE6-9 */
}
background: -webkit-linear-gradient(top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.65) 100%);
/* Chrome10-25,Safari5.1-6 */
background: linear-gradient(to bottom, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.65) 100%);
/* W3C, IE10+, FF16+, Chrome26+, Opera12+, Safari7+ */
filter: progid: DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#a6000000', GradientType=0);
/* IE6-9 */
}
.video-js .vjs-play-progress { .video-js .vjs-play-progress {
color: #f12b24; color: #f12b24;
background-color: #f12b24; background-color: #f12b24;
@ -12,7 +18,6 @@ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', e
.video-js:hover .vjs-play-progress { .video-js:hover .vjs-play-progress {
font-size: 1em !important; font-size: 1em !important;
} }
.video-js .vjs-big-play-button { .video-js .vjs-big-play-button {
height: 1.5em; height: 1.5em;
width: 1.5em; width: 1.5em;
@ -25,7 +30,6 @@ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', e
-o-transition: all 0.4s; -o-transition: all 0.4s;
transition: all 0.4s; transition: all 0.4s;
} }
.video-js:hover .vjs-big-play-button, .video-js:hover .vjs-big-play-button,
.video-js .vjs-big-play-button:focus { .video-js .vjs-big-play-button:focus {
background-color: rgba(200, 200, 200, 0.3); background-color: rgba(200, 200, 200, 0.3);
@ -34,24 +38,20 @@ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', e
-o-transition: all 0.4s; -o-transition: all 0.4s;
transition: all 0.4s; transition: all 0.4s;
} }
.video-js .vjs-mouse-display:after,
.video-js .vjs-mouse-display:after, .video-js .vjs-play-progress:after, .video-js .vjs-time-tooltip{ .video-js .vjs-play-progress:after,
.video-js .vjs-time-tooltip {
background: rgba(0, 0, 0, 0.6)!important; background: rgba(0, 0, 0, 0.6)!important;
padding: 2px; padding: 2px;
color: #FFF; color: #FFF;
font-size: 12px !important; font-size: 12px !important;
} }
.video-js .vjs-load-progress { .video-js .vjs-load-progress {
background-color: rgba(159, 159, 159, .8); background-color: rgba(159, 159, 159, .8);
} }
.video-js .vjs-slider-horizontal { .video-js .vjs-slider-horizontal {
background-color: rgba(159, 159, 159, .3); background-color: rgba(159, 159, 159, .3);
} }
.vjs-rotate90 { .vjs-rotate90 {
rotate: 90; rotate: 90;
zoom: 1.0; zoom: 1.0;
@ -93,30 +93,24 @@ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', e
background-color: rgba(0, 0, 0, 0.9); background-color: rgba(0, 0, 0, 0.9);
border: 1px solid #DDD; border: 1px solid #DDD;
} }
.adControl { .adControl {
display: none; display: none;
} }
.ad .video-js .vjs-play-progress { .ad .video-js .vjs-play-progress {
color: #FC0; color: #FC0;
background-color: #FC0; background-color: #FC0;
} }
.ad .vjs-progress-control * { .ad .vjs-progress-control * {
pointer-events: none !important; pointer-events: none !important;
} }
.ad .adControl { .ad .adControl {
display: block; display: block;
} }
/* End Ad Elements */ /* End Ad Elements */
.img-portrait { .img-portrait {
transform: scale(0.56) rotate(90deg); transform: scale(0.56) rotate(90deg);
} }
.embed-responsive-9by16 { .embed-responsive-9by16 {
padding-bottom: 100%; padding-bottom: 100%;
} }

View file

@ -1,5 +1,3 @@
/*========================= /*=========================
Icons Icons
================= */ ================= */
@ -16,7 +14,6 @@ ul.social-network li {
margin: 0 5px; margin: 0 5px;
} }
/* footer social icons */ /* footer social icons */
.social-network a.icoRss:hover { .social-network a.icoRss:hover {
background-color: #F56505; background-color: #F56505;
@ -36,14 +33,18 @@ ul.social-network li {
.social-network a.icoLinkedin:hover { .social-network a.icoLinkedin:hover {
background-color: #007bb7; background-color: #007bb7;
} }
.social-network a.icoRss:hover i, .social-network a.icoFacebook:hover i, .social-network a.icoTwitter:hover i, .social-network a.icoRss:hover i,
.social-network a.icoGoogle:hover i, .social-network a.icoVimeo:hover i, .social-network a.icoLinkedin:hover i { .social-network a.icoFacebook:hover i,
.social-network a.icoTwitter:hover i,
.social-network a.icoGoogle:hover i,
.social-network a.icoVimeo:hover i,
.social-network a.icoLinkedin:hover i {
color: #fff; color: #fff;
} }
a.socialIcon:hover, .socialHoverClass { a.socialIcon:hover,
.socialHoverClass {
color: #44BCDD; color: #44BCDD;
} }
.social-circle li a { .social-circle li a {
display: inline-block; display: inline-block;
position: relative; position: relative;
@ -61,8 +62,8 @@ a.socialIcon:hover, .socialHoverClass {
line-height: 30px; line-height: 30px;
text-align: center; text-align: center;
} }
.social-circle li a:hover i,
.social-circle li a:hover i, .triggeredHover { .triggeredHover {
-moz-transform: rotate(360deg); -moz-transform: rotate(360deg);
-webkit-transform: rotate(360deg); -webkit-transform: rotate(360deg);
-ms--transform: rotate(360deg); -ms--transform: rotate(360deg);
@ -80,12 +81,10 @@ a.socialIcon:hover, .socialHoverClass {
-o-transition: all 0.8s; -o-transition: all 0.8s;
-ms-transition: all 0.8s; -ms-transition: all 0.8s;
transition: all 0.8s; transition: all 0.8s;
} }.social-circle a {
.social-circle a {
background-color: #D3D3D3; background-color: #D3D3D3;
} }
#shareDiv,
#shareDiv, #shareDiv .tabbable-panel{ #shareDiv .tabbable-panel {
border-width: 0; border-width: 0;
} }

View file

@ -32,7 +32,6 @@ $playlistVideos = PlayList::getVideosFromPlaylist($playlist_id);
if ($count==$playlist_index) { if ($count==$playlist_index) {
$class .= " active"; $class .= " active";
$indicator = '<span class="fa fa-play text-danger"></span>'; $indicator = '<span class="fa fa-play text-danger"></span>';
} }
?> ?>
<li class="<?php echo $class; ?>"> <li class="<?php echo $class; ?>">