mirror of
https://github.com/DanielnetoDotCom/YouPHPTube
synced 2025-10-03 01:39:24 +02:00
Merge remote-tracking branch 'origin/master' into julzxcapz-yp
This commit is contained in:
commit
e97ef28c31
29 changed files with 2982 additions and 4340 deletions
24
composer.lock
generated
24
composer.lock
generated
|
@ -281,16 +281,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "aws/aws-sdk-php",
|
"name": "aws/aws-sdk-php",
|
||||||
"version": "3.275.7",
|
"version": "3.276.3",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/aws/aws-sdk-php.git",
|
"url": "https://github.com/aws/aws-sdk-php.git",
|
||||||
"reference": "54dcef3349c81b46c0f5f6e54b5f9bfb5db19903"
|
"reference": "c8b38cfab677a3ec98e3f40bccd1a2bf851a014f"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/54dcef3349c81b46c0f5f6e54b5f9bfb5db19903",
|
"url": "https://api.github.com/repos/aws/aws-sdk-php/zipball/c8b38cfab677a3ec98e3f40bccd1a2bf851a014f",
|
||||||
"reference": "54dcef3349c81b46c0f5f6e54b5f9bfb5db19903",
|
"reference": "c8b38cfab677a3ec98e3f40bccd1a2bf851a014f",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -370,9 +370,9 @@
|
||||||
"support": {
|
"support": {
|
||||||
"forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
|
"forum": "https://forums.aws.amazon.com/forum.jspa?forumID=80",
|
||||||
"issues": "https://github.com/aws/aws-sdk-php/issues",
|
"issues": "https://github.com/aws/aws-sdk-php/issues",
|
||||||
"source": "https://github.com/aws/aws-sdk-php/tree/3.275.7"
|
"source": "https://github.com/aws/aws-sdk-php/tree/3.276.3"
|
||||||
},
|
},
|
||||||
"time": "2023-07-13T18:21:04+00:00"
|
"time": "2023-07-21T18:30:18+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "brick/math",
|
"name": "brick/math",
|
||||||
|
@ -3988,16 +3988,16 @@
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "stripe/stripe-php",
|
"name": "stripe/stripe-php",
|
||||||
"version": "v10.17.0",
|
"version": "v10.18.0",
|
||||||
"source": {
|
"source": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/stripe/stripe-php.git",
|
"url": "https://github.com/stripe/stripe-php.git",
|
||||||
"reference": "73383b44de153f4d602b90dad3ef075259bcecef"
|
"reference": "c32549e443a619d1b885b99d624568ecae82d6a0"
|
||||||
},
|
},
|
||||||
"dist": {
|
"dist": {
|
||||||
"type": "zip",
|
"type": "zip",
|
||||||
"url": "https://api.github.com/repos/stripe/stripe-php/zipball/73383b44de153f4d602b90dad3ef075259bcecef",
|
"url": "https://api.github.com/repos/stripe/stripe-php/zipball/c32549e443a619d1b885b99d624568ecae82d6a0",
|
||||||
"reference": "73383b44de153f4d602b90dad3ef075259bcecef",
|
"reference": "c32549e443a619d1b885b99d624568ecae82d6a0",
|
||||||
"shasum": ""
|
"shasum": ""
|
||||||
},
|
},
|
||||||
"require": {
|
"require": {
|
||||||
|
@ -4043,9 +4043,9 @@
|
||||||
],
|
],
|
||||||
"support": {
|
"support": {
|
||||||
"issues": "https://github.com/stripe/stripe-php/issues",
|
"issues": "https://github.com/stripe/stripe-php/issues",
|
||||||
"source": "https://github.com/stripe/stripe-php/tree/v10.17.0"
|
"source": "https://github.com/stripe/stripe-php/tree/v10.18.0"
|
||||||
},
|
},
|
||||||
"time": "2023-07-13T22:12:18+00:00"
|
"time": "2023-07-20T16:59:49+00:00"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "symfony/console",
|
"name": "symfony/console",
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1648,9 +1648,10 @@ if (!class_exists('Video')) {
|
||||||
$created = !empty($_POST['sort']['v.created']) ? $_POST['sort']['v.created'] : $_POST['sort']['created'];
|
$created = !empty($_POST['sort']['v.created']) ? $_POST['sort']['v.created'] : $_POST['sort']['created'];
|
||||||
unset($_POST['sort']);
|
unset($_POST['sort']);
|
||||||
$_POST['sort'] = array();
|
$_POST['sort'] = array();
|
||||||
|
if(strtoupper($created) === 'DESC'){
|
||||||
$_POST['sort']['v.`order`'] = 'IS NOT NULL DESC';
|
$_POST['sort']['v.`order`'] = 'IS NOT NULL DESC';
|
||||||
$_POST['sort']['`order`'] = 'ASC';
|
$_POST['sort']['`order`'] = 'ASC';
|
||||||
|
}
|
||||||
|
|
||||||
$_POST['sort']['v.created'] = $created;
|
$_POST['sort']['v.created'] = $created;
|
||||||
}
|
}
|
||||||
|
@ -1700,7 +1701,7 @@ if (!class_exists('Video')) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//echo $sql;//var_dump($_REQUEST['doNotShowCatChilds']);exit;
|
//echo $sql;//exit;
|
||||||
//_error_log("getAllVideos($status, $showOnlyLoggedUserVideos , $ignoreGroup , ". json_encode($videosArrayId).")" . $sql);
|
//_error_log("getAllVideos($status, $showOnlyLoggedUserVideos , $ignoreGroup , ". json_encode($videosArrayId).")" . $sql);
|
||||||
|
|
||||||
$timeLogName = TimeLogStart("video::getAllVideos");
|
$timeLogName = TimeLogStart("video::getAllVideos");
|
||||||
|
|
|
@ -63,7 +63,19 @@ if ($seconds_watching_video < 0) {
|
||||||
$seconds_watching_video = 0;
|
$seconds_watching_video = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Comparison and update
|
||||||
|
$current_time = time();
|
||||||
|
if (isset($_SESSION['addViewCount'][$_REQUEST['id']]['last_update_time'])) {
|
||||||
|
$elapsed_time = $current_time - $_SESSION['addViewCount'][$_REQUEST['id']]['last_update_time'];
|
||||||
|
if ($seconds_watching_video > $elapsed_time) {
|
||||||
|
$seconds_watching_video = $elapsed_time;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$_SESSION['addViewCount'][$_REQUEST['id']]['last_update_time'] = $current_time;
|
||||||
|
|
||||||
$obj2->seconds_watching_video = $seconds_watching_video;
|
$obj2->seconds_watching_video = $seconds_watching_video;
|
||||||
|
|
||||||
if (empty($_SESSION['addViewCount'][$_REQUEST['id']]['time'])) {
|
if (empty($_SESSION['addViewCount'][$_REQUEST['id']]['time'])) {
|
||||||
//_error_log("videos_statistics addView {$_REQUEST['id']} {$_SERVER['HTTP_USER_AGENT']} ".json_encode($_SESSION['addViewCount']));
|
//_error_log("videos_statistics addView {$_REQUEST['id']} {$_SERVER['HTTP_USER_AGENT']} ".json_encode($_SESSION['addViewCount']));
|
||||||
$resp = $obj->addView();
|
$resp = $obj->addView();
|
||||||
|
|
|
@ -20,6 +20,6 @@ Video::resetOrder();
|
||||||
foreach ($_REQUEST['videos'] as $key => $value) {
|
foreach ($_REQUEST['videos'] as $key => $value) {
|
||||||
$obj->responses[] = Video::updateOrder($value['videos_id'], $value['order']);
|
$obj->responses[] = Video::updateOrder($value['videos_id'], $value['order']);
|
||||||
}
|
}
|
||||||
$obj->error = empty($obj->responses);
|
$obj->error = empty($obj->responses) && !empty($_REQUEST['videos']);
|
||||||
mysqlCommit();
|
mysqlCommit();
|
||||||
echo json_encode($obj);
|
echo json_encode($obj);
|
||||||
|
|
|
@ -22,6 +22,7 @@ class VideoStatistic extends ObjectYPT {
|
||||||
protected $seconds_watching_video;
|
protected $seconds_watching_video;
|
||||||
protected $json;
|
protected $json;
|
||||||
protected $rewarded;
|
protected $rewarded;
|
||||||
|
protected $created_php_time;
|
||||||
|
|
||||||
public static function getSearchFieldsNames() {
|
public static function getSearchFieldsNames() {
|
||||||
return ['json', 'ip', 'when', 'user', 'name', 'email', 'channelName'];
|
return ['json', 'ip', 'when', 'user', 'name', 'email', 'channelName'];
|
||||||
|
@ -105,6 +106,10 @@ class VideoStatistic extends ObjectYPT {
|
||||||
$vs->setWhen(date("Y-m-d h:i:s"));
|
$vs->setWhen(date("Y-m-d h:i:s"));
|
||||||
} else {
|
} else {
|
||||||
$vs = new VideoStatistic($lastStatistic['id']);
|
$vs = new VideoStatistic($lastStatistic['id']);
|
||||||
|
$elapsedTime = time() - $vs->created_php_time;
|
||||||
|
if ($seconds_watching_video > $elapsedTime) {
|
||||||
|
$seconds_watching_video = $elapsedTime;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
$vs->setLastVideoTime($lastVideoTime);
|
$vs->setLastVideoTime($lastVideoTime);
|
||||||
$vs->setIp(getRealIpAddr());
|
$vs->setIp(getRealIpAddr());
|
||||||
|
|
289
package-lock.json
generated
289
package-lock.json
generated
|
@ -16,7 +16,7 @@
|
||||||
"flickity": "^3.0.0",
|
"flickity": "^3.0.0",
|
||||||
"flickity-bg-lazyload": "^2.0.0",
|
"flickity-bg-lazyload": "^2.0.0",
|
||||||
"fontawesome-free": "^1.0.4",
|
"fontawesome-free": "^1.0.4",
|
||||||
"hls.js": "^1.4.9",
|
"hls.js": "^1.4.10",
|
||||||
"infinite-scroll": "^4.0.1",
|
"infinite-scroll": "^4.0.1",
|
||||||
"inputmask": "^5.0.8",
|
"inputmask": "^5.0.8",
|
||||||
"jquery": "^3.7.0",
|
"jquery": "^3.7.0",
|
||||||
|
@ -32,13 +32,13 @@
|
||||||
"p2p-media-loader-hlsjs": "^0.6.2",
|
"p2p-media-loader-hlsjs": "^0.6.2",
|
||||||
"pouchdb": "^8.0.0",
|
"pouchdb": "^8.0.0",
|
||||||
"sweetalert": "^2.1.2",
|
"sweetalert": "^2.1.2",
|
||||||
"tinymce": "^6.4.2",
|
"tinymce": "^6.6.0",
|
||||||
"tinymce-langs": "^1.0.0",
|
"tinymce-langs": "^1.0.0",
|
||||||
"video.js": "^8.3.0",
|
"video.js": "^8.3.0",
|
||||||
"videojs-contrib-ads": "^7.2.0",
|
"videojs-contrib-ads": "^7.3.2",
|
||||||
"videojs-contrib-quality-levels": "^4.0.0",
|
"videojs-contrib-quality-levels": "^4.0.0",
|
||||||
"videojs-font": "^4.1.0",
|
"videojs-font": "^4.1.0",
|
||||||
"videojs-ima": "^2.1.0",
|
"videojs-ima": "^2.2.0",
|
||||||
"videojs-landscape-fullscreen": "^11.1111.0",
|
"videojs-landscape-fullscreen": "^11.1111.0",
|
||||||
"videojs-overlay": "^3.1.0",
|
"videojs-overlay": "^3.1.0",
|
||||||
"videojs-playlist": "^5.1.0",
|
"videojs-playlist": "^5.1.0",
|
||||||
|
@ -801,9 +801,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/hls.js": {
|
"node_modules/hls.js": {
|
||||||
"version": "1.4.9",
|
"version": "1.4.10",
|
||||||
"resolved": "https://registry.npmjs.org/hls.js/-/hls.js-1.4.9.tgz",
|
"resolved": "https://registry.npmjs.org/hls.js/-/hls.js-1.4.10.tgz",
|
||||||
"integrity": "sha512-i2BuNh7C7sd+wpW1V9p+P37KKCWNc6Ph/3BiPr+8nfJ7eZdtQQvSQUn2QwKU+7Fvc7b5BpS/lM6RJ3LUf+XbWg=="
|
"integrity": "sha512-wAVSj4Fm2MqOHy5+BlYnlKxXvJlv5IuZHjlzHu18QmjRzSDFQiUDWdHs5+NsFMQrgKEBwuWDcyvaMC9dUzJ5Uw=="
|
||||||
},
|
},
|
||||||
"node_modules/ieee754": {
|
"node_modules/ieee754": {
|
||||||
"version": "1.2.1",
|
"version": "1.2.1",
|
||||||
|
@ -1731,9 +1731,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/tinymce": {
|
"node_modules/tinymce": {
|
||||||
"version": "6.4.2",
|
"version": "6.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/tinymce/-/tinymce-6.4.2.tgz",
|
"resolved": "https://registry.npmjs.org/tinymce/-/tinymce-6.6.0.tgz",
|
||||||
"integrity": "sha512-te+4c8PoAwTKPMBQtMQehnSZlOO9Ay5tDgaRFJKBehYb6SlX2PYZ0v3oe/cmiv5EfqdwZLkEMXk2MNOeApZZLg=="
|
"integrity": "sha512-b9Mb7z8ryFOwLm8WCmlpwzdgOt1xD1u5Jjdh68B4QjkIyTLyHRBsfsrbiCUGonnVTymDlkexPkaP8sj24zexKQ=="
|
||||||
},
|
},
|
||||||
"node_modules/tinymce-langs": {
|
"node_modules/tinymce-langs": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
|
@ -1911,9 +1911,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/videojs-contrib-ads": {
|
"node_modules/videojs-contrib-ads": {
|
||||||
"version": "7.2.0",
|
"version": "7.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/videojs-contrib-ads/-/videojs-contrib-ads-7.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/videojs-contrib-ads/-/videojs-contrib-ads-7.3.2.tgz",
|
||||||
"integrity": "sha512-5DAO8BpD4mm/xKCGm4JhmIkjYOC+TByiO0XXInoc981Gr71xcFpO2wxPHMFrojhKROmYGWnYKcLsKNMkvYOWHg==",
|
"integrity": "sha512-O5zSqP9GePr8XDUgCKQoRdDr5dUX5GEbNx7s2R7LC/Pxn8L10x3RNCrijzO56bli7Vr5wAlTJgAk1dR5lqQ44A==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"global": "^4.3.2"
|
"global": "^4.3.2"
|
||||||
},
|
},
|
||||||
|
@ -1946,143 +1946,22 @@
|
||||||
"integrity": "sha512-X1LuPfLZPisPLrANIAKCknZbZu5obVM/ylfd1CN+SsCmPZQ3UMDPcvLTpPBJxcBuTpHQq2MO1QCFt7p8spnZ/w=="
|
"integrity": "sha512-X1LuPfLZPisPLrANIAKCknZbZu5obVM/ylfd1CN+SsCmPZQ3UMDPcvLTpPBJxcBuTpHQq2MO1QCFt7p8spnZ/w=="
|
||||||
},
|
},
|
||||||
"node_modules/videojs-ima": {
|
"node_modules/videojs-ima": {
|
||||||
"version": "2.1.0",
|
"version": "2.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/videojs-ima/-/videojs-ima-2.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/videojs-ima/-/videojs-ima-2.2.0.tgz",
|
||||||
"integrity": "sha512-Zb+J4by0d4FbserGOiSbdNo0U4vXSDuiPVCKFMksbaj4DO3mC8IpmvZ9Vci3tUwOhb/ladmUdhif9euSwq92Sw==",
|
"integrity": "sha512-VKg7mZsaiW89ko2Sjfz/sDcCbCTjj2OAkg8CakvCs9ZiVg20g6QYVtEWj249V/HTm0/1X01GEPk9hnIrRzgd+A==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@hapi/cryptiles": "^5.1.0",
|
"@hapi/cryptiles": "^5.1.0",
|
||||||
"can-autoplay": "^3.0.2",
|
"can-autoplay": "^3.0.2",
|
||||||
"extend": ">=3.0.2",
|
"extend": ">=3.0.2",
|
||||||
"videojs-contrib-ads": "^6.9.0"
|
"videojs-contrib-ads": "^6.9.0 || ^7"
|
||||||
},
|
},
|
||||||
"engines": {
|
"engines": {
|
||||||
"node": ">=0.8.0"
|
"node": ">=0.8.0"
|
||||||
},
|
},
|
||||||
"peerDependencies": {
|
"peerDependencies": {
|
||||||
"video.js": "^5.19.2 || ^6 || ^7"
|
"video.js": "^5.19.2 || ^6 || ^7 || ^8"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/videojs-ima/node_modules/@videojs/http-streaming": {
|
|
||||||
"version": "2.16.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@videojs/http-streaming/-/http-streaming-2.16.2.tgz",
|
|
||||||
"integrity": "sha512-etPTUdCFu7gUWc+1XcbiPr+lrhOcBu3rV5OL1M+3PDW89zskScAkkcdqYzP4pFodBPye/ydamQoTDScOnElw5A==",
|
|
||||||
"dependencies": {
|
|
||||||
"@babel/runtime": "^7.12.5",
|
|
||||||
"@videojs/vhs-utils": "3.0.5",
|
|
||||||
"aes-decrypter": "3.1.3",
|
|
||||||
"global": "^4.4.0",
|
|
||||||
"m3u8-parser": "4.8.0",
|
|
||||||
"mpd-parser": "^0.22.1",
|
|
||||||
"mux.js": "6.0.1",
|
|
||||||
"video.js": "^6 || ^7"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=8",
|
|
||||||
"npm": ">=5"
|
|
||||||
},
|
|
||||||
"peerDependencies": {
|
|
||||||
"video.js": "^6 || ^7"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/videojs-ima/node_modules/@videojs/http-streaming/node_modules/video.js": {
|
|
||||||
"version": "7.21.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/video.js/-/video.js-7.21.4.tgz",
|
|
||||||
"integrity": "sha512-R5e57M/5uqxQMQpFpybNbd8GtiRwFJPqkHjrhv0QTJ2tqnesbjETbck5kU5dhFr1FevsJRFhjBG4hAnvRGnXbw==",
|
|
||||||
"dependencies": {
|
|
||||||
"@babel/runtime": "^7.12.5",
|
|
||||||
"@videojs/http-streaming": "2.16.2",
|
|
||||||
"@videojs/vhs-utils": "^3.0.4",
|
|
||||||
"@videojs/xhr": "2.6.0",
|
|
||||||
"aes-decrypter": "3.1.3",
|
|
||||||
"global": "^4.4.0",
|
|
||||||
"keycode": "^2.2.0",
|
|
||||||
"m3u8-parser": "4.8.0",
|
|
||||||
"mpd-parser": "0.22.1",
|
|
||||||
"mux.js": "6.0.1",
|
|
||||||
"safe-json-parse": "4.0.0",
|
|
||||||
"videojs-font": "3.2.0",
|
|
||||||
"videojs-vtt.js": "^0.15.4"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/videojs-ima/node_modules/aes-decrypter": {
|
|
||||||
"version": "3.1.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/aes-decrypter/-/aes-decrypter-3.1.3.tgz",
|
|
||||||
"integrity": "sha512-VkG9g4BbhMBy+N5/XodDeV6F02chEk9IpgRTq/0bS80y4dzy79VH2Gtms02VXomf3HmyRe3yyJYkJ990ns+d6A==",
|
|
||||||
"dependencies": {
|
|
||||||
"@babel/runtime": "^7.12.5",
|
|
||||||
"@videojs/vhs-utils": "^3.0.5",
|
|
||||||
"global": "^4.4.0",
|
|
||||||
"pkcs7": "^1.0.4"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/videojs-ima/node_modules/mpd-parser": {
|
|
||||||
"version": "0.22.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/mpd-parser/-/mpd-parser-0.22.1.tgz",
|
|
||||||
"integrity": "sha512-fwBebvpyPUU8bOzvhX0VQZgSohncbgYwUyJJoTSNpmy7ccD2ryiCvM7oRkn/xQH5cv73/xU7rJSNCLjdGFor0Q==",
|
|
||||||
"dependencies": {
|
|
||||||
"@babel/runtime": "^7.12.5",
|
|
||||||
"@videojs/vhs-utils": "^3.0.5",
|
|
||||||
"@xmldom/xmldom": "^0.8.3",
|
|
||||||
"global": "^4.4.0"
|
|
||||||
},
|
|
||||||
"bin": {
|
|
||||||
"mpd-to-m3u8-json": "bin/parse.js"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/videojs-ima/node_modules/mux.js": {
|
|
||||||
"version": "6.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/mux.js/-/mux.js-6.0.1.tgz",
|
|
||||||
"integrity": "sha512-22CHb59rH8pWGcPGW5Og7JngJ9s+z4XuSlYvnxhLuc58cA1WqGDQPzuG8I+sPm1/p0CdgpzVTaKW408k5DNn8w==",
|
|
||||||
"dependencies": {
|
|
||||||
"@babel/runtime": "^7.11.2",
|
|
||||||
"global": "^4.4.0"
|
|
||||||
},
|
|
||||||
"bin": {
|
|
||||||
"muxjs-transmux": "bin/transmux.js"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=8",
|
|
||||||
"npm": ">=5"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/videojs-ima/node_modules/videojs-contrib-ads": {
|
|
||||||
"version": "6.9.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/videojs-contrib-ads/-/videojs-contrib-ads-6.9.0.tgz",
|
|
||||||
"integrity": "sha512-nzKz+jhCGMTYffSNVYrmp9p70s05v6jUMOY3Z7DpVk3iFrWK4Zi/BIkokDWrMoHpKjdmCdKzfJVBT+CrUj6Spw==",
|
|
||||||
"dependencies": {
|
|
||||||
"global": "^4.3.2",
|
|
||||||
"video.js": "^6 || ^7"
|
|
||||||
},
|
|
||||||
"engines": {
|
|
||||||
"node": ">=8",
|
|
||||||
"npm": ">=5"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/videojs-ima/node_modules/videojs-contrib-ads/node_modules/video.js": {
|
|
||||||
"version": "7.21.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/video.js/-/video.js-7.21.4.tgz",
|
|
||||||
"integrity": "sha512-R5e57M/5uqxQMQpFpybNbd8GtiRwFJPqkHjrhv0QTJ2tqnesbjETbck5kU5dhFr1FevsJRFhjBG4hAnvRGnXbw==",
|
|
||||||
"dependencies": {
|
|
||||||
"@babel/runtime": "^7.12.5",
|
|
||||||
"@videojs/http-streaming": "2.16.2",
|
|
||||||
"@videojs/vhs-utils": "^3.0.4",
|
|
||||||
"@videojs/xhr": "2.6.0",
|
|
||||||
"aes-decrypter": "3.1.3",
|
|
||||||
"global": "^4.4.0",
|
|
||||||
"keycode": "^2.2.0",
|
|
||||||
"m3u8-parser": "4.8.0",
|
|
||||||
"mpd-parser": "0.22.1",
|
|
||||||
"mux.js": "6.0.1",
|
|
||||||
"safe-json-parse": "4.0.0",
|
|
||||||
"videojs-font": "3.2.0",
|
|
||||||
"videojs-vtt.js": "^0.15.4"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"node_modules/videojs-ima/node_modules/videojs-font": {
|
|
||||||
"version": "3.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/videojs-font/-/videojs-font-3.2.0.tgz",
|
|
||||||
"integrity": "sha512-g8vHMKK2/JGorSfqAZQUmYYNnXmfec4MLhwtEFS+mMs2IDY398GLysy6BH6K+aS1KMNu/xWZ8Sue/X/mdQPliA=="
|
|
||||||
},
|
|
||||||
"node_modules/videojs-landscape-fullscreen": {
|
"node_modules/videojs-landscape-fullscreen": {
|
||||||
"version": "11.1111.0",
|
"version": "11.1111.0",
|
||||||
"resolved": "https://registry.npmjs.org/videojs-landscape-fullscreen/-/videojs-landscape-fullscreen-11.1111.0.tgz",
|
"resolved": "https://registry.npmjs.org/videojs-landscape-fullscreen/-/videojs-landscape-fullscreen-11.1111.0.tgz",
|
||||||
|
@ -2805,9 +2684,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"hls.js": {
|
"hls.js": {
|
||||||
"version": "1.4.9",
|
"version": "1.4.10",
|
||||||
"resolved": "https://registry.npmjs.org/hls.js/-/hls.js-1.4.9.tgz",
|
"resolved": "https://registry.npmjs.org/hls.js/-/hls.js-1.4.10.tgz",
|
||||||
"integrity": "sha512-i2BuNh7C7sd+wpW1V9p+P37KKCWNc6Ph/3BiPr+8nfJ7eZdtQQvSQUn2QwKU+7Fvc7b5BpS/lM6RJ3LUf+XbWg=="
|
"integrity": "sha512-wAVSj4Fm2MqOHy5+BlYnlKxXvJlv5IuZHjlzHu18QmjRzSDFQiUDWdHs5+NsFMQrgKEBwuWDcyvaMC9dUzJ5Uw=="
|
||||||
},
|
},
|
||||||
"ieee754": {
|
"ieee754": {
|
||||||
"version": "1.2.1",
|
"version": "1.2.1",
|
||||||
|
@ -3491,9 +3370,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"tinymce": {
|
"tinymce": {
|
||||||
"version": "6.4.2",
|
"version": "6.6.0",
|
||||||
"resolved": "https://registry.npmjs.org/tinymce/-/tinymce-6.4.2.tgz",
|
"resolved": "https://registry.npmjs.org/tinymce/-/tinymce-6.6.0.tgz",
|
||||||
"integrity": "sha512-te+4c8PoAwTKPMBQtMQehnSZlOO9Ay5tDgaRFJKBehYb6SlX2PYZ0v3oe/cmiv5EfqdwZLkEMXk2MNOeApZZLg=="
|
"integrity": "sha512-b9Mb7z8ryFOwLm8WCmlpwzdgOt1xD1u5Jjdh68B4QjkIyTLyHRBsfsrbiCUGonnVTymDlkexPkaP8sj24zexKQ=="
|
||||||
},
|
},
|
||||||
"tinymce-langs": {
|
"tinymce-langs": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
|
@ -3644,9 +3523,9 @@
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"videojs-contrib-ads": {
|
"videojs-contrib-ads": {
|
||||||
"version": "7.2.0",
|
"version": "7.3.2",
|
||||||
"resolved": "https://registry.npmjs.org/videojs-contrib-ads/-/videojs-contrib-ads-7.2.0.tgz",
|
"resolved": "https://registry.npmjs.org/videojs-contrib-ads/-/videojs-contrib-ads-7.3.2.tgz",
|
||||||
"integrity": "sha512-5DAO8BpD4mm/xKCGm4JhmIkjYOC+TByiO0XXInoc981Gr71xcFpO2wxPHMFrojhKROmYGWnYKcLsKNMkvYOWHg==",
|
"integrity": "sha512-O5zSqP9GePr8XDUgCKQoRdDr5dUX5GEbNx7s2R7LC/Pxn8L10x3RNCrijzO56bli7Vr5wAlTJgAk1dR5lqQ44A==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"global": "^4.3.2"
|
"global": "^4.3.2"
|
||||||
}
|
}
|
||||||
|
@ -3665,120 +3544,14 @@
|
||||||
"integrity": "sha512-X1LuPfLZPisPLrANIAKCknZbZu5obVM/ylfd1CN+SsCmPZQ3UMDPcvLTpPBJxcBuTpHQq2MO1QCFt7p8spnZ/w=="
|
"integrity": "sha512-X1LuPfLZPisPLrANIAKCknZbZu5obVM/ylfd1CN+SsCmPZQ3UMDPcvLTpPBJxcBuTpHQq2MO1QCFt7p8spnZ/w=="
|
||||||
},
|
},
|
||||||
"videojs-ima": {
|
"videojs-ima": {
|
||||||
"version": "2.1.0",
|
"version": "2.2.0",
|
||||||
"resolved": "https://registry.npmjs.org/videojs-ima/-/videojs-ima-2.1.0.tgz",
|
"resolved": "https://registry.npmjs.org/videojs-ima/-/videojs-ima-2.2.0.tgz",
|
||||||
"integrity": "sha512-Zb+J4by0d4FbserGOiSbdNo0U4vXSDuiPVCKFMksbaj4DO3mC8IpmvZ9Vci3tUwOhb/ladmUdhif9euSwq92Sw==",
|
"integrity": "sha512-VKg7mZsaiW89ko2Sjfz/sDcCbCTjj2OAkg8CakvCs9ZiVg20g6QYVtEWj249V/HTm0/1X01GEPk9hnIrRzgd+A==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"@hapi/cryptiles": "^5.1.0",
|
"@hapi/cryptiles": "^5.1.0",
|
||||||
"can-autoplay": "^3.0.2",
|
"can-autoplay": "^3.0.2",
|
||||||
"extend": ">=3.0.2",
|
"extend": ">=3.0.2",
|
||||||
"videojs-contrib-ads": "^6.9.0"
|
"videojs-contrib-ads": "^6.9.0 || ^7"
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"@videojs/http-streaming": {
|
|
||||||
"version": "2.16.2",
|
|
||||||
"resolved": "https://registry.npmjs.org/@videojs/http-streaming/-/http-streaming-2.16.2.tgz",
|
|
||||||
"integrity": "sha512-etPTUdCFu7gUWc+1XcbiPr+lrhOcBu3rV5OL1M+3PDW89zskScAkkcdqYzP4pFodBPye/ydamQoTDScOnElw5A==",
|
|
||||||
"requires": {
|
|
||||||
"@babel/runtime": "^7.12.5",
|
|
||||||
"@videojs/vhs-utils": "3.0.5",
|
|
||||||
"aes-decrypter": "3.1.3",
|
|
||||||
"global": "^4.4.0",
|
|
||||||
"m3u8-parser": "4.8.0",
|
|
||||||
"mpd-parser": "^0.22.1",
|
|
||||||
"mux.js": "6.0.1",
|
|
||||||
"video.js": "^6 || ^7"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"video.js": {
|
|
||||||
"version": "7.21.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/video.js/-/video.js-7.21.4.tgz",
|
|
||||||
"integrity": "sha512-R5e57M/5uqxQMQpFpybNbd8GtiRwFJPqkHjrhv0QTJ2tqnesbjETbck5kU5dhFr1FevsJRFhjBG4hAnvRGnXbw==",
|
|
||||||
"requires": {
|
|
||||||
"@babel/runtime": "^7.12.5",
|
|
||||||
"@videojs/http-streaming": "2.16.2",
|
|
||||||
"@videojs/vhs-utils": "^3.0.4",
|
|
||||||
"@videojs/xhr": "2.6.0",
|
|
||||||
"aes-decrypter": "3.1.3",
|
|
||||||
"global": "^4.4.0",
|
|
||||||
"keycode": "^2.2.0",
|
|
||||||
"m3u8-parser": "4.8.0",
|
|
||||||
"mpd-parser": "0.22.1",
|
|
||||||
"mux.js": "6.0.1",
|
|
||||||
"safe-json-parse": "4.0.0",
|
|
||||||
"videojs-font": "3.2.0",
|
|
||||||
"videojs-vtt.js": "^0.15.4"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"aes-decrypter": {
|
|
||||||
"version": "3.1.3",
|
|
||||||
"resolved": "https://registry.npmjs.org/aes-decrypter/-/aes-decrypter-3.1.3.tgz",
|
|
||||||
"integrity": "sha512-VkG9g4BbhMBy+N5/XodDeV6F02chEk9IpgRTq/0bS80y4dzy79VH2Gtms02VXomf3HmyRe3yyJYkJ990ns+d6A==",
|
|
||||||
"requires": {
|
|
||||||
"@babel/runtime": "^7.12.5",
|
|
||||||
"@videojs/vhs-utils": "^3.0.5",
|
|
||||||
"global": "^4.4.0",
|
|
||||||
"pkcs7": "^1.0.4"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mpd-parser": {
|
|
||||||
"version": "0.22.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/mpd-parser/-/mpd-parser-0.22.1.tgz",
|
|
||||||
"integrity": "sha512-fwBebvpyPUU8bOzvhX0VQZgSohncbgYwUyJJoTSNpmy7ccD2ryiCvM7oRkn/xQH5cv73/xU7rJSNCLjdGFor0Q==",
|
|
||||||
"requires": {
|
|
||||||
"@babel/runtime": "^7.12.5",
|
|
||||||
"@videojs/vhs-utils": "^3.0.5",
|
|
||||||
"@xmldom/xmldom": "^0.8.3",
|
|
||||||
"global": "^4.4.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"mux.js": {
|
|
||||||
"version": "6.0.1",
|
|
||||||
"resolved": "https://registry.npmjs.org/mux.js/-/mux.js-6.0.1.tgz",
|
|
||||||
"integrity": "sha512-22CHb59rH8pWGcPGW5Og7JngJ9s+z4XuSlYvnxhLuc58cA1WqGDQPzuG8I+sPm1/p0CdgpzVTaKW408k5DNn8w==",
|
|
||||||
"requires": {
|
|
||||||
"@babel/runtime": "^7.11.2",
|
|
||||||
"global": "^4.4.0"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"videojs-contrib-ads": {
|
|
||||||
"version": "6.9.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/videojs-contrib-ads/-/videojs-contrib-ads-6.9.0.tgz",
|
|
||||||
"integrity": "sha512-nzKz+jhCGMTYffSNVYrmp9p70s05v6jUMOY3Z7DpVk3iFrWK4Zi/BIkokDWrMoHpKjdmCdKzfJVBT+CrUj6Spw==",
|
|
||||||
"requires": {
|
|
||||||
"global": "^4.3.2",
|
|
||||||
"video.js": "^6 || ^7"
|
|
||||||
},
|
|
||||||
"dependencies": {
|
|
||||||
"video.js": {
|
|
||||||
"version": "7.21.4",
|
|
||||||
"resolved": "https://registry.npmjs.org/video.js/-/video.js-7.21.4.tgz",
|
|
||||||
"integrity": "sha512-R5e57M/5uqxQMQpFpybNbd8GtiRwFJPqkHjrhv0QTJ2tqnesbjETbck5kU5dhFr1FevsJRFhjBG4hAnvRGnXbw==",
|
|
||||||
"requires": {
|
|
||||||
"@babel/runtime": "^7.12.5",
|
|
||||||
"@videojs/http-streaming": "2.16.2",
|
|
||||||
"@videojs/vhs-utils": "^3.0.4",
|
|
||||||
"@videojs/xhr": "2.6.0",
|
|
||||||
"aes-decrypter": "3.1.3",
|
|
||||||
"global": "^4.4.0",
|
|
||||||
"keycode": "^2.2.0",
|
|
||||||
"m3u8-parser": "4.8.0",
|
|
||||||
"mpd-parser": "0.22.1",
|
|
||||||
"mux.js": "6.0.1",
|
|
||||||
"safe-json-parse": "4.0.0",
|
|
||||||
"videojs-font": "3.2.0",
|
|
||||||
"videojs-vtt.js": "^0.15.4"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"videojs-font": {
|
|
||||||
"version": "3.2.0",
|
|
||||||
"resolved": "https://registry.npmjs.org/videojs-font/-/videojs-font-3.2.0.tgz",
|
|
||||||
"integrity": "sha512-g8vHMKK2/JGorSfqAZQUmYYNnXmfec4MLhwtEFS+mMs2IDY398GLysy6BH6K+aS1KMNu/xWZ8Sue/X/mdQPliA=="
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"videojs-landscape-fullscreen": {
|
"videojs-landscape-fullscreen": {
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
"flickity": "^3.0.0",
|
"flickity": "^3.0.0",
|
||||||
"flickity-bg-lazyload": "^2.0.0",
|
"flickity-bg-lazyload": "^2.0.0",
|
||||||
"fontawesome-free": "^1.0.4",
|
"fontawesome-free": "^1.0.4",
|
||||||
"hls.js": "^1.4.9",
|
"hls.js": "^1.4.10",
|
||||||
"infinite-scroll": "^4.0.1",
|
"infinite-scroll": "^4.0.1",
|
||||||
"inputmask": "^5.0.8",
|
"inputmask": "^5.0.8",
|
||||||
"jquery": "^3.7.0",
|
"jquery": "^3.7.0",
|
||||||
|
@ -27,13 +27,13 @@
|
||||||
"p2p-media-loader-hlsjs": "^0.6.2",
|
"p2p-media-loader-hlsjs": "^0.6.2",
|
||||||
"pouchdb": "^8.0.0",
|
"pouchdb": "^8.0.0",
|
||||||
"sweetalert": "^2.1.2",
|
"sweetalert": "^2.1.2",
|
||||||
"tinymce": "^6.4.2",
|
"tinymce": "^6.6.0",
|
||||||
"tinymce-langs": "^1.0.0",
|
"tinymce-langs": "^1.0.0",
|
||||||
"video.js": "^8.3.0",
|
"video.js": "^8.3.0",
|
||||||
"videojs-contrib-ads": "^7.2.0",
|
"videojs-contrib-ads": "^7.3.2",
|
||||||
"videojs-contrib-quality-levels": "^4.0.0",
|
"videojs-contrib-quality-levels": "^4.0.0",
|
||||||
"videojs-font": "^4.1.0",
|
"videojs-font": "^4.1.0",
|
||||||
"videojs-ima": "^2.1.0",
|
"videojs-ima": "^2.2.0",
|
||||||
"videojs-landscape-fullscreen": "^11.1111.0",
|
"videojs-landscape-fullscreen": "^11.1111.0",
|
||||||
"videojs-overlay": "^3.1.0",
|
"videojs-overlay": "^3.1.0",
|
||||||
"videojs-playlist": "^5.1.0",
|
"videojs-playlist": "^5.1.0",
|
||||||
|
|
|
@ -245,12 +245,12 @@ class ADs extends PluginAbstract
|
||||||
{
|
{
|
||||||
global $global;
|
global $global;
|
||||||
if (isBot()) {
|
if (isBot()) {
|
||||||
return false;
|
return array();
|
||||||
}
|
}
|
||||||
$paths = self::getAdsPath($type, $is_regular_user);
|
$paths = self::getAdsPath($type, $is_regular_user);
|
||||||
|
|
||||||
if (empty($paths)) {
|
if (empty($paths)) {
|
||||||
return false;
|
return array();
|
||||||
}
|
}
|
||||||
|
|
||||||
$files = _glob($paths['path'], '/.png$/');
|
$files = _glob($paths['path'], '/.png$/');
|
||||||
|
@ -280,10 +280,8 @@ class ADs extends PluginAbstract
|
||||||
{
|
{
|
||||||
global $global;
|
global $global;
|
||||||
|
|
||||||
$emptyAd = ['adCode' => '', 'label' => '', 'paths' => array()];
|
|
||||||
|
|
||||||
if (isBot()) {
|
if (isBot()) {
|
||||||
return $emptyAd;
|
return ['adCode' => '', 'label' => '', 'paths' => array()];
|
||||||
}
|
}
|
||||||
|
|
||||||
if (empty($videos_id)) {
|
if (empty($videos_id)) {
|
||||||
|
@ -298,9 +296,15 @@ class ADs extends PluginAbstract
|
||||||
$users_id = 0;
|
$users_id = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
return self::getAdsFromUsersId($type, $users_id);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static function getAdsFromUsersId($type, $users_id)
|
||||||
|
{
|
||||||
$ad = AVideoPlugin::getObjectDataIfEnabled('ADs');
|
$ad = AVideoPlugin::getObjectDataIfEnabled('ADs');
|
||||||
if(empty($ad->$type)){
|
if(empty($ad->$type)){
|
||||||
return $emptyAd;
|
return ['adCode' => '', 'label' => '', 'paths' => array()];
|
||||||
}
|
}
|
||||||
$label = '';
|
$label = '';
|
||||||
eval("\$label = \$ad->{$type}Label;");
|
eval("\$label = \$ad->{$type}Label;");
|
||||||
|
@ -325,7 +329,6 @@ class ADs extends PluginAbstract
|
||||||
return ['adCode' => $adCode, 'label' => $label, 'paths' => $array['paths']];
|
return ['adCode' => $adCode, 'label' => $label, 'paths' => $array['paths']];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
public static function getAdsCode($type)
|
public static function getAdsCode($type)
|
||||||
{
|
{
|
||||||
global $global;
|
global $global;
|
||||||
|
@ -349,6 +352,34 @@ class ADs extends PluginAbstract
|
||||||
return $adCode;
|
return $adCode;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function getAdsCodeReason($type)
|
||||||
|
{
|
||||||
|
$reasons = array();
|
||||||
|
if (isBot()) {
|
||||||
|
$reasons[] = 'Is a bot';
|
||||||
|
}
|
||||||
|
$videos_id = 0;
|
||||||
|
if (empty($videos_id)) {
|
||||||
|
$videos_id = getVideos_id();
|
||||||
|
}
|
||||||
|
$reasons[] = 'videos_id='.$videos_id;
|
||||||
|
$ad = AVideoPlugin::getObjectDataIfEnabled('ADs');
|
||||||
|
if (!empty($ad)) {
|
||||||
|
if (isMobile()) {
|
||||||
|
$type = $type . 'Mobile';
|
||||||
|
}
|
||||||
|
$adC = self::getAdsFromVideosId($type, $videos_id);
|
||||||
|
$reasons[] = 'type='.$type;
|
||||||
|
$reasons[] = 'label='.$adC['label'];
|
||||||
|
if(empty($adC['adCode'])){
|
||||||
|
$reasons[] = 'adCode is empty';
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
$reasons[] = 'ADs plugin disabled';
|
||||||
|
}
|
||||||
|
return $reasons;
|
||||||
|
}
|
||||||
|
|
||||||
public static function getSize($type)
|
public static function getSize($type)
|
||||||
{
|
{
|
||||||
$obj = AVideoPlugin::getObjectData("ADs");
|
$obj = AVideoPlugin::getObjectData("ADs");
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,3 +1,6 @@
|
||||||
|
<?php
|
||||||
|
saveRequestVars();
|
||||||
|
?>
|
||||||
<div class="row mainArea">
|
<div class="row mainArea">
|
||||||
<?php
|
<?php
|
||||||
if (!empty($currentCat)) {
|
if (!empty($currentCat)) {
|
||||||
|
@ -163,3 +166,6 @@
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
<?php
|
||||||
|
restoreRequestVars();
|
||||||
|
?>
|
|
@ -1,72 +1,45 @@
|
||||||
<?php
|
<?php
|
||||||
if(empty($obj) || !isset($obj->categoriesTopButtonsFluid)){
|
if (empty($obj) || !isset($obj->categoriesTopButtonsFluid)) {
|
||||||
$obj = AVideoPlugin::loadPlugin('Layout');
|
$obj = AVideoPlugin::loadPlugin('Layout');
|
||||||
}
|
}
|
||||||
?>
|
global $advancedCustom;
|
||||||
<style>
|
$_rowCount = getRowCount();
|
||||||
.categoriesTobButtons{
|
$current = getCurrentPage();
|
||||||
border: none;
|
$_REQUEST['rowCount'] = 1000;
|
||||||
|
$_REQUEST['current'] = 1;
|
||||||
|
$parsed_cats = array();
|
||||||
|
$categories = Category::getAllCategories();
|
||||||
|
$_REQUEST['rowCount'] = $_rowCount;
|
||||||
|
$_REQUEST['current'] = $current;
|
||||||
|
$items = array();
|
||||||
|
foreach ($categories as $value) {
|
||||||
|
if ($value['parentId']) {
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
.categoriesTobButtons li a{
|
if ($advancedCustom->ShowAllVideosOnCategory) {
|
||||||
border-radius:23px;
|
$total = $value['fullTotal'];
|
||||||
|
} else {
|
||||||
|
$total = $value['total'];
|
||||||
}
|
}
|
||||||
</style>
|
if (empty($total)) {
|
||||||
<div class="container-fluid">
|
continue;
|
||||||
<div class="row">
|
}
|
||||||
<div class="<?php echo empty($obj->categoriesTopButtonsFluid) ? '' : 'col-lg-10 col-lg-offset-1'; ?>">
|
if (in_array($value['id'], $parsed_cats)) {
|
||||||
|
continue;
|
||||||
<center>
|
}
|
||||||
<ul class="nav nav-tabs nav-tabs-horizontal categoriesTobButtons" >
|
$label = '<i class="' . (empty($value['iconClass']) ? "fa fa-folder" : $value['iconClass']) . '"></i> '
|
||||||
<?php
|
. '<span class="">' . __($value['name']) . '</span>';
|
||||||
global $advancedCustom;
|
if (!empty($obj->categoriesTopButtonsShowVideosCount)) {
|
||||||
$_rowCount = getRowCount();
|
$label .= ' <span class="badge">' . $total . '</span>';
|
||||||
$current = getCurrentPage();
|
}
|
||||||
$_REQUEST['rowCount'] = 1000;
|
$items[] = array(
|
||||||
$_REQUEST['current'] = 1;
|
'href' => Category::getCategoryLinkFromName($value['clean_name']),
|
||||||
$parsed_cats = array();
|
'tooltip' => __($value['name']),
|
||||||
$categories = Category::getAllCategories();
|
'onclick' => '',
|
||||||
foreach ($categories as $value) {
|
'label' => $label,
|
||||||
if ($value['parentId']) {
|
'isActive' => $value['clean_name'] == @$_REQUEST['catName'],
|
||||||
continue;
|
'clean_name' => $value['clean_name']
|
||||||
}
|
);
|
||||||
if ($advancedCustom->ShowAllVideosOnCategory) {
|
}
|
||||||
$total = $value['fullTotal'];
|
//var_dump($_REQUEST['catName'], $items);exit;
|
||||||
} else {
|
generateHorizontalFlickity($items);
|
||||||
$total = $value['total'];
|
|
||||||
}
|
|
||||||
if (empty($total)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
if (in_array($value['id'], $parsed_cats)) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
<li data-toggle="tooltip" title="<?php echo __($value['name']); ?>" data-placement="bottom"
|
|
||||||
class="<?php echo ($value['clean_name'] == @$_REQUEST['catName'] ? "active" : ""); ?>">
|
|
||||||
<a href="<?php echo Category::getCategoryLinkFromName($value['clean_name']); ?>" >
|
|
||||||
<?php
|
|
||||||
echo '<i class="' . (empty($value['iconClass']) ? "fa fa-folder" : $value['iconClass']) . '"></i> '
|
|
||||||
. '<span class="">' . __($value['name']) . '</span>';
|
|
||||||
if (!empty($obj->categoriesTopButtonsShowVideosCount)) {
|
|
||||||
echo ' <span class="badge">' . $total . '</span>';
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</a>
|
|
||||||
</li>
|
|
||||||
<?php
|
|
||||||
}
|
|
||||||
$_REQUEST['rowCount'] = $_rowCount;
|
|
||||||
$_REQUEST['current'] = $current;
|
|
||||||
/*
|
|
||||||
for ($i = 0; $i < 100; $i++) {
|
|
||||||
?> <li data-toggle="tooltip" title="<?php echo __($i); ?>" data-placement="bottom"> <a href="#"> <?php echo '<i class="fa fa-folder"></i> <span class="hidden-xs">' . $i . '</span>';
|
|
||||||
if (!empty($obj->categoriesTopButtonsShowVideosCount)) {
|
|
||||||
echo ' <span class="badge">' . $i . '</span>';
|
|
||||||
} ?> </a> </li> <?php }
|
|
||||||
*/
|
|
||||||
?>
|
|
||||||
</ul>
|
|
||||||
</center>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
|
@ -123,3 +123,69 @@ foreach ($rows as $key => $value) {
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
<?php
|
||||||
|
$videosData = [];
|
||||||
|
foreach ($data as $value) {
|
||||||
|
$videosId = $value['videos_id'];
|
||||||
|
$reward = $value['total_reward'];
|
||||||
|
$title = $value['title'];
|
||||||
|
|
||||||
|
// If this videos_id is already in the $videosData array, update its reward, otherwise add it as a new entry.
|
||||||
|
if (isset($videosData[$videosId])) {
|
||||||
|
$videosData[$videosId]['reward'] += $reward;
|
||||||
|
} else {
|
||||||
|
$videosData[$videosId] = [
|
||||||
|
'reward' => $reward,
|
||||||
|
'title' => $title,
|
||||||
|
];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
$videosIds = [];
|
||||||
|
$rewards = [];
|
||||||
|
$titles = [];
|
||||||
|
foreach ($videosData as $videosId => $videoInfo) {
|
||||||
|
$videosIds[] = $videosId;
|
||||||
|
$rewards[] = $videoInfo['reward'];
|
||||||
|
$titles[] = $videoInfo['title'];
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
|
||||||
|
<div class="container">
|
||||||
|
<div class="panel">
|
||||||
|
<div class="panel-body">
|
||||||
|
<canvas id="rewardChart2" style="width:100%; height:400px;"></canvas>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
let videosIds = <?php echo json_encode($videosIds); ?>;
|
||||||
|
let rewards2 = <?php echo json_encode($rewards); ?>;
|
||||||
|
let titles = <?php echo json_encode($titles); ?>;
|
||||||
|
|
||||||
|
new Chart(document.getElementById("rewardChart2"), {
|
||||||
|
type: 'bar',
|
||||||
|
data: {
|
||||||
|
labels: titles, // Use the video titles as labels
|
||||||
|
datasets: [{
|
||||||
|
data: rewards2,
|
||||||
|
label: "Money Made",
|
||||||
|
backgroundColor: "#3e95cd",
|
||||||
|
}]
|
||||||
|
},
|
||||||
|
options: {
|
||||||
|
title: {
|
||||||
|
display: true,
|
||||||
|
text: 'Money Made per Video'
|
||||||
|
},
|
||||||
|
scales: {
|
||||||
|
yAxes: [{
|
||||||
|
ticks: {
|
||||||
|
beginAtZero: true,
|
||||||
|
}
|
||||||
|
}]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
|
|
@ -169,7 +169,6 @@ class PlayerSkins extends PluginAbstract {
|
||||||
$htmlMediaTag .= '<video '.self::getPlaysinline().' id="mainVideo" style="display: none; height: 0;width: 0;" ></video>';
|
$htmlMediaTag .= '<video '.self::getPlaysinline().' id="mainVideo" style="display: none; height: 0;width: 0;" ></video>';
|
||||||
//$htmlMediaTag .= '<div id="main-video" class="embed-responsive-item">';
|
//$htmlMediaTag .= '<div id="main-video" class="embed-responsive-item">';
|
||||||
$htmlMediaTag .= '<iframe class="embed-responsive-item" scrolling="no" '.Video::$iframeAllowAttributes.' src="' . $url . '"></iframe>';
|
$htmlMediaTag .= '<iframe class="embed-responsive-item" scrolling="no" '.Video::$iframeAllowAttributes.' src="' . $url . '"></iframe>';
|
||||||
$htmlMediaTag .= '<script>$(document).ready(function () {addView(' . intval($video['id']) . ', 0);});</script>';
|
|
||||||
//$htmlMediaTag .= '</div>';
|
//$htmlMediaTag .= '</div>';
|
||||||
} else {
|
} else {
|
||||||
// youtube!
|
// youtube!
|
||||||
|
@ -650,18 +649,14 @@ class PlayerSkins extends PluginAbstract {
|
||||||
$url = Video::getURLFriendly($videos_id);
|
$url = Video::getURLFriendly($videos_id);
|
||||||
$js .= "
|
$js .= "
|
||||||
player.on('play', function () {
|
player.on('play', function () {
|
||||||
addView({$videos_id}, this.currentTime());
|
|
||||||
_addViewBeaconAdded = false;
|
|
||||||
sendAVideoMobileMessage('play', this.currentTime());
|
sendAVideoMobileMessage('play', this.currentTime());
|
||||||
});
|
});
|
||||||
player.on('ended', function () {
|
player.on('ended', function () {
|
||||||
var time = Math.round(this.currentTime());
|
var time = Math.round(this.currentTime());
|
||||||
addView({$videos_id}, time);
|
|
||||||
sendAVideoMobileMessage('ended', time);
|
sendAVideoMobileMessage('ended', time);
|
||||||
});
|
});
|
||||||
player.on('pause', function () {
|
player.on('pause', function () {
|
||||||
var time = Math.round(this.currentTime());
|
var time = Math.round(this.currentTime());
|
||||||
addView({$videos_id}, time);
|
|
||||||
sendAVideoMobileMessage('pause', time);
|
sendAVideoMobileMessage('pause', time);
|
||||||
});
|
});
|
||||||
player.on('volumechange', function () {
|
player.on('volumechange', function () {
|
||||||
|
@ -683,13 +678,6 @@ class PlayerSkins extends PluginAbstract {
|
||||||
|
|
||||||
$('#linkCurrentTime, .linkCurrentTime').val(url);
|
$('#linkCurrentTime, .linkCurrentTime').val(url);
|
||||||
|
|
||||||
if (time >= 5 && time % 1 === 0) {
|
|
||||||
addView({$videos_id}, time);
|
|
||||||
} else {
|
|
||||||
addViewFromCookie();
|
|
||||||
addViewSetCookie(PHPSESSID, {$videos_id}, time, seconds_watching_video);
|
|
||||||
}
|
|
||||||
|
|
||||||
sendAVideoMobileMessage('timeupdate', time);
|
sendAVideoMobileMessage('timeupdate', time);
|
||||||
});
|
});
|
||||||
;";
|
;";
|
||||||
|
|
|
@ -22,9 +22,6 @@ if ($removeAnimation || !empty($advancedCustom->disableAnimations)) {
|
||||||
cursor: move;
|
cursor: move;
|
||||||
}
|
}
|
||||||
|
|
||||||
.playingShorts .scrtabs-tab-container {
|
|
||||||
display: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
body.playingShorts {
|
body.playingShorts {
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
@ -162,6 +159,7 @@ if ($removeAnimation || !empty($advancedCustom->disableAnimations)) {
|
||||||
#buttonsCarousel {
|
#buttonsCarousel {
|
||||||
bottom: 50px;
|
bottom: 50px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.circleCarouselBtn {
|
.circleCarouselBtn {
|
||||||
width: 35px;
|
width: 35px;
|
||||||
height: 35px;
|
height: 35px;
|
||||||
|
@ -177,7 +175,7 @@ if ($removeAnimation || !empty($advancedCustom->disableAnimations)) {
|
||||||
<div id="buttonsCarousel">
|
<div id="buttonsCarousel">
|
||||||
<?php
|
<?php
|
||||||
if (empty($advancedCustom->removeThumbsUpAndDown)) {
|
if (empty($advancedCustom->removeThumbsUpAndDown)) {
|
||||||
?>
|
?>
|
||||||
<button id="likeCarousel" class="circleCarouselBtn" onclick="carouselPlayerLike()">
|
<button id="likeCarousel" class="circleCarouselBtn" onclick="carouselPlayerLike()">
|
||||||
<i class="fas fa-thumbs-up"></i>
|
<i class="fas fa-thumbs-up"></i>
|
||||||
<br>
|
<br>
|
||||||
|
@ -188,21 +186,21 @@ if ($removeAnimation || !empty($advancedCustom->disableAnimations)) {
|
||||||
<br>
|
<br>
|
||||||
<span class="votes badge"></span>
|
<span class="votes badge"></span>
|
||||||
</button>
|
</button>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
if (isShareEnabled()) {
|
if (isShareEnabled()) {
|
||||||
?>
|
?>
|
||||||
<button id="shareCarousel" class="circleCarouselBtn" onclick="iframe[0].contentWindow.postMessage('togglePlayerSocial', '*');">
|
<button id="shareCarousel" class="circleCarouselBtn" onclick="iframe[0].contentWindow.postMessage('togglePlayerSocial', '*');">
|
||||||
<i class="fas fa-share"></i>
|
<i class="fas fa-share"></i>
|
||||||
</button>
|
</button>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
if (User::canComment() && false) {
|
if (User::canComment() && false) {
|
||||||
?>
|
?>
|
||||||
<button id="commentCarousel" class="circleCarouselBtn">
|
<button id="commentCarousel" class="circleCarouselBtn">
|
||||||
<i class="fas fa-comment"></i>
|
<i class="fas fa-comment"></i>
|
||||||
</button>
|
</button>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
@ -220,7 +218,7 @@ if ($removeAnimation || !empty($advancedCustom->disableAnimations)) {
|
||||||
carouselPlayerResetLikesResponse();
|
carouselPlayerResetLikesResponse();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: url,
|
url: url,
|
||||||
success: function (response) {
|
success: function(response) {
|
||||||
carouselPlayerProcessLikesResponse(response)
|
carouselPlayerProcessLikesResponse(response)
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -277,10 +275,10 @@ if ($removeAnimation || !empty($advancedCustom->disableAnimations)) {
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: url,
|
url: url,
|
||||||
success: function (response) {
|
success: function(response) {
|
||||||
carouselPlayerProcessLikesResponse(response)
|
carouselPlayerProcessLikesResponse(response)
|
||||||
},
|
},
|
||||||
complete: function (response) {
|
complete: function(response) {
|
||||||
modal.hidePleaseWait();
|
modal.hidePleaseWait();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -290,7 +288,7 @@ if ($removeAnimation || !empty($advancedCustom->disableAnimations)) {
|
||||||
function shortsOpen(index) {
|
function shortsOpen(index) {
|
||||||
shortIsOpen = true;
|
shortIsOpen = true;
|
||||||
$('body').addClass('playingShorts');
|
$('body').addClass('playingShorts');
|
||||||
<?php echo $shortsOpen; ?>
|
<?php echo $shortsOpen; ?>
|
||||||
console.log('shortsPlay', index);
|
console.log('shortsPlay', index);
|
||||||
$('#ShortsPlayerContent').show();
|
$('#ShortsPlayerContent').show();
|
||||||
$('#ShortsPlayer').flickity('destroy');
|
$('#ShortsPlayer').flickity('destroy');
|
||||||
|
@ -305,11 +303,11 @@ if ($removeAnimation || !empty($advancedCustom->disableAnimations)) {
|
||||||
if (typeof currentCell != 'undefined') {
|
if (typeof currentCell != 'undefined') {
|
||||||
currentCell.html('');
|
currentCell.html('');
|
||||||
}
|
}
|
||||||
console.log('shortsClose 1');
|
console.log('shortsClose 1');
|
||||||
setTimeout(function () {
|
setTimeout(function() {
|
||||||
console.log('shortsClose 2');
|
console.log('shortsClose 2');
|
||||||
$('body').removeClass('playingShorts');
|
$('body').removeClass('playingShorts');
|
||||||
<?php echo $shortsClose; ?>
|
<?php echo $shortsClose; ?>
|
||||||
$('#ShortsPlayerContent').hide();
|
$('#ShortsPlayerContent').hide();
|
||||||
$('#ShortsPlayerContent').removeClass('animate__bounceOutLeft');
|
$('#ShortsPlayerContent').removeClass('animate__bounceOutLeft');
|
||||||
}, 100);
|
}, 100);
|
||||||
|
@ -319,8 +317,8 @@ if ($removeAnimation || !empty($advancedCustom->disableAnimations)) {
|
||||||
var $carouselPlayer = $('#ShortsPlayer');
|
var $carouselPlayer = $('#ShortsPlayer');
|
||||||
var newCarouselCell = $('<div>').addClass('carousel-cell');
|
var newCarouselCell = $('<div>').addClass('carousel-cell');
|
||||||
var newCarouselCellContent = $('<div>')
|
var newCarouselCellContent = $('<div>')
|
||||||
.addClass('carousel-cell-content')
|
.addClass('carousel-cell-content')
|
||||||
.attr('data-flickity-bg-lazyload', video.images.poster);
|
.attr('data-flickity-bg-lazyload', video.images.poster);
|
||||||
newCarouselCellContent.append($('<strong>').text(video.title));
|
newCarouselCellContent.append($('<strong>').text(video.title));
|
||||||
newCarouselCell.append(newCarouselCellContent);
|
newCarouselCell.append(newCarouselCellContent);
|
||||||
$carouselPlayer.flickity('append', newCarouselCell);
|
$carouselPlayer.flickity('append', newCarouselCell);
|
||||||
|
@ -336,6 +334,10 @@ if ($removeAnimation || !empty($advancedCustom->disableAnimations)) {
|
||||||
var iframe;
|
var iframe;
|
||||||
var currentShortsPlayerIndex = -1;
|
var currentShortsPlayerIndex = -1;
|
||||||
|
|
||||||
|
function playNextShorts() {
|
||||||
|
$('#ShortsPlayer').flickity('next');
|
||||||
|
}
|
||||||
|
|
||||||
function createShortsPlayerFlickity(initialIndex) {
|
function createShortsPlayerFlickity(initialIndex) {
|
||||||
var $carouselPlayer = $('#ShortsPlayer');
|
var $carouselPlayer = $('#ShortsPlayer');
|
||||||
|
|
||||||
|
@ -348,7 +350,7 @@ if ($removeAnimation || !empty($advancedCustom->disableAnimations)) {
|
||||||
adaptiveHeight: true,
|
adaptiveHeight: true,
|
||||||
cellSelector: '.carousel-cell',
|
cellSelector: '.carousel-cell',
|
||||||
});
|
});
|
||||||
$carouselPlayer.on('scroll.flickity', function (event, progress) {
|
$carouselPlayer.on('scroll.flickity', function(event, progress) {
|
||||||
if (typeof currentCell != 'undefined') {
|
if (typeof currentCell != 'undefined') {
|
||||||
currentCell.html('');
|
currentCell.html('');
|
||||||
}
|
}
|
||||||
|
@ -356,7 +358,7 @@ if ($removeAnimation || !empty($advancedCustom->disableAnimations)) {
|
||||||
loadShorts();
|
loadShorts();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$carouselPlayer.on('settle.flickity', function (event, index) {
|
$carouselPlayer.on('settle.flickity', function(event, index) {
|
||||||
if (isSettling) {
|
if (isSettling) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -369,7 +371,7 @@ if ($removeAnimation || !empty($advancedCustom->disableAnimations)) {
|
||||||
if (typeof currentCell != 'undefined') {
|
if (typeof currentCell != 'undefined') {
|
||||||
currentCell.html('');
|
currentCell.html('');
|
||||||
}
|
}
|
||||||
timeoutId = setTimeout(function () {
|
timeoutId = setTimeout(function() {
|
||||||
var index2 = $('#ShortsPlayer .carousel-cell.is-selected').index();
|
var index2 = $('#ShortsPlayer .carousel-cell.is-selected').index();
|
||||||
if (currentShortsPlayerIndex !== index2) {
|
if (currentShortsPlayerIndex !== index2) {
|
||||||
carouselPlayerGetLikes();
|
carouselPlayerGetLikes();
|
||||||
|
@ -406,22 +408,22 @@ if ($removeAnimation || !empty($advancedCustom->disableAnimations)) {
|
||||||
resetPlayerFlickity(); // reset the timeoutId
|
resetPlayerFlickity(); // reset the timeoutId
|
||||||
});
|
});
|
||||||
|
|
||||||
$carouselPlayer.on('change.flickity', function (event, index) {
|
$carouselPlayer.on('change.flickity', function(event, index) {
|
||||||
console.log('Slide changed to ' + index)
|
console.log('Slide changed to ' + index)
|
||||||
});
|
});
|
||||||
|
|
||||||
$carouselPlayer.on('select.flickity', function (event, index) {
|
$carouselPlayer.on('select.flickity', function(event, index) {
|
||||||
if (shortIsOpen) {
|
if (shortIsOpen) {
|
||||||
var browserWidth = $(window).width();
|
var browserWidth = $(window).width();
|
||||||
<?php
|
<?php
|
||||||
foreach ($totalFlickityCells as $key => $value) {
|
foreach ($totalFlickityCells as $key => $value) {
|
||||||
if (empty($key)) {
|
if (empty($key)) {
|
||||||
echo "var newIndex = Math.floor(index/{$value});";
|
echo "var newIndex = Math.floor(index/{$value});";
|
||||||
} else {
|
} else {
|
||||||
echo "if(browserWidth<{$key}){newIndex = Math.floor(index/{$value});}";
|
echo "if(browserWidth<{$key}){newIndex = Math.floor(index/{$value});}";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
$('#Shorts').flickity('select', newIndex);
|
$('#Shorts').flickity('select', newIndex);
|
||||||
console.log('Flickity select ' + index)
|
console.log('Flickity select ' + index)
|
||||||
}
|
}
|
||||||
|
@ -430,10 +432,20 @@ foreach ($totalFlickityCells as $key => $value) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function() {
|
||||||
createShortsPlayerFlickity();
|
createShortsPlayerFlickity();
|
||||||
$('#closeCarousel').on('click', function () {
|
$('#closeCarousel').on('click', function() {
|
||||||
shortsClose();
|
shortsClose();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
// Event listener to receive messages from the iframe
|
||||||
|
window.addEventListener('message', function(event) {
|
||||||
|
if (event.data === 'playNextShorts') {
|
||||||
|
// Call the function
|
||||||
|
playNextShorts();
|
||||||
|
} else {
|
||||||
|
// Execute another code if the function doesn't exist
|
||||||
|
console.log("playNextShorts() does not exist in the parent page");
|
||||||
|
}
|
||||||
|
});
|
||||||
</script>
|
</script>
|
|
@ -1,65 +0,0 @@
|
||||||
/**
|
|
||||||
* jquery-bootstrap-scrolling-tabs
|
|
||||||
* @version v2.6.1
|
|
||||||
* @link https://github.com/mikejacobson/jquery-bootstrap-scrolling-tabs
|
|
||||||
* @author Mike Jacobson <michaeljjacobson1@gmail.com>
|
|
||||||
* @license MIT License, http://www.opensource.org/licenses/MIT
|
|
||||||
*/
|
|
||||||
.scrtabs-tab-container * {
|
|
||||||
box-sizing: border-box; }
|
|
||||||
|
|
||||||
.scrtabs-tab-container {
|
|
||||||
height: 42px; }
|
|
||||||
.scrtabs-tab-container .tab-content {
|
|
||||||
clear: left; }
|
|
||||||
|
|
||||||
.scrtabs-tab-container.scrtabs-bootstrap4 .scrtabs-tabs-movable-container > .navbar-nav {
|
|
||||||
-ms-flex-direction: row;
|
|
||||||
flex-direction: row; }
|
|
||||||
|
|
||||||
.scrtabs-tabs-fixed-container {
|
|
||||||
float: left;
|
|
||||||
height: 42px;
|
|
||||||
overflow: hidden;
|
|
||||||
width: 100%; }
|
|
||||||
|
|
||||||
.scrtabs-tabs-movable-container {
|
|
||||||
position: relative; }
|
|
||||||
.scrtabs-tabs-movable-container .tab-content {
|
|
||||||
display: none; }
|
|
||||||
|
|
||||||
.scrtabs-tab-container.scrtabs-rtl .scrtabs-tabs-movable-container > ul.nav-tabs {
|
|
||||||
padding-right: 0; }
|
|
||||||
|
|
||||||
.scrtabs-tab-scroll-arrow {
|
|
||||||
border: 1px solid #dddddd;
|
|
||||||
border-top: none;
|
|
||||||
color: #428bca;
|
|
||||||
display: none;
|
|
||||||
float: left;
|
|
||||||
font-size: 12px;
|
|
||||||
height: 42px;
|
|
||||||
margin-bottom: -1px;
|
|
||||||
padding-left: 2px;
|
|
||||||
padding-top: 13px;
|
|
||||||
width: 20px; }
|
|
||||||
.scrtabs-tab-scroll-arrow:hover {
|
|
||||||
background-color: #eeeeee; }
|
|
||||||
|
|
||||||
.scrtabs-tab-scroll-arrow,
|
|
||||||
.scrtabs-tab-scroll-arrow .scrtabs-click-target {
|
|
||||||
cursor: pointer; }
|
|
||||||
|
|
||||||
.scrtabs-tab-scroll-arrow.scrtabs-with-click-target {
|
|
||||||
cursor: default; }
|
|
||||||
|
|
||||||
.scrtabs-tab-scroll-arrow.scrtabs-disable,
|
|
||||||
.scrtabs-tab-scroll-arrow.scrtabs-disable .scrtabs-click-target {
|
|
||||||
color: #ddd;
|
|
||||||
cursor: default; }
|
|
||||||
|
|
||||||
.scrtabs-tab-scroll-arrow.scrtabs-disable:hover {
|
|
||||||
background-color: initial; }
|
|
||||||
|
|
||||||
.scrtabs-tabs-fixed-container ul.nav-tabs > li {
|
|
||||||
white-space: nowrap; }
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,8 +0,0 @@
|
||||||
/**
|
|
||||||
* jquery-bootstrap-scrolling-tabs
|
|
||||||
* @version v2.6.1
|
|
||||||
* @link https://github.com/mikejacobson/jquery-bootstrap-scrolling-tabs
|
|
||||||
* @author Mike Jacobson <michaeljjacobson1@gmail.com>
|
|
||||||
* @license MIT License, http://www.opensource.org/licenses/MIT
|
|
||||||
*/
|
|
||||||
.scrtabs-tab-container *{box-sizing:border-box}.scrtabs-tab-container{height:42px}.scrtabs-tab-container .tab-content{clear:left}.scrtabs-tab-container.scrtabs-bootstrap4 .scrtabs-tabs-movable-container>.navbar-nav{-ms-flex-direction:row;flex-direction:row}.scrtabs-tabs-fixed-container{float:left;height:42px;overflow:hidden;width:100%}.scrtabs-tabs-movable-container{position:relative}.scrtabs-tabs-movable-container .tab-content{display:none}.scrtabs-tab-container.scrtabs-rtl .scrtabs-tabs-movable-container>ul.nav-tabs{padding-right:0}.scrtabs-tab-scroll-arrow{border:1px solid #ddd;border-top:none;color:#428bca;display:none;float:left;font-size:12px;height:42px;margin-bottom:-1px;padding-left:2px;padding-top:13px;width:20px}.scrtabs-tab-scroll-arrow:hover{background-color:#eee}.scrtabs-tab-scroll-arrow,.scrtabs-tab-scroll-arrow .scrtabs-click-target{cursor:pointer}.scrtabs-tab-scroll-arrow.scrtabs-with-click-target{cursor:default}.scrtabs-tab-scroll-arrow.scrtabs-disable,.scrtabs-tab-scroll-arrow.scrtabs-disable .scrtabs-click-target{color:#ddd;cursor:default}.scrtabs-tab-scroll-arrow.scrtabs-disable:hover{background-color:initial}.scrtabs-tabs-fixed-container ul.nav-tabs>li{white-space:nowrap}
|
|
File diff suppressed because one or more lines are too long
|
@ -18,3 +18,7 @@ span.selection > span.select2-selection--single{
|
||||||
border-bottom-color: rgb(204, 204, 204);
|
border-bottom-color: rgb(204, 204, 204);
|
||||||
border-left-color: rgb(204, 204, 204);
|
border-left-color: rgb(204, 204, 204);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#filterDropdown label{
|
||||||
|
color: #333;
|
||||||
|
}
|
1796
view/css/main.css
1796
view/css/main.css
File diff suppressed because it is too large
Load diff
|
@ -219,7 +219,7 @@ li.navsub-toggle a + ul {
|
||||||
|
|
||||||
@media screen and (min-width: 992px) {
|
@media screen and (min-width: 992px) {
|
||||||
|
|
||||||
body.youtube>div.container-fluid{
|
body.youtube{
|
||||||
margin-left: 300px;
|
margin-left: 300px;
|
||||||
}
|
}
|
||||||
body.youtube div.container-fluid .col-sm-10.col-sm-offset-1.list-group-item{
|
body.youtube div.container-fluid .col-sm-10.col-sm-offset-1.list-group-item{
|
||||||
|
|
|
@ -78,7 +78,6 @@ $jsFiles[] = "view/js/webui-popover/jquery.webui-popover.min.js";
|
||||||
$jsFiles[] = "view/js/bootstrap-list-filter/bootstrap-list-filter.min.js";
|
$jsFiles[] = "view/js/bootstrap-list-filter/bootstrap-list-filter.min.js";
|
||||||
$jsFiles[] = "node_modules/js-cookie/dist/js.cookie.js";
|
$jsFiles[] = "node_modules/js-cookie/dist/js.cookie.js";
|
||||||
$jsFiles[] = "node_modules/jquery-toast-plugin/dist/jquery.toast.min.js";
|
$jsFiles[] = "node_modules/jquery-toast-plugin/dist/jquery.toast.min.js";
|
||||||
$jsFiles[] = "view/bootstrap/jquery-bootstrap-scrolling-tabs/jquery.scrolling-tabs.min.js";
|
|
||||||
$jsFiles[] = "view/js/BootstrapMenu.min.js";
|
$jsFiles[] = "view/js/BootstrapMenu.min.js";
|
||||||
|
|
||||||
$jsFiles = array_merge($jsFiles, AVideoPlugin::getJSFiles());
|
$jsFiles = array_merge($jsFiles, AVideoPlugin::getJSFiles());
|
||||||
|
|
|
@ -94,7 +94,6 @@ if (!isBot()) {
|
||||||
?>
|
?>
|
||||||
<link href="<?php echo getURL('view/css/font-awesome-animation.min.css'); ?>" rel="stylesheet" type="text/css" onload="this.media = 'all'" />
|
<link href="<?php echo getURL('view/css/font-awesome-animation.min.css'); ?>" rel="stylesheet" type="text/css" onload="this.media = 'all'" />
|
||||||
<link href="<?php echo getURL('node_modules/jquery-toast-plugin/dist/jquery.toast.min.css'); ?>" rel="stylesheet" type="text/css" onload="this.media = 'all'" />
|
<link href="<?php echo getURL('node_modules/jquery-toast-plugin/dist/jquery.toast.min.css'); ?>" rel="stylesheet" type="text/css" onload="this.media = 'all'" />
|
||||||
<link href="<?php echo getURL('view/bootstrap/jquery-bootstrap-scrolling-tabs/jquery.scrolling-tabs.min.css'); ?>" rel="stylesheet" type="text/css" onload="this.media = 'all'" />
|
|
||||||
<link href="<?php echo getURL('view/js/webui-popover/jquery.webui-popover.min.css'); ?>" rel="stylesheet" type="text/css" onload="this.media = 'all'" />
|
<link href="<?php echo getURL('view/js/webui-popover/jquery.webui-popover.min.css'); ?>" rel="stylesheet" type="text/css" onload="this.media = 'all'" />
|
||||||
<link href="<?php echo getURL('view/js/bootgrid/jquery.bootgrid.css'); ?>" rel="stylesheet" type="text/css" onload="this.media = 'all'" />
|
<link href="<?php echo getURL('view/js/bootgrid/jquery.bootgrid.css'); ?>" rel="stylesheet" type="text/css" onload="this.media = 'all'" />
|
||||||
<link href="<?php echo getURL('node_modules/jquery-ui-dist/jquery-ui.min.css'); ?>" rel="stylesheet" type="text/css" media="print" onload="this.media = 'all'" />
|
<link href="<?php echo getURL('node_modules/jquery-ui-dist/jquery-ui.min.css'); ?>" rel="stylesheet" type="text/css" media="print" onload="this.media = 'all'" />
|
||||||
|
|
|
@ -1,11 +1,31 @@
|
||||||
var last_videos_id = 0;
|
var last_videos_id = 0;
|
||||||
var last_currentTime = -1;
|
var last_currentTime = -1;
|
||||||
var videoViewAdded = false;
|
var videoViewAdded = false;
|
||||||
var addViewBeaconTimeout;
|
|
||||||
var _addViewCheck = false;
|
var _addViewCheck = false;
|
||||||
|
var isVideoPlaying = false;
|
||||||
|
|
||||||
|
// Create an encapsulation for seconds_watching_video
|
||||||
|
var VideoWatchTime = (function () {
|
||||||
|
var seconds_watching_video = 0;
|
||||||
|
|
||||||
|
return {
|
||||||
|
increment: function() {
|
||||||
|
if (isVideoPlaying) {
|
||||||
|
seconds_watching_video++;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
reset: function() {
|
||||||
|
seconds_watching_video = 0;
|
||||||
|
},
|
||||||
|
getValue: function() {
|
||||||
|
return seconds_watching_video;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
})();
|
||||||
|
|
||||||
|
// Modify the addView function
|
||||||
function addView(videos_id, currentTime) {
|
function addView(videos_id, currentTime) {
|
||||||
addViewSetCookie(PHPSESSID, videos_id, currentTime, seconds_watching_video);
|
addViewSetCookie(PHPSESSID, videos_id, currentTime, VideoWatchTime.getValue());
|
||||||
|
|
||||||
if (_addViewCheck) {
|
if (_addViewCheck) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -15,15 +35,12 @@ function addView(videos_id, currentTime) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (currentTime > 5 && currentTime % 30 !== 0) { // only update each 30 seconds
|
// Removed the currentTime condition
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
_addViewCheck = true;
|
_addViewCheck = true;
|
||||||
last_videos_id = videos_id;
|
last_videos_id = videos_id;
|
||||||
last_currentTime = currentTime;
|
last_currentTime = currentTime;
|
||||||
|
|
||||||
_addView(videos_id, currentTime, seconds_watching_video);
|
_addView(videos_id, currentTime, VideoWatchTime.getValue());
|
||||||
|
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
_addViewCheck = false;
|
_addViewCheck = false;
|
||||||
|
@ -41,7 +58,6 @@ function _addView(videos_id, currentTime, seconds_watching_video) {
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log('_addView 2', videos_id, currentTime, seconds_watching_video);
|
console.log('_addView 2', videos_id, currentTime, seconds_watching_video);
|
||||||
isVideoAddViewCount = true;
|
|
||||||
|
|
||||||
if (typeof PHPSESSID === 'undefined') {
|
if (typeof PHPSESSID === 'undefined') {
|
||||||
PHPSESSID = '';
|
PHPSESSID = '';
|
||||||
|
@ -53,22 +69,28 @@ function _addView(videos_id, currentTime, seconds_watching_video) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
isVideoAddViewCount = true;
|
||||||
console.log('_addView 3', videos_id, currentTime, seconds_watching_video);
|
console.log('_addView 3', videos_id, currentTime, seconds_watching_video);
|
||||||
url = addGetParam(url, 'PHPSESSID', PHPSESSID);
|
url = addGetParam(url, 'PHPSESSID', PHPSESSID);
|
||||||
|
// reset seconds_watching_video
|
||||||
|
var seconds_watching_video_to_send = seconds_watching_video;
|
||||||
|
VideoWatchTime.reset();
|
||||||
|
//console.trace();
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: url,
|
url: url,
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
data: {
|
data: {
|
||||||
id: videos_id,
|
id: videos_id,
|
||||||
currentTime: currentTime,
|
currentTime: currentTime,
|
||||||
seconds_watching_video: seconds_watching_video
|
seconds_watching_video: seconds_watching_video_to_send
|
||||||
},
|
},
|
||||||
success: function(response) {
|
success: function(response) {
|
||||||
console.log('_addView 4', response);
|
console.log('_addView 4', response);
|
||||||
isVideoAddViewCount = false;
|
|
||||||
$('.view-count' + videos_id).text(response.countHTML);
|
$('.view-count' + videos_id).text(response.countHTML);
|
||||||
PHPSESSID = response.session_id;
|
PHPSESSID = response.session_id;
|
||||||
|
}, complete: function(response) {
|
||||||
|
console.log('_addView 5', response);
|
||||||
|
isVideoAddViewCount = false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -122,6 +144,49 @@ async function addViewSetCookie(PHPSESSID, videos_id, playerCurrentTime, seconds
|
||||||
Cookies.set('addView_seconds_watching_video', seconds_watching_video, { path: '/', expires: 1 });
|
Cookies.set('addView_seconds_watching_video', seconds_watching_video, { path: '/', expires: 1 });
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function() {
|
async function startAddViewCountInPlayer(){
|
||||||
|
if(typeof player !== 'undefined' && typeof mediaId !== 'undefined'){
|
||||||
|
player.on('play', function () {
|
||||||
|
isVideoPlaying = true;
|
||||||
|
addView(mediaId, this.currentTime());
|
||||||
|
});
|
||||||
|
player.on('pause', function () {
|
||||||
|
isVideoPlaying = false;
|
||||||
|
var time = Math.round(this.currentTime());
|
||||||
|
addView(mediaId, time);
|
||||||
|
});
|
||||||
|
player.on('ended', function () {
|
||||||
|
isVideoPlaying = false;
|
||||||
|
var time = Math.round(this.currentTime());
|
||||||
|
addView(mediaId, time);
|
||||||
|
});
|
||||||
|
|
||||||
|
player.on('timeupdate', function() {
|
||||||
|
var time = Math.round(this.currentTime());
|
||||||
|
if (time === 0 || time % 30 === 0) {
|
||||||
|
addView(mediaId, time);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
setTimeout(function() {
|
||||||
|
startAddViewCountInPlayer();
|
||||||
|
}, 5000);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// Add beforeunload event
|
||||||
|
window.addEventListener('beforeunload', (event) => {
|
||||||
addViewFromCookie();
|
addViewFromCookie();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(document).ready(function() {
|
||||||
|
// Use setInterval to update seconds_watching_video every second
|
||||||
|
setInterval(function () {
|
||||||
|
VideoWatchTime.increment();
|
||||||
|
}, 1000);
|
||||||
|
|
||||||
|
// Call addViewFromCookie on the next page load
|
||||||
|
addViewFromCookie();
|
||||||
|
|
||||||
|
startAddViewCountInPlayer();
|
||||||
|
});
|
|
@ -125,8 +125,6 @@ async function openLeftMenu() {
|
||||||
closeRightMenu();
|
closeRightMenu();
|
||||||
closeSearchMenu();
|
closeSearchMenu();
|
||||||
}
|
}
|
||||||
var selector = '#buttonMenu svg';
|
|
||||||
$(selector).addClass('active');
|
|
||||||
YPTSidebarOpen();
|
YPTSidebarOpen();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -213,6 +211,8 @@ function YPTSidebarIsOpen() {
|
||||||
return $('body').hasClass('youtube');
|
return $('body').hasClass('youtube');
|
||||||
}
|
}
|
||||||
async function YPTSidebarOpen() {
|
async function YPTSidebarOpen() {
|
||||||
|
var selector = '#buttonMenu svg';
|
||||||
|
$(selector).addClass('active');
|
||||||
$("#sidebar").removeClass('animate__bounceOutLeft');
|
$("#sidebar").removeClass('animate__bounceOutLeft');
|
||||||
$("#sidebar").show();
|
$("#sidebar").show();
|
||||||
$("#sidebar").addClass('animate__animated animate__bounceInLeft');
|
$("#sidebar").addClass('animate__animated animate__bounceInLeft');
|
||||||
|
|
|
@ -266,8 +266,6 @@ async function lazyImage() {
|
||||||
}
|
}
|
||||||
|
|
||||||
var pauseIfIsPlayinAdsInterval;
|
var pauseIfIsPlayinAdsInterval;
|
||||||
var seconds_watching_video = 0;
|
|
||||||
var _startCountPlayingTime;
|
|
||||||
async function setPlayerListners() {
|
async function setPlayerListners() {
|
||||||
if (typeof player !== 'undefined') {
|
if (typeof player !== 'undefined') {
|
||||||
player.on('pause', function () {
|
player.on('pause', function () {
|
||||||
|
@ -275,7 +273,6 @@ async function setPlayerListners() {
|
||||||
//console.log("setPlayerListners: pause");
|
//console.log("setPlayerListners: pause");
|
||||||
//userIsControling = true;
|
//userIsControling = true;
|
||||||
clearInterval(pauseIfIsPlayinAdsInterval);
|
clearInterval(pauseIfIsPlayinAdsInterval);
|
||||||
clearInterval(_startCountPlayingTime);
|
|
||||||
});
|
});
|
||||||
player.on('play', function () {
|
player.on('play', function () {
|
||||||
isTryingToPlay = false;
|
isTryingToPlay = false;
|
||||||
|
@ -291,10 +288,6 @@ async function setPlayerListners() {
|
||||||
pauseIfIsPlayinAdsInterval = setInterval(function () {
|
pauseIfIsPlayinAdsInterval = setInterval(function () {
|
||||||
pauseIfIsPlayinAds();
|
pauseIfIsPlayinAds();
|
||||||
}, 500);
|
}, 500);
|
||||||
clearInterval(_startCountPlayingTime);
|
|
||||||
_startCountPlayingTime = setInterval(function () {
|
|
||||||
seconds_watching_video++;
|
|
||||||
}, 1000);
|
|
||||||
});
|
});
|
||||||
$("#mainVideo .vjs-mute-control").click(function () {
|
$("#mainVideo .vjs-mute-control").click(function () {
|
||||||
Cookies.set('muted', player.muted(), {
|
Cookies.set('muted', player.muted(), {
|
||||||
|
@ -849,7 +842,11 @@ function playNext(url) {
|
||||||
}, 1000);
|
}, 1000);
|
||||||
} else if (isPlayNextEnabled()) {
|
} else if (isPlayNextEnabled()) {
|
||||||
modal.showPleaseWait();
|
modal.showPleaseWait();
|
||||||
if (typeof autoPlayAjax == 'undefined' || !autoPlayAjax) {
|
if (window.parent && typeof window.parent.playNextShorts === 'function') {
|
||||||
|
// Function exists, send a message to call it
|
||||||
|
console.log(" window.parent.postMessage(playNextShorts ");
|
||||||
|
window.parent.postMessage('playNextShorts', '*');
|
||||||
|
} else if (typeof autoPlayAjax == 'undefined' || !autoPlayAjax) {
|
||||||
//console.log("playNext changing location " + url);
|
//console.log("playNext changing location " + url);
|
||||||
document.location = url;
|
document.location = url;
|
||||||
} else {
|
} else {
|
||||||
|
@ -2832,17 +2829,6 @@ $(document).ready(function () {
|
||||||
expires: 365
|
expires: 365
|
||||||
});
|
});
|
||||||
tabsCategoryDocumentHeight = $(document).height();
|
tabsCategoryDocumentHeight = $(document).height();
|
||||||
if (typeof $('.nav-tabs-horizontal').scrollingTabs == 'function') {
|
|
||||||
$('.nav-tabs-horizontal').scrollingTabs();
|
|
||||||
//$('.nav-tabs-horizontal').fadeIn();
|
|
||||||
}
|
|
||||||
setInterval(function () {
|
|
||||||
if (tabsCategoryDocumentHeightChanged()) {
|
|
||||||
if (typeof $('.nav-tabs-horizontal').scrollingTabs == 'function') {
|
|
||||||
$('.nav-tabs-horizontal').scrollingTabs('refresh');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}, 2000);
|
|
||||||
modal = getPleaseWait();
|
modal = getPleaseWait();
|
||||||
try {
|
try {
|
||||||
$('[data-toggle="popover"]').popover();
|
$('[data-toggle="popover"]').popover();
|
||||||
|
|
|
@ -14,9 +14,11 @@ foreach ($userGroups as $value) {
|
||||||
$users_tabs[] = ['selector' => 'userGroupGrid' . $value['id'], 'queryString' => '?status=a&user_groups_id=' . $value['id'], 'icon' => 'fas fa-users', 'title' => $value['group_name'], 'active' => '', 'userGroupID' => $value['id']];
|
$users_tabs[] = ['selector' => 'userGroupGrid' . $value['id'], 'queryString' => '?status=a&user_groups_id=' . $value['id'], 'icon' => 'fas fa-users', 'title' => $value['group_name'], 'active' => '', 'userGroupID' => $value['id']];
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
<link href="<?php echo getURL('node_modules/flickity/dist/flickity.min.css'); ?>" rel="stylesheet" type="text/css" />
|
||||||
<div class="panel panel-default">
|
<div class="panel panel-default">
|
||||||
<div class="panel-heading tabbable-line">
|
<div class="panel-heading tabbable-line">
|
||||||
<div class="btn-group pull-right" >
|
<div class="btn-group pull-right">
|
||||||
<button type="button" class="btn btn-default" id="addUserBtn">
|
<button type="button" class="btn btn-default" id="addUserBtn">
|
||||||
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span> <?php echo __("New User"); ?>
|
<span class="glyphicon glyphicon-plus" aria-hidden="true"></span> <?php echo __("New User"); ?>
|
||||||
</button>
|
</button>
|
||||||
|
@ -34,30 +36,27 @@ foreach ($userGroups as $value) {
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="clearfix"></div>
|
<div class="clearfix"></div>
|
||||||
<ul class="nav nav-tabs nav-tabs-horizontal">
|
<?php
|
||||||
<?php
|
$_REQUEST['rowCount'] = $_rowCount;
|
||||||
foreach ($users_tabs as $value) {
|
$_REQUEST['current'] = $current;
|
||||||
?>
|
$items = array();
|
||||||
<li class="<?php echo $value['active']; ?>">
|
foreach ($users_tabs as $value) {
|
||||||
<a data-toggle="tab" href="#<?php echo $value['selector']; ?>Tab" onclick="startUserGrid('#<?php echo $value['selector']; ?>', '<?php echo $value['queryString']; ?>', <?php echo intval($value['userGroupID']); ?>);">
|
$label = "<i class=\"{$value['icon']}\"></i> " . __($value['title']);
|
||||||
<i class="<?php echo $value['icon']; ?>"></i> <?php echo __($value['title']); ?>
|
$items[] = array('href' => "#{$value['selector']}Tab", 'tooltip' => __($value['title']), 'onclick' => "startUserGrid('#{$value['selector']}', '{$value['queryString']}', " . intval($value['userGroupID']) . ");", 'label' => $label);
|
||||||
</a>
|
}
|
||||||
</li>
|
generateHorizontalFlickity($items);
|
||||||
<?php
|
?>
|
||||||
}
|
|
||||||
?>
|
|
||||||
</ul>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="panel-body">
|
<div class="panel-body">
|
||||||
<div class="tab-content">
|
<div class="tab-content">
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
foreach ($users_tabs as $value) {
|
foreach ($users_tabs as $value) {
|
||||||
?>
|
?>
|
||||||
<div id="<?php echo $value['selector']; ?>Tab" class="tab-pane fade in <?php echo $value['active']; ?>">
|
<div id="<?php echo $value['selector']; ?>Tab" class="tab-pane fade in <?php echo $value['active']; ?>">
|
||||||
<?php
|
<?php
|
||||||
if (!empty($value['userGroupID'])) {
|
if (!empty($value['userGroupID'])) {
|
||||||
?>
|
?>
|
||||||
<div class="btn-group pull-left" id="filterButtonsUG<?php echo $value['userGroupID']; ?>">
|
<div class="btn-group pull-left" id="filterButtonsUG<?php echo $value['userGroupID']; ?>">
|
||||||
<div class="btn-group ">
|
<div class="btn-group ">
|
||||||
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown">
|
||||||
|
@ -69,7 +68,7 @@ foreach ($userGroups as $value) {
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<table id="<?php echo $value['selector']; ?>" class="table table-condensed table-hover table-striped">
|
<table id="<?php echo $value['selector']; ?>" class="table table-condensed table-hover table-striped">
|
||||||
|
@ -78,17 +77,17 @@ foreach ($userGroups as $value) {
|
||||||
<th data-column-id="id" data-width="80px"><?php echo __("#"); ?></th>
|
<th data-column-id="id" data-width="80px"><?php echo __("#"); ?></th>
|
||||||
<th data-column-id="user" data-formatter="user"><?php echo __("User"); ?></th>
|
<th data-column-id="user" data-formatter="user"><?php echo __("User"); ?></th>
|
||||||
<th data-column-id="name" data-order="desc"><?php echo __("Name"); ?></th>
|
<th data-column-id="name" data-order="desc"><?php echo __("Name"); ?></th>
|
||||||
<th data-column-id="email" ><?php echo __("E-mail"); ?></th>
|
<th data-column-id="email"><?php echo __("E-mail"); ?></th>
|
||||||
<th data-column-id="phone" ><?php echo __("Phone"); ?></th>
|
<th data-column-id="phone"><?php echo __("Phone"); ?></th>
|
||||||
<th data-column-id="created" ><?php echo __("Created"); ?></th>
|
<th data-column-id="created"><?php echo __("Created"); ?></th>
|
||||||
<th data-column-id="modified" ><?php echo __("Modified"); ?></th>
|
<th data-column-id="modified"><?php echo __("Modified"); ?></th>
|
||||||
<th data-column-id="tags" data-formatter="tags" data-sortable="false" ><?php echo __("Tags"); ?></th>
|
<th data-column-id="tags" data-formatter="tags" data-sortable="false"><?php echo __("Tags"); ?></th>
|
||||||
<th data-column-id="commands" data-formatter="commands" data-sortable="false" data-width="200px"></th>
|
<th data-column-id="commands" data-formatter="commands" data-sortable="false" data-width="200px"></th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</div>
|
</div>
|
||||||
|
@ -104,28 +103,28 @@ foreach ($userGroups as $value) {
|
||||||
<h4 class="modal-title"><?php echo __("User Form"); ?></h4>
|
<h4 class="modal-title"><?php echo __("User Form"); ?></h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
<form class="form-compact" id="updateUserForm" onsubmit="">
|
<form class="form-compact" id="updateUserForm" onsubmit="">
|
||||||
<input type="hidden" id="inputUserId" >
|
<input type="hidden" id="inputUserId">
|
||||||
<label for="inputUser" class="sr-only"><?php echo __("User"); ?></label>
|
<label for="inputUser" class="sr-only"><?php echo __("User"); ?></label>
|
||||||
<input type="text" id="inputUser" class="form-control first" placeholder="<?php echo __("User"); ?>" autofocus required="required" data-toggle="tooltip" title="<?php echo __('User'); ?>">
|
<input type="text" id="inputUser" class="form-control first" placeholder="<?php echo __("User"); ?>" autofocus required="required" data-toggle="tooltip" title="<?php echo __('User'); ?>">
|
||||||
<?php
|
<?php
|
||||||
getInputPassword("inputPassword", 'class="form-control" required="required" autocomplete="off"', __("Password"));
|
getInputPassword("inputPassword", 'class="form-control" required="required" autocomplete="off"', __("Password"));
|
||||||
?>
|
?>
|
||||||
<label for="inputEmail" class="sr-only"><?php echo __("E-mail"); ?></label>
|
<label for="inputEmail" class="sr-only"><?php echo __("E-mail"); ?></label>
|
||||||
<input type="email" id="inputEmail" class="form-control" placeholder="<?php echo __("E-mail"); ?>" data-toggle="tooltip" title="<?php echo __('E-mail'); ?>">
|
<input type="email" id="inputEmail" class="form-control" placeholder="<?php echo __("E-mail"); ?>" data-toggle="tooltip" title="<?php echo __('E-mail'); ?>">
|
||||||
<label for="inputName" class="sr-only"><?php echo __("Name"); ?></label>
|
<label for="inputName" class="sr-only"><?php echo __("Name"); ?></label>
|
||||||
<input type="text" id="inputName" class="form-control " placeholder="<?php echo __("Name"); ?>" data-toggle="tooltip" title="<?php echo __('Name'); ?>">
|
<input type="text" id="inputName" class="form-control " placeholder="<?php echo __("Name"); ?>" data-toggle="tooltip" title="<?php echo __('Name'); ?>">
|
||||||
<label for="inputChannelName" class="sr-only"><?php echo __("Channel Name"); ?></label>
|
<label for="inputChannelName" class="sr-only"><?php echo __("Channel Name"); ?></label>
|
||||||
<input type="text" id="inputChannelName" class="form-control" placeholder="<?php echo __("Channel Name"); ?>" data-toggle="tooltip" title="<?php echo __('Channel Name'); ?>">
|
<input type="text" id="inputChannelName" class="form-control" placeholder="<?php echo __("Channel Name"); ?>" data-toggle="tooltip" title="<?php echo __('Channel Name'); ?>">
|
||||||
<label for="inputPhone" class="sr-only"><?php echo __("Phone"); ?></label>
|
<label for="inputPhone" class="sr-only"><?php echo __("Phone"); ?></label>
|
||||||
<input type="text" id="inputPhone" class="form-control" placeholder="<?php echo __("Phone"); ?>" data-toggle="tooltip" title="<?php echo __('Phone'); ?>" >
|
<input type="text" id="inputPhone" class="form-control" placeholder="<?php echo __("Phone"); ?>" data-toggle="tooltip" title="<?php echo __('Phone'); ?>">
|
||||||
<label for="inputAnalyticsCode" class="sr-only"><?php echo __("Analytics Code"); ?></label>
|
<label for="inputAnalyticsCode" class="sr-only"><?php echo __("Analytics Code"); ?></label>
|
||||||
<input type="text" id="inputAnalyticsCode" class="form-control last" placeholder="Google Analytics Code: UA-123456789-1" data-toggle="tooltip" title="<?php echo __('Analytics Code'); ?>">
|
<input type="text" id="inputAnalyticsCode" class="form-control last" placeholder="Google Analytics Code: UA-123456789-1" data-toggle="tooltip" title="<?php echo __('Analytics Code'); ?>">
|
||||||
<small>Do not paste the full javascript code, paste only the gtag id</small>
|
<small>Do not paste the full javascript code, paste only the gtag id</small>
|
||||||
<br>
|
<br>
|
||||||
<?php
|
<?php
|
||||||
if (empty($advancedCustomUser->disableCompanySignUp) || !empty($advancedCustomUser->enableAffiliation)) {
|
if (empty($advancedCustomUser->disableCompanySignUp) || !empty($advancedCustomUser->enableAffiliation)) {
|
||||||
?>
|
?>
|
||||||
<label for="is_company" class="sr-only"><?php echo __("is a Company"); ?></label>
|
<label for="is_company" class="sr-only"><?php echo __("is a Company"); ?></label>
|
||||||
<select name="is_company" id="is_company" class="form-control last">
|
<select name="is_company" id="is_company" class="form-control last">
|
||||||
<?php
|
<?php
|
||||||
|
@ -144,49 +143,49 @@ foreach ($userGroups as $value) {
|
||||||
<li class="list-group-item <?php echo User::isAdmin() ? "" : "hidden"; ?>">
|
<li class="list-group-item <?php echo User::isAdmin() ? "" : "hidden"; ?>">
|
||||||
<?php echo __("is Admin"); ?>
|
<?php echo __("is Admin"); ?>
|
||||||
<div class="material-switch pull-right">
|
<div class="material-switch pull-right">
|
||||||
<input type="checkbox" value="isAdmin" id="isAdmin"/>
|
<input type="checkbox" value="isAdmin" id="isAdmin" />
|
||||||
<label for="isAdmin" class="label-success"></label>
|
<label for="isAdmin" class="label-success"></label>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<?php echo __("Can Stream Videos"); ?>
|
<?php echo __("Can Stream Videos"); ?>
|
||||||
<div class="material-switch pull-right">
|
<div class="material-switch pull-right">
|
||||||
<input type="checkbox" value="canStream" id="canStream"/>
|
<input type="checkbox" value="canStream" id="canStream" />
|
||||||
<label for="canStream" class="label-success"></label>
|
<label for="canStream" class="label-success"></label>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<?php echo __("Can Upload Videos"); ?>
|
<?php echo __("Can Upload Videos"); ?>
|
||||||
<div class="material-switch pull-right">
|
<div class="material-switch pull-right">
|
||||||
<input type="checkbox" value="canUpload" id="canUpload"/>
|
<input type="checkbox" value="canUpload" id="canUpload" />
|
||||||
<label for="canUpload" class="label-success"></label>
|
<label for="canUpload" class="label-success"></label>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<?php echo __("Can view chart"); ?>
|
<?php echo __("Can view chart"); ?>
|
||||||
<div class="material-switch pull-right">
|
<div class="material-switch pull-right">
|
||||||
<input type="checkbox" value="canViewChart" id="canViewChart"/>
|
<input type="checkbox" value="canViewChart" id="canViewChart" />
|
||||||
<label for="canViewChart" class="label-success"></label>
|
<label for="canViewChart" class="label-success"></label>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<?php echo __("Can create meet"); ?>
|
<?php echo __("Can create meet"); ?>
|
||||||
<div class="material-switch pull-right">
|
<div class="material-switch pull-right">
|
||||||
<input type="checkbox" value="canCreateMeet" id="canCreateMeet"/>
|
<input type="checkbox" value="canCreateMeet" id="canCreateMeet" />
|
||||||
<label for="canCreateMeet" class="label-success"></label>
|
<label for="canCreateMeet" class="label-success"></label>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<?php echo __("E-mail Verified"); ?>
|
<?php echo __("E-mail Verified"); ?>
|
||||||
<div class="material-switch pull-right">
|
<div class="material-switch pull-right">
|
||||||
<input type="checkbox" value="isEmailVerified" id="isEmailVerified"/>
|
<input type="checkbox" value="isEmailVerified" id="isEmailVerified" />
|
||||||
<label for="isEmailVerified" class="label-success"></label>
|
<label for="isEmailVerified" class="label-success"></label>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<li class="list-group-item">
|
<li class="list-group-item">
|
||||||
<?php echo __("is Active"); ?>
|
<?php echo __("is Active"); ?>
|
||||||
<div class="material-switch pull-right">
|
<div class="material-switch pull-right">
|
||||||
<input type="checkbox" value="status" id="status"/>
|
<input type="checkbox" value="status" id="status" />
|
||||||
<label for="status" class="label-success"></label>
|
<label for="status" class="label-success"></label>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
|
@ -197,22 +196,22 @@ foreach ($userGroups as $value) {
|
||||||
<ul class="list-group">
|
<ul class="list-group">
|
||||||
<li class="list-group-item active">
|
<li class="list-group-item active">
|
||||||
<?php echo __("User Groups"); ?>
|
<?php echo __("User Groups"); ?>
|
||||||
<a href="#" class="btn btn-info btn-xs pull-right" data-toggle="popover" title="<?php echo __("What is User Groups"); ?>" data-placement="bottom" data-content="<?php echo __("By associating groups with this user, they will be able to see all the videos that are related to this group"); ?>"><span class="fa fa-question-circle" aria-hidden="true"></span> <?php echo __("Help"); ?></a>
|
<a href="#" class="btn btn-info btn-xs pull-right" data-toggle="popover" title="<?php echo __("What is User Groups"); ?>" data-placement="bottom" data-content="<?php echo __("By associating groups with this user, they will be able to see all the videos that are related to this group"); ?>"><span class="fa fa-question-circle" aria-hidden="true"></span> <?php echo __("Help"); ?></a>
|
||||||
</li>
|
</li>
|
||||||
<?php
|
<?php
|
||||||
foreach ($userGroups as $value) {
|
foreach ($userGroups as $value) {
|
||||||
?>
|
?>
|
||||||
<li class="list-group-item usergroupsLi" id="usergroupsLi<?php echo $value['id']; ?>">
|
<li class="list-group-item usergroupsLi" id="usergroupsLi<?php echo $value['id']; ?>">
|
||||||
<span class="fa fa-unlock"></span>
|
<span class="fa fa-unlock"></span>
|
||||||
<?php echo $value['group_name']; ?>
|
<?php echo $value['group_name']; ?>
|
||||||
<span class="label label-info"><?php echo $value['total_videos']; ?> <?php echo __("Videos linked"); ?></span>
|
<span class="label label-info"><?php echo $value['total_videos']; ?> <?php echo __("Videos linked"); ?></span>
|
||||||
<span class="label label-warning dynamicLabel"><i class="fas fa-link"></i> <?php echo __("Dynamic group"); ?></span>
|
<span class="label label-warning dynamicLabel"><i class="fas fa-link"></i> <?php echo __("Dynamic group"); ?></span>
|
||||||
<div class="material-switch pull-right">
|
<div class="material-switch pull-right">
|
||||||
<input id="userGroup<?php echo $value['id']; ?>" type="checkbox" value="<?php echo $value['id']; ?>" class="userGroups"/>
|
<input id="userGroup<?php echo $value['id']; ?>" type="checkbox" value="<?php echo $value['id']; ?>" class="userGroups" />
|
||||||
<label for="userGroup<?php echo $value['id']; ?>" class="label-warning"></label>
|
<label for="userGroup<?php echo $value['id']; ?>" class="label-warning"></label>
|
||||||
</div>
|
</div>
|
||||||
</li>
|
</li>
|
||||||
<?php
|
<?php
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</ul>
|
</ul>
|
||||||
|
@ -240,7 +239,7 @@ foreach ($userGroups as $value) {
|
||||||
<div class="col-md-8 inputGroupContainer">
|
<div class="col-md-8 inputGroupContainer">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<span class="input-group-addon"><i class="fa fa-lock"></i></span>
|
<span class="input-group-addon"><i class="fa fa-lock"></i></span>
|
||||||
<input id="first_name" class="form-control" type="text" readonly >
|
<input id="first_name" class="form-control" type="text" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -250,7 +249,7 @@ foreach ($userGroups as $value) {
|
||||||
<div class="col-md-8 inputGroupContainer">
|
<div class="col-md-8 inputGroupContainer">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<span class="input-group-addon"><i class="fa fa-lock"></i></span>
|
<span class="input-group-addon"><i class="fa fa-lock"></i></span>
|
||||||
<input id="last_name" class="form-control" readonly >
|
<input id="last_name" class="form-control" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -260,7 +259,7 @@ foreach ($userGroups as $value) {
|
||||||
<div class="col-md-8 inputGroupContainer">
|
<div class="col-md-8 inputGroupContainer">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<span class="input-group-addon"><i class="fa fa-lock"></i></span>
|
<span class="input-group-addon"><i class="fa fa-lock"></i></span>
|
||||||
<input id="address" class="form-control" readonly >
|
<input id="address" class="form-control" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -270,7 +269,7 @@ foreach ($userGroups as $value) {
|
||||||
<div class="col-md-8 inputGroupContainer">
|
<div class="col-md-8 inputGroupContainer">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<span class="input-group-addon"><i class="fa fa-lock"></i></span>
|
<span class="input-group-addon"><i class="fa fa-lock"></i></span>
|
||||||
<input id="zip_code" class="form-control" readonly>
|
<input id="zip_code" class="form-control" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -280,7 +279,7 @@ foreach ($userGroups as $value) {
|
||||||
<div class="col-md-8 inputGroupContainer">
|
<div class="col-md-8 inputGroupContainer">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<span class="input-group-addon"><i class="fa fa-lock"></i></span>
|
<span class="input-group-addon"><i class="fa fa-lock"></i></span>
|
||||||
<input id="country" class="form-control" readonly>
|
<input id="country" class="form-control" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -289,7 +288,7 @@ foreach ($userGroups as $value) {
|
||||||
<div class="col-md-8 inputGroupContainer">
|
<div class="col-md-8 inputGroupContainer">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<span class="input-group-addon"><i class="fa fa-lock"></i></span>
|
<span class="input-group-addon"><i class="fa fa-lock"></i></span>
|
||||||
<input id="region" class="form-control" readonly>
|
<input id="region" class="form-control" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -298,7 +297,7 @@ foreach ($userGroups as $value) {
|
||||||
<div class="col-md-8 inputGroupContainer">
|
<div class="col-md-8 inputGroupContainer">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<span class="input-group-addon"><i class="fa fa-lock"></i></span>
|
<span class="input-group-addon"><i class="fa fa-lock"></i></span>
|
||||||
<input id="city" class="form-control" readonly>
|
<input id="city" class="form-control" readonly>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -307,7 +306,7 @@ foreach ($userGroups as $value) {
|
||||||
<label class="col-md-4 control-label"><?php echo __("Document"); ?></label>
|
<label class="col-md-4 control-label"><?php echo __("Document"); ?></label>
|
||||||
<div class="col-md-8 inputGroupContainer">
|
<div class="col-md-8 inputGroupContainer">
|
||||||
<div class="input-group">
|
<div class="input-group">
|
||||||
<img src="" class="img img-responsive img-thumbnail" id="documentImage"/>
|
<img src="" class="img img-responsive img-thumbnail" id="documentImage" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -317,6 +316,8 @@ foreach ($userGroups as $value) {
|
||||||
</div><!-- /.modal-dialog -->
|
</div><!-- /.modal-dialog -->
|
||||||
</div><!-- /.modal -->
|
</div><!-- /.modal -->
|
||||||
|
|
||||||
|
<script src="<?php echo getURL('node_modules/flickity/dist/flickity.pkgd.min.js'); ?>" type="text/javascript"></script>
|
||||||
|
<script src="<?php echo getURL('node_modules/flickity-bg-lazyload/bg-lazyload.js'); ?>" type="text/javascript"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
function isAnalytics() {
|
function isAnalytics() {
|
||||||
|
@ -325,10 +326,10 @@ foreach ($userGroups as $value) {
|
||||||
//return str === '' || (/^ua-\d{4,9}-\d{1,4}$/i).test(str.toString());
|
//return str === '' || (/^ua-\d{4,9}-\d{1,4}$/i).test(str.toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
$(document).ready(function () {
|
$(document).ready(function() {
|
||||||
|
|
||||||
startUserGrid("#<?php echo $users_tabs[0]['selector']; ?>", "<?php echo $users_tabs[0]['queryString']; ?>", <?php echo intval($users_tabs[0]['userGroupID']); ?>);
|
startUserGrid("#<?php echo $users_tabs[0]['selector']; ?>", "<?php echo $users_tabs[0]['queryString']; ?>", <?php echo intval($users_tabs[0]['userGroupID']); ?>);
|
||||||
$('#addUserBtn').click(function (evt) {
|
$('#addUserBtn').click(function(evt) {
|
||||||
$('#inputUserId').val('');
|
$('#inputUserId').val('');
|
||||||
$('#inputUser').val('');
|
$('#inputUser').val('');
|
||||||
$('#inputPassword').val('');
|
$('#inputPassword').val('');
|
||||||
|
@ -346,71 +347,70 @@ foreach ($userGroups as $value) {
|
||||||
$('.userGroups').prop('checked', false);
|
$('.userGroups').prop('checked', false);
|
||||||
$('#status').prop('checked', true);
|
$('#status').prop('checked', true);
|
||||||
$('#isEmailVerified').prop('checked', false);
|
$('#isEmailVerified').prop('checked', false);
|
||||||
<?php
|
<?php
|
||||||
print AVideoPlugin::addUserBtnJS();
|
print AVideoPlugin::addUserBtnJS();
|
||||||
?>
|
?>
|
||||||
$('#userFormModal').modal();
|
$('#userFormModal').modal();
|
||||||
});
|
});
|
||||||
$('#saveUserBtn').click(function (evt) {
|
$('#saveUserBtn').click(function(evt) {
|
||||||
$('#updateUserForm').submit();
|
$('#updateUserForm').submit();
|
||||||
});
|
});
|
||||||
$('#updateUserForm').submit(function (evt) {
|
$('#updateUserForm').submit(function(evt) {
|
||||||
evt.preventDefault();
|
evt.preventDefault();
|
||||||
if (!isAnalytics()){
|
if (!isAnalytics()) {
|
||||||
avideoAlert("<?php echo __("Sorry!"); ?>", "<?php echo __("Your analytics code is wrong"); ?>", "error");
|
avideoAlert("<?php echo __("Sorry!"); ?>", "<?php echo __("Your analytics code is wrong"); ?>", "error");
|
||||||
$('#inputAnalyticsCode').focus();
|
$('#inputAnalyticsCode').focus();
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
modal.showPleaseWait();
|
modal.showPleaseWait();
|
||||||
var selectedUserGroups = [];
|
var selectedUserGroups = [];
|
||||||
$('.userGroups:checked').each(function () {
|
$('.userGroups:checked').each(function() {
|
||||||
selectedUserGroups.push($(this).val());
|
selectedUserGroups.push($(this).val());
|
||||||
});
|
});
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: '<?php echo $global['webSiteRootURL']; ?>objects/userAddNew.json.php',
|
url: '<?php echo $global['webSiteRootURL']; ?>objects/userAddNew.json.php',
|
||||||
data: {
|
data: {
|
||||||
<?php
|
<?php
|
||||||
print AVideoPlugin::updateUserFormJS();
|
print AVideoPlugin::updateUserFormJS();
|
||||||
?>
|
?> "id": $('#inputUserId').val(),
|
||||||
"id": $('#inputUserId').val(),
|
"user": $('#inputUser').val(),
|
||||||
"user": $('#inputUser').val(),
|
"pass": $('#inputPassword').val(),
|
||||||
"pass": $('#inputPassword').val(),
|
"email": $('#inputEmail').val(),
|
||||||
"email": $('#inputEmail').val(),
|
"name": $('#inputName').val(),
|
||||||
"name": $('#inputName').val(),
|
"phone": $('#inputPhone').val(),
|
||||||
"phone": $('#inputPhone').val(),
|
"channelName": $('#inputChannelName').val(),
|
||||||
"channelName": $('#inputChannelName').val(),
|
"analyticsCode": $('#inputAnalyticsCode').val(),
|
||||||
"analyticsCode": $('#inputAnalyticsCode').val(),
|
"isAdmin": $('#isAdmin').is(':checked'),
|
||||||
"isAdmin": $('#isAdmin').is(':checked'),
|
"canStream": $('#canStream').is(':checked'),
|
||||||
"canStream": $('#canStream').is(':checked'),
|
"is_company": $('#is_company').val(),
|
||||||
"is_company": $('#is_company').val(),
|
"canUpload": $('#canUpload').is(':checked'),
|
||||||
"canUpload": $('#canUpload').is(':checked'),
|
"canViewChart": $('#canViewChart').is(':checked'),
|
||||||
"canViewChart": $('#canViewChart').is(':checked'),
|
"canCreateMeet": $('#canCreateMeet').is(':checked'),
|
||||||
"canCreateMeet": $('#canCreateMeet').is(':checked'),
|
"status": $('#status').is(':checked') ? 'a' : 'i',
|
||||||
"status": $('#status').is(':checked') ? 'a' : 'i',
|
"isEmailVerified": $('#isEmailVerified').is(':checked'),
|
||||||
"isEmailVerified": $('#isEmailVerified').is(':checked'),
|
"userGroups": selectedUserGroups,
|
||||||
"userGroups": selectedUserGroups,
|
"do_not_login": 1,
|
||||||
"do_not_login": 1,
|
"securityToken": '<?php echo getToken(3600); ?>'
|
||||||
"securityToken": '<?php echo getToken(3600); ?>'
|
},
|
||||||
},
|
type: 'post',
|
||||||
type: 'post',
|
success: function(response) {
|
||||||
success: function (response) {
|
if (!response.error) {
|
||||||
if(!response.error){
|
$('#userFormModal').modal('hide');
|
||||||
$('#userFormModal').modal('hide');
|
$('.bootgrid-table').bootgrid("reload");
|
||||||
$('.bootgrid-table').bootgrid("reload");
|
}
|
||||||
}
|
avideoResponse(response);
|
||||||
avideoResponse(response);
|
console.log('user save', response);
|
||||||
console.log('user save', response);
|
modal.hidePleaseWait();
|
||||||
modal.hidePleaseWait();
|
}
|
||||||
}
|
});
|
||||||
});
|
return false;
|
||||||
return false;
|
});
|
||||||
}
|
|
||||||
);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
var userGroupShowOnly = '';
|
var userGroupShowOnly = '';
|
||||||
var userGroupQueryString = '';
|
var userGroupQueryString = '';
|
||||||
|
|
||||||
function userGroupFilter(user_groups_id, value) {
|
function userGroupFilter(user_groups_id, value) {
|
||||||
console.log('Filter usergroup', user_groups_id, value);
|
console.log('Filter usergroup', user_groups_id, value);
|
||||||
userGroupShowOnly = value;
|
userGroupShowOnly = value;
|
||||||
|
@ -427,6 +427,7 @@ print AVideoPlugin::updateUserFormJS();
|
||||||
url = addGetParam(url, 'userGroupShowOnly', userGroupShowOnly);
|
url = addGetParam(url, 'userGroupShowOnly', userGroupShowOnly);
|
||||||
return url;
|
return url;
|
||||||
}
|
}
|
||||||
|
|
||||||
function startUserGrid(selector, queryString, user_groups_id) {
|
function startUserGrid(selector, queryString, user_groups_id) {
|
||||||
userGroupQueryString = queryString;
|
userGroupQueryString = queryString;
|
||||||
if (user_groups_id) {
|
if (user_groups_id) {
|
||||||
|
@ -448,14 +449,14 @@ print AVideoPlugin::updateUserFormJS();
|
||||||
ajax: true,
|
ajax: true,
|
||||||
url: getUserGridURL,
|
url: getUserGridURL,
|
||||||
formatters: {
|
formatters: {
|
||||||
"commands": function (column, row) {
|
"commands": function(column, row) {
|
||||||
var editBtn = '<button type="button" class="btn btn-xs btn-default command-edit" data-row-id="' + row.id + '" data-toggle="tooltip" data-placement="left" title="<?php echo __('Edit'); ?>"><span class="glyphicon glyphicon-edit" aria-hidden="true"></span></button>'
|
var editBtn = '<button type="button" class="btn btn-xs btn-default command-edit" data-row-id="' + row.id + '" data-toggle="tooltip" data-placement="left" title="<?php echo __('Edit'); ?>"><span class="glyphicon glyphicon-edit" aria-hidden="true"></span></button>'
|
||||||
var infoBtn = '<button type="button" class="btn btn-xs btn-default command-info" data-row-id="' + row.id + '" data-toggle="tooltip" data-placement="left" title="<?php echo __('Info'); ?>"><i class="fas fa-info-circle"></i></button>'
|
var infoBtn = '<button type="button" class="btn btn-xs btn-default command-info" data-row-id="' + row.id + '" data-toggle="tooltip" data-placement="left" title="<?php echo __('Info'); ?>"><i class="fas fa-info-circle"></i></button>'
|
||||||
//var deleteBtn = '<button type="button" class="btn btn-default btn-xs command-delete" data-row-id="' + row.id + ' data-toggle="tooltip" data-placement="left" title="Delete""><span class="glyphicon glyphicon-erase" aria-hidden="true"></span></button>';
|
//var deleteBtn = '<button type="button" class="btn btn-default btn-xs command-delete" data-row-id="' + row.id + ' data-toggle="tooltip" data-placement="left" title="Delete""><span class="glyphicon glyphicon-erase" aria-hidden="true"></span></button>';
|
||||||
var pluginsButtons = '<br><?php echo AVideoPlugin::getUsersManagerListButton(); ?>';
|
var pluginsButtons = '<br><?php echo AVideoPlugin::getUsersManagerListButton(); ?>';
|
||||||
return editBtn + infoBtn + pluginsButtons;
|
return editBtn + infoBtn + pluginsButtons;
|
||||||
},
|
},
|
||||||
"tags": function (column, row) {
|
"tags": function(column, row) {
|
||||||
var tags = '';
|
var tags = '';
|
||||||
for (var i in row.tags) {
|
for (var i in row.tags) {
|
||||||
if (typeof row.tags[i].type == "undefined") {
|
if (typeof row.tags[i].type == "undefined") {
|
||||||
|
@ -465,7 +466,7 @@ print AVideoPlugin::updateUserFormJS();
|
||||||
}
|
}
|
||||||
return tags;
|
return tags;
|
||||||
},
|
},
|
||||||
"user": function (column, row) {
|
"user": function(column, row) {
|
||||||
var photo = '';
|
var photo = '';
|
||||||
if (row.photoURL) {
|
if (row.photoURL) {
|
||||||
photo = "<br><img src='" + row.photo + "' class='img img-responsive img-rounded img-thumbnail' style='max-width:100px;'/>";
|
photo = "<br><img src='" + row.photo + "' class='img img-responsive img-rounded img-thumbnail' style='max-width:100px;'/>";
|
||||||
|
@ -473,10 +474,9 @@ print AVideoPlugin::updateUserFormJS();
|
||||||
return row.user + photo;
|
return row.user + photo;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}).on("loaded.rs.jquery.bootgrid", function ()
|
}).on("loaded.rs.jquery.bootgrid", function() {
|
||||||
{
|
|
||||||
/* Executes after data is loaded and rendered */
|
/* Executes after data is loaded and rendered */
|
||||||
grid.find(".command-edit").on("click", function (e) {
|
grid.find(".command-edit").on("click", function(e) {
|
||||||
var row_index = $(this).closest('tr').index();
|
var row_index = $(this).closest('tr').index();
|
||||||
var row = $(selector).bootgrid("getCurrentRows")[row_index];
|
var row = $(selector).bootgrid("getCurrentRows")[row_index];
|
||||||
console.log(row);
|
console.log(row);
|
||||||
|
@ -507,12 +507,12 @@ print AVideoPlugin::updateUserFormJS();
|
||||||
$('#canCreateMeet').prop('checked', (row.canCreateMeet == "1" ? true : false));
|
$('#canCreateMeet').prop('checked', (row.canCreateMeet == "1" ? true : false));
|
||||||
$('#status').prop('checked', (row.status === "a" ? true : false));
|
$('#status').prop('checked', (row.status === "a" ? true : false));
|
||||||
$('#isEmailVerified').prop('checked', (row.isEmailVerified == "1" ? true : false));
|
$('#isEmailVerified').prop('checked', (row.isEmailVerified == "1" ? true : false));
|
||||||
<?php
|
<?php
|
||||||
print AVideoPlugin::loadUsersFormJS();
|
print AVideoPlugin::loadUsersFormJS();
|
||||||
?>
|
?>
|
||||||
|
|
||||||
$('#userFormModal').modal();
|
$('#userFormModal').modal();
|
||||||
}).end().find(".command-info").on("click", function (e) {
|
}).end().find(".command-info").on("click", function(e) {
|
||||||
|
|
||||||
var row_index = $(this).closest('tr').index();
|
var row_index = $(this).closest('tr').index();
|
||||||
var row = $(selector).bootgrid("getCurrentRows")[row_index];
|
var row = $(selector).bootgrid("getCurrentRows")[row_index];
|
||||||
|
@ -531,5 +531,4 @@ print AVideoPlugin::loadUsersFormJS();
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
|
@ -13,7 +13,11 @@
|
||||||
<?php
|
<?php
|
||||||
echo $getAdsLeaderBoardTop;
|
echo $getAdsLeaderBoardTop;
|
||||||
}else{
|
}else{
|
||||||
echo "<!-- getAdsLeaderBoardTop is empty -->";
|
echo "<!-- ";
|
||||||
|
echo "getAdsLeaderBoardTop is empty ";
|
||||||
|
echo implode(', ', ADs::getAdsCodeReason('leaderBoardTop'));
|
||||||
|
echo " -->";
|
||||||
|
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</center>
|
</center>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue