1
0
Fork 0
mirror of https://github.com/DanielnetoDotCom/YouPHPTube synced 2025-10-03 01:39:24 +02:00
Daniel Neto 2023-10-16 17:58:47 -03:00
parent 54183dc7db
commit 88ba1f38cd
87 changed files with 209 additions and 158 deletions

View file

@ -132,44 +132,61 @@ function setSiteLang() {
global $config, $global;
if (empty($global['systemRootPath'])) {
if (function_exists('getLanguageFromBrowser')) {
includeConfigLog(__LINE__, basename(__FILE__));
setLanguage(getLanguageFromBrowser());
} else {
includeConfigLog(__LINE__, basename(__FILE__));
setLanguage('en_US');
}
includeConfigLog(__LINE__, basename(__FILE__));
} else {
includeConfigLog(__LINE__, basename(__FILE__));
require_once $global['systemRootPath'] . 'plugin/AVideoPlugin.php';
$userLocation = false;
includeConfigLog(__LINE__, basename(__FILE__));
$obj = AVideoPlugin::getDataObjectIfEnabled('User_Location');
includeConfigLog(__LINE__, basename(__FILE__));
$userLocation = !empty($obj) && !empty($obj->autoChangeLanguage);
if (!empty($_GET['lang'])) {
includeConfigLog(__LINE__, basename(__FILE__));
_session_start();
includeConfigLog(__LINE__, basename(__FILE__));
setLanguage($_GET['lang']);
} else if ($userLocation) {
includeConfigLog(__LINE__, basename(__FILE__));
User_Location::changeLang();
}
includeConfigLog(__LINE__, basename(__FILE__));
try {
if (empty($config) || !is_object($config)) {
includeConfigLog(__LINE__, basename(__FILE__));
require_once $global['systemRootPath'] . 'objects/configuration.php';
if (class_exists('Configuration')) {
$config = new Configuration();
} else {
//_error_log("setSiteLang ERROR 1 systemRootPath=[{$global['systemRootPath']}] " . json_encode(debug_backtrace()));
}
includeConfigLog(__LINE__, basename(__FILE__));
}
} catch (Exception $exc) {
_error_log("setSiteLang ERROR 2 systemRootPath=[{$global['systemRootPath']}] " . $exc->getMessage() . ' ' . json_encode(debug_backtrace()));
}
if (empty($_SESSION['language']) && is_object($config)) {
includeConfigLog(__LINE__, basename(__FILE__));
setLanguage($config->getLanguage());
includeConfigLog(__LINE__, basename(__FILE__));
}
if (empty($_SESSION['language'])) {
if (function_exists('getLanguageFromBrowser')) {
includeConfigLog(__LINE__, basename(__FILE__));
setLanguage(getLanguageFromBrowser());
} else {
includeConfigLog(__LINE__, basename(__FILE__));
setLanguage('en_US');
}
includeConfigLog(__LINE__, basename(__FILE__));
}
}
}

View file

@ -1093,7 +1093,7 @@ abstract class CacheHandler {
_session_start();
clearCache(true);
unset($_SESSION['user']['sessionCache']);
session_write_close();
_session_write_close();
$dir = ObjectYPT::getTmpCacheDir() . $prefix;
return exec("rm -R {$dir}");
}

View file

