Browse Source

Fixed Dependency of root folder

master
Evgeny Gagua 2 months ago
parent
commit
64b3b3d33c
  1. 5745
      files.list
  2. 4
      lib/ajax_asm.php
  3. 4
      lib/assembler.php
  4. 4
      lib/controller/delHistory.php
  5. 2
      lib/controller/getBubbleAnalysis.php
  6. 8
      lib/controller/getFrames.php
  7. 2
      lib/controller/getHistoryDates.php
  8. 4
      lib/controller/getHistoryDay.php
  9. 2
      lib/controller/getHistoryEvents.php
  10. 2
      lib/controller/getPictureInfo.php
  11. 4
      lib/controller/getStatus.php
  12. 2
      lib/controller/getVideoInfo.php
  13. 2
      lib/controller/setPermanentBubbles.php
  14. 12
      lib/controller/upgrade_report.php
  15. 6
      lib/defines.php
  16. 8
      lib/javascript/jsapi_dynamic/mojo_main.js
  17. 4
      lib/js_asm.php
  18. 2
      lib/php/ui/UI_functions.php
  19. 2
      lib/upgrade_database.php
  20. 1
      rcp.xml

5745
files.list
File diff suppressed because it is too large
View File

4
lib/ajax_asm.php

@ -16,7 +16,7 @@ if( $TT_123[0] == '4' ){
};
*/
require_once( 'php/db/SQLite_Class.php');
$DATABASE = new SQLite_DB( '/srv/www/web/lib/controller/data/mysqlitedb.db');
$DATABASE = new SQLite_DB( $SYSPath . '/lib/controller/data/mysqlitedb.db');
//$DATABASE->SetCacheDir( $DBCacheDir );
@ -33,7 +33,7 @@ require_once('php/argus/mojo.php');
$Labels=new Language_json( '/srv/www/web/lib/'.$UserLang.'.json');
$Labels=new Language_json( $SYSPath . '/lib/'.$UserLang.'.json');
if( $UserLang == 3 || $UserLang == 255 ){
$RTL_SITE = true;

4
lib/assembler.php

@ -20,7 +20,7 @@ if( $TT_123[0] == '4' ){
require_once( 'php/db/SQLite_Class.php');
$DATABASE = new SQLite_DB( 'lib/controller/data/mysqlitedb.db');
$DATABASE = new SQLite_DB( $SYSPath . '/lib/controller/data/mysqlitedb.db');
$str = @file_get_contents('/proc/uptime');
$num = floatval($str);
@ -59,7 +59,7 @@ if( isset($_GET['Lang']) ){
exit();
};
$Labels=new Language_json( '/srv/www/web/lib/'.$UserLang.'.json');
$Labels=new Language_json( $SYSPath . '/lib/'.$UserLang.'.json');
if( $UserLang == 3 || $UserLang == 255 ){
$RTL_SITE = true;

4
lib/controller/delHistory.php

@ -10,13 +10,13 @@
switch( $SelectionType ){
case 0: {
// Complete Clear History
$ZIZI = new SQLite_DB( '/srv/www/web/lib/controller/data/reports.db');
$ZIZI = new SQLite_DB( $SYSPath . '/lib/controller/data/reports.db');
$QS = "DELETE FROM `events_2_videos`";
$QS = "DELETE FROM `events_2_pictures`";
$QS = "DELETE FROM `events`";
$QS = "DELETE FROM `videos`";
$QS = "DELETE FROM `pictures`";
$CMD = `rm -R -f /srv/www/web/lib/controller/data/videos/*`;
$CMD = `rm -R -f {$SYSPath}/lib/controller/data/videos/*`;
break;
};
case 1:{

2
lib/controller/getBubbleAnalysis.php

@ -76,7 +76,7 @@
if( $UID > 1 && $DTS ){
$DS = date("Y/m/d", $DTS );
$QS = "SELECT * FROM `events` WHERE ( `evt_type`=13 OR `evt_type`=14 ) AND `id`>={$BID} AND `id`<={$EID} ORDER BY `ts` ASC, `ts_ms` ASC";
$ZIZI = new SQLite_DB( '/srv/www/web/lib/controller/data/reports/'.$DS.'/report.db');
$ZIZI = new SQLite_DB( $SYSPath . '/lib/controller/data/reports/'.$DS.'/report.db');
$LREC = $ZIZI->Query( $QS );
if( count( $LREC ) ){
foreach( $LREC as $REC ){

8
lib/controller/getFrames.php

@ -9,12 +9,12 @@
if( $VID && $DTS ){
$DS = date("Y/m/d", $DTS );
$QS = "SELECT * FROM `videos` WHERE `id` = {$VID}";
$ZIZI = new SQLite_DB( '/srv/www/web/lib/controller/data/reports/'.$DS.'/report.db');
$ZIZI = new SQLite_DB( $SYSPath . '/lib/controller/data/reports/'.$DS.'/report.db');
$LREC = $ZIZI->Query( $QS );
if( count( $LREC ) ){
$Data = $LREC[0];
$FILE = "/srv/www/web/lib/controller/data/reports/{$DS}/{$Data['md5']}.{$Data['ext']}";
$FILE = $SYSPath . "/lib/controller/data/reports/{$DS}/{$Data['md5']}.{$Data['ext']}";
$FPS = intval( $Data['fps'] );
if( $FPS < 1 ) $FPS = 15;
if( $START_FRAME == 0 ){
@ -34,7 +34,7 @@
header("Content-type: multipart/x-mixed-replace;boundary=MPFrame");
//$FILE = '/srv/www/web/lib/controller/data/reports/2024/02/14/d156c150ca14ac484f28ef4ad70666b2.mjpeg';
//$FILE = $SYSPath . '/lib/controller/data/reports/2024/02/14/d156c150ca14ac484f28ef4ad70666b2.mjpeg';
$FID = fopen( $FILE, "r");
$BUFFER = "";
$FRAME = "";
@ -77,7 +77,7 @@
};
fclose( $FID );
};
//file_put_contents('/srv/samba/Mojo_Web/lib/controller/test.txt',"KOKOMO");
//file_put_contents( $SYSPath . '/lib/controller/test.txt',"KOKOMO");
exit();
} else echo " No Recoe";
} else echo " No Param";

2
lib/controller/getHistoryDates.php

@ -1,7 +1,7 @@
<?php
require_once('../ajax_asm.php');
if( $CUser->Data['id'] > 1 ){
$ZIZI = new SQLite_DB( '/srv/www/web/lib/controller/data/reports/stat.db');
$ZIZI = new SQLite_DB( $SYSPath . '/lib/controller/data/reports/stat.db');
$TZ = new DateTimeZone( date_default_timezone_get() );
$DT = new DateTime("now", $TZ );
$DIDI = $TZ->getOffset( $DT );

4
lib/controller/getHistoryDay.php

@ -12,7 +12,7 @@
$D = date("d", $DTS );
$DS = date("Y/m/d", $DTS );
$NONO = '';
$MUMU = new SQLite_DB( '/srv/www/web/lib/controller/data/reports/stat.db' );
$MUMU = new SQLite_DB( $SYSPath . '/lib/controller/data/reports/stat.db' );
$QS = "SELECT * FROM `days` WHERE `year`={$Y} AND `month`={$M} AND `day`={$D}";
$LOLO = $MUMU->Query( $QS );
$S = 0;
@ -22,7 +22,7 @@
$S = intval( $LOLO[0]['session_count'] );
$V = intval( $LOLO[0]['videos_count'] );
$E = intval( $LOLO[0]['evt_count'] );
$ZIZI = new SQLite_DB( '/srv/www/web/lib/controller/data/reports/' . $DS . '/report.db' );
$ZIZI = new SQLite_DB( $SYSPath . '/lib/controller/data/reports/' . $DS . '/report.db' );
$QS = "SELECT `id`, `ts`, `evt_type` FROM `events` WHERE ( `evt_type`=52 OR `evt_type`=53 OR `evt_type`=54 )";
$NDD = $ZIZI->Query( $QS );
if( count( $NDD ) ){

2
lib/controller/getHistoryEvents.php

@ -16,7 +16,7 @@
$DS = date("Y/m/d", $DTS );
//$QS = "SELECT `events`.*, `events_2_videos`.* FROM `events` LEFT JOIN `events_2_videos` ON( `events`.`id` = `events_2_videos`.`evt_id` ) WHERE `events`.`id` >= {$BID} AND `events`.`id`<={$EID} ORDER BY `ts` ASC, `ts_ms` ASC";
$QS = "SELECT `events`.*, `events_2_videos`.`video_id`, `events_2_pictures`.`picture_id` FROM `events` LEFT JOIN `events_2_videos` ON( `events`.`id` = `events_2_videos`.`evt_id` ) LEFT JOIN `events_2_pictures` ON( `events`.`id` = `events_2_pictures`.`evt_id` ) WHERE `events`.`id`>={$BID} AND `events`.`id`<={$EID} ORDER BY `events`.`ts` ASC, `events`.`ts_ms` ASC";
$ZIZI = new SQLite_DB( '/srv/www/web/lib/controller/data/reports/'.$DS.'/report.db');
$ZIZI = new SQLite_DB( $SYSPath . '/lib/controller/data/reports/'.$DS.'/report.db');
//$LREC = array_reverse( $ZIZI->Query( $QS ) );
$LREC = $ZIZI->Query( $QS );
$Data['log'] = array();

2
lib/controller/getPictureInfo.php

@ -7,7 +7,7 @@
$DS = date("Y/m/d", $DTS );
//$QS = "SELECT * FROM `videos` WHERE `id` = {$VID}";
$QS = "SELECT `pictures`.`media_stream_id`, `pictures`.`md5`, `pictures`.`ext` FROM `events_2_pictures` LEFT JOIN `pictures` ON( `pictures`.`id` = `events_2_pictures`.`picture_id` ) WHERE `events_2_pictures`.`evt_id`={$EID}";
$ZIZI = new SQLite_DB( '/srv/www/web/lib/controller/data/reports/'.$DS.'/report.db');
$ZIZI = new SQLite_DB( $SYSPath . '/lib/controller/data/reports/'.$DS.'/report.db');
$LREC = $ZIZI->Query( $QS );
if( count( $LREC ) ){
$Pack = array();

4
lib/controller/getStatus.php

@ -17,12 +17,12 @@
$QS = "SELECT * FROM `system_props` LIMIT 1";
$SD = $DATABASE->Query( $QS );
$SYS = $SD[0];
$STATS = new SQLite_DB( '/srv/www/web/lib/controller/data/reports/stat.db');
$STATS = new SQLite_DB( $SYSPath . '/lib/controller/data/reports/stat.db');
$QS = "SELECT `year`, `month`, `day` FROM `days` ORDER BY `year` DESC, `month` DESC, `day` DESC LIMIT 1";
$STR = $STATS->Query( $QS );
if( count( $STR ) ){
$DTS = sprintf("%04d/%02d/%02d", intval($STR[0]['year']), intval($STR[0]['month']), intval($STR[0]['day']));
$ZIZI = new SQLite_DB( '/srv/www/web/lib/controller/data/reports/'.$DTS.'/report.db');
$ZIZI = new SQLite_DB( $SYSPath . '/lib/controller/data/reports/'.$DTS.'/report.db');
$QS = "SELECT `id` FROM `events` WHERE `id` > {$LLID} LIMIT 1";
$CH = $ZIZI->Query( $QS );
if( count( $CH ) ){

2
lib/controller/getVideoInfo.php

@ -7,7 +7,7 @@
$DS = date("Y/m/d", $DTS );
//$QS = "SELECT * FROM `videos` WHERE `id` = {$VID}";
$QS = "SELECT `videos`.`id`, `videos`.`fps`,`videos`.`uts` as `ts`, `videos`.`md5`, `videos`.`ext`, `videos`.`media_stream_id`, `events_2_videos`.`frame` FROM `events_2_videos` LEFT JOIN `videos` ON( `videos`.`id` = `events_2_videos`.`video_id` ) WHERE `events_2_videos`.`evt_id`={$EID}";
$ZIZI = new SQLite_DB( '/srv/www/web/lib/controller/data/reports/'.$DS.'/report.db');
$ZIZI = new SQLite_DB( $SYSPath . '/lib/controller/data/reports/'.$DS.'/report.db');
$LREC = $ZIZI->Query( $QS );
if( count( $LREC ) ){
$Pack = array();

2
lib/controller/setPermanentBubbles.php

@ -77,7 +77,7 @@
if( $UID > 1 && $DTS ){
$DS = date("Y/m/d", $DTS );
$QS = "SELECT * FROM `events` WHERE ( `evt_type`=13 OR `evt_type`=14 ) AND `id`>={$BID} AND `id`<={$EID} ORDER BY `ts` ASC, `ts_ms` ASC";
$ZIZI = new SQLite_DB( '/srv/www/web/lib/controller/data/reports/'.$DS.'/report.db');
$ZIZI = new SQLite_DB( $SYSPath . '/lib/controller/data/reports/'.$DS.'/report.db');
$LREC = $ZIZI->Query( $QS );
if( count( $LREC ) ){
foreach( $LREC as $REC ){

12
lib/controller/upgrade_report.php

@ -1,7 +1,7 @@
<?php
require_once('../ajax_asm.php');
$ZIZI = new SQLite_DB( '/srv/www/web/lib/controller/data/reports.db');
$ZIZI = new SQLite_DB( $SYSPath . '/lib/controller/data/reports.db');
$TZ = new DateTimeZone( date_default_timezone_get() );
$DT = new DateTime("now", $TZ );
$DIDI = $TZ->getOffset( $DT );
@ -9,7 +9,7 @@
$RR = $ZIZI->Query( $QS );
if( count( $RR ) ){
$DD = array();
$STATA = new SQLite_DB( '/srv/www/web/lib/controller/data/reports/stat.db');
$STATA = new SQLite_DB( $SYSPath . '/lib/controller/data/reports/stat.db');
foreach( $RR as $R ){
$CC = intval( $R['cnt'] );
if( $CC > 100 ) $CC = 100;
@ -17,19 +17,19 @@
$M = date("m", $R['ts'] );
$D = date("d", $R['ts'] );
echo "Upgrading Date: {$Y}/{$M}/{$D}\n";
$FD = '/srv/www/web/lib/controller/data/reports/'.$Y;
$FD = $SYSPath . '/lib/controller/data/reports/'.$Y;
if( !file_exists( $FD ) ){
mkdir( $FD, 0765 );
chown( $FD, 'www-data' );
chgrp( $FD, 'www-data' );
};
$FD = '/srv/www/web/lib/controller/data/reports/'.$Y.'/'.$M;
$FD = $SYSPath . '/lib/controller/data/reports/'.$Y.'/'.$M;
if( !file_exists( $FD ) ){
mkdir( $FD, 0765 );
chown( $FD, 'www-data' );
chgrp( $FD, 'www-data' );
};
$FD = '/srv/www/web/lib/controller/data/reports/'.$Y.'/'.$M.'/'.$D;
$FD = $SYSPath . '/lib/controller/data/reports/'.$Y.'/'.$M.'/'.$D;
if( !file_exists( $FD ) ){
mkdir( $FD, 0765 );
chown( $FD, 'www-data' );
@ -82,7 +82,7 @@
foreach( $JPP as $J ){
$QS = "INSERT INTO `videos`(`id`,`media_stream_id`,`md5`,`uts`,`uts_ms`,`ext`,`fps`) VALUES({$J['id']},{$J['media_stream_id']},'{$J['md5']}',{$J['uts']},{$J['uts_ms']},'{$J['ext']}',{$J['fps']})";
$NREP->Query( $QS );
$SOURCE = '/srv/www/web/lib/controller/data/videos/'.$J['md5'] . ".".$J['ext'];
$SOURCE = $SYSPath . '/lib/controller/data/videos/'.$J['md5'] . ".".$J['ext'];
$TARGET = $FD . '/' . $J['md5'] . ".".$J['ext'];
echo "{$SOURCE} --> {$TARGET}\n";
copy( $SOURCE, $TARGET );

6
lib/defines.php

@ -1,6 +1,8 @@
<?php
$ARGUS_WEB_VERSION = trim( file_get_contents( '/srv/www/web/lib/version.var' ) );
$SYSPath = '/srv/www/module';
$ARGUS_WEB_VERSION = trim( file_get_contents( $SYSPath . '/lib/version.var' ) );
$SSL_INSTALLLED = false;
@ -14,7 +16,7 @@ if( $_SERVER['SERVER_PORT'] == 80 ){
$WEBPath='https://' . $_SERVER['HTTP_HOST'] . '/';//$_SERVER['SERVER_NAME'] . '/';
};
$SYSPath = '/srv/www/web/';
$ShowImagesLocal=false;
$ShowThumbnailsLocal=true;
$ShowAdw=true;

8
lib/javascript/jsapi_dynamic/mojo_main.js

@ -284,6 +284,14 @@ function showContent( cid ){
};
Ext.onReady(function(){
document.body.style.userSelect = 'none';
document.body.style.webkitUserSelect = 'none';
document.addEventListener('selectstart', (e) => {
e.preventDefault();
});
document.addEventListener('dragstart', (e) => {
e.preventDefault();
});
if ('wakeLock' in navigator) {
// Screen Wake Lock API supported
tryKeepScreenAlive(10);

4
lib/js_asm.php

@ -16,7 +16,7 @@ if( $TT_123[0] == '4' ){
};*/
require_once( 'php/db/SQLite_Class.php');
$DATABASE = new SQLite_DB( '/srv/www/web/lib/controller/data/mysqlitedb.db');
$DATABASE = new SQLite_DB( $SYSPath . '/lib/controller/data/mysqlitedb.db');
$QS="SELECT * FROM system_props LIMIT 1";
$RV = $DATABASE->Query( $QS );
@ -56,7 +56,7 @@ require_once('php/db/language_json_class.php');
require_once('php/ui/UI_functions.php');
//require_once('php/web/WEB_functions.php');
$Labels=new Language_json( '/srv/www/web/lib/'.$UserLang.'.json');
$Labels=new Language_json( $SYSPath . '/lib/'.$UserLang.'.json');
if( $UserLang == 3 || $UserLang == 255 ){
$RTL_SITE = true;

2
lib/php/ui/UI_functions.php

@ -305,6 +305,8 @@ function UI_PageHeaderExt($Static_Scoop = '', $Dynamic_Scoop = ''){
/*overflow: hidden;
height: 100%;*/
background: #202020;
-webkit-user-select: none;
user-select: none;
}
#output {
margin-left: 350px;

2
lib/upgrade_database.php

@ -4,7 +4,7 @@
require_once('defines.php');
$UPGRADE = false;
require_once( 'php/db/SQLite_Class.php');
$DATABASE = new SQLite_DB( '/srv/www/web/lib/controller/data/mysqlitedb.db');
$DATABASE = new SQLite_DB( $SYSPath . '/lib/controller/data/mysqlitedb.db');
$QS = "SELECT * FROM `target_filter_train` LIMIT 1";
$JKA = $DATABASE->Query( $QS );

1
rcp.xml

@ -1 +0,0 @@
<k>kakashka</k>
Loading…
Cancel
Save