diff --git a/locale/function.php b/locale/function.php index bb8d96d02c..8a53d7fe84 100644 --- a/locale/function.php +++ b/locale/function.php @@ -1,5 +1,5 @@ [:space:]'\"]+[[:alnum:]/]~", "\\0", $string); + "~[[:alpha:]]+://[^<>[:space:]'\"]+[[:alnum:]/]~", "\\0", + $string + ); } diff --git a/objects/Object.php b/objects/Object.php index 584505f3b0..41678669d8 100644 --- a/objects/Object.php +++ b/objects/Object.php @@ -1,7 +1,6 @@ load($id); } } - + static protected function getFromDb($id) { global $global; $id = intval($id); @@ -36,13 +34,13 @@ abstract class Object{ } return $user; } - + static function getAll() { global $global; $sql = "SELECT * FROM ".static::getTableName()." WHERE 1=1 "; $sql .= self::getSqlFromPost(); - + $res = $global['mysqli']->query($sql); $rows = array(); if ($res) { @@ -54,10 +52,9 @@ abstract class Object{ } return $rows; } - - + static function getTotal() { - //will receive + //will receive //current=1&rowCount=10&sort[sender]=asc&searchPhrase= global $global; $sql = "SELECT id FROM ".static::getTableName()." WHERE 1=1 "; @@ -70,82 +67,82 @@ abstract class Object{ return $res->num_rows; } - + 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 "; } return $sql; } - + 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']); - + $like = array(); $searchFields = static::getSearchFieldsNames(); foreach ($searchFields as $value) { $like[] = " {$value} LIKE '%{$search}%' "; } if(!empty($like)){ - $sql .= " AND (". implode(" OR ", $like).")"; + $sql .= " AND (". implode(" OR ", $like).")"; }else{ $sql .= " AND 1=1 "; } } - + 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}' "; - } + } } $sql .= implode(", ", $fields); $sql .= " WHERE id = {$this->id}"; } else { $sql = "INSERT INTO ".static::getTableName()." ( "; - $sql .= implode(",", $fieldsName). " )"; + $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}' "; } } @@ -153,7 +150,7 @@ abstract class Object{ } //echo $sql; $insert_row = $global['mysqli']->query($sql); - + if ($insert_row) { if (empty($this->id)) { $id = $global['mysqli']->insert_id; @@ -165,11 +162,11 @@ abstract class Object{ die($sql . ' Error : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error); } } - - 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()."'"; - + $res = $global['mysqli']->query($sql); $rows = array(); if ($res) { @@ -182,4 +179,3 @@ abstract class Object{ return $rows; } } - diff --git a/objects/bootGrid.php b/objects/bootGrid.php index 78f44b7cd2..71a3920afb 100644 --- a/objects/bootGrid.php +++ b/objects/bootGrid.php @@ -1,20 +1,19 @@ $value) { $orderBy[] = " {$keyPrefix}{$key} {$value} "; } $sql .= " ORDER BY ".implode(",", $orderBy); - }else{ + } else { //$sql .= " ORDER BY CREATED DESC "; } - + if(!empty($_POST['rowCount']) && !empty($_POST['current']) && $_POST['rowCount']>0){ $current = ($_POST['current']-1)*$_POST['rowCount']; $sql .= " LIMIT $current, {$_POST['rowCount']} "; @@ -24,27 +23,25 @@ class BootGrid { } return $sql; } - + static function getSqlSearchFromPost($searchFieldsNames = array()) { $sql = ""; if(!empty($_POST['searchPhrase'])){ global $global; $search = $global['mysqli']->real_escape_string($_POST['searchPhrase']); - + $like = array(); foreach ($searchFieldsNames as $value) { $like[] = " {$value} LIKE '%{$search}%' "; } if(!empty($like)){ - $sql .= " AND (". implode(" OR ", $like).")"; + $sql .= " AND (". implode(" OR ", $like).")"; }else{ $sql .= " AND 1=1 "; } } - + return $sql; } - - } diff --git a/objects/captcha.php b/objects/captcha.php index 37fff1d2eb..36184f2cbc 100644 --- a/objects/captcha.php +++ b/objects/captcha.php @@ -1,12 +1,11 @@ quantidade_letras = $quantidade_letras; } - - 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; - } - } - - -} \ No newline at end of file + return (strcasecmp($word, $_SESSION["palavra"]) == 0); + } + +} diff --git a/objects/categories.json.php b/objects/categories.json.php index b9e436d1d6..5ce045017e 100644 --- a/objects/categories.json.php +++ b/objects/categories.json.php @@ -1,5 +1,4 @@ $value) { $categories[$key]['iconHtml'] = ""; } -echo '{ "current": '.$_POST['current'].',"rowCount": '.$_POST['rowCount'].', "total": '.$total.', "rows":'. json_encode($categories).'}'; \ No newline at end of file +echo '{ "current": '.$_POST['current'].',"rowCount": '.$_POST['rowCount'].', "total": '.$total.', "rows":'. json_encode($categories).'}'; diff --git a/objects/category.php b/objects/category.php index 3c87a6c483..e1fe59e2fc 100644 --- a/objects/category.php +++ b/objects/category.php @@ -1,7 +1,6 @@ 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; } diff --git a/objects/categoryAddNew.json.php b/objects/categoryAddNew.json.php index af72a080c3..6e56842269 100644 --- a/objects/categoryAddNew.json.php +++ b/objects/categoryAddNew.json.php @@ -1,10 +1,9 @@ setName($_POST['name']); $obj->setClean_name($_POST['clean_name']); $obj->setIconClass($_POST['iconClass']); -echo '{"status":"'.$obj->save().'"}'; \ No newline at end of file +echo '{"status":"'.$obj->save().'"}'; diff --git a/objects/categoryDelete.json.php b/objects/categoryDelete.json.php index a4539ad6df..2bd4c303b2 100644 --- a/objects/categoryDelete.json.php +++ b/objects/categoryDelete.json.php @@ -1,7 +1,7 @@ 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,11 +40,11 @@ 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())"; + $sql = "INSERT INTO comments ( comment,users_id, videos_id, created, modified) VALUES ('{$this->comment}', {$id}, {$this->videos_id}, now(), now())"; } $resp = $global['mysqli']->query($sql); if(empty($resp)){ @@ -52,49 +52,44 @@ class Comment{ } return $resp; } - - - 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; - } + } private function getComment($id) { global $global; $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} "; } - + $sql .= BootGrid::getSqlFromPost(array('name')); - + $res = $global['mysqli']->query($sql); $comment = array(); if ($res) { @@ -108,22 +103,19 @@ 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; } - -} \ No newline at end of file +} diff --git a/objects/commentAddNew.json.php b/objects/commentAddNew.json.php index a417e87ff6..0237d25f5d 100644 --- a/objects/commentAddNew.json.php +++ b/objects/commentAddNew.json.php @@ -1,9 +1,9 @@ save().'"}'; \ No newline at end of file +echo '{"status":"'.$obj->save().'"}'; diff --git a/objects/comments.json.php b/objects/comments.json.php index 64a78c1559..34b855d7dc 100644 --- a/objects/comments.json.php +++ b/objects/comments.json.php @@ -11,5 +11,4 @@ foreach ($comments as $key => $value) { $comments[$key]['comment'] = '
'.$name.' '.humanTiming(strtotime($value['created'])).'
'. nl2br(textToLink($value['comment'])).'
'; } - echo '{ "current": '.$_POST['current'].',"rowCount": '.$_POST['rowCount'].', "total": '.$total.', "rows":'. json_encode($comments).'}'; diff --git a/objects/configuration.php b/objects/configuration.php index 6f2c7cd3e8..5aabb08a5b 100644 --- a/objects/configuration.php +++ b/objects/configuration.php @@ -1,7 +1,6 @@ theme)){ return "default"; diff --git a/objects/configurationUpdate.json.php b/objects/configurationUpdate.json.php index 687c20ce26..842666ee3d 100644 --- a/objects/configurationUpdate.json.php +++ b/objects/configurationUpdate.json.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()) { diff --git a/objects/functions.php b/objects/functions.php index 9b9aa39004..59174dc7e5 100644 --- a/objects/functions.php +++ b/objects/functions.php @@ -1,5 +1,4 @@ getCaptchaImage(); -?> \ No newline at end of file +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Ă¡ + +$capcha = new Captcha($largura, $altura, $tamanho_fonte, $quantidade_letras); +$capcha->getCaptchaImage(); diff --git a/objects/include_config.php b/objects/include_config.php index 4d544ee841..3c8e1d2410 100644 --- a/objects/include_config.php +++ b/objects/include_config.php @@ -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(); } diff --git a/objects/like.json.php b/objects/like.json.php index 182f7f5f63..cb9abe4c1e 100644 --- a/objects/like.json.php +++ b/objects/like.json.php @@ -3,4 +3,4 @@ require_once 'like.php'; require_once $global['systemRootPath'] . 'objects/user.php'; header('Content-Type: application/json'); $like = new Like($_GET['like'], $_POST['videos_id']); -echo json_encode(Like::getLikes($_POST['videos_id'])); \ No newline at end of file +echo json_encode(Like::getLikes($_POST['videos_id'])); diff --git a/objects/like.php b/objects/like.php index 4a9d2bad40..f8c9ac2f51 100644 --- a/objects/like.php +++ b/objects/like.php @@ -1,15 +1,15 @@ 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); $this->save(); } - + private function setLike($like) { $like = intval($like); if(!in_array($like, array(0,1,-1))){ @@ -33,92 +33,86 @@ 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; } } - + 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{ - $sql = "INSERT INTO likes ( `like`,users_id, videos_id, created, modified) VALUES ('{$this->like}', {$this->users_id}, {$this->videos_id}, now(), now())"; + } 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(); $obj->videos_id = $videos_id; $obj->likes = 0; $obj->dislikes = 0; $obj->myVote = self::getMyVote($videos_id); - + $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; } -} \ No newline at end of file +} diff --git a/objects/login.json.php b/objects/login.json.php index 3b4bcac2dd..3eea324de4 100644 --- a/objects/login.json.php +++ b/objects/login.json.php @@ -1,7 +1,7 @@ email; $name = $userProfile->displayName; $photoURL = $userProfile->photoURL; - $email = $userProfile->email; + $email = $userProfile->email; $pass = rand(); User::createUserIfNotExists($user, $pass, $name, $email, $photoURL); $userObject = new User(0, $user, $pass); $userObject->login(true); $adapter->disconnect(); header("Location: {$global['webSiteRootURL']}"); - + } catch (\Exception $e) { header("Location: {$global['webSiteRootURL']}user?error=".urlencode($e->getMessage())); //echo $e->getMessage(); diff --git a/objects/logoff.php b/objects/logoff.php index e6c21ab8d6..e84b7b1574 100644 --- a/objects/logoff.php +++ b/objects/logoff.php @@ -1,8 +1,8 @@ send()) { $obj->success = __("Message sent"); } - -echo json_encode($obj); \ No newline at end of file +echo json_encode($obj); diff --git a/objects/playListAddVideo.json.php b/objects/playListAddVideo.json.php index f0da6aff26..ded3883195 100644 --- a/objects/playListAddVideo.json.php +++ b/objects/playListAddVideo.json.php @@ -1,9 +1,9 @@ getUsers_id()) || empty($_POST['videos_id' return false; } -echo '{"status":"'.$obj->addVideo($_POST['videos_id'], $_POST['add']).'"}'; \ No newline at end of file +echo '{"status":"'.$obj->addVideo($_POST['videos_id'], $_POST['add']).'"}'; diff --git a/objects/playlist.php b/objects/playlist.php index ce4cf6c7cc..7b7e0be7d9 100644 --- a/objects/playlist.php +++ b/objects/playlist.php @@ -1,7 +1,6 @@ query($sql); } - + public function delete() { if(empty($this->id)){ return false; diff --git a/objects/playlistAddNew.json.php b/objects/playlistAddNew.json.php index a776f27203..fd9636059b 100644 --- a/objects/playlistAddNew.json.php +++ b/objects/playlistAddNew.json.php @@ -1,19 +1,19 @@ setName($_POST['name']); $obj->setStatus($_POST['status']); -echo '{"status":"'.$obj->save().'"}'; \ No newline at end of file +echo '{"status":"'.$obj->save().'"}'; diff --git a/objects/playlistRemove.php b/objects/playlistRemove.php index 7ba7bd4dbc..a603e2081b 100644 --- a/objects/playlistRemove.php +++ b/objects/playlistRemove.php @@ -1,9 +1,9 @@ getUsers_id()){ die('{"error":"'.__("Permission denied").'"}'); } -echo '{"status":"'.$obj->delete().'"}'; \ No newline at end of file +echo '{"status":"'.$obj->delete().'"}'; diff --git a/objects/playlistRemoveVideo.php b/objects/playlistRemoveVideo.php index 04989801e7..56f34bc4e4 100644 --- a/objects/playlistRemoveVideo.php +++ b/objects/playlistRemoveVideo.php @@ -1,9 +1,9 @@ getUsers_id()){ } $result = $obj->addVideo($_POST['video_id'], false); -echo '{"status":"'.$result.'"}'; \ No newline at end of file +echo '{"status":"'.$result.'"}'; diff --git a/objects/playlistRename.php b/objects/playlistRename.php index d4219a508a..d0042e1d32 100644 --- a/objects/playlistRename.php +++ b/objects/playlistRename.php @@ -1,9 +1,9 @@ getUsers_id()){ die('{"error":"'.__("Permission denied").'"}'); } $obj->setName($_POST['name']); -echo '{"status":"'.$obj->save().'"}'; \ No newline at end of file +echo '{"status":"'.$obj->save().'"}'; diff --git a/objects/playlists.json.php b/objects/playlists.json.php index 2a6e76e7c8..137e2dc8e6 100644 --- a/objects/playlists.json.php +++ b/objects/playlists.json.php @@ -2,4 +2,4 @@ require_once './playlist.php'; header('Content-Type: application/json'); $row = PlayList::getAllFromUser(User::getId(), false); -echo json_encode($row); \ No newline at end of file +echo json_encode($row); diff --git a/objects/status.json.php b/objects/status.json.php index 63180dcb43..be515389c4 100644 --- a/objects/status.json.php +++ b/objects/status.json.php @@ -1,6 +1,6 @@ max_file_size = get_max_file_size(); $obj->file_upload_max_size = file_upload_max_size(); $obj->videoStorageLimitMinutes = $global['videoStorageLimitMinutes']; $obj->currentStorageUsage = getSecondsTotalVideosLength(); -echo json_encode($obj); \ No newline at end of file +echo json_encode($obj); diff --git a/objects/subscribe.json.php b/objects/subscribe.json.php index 025a7c8a79..81badb4da6 100644 --- a/objects/subscribe.json.php +++ b/objects/subscribe.json.php @@ -1,19 +1,18 @@ 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)); } $subscribe = new Subscribe(0, $_POST['email'], $_POST['user_id']); $subscribe->toggle(); $obj->subscribe = $subscribe->getStatus(); -die(json_encode($obj)); \ No newline at end of file +die(json_encode($obj)); diff --git a/objects/subscribe.php b/objects/subscribe.php index 1d91ab508f..7b425e40fd 100644 --- a/objects/subscribe.php +++ b/objects/subscribe.php @@ -1,7 +1,6 @@ - + "; $script = " - +
#
- +
- +
#
- +
-
+
@@ -157,7 +157,7 @@ foreach ($videos as $value) { borderWidth: 1 }] }; - + var lineChartData = { labels: , datasets: [{ @@ -167,7 +167,7 @@ foreach ($videos as $value) { data: }] }; - + var lineChartDataToday = { labels: , datasets: [{ @@ -240,7 +240,7 @@ foreach ($videos as $value) { } } }); - + var myChartLineToday = new Chart(ctxLineToday, { type: 'line', data: lineChartDataToday, diff --git a/view/configurations.php b/view/configurations.php index dba8e3031d..547bf45381 100644 --- a/view/configurations.php +++ b/view/configurations.php @@ -39,31 +39,31 @@ require_once $global['systemRootPath'] . 'objects/functions.php';
-
+
and you have minutes of storage
-
% of your storage limit used
@@ -137,21 +137,21 @@ require_once $global['systemRootPath'] . 'objects/functions.php'; } ?> -
+
is Present -
+
Your server is , you must install Apache -
+
@@ -163,14 +163,14 @@ require_once $global['systemRootPath'] . 'objects/functions.php';
PHP is Present -
+
Your PHP version is , you must install PHP 5.6.x or greater -
+ @@ -182,7 +182,7 @@ require_once $global['systemRootPath'] . 'objects/functions.php';
Mod Rewrite module is Present -
+ @@ -195,7 +195,7 @@ require_once $global['systemRootPath'] . 'objects/functions.php'; Restart apache2 after
/etc/init.d/apache2 restart
- + @@ -206,7 +206,7 @@ require_once $global['systemRootPath'] . 'objects/functions.php';
Your videos directory is writable -
+ @@ -229,7 +229,7 @@ require_once $global['systemRootPath'] . 'objects/functions.php';
sudo chmod -R 777 
- + Your post_max_size is - + @@ -253,11 +253,11 @@ require_once $global['systemRootPath'] . 'objects/functions.php'; Your post_max_size is , it must be at least 100M
- Edit the php.ini file + Edit the php.ini file
sudo nano 
- + @@ -268,7 +268,7 @@ require_once $global['systemRootPath'] . 'objects/functions.php';
Your upload_max_filesize is -
+ @@ -277,11 +277,11 @@ require_once $global['systemRootPath'] . 'objects/functions.php'; Your upload_max_filesize is , it must be at least 100M
- Edit the php.ini file + Edit the php.ini file
sudo nano 
- + @@ -294,17 +294,17 @@ require_once $global['systemRootPath'] . 'objects/functions.php';
+
-
+
+
@@ -313,10 +313,10 @@ require_once $global['systemRootPath'] . 'objects/functions.php';
- +
- + @@ -370,7 +370,7 @@ require_once $global['systemRootPath'] . 'objects/functions.php';
- +
@@ -381,22 +381,22 @@ require_once $global['systemRootPath'] . 'objects/functions.php';
-
+
- +
getAutoplay())) { echo "checked"; } - ?>> + ?>>
- +
@@ -407,14 +407,14 @@ require_once $global['systemRootPath'] . 'objects/functions.php';
- +
" class="form-control" type="text" value="getAuthFacebook_id() ?>" >
- +
@@ -426,7 +426,7 @@ require_once $global['systemRootPath'] . 'objects/functions.php';
- +
@@ -437,14 +437,14 @@ require_once $global['systemRootPath'] . 'objects/functions.php';
- +
" class="form-control" type="text" value="getAuthGoogle_id() ?>" >
- +
@@ -464,98 +464,98 @@ require_once $global['systemRootPath'] . 'objects/functions.php';
- +
- +
- : https://encoder.youphptube.com/ or + : https://encoder.youphptube.com/ or
- +
- +
- +
getDisable_analytics())) { echo "checked"; } - ?> aria-describedby="disable_analyticsHelp"> + ?> aria-describedby="disable_analyticsHelp">
- - + +
- +
getSmtp())) { echo "checked"; } - ?> > + ?> >
- +
getSmtpAuth())) { echo "checked"; } - ?> > + ?> >
-
+
- +
- +
-
- +
+
- +
- +
-
- -
- -
- -
- -
- -
- -
-
- +
- +
- +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
- +
For Google Analytics code: https://analytics.google.com
@@ -578,7 +578,7 @@ require_once $global['systemRootPath'] . 'objects/functions.php';
- +
For Google AdSense code: https://www.google.com/adsense
diff --git a/view/contact.php b/view/contact.php index edfad2ff15..b2e66dca17 100644 --- a/view/contact.php +++ b/view/contact.php @@ -25,7 +25,7 @@ require_once '../videos/configuration.php';
- +
@@ -37,7 +37,7 @@ require_once '../videos/configuration.php';
- +
@@ -49,7 +49,7 @@ require_once '../videos/configuration.php';
- +
@@ -71,7 +71,7 @@ require_once '../videos/configuration.php';
- +
diff --git a/view/css/main.css b/view/css/main.css index ffbc555c97..08edf21d45 100644 --- a/view/css/main.css +++ b/view/css/main.css @@ -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; + 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); + border: 0; + 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:focus, +.no-outline:active, +.no-outline:hover { background-color: transparent; color: #000; } - -#showMore{ +#showMore { padding: 20px; - margin: 10px; + margin: 10px; border-top: 2px solid #F2F2F2; } - .watch-view-count { line-height: 24px; max-height: 24px; @@ -256,26 +249,25 @@ 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; } /* fancy checkbox */ .material-switch > input[type="checkbox"] { - display: none; + display: none; } - .material-switch > label { cursor: pointer; height: 0px; - position: relative; - width: 40px; + 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,34 +303,34 @@ footer .btn-outline { } /* fancy checkbox end */ - .label.fix-width { min-width: 130px !important; display: inline-block !important; text-align: left; border-top-left-radius: 0; border-bottom-left-radius: 0; -} +} .label.fix-width.label-primary { min-width: 70px !important; 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,17 +487,16 @@ 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; + align-items: center; } /** header **/ @@ -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{ - padding: 0 2px; +.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; } } diff --git a/view/css/player.css b/view/css/player.css index 1e063f7b40..8fbe3aeaec 100644 --- a/view/css/player.css +++ b/view/css/player.css @@ -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%; -} \ No newline at end of file + padding-top: 100%; +} diff --git a/view/css/social.css b/view/css/social.css index e70129bf61..87a1cc7bb8 100644 --- a/view/css/social.css +++ b/view/css/social.css @@ -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; -} \ No newline at end of file +} diff --git a/view/downloadExternalVideo.php b/view/downloadExternalVideo.php index ebfb45f60b..4dbdd4eecb 100644 --- a/view/downloadExternalVideo.php +++ b/view/downloadExternalVideo.php @@ -53,7 +53,7 @@ function isYoutubeDl() {
- +
@@ -63,7 +63,7 @@ function isYoutubeDl() {
\ No newline at end of file diff --git a/view/include/emailTemplate.php b/view/include/emailTemplate.php index 0c377ed60a..cc253b7edc 100644 --- a/view/include/emailTemplate.php +++ b/view/include/emailTemplate.php @@ -8,20 +8,20 @@ require_once '../../videos/configuration.php'; <?php echo $config->getWebSiteTitle(); ?> - + - + - +
<?php echo $config->getWebSiteTitle(); ?>
{message}
\ No newline at end of file diff --git a/view/include/head.php b/view/include/head.php index 651419fd63..29c5378c19 100644 --- a/view/include/head.php +++ b/view/include/head.php @@ -16,9 +16,9 @@ + getDisable_analytics()){ +if (!$config->getDisable_analytics()) { ?> + getHead(); diff --git a/view/include/navbar.php b/view/include/navbar.php index 3b7537569c..3b7b82e24e 100644 --- a/view/include/navbar.php +++ b/view/include/navbar.php @@ -50,7 +50,7 @@ if (empty($_SESSION['language'])) { + ?>
  • " data-placement="bottom" >
  • @@ -109,11 +109,11 @@ if (empty($_SESSION['language'])) {
    +
    diff --git a/view/managerAds.php b/view/managerAds.php index 1dfaa7c6c4..f7fd17f44e 100644 --- a/view/managerAds.php +++ b/view/managerAds.php @@ -67,7 +67,7 @@ $userGroups = UserGroups::getAllUsersGroups();
    - " required autofocus> + " required autofocus>
    @@ -75,7 +75,7 @@ $userGroups = UserGroups::getAllUsersGroups(); " required >
    - + " required > Leave Blank for Right Now
    @@ -102,7 +102,7 @@ $userGroups = UserGroups::getAllUsersGroups(); Leave Blank for Never
    - +
    -
    +
    @@ -135,7 +135,7 @@ $totalPages = ceil($total / $_POST['rowCount']);
    ! .
    - +
    diff --git a/view/modeYoutube.php b/view/modeYoutube.php index 4b538dff58..088ce6302c 100644 --- a/view/modeYoutube.php +++ b/view/modeYoutube.php @@ -132,7 +132,7 @@ if (!empty($video)) {
    - <?php echo str_replace('" class="img img-responsive rotate" height="130" itemprop="thumbnail" /> + <?php echo str_replace('" class="img img-responsive rotate" height="130" itemprop="thumbnail" /> " /> @@ -158,7 +158,7 @@ if (!empty($video)) {
    -
    +
    @@ -189,7 +189,7 @@ if (!empty($video)) {
    -
    +
    @@ -202,7 +202,7 @@ if (!empty($video)) { Sign in to add this video to a playlist.
    - + - " id="dislikeBtn" + " id="dislikeBtn" @@ -295,7 +295,7 @@ if (!empty($video)) { > - " id="likeBtn" + " id="likeBtn" @@ -351,19 +351,19 @@ if (!empty($video)) {
    -
    +
    : - +
    - +
    @@ -697,7 +697,7 @@ if (!empty($video)) {
    - +
    @@ -744,7 +744,7 @@ if (!empty($video)) {
    ! .
    - +
    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,8 +63,8 @@ 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])){ - $parts = explode("original_", $parts[0]); + if (preg_match("/original_.*/", $parts[0])) { + $parts = explode("original_", $parts[0]); return $parts[1]; } return $parts[0]; @@ -86,14 +86,14 @@ function getMainName($filename) {

      diff --git a/view/signUp.php b/view/signUp.php index a29d0948c2..383edb4eb5 100644 --- a/view/signUp.php +++ b/view/signUp.php @@ -27,7 +27,7 @@ require_once $global['systemRootPath'] . 'objects/user.php';
      - +
      @@ -37,7 +37,7 @@ require_once $global['systemRootPath'] . 'objects/user.php';
      - +
      @@ -47,7 +47,7 @@ require_once $global['systemRootPath'] . 'objects/user.php';
      - +
      @@ -57,7 +57,7 @@ require_once $global['systemRootPath'] . 'objects/user.php';
      - +
      @@ -67,7 +67,7 @@ require_once $global['systemRootPath'] . 'objects/user.php';
      - +
      diff --git a/view/user.php b/view/user.php index d0516d84aa..3e56e75e1b 100644 --- a/view/user.php +++ b/view/user.php @@ -40,7 +40,7 @@ foreach ($tags as $value) {
      - +
      @@ -50,7 +50,7 @@ foreach ($tags as $value) {
      - +
      @@ -60,7 +60,7 @@ foreach ($tags as $value) {
      - +
      @@ -70,7 +70,7 @@ foreach ($tags as $value) {
      - +
      @@ -80,7 +80,7 @@ foreach ($tags as $value) {
      - +
      @@ -247,7 +247,7 @@ foreach ($tags as $value) {
      - +
      @@ -258,7 +258,7 @@ foreach ($tags as $value) {
      - +
      diff --git a/view/videoEmbeded.php b/view/videoEmbeded.php index 9cf3377662..b617a44e49 100644 --- a/view/videoEmbeded.php +++ b/view/videoEmbeded.php @@ -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")); } @@ -53,16 +53,16 @@ if ($video['type'] !== "audio") { horse - + - + diff --git a/view/videosList.php b/view/videosList.php index fb920ae7cf..b4a6fa03f1 100644 --- a/view/videosList.php +++ b/view/videosList.php @@ -74,7 +74,7 @@ foreach ($videos as $key => $value) {
      : - +
      @@ -99,7 +99,7 @@ foreach ($videos as $key => $value) {
      +?>