@ -447,11 +447,9 @@ class Category
//_error_log("getAllCategories id={$row['id']} line=".__LINE__);
$totals = self::getTotalFromCategory($row['id']);
if ($onlyWithVideos && empty($totals['total'])) {
continue;
}
//_error_log("getAllCategories id={$row['id']} line=".__LINE__);
$fullTotals = self::getTotalFromCategory($row['id'], false, true, true);
@ -475,9 +473,11 @@ class Category
//_error_log("getAllCategories id={$row['id']} line=".__LINE__);
$row['description_html'] = textToLink(htmlentities("{$row['description']}"));
$category[] = $row;
//break;
}
$result = $cacheHandler->setCache($category);
//var_dump($category, $result);exit;
$cacheHandler->setCache($category);
} else {
$category = false;
//die($sql . '\nError : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error);
@ -631,11 +631,21 @@ class Category
public static function getTotalFromCategory($categories_id, $showUnlisted = false, $getAllVideos = false, $renew = false)
{
$videos = self::getTotalVideosFromCategory($categories_id, $showUnlisted, $getAllVideos, $renew);
$lives = self::getTotalLivesFromCategory($categories_id, $showUnlisted, $renew);
$livelinkss = self::getTotalLiveLinksFromCategory($categories_id, $showUnlisted, $renew);
$total = $videos + $lives + $livelinkss;
return ['videos' => $videos, 'lives' => $lives, 'livelinks' => $livelinkss, 'total' => $total];
$cacheSuffix = "getTotalFromCategory_{$categories_id}_".intval($showUnlisted).intval($getAllVideos);
$cacheHandler = new CategoryCacheHandler(0);
$result = $cacheHandler->getCache($cacheSuffix, 0);
if(empty($result)){
$videos = self::getTotalVideosFromCategory($categories_id, $showUnlisted, $getAllVideos, $renew);
$lives = self::getTotalLivesFromCategory($categories_id, $showUnlisted, $renew);
$livelinkss = self::getTotalLiveLinksFromCategory($categories_id, $showUnlisted, $renew);
$total = $videos + $lives + $livelinkss;
$result = ['videos' => $videos, 'lives' => $lives, 'livelinks' => $livelinkss, 'total' => $total];
$cacheHandler->setCache($result);
}else{
$result = object_to_array($result);
}
return $result;
}
public static function getTotalFromChildCategory($categories_id, $showUnlisted = false, $getAllVideos = false, $renew = false)

View file

@ -700,7 +700,7 @@ function setSiteSendMessage(\PHPMailer\PHPMailer\PHPMailer &$mail)
$mail->isSendmail();
}
// do not let the system hang on email send
session_write_close();
_session_write_close();
}
/**
@ -3144,7 +3144,7 @@ function url_get_contents($url, $ctx = "", $timeout = 0, $debug = false, $mantai
if (isSameDomainAsMyAVideo($url) || $mantainSession) {
$session_cookie = session_name() . '=' . session_id();
session_write_close();
_session_write_close();
}
if (empty($ctx)) {
$opts = [
@ -3955,7 +3955,7 @@ function siteMap()
_error_log("siteMap: start");
ini_set('memory_limit', '-1');
ini_set('max_execution_time', 0);
@session_write_close();
@_session_write_close();
global $global, $advancedCustom;
$totalCategories = 0;
@ -4984,6 +4984,14 @@ function postVariables($url, $array, $httpcodeOnly = true, $timeout = 10)
}
}
function _session_write_close(){
if (session_status() === PHP_SESSION_ACTIVE) {
includeConfigLog(__LINE__, 'session_write_close '.basename(__FILE__));
_error_log(json_encode(debug_backtrace()));
@session_write_close();
}
}
function _session_start(array $options = [])
{
try {
@ -4992,12 +5000,11 @@ function _session_start(array $options = [])
unset($_GET['PHPSESSID']);
if (!User::isLogged()) {
if ($PHPSESSID !== session_id()) {
if (session_status() !== PHP_SESSION_NONE) {
@session_write_close();
}
_session_write_close();
session_id($PHPSESSID);
//_error_log("captcha: session_id changed to {$PHPSESSID}");
}
includeConfigLog(__LINE__, 'session_start '.basename(__FILE__));
$session = @session_start($options);
if (preg_match('/objects\/getCaptcha\.php/i', $_SERVER['SCRIPT_NAME'])) {
@ -5012,6 +5019,8 @@ function _session_start(array $options = [])
//_error_log("captcha: user logged we will not change the session ID PHPSESSID={$PHPSESSID} session_id=" . session_id());
}
} elseif (session_status() == PHP_SESSION_NONE) {
includeConfigLog(__LINE__, 'session_start '.basename(__FILE__));
//_error_log(json_encode(debug_backtrace()));
return @session_start($options);
}
} catch (Exception $exc) {
@ -5265,7 +5274,7 @@ function getUsageFromFilename($filename, $dir = "")
$files = globVideosDir($filename);
}
//var_dump($paths, $files, $filename);exit;
session_write_close();
_session_write_close();
$filesProcessed = [];
if (empty($files)) {
_error_log("getUsageFromFilename: we did not find any file for {$dir}{$filename}, we will create a fake one " . json_encode(debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS)));
@ -8331,7 +8340,7 @@ function convertVideoFileWithFFMPEG($fromFileLocation, $toFileLocation, $try = 0
$command .= " 1> {$progressFileEscaped} 2>&1";
$command = removeUserAgentIfNotURL($command);
_error_log("convertVideoFileWithFFMPEG try[{$try}]: " . $command);
session_write_close();
_session_write_close();
_mysql_close();
exec($command, $output, $return);
_session_start();
@ -9345,7 +9354,7 @@ function outputAndContinueInBackground($msg = '')
return false;
}
$outputAndContinueInBackground = 1;
@session_write_close();
@_session_write_close();
//_mysql_close();
// Instruct PHP to continue execution
ignore_user_abort(true);

View file

@ -2,7 +2,7 @@
require_once '../videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/video.php';
//getAllVideosAsync($status = "viewable", $showOnlyLoggedUserVideos = false, $ignoreGroup = false, $videosArrayId = array(), $getStatistcs = false, $showUnlisted = false, $activeUsersOnly = true)
session_write_close();
_session_write_close();
$status = $argv[1];
$showOnlyLoggedUserVideos = $argv[2];
$ignoreGroup = $argv[3];

View file

@ -3,7 +3,7 @@ require_once '../videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/video.php';
//getTotalVideosInfo($status = "viewable", $showOnlyLoggedUserVideos = false,
//$ignoreGroup = false, $videosArrayId = array(), $getStatistcs = false)
session_write_close();
_session_write_close();
$filename = $argv[1];
$type = $argv[2];
$cacheFileName = $argv[3];

View file

@ -3,7 +3,7 @@ require_once '../videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/video.php';
//getTotalVideosInfo($status = "viewable", $showOnlyLoggedUserVideos = false,
//$ignoreGroup = false, $videosArrayId = array(), $getStatistcs = false)
session_write_close();
_session_write_close();
$video_id = $argv[1];
$type = $argv[2];
$cacheFileName = $argv[3];

View file

@ -4,7 +4,7 @@ require_once $global['systemRootPath'] . 'objects/video.php';
//getTotalVideosInfo($status = "viewable", $showOnlyLoggedUserVideos = false,
//$ignoreGroup = false, $videosArrayId = array(), $getStatistcs = false)
session_write_close();
_session_write_close();
$status = $argv[1];
$showOnlyLoggedUserVideos = boolval($argv[2]);
$ignoreGroup = boolval($argv[3]);

View file

@ -51,10 +51,14 @@ function includeConfigLog($line, $desc=''){
if(empty($_REQUEST['debug'])){
return false;
}
global $global;
$seconds = number_format(microtime(true) - $global['avideoStartMicrotime'], 4);
$msg = "includeConfigLog: {$seconds} seconds line={$line} {$desc}";
echo $msg."<br>".PHP_EOL;
global $global, $_includeConfigLogID, $_includeConfigLogLastCheck;
if(!isset($_includeConfigLogID)){
$_includeConfigLogID = date('H:i:s');
}
$_includeConfigLogLastCheck = microtime(true);
$seconds = number_format($_includeConfigLogLastCheck - $global['avideoStartMicrotime'], 4);
$msg = "includeConfigLog[$_includeConfigLogID]: {$seconds} seconds line={$line} {$desc}";
//echo $msg."<br>".PHP_EOL;
error_log($msg);
}
includeConfigLog(__LINE__);
@ -130,7 +134,7 @@ $global['dont_show_us_flag'] = false;
if (empty($doNotStartSessionbaseIncludeConfig)) {
$config = new Configuration();
//var_dump($config);exit;
@session_write_close();
@_session_write_close();
// server should keep session data for AT LEAST 1 hour
ini_set('session.gc_maxlifetime', $config->getSession_timeout());

View file

@ -344,6 +344,6 @@ $json = _json_encode($object);
//_error_log("login.json.php complete");
//header("Content-length: " . strlen($json));
//_error_log('login.json.php is done '.User::getId());
session_write_close();
_session_write_close();
echo $json;
exit;

View file

@ -103,15 +103,17 @@ class sqlDAL
* @var object $global['mysqli']
*/
// make sure it does not store autid transactions
$debug = debug_backtrace();
if (empty($debug[2]['class']) || $debug[2]['class'] !== "AuditTable") {
$audit = AVideoPlugin::loadPluginIfEnabled('Audit');
if (!empty($audit)) {
try {
$audit->exec(@$debug[1]['function'], @$debug[1]['class'], $preparedStatement, $formats, json_encode($values), User::getId());
} catch (Exception $exc) {
_error_log('Error in writeSql: ' . $global['mysqli']->errno . " " . $global['mysqli']->error . ' ' . $preparedStatement);
log_error($exc->getTraceAsString());
if(strpos($preparedStatement, 'CachesInDB')===false){
$debug = debug_backtrace();
if (empty($debug[2]['class']) || $debug[2]['class'] !== "AuditTable") {
$audit = AVideoPlugin::loadPluginIfEnabled('Audit');
if (!empty($audit)) {
try {
$audit->exec(@$debug[1]['function'], @$debug[1]['class'], $preparedStatement, $formats, json_encode($values), User::getId());
} catch (Exception $exc) {
_error_log('Error in writeSql: ' . $global['mysqli']->errno . " " . $global['mysqli']->error . ' ' . $preparedStatement);
log_error($exc->getTraceAsString());
}
}
}
}

View file

@ -8,7 +8,7 @@ if (!User::isLogged()) {
}
require_once $global['systemRootPath'] . 'objects/playlist.php';
header('Content-Type: application/json');
session_write_close();
_session_write_close();
//mysqlBeginTransaction();
$row = PlayList::getAllFromUser(User::getId(), false);
foreach ($row as $key => $value) {

View file

@ -3,7 +3,7 @@ global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../videos/configuration.php';
}
session_write_close();
_session_write_close();
header('Access-Control-Allow-Origin: *');
header("Access-Control-Allow-Headers: Content-Type");
header('Content-Type: application/json');
@ -15,7 +15,7 @@ require_once $global['systemRootPath'] . 'videos/configuration.php';
require_once './playlist.php';
header('Content-Type: application/json');
_error_log('playlistsFromUserVideos getAllFromUser '.$_GET['users_id']);
session_write_close();
_session_write_close();
$row = PlayList::getAllFromUser($_GET['users_id'], false);
foreach ($row as $key => $value) {
foreach ($row[$key]['videos'] as $key2 => $value2) {

View file

@ -7,25 +7,25 @@ if (!isset($global['systemRootPath'])) {
header('Access-Control-Allow-Origin: *');
header('Access-Control-Allow-Headers: Content-Type');
header('Content-Type: application/json');
if (empty($_POST['users_id'])) {
die('You need a user');
if (empty($_REQUEST['users_id'])) {
forbiddenPage('You need a user');
}
if (session_status() !== PHP_SESSION_NONE) {
session_write_close();
_session_write_close();
}
require_once $global['systemRootPath'] . 'videos/configuration.php';
require_once './playlist.php';
header('Content-Type: application/json');
//mysqlBeginTransaction();
if (is_array($_POST['videos_id'])) {
if (is_array($_REQUEST['videos_id'])) {
$rows = [];
foreach ($_POST['videos_id'] as $value) {
$rows[] = ['videos_id' => $value, 'playlists' => PlayList::getAllFromUserVideo($_POST['users_id'], $value, false)];
foreach ($_REQUEST['videos_id'] as $value) {
$rows[] = ['videos_id' => $value, 'playlists' => PlayList::getAllFromUserVideo($_REQUEST['users_id'], $value, false)];
}
echo json_encode($rows);
} else {
$row = PlayList::getAllFromUserVideo($_POST['users_id'], $_POST['videos_id'], false);
$row = PlayList::getAllFromUserVideo($_REQUEST['users_id'], $_REQUEST['videos_id'], false);
echo json_encode($row);
}
//mysqlCommit();

View file

@ -8,7 +8,7 @@ if (!User::isLogged()) {
}
require_once $global['systemRootPath'] . 'objects/playlist.php';
header('Content-Type: application/json');
session_write_close();
_session_write_close();
setRowCount(10);
//mysqlBeginTransaction();
$row = PlayList::getAll('public', @$_REQUEST['Playlists_id']);

View file

@ -3,9 +3,6 @@ header('Access-Control-Allow-Origin: *');
header("Access-Control-Allow-Headers: Content-Type");
header('Content-Type: application/json');
global $global, $config;
if (!empty($_GET) && empty($_POST)) {
$_POST = $_GET;
}
if (!isset($global['systemRootPath'])) {
require_once '../videos/configuration.php';
}
@ -15,21 +12,20 @@ require_once 'subscribe.php';
// gettig the mobile submited value
$inputJSON = url_get_contents('php://input');
$input = _json_decode($inputJSON, true); //convert JSON into array
if (!empty($input) && empty($_POST)) {
if (!empty($input) && empty($_REQUEST)) {
foreach ($input as $key => $value) {
$_POST[$key]=$value;
$_REQUEST[$key]=$value;
}
}
if (!empty($_POST['user']) && !empty($_POST['pass'])) {
$user = new User(0, $_POST['user'], $_POST['pass']);
if (!empty($_REQUEST['user']) && !empty($_REQUEST['pass'])) {
$user = new User(0, $_REQUEST['user'], $_REQUEST['pass']);
$user->login(false, true);
}
if (empty($_POST['playlists_id'])) {
if (empty($_REQUEST['playlists_id'])) {
die('Play List can not be empty');
}
require_once './playlist.php';
$videos = PlayList::getVideosFromPlaylist($_POST['playlists_id']);
$videos = PlayList::getVideosFromPlaylist($_REQUEST['playlists_id']);
$objMob = AVideoPlugin::getObjectData("MobileManager");
$index = 0;
foreach ($videos as $key => $value) {
@ -41,11 +37,11 @@ foreach ($videos as $key => $value) {
$videos[$key]['imageClass'] = !empty($objMob->portraitImage) ? "portrait" : "landscape";
$videos[$key]['VideoUrl'] = getVideosURL($videos[$key]['filename']);
$videos[$key]['createdHumanTiming'] = humanTiming(strtotime($videos[$key]['created']));
$videos[$key]['pageUrl'] = PlayLists::getLink($_POST['playlists_id'], false, $index);
$videos[$key]['embedUrl'] = PlayLists::getLink($_POST['playlists_id'], true, $index);
unset($_POST['sort'], $_POST['current'], $_POST['searchPhrase']);
$videos[$key]['pageUrl'] = PlayLists::getLink($_REQUEST['playlists_id'], false, $index);
$videos[$key]['embedUrl'] = PlayLists::getLink($_REQUEST['playlists_id'], true, $index);
unset($_REQUEST['sort'], $_REQUEST['current'], $_REQUEST['searchPhrase']);
$_REQUEST['rowCount'] = 10;
$_POST['sort']['created'] = "desc";
$_REQUEST['sort']['created'] = "desc";
$videos[$key]['comments'] = Comment::getAllComments($videos[$key]['id']);
$videos[$key]['commentsTotal'] = Comment::getTotalComments($videos[$key]['id']);
$videos[$key]['comments'] = Comment::addExtraInfo($videos[$key]['comments']);

View file

@ -1115,7 +1115,7 @@ if (typeof gtag !== \"function\") {
AVideoPlugin::onUserSignIn($_SESSION['user']['id']);
$_SESSION['loginAttempts'] = 0;
_session_regenerate_id();
session_write_close();
_session_write_close();
_error_log('User:login finish users_id=' . json_encode($_SESSION['user']['id']));
return self::USER_LOGGED;
@ -1221,7 +1221,7 @@ if (typeof gtag !== \"function\") {
$params["httponly"]
);
}
session_write_close();
_session_write_close();
}
private static function recreateLoginFromCookie()

View file

@ -25,7 +25,7 @@ if(!isTokenValid($_REQUEST['securityToken'])){
forbiddenPage('Security token is invalid');
}
session_write_close();
_session_write_close();
if (!empty($advancedCustomUser->forceLoginToBeTheEmail)) {
$_POST['email'] = $_POST['user'];
}

View file

@ -7,7 +7,7 @@ if (!isset($global['systemRootPath'])) {
require_once $global['systemRootPath'] . 'videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/user.php';
header('Content-Type: application/json');
session_write_close();
_session_write_close();
$canAdminUsers = canAdminUsers();
if (empty($_POST['current'])) {
$_POST['current'] = 1;

View file

@ -6,7 +6,7 @@ global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../videos/configuration.php';
}
session_write_close();
_session_write_close();
$obj = new stdClass();
$obj->msg = '';
$obj->error = true;

View file

@ -1,7 +1,7 @@
<?php
require_once '../videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/video_statistic.php';
session_write_close();
_session_write_close();
//getTotalLastDays($video_id, $numberOfDays)
$videos_id = $argv[1];
$numberOfDays = boolval($argv[2]);

View file

@ -4,7 +4,7 @@ if (!isset($global['systemRootPath'])) {
require_once '../videos/configuration.php';
}
User::loginFromRequestIfNotLogged();
session_write_close();
_session_write_close();
header('Content-Type: application/json');
$start = microtime(true);

View file

@ -3,7 +3,7 @@ global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../videos/configuration.php';
}
session_write_close();
_session_write_close();
require_once $global['systemRootPath'] . 'objects/video.php';
require_once $global['systemRootPath'] . 'objects/comment.php';
require_once $global['systemRootPath'] . 'objects/subscribe.php';

View file

@ -263,7 +263,7 @@ class AD_Server extends PluginAbstract {
$obj = $this->getDataObject();
$oldId = session_id();
if (session_status() !== PHP_SESSION_NONE) {
session_write_close();
_session_write_close();
}
session_id($_GET['vmap_id']);
if (session_status() == PHP_SESSION_NONE) {
@ -303,7 +303,7 @@ class AD_Server extends PluginAbstract {
}
$adRandomPositions = $_SESSION['adRandomPositions'];
if (session_status() !== PHP_SESSION_NONE) {
session_write_close();
_session_write_close();
}
session_id($oldId);
if (session_status() == PHP_SESSION_NONE) {

View file

@ -1,9 +1,10 @@
<?php
require_once dirname(__FILE__) . '/../../../videos/configuration.php';
/*
require_once dirname(__FILE__) . '/../../../objects/user.php';
require_once dirname(__FILE__) . '/../../../objects/video.php';
*/
class VastCampaignsLogs extends ObjectYPT
{
protected $id;
@ -102,8 +103,6 @@ class VastCampaignsLogs extends ObjectYPT
foreach ($fullData as $row) {
$data[$row['type']] = $row['total'];
}
} else {
die($sql . '\nError : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error);
}
return $data;
}
@ -123,8 +122,6 @@ class VastCampaignsLogs extends ObjectYPT
foreach ($fullData as $row) {
$data[$row['type']] = $row['total'];
}
} else {
die($sql . '\nError : (' . $global['mysqli']->errno . ') ' . $global['mysqli']->error);
}
return $data;
}

View file

@ -1,8 +1,10 @@
<?php
require_once dirname(__FILE__) . '/../../../videos/configuration.php';
/*
require_once dirname(__FILE__) . '/../../../objects/user.php';
require_once dirname(__FILE__) . '/../../../objects/video.php';
*/
require_once $global['systemRootPath'] . 'plugin/AD_Server/Objects/VastCampaignsLogs.php';
class VastCampaignsVideos extends ObjectYPT

View file

@ -295,7 +295,7 @@ class CDNStorage {
if ($runInBackground) {
outputAndContinueInBackground();
}
@session_write_close();
@_session_write_close();
_mysql_close();
ini_set('max_execution_time', 0);
set_time_limit(0);
@ -398,7 +398,7 @@ class CDNStorage {
if ($runInBackground) {
outputAndContinueInBackground();
}
@session_write_close();
@_session_write_close();
_mysql_close();
ini_set('max_execution_time', 0);
set_time_limit(0);

View file

@ -2,7 +2,7 @@
$config = dirname(__FILE__) . '/../../../videos/configuration.php';
require_once $config;
session_write_close();
_session_write_close();
header('Content-Type: application/json');
$obj = new stdClass();

View file

@ -2,7 +2,7 @@
$config = dirname(__FILE__) . '/../../../videos/configuration.php';
require_once $config;
session_write_close();
_session_write_close();
header('Content-Type: application/json');
$obj = new stdClass();

View file

@ -1,7 +1,7 @@
<?php
require_once dirname(__FILE__) . '/../../videos/configuration.php';
session_write_close();
_session_write_close();
header('Content-Type: application/json');
$resp = new stdClass();

View file

@ -1,7 +1,7 @@
<?php
require_once dirname(__FILE__) . '/../../videos/configuration.php';
session_write_close();
_session_write_close();
header('Content-Type: application/json');
$resp = new stdClass();
$resp->error = true;

View file

@ -1,7 +1,7 @@
<?php
require_once dirname(__FILE__) . '/../../videos/configuration.php';
session_write_close();
_session_write_close();
header('Content-Type: application/json');
$resp = new stdClass();
$resp->error = true;

View file

@ -1,7 +1,7 @@
<?php
require_once dirname(__FILE__) . '/../../videos/configuration.php';
session_write_close();
_session_write_close();
header('Content-Type: application/json');
$resp = new stdClass();

View file

@ -216,7 +216,9 @@ class CachesInDB extends ObjectYPT
expires = VALUES(expires)";
// Assuming you have a PDO connection $pdo
return sqlDAL::writeSql($sql, implode('', $formats), $values);
$result = sqlDAL::writeSql($sql, implode('', $formats), $values);
//var_dump($result);exit;
return $result;
}
public static function _deleteCache($name)

View file

@ -2,7 +2,7 @@
$time_start = microtime(true);
$config = '../../videos/configuration.php';
session_write_close();
_session_write_close();
if (!file_exists($config)) {
[$scriptPath] = get_included_files();
$path = pathinfo($scriptPath);

View file

@ -2,7 +2,7 @@
require_once '../../videos/configuration.php';
set_time_limit(0);
session_write_close();
_session_write_close();
require_once $global['systemRootPath'] . 'plugin/CloneSite/Objects/Clones.php';
require_once $global['systemRootPath'] . 'plugin/CloneSite/functions.php';
header('Content-Type: application/json');

View file

@ -1,6 +1,6 @@
<?php
require_once '../../videos/configuration.php';
session_write_close();
_session_write_close();
header('Content-Type: application/json');
$name = "advancedCustom.json.php";
$obj = ObjectYPT::getCache($name, 60);

View file

@ -1,6 +1,6 @@
<?php
require_once '../../videos/configuration.php';
session_write_close();
_session_write_close();
header('Content-Type: application/json');
$name = "customizeUser.json.php";
$obj = ObjectYPT::getCache($name, 60);

View file

@ -2,7 +2,7 @@
require_once '../../videos/configuration.php';
require_once $global['systemRootPath'] . 'objects/captcha.php';
session_write_close();
_session_write_close();
header('Content-Type: application/json');
$obj = new stdClass();
$obj->error = true;

View file

@ -1,6 +1,6 @@
<?php
require_once '../../videos/configuration.php';
session_write_close();
_session_write_close();
header('Content-Type: application/json');
$obj = new stdClass();
$obj->error = true;

View file

@ -1,6 +1,6 @@
<?php
require_once '../../videos/configuration.php';
session_write_close();
_session_write_close();
header('Content-Type: application/json');
$obj = new stdClass();

View file

@ -2097,7 +2097,7 @@ Click <a href=\"{link}\">here</a> to join our live.";
}
TimeLogEnd($timeName, __LINE__);
session_write_close();
_session_write_close();
$obj = new stdClass();
$obj->error = true;
$obj->msg = "OFFLINE";

View file

@ -8,7 +8,7 @@ if (!isset($global['systemRootPath'])) {
}
require_once $configFile;
}
session_write_close();
_session_write_close();
_mysql_close();
if (!isCommandLineInterface() && empty($byPassCommandLine)) {
die('Command Line only');

View file

@ -40,7 +40,7 @@ if (file_exists($cacheFileImageName) && (time() - $lifetime <= filemtime($cacheF
}
require_once dirname(__FILE__) . '/../../videos/configuration.php';
session_write_close();
_session_write_close();
require_once $global['systemRootPath'] . 'plugin/Live/Objects/LiveTransmition.php';
$_REQUEST['live_servers_id'] = Live::getLiveServersIdRequest();
if (!empty($_GET['c'])) {
@ -146,7 +146,7 @@ if (!empty($result) && !Live::isDefaultImage($result)) {
//_error_log("Live:getImage $url");
//header('Content-Type: text/plain');var_dump($url);exit;
session_write_close();
_session_write_close();
_mysql_close();
$content = url_get_contents($url, '', 2);

View file

@ -2,7 +2,7 @@
header('Content-Type: application/json');
require_once '../../videos/configuration.php';
session_write_close();
_session_write_close();
$obj = new stdClass();
$obj->error = true;

View file

@ -3,7 +3,7 @@
$recheckTolerance = 600; // 10 min
require_once dirname(__FILE__) . '/../../videos/configuration.php';
error_reporting(0);
session_write_close();
_session_write_close();
if (empty($_GET['uuid'])) {
die("uuid empty");

View file

@ -280,7 +280,7 @@ $robj->logFile = $obj->logFile;
if (function_exists('_mysql_close')) {
_mysql_close();
}
session_write_close();
_session_write_close();
error_log("Restreamer.json.php starting async ");
Loop::run(function () {
global $robj;

View file

@ -1,5 +1,5 @@
<?php
//exit;
header('Content-Type: application/json');
require_once '../../videos/configuration.php';
@ -13,7 +13,7 @@ require_once '../../videos/configuration.php';
ini_set('max_execution_time', 10);
set_time_limit(10);
session_write_close();
_session_write_close();
$pobj = AVideoPlugin::getDataObjectIfEnabled("Live");
if (empty($pobj->server_type->value)) {
ini_set('max_execution_time', 180);

View file

@ -29,7 +29,7 @@ if (file_exists($cacheFileImageName) && (time() - $lifetime <= filemtime($cacheF
}
require_once dirname(__FILE__) . '/../../videos/configuration.php';
session_write_close();
_session_write_close();
$filename = $global['systemRootPath'] . 'plugin/Live/view/OnAir.jpg';
//echo file_get_contents($filename);exit;
@ -74,7 +74,7 @@ if (preg_match("/\b(?:(?:https?):\/\/|www\.)[-a-z0-9+&@#\/%?=~_|!:,.;]*[-a-z0-9+
$content = '';
}
if(empty($content)){
session_write_close();
_session_write_close();
_mysql_close();
$content = url_get_contents($url, "", 4);
if(!empty($content)){

View file

@ -2,7 +2,7 @@
$doNotConnectDatabaseIncludeConfig = 1;
$doNotStartSessionbaseIncludeConfig = 1;
require_once '../../videos/configuration.php';
session_write_close();
_session_write_close();
_mysql_close();

View file

@ -1,6 +1,6 @@
<?php
require_once '../../videos/configuration.php';
session_write_close();
_session_write_close();
header('Content-Type: application/json');
$obj = new stdClass();

View file

@ -1,6 +1,6 @@
<?php
require_once '../../videos/configuration.php';
session_write_close();
_session_write_close();
header('Content-Type: application/json');
$obj = new stdClass();

View file

@ -1,6 +1,6 @@
<?php
require_once '../../videos/configuration.php';
session_write_close();
_session_write_close();
header('Content-Type: application/json');
$obj = new stdClass();
$obj->error = true;

View file

@ -238,9 +238,9 @@ abstract class PluginAbstract {
}
}
PluginAbstract::$dataObject[$this->getUUID()] = $wholeObjects;
PluginAbstract::$dataObject[$uuid] = $wholeObjects;
} else {
$wholeObjects = PluginAbstract::$dataObject[$this->getUUID()];
$wholeObjects = PluginAbstract::$dataObject[$uuid];
}
//var_dump($obj['object_data']);
//var_dump($eo, $o, (object) array_merge((array) $eo, (array) $o));exit;

View file

@ -24,12 +24,12 @@ if(!isCommandLineInterface()){
echo '<pre>';
}
if(empty($rows)){
echo ("Scheduler row is empty".PHP_EOL);
//echo ("Scheduler row is empty".PHP_EOL);
}
$rows2 = Scheduler_commands::getAllScheduledTORepeat();
if(empty($rows)){
echo ("Scheduler row2 is empty".PHP_EOL);
//echo ("Scheduler row2 is empty".PHP_EOL);
}
$total3 = count($rows2);
//_log("There are {$total1} active requests; getAllActiveAndReady={$total2} getAllScheduledTORepeat={$total3} on time ". json_encode(Scheduler_commands::getTimesNow()));
@ -51,7 +51,7 @@ foreach ($rows2 as $value) {
}
$lastVisitFile = Scheduler::setLastVisit();
if(!empty($lastVisitFile) && !empty($lastVisitFile['size'])){
echo 'Saved '.json_encode($lastVisitFile);
//echo 'Saved '.json_encode($lastVisitFile);
//_error_log("Last visit set {$lastVisitFile}");
}else{
$msg = 'ERROR: Last visit NOT set '.json_encode($lastVisitFile);

View file

@ -56,7 +56,7 @@ class VideoTags extends PluginAbstract {
session_start();
}
unset($_SESSION['getVideoTags'][$videos_id]);
session_write_close();
_session_write_close();
TimeLogEnd(__FILE__ . "::" . __FUNCTION__, __LINE__);
if ($deleted) {
foreach ($tagsNameList as $value) {

View file

@ -1,6 +1,6 @@
<?php
require_once '../../videos/configuration.php';
session_write_close();
_session_write_close();
require_once $global['systemRootPath'].'plugin/VideoTags/Objects/Tags.php';
header('Content-Type: application/json');

View file

@ -140,7 +140,7 @@ class YPTSocket extends PluginAbstract {
public static function send($msg, $callbackJSFunction = "", $users_id = "", $send_to_uri_pattern = "") {
global $global, $SocketSendObj, $SocketSendUsers_id, $SocketSendResponseObj, $SocketURL;
_mysql_close();
@session_write_close();
@_session_write_close();
if (!is_string($msg)) {
$msg = json_encode($msg);
}

View file

@ -105,7 +105,7 @@ $SocketDataObj->serverVersion = YPTSocket::getServerVersion();
@ob_end_flush();
_mysql_close();
session_write_close();
_session_write_close();
exec('ulimit -n 20480'); // to handle over 1 k connections
$SocketDataObj->port = intval($SocketDataObj->port);
_error_log("Starting Socket server at port {$SocketDataObj->port}");

View file

@ -25,7 +25,7 @@ $SocketDataObj->serverVersion = YPTSocket::getServerVersion();
ob_end_flush();
_mysql_close();
session_write_close();
_session_write_close();
exec('ulimit -n 20480'); // to handle over 1 k connections
$SocketDataObj->port = intval($SocketDataObj->port);
_error_log("Starting Socket server at port {$SocketDataObj->port}");

View file

@ -18,7 +18,7 @@ $SocketDataObj->serverVersion = YPTSocket::getServerVersion();
ob_end_flush();
_mysql_close();
session_write_close();
_session_write_close();
killProcessOnPort();

View file

@ -18,6 +18,6 @@ $SocketDataObj->serverVersion = YPTSocket::getServerVersion();
ob_end_flush();
_mysql_close();
session_write_close();
_session_write_close();
killProcessOnPort();

View file

@ -3,7 +3,7 @@ global $global, $config;
if (!isset($global['systemRootPath'])) {
require_once '../../../videos/configuration.php';
}
session_write_close();
_session_write_close();
require_once $global['systemRootPath'] . 'objects/video.php';
require_once $global['systemRootPath'] . 'objects/category.php';

View file

@ -10,7 +10,7 @@ if (empty($playlists_id)) {
if (!isset($global['systemRootPath'])) {
require_once '../../../videos/configuration.php';
}
session_write_close();
_session_write_close();
$video = Video::getVideoFromSeriePlayListsId($playlists_id);
if (empty($video)) {

View file

@ -9,7 +9,7 @@ require_once $global['systemRootPath'] . 'objects/video.php';
require_once $global['systemRootPath'] . 'objects/playlist.php';
require_once $global['systemRootPath'] . 'objects/subscribe.php';
require_once $global['systemRootPath'] . 'plugin/Gallery/functions.php';
session_write_close();
_session_write_close();
$user_id = isChannel();
$user = new User($user_id);
if ($user->getStatus() === 'i') {

View file

@ -8,7 +8,7 @@ require_once $global['systemRootPath'] . 'objects/user.php';
require_once $global['systemRootPath'] . 'objects/video.php';
require_once $global['systemRootPath'] . 'objects/playlist.php';
session_write_close();
_session_write_close();
if (empty($_GET['channelName'])) {
if (User::isLogged()) {

View file

@ -1,7 +1,7 @@
<?php
$limitVideos = 50;
global $global, $config;
session_write_close();
_session_write_close();
if (!isset($global['systemRootPath'])) {
require_once '../videos/configuration.php';
}

View file

@ -75,7 +75,7 @@ if(!in_array($_SERVER['PHP_SELF'], $ignoreLog) || preg_match('/(bot|spider|crawl
session_name(md5($ip));
session_start(); // inicial a sessao
if(!empty($_SESSION['captcha_validated'])){
session_write_close();
_session_write_close();
return ;
}
if(!empty($_GET['captcha'])){
@ -88,7 +88,7 @@ if(!empty($_GET['captcha'])){
}else if(!empty($_GET['validate'])){
if (strtolower($_POST["palavra"]) == strtolower($_SESSION["palavra"])){
$_SESSION['captcha_validated'] = 1;
session_write_close();
_session_write_close();
return ;
}else{
echo "<h1>Wrong captcha</h1>";

View file

@ -10,7 +10,7 @@ if (!isset($global['systemRootPath'])) {
//_error_log("HLS.php: session_id = ". session_id()." IP = ". getRealIpAddr()." URL = ".($actual_link = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? "https" : "http") . "://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]"));
session_write_close();
_session_write_close();
if (empty($_GET['videoDirectory'])) {
forbiddenPage("No directory set");
}

View file

@ -5,7 +5,7 @@ include(dirname(__FILE__) . '/image404Raw.php');
// Load configuration
$configFile = dirname(__FILE__) . '/../../videos/configuration.php';
require_once $configFile;
session_write_close();
_session_write_close();
// Default image settings
$file = ImagesPlaceHolders::getVideoPlaceholder(ImagesPlaceHolders::$RETURN_PATH);

View file

@ -1,4 +1,5 @@
<?php
return '';
$tTolerance = 0.2;
$tname = TimeLogStart(basename(__FILE__));
if (isset($_GET['noNavbar'])) {
@ -52,7 +53,7 @@ if (!empty($advancedCustomUser->keepViewerOnChannel)) {
unset($_SESSION['channelName']);
}
}
session_write_close();
_session_write_close();
global $includeDefaultNavBar, $global, $config, $advancedCustom, $advancedCustomUser;
if (!isset($global['systemRootPath'])) {
require_once '../videos/configuration.php';

View file

@ -40,3 +40,6 @@ if (!empty($_GET['iframe'])) {
</body>
</html>
<?php
AVideoPlugin::getEnd();
?>

View file

@ -590,15 +590,15 @@ require_once $global['systemRootPath'] . 'objects/video.php';
?>
</div><!--/.container-->
<script src="<?php echo getCDN(); ?>view/js/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js" type="text/javascript"></script>
<script src="<?php echo getURL('view/js/bootstrap-datetimepicker/js/bootstrap-datetimepicker.min.js'); ?>" type="text/javascript"></script>
<!-- JavaScript Includes -->
<script src="<?php echo getCDN(); ?>view/mini-upload-form/assets/js/jquery.knob.js"></script>
<script src="<?php echo getURL('view/mini-upload-form/assets/js/jquery.knob.js'); ?>"></script>
<!-- jQuery File Upload Dependencies -->
<script src="<?php echo getCDN(); ?>view/mini-upload-form/assets/js/jquery.ui.widget.js"></script>
<script src="<?php echo getCDN(); ?>view/mini-upload-form/assets/js/jquery.iframe-transport.js"></script>
<script src="<?php echo getCDN(); ?>view/mini-upload-form/assets/js/jquery.fileupload.js"></script>
<script src="<?php echo getURL('view/mini-upload-form/assets/js/jquery.ui.widget.js'); ?>"></script>
<script src="<?php echo getURL('view/mini-upload-form/assets/js/jquery.iframe-transport.js'); ?>"></script>
<script src="<?php echo getURL('view/mini-upload-form/assets/js/jquery.fileupload.js'); ?>"></script>
<?php
echo AVideoPlugin::getManagerVideosJavaScripts();
if (empty($advancedCustom->disableHTMLDescription)) {
@ -829,9 +829,14 @@ if (empty($advancedCustom->disableHTMLDescription)) {
videos_id = row.id;
$(".externalOptions").val("");
try {
externalOptionsObject = JSON.parse(row.externalOptions);
if (typeof row.externalOptions == 'object') {
externalOptionsObject = row.externalOptions;
} else {
externalOptionsObject = JSON.parse(row.externalOptions);
}
for (var key in externalOptionsObject) {
if (externalOptionsObject.hasOwnProperty(key)) {
//console.log('externalOptions', key, externalOptionsObject[key]);
$('#' + key).val(externalOptionsObject[key]);
}
}
@ -1203,6 +1208,7 @@ if (empty($advancedCustom->disableHTMLDescription)) {
$('#inputVideoId').val(0);
$('#inputTitle').val("");
$('#inputTrailer').val("");
$('#videoStartSeconds').val("");
$('#inputVideoPassword').val("");
$('#inputCleanTitle').val("");
$('#created').val("");
@ -1265,6 +1271,7 @@ if (empty($advancedCustom->disableHTMLDescription)) {
$('#inputVideoId').val("");
$('#inputTitle').val("");
$('#inputTrailer').val("");
$('#videoStartSeconds').val("");
$('#inputVideoPassword').val("");
$('#inputCleanTitle').val("");
$('#inputDescription').val("");
@ -1550,6 +1557,7 @@ if (empty($advancedCustom->disableHTMLDescription)) {
$('#inputVideoId').val("");
$('#inputTitle').val("");
$('#inputTrailer').val("");
$('#videoStartSeconds').val("");
$('#inputVideoPassword').val("");
$('#inputCleanTitle').val("");
$('#inputDescription').val("");
@ -2252,7 +2260,7 @@ if (empty($advancedCustom->disableHTMLDescription)) {
playlistsFromUserVideosListToRequestTimetout = setTimeout(function() {
videos_ids_list = getUniqueValuesFromArray(playlistsFromUserVideosListToRequest);
playlistsFromUserVideosListToRequest = [];
console.log('playlistsFromUserVideos', videos_ids_list);
//console.log('playlistsFromUserVideos', videos_ids_list);
$.ajax({
url: webSiteRootURL + 'objects/playlistsFromUserVideos.json.php',
@ -2272,7 +2280,7 @@ if (empty($advancedCustom->disableHTMLDescription)) {
v_id = videoResponse.videos_id;
playlists = videoResponse.playlists;
console.log('playlistsFromUserVideos playlists', playlists);
//console.log('playlistsFromUserVideos playlists', playlists);
for (var y in playlists) {
if (typeof playlists[y] !== 'object') {
continue;

View file

@ -11,14 +11,14 @@ if (!empty($_GET['video_id'])) {
}
}
?>
<link href="<?php echo getCDN(); ?>view/js/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css" rel="stylesheet" type="text/css"/>
<link href="<?php echo getCDN(); ?>view/js/bootstrap-fileinput/css/fileinput.min.css" rel="stylesheet" type="text/css"/>
<script src="<?php echo getCDN(); ?>view/js/bootstrap-fileinput/js/fileinput.min.js" type="text/javascript"></script>
<link href="<?php echo getCDN(); ?>view/mini-upload-form/assets/css/style.css" rel="stylesheet" />
<link href="<?php echo getURL('view/js/bootstrap-datetimepicker/css/bootstrap-datetimepicker.min.css'); ?>" rel="stylesheet" type="text/css"/>
<link href="<?php echo getURL('view/js/bootstrap-fileinput/css/fileinput.min.css'); ?>" rel="stylesheet" type="text/css"/>
<script src="<?php echo getURL('view/js/bootstrap-fileinput/js/fileinput.min.js'); ?>" type="text/javascript"></script>
<link href="<?php echo getURL('view/mini-upload-form/assets/css/style.css'); ?>" rel="stylesheet" />
<?php
if (AVideoPlugin::isEnabledByName("VideoTags")) {
?>
<link href="<?php echo getCDN(); ?>plugin/VideoTags/bootstrap-tagsinput/bootstrap-tagsinput.css" rel="stylesheet" type="text/css"/>
<link href="<?php echo getURL('plugin/VideoTags/bootstrap-tagsinput/bootstrap-tagsinput.css'); ?>" rel="stylesheet" type="text/css"/>
<style>
.tt-open{
background-color: #FFF;

View file

@ -1,6 +1,6 @@
<?php
global $global, $config;
session_write_close();
_session_write_close();
$obj = new stdClass();
$obj->error = true;
if (!isset($global['systemRootPath'])) {

View file

@ -66,7 +66,7 @@ if (!empty($evideo)) {
} else {
unset($_SESSION['type']);
}
session_write_close();
_session_write_close();
TimeLogEnd($timeLogNameMY, __LINE__, $TimeLogLimitMY);
if (empty($_GET['playlist_id']) && !empty($_GET['playlist_name'])) {

View file

@ -7,7 +7,7 @@ if (!isset($global['systemRootPath'])) {
AVideoPlugin::getDataObject('VideosStatistics');
session_write_close();
_session_write_close();
$obj = new stdClass();
$obj->error = true;

View file

@ -7,7 +7,7 @@ if (!isset($global['systemRootPath'])) {
require_once $global['systemRootPath'] . 'objects/Channel.php';
require_once $global['systemRootPath'] . 'objects/video.php';
require_once $global['systemRootPath'] . 'objects/video_statistic.php';
session_write_close();
_session_write_close();
$from = date("Y-m-d 00:00:00", strtotime($_POST['dateFrom']));
$to = date('Y-m-d 23:59:59', strtotime($_POST['dateTo']));
_error_log("report1: from=$from to=$to");

View file

@ -7,7 +7,7 @@ if (!isset($global['systemRootPath'])) {
require_once $global['systemRootPath'] . 'objects/user.php';
require_once $global['systemRootPath'] . 'objects/comment.php';
session_write_close();
_session_write_close();
$from = date("Y-m-d 00:00:00", strtotime($_POST['dateFrom']));
$to = date('Y-m-d 23:59:59', strtotime($_POST['dateTo']));

View file

@ -7,7 +7,7 @@ if (!isset($global['systemRootPath'])) {
require_once $global['systemRootPath'] . 'objects/user.php';
require_once $global['systemRootPath'] . 'objects/video.php';
session_write_close();
_session_write_close();
$from = date("Y-m-d 00:00:00", strtotime(@$_POST['dateFrom']));
$to = date('Y-m-d 23:59:59', strtotime(@$_POST['dateTo']));

View file

@ -7,7 +7,7 @@ if (!isset($global['systemRootPath'])) {
require_once $global['systemRootPath'] . 'objects/Channel.php';
require_once $global['systemRootPath'] . 'objects/video.php';
require_once $global['systemRootPath'] . 'objects/video_statistic.php';
session_write_close();
_session_write_close();
$from = date("Y-m-d 00:00:00", strtotime($_POST['dateFrom']));
$to = date('Y-m-d 23:59:59', strtotime($_POST['dateTo']));
$users_id = 0;

View file

@ -5,7 +5,7 @@ if (!isset($global['systemRootPath'])) {
header("Content-type: text/css; charset: UTF-8");
$theme = getCurrentTheme();
_mysql_close();
session_write_close();
_session_write_close();
echo "/* theme = {$theme} */".PHP_EOL;
echo file_get_contents("{$global['systemRootPath']}view/css/custom/{$theme}.css");
exit;

View file

@ -17,7 +17,7 @@ if (!empty($_GET['type'])) {
} else {
unset($_SESSION['type']);
}
session_write_close();
_session_write_close();
require_once $global['systemRootPath'] . 'objects/video.php';
$total = Video::getTotalVideos();

View file

@ -6,7 +6,7 @@ if (!isset($global['systemRootPath'])) {
_session_start();
unset($_SESSION['sessionCache']['thereIsAnyRemoteUpdate']);
unset($_SESSION['sessionCache']['thereIsAnyUpdate']);
session_write_close();
_session_write_close();
require_once $global['systemRootPath'] . 'objects/user.php';
//check if there is a update
if (!User::isAdmin()) {

View file

@ -9,7 +9,7 @@ $poster = $img;
$imgw = 1280;
$imgh = 720;
unset($_SESSION['type']);
session_write_close();
_session_write_close();
$video = [];
$video['id'] = 0;
$video['type'] = 'notfound';

View file

@ -2,7 +2,7 @@
require_once '../videos/configuration.php';
header('Content-Type: application/json');
session_write_close();
_session_write_close();
$from = date("Y-m-d 00:00:00", strtotime($_REQUEST['dateFrom']));
$to = date('Y-m-d 23:59:59', strtotime($_REQUEST['dateTo']));
$fromDate = date("Y-m-d", strtotime($_REQUEST['dateFrom']));

View file

@ -4,7 +4,7 @@ if (!isset($global['systemRootPath'])) {
require_once '../videos/configuration.php';
}
session_write_close();
_session_write_close();
require_once $global['systemRootPath'] . 'objects/functions.php';
require_once $global['systemRootPath'] . 'plugin/AVideoPlugin.php';