1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-05 19:42:38 +02:00
This commit is contained in:
daniel 2019-10-23 09:41:16 -03:00
parent 584416ab28
commit 4572f869e7
6 changed files with 1184 additions and 446 deletions

View file

@ -1,20 +1,4 @@
<?php <?php
function rrmdir($dir) {
if (is_dir($dir)) {
$objects = scandir($dir);
foreach ($objects as $object) {
if ($object != "." && $object != "..") {
if (is_dir($dir . "/" . $object))
rrmdir($dir . "/" . $object);
else
unlink($dir . "/" . $object);
}
}
rmdir($dir);
}
}
header('Content-Type: application/json'); header('Content-Type: application/json');
global $global, $config; global $global, $config;
if(!isset($global['systemRootPath'])){ if(!isset($global['systemRootPath'])){

View file

@ -1599,7 +1599,7 @@ function combineFiles($filesArray, $extension = "js") {
} }
file_put_contents($cacheDir . $md5FileName, $str); file_put_contents($cacheDir . $md5FileName, $str);
} }
return $global['webSiteRootURL'] . 'videos/cache/' . $extension . "/" . $md5FileName."?". filectime($cacheDir . $md5FileName); return $global['webSiteRootURL'] . 'videos/cache/' . $extension . "/" . $md5FileName . "?" . filectime($cacheDir . $md5FileName);
} }
function local_get_contents($path) { function local_get_contents($path) {
@ -1611,11 +1611,11 @@ function local_get_contents($path) {
} }
} }
function url_get_contents($Url, $ctx = "", $timeout=0) { function url_get_contents($Url, $ctx = "", $timeout = 0) {
global $global, $mysqlHost, $mysqlUser, $mysqlPass, $mysqlDatabase, $mysqlPort; global $global, $mysqlHost, $mysqlUser, $mysqlPass, $mysqlDatabase, $mysqlPort;
$session = $_SESSION; $session = $_SESSION;
session_write_close(); session_write_close();
if(!empty($timeout)){ if (!empty($timeout)) {
ini_set('default_socket_timeout', $timeout); ini_set('default_socket_timeout', $timeout);
} }
$global['mysqli']->close(); $global['mysqli']->close();
@ -1627,9 +1627,9 @@ function url_get_contents($Url, $ctx = "", $timeout=0) {
"allow_self_signed" => true, "allow_self_signed" => true,
), ),
); );
if(!empty($timeout)){ if (!empty($timeout)) {
ini_set('default_socket_timeout', $timeout); ini_set('default_socket_timeout', $timeout);
$opts['http']=array('timeout' => $timeout); $opts['http'] = array('timeout' => $timeout);
} }
$context = stream_context_create($opts); $context = stream_context_create($opts);
} else { } else {
@ -1658,9 +1658,9 @@ function url_get_contents($Url, $ctx = "", $timeout=0) {
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, 0);
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, 0);
if(!empty($timeout)){ if (!empty($timeout)) {
curl_setopt($ch,CURLOPT_TIMEOUT,$timeout); curl_setopt($ch, CURLOPT_TIMEOUT, $timeout);
curl_setopt($ch,CURLOPT_CONNECTTIMEOUT,$timeout+10); curl_setopt($ch, CURLOPT_CONNECTTIMEOUT, $timeout + 10);
} }
$output = curl_exec($ch); $output = curl_exec($ch);
curl_close($ch); curl_close($ch);
@ -1965,23 +1965,19 @@ function allowOrigin() {
header("Access-Control-Allow-Credentials: true"); header("Access-Control-Allow-Credentials: true");
} }
if (!function_exists("rrmdir")) { function rrmdir($dir) {
if (is_dir($dir)) {
function rrmdir($dir) { $objects = scandir($dir);
if (is_dir($dir)) { foreach ($objects as $object) {
$objects = scandir($dir); if ($object != "." && $object != "..") {
foreach ($objects as $object) { if (is_dir($dir . "/" . $object))
if ($object != "." && $object != "..") { rrmdir($dir . "/" . $object);
if (is_dir($dir . "/" . $object)) else
rrmdir($dir . "/" . $object); unlink($dir . "/" . $object);
else
unlink($dir . "/" . $object);
}
} }
rmdir($dir);
} }
rmdir($dir);
} }
} }
/** /**
@ -2087,21 +2083,22 @@ function getAdsSideRectangle() {
} }
} }
function isToHidePrivateVideos(){ function isToHidePrivateVideos() {
$obj = YouPHPTubePlugin::getObjectDataIfEnabled("Gallery"); $obj = YouPHPTubePlugin::getObjectDataIfEnabled("Gallery");
if(!empty($obj)){ if (!empty($obj)) {
return $obj->hidePrivateVideos; return $obj->hidePrivateVideos;
} }
$obj = YouPHPTubePlugin::getObjectDataIfEnabled("YouPHPFlix2"); $obj = YouPHPTubePlugin::getObjectDataIfEnabled("YouPHPFlix2");
if(!empty($obj)){ if (!empty($obj)) {
return $obj->hidePrivateVideos; return $obj->hidePrivateVideos;
} }
$obj = YouPHPTubePlugin::getObjectDataIfEnabled("YouTube"); $obj = YouPHPTubePlugin::getObjectDataIfEnabled("YouTube");
if(!empty($obj)){ if (!empty($obj)) {
return $obj->hidePrivateVideos; return $obj->hidePrivateVideos;
} }
return false; return false;
} }
function getOpenGraph($videos_id) { function getOpenGraph($videos_id) {
global $global, $config; global $global, $config;
echo "<!-- OpenGraph -->"; echo "<!-- OpenGraph -->";
@ -2166,6 +2163,7 @@ function getOpenGraph($videos_id) {
<meta property="duration" content="<?php echo Video::getItemDurationSeconds($video['duration']); ?>" /> <meta property="duration" content="<?php echo Video::getItemDurationSeconds($video['duration']); ?>" />
<?php <?php
} }
function getLdJson($videos_id) { function getLdJson($videos_id) {
global $global, $config; global $global, $config;
echo "<!-- ld+json -->"; echo "<!-- ld+json -->";
@ -2209,47 +2207,47 @@ function getLdJson($videos_id) {
} else { } else {
$img = $images->poster; $img = $images->poster;
} }
$description = str_replace(array('"', "\n", "\r"), array('', ' ' , ' '), empty(trim($video['description']))?$video['title']:$video['description']); $description = str_replace(array('"', "\n", "\r"), array('', ' ', ' '), empty(trim($video['description'])) ? $video['title'] : $video['description']);
$duration = Video::getItemPropDuration($video['duration']); $duration = Video::getItemPropDuration($video['duration']);
if($duration=="PT0H0M0S"){ if ($duration == "PT0H0M0S") {
$duration = "PT0H0M1S"; $duration = "PT0H0M1S";
} }
?> ?>
<script type="application/ld+json"> <script type="application/ld+json">
{
"@context": "http://schema.org/",
"@type": "VideoObject",
"name": "<?php echo str_replace('"', '', $video['title']); ?>",
"description": "<?php echo $description ?>",
"thumbnailUrl": [
"<?php echo $img; ?>"
],
"uploadDate": "<?php echo date("Y-m-d\Th:i:s", strtotime($video['created'])); ?>",
"duration": "<?php echo $duration; ?>",
"contentUrl": "<?php echo Video::getLinkToVideo($videos_id); ?>",
"embedUrl": "<?php echo parseVideos(Video::getLinkToVideo($videos_id)); ?>",
"interactionCount": "<?php echo $video['views_count']; ?>",
"@id": "<?php echo Video::getPermaLink($videos_id); ?>",
"datePublished": "<?php echo date("Y-m-d", strtotime($video['created'])); ?>",
"interactionStatistic": [
{ {
"@type": "InteractionCounter", "@context": "http://schema.org/",
"interactionService": { "@type": "VideoObject",
"@type": "WebSite", "name": "<?php echo str_replace('"', '', $video['title']); ?>",
"name": "<?php echo str_replace('"', '', $config->getWebSiteTitle()); ?>", "description": "<?php echo $description ?>",
"@id": "<?php echo $global['webSiteRootURL']; ?>" "thumbnailUrl": [
}, "<?php echo $img; ?>"
"interactionType": "http://schema.org/LikeAction", ],
"userInteractionCount": "<?php echo $video['views_count']; ?>" "uploadDate": "<?php echo date("Y-m-d\Th:i:s", strtotime($video['created'])); ?>",
"duration": "<?php echo $duration; ?>",
"contentUrl": "<?php echo Video::getLinkToVideo($videos_id); ?>",
"embedUrl": "<?php echo parseVideos(Video::getLinkToVideo($videos_id)); ?>",
"interactionCount": "<?php echo $video['views_count']; ?>",
"@id": "<?php echo Video::getPermaLink($videos_id); ?>",
"datePublished": "<?php echo date("Y-m-d", strtotime($video['created'])); ?>",
"interactionStatistic": [
{
"@type": "InteractionCounter",
"interactionService": {
"@type": "WebSite",
"name": "<?php echo str_replace('"', '', $config->getWebSiteTitle()); ?>",
"@id": "<?php echo $global['webSiteRootURL']; ?>"
},
"interactionType": "http://schema.org/LikeAction",
"userInteractionCount": "<?php echo $video['views_count']; ?>"
}, },
{ {
"@type": "InteractionCounter", "@type": "InteractionCounter",
"interactionType": "http://schema.org/WatchAction", "interactionType": "http://schema.org/WatchAction",
"userInteractionCount": "<?php echo $video['views_count']; ?>" "userInteractionCount": "<?php echo $video['views_count']; ?>"
}
]
} }
]
}
</script> </script>
@ -2299,10 +2297,10 @@ function getItemprop($videos_id) {
} else { } else {
$img = $images->poster; $img = $images->poster;
} }
$description = str_replace(array('"', "\n", "\r"), array('', ' ' , ' '), empty(trim($video['description']))?$video['title']:$video['description']); $description = str_replace(array('"', "\n", "\r"), array('', ' ', ' '), empty(trim($video['description'])) ? $video['title'] : $video['description']);
$duration = Video::getItemPropDuration($video['duration']); $duration = Video::getItemPropDuration($video['duration']);
if($duration=="PT0H0M0S"){ if ($duration == "PT0H0M0S") {
$duration = "PT0H0M1S"; $duration = "PT0H0M1S";
} }
?> ?>
@ -2315,4 +2313,4 @@ function getItemprop($videos_id) {
<meta itemprop="embedUrl" content="<?php echo parseVideos(Video::getLinkToVideo($videos_id)); ?>" /> <meta itemprop="embedUrl" content="<?php echo parseVideos(Video::getLinkToVideo($videos_id)); ?>" />
<meta itemprop="interactionCount" content="<?php echo $video['views_count']; ?>" /> <meta itemprop="interactionCount" content="<?php echo $video['views_count']; ?>" />
<?php <?php
} }

View file

@ -6,49 +6,735 @@
http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd"> http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd">
<!-- Main Page --> <!-- Main Page -->
<url> <url>
<loc>http://192.168.25.16/YouPHPTube/</loc> <loc>http://gdrive.local/YouPHPTube/</loc>
<lastmod>2019-02-16T02:27:59+00:00</lastmod> <lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>always</changefreq> <changefreq>always</changefreq>
<priority>1.00</priority> <priority>1.00</priority>
</url> </url>
<url> <url>
<loc>http://192.168.25.16/YouPHPTube/help</loc> <loc>http://gdrive.local/YouPHPTube/help</loc>
<lastmod>2019-02-16T02:27:59+00:00</lastmod> <lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>monthly</changefreq> <changefreq>monthly</changefreq>
<priority>0.50</priority> <priority>0.50</priority>
</url> </url>
<url> <url>
<loc>http://192.168.25.16/YouPHPTube/about</loc> <loc>http://gdrive.local/YouPHPTube/about</loc>
<lastmod>2019-02-16T02:27:59+00:00</lastmod> <lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>monthly</changefreq> <changefreq>monthly</changefreq>
<priority>0.50</priority> <priority>0.50</priority>
</url> </url>
<url> <url>
<loc>http://192.168.25.16/YouPHPTube/contact</loc> <loc>http://gdrive.local/YouPHPTube/contact</loc>
<lastmod>2019-02-16T02:27:59+00:00</lastmod> <lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>monthly</changefreq> <changefreq>monthly</changefreq>
<priority>0.50</priority> <priority>0.50</priority>
</url> </url>
<!-- Channels --> <!-- Channels -->
<url> <url>
<loc>http://192.168.25.16/YouPHPTube/channels</loc> <loc>http://gdrive.local/YouPHPTube/channels</loc>
<lastmod>2019-02-16T02:27:59+00:00</lastmod> <lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
<priority>0.80</priority> <priority>0.80</priority>
</url> </url>
<url> <url>
<loc>http://192.168.25.16/YouPHPTube/channel/5c4dfa2965b0e</loc> <loc>http://gdrive.local/YouPHPTube/channel/5d964d32402cc</loc>
<lastmod>2019-02-16T02:27:59+00:00</lastmod> <lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
<priority>0.70</priority> <priority>0.70</priority>
</url> </url>
<url> <url>
<loc>http://192.168.25.16/YouPHPTube/channel/5c4fbd79b9247</loc> <loc>http://gdrive.local/YouPHPTube/channel/5d4d7eee21062</loc>
<lastmod>2019-02-16T02:27:59+00:00</lastmod> <lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5da767c49b6d4</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5c519418465d4</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5c51942726bdb</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d867c0339c</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d867c17905</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d867c2c09f</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d867c40706</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d867ae8750</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d867b234b2</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d867b4feaa</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d867b7c964</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d867baa6bc</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d867bce8d8</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d867be3002</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d867a07bc3</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d867a2071f</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d867a38e43</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d867a5156b</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d867a69e6c</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d867a823dc</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d867a9abb4</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d867ab3353</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d867acba37</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d8679052c2</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d867937d32</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d867958cea</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d86796f356</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d867987a11</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d8679a0281</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d8679bce83</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d8679e3718</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d86788f40b</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d8678a3a88</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d8678b8013</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d8678d25f8</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d867802bf9</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d867817007</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d867836166</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d8678521ca</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d867866812</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d86787aee6</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d8677025a7</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d86771aee6</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d86773b3a0</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d86777239f</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d86778aaf7</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d86779f0f0</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d8677b37b9</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d8677c7d7f</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d8677e273b</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d8675e77f1</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d86760bcf0</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d86762449d</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d86764d1c1</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d8676658e1</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d86768a371</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d8676a2af8</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d8676c555a</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d8676ddd56</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d867501303</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d8675199d4</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d86754617a</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d867565096</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d867585a69</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d86759e19e</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d8675b685b</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d8675cf170</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d86740468b</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d867418de7</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d86743714b</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d867451ebc</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d86746652c</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d86747aba0</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d86749375c</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d8674abf60</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d8674c457e</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d8674dcd17</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d867307fbd</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d86731c69f</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d86733b1f3</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d867355709</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d867369daf</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d86737e53f</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d867392a04</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d8673a7145</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d8673bb67e</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d8673cfd9d</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d8673e43a6</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d8672057a3</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d86721de74</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d86723f375</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d86725f2ac</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d867277bb2</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d8672900ef</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d8672a88c0</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d8672bef1e</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d8672d3651</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq>
<priority>0.70</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/channel/5d4d8672e7c00</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>daily</changefreq> <changefreq>daily</changefreq>
<priority>0.70</priority> <priority>0.70</priority>
</url> </url>
@ -56,36 +742,57 @@
<!-- Categories --> <!-- Categories -->
<url> <url>
<loc>http://192.168.25.16/YouPHPTube/cat/default</loc> <loc>http://gdrive.local/YouPHPTube/cat/teste-sdaf-sfad</loc>
<lastmod>2019-02-16T02:27:59+00:00</lastmod> <lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>weekly</changefreq>
<priority>0.80</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/cat/default</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>weekly</changefreq>
<priority>0.80</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/cat/-5c6aabccb1467</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>weekly</changefreq>
<priority>0.80</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/cat/-sd</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>weekly</changefreq>
<priority>0.80</priority>
</url>
<url>
<loc>http://gdrive.local/YouPHPTube/cat/-</loc>
<lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>weekly</changefreq> <changefreq>weekly</changefreq>
<priority>0.80</priority> <priority>0.80</priority>
</url> </url>
<!-- Videos --> <!-- Videos -->
<url> <url>
<loc>http://192.168.25.16/YouPHPTube/video/video-automatically-booked</loc> <loc>http://gdrive.local/YouPHPTube/video/tk-kravitz-featuring-jacquees-ocean</loc>
<lastmod>2019-02-16T02:27:59+00:00</lastmod> <lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>monthly</changefreq> <changefreq>monthly</changefreq>
<priority>0.80</priority> <priority>0.80</priority>
</url> </url>
<url> <url>
<loc>http://192.168.25.16/YouPHPTube/video/creating-images</loc> <loc>http://gdrive.local/YouPHPTube/video/video-de-teste</loc>
<lastmod>2019-02-16T02:27:59+00:00</lastmod> <lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>monthly</changefreq> <changefreq>monthly</changefreq>
<priority>0.80</priority> <priority>0.80</priority>
</url> </url>
<url> <url>
<loc>http://192.168.25.16/YouPHPTube/video/youphptubeintro</loc> <loc>http://gdrive.local/YouPHPTube/video/video</loc>
<lastmod>2019-02-16T02:27:59+00:00</lastmod> <lastmod>2019-10-23T09:05:42+00:00</lastmod>
<changefreq>monthly</changefreq>
<priority>0.80</priority>
</url>
<url>
<loc>http://192.168.25.16/YouPHPTube/video/-marvel-avengers-the-key</loc>
<lastmod>2019-02-16T02:27:59+00:00</lastmod>
<changefreq>monthly</changefreq> <changefreq>monthly</changefreq>
<priority>0.80</priority> <priority>0.80</priority>
</url> </url>

View file

@ -44,43 +44,48 @@ if (User::isAdmin()) {
</ul> </ul>
<div class="tab-content clearfix"> <div class="tab-content clearfix">
<div class="tab-pane" id="tabTheme"> <div class="tab-pane" id="tabTheme">
<fieldset> <div class="panel panel-default">
<legend><?php echo __("Themes"); ?></legend> <div class="panel-heading"><h2><?php echo __("Themes"); ?></h2></div>
<h1 class="alert alert-warning"> <div class="panel-body">
<span class="fa fa-warning"></span>
<?php echo __("Do not forget to save after choose your theme"); ?> <h1 class="alert alert-warning">
</h1> <span class="fa fa-warning"></span>
<div class="alert alert-info"> <?php echo __("Do not forget to save after choose your theme"); ?>
<span class="fa fa-info-circle"></span> </h1>
<?php echo __("We would like to thanks http://bootswatch.com/"); ?> <div class="alert alert-info">
</div> <span class="fa fa-info-circle"></span>
<?php <?php echo __("We would like to thanks http://bootswatch.com/"); ?>
foreach (glob("{$global['systemRootPath']}view/css/custom/*.css") as $filename) { </div>
//echo "$filename size " . filesize($filename) . "\n"; <?php
$file = basename($filename); // $file is set to "index.php" foreach (glob("{$global['systemRootPath']}view/css/custom/*.css") as $filename) {
$fileEx = basename($filename, ".css"); // $file is set to "index" //echo "$filename size " . filesize($filename) . "\n";
$savedTheme = $config->getTheme(); $file = basename($filename); // $file is set to "index.php"
if ($fileEx == $savedTheme) { $fileEx = basename($filename, ".css"); // $file is set to "index"
$savedTheme = $config->getTheme();
if ($fileEx == $savedTheme) {
?>
<script>
$(document).ready(function () {
setTimeout(function () {
$("#btn<?php echo ($fileEx); ?>").trigger("click");
}, 1000);
});
</script>
<?php
}
?> ?>
<script> <div class="col-xs-4" style="padding: 10px;">
$(document).ready(function () { <img src="<?php echo $global['webSiteRootURL'], "view/css/custom/", $fileEx, ".png"; ?>" class="img-responsive img-radio">
setTimeout(function () { <button type="button" class="btn btn-default btn-radio btn-block btn-xs" id="btn<?php echo ($fileEx); ?>"><?php echo ucfirst($fileEx); ?></button>
$("#btn<?php echo ($fileEx); ?>").trigger("click"); <input type="checkbox" value="<?php echo ($fileEx); ?>" class="hidden left-item">
}, 1000); </div>
});
</script>
<?php <?php
} }
?> ?>
<div class="col-xs-4" style="padding: 10px;">
<img src="<?php echo $global['webSiteRootURL'], "view/css/custom/", $fileEx, ".png"; ?>" class="img-responsive img-radio"> </div>
<button type="button" class="btn btn-default btn-radio btn-block btn-xs" id="btn<?php echo ($fileEx); ?>"><?php echo ucfirst($fileEx); ?></button> </div>
<input type="checkbox" value="<?php echo ($fileEx); ?>" class="hidden left-item">
</div>
<?php
}
?>
</fieldset>
</div> </div>
<div class="tab-pane" id="tabCompatibility"> <div class="tab-pane" id="tabCompatibility">
<div class="alert alert-success"> <div class="alert alert-success">
@ -237,285 +242,321 @@ if (User::isAdmin()) {
</div> </div>
<div class="tab-pane active" id="tabRegular"> <div class="tab-pane active" id="tabRegular">
<fieldset>
<legend><?php echo __("Update the site configuration"); ?></legend>
<div class="form-group"> <div class="row">
<label class="col-md-4 control-label"> <div class="col-md-6">
<?php echo __("Your Logo"); ?> (250x70)
</label> <div class="panel panel-default">
<div class="col-md-8 "> <div class="panel-heading"><h2><?php echo __("Basic"); ?></h2></div>
<div id="croppieLogo"></div> <div class="panel-body">
<a id="logo-btn" class="btn btn-default btn-xs btn-block"><?php echo __("Choose a logo"); ?></a> <div class="form-group">
<label class="col-md-4 control-label"><?php echo __("Language"); ?></label>
<div class="col-md-8 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-flag"></i></span>
<input id="inputLanguage" placeholder="<?php echo __("Language"); ?>" class="form-control" type="text" value="<?php echo $config->getLanguage(); ?>" >
</div>
<small class="form-text text-muted"><?php echo __("This value must match with the language files on"); ?><code><?php echo $global['systemRootPath']; ?>locale</code></small>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label"><?php echo __("E-mail"); ?></label>
<div class="col-md-8 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-envelope"></i></span>
<input id="inputEmail" placeholder="<?php echo __("E-mail"); ?>" class="form-control" type="email" value="<?php echo $config->getContactEmail(); ?>" >
</div>
<small class="form-text text-muted"><?php echo __("This e-mail will be used for this web site notifications"); ?></small>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label"><?php echo __("Authenticated users can upload videos"); ?></label>
<div class="col-md-8 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-cloud-upload"></i></span>
<select class="form-control" id="authCanUploadVideos" >
<option value="1" <?php echo ($config->getAuthCanUploadVideos() == 1) ? "selected" : ""; ?>><?php echo __("Yes"); ?></option>
<option value="0" <?php echo ($config->getAuthCanUploadVideos() == 0) ? "selected" : ""; ?>><?php echo __("No"); ?></option>
</select>
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label"><?php echo __("Authenticated users can view chart"); ?></label>
<div class="col-md-8 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-cloud-upload"></i></span>
<select class="form-control" id="authCanViewChart" >
<option value="0" <?php echo ($config->getAuthCanViewChart() == 0) ? "selected" : ""; ?>><?php echo __("For uploaders"); ?></option>
<option value="1" <?php echo ($config->getAuthCanViewChart() == 1) ? "selected" : ""; ?>><?php echo __("For selected, admin view"); ?></option>
</select>
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label"><?php echo __("Authenticated users can comment videos"); ?></label>
<div class="col-md-8 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-commenting"></i></span>
<select class="form-control" id="authCanComment" >
<option value="1" <?php echo ($config->getAuthCanComment() == 1) ? "selected" : ""; ?>><?php echo __("Yes"); ?></option>
<option value="0" <?php echo ($config->getAuthCanComment() == 0) ? "selected" : ""; ?>><?php echo __("No"); ?></option>
</select>
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label"><?php echo __("Autoplay Video on Load Page"); ?></label>
<div class="col-md-8">
<div class="material-switch">
<input data-toggle="toggle" type="checkbox" name="autoplay" id="autoplay" value="1" <?php
if (!empty($config->getAutoplay())) {
echo "checked";
}
?> >
<label for="autoplay" class="label-primary"></label>
</div>
</div>
</div>
</div>
</div> </div>
<input type="file" id="logo" value="Choose a Logo" accept="image/*" style="display: none;" />
</div> </div>
<div class="form-group"> <div class="col-md-6">
<label class="col-md-4 control-label"> <div class="panel panel-default">
<?php echo __("Favicon"); ?> (64x64) <div class="panel-heading"><h2><?php echo __("Logo and Title"); ?></h2></div>
</label> <div class="panel-body">
<div class="col-md-8 ">
<div id="croppieFavicon"></div> <div class="form-group">
<a id="favicon-btn" class="btn btn-default btn-xs btn-block"><?php echo __("Choose a favicon"); ?></a> <label class="col-md-4 control-label"><?php echo __("Web site title"); ?></label>
</div> <div class="col-md-8 inputGroupContainer">
<input type="file" id="favicon" value="Choose a favicon" accept="image/*" style="display: none;" /> <div class="input-group">
</div> <span class="input-group-addon"><i class="glyphicon glyphicon-globe"></i></span>
<div class="form-group"> <input id="inputWebSiteTitle" placeholder="<?php echo __("Web site title"); ?>" class="form-control" type="text" value="<?php echo $config->getWebSiteTitle(); ?>" >
<label class="col-md-4 control-label"><?php echo __("Web site title"); ?></label> </div>
<div class="col-md-8 inputGroupContainer"> </div>
<div class="input-group"> </div>
<span class="input-group-addon"><i class="glyphicon glyphicon-globe"></i></span> <div class="form-group">
<input id="inputWebSiteTitle" placeholder="<?php echo __("Web site title"); ?>" class="form-control" type="text" value="<?php echo $config->getWebSiteTitle(); ?>" > <label class="col-md-4 control-label">
<?php echo __("Your Logo"); ?> (250x70)
</label>
<div class="col-md-8 ">
<div id="croppieLogo"></div>
<a id="logo-btn" class="btn btn-default btn-xs btn-block"><?php echo __("Choose a logo"); ?></a>
</div>
<input type="file" id="logo" value="Choose a Logo" accept="image/*" style="display: none;" />
</div>
<div class="form-group">
<label class="col-md-4 control-label">
<?php echo __("Favicon"); ?> (64x64)
</label>
<div class="col-md-8 ">
<div id="croppieFavicon"></div>
<a id="favicon-btn" class="btn btn-default btn-xs btn-block"><?php echo __("Choose a favicon"); ?></a>
</div>
<input type="file" id="favicon" value="Choose a favicon" accept="image/*" style="display: none;" />
</div>
</div> </div>
</div> </div>
</div> </div>
<div class="form-group"> </div>
<label class="col-md-4 control-label"><?php echo __("Language"); ?></label>
<div class="col-md-8 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-flag"></i></span>
<input id="inputLanguage" placeholder="<?php echo __("Language"); ?>" class="form-control" type="text" value="<?php echo $config->getLanguage(); ?>" >
</div>
<small class="form-text text-muted"><?php echo __("This value must match with the language files on"); ?><code><?php echo $global['systemRootPath']; ?>locale</code></small>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label"><?php echo __("E-mail"); ?></label>
<div class="col-md-8 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="glyphicon glyphicon-envelope"></i></span>
<input id="inputEmail" placeholder="<?php echo __("E-mail"); ?>" class="form-control" type="email" value="<?php echo $config->getContactEmail(); ?>" >
</div>
<small class="form-text text-muted"><?php echo __("This e-mail will be used for this web site notifications"); ?></small>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label"><?php echo __("Authenticated users can upload videos"); ?></label>
<div class="col-md-8 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-cloud-upload"></i></span>
<select class="form-control" id="authCanUploadVideos" >
<option value="1" <?php echo ($config->getAuthCanUploadVideos() == 1) ? "selected" : ""; ?>><?php echo __("Yes"); ?></option>
<option value="0" <?php echo ($config->getAuthCanUploadVideos() == 0) ? "selected" : ""; ?>><?php echo __("No"); ?></option>
</select>
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label"><?php echo __("Authenticated users can view chart"); ?></label>
<div class="col-md-8 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-cloud-upload"></i></span>
<select class="form-control" id="authCanViewChart" >
<option value="0" <?php echo ($config->getAuthCanViewChart() == 0) ? "selected" : ""; ?>><?php echo __("For uploaders"); ?></option>
<option value="1" <?php echo ($config->getAuthCanViewChart() == 1) ? "selected" : ""; ?>><?php echo __("For selected, admin view"); ?></option>
</select>
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label"><?php echo __("Authenticated users can comment videos"); ?></label>
<div class="col-md-8 inputGroupContainer">
<div class="input-group">
<span class="input-group-addon"><i class="fa fa-commenting"></i></span>
<select class="form-control" id="authCanComment" >
<option value="1" <?php echo ($config->getAuthCanComment() == 1) ? "selected" : ""; ?>><?php echo __("Yes"); ?></option>
<option value="0" <?php echo ($config->getAuthCanComment() == 0) ? "selected" : ""; ?>><?php echo __("No"); ?></option>
</select>
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label"><?php echo __("Autoplay Video on Load Page"); ?></label>
<div class="col-md-8">
<div class="material-switch">
<input data-toggle="toggle" type="checkbox" name="autoplay" id="autoplay" value="1" <?php
if (!empty($config->getAutoplay())) {
echo "checked";
}
?> >
<label for="autoplay" class="label-primary"></label>
</div>
</div>
</div>
</fieldset>
</div> </div>
<div class="tab-pane" id="tabAdvanced"> <div class="tab-pane" id="tabAdvanced">
<?php <?php
if (empty($global['disableAdvancedConfigurations'])) { if (empty($global['disableAdvancedConfigurations'])) {
?> ?>
<fieldset> <div class="row">
<legend><?php echo __("Advanced configuration"); ?></legend> <div class="col-md-6">
<div class="panel panel-default">
<div class="panel-heading"><h2><?php echo __("Advanced configuration"); ?></h2></div>
<div class="panel-body">
<div class="form-group"> <div class="form-group">
<div class="col-md-12"> <div class="col-md-12">
<button class="btn btn-danger" id="clearCache"><i class="fa fa-trash"></i> <?php echo __("Clear Cache Directory"); ?></button> <button class="btn btn-danger" id="clearCache">
<button class="btn btn-primary" id="generateSiteMap"><i class="fa fa-sitemap"></i> <?php echo __("Generate Sitemap"); ?></button> <i class="fa fa-trash"></i> <?php echo __("Clear Cache Directory"); ?>
<?php </button>
if (!is_writable($sitemapFile)) { <button class="btn btn-primary" id="generateSiteMap">
?> <i class="fa fa-sitemap"></i> <?php echo __("Generate Sitemap"); ?>
<div class="alert alert-danger"> </button>
the sitemap file must be writable <?php
<code>sudo chmod 777 <?php echo $sitemapFile; ?></code> if (!is_writable($sitemapFile)) {
</div> ?>
<?php <div class="alert alert-danger">
} the sitemap file must be writable
?> <code>sudo chmod 777 <?php echo $sitemapFile; ?></code>
</div> </div>
</div> <?php
<div class="form-group"> }
<label class="col-md-2"><?php echo __("Encoder URL"); ?></label> ?>
<div class="col-md-10"> </div>
<input id="encoder_url" aria-describedby="encoder_urlHelp" class="form-control" type="url" value="<?php echo $config->_getEncoderURL(); ?>" > </div>
<small id="encoder_urlHelp" class="form-text text-muted"> <div class="form-group">
<?php echo __("You need to set up an encoder server"); ?><br> <label class="col-md-4 control-label"><?php echo __("Encoder URL"); ?></label>
<?php echo __("You can use our public encoder on"); ?>: https://encoder.youphptube.com/ or <div class="col-md-8">
<a href="https://github.com/DanielnetoDotCom/YouPHPTube-Encoder" class="btn btn-default btn-xs" target="_blank"><?php echo __("For faster encode, download your own encoder"); ?></a> <input id="encoder_url" aria-describedby="encoder_urlHelp" class="form-control" type="url" value="<?php echo $config->_getEncoderURL(); ?>" >
</small> <small id="encoder_urlHelp" class="form-text text-muted">
</div> <?php echo __("You need to set up an encoder server"); ?><br>
</div> <?php echo __("You can use our public encoder on"); ?>: https://encoder.youphptube.com/ or
<a href="https://github.com/DanielnetoDotCom/YouPHPTube-Encoder" class="btn btn-default btn-xs" target="_blank"><?php echo __("For faster encode, download your own encoder"); ?></a>
</small>
</div>
</div>
<div class="form-group"> <div class="form-group">
<label class="col-md-2"><?php echo __("Session Timeout in seconds"); ?></label> <label class="col-md-4 control-label"><?php echo __("Session Timeout in seconds"); ?></label>
<div class="col-md-10"> <div class="col-md-8">
<input id="session_timeout" class="form-control" type="number" value="<?php echo $config->getSession_timeout(); ?>" > <input id="session_timeout" class="form-control" type="number" value="<?php echo $config->getSession_timeout(); ?>" >
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-md-2"><?php echo __("Disable YouPHPTube Google Analytics"); ?></label> <label class="col-md-4 control-label"><?php echo __("Disable YouPHPTube Google Analytics"); ?></label>
<div class="col-md-10"> <div class="col-md-8">
<div class="material-switch"> <div class="material-switch">
<input data-toggle="toggle" type="checkbox" name="disable_analytics" id="disable_analytics" value="1" <?php <input data-toggle="toggle" type="checkbox" name="disable_analytics" id="disable_analytics" value="1" <?php
if (!empty($config->getDisable_analytics())) { if (!empty($config->getDisable_analytics())) {
echo "checked"; echo "checked";
} }
?> aria-describedby="disable_analyticsHelp"> ?> aria-describedby="disable_analyticsHelp">
<label for="disable_analytics" class="label-success"></label> <label for="disable_analytics" class="label-success"></label>
</div> </div>
<small id="disable_analyticsHelp" class="form-text text-muted"><?php echo __("This help us to track and dettect errors"); ?></small> <small id="disable_analyticsHelp" class="form-text text-muted"><?php echo __("This help us to track and dettect errors"); ?></small>
</div> </div>
</div> </div>
<div class="form-group"> <div class="form-group">
<label class="col-md-2"><?php echo __("Disable Youtube-Upload"); ?></label> <label class="col-md-4 control-label"><?php echo __("Disable Youtube-Upload"); ?></label>
<div class="col-md-10"> <div class="col-md-8">
<div class="material-switch"> <div class="material-switch">
<input data-toggle="toggle" type="checkbox" name="disable_youtubeupload" id="disable_youtubeupload" value="1" <?php <input data-toggle="toggle" type="checkbox" name="disable_youtubeupload" id="disable_youtubeupload" value="1" <?php
if (!empty($config->getDisable_youtubeupload())) { if (!empty($config->getDisable_youtubeupload())) {
echo "checked"; echo "checked";
} }
?> > ?> >
<label for="disable_youtubeupload" class="label-success"></label> <label for="disable_youtubeupload" class="label-success"></label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label"><?php echo __("Allow download video"); ?></label>
<div class="col-md-8">
<div class="material-switch">
<input data-toggle="toggle" type="checkbox" name="disable_rightclick" id="allow_download" value="1" <?php
if (!empty($config->getAllow_download())) {
echo "checked";
}
?> aria-describedby="allow_downloadHelp">
<label for="allow_download" class="label-success"></label>
</div>
<small id="allow_downloadHelp" class="form-text text-muted"><?php echo __("This creates a download-button under your video, suggest you title.mp4 as download-name."); ?></small>
</div>
</div>
</div> </div>
</div> </div>
</div>
<div class="form-group">
<label class="col-md-2"><?php echo __("Allow download video"); ?></label>
<div class="col-md-10">
<div class="material-switch">
<input data-toggle="toggle" type="checkbox" name="disable_rightclick" id="allow_download" value="1" <?php
if (!empty($config->getAllow_download())) {
echo "checked";
}
?> aria-describedby="allow_downloadHelp">
<label for="allow_download" class="label-success"></label>
</div>
<small id="allow_downloadHelp" class="form-text text-muted"><?php echo __("This creates a download-button under your video, suggest you title.mp4 as download-name."); ?></small>
</div>
</div> </div>
<hr> <div class="col-md-6">
<div class="form-group">
<label class="col-md-2"></label> <div class="panel panel-default">
<div class="col-md-10"> <div class="panel-heading"><h1><i class="fas fa-at"></i> Email Configuration</h1></div>
<div class="alert alert-info"> <div class="panel-body">
<h1>Email Configuration</h1>
If you are not sure how to configure your email, <div class="alert alert-warning">
please try <a href="https://github.com/YouPHPTube/YouPHPTube/wiki/Setting-up-YouPHPTube-to-send-emails">this help</a> <h3>
<i class="fas fa-info-circle"></i>
If you are not sure how to configure your email,
please try <a href="https://github.com/YouPHPTube/YouPHPTube/wiki/Setting-up-YouPHPTube-to-send-emails" target="_blank">this help</a>
</h3>
</div>
<div class="form-group">
<label class="col-md-4 control-label"><?php echo __("Enable SMTP"); ?></label>
<div class="col-md-8">
<div class="material-switch">
<input data-toggle="toggle" type="checkbox" name="enableSmtp" id="enableSmtp" value="1" <?php
if (!empty($config->getSmtp())) {
echo "checked";
}
?> >
<label for="enableSmtp" class="label-success"></label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label"><?php echo __("Enable SMTP Auth"); ?></label>
<div class="col-md-8">
<div class="material-switch">
<input data-toggle="toggle" type="checkbox" name="enableSmtpAuth" id="enableSmtpAuth" value="1" <?php
if (!empty($config->getSmtpAuth())) {
echo "checked";
}
?> >
<label for="enableSmtpAuth" class="label-success"></label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label"><?php echo __("SMTP Secure"); ?></label>
<div class="col-md-8">
<input id="smtpSecure" class="form-control" type="text" value="<?php echo $config->getSmtpSecure(); ?>" placeholder="tls OR ssl" aria-describedby="smtpSecureHelp" >
<small id="smtpSecureHelp" class="form-text text-muted"><?php echo __("Use tls OR ssl"); ?></small>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label"><?php echo __("SMTP Port"); ?></label>
<div class="col-md-8">
<input id="smtpPort" class="form-control" type="number" value="<?php echo $config->getSmtpPort(); ?>" placeholder="465 OR 587" aria-describedby="smtpPortHelp" >
<small id="smtpPortHelp" class="form-text text-muted"><?php echo __("465 OR 587"); ?></small>
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label"><?php echo __("SMTP Host"); ?></label>
<div class="col-md-8">
<input id="smtpHost" class="form-control" type="text" value="<?php echo $config->getSmtpHost(); ?>" placeholder="smtp.gmail.com" >
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label"><?php echo __("SMTP Username"); ?></label>
<div class="col-md-8">
<input id="smtpUsername" class="form-control" type="text" value="<?php echo $config->getSmtpUsername(); ?>" placeholder="email@gmail.com" >
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label"><?php echo __("SMTP Password"); ?></label>
<div class="col-md-8">
<input id="smtpPassword" class="form-control" type="password" value="<?php echo $config->getSmtpPassword(); ?>" >
</div>
</div>
<div class="form-group">
<label class="col-md-4 control-label"><?php echo __("Test your email"); ?></label>
<div class="col-md-8">
<span class="btn btn-warning btn-block" id="testEmail" ><?php echo __("Test Email"); ?> <span class="glyphicon glyphicon-send"></span></span>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
<div class="form-group"> </div>
<label class="col-md-2"><?php echo __("Enable SMTP"); ?></label>
<div class="col-md-10">
<div class="material-switch">
<input data-toggle="toggle" type="checkbox" name="enableSmtp" id="enableSmtp" value="1" <?php
if (!empty($config->getSmtp())) {
echo "checked";
}
?> >
<label for="enableSmtp" class="label-success"></label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-2"><?php echo __("Enable SMTP Auth"); ?></label>
<div class="col-md-10">
<div class="material-switch">
<input data-toggle="toggle" type="checkbox" name="enableSmtpAuth" id="enableSmtpAuth" value="1" <?php
if (!empty($config->getSmtpAuth())) {
echo "checked";
}
?> >
<label for="enableSmtpAuth" class="label-success"></label>
</div>
</div>
</div>
<div class="form-group">
<label class="col-md-2"><?php echo __("SMTP Secure"); ?></label>
<div class="col-md-10">
<input id="smtpSecure" class="form-control" type="text" value="<?php echo $config->getSmtpSecure(); ?>" placeholder="tls OR ssl" aria-describedby="smtpSecureHelp" >
<small id="smtpSecureHelp" class="form-text text-muted"><?php echo __("Use tls OR ssl"); ?></small>
</div>
</div>
<div class="form-group">
<label class="col-md-2"><?php echo __("SMTP Port"); ?></label>
<div class="col-md-10">
<input id="smtpPort" class="form-control" type="number" value="<?php echo $config->getSmtpPort(); ?>" placeholder="465 OR 587" aria-describedby="smtpPortHelp" >
<small id="smtpPortHelp" class="form-text text-muted"><?php echo __("465 OR 587"); ?></small>
</div>
</div>
<div class="form-group">
<label class="col-md-2"><?php echo __("SMTP Host"); ?></label>
<div class="col-md-10">
<input id="smtpHost" class="form-control" type="text" value="<?php echo $config->getSmtpHost(); ?>" placeholder="smtp.gmail.com" >
</div>
</div>
<div class="form-group">
<label class="col-md-2"><?php echo __("SMTP Username"); ?></label>
<div class="col-md-10">
<input id="smtpUsername" class="form-control" type="text" value="<?php echo $config->getSmtpUsername(); ?>" placeholder="email@gmail.com" >
</div>
</div>
<div class="form-group">
<label class="col-md-2"><?php echo __("SMTP Password"); ?></label>
<div class="col-md-10">
<input id="smtpPassword" class="form-control" type="password" value="<?php echo $config->getSmtpPassword(); ?>" >
</div>
</div>
<div class="form-group">
<label class="col-md-4"><?php echo __("Test your email"); ?></label>
<div class="col-md-8">
<span class="btn btn-warning btn-lg" id="testEmail" ><?php echo __("Test Email"); ?> <span class="glyphicon glyphicon-send"></span></span>
</div>
</div>
</fieldset>
<?php <?php
} else { } else {
?> ?>
@ -525,28 +566,23 @@ if (User::isAdmin()) {
?> ?>
</div> </div>
<div class="tab-pane" id="tabHead"> <div class="tab-pane" id="tabHead">
<fieldset> <div class="form-group">
<legend><?php echo __("Script Code"); ?></legend> <label class="col-md-2 control-label"><?php echo __("Head Code"); ?></label>
<div class="col-md-10">
<div class="form-group"> <textarea id="head" class="form-control" type="text" rows="20" ><?php echo $config->getHead(); ?></textarea>
<label class="col-md-2"><?php echo __("Head Code"); ?></label> <small>For Google Analytics code: <a href='https://analytics.google.com' target="_blank">https://analytics.google.com</a></small><br>
<div class="col-md-10"> <small>Leave blank for native code</small>
<textarea id="head" class="form-control" type="text" rows="20" ><?php echo $config->getHead(); ?></textarea> </div>
<small>For Google Analytics code: <a href='https://analytics.google.com' target="_blank">https://analytics.google.com</a></small><br> </div>
<small>Leave blank for native code</small> <div class="form-group">
<label class="col-md-2 control-label"><?php echo __("Google Ad Sense"); ?></label>
<div class="col-md-10">
<input type="hidden" value="" id="adsense"/>
<div class="alert alert-info">
Google AD Sense and any other Ads provider are moved to the <a href='<?php echo $global['webSiteRootURL']; ?>plugins'>ADs plugin </a>
</div> </div>
</div> </div>
<div class="form-group"> </div>
<label class="col-md-2"><?php echo __("Google Ad Sense"); ?></label>
<div class="col-md-10">
<input type="hidden" value="" id="adsense"/>
<div class="alert alert-info">
Google AD Sense and any other Ads provider are moved to the <a href='<?php echo $global['webSiteRootURL']; ?>plugins'>ADs plugin </a>
</div>
</div>
</div>
</fieldset>
</div> </div>
</div> </div>
</div> </div>
@ -629,7 +665,7 @@ if (User::isAdmin()) {
$('#logo-btn').on('click', function (ev) { $('#logo-btn').on('click', function (ev) {
$('#logo').trigger("click"); $('#logo').trigger("click");
}); });
// start croppie logo // start croppie logo
$('#favicon').on('change', function () { $('#favicon').on('change', function () {
readFile(this, faviconCrop); readFile(this, faviconCrop);
@ -637,38 +673,6 @@ if (User::isAdmin()) {
$('#favicon-btn').on('click', function (ev) { $('#favicon-btn').on('click', function (ev) {
$('#favicon').trigger("click"); $('#favicon').trigger("click");
}); });
$('#clearCache').on('click', function (ev) {
ev.preventDefault();
modal.showPleaseWait();
$.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>objects/configurationClearCache.json.php',
success: function (response) {
if (!response.error) {
swal("<?php echo __("Congratulations!"); ?>", "<?php echo __("Your cache has been cleared!"); ?>", "success");
} else {
swal("<?php echo __("Sorry!"); ?>", "<?php echo __("Your cache has NOT been cleared!"); ?>", "error");
}
modal.hidePleaseWait();
}
});
});
$('#generateSiteMap').on('click', function (ev) {
ev.preventDefault();
modal.showPleaseWait();
$.ajax({
url: '<?php echo $global['webSiteRootURL']; ?>objects/configurationGenerateSiteMap.json.php',
success: function (response) {
if (!response.error) {
swal("<?php echo __("Congratulations!"); ?>", "<?php echo __("File created!"); ?>", "success");
} else {
swal("<?php echo __("Sorry!"); ?>", "<?php echo __("File NOT created!"); ?>", "error");
}
modal.hidePleaseWait();
}
});
});
$('#logo-result-btn').on('click', function (ev) { $('#logo-result-btn').on('click', function (ev) {
logoCrop.croppie('result', { logoCrop.croppie('result', {

View file

@ -810,6 +810,16 @@ if (((empty($advancedCustomUser->userMustBeLoggedIn) && empty($advancedCustom->d
<?php echo __("Plugins"); ?> <?php echo __("Plugins"); ?>
</a> </a>
</li> </li>
<li>
<a href="#" class="clearCacheButton">
<i class="fa fa-trash"></i> <?php echo __("Clear Cache Directory"); ?>
</a>
</li>
<li>
<a href="#" class="generateSiteMapButton">
<i class="fa fa-sitemap"></i> <?php echo __("Generate Sitemap"); ?>
</a>
</li>
</ul> </ul>
</li> </li>
<?php <?php

View file

@ -47,7 +47,8 @@ try {
} }
}); });
} }
} catch (e) {} } catch (e) {
}
var pleaseWaitIsINUse = false; var pleaseWaitIsINUse = false;
$(document).ready(function () { $(document).ready(function () {
@ -171,6 +172,40 @@ $(document).ready(function () {
$(this).addClass("selected"); $(this).addClass("selected");
} }
}); });
$('#clearCache, .clearCacheButton').on('click', function (ev) {
ev.preventDefault();
modal.showPleaseWait();
$.ajax({
url: webSiteRootURL + 'objects/configurationClearCache.json.php',
success: function (response) {
if (!response.error) {
swal("Congratulations!", "Your cache has been cleared!", "success");
} else {
swal("Sorry!", "Your cache has NOT been cleared!", "error");
}
modal.hidePleaseWait();
}
});
});
$('#generateSiteMap, .generateSiteMapButton').on('click', function (ev) {
ev.preventDefault();
modal.showPleaseWait();
$.ajax({
url: webSiteRootURL + 'objects/configurationGenerateSiteMap.json.php',
success: function (response) {
if (!response.error) {
swal("Congratulations!", "File created!", "success");
} else {
swal("Sorry!", "File NOT created!", "error");
}
modal.hidePleaseWait();
}
});
});
}); });
function removeTracks() { function removeTracks() {