mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 09:49:28 +02:00
Patch.
Improves PHP code style normalisation to reduce inconsistency, refactors and simplifies some PHP code, slightly beautifies some CSS code.
This commit is contained in:
parent
a6ad438fc5
commit
40ecbd28d4
93 changed files with 986 additions and 1056 deletions
|
@ -1,5 +1,5 @@
|
|||
<?php
|
||||
if(empty($config)){
|
||||
if (empty($config)) {
|
||||
return true;
|
||||
}
|
||||
if (empty($_SESSION['language'])) {
|
||||
|
@ -39,7 +39,7 @@ function getEnabledLangs() {
|
|||
global $global;
|
||||
$dir = "{$global['systemRootPath']}locale";
|
||||
$flags = array();
|
||||
if(empty($global['dont_show_us_flag'])){
|
||||
if (empty($global['dont_show_us_flag'])) {
|
||||
$flags[] = 'us';
|
||||
}
|
||||
if ($handle = opendir($dir)) {
|
||||
|
@ -56,5 +56,7 @@ function getEnabledLangs() {
|
|||
|
||||
function textToLink($string) {
|
||||
return preg_replace(
|
||||
"~[[:alpha:]]+://[^<>[:space:]'\"]+[[:alnum:]/]~", "<a href=\"\\0\">\\0</a>", $string);
|
||||
"~[[:alpha:]]+://[^<>[:space:]'\"]+[[:alnum:]/]~", "<a href=\"\\0\">\\0</a>",
|
||||
$string
|
||||
);
|
||||
}
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?php
|
||||
|
||||
abstract class Object{
|
||||
|
||||
abstract static protected function getTableName();
|
||||
|
@ -16,7 +15,6 @@ abstract class Object{
|
|||
return true;
|
||||
}
|
||||
|
||||
|
||||
function __construct($id) {
|
||||
if (!empty($id)) {
|
||||
// get data from id
|
||||
|
@ -55,7 +53,6 @@ abstract class Object{
|
|||
return $rows;
|
||||
}
|
||||
|
||||
|
||||
static function getTotal() {
|
||||
//will receive
|
||||
//current=1&rowCount=10&sort[sender]=asc&searchPhrase=
|
||||
|
@ -74,20 +71,20 @@ abstract class Object{
|
|||
static function getSqlFromPost() {
|
||||
$sql = self::getSqlSearchFromPost();
|
||||
|
||||
if(!empty($_POST['sort'])){
|
||||
if (!empty($_POST['sort'])) {
|
||||
$orderBy = array();
|
||||
foreach ($_POST['sort'] as $key => $value) {
|
||||
$orderBy[] = " {$key} {$value} ";
|
||||
}
|
||||
$sql .= " ORDER BY ".implode(",", $orderBy);
|
||||
}else{
|
||||
} else {
|
||||
//$sql .= " ORDER BY CREATED DESC ";
|
||||
}
|
||||
|
||||
if(!empty($_POST['rowCount']) && !empty($_POST['current']) && $_POST['rowCount']>0){
|
||||
if (!empty($_POST['rowCount']) && !empty($_POST['current']) && $_POST['rowCount']>0) {
|
||||
$current = ($_POST['current']-1)*$_POST['rowCount'];
|
||||
$sql .= " LIMIT $current, {$_POST['rowCount']} ";
|
||||
}else{
|
||||
} else {
|
||||
$_POST['current'] = 0;
|
||||
$_POST['rowCount'] = 0;
|
||||
$sql .= " LIMIT 12 ";
|
||||
|
@ -97,10 +94,10 @@ abstract class Object{
|
|||
|
||||
static function getSqlSearchFromPost() {
|
||||
$sql = "";
|
||||
if(!empty($_POST['searchPhrase'])){
|
||||
if (!empty($_POST['searchPhrase'])) {
|
||||
$_GET['q'] = $_POST['searchPhrase'];
|
||||
}
|
||||
if(!empty($_GET['q'])){
|
||||
if (!empty($_GET['q'])) {
|
||||
global $global;
|
||||
$search = $global['mysqli']->real_escape_string($_GET['q']);
|
||||
|
||||
|
@ -119,18 +116,18 @@ abstract class Object{
|
|||
return $sql;
|
||||
}
|
||||
|
||||
function save(){
|
||||
function save() {
|
||||
global $global;
|
||||
$fieldsName = $this->getAllFields();
|
||||
if (!empty($this->id)) {
|
||||
$sql = "UPDATE ".static::getTableName()." SET ";
|
||||
$fields = array();
|
||||
foreach ($fieldsName as $value) {
|
||||
if(strtolower($value) == 'created' ){
|
||||
if (strtolower($value) == 'created') {
|
||||
// do nothing
|
||||
}else if(strtolower($value) == 'modified' ){
|
||||
} elseif (strtolower($value) == 'modified') {
|
||||
$fields[] = " {$value} = now() ";
|
||||
}else {
|
||||
} else {
|
||||
$fields[] = " {$value} = '{$this->$value}' ";
|
||||
}
|
||||
}
|
||||
|
@ -141,11 +138,11 @@ abstract class Object{
|
|||
$sql .= implode(",", $fieldsName). " )";
|
||||
$fields = array();
|
||||
foreach ($fieldsName as $value) {
|
||||
if(strtolower($value) == 'created' || strtolower($value) == 'modified' ){
|
||||
if (strtolower($value) == 'created' || strtolower($value) == 'modified') {
|
||||
$fields[] = " now() ";
|
||||
}else if(!isset($this->$value)){
|
||||
} elseif (!isset($this->$value)) {
|
||||
$fields[] = " NULL ";
|
||||
}else{
|
||||
} else {
|
||||
$fields[] = " '{$this->$value}' ";
|
||||
}
|
||||
}
|
||||
|
@ -166,7 +163,7 @@ abstract class Object{
|
|||
}
|
||||
}
|
||||
|
||||
private function getAllFields(){
|
||||
private function getAllFields() {
|
||||
global $global, $mysqlDatabase;
|
||||
$sql = "SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_SCHEMA = '{$mysqlDatabase}' AND TABLE_NAME = '".static::getTableName()."'";
|
||||
|
||||
|
@ -182,4 +179,3 @@ abstract class Object{
|
|||
return $rows;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -1,17 +1,16 @@
|
|||
<?php
|
||||
|
||||
class BootGrid {
|
||||
|
||||
static function getSqlFromPost($searchFieldsNames = array(), $keyPrefix = "") {
|
||||
$sql = self::getSqlSearchFromPost($searchFieldsNames);
|
||||
|
||||
if(!empty($_POST['sort'])){
|
||||
if (!empty($_POST['sort'])) {
|
||||
$orderBy = array();
|
||||
foreach ($_POST['sort'] as $key => $value) {
|
||||
$orderBy[] = " {$keyPrefix}{$key} {$value} ";
|
||||
}
|
||||
$sql .= " ORDER BY ".implode(",", $orderBy);
|
||||
}else{
|
||||
} else {
|
||||
//$sql .= " ORDER BY CREATED DESC ";
|
||||
}
|
||||
|
||||
|
@ -45,6 +44,4 @@ class BootGrid {
|
|||
return $sql;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
<?php
|
||||
|
||||
if(empty($global['systemRootPath'])){
|
||||
$global['systemRootPath'] = "../";
|
||||
if (empty($global['systemRootPath'])) {
|
||||
$global['systemRootPath'] = '../';
|
||||
}
|
||||
require_once $global['systemRootPath'].'videos/configuration.php';
|
||||
require_once $global['systemRootPath'] . 'videos/configuration.php';
|
||||
class Captcha{
|
||||
private $largura, $altura, $tamanho_fonte, $quantidade_letras;
|
||||
|
||||
|
@ -18,36 +17,40 @@ class Captcha{
|
|||
}
|
||||
|
||||
|
||||
public function getCaptchaImage(){
|
||||
public function getCaptchaImage() {
|
||||
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
|
||||
$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
|
||||
$branco = imagecolorallocate($imagem,255,255,255); // define a cor branca
|
||||
$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
|
||||
$branco = imagecolorallocate($imagem, 255, 255, 255); // define a cor branca
|
||||
|
||||
// define a palavra conforme a quantidade de letras definidas no parametro $quantidade_letras
|
||||
//$letters = "AaBbCcDdEeFfGgHhIiJjKkLlMmNnPpQqRrSsTtUuVvYyXxWwZz23456789";
|
||||
$letters = "AaBbCcDdEeFfGgHhIiJjKkLlMmNnPpQqRrSsTtUuVvYyXxWwZz23456789";
|
||||
$palavra = substr(str_shuffle($letters),0,($this->quantidade_letras));
|
||||
//$letters = 'AaBbCcDdEeFfGgHhIiJjKkLlMmNnPpQqRrSsTtUuVvYyXxWwZz23456789';
|
||||
$letters = 'AaBbCcDdEeFfGgHhIiJjKkLlMmNnPpQqRrSsTtUuVvYyXxWwZz23456789';
|
||||
$palavra = substr(str_shuffle($letters), 0, ($this->quantidade_letras));
|
||||
$_SESSION["palavra"] = $palavra; // atribui para a sessao a palavra gerada
|
||||
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
|
||||
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
|
||||
}
|
||||
imagejpeg($imagem); // gera a imagem
|
||||
imagedestroy($imagem); // limpa a imagem da memoria
|
||||
}
|
||||
|
||||
static public function validation($word){
|
||||
static public function validation($word) {
|
||||
if (session_status() == PHP_SESSION_NONE) {
|
||||
session_start();
|
||||
}
|
||||
if (strcasecmp($word, $_SESSION["palavra"])==0){
|
||||
return true;
|
||||
}else{
|
||||
return false;
|
||||
}
|
||||
return (strcasecmp($word, $_SESSION["palavra"]) == 0);
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,5 +1,4 @@
|
|||
<?php
|
||||
|
||||
require_once 'category.php';
|
||||
header('Content-Type: application/json');
|
||||
$categories = Category::getAllCategories();
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?php
|
||||
|
||||
if (empty($global['systemRootPath'])) {
|
||||
$global['systemRootPath'] = "../";
|
||||
$global['systemRootPath'] = '../';
|
||||
}
|
||||
require_once $global['systemRootPath'] . 'videos/configuration.php';
|
||||
require_once $global['systemRootPath'] . 'objects/bootGrid.php';
|
||||
|
@ -23,7 +22,7 @@ class Category {
|
|||
$this->clean_name = $clean_name;
|
||||
}
|
||||
|
||||
function __construct($id, $name = "") {
|
||||
function __construct($id, $name = '') {
|
||||
if (empty($id)) {
|
||||
// get the category data from category and pass
|
||||
$this->name = $name;
|
||||
|
@ -87,12 +86,7 @@ class Category {
|
|||
$id = intval($id);
|
||||
$sql = "SELECT * FROM categories WHERE id = $id LIMIT 1";
|
||||
$res = $global['mysqli']->query($sql);
|
||||
if ($res) {
|
||||
$category = $res->fetch_assoc();
|
||||
} else {
|
||||
$category = false;
|
||||
}
|
||||
return $category;
|
||||
return ($res) ? $res->fetch_assoc() : false;
|
||||
}
|
||||
|
||||
static function getAllCategories() {
|
||||
|
@ -118,12 +112,10 @@ class Category {
|
|||
static function getTotalCategories() {
|
||||
global $global;
|
||||
$sql = "SELECT id FROM categories WHERE 1=1 ";
|
||||
|
||||
$sql .= BootGrid::getSqlSearchFromPost(array('name'));
|
||||
|
||||
$res = $global['mysqli']->query($sql);
|
||||
|
||||
|
||||
return $res->num_rows;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
<?php
|
||||
|
||||
header('Content-Type: application/json');
|
||||
if(empty($global['systemRootPath'])){
|
||||
$global['systemRootPath'] = "../";
|
||||
if (empty($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';
|
||||
if (!User::isAdmin()) {
|
||||
die('{"error":"'.__("Permission denied").'"}');
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
header('Content-Type: application/json');
|
||||
if(empty($global['systemRootPath'])){
|
||||
$global['systemRootPath'] = "../";
|
||||
if (empty($global['systemRootPath'])) {
|
||||
$global['systemRootPath'] = '../';
|
||||
}
|
||||
require_once $global['systemRootPath'].'videos/configuration.php';
|
||||
require_once $global['systemRootPath'] . 'objects/user.php';
|
||||
|
|
|
@ -1,30 +1,30 @@
|
|||
<?php
|
||||
if(empty($global['systemRootPath'])){
|
||||
$global['systemRootPath'] = "../";
|
||||
if (empty($global['systemRootPath'])) {
|
||||
$global['systemRootPath'] = '../';
|
||||
}
|
||||
require_once $global['systemRootPath'].'videos/configuration.php';
|
||||
require_once $global['systemRootPath'].'objects/bootGrid.php';
|
||||
require_once $global['systemRootPath'].'objects/user.php';
|
||||
class Comment{
|
||||
require_once $global['systemRootPath'] . 'videos/configuration.php';
|
||||
require_once $global['systemRootPath'] . 'objects/bootGrid.php';
|
||||
require_once $global['systemRootPath'] . 'objects/user.php';
|
||||
class Comment {
|
||||
private $id;
|
||||
private $comment;
|
||||
private $videos_id;
|
||||
private $users_id;
|
||||
|
||||
function __construct($comment, $videos_id, $id=0) {
|
||||
if(empty($id)){
|
||||
function __construct($comment, $videos_id, $id = 0) {
|
||||
if (empty($id)) {
|
||||
// get the comment data from comment
|
||||
$this->comment = $comment;
|
||||
$this->videos_id = $videos_id;
|
||||
$this->users_id = User::getId();
|
||||
}else{
|
||||
} else {
|
||||
// get data from id
|
||||
$this->load($id);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private function load($id){
|
||||
private function load($id) {
|
||||
$comment = $this->getComment($id);
|
||||
$this->id = $comment['id'];
|
||||
$this->comment = $comment['comment'];
|
||||
|
@ -32,7 +32,7 @@ class Comment{
|
|||
$this->users_id = $comment['user_id'];
|
||||
}
|
||||
|
||||
function save(){
|
||||
function save() {
|
||||
global $global;
|
||||
if(!User::isLogged()){
|
||||
header('Content-Type: application/json');
|
||||
|
@ -40,9 +40,9 @@ class Comment{
|
|||
}
|
||||
$this->comment = htmlentities($this->comment);
|
||||
$this->comment = $global['mysqli']->real_escape_string($this->comment);
|
||||
if(!empty($this->id)){
|
||||
if (!empty($this->id)) {
|
||||
$sql = "UPDATE comments SET comment = '{$this->comment}', modified = now() WHERE id = {$this->id}";
|
||||
}else{
|
||||
} else {
|
||||
$id = User::getId();
|
||||
$sql = "INSERT INTO comments ( comment,users_id, videos_id, created, modified) VALUES ('{$this->comment}', {$id}, {$this->videos_id}, now(), now())";
|
||||
}
|
||||
|
@ -54,19 +54,19 @@ class Comment{
|
|||
}
|
||||
|
||||
|
||||
function delete(){
|
||||
function delete() {
|
||||
if(!User::isAdmin()){
|
||||
return false;
|
||||
}
|
||||
|
||||
global $global;
|
||||
if(!empty($this->id)){
|
||||
if (!empty($this->id)) {
|
||||
$sql = "DELETE FROM comments WHERE id = {$this->id}";
|
||||
}else{
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
$resp = $global['mysqli']->query($sql);
|
||||
if(empty($resp)){
|
||||
if (empty($resp)) {
|
||||
die('Error : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error);
|
||||
}
|
||||
return $resp;
|
||||
|
@ -77,19 +77,14 @@ class Comment{
|
|||
$id = intval($id);
|
||||
$sql = "SELECT * FROM comments WHERE id = $id LIMIT 1";
|
||||
$res = $global['mysqli']->query($sql);
|
||||
if ($res) {
|
||||
$comment = $res->fetch_assoc();
|
||||
} else {
|
||||
$comment = false;
|
||||
}
|
||||
return $comment;
|
||||
return ($res) ? $res->fetch_assoc() : false;
|
||||
}
|
||||
|
||||
static function getAllComments($videoId=0){
|
||||
static function getAllComments($videoId = 0) {
|
||||
global $global;
|
||||
$sql = "SELECT c.*, u.name as name, u.user as user FROM comments c LEFT JOIN users as u ON u.id = users_id WHERE 1=1 ";
|
||||
|
||||
if(!empty($videoId)){
|
||||
if (!empty($videoId)) {
|
||||
$sql .= " AND videos_id = {$videoId} ";
|
||||
}
|
||||
|
||||
|
@ -109,21 +104,18 @@ class Comment{
|
|||
return $comment;
|
||||
}
|
||||
|
||||
static function getTotalComments($videoId=0){
|
||||
static function getTotalComments($videoId = 0) {
|
||||
global $global;
|
||||
$sql = "SELECT id FROM comments WHERE 1=1 ";
|
||||
|
||||
if(!empty($videoId)){
|
||||
if (!empty($videoId)) {
|
||||
$sql .= " AND videos_id = {$videoId} ";
|
||||
}
|
||||
|
||||
$sql .= BootGrid::getSqlSearchFromPost(array('name'));
|
||||
|
||||
$res = $global['mysqli']->query($sql);
|
||||
|
||||
|
||||
return $res->num_rows;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
header('Content-Type: application/json');
|
||||
if(empty($global['systemRootPath'])){
|
||||
$global['systemRootPath'] = "../";
|
||||
if (empty($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';
|
||||
if (!User::canComment()) {
|
||||
die('{"error":"'.__("Permission denied").'"}');
|
||||
|
|
|
@ -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>';
|
||||
}
|
||||
|
||||
|
||||
echo '{ "current": '.$_POST['current'].',"rowCount": '.$_POST['rowCount'].', "total": '.$total.', "rows":'. json_encode($comments).'}';
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?php
|
||||
|
||||
if (empty($global['systemRootPath'])) {
|
||||
$global['systemRootPath'] = "../";
|
||||
$global['systemRootPath'] = '../';
|
||||
}
|
||||
require_once $global['systemRootPath'] . 'videos/configuration.php';
|
||||
require_once $global['systemRootPath'] . 'objects/user.php';
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
header('Content-Type: application/json');
|
||||
if (empty($global['systemRootPath'])) {
|
||||
$global['systemRootPath'] = "../";
|
||||
$global['systemRootPath'] = '../';
|
||||
}
|
||||
require_once $global['systemRootPath'] . 'objects/user.php';
|
||||
if (!User::isAdmin()) {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?php
|
||||
|
||||
// Returns a file size limit in bytes based on the PHP upload_max_filesize
|
||||
// and post_max_size
|
||||
function file_upload_max_size() {
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
<?php
|
||||
require_once 'captcha.php';
|
||||
require_once 'captcha.php';
|
||||
|
||||
$largura = empty($_GET["l"])?120:$_GET["l"]; // recebe a largura
|
||||
$altura = empty($_GET["a"])?40:$_GET["a"]; // recebe a altura
|
||||
$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á
|
||||
$largura = empty($_GET['l']) ? 120 : $_GET['l']; // recebe a largura
|
||||
$altura = empty($_GET['a']) ? 40 : $_GET['a']; // recebe a altura
|
||||
$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á
|
||||
|
||||
$capcha = new Captcha($largura, $altura, $tamanho_fonte, $quantidade_letras);
|
||||
$capcha->getCaptchaImage();
|
||||
?>
|
||||
$capcha = new Captcha($largura, $altura, $tamanho_fonte, $quantidade_letras);
|
||||
$capcha->getCaptchaImage();
|
||||
|
|
|
@ -3,7 +3,6 @@ ini_set('error_log', $global['systemRootPath'].'videos/youphptube.log');
|
|||
global $global;
|
||||
global $config;
|
||||
|
||||
|
||||
$global['mysqli'] = new mysqli($mysqlHost, $mysqlUser,$mysqlPass,$mysqlDatabase,@$mysqlPort);
|
||||
|
||||
$now = new DateTime();
|
||||
|
@ -19,7 +18,7 @@ require_once $global['systemRootPath'] . 'objects/configuration.php';
|
|||
$config = new Configuration();
|
||||
|
||||
// for update config from old versions
|
||||
if(function_exists("getAllFlags")){
|
||||
if (function_exists("getAllFlags")) {
|
||||
Configuration::rewriteConfigFile();
|
||||
}
|
||||
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
<?php
|
||||
if(empty($global['systemRootPath'])){
|
||||
$global['systemRootPath'] = "../";
|
||||
if (empty($global['systemRootPath'])) {
|
||||
$global['systemRootPath'] = '../';
|
||||
}
|
||||
require_once $global['systemRootPath'].'videos/configuration.php';
|
||||
require_once $global['systemRootPath'].'objects/user.php';
|
||||
class Like{
|
||||
class Like {
|
||||
private $id;
|
||||
private $like;
|
||||
private $videos_id;
|
||||
|
@ -19,7 +19,7 @@ class Like{
|
|||
$this->users_id = User::getId();
|
||||
$this->load();
|
||||
// if click again in the same vote, remove the vote
|
||||
if($this->like == $like){
|
||||
if ($this->like == $like) {
|
||||
$like = 0;
|
||||
}
|
||||
$this->setLike($like);
|
||||
|
@ -34,10 +34,11 @@ class Like{
|
|||
$this->like = $like;
|
||||
}
|
||||
|
||||
private function load(){
|
||||
private function load() {
|
||||
$like = $this->getLike();
|
||||
if (empty($like))
|
||||
if (empty($like)) {
|
||||
return false;
|
||||
}
|
||||
foreach ($like as $key => $value) {
|
||||
$this->$key = $value;
|
||||
}
|
||||
|
@ -45,39 +46,35 @@ class Like{
|
|||
|
||||
private function getLike() {
|
||||
global $global;
|
||||
if(empty($this->users_id) || empty($this->videos_id)){
|
||||
if (empty($this->users_id) || empty($this->videos_id)) {
|
||||
header('Content-Type: application/json');
|
||||
die('{"error":"You must have user and videos set to get a like"}');
|
||||
}
|
||||
$sql = "SELECT * FROM likes WHERE users_id = $this->users_id AND videos_id = $this->videos_id LIMIT 1";
|
||||
$res = $global['mysqli']->query($sql);
|
||||
if ($res) {
|
||||
return $res->fetch_assoc();
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
return ($res) ? $res->fetch_assoc() : false;
|
||||
}
|
||||
|
||||
private function save(){
|
||||
private function save() {
|
||||
global $global;
|
||||
if(!User::isLogged()){
|
||||
header('Content-Type: application/json');
|
||||
die('{"error":"'.__("Permission denied").'"}');
|
||||
}
|
||||
if(!empty($this->id)){
|
||||
if (!empty($this->id)) {
|
||||
$sql = "UPDATE likes SET `like` = '{$this->like}', modified = now() WHERE id = {$this->id}";
|
||||
}else{
|
||||
} else {
|
||||
$sql = "INSERT INTO likes ( `like`,users_id, videos_id, created, modified) VALUES ('{$this->like}', {$this->users_id}, {$this->videos_id}, now(), now())";
|
||||
}
|
||||
//echo $sql;exit;
|
||||
$resp = $global['mysqli']->query($sql);
|
||||
if(empty($resp)){
|
||||
if (empty($resp)) {
|
||||
die('Error : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error);
|
||||
}
|
||||
return $resp;
|
||||
}
|
||||
|
||||
static function getLikes($videos_id){
|
||||
static function getLikes($videos_id) {
|
||||
global $global;
|
||||
|
||||
$obj = new stdClass();
|
||||
|
@ -88,37 +85,34 @@ class Like{
|
|||
|
||||
$sql = "SELECT count(*) as total FROM likes WHERE videos_id = {$videos_id} AND `like` = 1 "; // like
|
||||
$res = $global['mysqli']->query($sql);
|
||||
if ($res) {
|
||||
$row = $res->fetch_assoc();
|
||||
$obj->likes = intval($row['total']);
|
||||
} else {
|
||||
die($sql.'\nError : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error);
|
||||
if (!$res) {
|
||||
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
|
||||
$res = $global['mysqli']->query($sql);
|
||||
if ($res) {
|
||||
$row = $res->fetch_assoc();
|
||||
$obj->dislikes = intval($row['total']);
|
||||
} else {
|
||||
if (!$res) {
|
||||
die($sql.'\nError : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error);
|
||||
}
|
||||
$row = $res->fetch_assoc();
|
||||
$obj->dislikes = intval($row['total']);
|
||||
return $obj;
|
||||
}
|
||||
|
||||
static function getMyVote($videos_id){
|
||||
static function getMyVote($videos_id) {
|
||||
global $global;
|
||||
if(!User::isLogged()){
|
||||
if (!User::isLogged()) {
|
||||
return 0;
|
||||
}
|
||||
$id = User::getId();
|
||||
$sql = "SELECT `like` FROM likes WHERE videos_id = {$videos_id} AND users_id = {$id} "; // like
|
||||
$res = $global['mysqli']->query($sql);
|
||||
if($row = $res->fetch_assoc()){
|
||||
if ($row = $res->fetch_assoc()) {
|
||||
return intval($row['like']);
|
||||
}else{
|
||||
return 0;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
header('Content-Type: application/json');
|
||||
if (empty($global['systemRootPath'])) {
|
||||
$global['systemRootPath'] = "../";
|
||||
$global['systemRootPath'] = '../';
|
||||
}
|
||||
require_once $global['systemRootPath'] . 'videos/configuration.php';
|
||||
require_once $global['systemRootPath'] . 'objects/hybridauth/autoload.php';
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
if(empty($global['systemRootPath'])){
|
||||
$global['systemRootPath'] = "../";
|
||||
if (empty($global['systemRootPath'])) {
|
||||
$global['systemRootPath'] = '../';
|
||||
}
|
||||
require_once $global['systemRootPath'].'videos/configuration.php';
|
||||
require_once $global['systemRootPath'] . 'objects/user.php';
|
||||
|
|
|
@ -1,13 +1,12 @@
|
|||
<?php
|
||||
|
||||
class Main{
|
||||
class Main {
|
||||
/**
|
||||
* receive a YYYY-MM-DD
|
||||
* @param type $brDate
|
||||
* @return String dd/mm/yyyy
|
||||
*/
|
||||
* receive a YYYY-MM-DD
|
||||
* @param type $brDate
|
||||
* @return String dd/mm/yyyy
|
||||
*/
|
||||
static public function dateMySQLToBrString($mySqlDate) {
|
||||
$parts = explode("-", $mySqlDate);
|
||||
$parts = explode('-', $mySqlDate);
|
||||
//switch month and day
|
||||
if (empty($parts[2])) {
|
||||
return $mySqlDate;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
require_once '../videos/configuration.php';
|
||||
require_once $global['systemRootPath'] . 'objects/user.php';
|
||||
|
||||
if(!User::canUpload()){
|
||||
if (!User::canUpload()) {
|
||||
header("Location: {$global['webSiteRootURL']}?error=" . __("You can not notify"));
|
||||
exit;
|
||||
}
|
||||
|
@ -40,5 +40,4 @@ if (!$mail->send()) {
|
|||
$obj->success = __("Message sent");
|
||||
}
|
||||
|
||||
|
||||
echo json_encode($obj);
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
header('Content-Type: application/json');
|
||||
if(empty($global['systemRootPath'])){
|
||||
$global['systemRootPath'] = "../";
|
||||
if (empty($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/playlist.php';
|
||||
if (!User::isLogged()) {
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?php
|
||||
|
||||
if (empty($global['systemRootPath'])) {
|
||||
$global['systemRootPath'] = "../";
|
||||
$global['systemRootPath'] = '../';
|
||||
}
|
||||
require_once $global['systemRootPath'] . 'videos/configuration.php';
|
||||
require_once $global['systemRootPath'] . 'objects/user.php';
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
<?php
|
||||
|
||||
header('Content-Type: application/json');
|
||||
if(empty($global['systemRootPath'])){
|
||||
$global['systemRootPath'] = "../";
|
||||
if (empty($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/playlist.php';
|
||||
if (!User::isLogged()) {
|
||||
die('{"error":"'.__("Permission denied").'"}');
|
||||
}
|
||||
if(empty($_POST['name'])){
|
||||
if (empty($_POST['name'])) {
|
||||
die('{"error":"'.__("Name can't be blank").'"}');
|
||||
}
|
||||
$obj = new PlayList(@$_POST['id']);
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
header('Content-Type: application/json');
|
||||
if(empty($global['systemRootPath'])){
|
||||
$global['systemRootPath'] = "../";
|
||||
if (empty($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/playlist.php';
|
||||
if (!User::isLogged()) {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
header('Content-Type: application/json');
|
||||
if(empty($global['systemRootPath'])){
|
||||
$global['systemRootPath'] = "../";
|
||||
if (empty($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/playlist.php';
|
||||
if (!User::isLogged()) {
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
header('Content-Type: application/json');
|
||||
if(empty($global['systemRootPath'])){
|
||||
$global['systemRootPath'] = "../";
|
||||
if (empty($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/playlist.php';
|
||||
if (!User::isLogged()) {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
if (empty($global['systemRootPath'])) {
|
||||
$global['systemRootPath'] = "../";
|
||||
$global['systemRootPath'] = '../';
|
||||
}
|
||||
require_once $global['systemRootPath'] . 'videos/configuration.php';
|
||||
require_once 'functions.php';
|
||||
|
|
|
@ -1,15 +1,14 @@
|
|||
<?php
|
||||
|
||||
require_once 'subscribe.php';
|
||||
header('Content-Type: application/json');
|
||||
$obj = new stdClass();
|
||||
$obj->error = "";
|
||||
$obj->subscribe = "";
|
||||
if(empty($_POST['email'])){
|
||||
if (empty($_POST['email'])) {
|
||||
$obj->error = __("Email can not be blank");
|
||||
die(json_encode($obj));
|
||||
}
|
||||
if(empty($_POST['user_id'])){
|
||||
if (empty($_POST['user_id'])) {
|
||||
$obj->error = __("User can not be blank");
|
||||
die(json_encode($obj));
|
||||
}
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?php
|
||||
|
||||
if (empty($global['systemRootPath'])) {
|
||||
$global['systemRootPath'] = "../";
|
||||
$global['systemRootPath'] = '../';
|
||||
}
|
||||
require_once $global['systemRootPath'] . 'videos/configuration.php';
|
||||
require_once $global['systemRootPath'] . 'objects/bootGrid.php';
|
||||
|
|
|
@ -1,14 +1,13 @@
|
|||
<?php
|
||||
|
||||
require_once 'subscribe.php';
|
||||
if(!User::isLogged()){
|
||||
if (!User::isLogged()) {
|
||||
return false;
|
||||
}
|
||||
header('Content-Type: application/json');
|
||||
|
||||
$user_id = User::getId();
|
||||
// if admin bring all subscribers
|
||||
if(User::isAdmin()){
|
||||
if (User::isAdmin()) {
|
||||
$user_id = "";
|
||||
}
|
||||
$Subscribes = Subscribe::getAllSubscribes($user_id);
|
||||
|
|
|
@ -8,7 +8,7 @@ require_once $global['systemRootPath'] . 'objects/video.php';
|
|||
$obj = new stdClass();
|
||||
$obj->error = true;
|
||||
if (!User::canUpload()) {
|
||||
$obj->msg = "Only logged users can file_dataoad";
|
||||
$obj->msg = 'Only logged users can file_dataoad';
|
||||
die(json_encode($obj));
|
||||
}
|
||||
header('Content-Type: application/json');
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?php
|
||||
|
||||
if (empty($global['systemRootPath'])) {
|
||||
$global['systemRootPath'] = "../";
|
||||
$global['systemRootPath'] = '../';
|
||||
}
|
||||
require_once $global['systemRootPath'] . 'videos/configuration.php';
|
||||
require_once $global['systemRootPath'] . 'objects/bootGrid.php';
|
||||
|
@ -121,11 +120,10 @@ class User {
|
|||
if (!empty($user)) {
|
||||
$photo = $user['photoURL'];
|
||||
}
|
||||
} else if (self::isLogged()) {
|
||||
} elseif (self::isLogged()) {
|
||||
$photo = $_SESSION['user']['photoURL'];
|
||||
|
||||
}
|
||||
if(preg_match("/videos\/userPhoto\/.*/", $photo)){
|
||||
if (preg_match("/videos\/userPhoto\/.*/", $photo)) {
|
||||
$photo = $global['webSiteRootURL'].$photo;
|
||||
}
|
||||
if (empty($photo)) {
|
||||
|
@ -167,7 +165,7 @@ class User {
|
|||
} else {
|
||||
$id = $this->id;
|
||||
}
|
||||
if($updateUserGroups){
|
||||
if ($updateUserGroups) {
|
||||
require_once './userGroups.php';
|
||||
// update the user groups
|
||||
UserGroups::updateUserGroups($id, $this->userGroups);
|
||||
|
@ -241,12 +239,12 @@ class User {
|
|||
$user = $global['mysqli']->real_escape_string($user);
|
||||
$sql = "SELECT * FROM users WHERE user = '$user' ";
|
||||
|
||||
if($mustBeactive){
|
||||
if ($mustBeactive) {
|
||||
$sql .= " AND status = 'a' ";
|
||||
}
|
||||
|
||||
if ($pass !== false) {
|
||||
if(!$encodedPass || $encodedPass === 'false'){
|
||||
if (!$encodedPass || $encodedPass === 'false') {
|
||||
$pass = md5($pass);
|
||||
}
|
||||
$sql .= " AND password = '$pass' ";
|
||||
|
@ -446,7 +444,7 @@ class User {
|
|||
}
|
||||
|
||||
function setUserGroups($userGroups) {
|
||||
if(is_array($userGroups)){
|
||||
if (is_array($userGroups)) {
|
||||
$this->userGroups = $userGroups;
|
||||
}
|
||||
}
|
||||
|
@ -468,24 +466,24 @@ class User {
|
|||
static function getTags($user_id){
|
||||
$user = new User($user_id);
|
||||
$tags = array();
|
||||
if($user->getIsAdmin()){
|
||||
if ($user->getIsAdmin()) {
|
||||
$obj = new stdClass();
|
||||
$obj->type = "info";
|
||||
$obj->text = __("Admin");
|
||||
$tags[] = $obj;
|
||||
}else{
|
||||
} else {
|
||||
$obj = new stdClass();
|
||||
$obj->type = "default";
|
||||
$obj->text = __("Regular User");
|
||||
$tags[] = $obj;
|
||||
}
|
||||
|
||||
if($user->getStatus() == "a"){
|
||||
if ($user->getStatus() == "a") {
|
||||
$obj = new stdClass();
|
||||
$obj->type = "success";
|
||||
$obj->text = __("Active");
|
||||
$tags[] = $obj;
|
||||
}else{
|
||||
} else {
|
||||
$obj = new stdClass();
|
||||
$obj->type = "danger";
|
||||
$obj->text = __("Inactive");
|
||||
|
@ -506,7 +504,7 @@ class User {
|
|||
}
|
||||
|
||||
function getBackgroundURL() {
|
||||
if(empty($this->backgroundURL)){
|
||||
if (empty($this->backgroundURL)) {
|
||||
$this->backgroundURL = "view/img/background.png";
|
||||
}
|
||||
return $this->backgroundURL;
|
||||
|
@ -516,6 +514,4 @@ class User {
|
|||
$this->backgroundURL = strip_tags($backgroundURL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
header('Content-Type: application/json');
|
||||
if(empty($global['systemRootPath'])){
|
||||
$global['systemRootPath'] = "../";
|
||||
if (empty($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';
|
||||
if (!User::isAdmin()) {
|
||||
die('{"error":"'.__("Permission denied").'"}');
|
||||
|
|
|
@ -1,19 +1,19 @@
|
|||
<?php
|
||||
header('Content-Type: application/json');
|
||||
if(empty($global['systemRootPath'])){
|
||||
$global['systemRootPath'] = "../";
|
||||
if (empty($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';
|
||||
// check if user already exists
|
||||
$userCheck = new User(0, $_POST['user'], false);
|
||||
$obj = new stdClass();
|
||||
if(!empty($userCheck->getBdId())){
|
||||
if (!empty($userCheck->getBdId())) {
|
||||
$obj->error = __("User already exists");
|
||||
die(json_encode($obj));
|
||||
}
|
||||
|
||||
if(empty($_POST['user']) || empty($_POST['pass']) || empty($_POST['email']) || empty($_POST['name'])){
|
||||
if (empty($_POST['user']) || empty($_POST['pass']) || empty($_POST['email']) || empty($_POST['name'])) {
|
||||
$obj->error = __("You must fill all fields");
|
||||
die(json_encode($obj));
|
||||
}
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
header('Content-Type: application/json');
|
||||
if(empty($global['systemRootPath'])){
|
||||
$global['systemRootPath'] = "../";
|
||||
if (empty($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/userGroups.php';
|
||||
if (!User::isAdmin() || empty($_POST['id'])) {
|
||||
|
|
|
@ -1,5 +1,4 @@
|
|||
<?php
|
||||
|
||||
require_once 'userGroups.php.php';
|
||||
header('Content-Type: application/json');
|
||||
$rows = UserGroups::getAllUsersGroups();
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?php
|
||||
|
||||
if (empty($global['systemRootPath'])) {
|
||||
$global['systemRootPath'] = "../";
|
||||
$global['systemRootPath'] = '../';
|
||||
}
|
||||
require_once $global['systemRootPath'] . 'videos/configuration.php';
|
||||
require_once $global['systemRootPath'] . 'objects/bootGrid.php';
|
||||
|
@ -141,7 +140,7 @@ class UserGroups {
|
|||
if (!User::isAdmin()) {
|
||||
return false;
|
||||
}
|
||||
if(!is_array($array_groups_id)){
|
||||
if (!is_array($array_groups_id)) {
|
||||
return false;
|
||||
}
|
||||
self::deleteGroupsFromUser($users_id);
|
||||
|
@ -157,14 +156,14 @@ class UserGroups {
|
|||
return true;
|
||||
}
|
||||
|
||||
static function getUserGroups($users_id){
|
||||
static function getUserGroups($users_id) {
|
||||
global $global;
|
||||
$result = $global['mysqli']->query("SHOW TABLES LIKE 'users_has_users_groups'");
|
||||
if (empty($result->num_rows)) {
|
||||
$_GET['error'] = "You need to <a href='{$global['webSiteRootURL']}update'>update your system to ver 2.3</a>";
|
||||
return array();
|
||||
}
|
||||
if(empty($users_id)){
|
||||
if (empty($users_id)) {
|
||||
return array();
|
||||
}
|
||||
$sql = "SELECT * FROM users_has_users_groups"
|
||||
|
@ -206,11 +205,11 @@ class UserGroups {
|
|||
|
||||
// for videos
|
||||
|
||||
static function updateVideoGroups($videos_id, $array_groups_id){
|
||||
static function updateVideoGroups($videos_id, $array_groups_id) {
|
||||
if (!User::canUpload()) {
|
||||
return false;
|
||||
}
|
||||
if(!is_array($array_groups_id)){
|
||||
if (!is_array($array_groups_id)) {
|
||||
return false;
|
||||
}
|
||||
self::deleteGroupsFromVideo($videos_id);
|
||||
|
@ -225,15 +224,15 @@ class UserGroups {
|
|||
return true;
|
||||
}
|
||||
|
||||
static function getVideoGroups($videos_id){
|
||||
static function getVideoGroups($videos_id) {
|
||||
global $global;
|
||||
//check if table exists if not you need to update
|
||||
$res = $global['mysqli']->query('select 1 from `videos_group_view` LIMIT 1');
|
||||
if(!$res){
|
||||
if(User::isAdmin()){
|
||||
if (!$res) {
|
||||
if (User::isAdmin()) {
|
||||
$_GET['error'] = "You need to Update YouPHPTube to version 2.3 <a href='{$global['webSiteRootURL']}update/'>Click here</a>";
|
||||
}
|
||||
return array();
|
||||
return array();
|
||||
}
|
||||
|
||||
$sql = "SELECT * FROM videos_group_view as v "
|
||||
|
|
|
@ -1,10 +1,9 @@
|
|||
<?php
|
||||
|
||||
header('Content-Type: application/json');
|
||||
if(empty($global['systemRootPath'])){
|
||||
$global['systemRootPath'] = "../";
|
||||
if (empty($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';
|
||||
if (!User::isAdmin()) {
|
||||
die('{"error":"'.__("Permission denied").'"}');
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
header('Content-Type: application/json');
|
||||
if(empty($global['systemRootPath'])){
|
||||
$global['systemRootPath'] = "../";
|
||||
if (empty($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';
|
||||
if (!User::isAdmin() || empty($_POST['id'])) {
|
||||
die('{"error":"'.__("Permission denied").'"}');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
if (empty($global['systemRootPath'])) {
|
||||
$global['systemRootPath'] = "../";
|
||||
$global['systemRootPath'] = '../';
|
||||
}
|
||||
require_once $global['systemRootPath'] . 'videos/configuration.php';
|
||||
require_once $global['systemRootPath'] . 'objects/user.php';
|
||||
|
@ -69,11 +69,11 @@ if (!(!empty($_GET['user']) && !empty($_GET['recoverpass']))) {
|
|||
<div class="container">
|
||||
<?php
|
||||
|
||||
if($user->getRecoverPass() != $_GET['recoverpass']){
|
||||
if ($user->getRecoverPass() != $_GET['recoverpass']) {
|
||||
?>
|
||||
<div class="alert alert-danger"><?php echo __("The recover pass does not match!"); ?></div>
|
||||
<?php
|
||||
}else{
|
||||
} else {
|
||||
?>
|
||||
<form class="well form-horizontal" action=" " method="post" id="recoverPassForm">
|
||||
<fieldset>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
header('Content-Type: application/json');
|
||||
if (empty($global['systemRootPath'])) {
|
||||
$global['systemRootPath'] = "../";
|
||||
$global['systemRootPath'] = '../';
|
||||
}
|
||||
require_once $global['systemRootPath'] . 'videos/configuration.php';
|
||||
require_once $global['systemRootPath'] . 'objects/user.php';
|
||||
|
@ -11,19 +11,19 @@ if (empty($_POST['user']) || empty($_POST['recoverPassword']) || empty($_POST['n
|
|||
die(json_encode($obj));
|
||||
}
|
||||
$user = new User(0, $_POST['user'], false);
|
||||
if(empty($user)){
|
||||
if (empty($user)) {
|
||||
$obj->error = __("User not found");
|
||||
die(json_encode($obj));
|
||||
}else if($user->getRecoverPass() !== $_POST['recoverPassword']){
|
||||
} elseif ($user->getRecoverPass() !== $_POST['recoverPassword']) {
|
||||
$obj->error = __("Recover password does not match");
|
||||
die(json_encode($obj));
|
||||
}else if($_POST['newPassword']!==$_POST['newPasswordConfirm']){
|
||||
} elseif ($_POST['newPassword'] !== $_POST['newPasswordConfirm']) {
|
||||
$obj->error = __("Confirmation password does not match");
|
||||
die(json_encode($obj));
|
||||
}else{
|
||||
} else {
|
||||
$user->setPassword($_POST['newPassword']);
|
||||
$user->setRecoverPass("");
|
||||
if($user->save()){
|
||||
if ($user->save()) {
|
||||
$obj->success = __("Your Password has been set");
|
||||
die(json_encode($obj));
|
||||
}
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
header('Content-Type: application/json');
|
||||
if (empty($global['systemRootPath'])) {
|
||||
$global['systemRootPath'] = "../";
|
||||
$global['systemRootPath'] = '../';
|
||||
}
|
||||
require_once $global['systemRootPath'] . 'videos/configuration.php';
|
||||
require_once $global['systemRootPath'] . 'objects/user.php';
|
||||
|
@ -31,12 +31,12 @@ $fileData = base64DataToImage($_POST['imgBase64']);
|
|||
$fileName = 'background'. User::getId().'.png';
|
||||
$photoURL = $imagePath.$fileName;
|
||||
$bytes = file_put_contents($global['systemRootPath'].$photoURL, $fileData);
|
||||
if($bytes){
|
||||
if ($bytes) {
|
||||
$response = array(
|
||||
"status" => 'success',
|
||||
"url" => $global['systemRootPath'].$photoURL
|
||||
);
|
||||
}else{
|
||||
} else {
|
||||
$response = array(
|
||||
"status" => 'error',
|
||||
"msg" => 'We could not save this file',
|
||||
|
@ -49,4 +49,3 @@ $user->setBackgroundURL($photoURL);
|
|||
$user->save();
|
||||
User::updateSessionInfo();
|
||||
print json_encode($response);
|
||||
?>
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
<?php
|
||||
|
||||
header('Content-Type: application/json');
|
||||
if (empty($global['systemRootPath'])) {
|
||||
$global['systemRootPath'] = "../";
|
||||
$global['systemRootPath'] = '../';
|
||||
}
|
||||
require_once $global['systemRootPath'] . 'videos/configuration.php';
|
||||
require_once $global['systemRootPath'] . 'objects/user.php';
|
||||
|
@ -32,12 +31,12 @@ $fileData = base64DataToImage($_POST['imgBase64']);
|
|||
$fileName = 'photo'. User::getId().'.png';
|
||||
$photoURL = $imagePath.$fileName;
|
||||
$bytes = file_put_contents($global['systemRootPath'].$photoURL, $fileData);
|
||||
if($bytes){
|
||||
if ($bytes) {
|
||||
$response = array(
|
||||
"status" => 'success',
|
||||
"url" => $global['systemRootPath'].$photoURL
|
||||
);
|
||||
}else{
|
||||
} else {
|
||||
$response = array(
|
||||
"status" => 'error',
|
||||
"msg" => 'We could not save this file',
|
||||
|
@ -50,4 +49,3 @@ $user->setPhotoURL($photoURL);
|
|||
$user->save();
|
||||
User::updateSessionInfo();
|
||||
print json_encode($response);
|
||||
?>
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
header('Content-Type: application/json');
|
||||
if(empty($global['systemRootPath'])){
|
||||
$global['systemRootPath'] = "../";
|
||||
if (empty($global['systemRootPath'])) {
|
||||
$global['systemRootPath'] = '../';
|
||||
}
|
||||
require_once $global['systemRootPath'].'videos/configuration.php';
|
||||
require_once $global['systemRootPath'] . 'objects/user.php';
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
<?php
|
||||
|
||||
if(empty($global['systemRootPath'])){
|
||||
$global['systemRootPath'] = "../";
|
||||
if (empty($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';
|
||||
header('Content-Type: application/json');
|
||||
$users = User::getAllUsers();
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?php
|
||||
|
||||
if(empty($global['systemRootPath'])){
|
||||
$global['systemRootPath'] = "../";
|
||||
if (empty($global['systemRootPath'])) {
|
||||
$global['systemRootPath'] = '../';
|
||||
}
|
||||
require_once $global['systemRootPath'].'videos/configuration.php';
|
||||
require_once $global['systemRootPath'] . 'objects/userGroups.php';
|
||||
|
|
|
@ -273,10 +273,10 @@ class Video {
|
|||
$sql .= " AND v.status IN ('" . implode("','", Video::getViewableStatus()) . "')";
|
||||
if ($status == "viewableNotAd") {
|
||||
$sql .= " having videoAdsCount = 0 ";
|
||||
} else if ($status == "viewableAd") {
|
||||
} elseif ($status == "viewableAd") {
|
||||
$sql .= " having videoAdsCount > 0 ";
|
||||
}
|
||||
} else if (!empty($status)) {
|
||||
} elseif (!empty($status)) {
|
||||
$sql .= " AND v.status = '{$status}'";
|
||||
}
|
||||
|
||||
|
@ -285,16 +285,20 @@ class Video {
|
|||
}
|
||||
if (!empty($id)) {
|
||||
$sql .= " AND v.id = $id ";
|
||||
} else if (empty($random) && !empty($_GET['videoName'])) {
|
||||
} elseif (empty($random) && !empty($_GET['videoName'])) {
|
||||
$sql .= " AND clean_title = '{$_GET['videoName']}' ";
|
||||
} else if (!empty($random)) {
|
||||
} elseif (!empty($random)) {
|
||||
$sql .= " AND v.id != {$random} ";
|
||||
$sql .= " ORDER BY RAND() ";
|
||||
} else {
|
||||
$sql .= " ORDER BY v.Created DESC ";
|
||||
}
|
||||
$sql .= " LIMIT 1";
|
||||
//if(!empty($random))echo "<hr>".$sql;
|
||||
/*
|
||||
if (!empty($random)) {
|
||||
echo '<hr />'.$sql;
|
||||
}
|
||||
*/
|
||||
$res = $global['mysqli']->query($sql);
|
||||
if ($res) {
|
||||
require_once 'userGroups.php';
|
||||
|
@ -355,15 +359,15 @@ class Video {
|
|||
$sql .= " AND v.status IN ('" . implode("','", Video::getViewableStatus()) . "')";
|
||||
if ($status == "viewableNotAd") {
|
||||
$sql .= " having videoAdsCount = 0 ";
|
||||
} else if ($status == "viewableAd") {
|
||||
} elseif ($status == "viewableAd") {
|
||||
$sql .= " having videoAdsCount > 0 ";
|
||||
}
|
||||
} else if (!empty($status)) {
|
||||
} elseif (!empty($status)) {
|
||||
$sql .= " AND v.status = '{$status}'";
|
||||
}
|
||||
if ($showOnlyLoggedUserVideos === true && !User::isAdmin()) {
|
||||
$sql .= " AND v.users_id = '" . User::getId() . "'";
|
||||
} else if (!empty($showOnlyLoggedUserVideos)) {
|
||||
} elseif (!empty($showOnlyLoggedUserVideos)) {
|
||||
$sql .= " AND v.users_id = {$showOnlyLoggedUserVideos}";
|
||||
}
|
||||
|
||||
|
@ -421,15 +425,15 @@ class Video {
|
|||
$sql .= " AND v.status IN ('" . implode("','", Video::getViewableStatus()) . "')";
|
||||
if ($status == "viewableNotAd") {
|
||||
$sql .= " having videoAdsCount = 0 ";
|
||||
} else if ($status == "viewableAd") {
|
||||
} elseif ($status == "viewableAd") {
|
||||
$sql .= " having videoAdsCount > 0 ";
|
||||
}
|
||||
} else if (!empty($status)) {
|
||||
} elseif (!empty($status)) {
|
||||
$sql .= " AND status = '{$status}'";
|
||||
}
|
||||
if ($showOnlyLoggedUserVideos === true && !User::isAdmin()) {
|
||||
$sql .= " AND v.users_id = '" . User::getId() . "'";
|
||||
} else if (is_int($showOnlyLoggedUserVideos)) {
|
||||
} elseif (is_int($showOnlyLoggedUserVideos)) {
|
||||
$sql .= " AND v.users_id = {$showOnlyLoggedUserVideos}";
|
||||
}
|
||||
if (!empty($_GET['catName'])) {
|
||||
|
@ -622,28 +626,27 @@ class Video {
|
|||
return "00:00:00";
|
||||
} else {
|
||||
$duration = $durationParts[0];
|
||||
$durationParts = explode(":", $duration);
|
||||
if(count($durationParts) == 1){
|
||||
return "0:00:".static::addZero($durationParts[0]);
|
||||
}else if(count($durationParts)==2){
|
||||
return "0:".static::addZero($durationParts[0]).":".static::addZero($durationParts[1]);
|
||||
$durationParts = explode(':', $duration);
|
||||
if (count($durationParts) == 1) {
|
||||
return '0:00:'.static::addZero($durationParts[0]);
|
||||
} elseif (count($durationParts) == 2) {
|
||||
return '0:'.static::addZero($durationParts[0]).':'.static::addZero($durationParts[1]);
|
||||
}
|
||||
return $duration;
|
||||
}
|
||||
}
|
||||
|
||||
static private function addZero($str){
|
||||
if(intval($str) < 10){
|
||||
return "0".intval($str);
|
||||
}else{
|
||||
return $str;
|
||||
static private function addZero($str) {
|
||||
if (intval($str) < 10) {
|
||||
return '0'.intval($str);
|
||||
}
|
||||
return $str;
|
||||
}
|
||||
|
||||
static function getItemPropDuration($duration = "") {
|
||||
static function getItemPropDuration($duration = '') {
|
||||
$duration = static::getCleanDuration($duration);
|
||||
$parts = explode(":", $duration);
|
||||
return "PT" . intval($parts[0]) . "H" . intval($parts[1]) . "M" . intval($parts[2]) . "S";
|
||||
$parts = explode(':', $duration);
|
||||
return 'PT' . intval($parts[0]) . 'H' . intval($parts[1]) . 'M' . intval($parts[2]) . 'S';
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
header('Content-Type: application/json');
|
||||
if(empty($global['systemRootPath'])){
|
||||
$global['systemRootPath'] = "../";
|
||||
if (empty($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';
|
||||
if (!User::canUpload() || empty($_POST['id'])) {
|
||||
die('{"error":"'.__("Permission denied").'"}');
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
header('Content-Type: application/json');
|
||||
if(empty($global['systemRootPath'])){
|
||||
$global['systemRootPath'] = "../";
|
||||
if (empty($global['systemRootPath'])) {
|
||||
$global['systemRootPath'] = '../';
|
||||
}
|
||||
require_once $global['systemRootPath'].'videos/configuration.php';
|
||||
require_once $global['systemRootPath'] . 'objects/user.php';
|
||||
|
|
|
@ -1,9 +1,7 @@
|
|||
<?php
|
||||
|
||||
header('Content-Type: application/json');
|
||||
|
||||
if (empty($global['systemRootPath'])) {
|
||||
$global['systemRootPath'] = "../";
|
||||
$global['systemRootPath'] = '../';
|
||||
}
|
||||
require_once $global['systemRootPath'] . 'videos/configuration.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");
|
||||
echo json_encode($obj2);
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
header('Content-Type: application/json');
|
||||
if(empty($global['systemRootPath'])){
|
||||
$global['systemRootPath'] = "../";
|
||||
if (empty($global['systemRootPath'])) {
|
||||
$global['systemRootPath'] = '../';
|
||||
}
|
||||
require_once $global['systemRootPath'].'videos/configuration.php';
|
||||
require_once $global['systemRootPath'] . 'objects/user.php';
|
||||
|
|
|
@ -1,8 +1,7 @@
|
|||
<?php
|
||||
header('Content-Type: application/json');
|
||||
|
||||
if(empty($global['systemRootPath'])){
|
||||
$global['systemRootPath'] = "../";
|
||||
if (empty($global['systemRootPath'])) {
|
||||
$global['systemRootPath'] = '../';
|
||||
}
|
||||
require_once $global['systemRootPath'] .'videos/configuration.php';
|
||||
require_once $global['systemRootPath'] . 'objects/user.php';
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
header('Content-Type: application/json');
|
||||
if(empty($global['systemRootPath'])){
|
||||
$global['systemRootPath'] = "../";
|
||||
if (empty($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';
|
||||
if (!User::isAdmin() || empty($_POST['id'])) {
|
||||
die('{"error":"'.__("Permission denied").'"}');
|
||||
|
|
|
@ -54,15 +54,15 @@ class Video_ad {
|
|||
header('Content-Type: application/json');
|
||||
die('{"error":"' . __("Permission denied") . '"}');
|
||||
}
|
||||
if(empty($this->starts)){
|
||||
$this->starts = date("Y-m-d h:i:s");
|
||||
if (empty($this->starts)) {
|
||||
$this->starts = date('Y-m-d h:i:s');
|
||||
}
|
||||
if (empty($this->ad_title)) {
|
||||
return false;
|
||||
}
|
||||
if(empty($this->finish)){
|
||||
if (empty($this->finish)) {
|
||||
$finish = "NULL";
|
||||
}else{
|
||||
} else {
|
||||
$finish = "'{$this->finish}'";
|
||||
}
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
header('Content-Type: application/json');
|
||||
if(empty($global['systemRootPath'])){
|
||||
$global['systemRootPath'] = "../";
|
||||
if (empty($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 'video_ad.php';
|
||||
Video_ad::clickLog($_GET['video_ads_logs_id']);
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<?php
|
||||
header('Content-Type: application/json');
|
||||
if(empty($global['systemRootPath'])){
|
||||
$global['systemRootPath'] = "../";
|
||||
if (empty($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';
|
||||
if (!User::isAdmin() || empty($_POST['id'])) {
|
||||
die('{"error":"'.__("Permission denied").'"}');
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
<?php
|
||||
header('Content-Type: application/json');
|
||||
if(empty($global['systemRootPath'])){
|
||||
$global['systemRootPath'] = "../";
|
||||
if (empty($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';
|
||||
if (!User::isAdmin() || empty($_POST['id'])) {
|
||||
die('{"error":"'.__("Permission denied").'"}');
|
||||
}
|
||||
require 'video_ad.php';
|
||||
$va = new Video_ad("", "", "", "", $_POST['id']);
|
||||
$va = new Video_ad('', '', '', '', $_POST['id']);
|
||||
$va->setAd_title($_POST["title"]);
|
||||
$va->setStarts($_POST["starts"]);
|
||||
$va->setFinish($_POST["finish"]);
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
<?php
|
||||
|
||||
if (empty($global['systemRootPath'])) {
|
||||
$global['systemRootPath'] = "../";
|
||||
$global['systemRootPath'] = '../';
|
||||
}
|
||||
require_once $global['systemRootPath'] . 'videos/configuration.php';
|
||||
require_once $global['systemRootPath'] . 'objects/bootGrid.php';
|
||||
|
|
|
@ -4,11 +4,11 @@ require_once 'video.php';
|
|||
require_once $global['systemRootPath'] . 'objects/functions.php';
|
||||
header('Content-Type: application/json');
|
||||
$showOnlyLoggedUserVideos = true;
|
||||
if(User::isAdmin()){
|
||||
if (User::isAdmin()) {
|
||||
$showOnlyLoggedUserVideos = false;
|
||||
}
|
||||
$videos = Video::getAllVideos("", $showOnlyLoggedUserVideos, true);
|
||||
$total = Video::getTotalVideos("", $showOnlyLoggedUserVideos, true);
|
||||
$videos = Video::getAllVideos('', $showOnlyLoggedUserVideos, true);
|
||||
$total = Video::getTotalVideos('', $showOnlyLoggedUserVideos, true);
|
||||
foreach ($videos as $key => $value) {
|
||||
$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>";
|
||||
|
|
|
@ -29,9 +29,9 @@ if (!User::canUpload()) {
|
|||
$video = new Video("", "", @$_POST['videos_id']);
|
||||
$obj->video_id = @$_POST['videos_id'];
|
||||
$title = $video->getTitle();
|
||||
if(empty($title) && !empty($_POST['title'])){
|
||||
if (empty($title) && !empty($_POST['title'])) {
|
||||
$title = $video->setTitle($_POST['title']);
|
||||
}else if(empty($title)){
|
||||
} elseif (empty($title)) {
|
||||
$video->setTitle("Automatic Title");
|
||||
}
|
||||
$video->setDuration($_POST['duration']);
|
||||
|
@ -40,10 +40,10 @@ $video->setStatus('a');
|
|||
|
||||
$video->setVideoDownloadedLink($_POST['videoDownloadedLink']);
|
||||
|
||||
if(preg_match("/(mp3|wav|ogg)$/i", $_POST['format'])){
|
||||
if (preg_match("/(mp3|wav|ogg)$/i", $_POST['format'])) {
|
||||
$type = 'audio';
|
||||
$video->setType($type);
|
||||
}else if(preg_match("/(mp4|webm)$/i", $_POST['format'])){
|
||||
} elseif (preg_match("/(mp4|webm)$/i", $_POST['format'])) {
|
||||
$type = 'video';
|
||||
$video->setType($type);
|
||||
}
|
||||
|
@ -74,8 +74,8 @@ if(!empty($_FILES['image']['tmp_name']) && !file_exists("{$destination}.jpg")){
|
|||
die(json_encode($obj));
|
||||
}
|
||||
}
|
||||
if(!empty($_FILES['gifimage']['tmp_name']) && !file_exists("{$destination}.gif")){
|
||||
if(!move_uploaded_file ($_FILES['gifimage']['tmp_name'] , "{$destination}.gif")){
|
||||
if (!empty($_FILES['gifimage']['tmp_name']) && !file_exists("{$destination}.gif")) {
|
||||
if (!move_uploaded_file ($_FILES['gifimage']['tmp_name'] , "{$destination}.gif")) {
|
||||
$obj->msg = __("Could not move gif image file [{$destination}.gif]");
|
||||
error_log($obj->msg);
|
||||
die(json_encode($obj));
|
||||
|
@ -90,12 +90,7 @@ error_log("Files Received for video {$video_id}: ".$video->getTitle());
|
|||
die(json_encode($obj));
|
||||
|
||||
/*
|
||||
|
||||
error_log(print_r($_POST, true));
|
||||
error_log(print_r($_FILES, true));
|
||||
var_dump($_POST, $_FILES);
|
||||
|
||||
*/
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -2,10 +2,10 @@
|
|||
header('Content-Type: application/json');
|
||||
$obj = new stdClass();
|
||||
$obj->error = true;
|
||||
if(empty($global['systemRootPath'])){
|
||||
$global['systemRootPath'] = "../";
|
||||
if (empty($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/video.php';
|
||||
|
||||
|
@ -114,32 +114,32 @@ if (isset($_FILES['upl']) && $_FILES['upl']['error'] == 0) {
|
|||
if (!copy($_FILES['upl']['tmp_name'], "{$global['systemRootPath']}videos/original_" . $filename)) {
|
||||
die("Error on copy(" . $_FILES['upl']['tmp_name'] . ", " . "{$global['systemRootPath']}videos/original_" . $filename . ")");
|
||||
}
|
||||
} else if (array_key_exists('dontMoveUploadedFile', $_FILES['upl'])) {
|
||||
} elseif (array_key_exists('dontMoveUploadedFile', $_FILES['upl'])) {
|
||||
if (!rename($_FILES['upl']['tmp_name'], "{$global['systemRootPath']}videos/original_" . $filename)) {
|
||||
die("Error on rename(" . $_FILES['upl']['tmp_name'] . ", " . "{$global['systemRootPath']}videos/original_" . $filename . ")");
|
||||
}
|
||||
} else if (!move_uploaded_file($_FILES['upl']['tmp_name'], "{$global['systemRootPath']}videos/original_" . $filename)) {
|
||||
} elseif (!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
|
||||
$queue = array();
|
||||
if($video->getType() == 'video'){
|
||||
if($config->getEncode_mp4()){
|
||||
if ($video->getType() == 'video') {
|
||||
if ($config->getEncode_mp4()) {
|
||||
$queue[] = $video->queue("mp4");
|
||||
}
|
||||
if($config->getEncode_webm()){
|
||||
if ($config->getEncode_webm()) {
|
||||
$queue[] = $video->queue("webm");
|
||||
}
|
||||
}else if($config->getEncode_mp3spectrum()){
|
||||
if($config->getEncode_mp4()){
|
||||
} elseif ($config->getEncode_mp3spectrum()) {
|
||||
if ($config->getEncode_mp4()) {
|
||||
$queue[] = $video->queue("mp4_spectrum");
|
||||
}
|
||||
if($config->getEncode_webm()){
|
||||
if ($config->getEncode_webm()) {
|
||||
$queue[] = $video->queue("webm_spectrum");
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
$queue[] = $video->queue("mp3");
|
||||
$queue[] = $video->queue("ogg");
|
||||
}
|
||||
|
@ -159,8 +159,3 @@ if (isset($_FILES['upl']) && $_FILES['upl']['error'] == 0) {
|
|||
//echo '{"status":"error", "msg":' . json_encode($_FILES) . ', "type":"$_FILES Error"}';
|
||||
status(["status" => "error", "msg" => print_r($_FILES,true), "type" => '$_FILES Error']);
|
||||
exit;
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
|
|
@ -126,4 +126,3 @@ if ($client->getAccessToken()) {
|
|||
|
||||
}
|
||||
echo json_encode($obj);
|
||||
?>
|
|
@ -86,7 +86,7 @@ require_once $global['systemRootPath'] . 'objects/functions.php';
|
|||
$file = basename($filename); // $file is set to "index.php"
|
||||
$fileEx = basename($filename, ".css"); // $file is set to "index"
|
||||
$savedTheme = $config->getTheme();
|
||||
if($fileEx == $savedTheme){
|
||||
if ($fileEx == $savedTheme) {
|
||||
?>
|
||||
<script>
|
||||
$(document).ready(function () {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
*{
|
||||
font-family: Roboto,arial,sans-serif;
|
||||
* {
|
||||
font-family: Roboto, arial, sans-serif;
|
||||
font-size: 12px;
|
||||
}
|
||||
html,
|
||||
|
@ -9,16 +9,13 @@ body {
|
|||
body {
|
||||
padding-top: 60px;
|
||||
}
|
||||
|
||||
|
||||
.nopadding {
|
||||
padding: 0 !important;
|
||||
margin: 0 !important;
|
||||
}
|
||||
|
||||
.videoLink .duration{
|
||||
.videoLink .duration {
|
||||
position: absolute;
|
||||
background: rgba(0,0, 0, 0.6)!important;
|
||||
background: rgba(0, 0, 0, 0.6)!important;
|
||||
padding: 2px;
|
||||
color: #FFF;
|
||||
bottom: 5px;
|
||||
|
@ -26,53 +23,51 @@ body {
|
|||
font-size: 0.9em;
|
||||
border-radius: 5px;
|
||||
}
|
||||
.videoLink .glyphicon-play-circle{
|
||||
.videoLink .glyphicon-play-circle {
|
||||
transition: all 0.3s ease-in-out;
|
||||
top: 50%;
|
||||
left: 50%;
|
||||
margin: -25px 0 0 -25px;
|
||||
position: absolute;
|
||||
color: rgba(255,255, 255, 0.3)!important;
|
||||
color: rgba(255, 255, 255, 0.3)!important;
|
||||
font-size: 50px;
|
||||
}
|
||||
|
||||
.videoLink div{
|
||||
.videoLink div {
|
||||
transition: all 0.3s ease-in-out;
|
||||
font-size: 1em;
|
||||
}
|
||||
.videoLink div.details, .videoLink div.details div{
|
||||
.videoLink div.details,
|
||||
.videoLink div.details div {
|
||||
font-size: 0.9em;
|
||||
}
|
||||
|
||||
.gallery:hover .glyphicon-play-circle, .videoLink:hover .glyphicon-play-circle{
|
||||
color: rgba(255,255, 255, 0.6)!important;
|
||||
.gallery:hover .glyphicon-play-circle,
|
||||
.videoLink:hover .glyphicon-play-circle {
|
||||
color: rgba(255, 255, 255, 0.6)!important;
|
||||
}
|
||||
|
||||
|
||||
.bottom-border{
|
||||
.bottom-border {
|
||||
border-bottom: 2px solid #F2F2F2;
|
||||
margin: 0;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
h1,h2,h3,h4{
|
||||
h1,
|
||||
h2,
|
||||
h3,
|
||||
h4 {
|
||||
margin: 5px;
|
||||
padding: 5px;
|
||||
}
|
||||
|
||||
h1{
|
||||
h1 {
|
||||
font-size: 20px;
|
||||
}
|
||||
h2{
|
||||
h2 {
|
||||
font-size: 18px;
|
||||
}
|
||||
h3{
|
||||
h3 {
|
||||
font-size: 16px;
|
||||
}
|
||||
h4{
|
||||
h4 {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
footer {
|
||||
color: #444;
|
||||
padding: 25px;
|
||||
|
@ -83,7 +78,7 @@ footer {
|
|||
}
|
||||
footer .btn-outline:hover,
|
||||
footer .btn-outline:focus,
|
||||
footer .btn-outline:active{
|
||||
footer .btn-outline:active {
|
||||
color: #444;
|
||||
background: white;
|
||||
border: solid 2px white;
|
||||
|
@ -97,20 +92,18 @@ footer .btn-outline {
|
|||
}
|
||||
|
||||
/* for main video */
|
||||
|
||||
.video-content {
|
||||
flex:0 1 100%;
|
||||
height:50%;
|
||||
display:flex;
|
||||
justify-content:flex-start;
|
||||
flex: 0 1 100%;
|
||||
height: 50%;
|
||||
display: flex;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
.main-video{
|
||||
.main-video {
|
||||
background-color: #000;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
/* end for main video */
|
||||
|
||||
.form-compact .form-control {
|
||||
position: relative;
|
||||
height: auto;
|
||||
|
@ -124,16 +117,17 @@ footer .btn-outline {
|
|||
border-radius: 0;
|
||||
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-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-right-radius: 5px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.navbar-form {
|
||||
padding: 0;
|
||||
|
@ -142,17 +136,17 @@ footer .btn-outline {
|
|||
|
||||
/* Comments */
|
||||
.commenterName small {
|
||||
font-family:verdana;
|
||||
font-size:0.9em;
|
||||
font-family: verdana;
|
||||
font-size: 0.9em;
|
||||
}
|
||||
.commenterName {
|
||||
margin-right:5px;
|
||||
margin-right: 5px;
|
||||
}
|
||||
.commentText {
|
||||
clear: both;
|
||||
}
|
||||
.commentDetails {
|
||||
margin:0 0 0 60px;
|
||||
margin: 0 0 0 60px;
|
||||
}
|
||||
/* End Comments */
|
||||
|
||||
|
@ -175,17 +169,21 @@ footer .btn-outline {
|
|||
border: 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;
|
||||
}
|
||||
.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;
|
||||
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;
|
||||
}
|
||||
.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;
|
||||
}
|
||||
.tabbable-line > .nav-tabs > li.active {
|
||||
|
@ -213,40 +211,35 @@ footer .btn-outline {
|
|||
.nowrapCell td {
|
||||
white-space: normal !important;
|
||||
}
|
||||
|
||||
.watch8-action-buttons{
|
||||
.watch8-action-buttons {
|
||||
padding: 5px 10px 0 10px;
|
||||
margin: 5px 0 0 0;
|
||||
border-top: 2px solid #F2F2F2;
|
||||
}
|
||||
.bgWhite{
|
||||
.bgWhite {
|
||||
margin: 0 0 10px;
|
||||
border: 0;
|
||||
box-shadow: 0 1px 2px rgba(0,0,0,.1);
|
||||
box-shadow: 0 1px 2px rgba(0, 0, 0, .1);
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
padding: 10px;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.no-outline{
|
||||
.no-outline {
|
||||
border: 0;
|
||||
}
|
||||
|
||||
.no-outline:focus,
|
||||
.no-outline:active,
|
||||
.no-outline:hover{
|
||||
.no-outline:hover {
|
||||
background-color: transparent;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
#showMore{
|
||||
#showMore {
|
||||
padding: 20px;
|
||||
margin: 10px;
|
||||
border-top: 2px solid #F2F2F2;
|
||||
}
|
||||
|
||||
.watch-view-count {
|
||||
line-height: 24px;
|
||||
max-height: 24px;
|
||||
|
@ -256,11 +249,12 @@ footer .btn-outline {
|
|||
padding: -5px;
|
||||
border-bottom: 2px solid #167ac6;
|
||||
}
|
||||
|
||||
#likeBtn.myVote span, #likeBtn.myVote small {
|
||||
#likeBtn.myVote span,
|
||||
#likeBtn.myVote small {
|
||||
color: #167ac6;
|
||||
}
|
||||
#dislikeBtn.myVote span, #dislikeBtn.myVote small {
|
||||
#dislikeBtn.myVote span,
|
||||
#dislikeBtn.myVote small {
|
||||
color: #444;
|
||||
}
|
||||
|
||||
|
@ -268,14 +262,12 @@ footer .btn-outline {
|
|||
.material-switch > input[type="checkbox"] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.material-switch > label {
|
||||
cursor: pointer;
|
||||
height: 0px;
|
||||
position: relative;
|
||||
width: 40px;
|
||||
}
|
||||
|
||||
.material-switch > label::before {
|
||||
background: rgb(0, 0, 0);
|
||||
box-shadow: inset 0px 0px 10px rgba(0, 0, 0, 0.5);
|
||||
|
@ -283,7 +275,7 @@ footer .btn-outline {
|
|||
content: '';
|
||||
height: 16px;
|
||||
margin-top: -8px;
|
||||
position:absolute;
|
||||
position: absolute;
|
||||
opacity: 0.3;
|
||||
transition: all 0.4s ease-in-out;
|
||||
width: 40px;
|
||||
|
@ -311,7 +303,6 @@ footer .btn-outline {
|
|||
}
|
||||
/* fancy checkbox end */
|
||||
|
||||
|
||||
.label.fix-width {
|
||||
min-width: 130px !important;
|
||||
display: inline-block !important;
|
||||
|
@ -324,21 +315,22 @@ footer .btn-outline {
|
|||
text-align: right;
|
||||
border-top-right-radius: 0;
|
||||
border-bottom-right-radius: 0;
|
||||
border-top-left-radius: 0.25em;;
|
||||
border-bottom-left-radius: 0.25em;;
|
||||
border-top-left-radius: 0.25em;
|
||||
;
|
||||
border-bottom-left-radius: 0.25em;
|
||||
;
|
||||
}
|
||||
|
||||
.popover-content, .popover-title, .popover{
|
||||
color:#333 !important;
|
||||
.popover-content,
|
||||
.popover-title,
|
||||
.popover {
|
||||
color: #333 !important;
|
||||
}
|
||||
|
||||
.videosDetails{
|
||||
.videosDetails {
|
||||
padding-left: 20px;
|
||||
}
|
||||
|
||||
.divMainVideo .duration{
|
||||
.divMainVideo .duration {
|
||||
position: absolute;
|
||||
background: rgba(0,0, 0, 0.6)!important;
|
||||
background: rgba(0, 0, 0, 0.6)!important;
|
||||
padding: 3px;
|
||||
color: #FFF;
|
||||
bottom: 5px;
|
||||
|
@ -346,10 +338,9 @@ footer .btn-outline {
|
|||
font-size: 0.9em;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.gallery .duration{
|
||||
.gallery .duration {
|
||||
position: absolute;
|
||||
background: rgba(0,0, 0, 0.6)!important;
|
||||
background: rgba(0, 0, 0, 0.6)!important;
|
||||
padding: 3px;
|
||||
color: #FFF;
|
||||
top: 5px;
|
||||
|
@ -357,96 +348,111 @@ footer .btn-outline {
|
|||
font-size: 0.9em;
|
||||
border-radius: 5px;
|
||||
}
|
||||
|
||||
.gallery h2, .videosDetails .title{
|
||||
.gallery h2,
|
||||
.videosDetails .title {
|
||||
font-size: 1em;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
display: -webkit-box;
|
||||
line-height: 16px; /* fallback */
|
||||
max-height: 32px; /* fallback */
|
||||
min-height: 32px; /* fallback */
|
||||
line-height: 16px; /* fallback */
|
||||
max-height: 32px; /* fallback */
|
||||
min-height: 32px; /* fallback */
|
||||
-webkit-line-clamp: 2; /* number of lines to show */
|
||||
|
||||
-webkit-box-orient: vertical;
|
||||
}
|
||||
|
||||
.gallery .watch-view-count{
|
||||
.gallery .watch-view-count {
|
||||
font-size: 0.8em;
|
||||
font-weight: normal;
|
||||
border: 0;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.galleryVideo{
|
||||
.galleryVideo {
|
||||
overflow: hidden;
|
||||
height: 190px;
|
||||
border-bottom: solid 1px #EEE;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
|
||||
.galleryVideo .group {
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
|
||||
.autoplay span span{
|
||||
.autoplay span span {
|
||||
margin: 0 5px;
|
||||
font-weight: bold;
|
||||
}
|
||||
img.rotate90,
|
||||
img.rotate-270 {
|
||||
transform: rotate(90deg);
|
||||
-ms-transform: rotate(90deg);
|
||||
/* IE 9 */
|
||||
|
||||
-moz-transform: rotate(90deg);
|
||||
/* Firefox */
|
||||
|
||||
img.rotate90, img.rotate-270{
|
||||
transform:rotate(90deg);
|
||||
-ms-transform:rotate(90deg); /* IE 9 */
|
||||
-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 */
|
||||
}
|
||||
-webkit-transform: rotate(90deg);
|
||||
/* Safari and Chrome */
|
||||
|
||||
.subscribeButton{
|
||||
-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 {
|
||||
background-color: #e62117;
|
||||
color: #FFF;
|
||||
}
|
||||
.subscribeButton:hover, .subscribeButton:active, .subscribeButton:focus{
|
||||
.subscribeButton:hover,
|
||||
.subscribeButton:active,
|
||||
.subscribeButton:focus {
|
||||
background-color: #CC0000;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.subscribeButton span:before {
|
||||
content: "\f16a";
|
||||
}
|
||||
|
||||
.subscribeButton.subscribed{
|
||||
.subscribeButton.subscribed {
|
||||
background-color: #DDD;
|
||||
color: #777;
|
||||
}
|
||||
|
||||
.subscribeButton.subscribed span:before {
|
||||
content: "\f00c";
|
||||
}
|
||||
|
||||
.subscribeButton.subscribed:hover span:before {
|
||||
content: "\f057";
|
||||
}
|
||||
|
||||
.profileBg{
|
||||
.profileBg {
|
||||
padding: 20px;
|
||||
min-height: 200px;
|
||||
margin: 10px 0;
|
||||
|
@ -455,16 +461,14 @@ img.rotate270, img.rotate-90{
|
|||
-o-background-size: cover;
|
||||
background-size: cover;
|
||||
}
|
||||
|
||||
|
||||
#sidebar{
|
||||
#sidebar {
|
||||
width: 300px;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
height: 100vh;
|
||||
margin-top: 55px;
|
||||
}
|
||||
#sideBarContainer{
|
||||
#sideBarContainer {
|
||||
overflow-y: auto;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
|
@ -472,7 +476,7 @@ img.rotate270, img.rotate-90{
|
|||
height: 100%;
|
||||
width: 100%;
|
||||
}
|
||||
#sideBarContainer ul{
|
||||
#sideBarContainer ul {
|
||||
margin-bottom: 150px;
|
||||
}
|
||||
.navbar-brand {
|
||||
|
@ -483,15 +487,14 @@ img.rotate270, img.rotate-90{
|
|||
.navbar-brand>img {
|
||||
width: 120px;
|
||||
}
|
||||
|
||||
.list-inline {
|
||||
display: flex;
|
||||
justify-content: left;
|
||||
}
|
||||
footer ul.list-inline{
|
||||
footer ul.list-inline {
|
||||
justify-content: center;
|
||||
}
|
||||
footer ul.list-inline li{
|
||||
footer ul.list-inline li {
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
}
|
||||
|
@ -504,57 +507,54 @@ nav ul.items-container {
|
|||
padding: 0px;
|
||||
}
|
||||
nav ul.items-container,
|
||||
nav ul.items-container li{
|
||||
nav ul.items-container li {
|
||||
list-style: none;
|
||||
}
|
||||
nav ul.items-container li:first-child{
|
||||
nav ul.items-container li:first-child {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
}
|
||||
nav ul.items-container li:first-child ul.left-side{
|
||||
nav ul.items-container li:first-child ul.left-side {
|
||||
display: flex;
|
||||
align-items: center
|
||||
}
|
||||
nav ul.items-container li:last-child{
|
||||
nav ul.items-container li:last-child {
|
||||
margin-right: 20px;
|
||||
}
|
||||
|
||||
nav ul.items-container li ul.right-menus {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
}
|
||||
nav ul.items-container li ul.right-menus li{
|
||||
nav ul.items-container li ul.right-menus li {
|
||||
margin-left: 20px;
|
||||
}
|
||||
/** header **/
|
||||
|
||||
|
||||
.navbar .container{
|
||||
.navbar .container {
|
||||
padding: 0 2px;
|
||||
align-items: center;
|
||||
}
|
||||
.list-inline > li {
|
||||
display: flex;
|
||||
}
|
||||
.navbar .list-inline{
|
||||
.navbar .list-inline {
|
||||
margin: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
|
||||
/* Play List */
|
||||
.playlistList{
|
||||
.playlistList {
|
||||
height: 400px;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.playlistList .nav{
|
||||
.playlistList .nav {
|
||||
overflow-y: auto;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
.playlist-nav .navbar {
|
||||
padding: 0;
|
||||
max-height: none;
|
||||
|
@ -574,7 +574,7 @@ nav ul.items-container li ul.right-menus li{
|
|||
}
|
||||
/* End Play List */
|
||||
|
||||
.floatVideo{
|
||||
.floatVideo {
|
||||
position: fixed !important;
|
||||
width: 550px;
|
||||
top: 70px;
|
||||
|
@ -582,15 +582,15 @@ nav ul.items-container li ul.right-menus li{
|
|||
z-index: 100;
|
||||
overflow: visible;
|
||||
}
|
||||
.floatVideo #main-video{
|
||||
-webkit-box-shadow: 2px 0px 19px 2px rgba(0,0,0,1);
|
||||
-moz-box-shadow: 2px 0px 19px 2px rgba(0,0,0,1);
|
||||
box-shadow: 2px 0px 19px 2px rgba(0,0,0,1);
|
||||
.floatVideo #main-video {
|
||||
-webkit-box-shadow: 2px 0px 19px 2px rgba(0, 0, 0, 1);
|
||||
-moz-box-shadow: 2px 0px 19px 2px rgba(0, 0, 0, 1);
|
||||
box-shadow: 2px 0px 19px 2px rgba(0, 0, 0, 1);
|
||||
-webkit-border-radius: 5px;
|
||||
-moz-border-radius: 5px;
|
||||
border-radius: 5px;
|
||||
}
|
||||
#floatButtons{
|
||||
#floatButtons {
|
||||
z-index: 110;
|
||||
position: absolute;
|
||||
right: -10px;
|
||||
|
@ -598,21 +598,21 @@ nav ul.items-container li ul.right-menus li{
|
|||
}
|
||||
#floatButtons .btn-outline:hover,
|
||||
#floatButtons .btn-outline:focus,
|
||||
#floatButtons .btn-outline:active{
|
||||
color: rgba(255,255,255,1);
|
||||
background-color: rgba(0,0,0,0.5);
|
||||
#floatButtons .btn-outline:active {
|
||||
color: rgba(255, 255, 255, 1);
|
||||
background-color: rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
#floatButtons .btn-outline {
|
||||
color: rgba(255,255,255,0.3);
|
||||
background-color: rgba(0,0,0,0.1);
|
||||
color: rgba(255, 255, 255, 0.3);
|
||||
background-color: rgba(0, 0, 0, 0.1);
|
||||
transition: all 0.3s ease-in-out;
|
||||
border-radius: 10px;
|
||||
}
|
||||
|
||||
#videoContainer{
|
||||
overflow: visible;
|
||||
background: black;
|
||||
#videoContainer {
|
||||
overflow: visible;
|
||||
background: black;
|
||||
}
|
||||
|
||||
/** video manager progress bar */
|
||||
.progress {
|
||||
position: relative;
|
||||
|
@ -632,7 +632,6 @@ nav ul.items-container li ul.right-menus li{
|
|||
font-weight: 800;
|
||||
padding: 3px 10px 2px;
|
||||
}
|
||||
|
||||
.loader {
|
||||
border: 5px solid #f3f3f3; /* Light grey */
|
||||
border-top: 5px solid #3498db; /* Blue */
|
||||
|
@ -641,57 +640,58 @@ nav ul.items-container li ul.right-menus li{
|
|||
height: 30px;
|
||||
animation: spin 2s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
0% { transform: rotate(0deg); }
|
||||
100% { transform: rotate(360deg); }
|
||||
0% {
|
||||
transform: rotate(0deg);
|
||||
}
|
||||
100% {
|
||||
transform: rotate(360deg);
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 1200px) {
|
||||
.floatVideo{
|
||||
.floatVideo {
|
||||
width: 500px;
|
||||
}
|
||||
.galleryVideo{
|
||||
.galleryVideo {
|
||||
height: 195px;
|
||||
}
|
||||
}
|
||||
@media (max-width: 992px) {
|
||||
.floatVideo{
|
||||
.floatVideo {
|
||||
width: 450px;
|
||||
}
|
||||
.galleryVideo{
|
||||
.galleryVideo {
|
||||
height: 220px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 850px) {
|
||||
.galleryVideo{
|
||||
.galleryVideo {
|
||||
height: 180px;
|
||||
}
|
||||
}
|
||||
@media (max-width: 768px) {
|
||||
.galleryVideo{
|
||||
.galleryVideo {
|
||||
height: 290px;
|
||||
}
|
||||
}
|
||||
@media (max-width: 650px) {
|
||||
.galleryVideo{
|
||||
.galleryVideo {
|
||||
height: 250px;
|
||||
}
|
||||
}
|
||||
@media (max-width: 500px) {
|
||||
.floatVideo{
|
||||
.floatVideo {
|
||||
width: 380px;
|
||||
}
|
||||
.galleryVideo{
|
||||
.galleryVideo {
|
||||
height: 200px;
|
||||
}
|
||||
}
|
||||
@media (max-width: 400px) {
|
||||
.floatVideo{
|
||||
.floatVideo {
|
||||
width: 320px;
|
||||
}
|
||||
.galleryVideo{
|
||||
.galleryVideo {
|
||||
height: 180px;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,10 +1,16 @@
|
|||
.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: -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 */
|
||||
}
|
||||
background: -moz-linear-gradient(top, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.65) 100%);
|
||||
/* FF3.6-15 */
|
||||
|
||||
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 {
|
||||
color: #f12b24;
|
||||
background-color: #f12b24;
|
||||
|
@ -12,7 +18,6 @@ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', e
|
|||
.video-js:hover .vjs-play-progress {
|
||||
font-size: 1em !important;
|
||||
}
|
||||
|
||||
.video-js .vjs-big-play-button {
|
||||
height: 1.5em;
|
||||
width: 1.5em;
|
||||
|
@ -20,106 +25,95 @@ filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', e
|
|||
-moz-border-radius: 3em;
|
||||
border-radius: 3em;
|
||||
background-color: rgba(200, 200, 200, 0.1);
|
||||
-webkit-transition: all 0.4s;
|
||||
-moz-transition: all 0.4s;
|
||||
-o-transition: all 0.4s;
|
||||
transition: all 0.4s;
|
||||
-webkit-transition: all 0.4s;
|
||||
-moz-transition: all 0.4s;
|
||||
-o-transition: all 0.4s;
|
||||
transition: all 0.4s;
|
||||
}
|
||||
|
||||
.video-js:hover .vjs-big-play-button,
|
||||
.video-js .vjs-big-play-button:focus {
|
||||
background-color: rgba(200, 200, 200, 0.3);
|
||||
-webkit-transition: all 0.4s;
|
||||
-moz-transition: all 0.4s;
|
||||
-o-transition: all 0.4s;
|
||||
transition: all 0.4s;
|
||||
background-color: rgba(200, 200, 200, 0.3);
|
||||
-webkit-transition: all 0.4s;
|
||||
-moz-transition: all 0.4s;
|
||||
-o-transition: all 0.4s;
|
||||
transition: all 0.4s;
|
||||
}
|
||||
|
||||
.video-js .vjs-mouse-display:after, .video-js .vjs-play-progress:after, .video-js .vjs-time-tooltip{
|
||||
|
||||
background: rgba(0,0, 0, 0.6)!important;
|
||||
.video-js .vjs-mouse-display:after,
|
||||
.video-js .vjs-play-progress:after,
|
||||
.video-js .vjs-time-tooltip {
|
||||
background: rgba(0, 0, 0, 0.6)!important;
|
||||
padding: 2px;
|
||||
color: #FFF;
|
||||
font-size: 12px !important;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.video-js .vjs-load-progress {
|
||||
background-color: rgba(159,159,159,.8);
|
||||
background-color: rgba(159, 159, 159, .8);
|
||||
}
|
||||
.video-js .vjs-slider-horizontal {
|
||||
background-color: rgba(159,159,159,.3);
|
||||
background-color: rgba(159, 159, 159, .3);
|
||||
}
|
||||
|
||||
.vjs-rotate90 {
|
||||
rotate: 90;
|
||||
zoom: 1.0;
|
||||
}
|
||||
|
||||
/* Ad Elements */
|
||||
#adUrl{
|
||||
color: #DDD;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 80%;
|
||||
padding: 10px;
|
||||
font-size: 12px;
|
||||
text-shadow: -1px 0 #333, 0 1px #333, 1px 0 #333, 0 -1px #333, 0 0 0.3em black;
|
||||
white-space: nowrap;
|
||||
#adUrl {
|
||||
color: #DDD;
|
||||
position: absolute;
|
||||
left: 0;
|
||||
top: 80%;
|
||||
padding: 10px;
|
||||
font-size: 12px;
|
||||
text-shadow: -1px 0 #333, 0 1px #333, 1px 0 #333, 0 -1px #333, 0 0 0.3em black;
|
||||
white-space: nowrap;
|
||||
}
|
||||
#adUrl a{
|
||||
color: #DDD;
|
||||
#adUrl a {
|
||||
color: #DDD;
|
||||
}
|
||||
#adUrl a:hover{
|
||||
color: #FFF;
|
||||
text-decoration: underline;
|
||||
#adUrl a:hover {
|
||||
color: #FFF;
|
||||
text-decoration: underline;
|
||||
}
|
||||
#adButton{
|
||||
background-color: rgba(0, 0, 0, 0.7);
|
||||
-webkit-transition: all 0.4s;
|
||||
-moz-transition: all 0.4s;
|
||||
-o-transition: all 0.4s;
|
||||
transition: all 0.4s;
|
||||
color: #FFF;
|
||||
border: 1px solid #888;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 70%;
|
||||
padding: 10px;
|
||||
font-size: 16px;
|
||||
#adButton {
|
||||
background-color: rgba(0, 0, 0, 0.7);
|
||||
-webkit-transition: all 0.4s;
|
||||
-moz-transition: all 0.4s;
|
||||
-o-transition: all 0.4s;
|
||||
transition: all 0.4s;
|
||||
color: #FFF;
|
||||
border: 1px solid #888;
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 70%;
|
||||
padding: 10px;
|
||||
font-size: 16px;
|
||||
}
|
||||
#adButton:hover{
|
||||
background-color: rgba(0, 0, 0, 0.9);
|
||||
border: 1px solid #DDD;
|
||||
#adButton:hover {
|
||||
background-color: rgba(0, 0, 0, 0.9);
|
||||
border: 1px solid #DDD;
|
||||
}
|
||||
|
||||
.adControl{
|
||||
.adControl {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.ad .video-js .vjs-play-progress {
|
||||
color: #FC0;
|
||||
color: #FC0;
|
||||
background-color: #FC0;
|
||||
}
|
||||
|
||||
.ad .vjs-progress-control *{
|
||||
.ad .vjs-progress-control * {
|
||||
pointer-events: none !important;
|
||||
}
|
||||
|
||||
.ad .adControl{
|
||||
.ad .adControl {
|
||||
display: block;
|
||||
}
|
||||
/* End Ad Elements */
|
||||
|
||||
|
||||
.img-portrait {
|
||||
transform: scale(0.56) rotate(90deg);
|
||||
transform: scale(0.56) rotate(90deg);
|
||||
}
|
||||
|
||||
.embed-responsive-9by16 {
|
||||
padding-bottom: 100%;
|
||||
padding-bottom: 100%;
|
||||
}
|
||||
.video-js.vjs-9-16 {
|
||||
padding-top: 100%;
|
||||
padding-top: 100%;
|
||||
}
|
|
@ -1,5 +1,3 @@
|
|||
|
||||
|
||||
/*=========================
|
||||
Icons
|
||||
================= */
|
||||
|
@ -16,76 +14,77 @@ ul.social-network li {
|
|||
margin: 0 5px;
|
||||
}
|
||||
|
||||
|
||||
/* footer social icons */
|
||||
.social-network a.icoRss:hover {
|
||||
background-color: #F56505;
|
||||
background-color: #F56505;
|
||||
}
|
||||
.social-network a.icoFacebook:hover {
|
||||
background-color:#3B5998;
|
||||
background-color: #3B5998;
|
||||
}
|
||||
.social-network a.icoTwitter:hover {
|
||||
background-color:#33ccff;
|
||||
background-color: #33ccff;
|
||||
}
|
||||
.social-network a.icoGoogle:hover {
|
||||
background-color:#BD3518;
|
||||
background-color: #BD3518;
|
||||
}
|
||||
.social-network a.icoVimeo:hover {
|
||||
background-color:#0590B8;
|
||||
background-color: #0590B8;
|
||||
}
|
||||
.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.icoGoogle:hover i, .social-network a.icoVimeo:hover i, .social-network a.icoLinkedin:hover i {
|
||||
color:#fff;
|
||||
.social-network a.icoRss: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;
|
||||
}
|
||||
a.socialIcon:hover, .socialHoverClass {
|
||||
color:#44BCDD;
|
||||
a.socialIcon:hover,
|
||||
.socialHoverClass {
|
||||
color: #44BCDD;
|
||||
}
|
||||
|
||||
.social-circle li a {
|
||||
display:inline-block;
|
||||
position:relative;
|
||||
margin:0 auto 0 auto;
|
||||
-moz-border-radius:50%;
|
||||
-webkit-border-radius:50%;
|
||||
border-radius:50%;
|
||||
text-align:center;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
font-size:15px;
|
||||
display: inline-block;
|
||||
position: relative;
|
||||
margin: 0 auto 0 auto;
|
||||
-moz-border-radius: 50%;
|
||||
-webkit-border-radius: 50%;
|
||||
border-radius: 50%;
|
||||
text-align: center;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
font-size: 15px;
|
||||
}
|
||||
.social-circle li i {
|
||||
margin:0;
|
||||
line-height:30px;
|
||||
text-align: center;
|
||||
margin: 0;
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.social-circle li a:hover i, .triggeredHover {
|
||||
-moz-transform: rotate(360deg);
|
||||
-webkit-transform: rotate(360deg);
|
||||
-ms--transform: rotate(360deg);
|
||||
transform: rotate(360deg);
|
||||
-webkit-transition: all 0.2s;
|
||||
-moz-transition: all 0.2s;
|
||||
-o-transition: all 0.2s;
|
||||
-ms-transition: all 0.2s;
|
||||
transition: all 0.2s;
|
||||
.social-circle li a:hover i,
|
||||
.triggeredHover {
|
||||
-moz-transform: rotate(360deg);
|
||||
-webkit-transform: rotate(360deg);
|
||||
-ms--transform: rotate(360deg);
|
||||
transform: rotate(360deg);
|
||||
-webkit-transition: all 0.2s;
|
||||
-moz-transition: all 0.2s;
|
||||
-o-transition: all 0.2s;
|
||||
-ms-transition: all 0.2s;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
.social-circle i {
|
||||
color: #fff;
|
||||
-webkit-transition: all 0.8s;
|
||||
-moz-transition: all 0.8s;
|
||||
-o-transition: all 0.8s;
|
||||
-ms-transition: all 0.8s;
|
||||
transition: all 0.8s;
|
||||
color: #fff;
|
||||
-webkit-transition: all 0.8s;
|
||||
-moz-transition: all 0.8s;
|
||||
-o-transition: all 0.8s;
|
||||
-ms-transition: all 0.8s;
|
||||
transition: all 0.8s;
|
||||
}.social-circle a {
|
||||
background-color: #D3D3D3;
|
||||
}
|
||||
|
||||
.social-circle a {
|
||||
background-color: #D3D3D3;
|
||||
}
|
||||
|
||||
#shareDiv, #shareDiv .tabbable-panel{
|
||||
#shareDiv,
|
||||
#shareDiv .tabbable-panel {
|
||||
border-width: 0;
|
||||
}
|
|
@ -18,7 +18,7 @@
|
|||
var webSiteRootURL = '<?php echo $global['webSiteRootURL']; ?>';
|
||||
</script>
|
||||
<?php
|
||||
if(!$config->getDisable_analytics()){
|
||||
if (!$config->getDisable_analytics()) {
|
||||
?>
|
||||
<script>
|
||||
// YouPHPTube Analytics
|
||||
|
|
|
@ -29,10 +29,9 @@ $playlistVideos = PlayList::getVideosFromPlaylist($playlist_id);
|
|||
foreach ($playlistVideos as $value) {
|
||||
$class = "";
|
||||
$indicator = $count+1;
|
||||
if($count==$playlist_index){
|
||||
if ($count==$playlist_index) {
|
||||
$class .= " active";
|
||||
$indicator = '<span class="fa fa-play text-danger"></span>';
|
||||
|
||||
}
|
||||
?>
|
||||
<li class="<?php echo $class; ?>">
|
||||
|
|
|
@ -29,33 +29,33 @@ foreach ($files as $value) {
|
|||
break;
|
||||
}
|
||||
}
|
||||
if($obj->orphan){
|
||||
if(!empty($_GET['delete'])){
|
||||
if ($obj->orphan) {
|
||||
if (!empty($_GET['delete'])) {
|
||||
$file = $dir.$obj->dirFilename;
|
||||
unlink($file);
|
||||
}else{
|
||||
} else {
|
||||
$arrayOrphan[] = $obj;
|
||||
}
|
||||
}else{
|
||||
} else {
|
||||
$arrayNotOrphan[] = $obj;
|
||||
}
|
||||
$array[] = $obj;
|
||||
/*
|
||||
$file = "{$global['systemRootPath']}videos/original_{$video['filename']}";
|
||||
if(file_exists($file)){
|
||||
unlink($file);
|
||||
if (file_exists($file)) {
|
||||
unlink($file);
|
||||
}
|
||||
$file = "{$global['systemRootPath']}videos/{$video['filename']}.{$value}";
|
||||
if(file_exists($file)){
|
||||
unlink($file);
|
||||
if (file_exists($file)) {
|
||||
unlink($file);
|
||||
}
|
||||
$file = "{$global['systemRootPath']}videos/{$video['filename']}_progress_{$value}.txt";
|
||||
if(file_exists($file)){
|
||||
unlink($file);
|
||||
if (file_exists($file)) {
|
||||
unlink($file);
|
||||
}
|
||||
$file = "{$global['systemRootPath']}videos/{$video['filename']}.jpg";
|
||||
if(file_exists($file)){
|
||||
unlink($file);
|
||||
if (file_exists($file)) {
|
||||
unlink($file);
|
||||
}
|
||||
* */
|
||||
}
|
||||
|
@ -63,7 +63,7 @@ foreach ($files as $value) {
|
|||
function getMainName($filename) {
|
||||
preg_match("/([a-z0-9_]{1,}(\.[a-z0-9_]{5,})?)(\.[a-z0-9]{0,4})?$/i", $filename, $matches);
|
||||
$parts = explode("_progress_", $matches[1]);
|
||||
if(preg_match("/original_.*/", $parts[0])){
|
||||
if (preg_match("/original_.*/", $parts[0])) {
|
||||
$parts = explode("original_", $parts[0]);
|
||||
return $parts[1];
|
||||
}
|
||||
|
@ -86,14 +86,14 @@ function getMainName($filename) {
|
|||
|
||||
<div class="container">
|
||||
<?php
|
||||
if(empty($arrayOrphan)){
|
||||
if (empty($arrayOrphan)) {
|
||||
?>
|
||||
<h1 class="alert alert-success">
|
||||
<?php echo __("You dont have any orphan file"); ?>
|
||||
</h1>
|
||||
<?php
|
||||
|
||||
}else{
|
||||
} else {
|
||||
?>
|
||||
<ul class="list-group">
|
||||
<a href="#" id="deleteAll" class="list-group-item list-group-item-danger"><?php echo __("Delete All Orphans Files"); ?> <span class="badge"><?php echo count($arrayOrphan); ?></span> </a>
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
require_once '../videos/configuration.php';
|
||||
require_once $global['systemRootPath'] . 'objects/video.php';
|
||||
$video = Video::getVideo();
|
||||
if(empty($video)){
|
||||
if (empty($video)) {
|
||||
die(__("Video not found"));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue