Browse Source

Just before Final Demo V1

master
Evgeny Gagua 2 years ago
parent
commit
8fe010efa1
  1. 1
      .gitignore
  2. 12
      index.php
  3. 2
      lib/1.json
  4. 6
      lib/ajax_asm.php
  5. 3
      lib/assembler.php
  6. 1
      lib/controller/data
  7. 112
      lib/controller/doAckOperation.php
  8. 172
      lib/controller/doModuleOperations.php
  9. 93
      lib/controller/doSessionOperations.php
  10. 18
      lib/controller/doStationOperations.php
  11. 165
      lib/controller/getAddModuleWindow.php
  12. 54
      lib/controller/getHelpTopic.php
  13. 30
      lib/controller/getHistoryDates.php
  14. 57
      lib/controller/getHistoryDay.php
  15. 70
      lib/controller/getHistoryEvents.php
  16. 50
      lib/controller/getHistoryMapView.php
  17. 195
      lib/controller/getHistorySessionView.php
  18. 91
      lib/controller/getHistoryStationView.php
  19. 34
      lib/controller/getMediaLog.php
  20. 255
      lib/controller/getMediaSettings.php
  21. 52
      lib/controller/getMediaStatus.php
  22. 184
      lib/controller/getModuleEditor.php
  23. 90
      lib/controller/getModules.php
  24. 25
      lib/controller/getMonitoringMapStatus.php
  25. 50
      lib/controller/getMonitoringMapView.php
  26. 94
      lib/controller/getMonitoringModuleView.php
  27. 201
      lib/controller/getMonitoringPlatformView.php
  28. 199
      lib/controller/getMonitoringSessionView.php
  29. 86
      lib/controller/getMonitoringStationView.php
  30. 148
      lib/controller/getMonitoringTrackView.php
  31. 4
      lib/controller/getPlatforms.php
  32. 358
      lib/controller/getServerSettings.php
  33. 26
      lib/controller/getServerStatus.php
  34. 92
      lib/controller/getSessionData.php
  35. 33
      lib/controller/getStationEditor.php
  36. 262
      lib/controller/getStatus.php
  37. 35
      lib/controller/listHistoryStations.php
  38. 31
      lib/controller/listStations.php
  39. 6
      lib/controller/listUsers.php
  40. 8
      lib/controller/updateUserSettings.php
  41. 2
      lib/defines.php
  42. 114
      lib/javascript/activitymap/activitymap.css
  43. 389
      lib/javascript/activitymap/activitymap.js
  44. 1
      lib/javascript/activitymap/activitymap.min.css
  45. 1
      lib/javascript/activitymap/activitymap.min.js
  46. 20591
      lib/javascript/d3/d3.js
  47. 2
      lib/javascript/d3/d3.min.js
  48. 6
      lib/javascript/jsapi_dynamic/argus_events.js
  49. 18
      lib/javascript/jsapi_dynamic/argus_global_vars.js
  50. 163
      lib/javascript/jsapi_dynamic/argus_main.js
  51. 293
      lib/javascript/jsapi_dynamic/argus_media.js
  52. 985
      lib/javascript/jsapi_dynamic/argus_monitoring.js
  53. 1858
      lib/javascript/jsapi_dynamic/argus_reports.js
  54. 736
      lib/javascript/jsapi_dynamic/argus_settings.js
  55. 0
      lib/javascript/jsapi_dynamic/argus_users.js
  56. 1
      lib/javascript/jsapi_dynamic/mojo_dashboard.js
  57. 269
      lib/javascript/jsapi_dynamic/mojo_logs.js
  58. 101
      lib/javascript/jsapi_dynamic/mojo_monitoring.js
  59. 1
      lib/javascript/jsapi_dynamic/rgoose_dashboard.js
  60. 4
      lib/javascript/jsapi_static/argus_general.js
  61. 1
      lib/javascript/plupload/SECURITY.md
  62. 27
      lib/javascript/plupload/bower.json
  63. 85
      lib/javascript/plupload/examples/custom.html
  64. 34
      lib/javascript/plupload/examples/dump.php
  65. 217
      lib/javascript/plupload/examples/events.html
  66. 139
      lib/javascript/plupload/examples/jquery/all_runtimes.html
  67. 113
      lib/javascript/plupload/examples/jquery/jquery_ui_widget.html
  68. 66
      lib/javascript/plupload/examples/jquery/queue_widget.html
  69. 131
      lib/javascript/plupload/examples/jquery/s3.php
  70. 126
      lib/javascript/plupload/examples/upload.php
  71. BIN
      lib/javascript/plupload/js/Moxie.swf
  72. BIN
      lib/javascript/plupload/js/Moxie.xap
  73. 2
      lib/javascript/plupload/js/i18n/ar.js
  74. 2
      lib/javascript/plupload/js/i18n/az.js
  75. 2
      lib/javascript/plupload/js/i18n/bg.js
  76. 2
      lib/javascript/plupload/js/i18n/bs.js
  77. 2
      lib/javascript/plupload/js/i18n/ca.js
  78. 2
      lib/javascript/plupload/js/i18n/cs.js
  79. 2
      lib/javascript/plupload/js/i18n/cy.js
  80. 2
      lib/javascript/plupload/js/i18n/da.js
  81. 2
      lib/javascript/plupload/js/i18n/de.js
  82. 2
      lib/javascript/plupload/js/i18n/el.js
  83. 2
      lib/javascript/plupload/js/i18n/en.js
  84. 2
      lib/javascript/plupload/js/i18n/es.js
  85. 2
      lib/javascript/plupload/js/i18n/et.js
  86. 2
      lib/javascript/plupload/js/i18n/fa.js
  87. 2
      lib/javascript/plupload/js/i18n/fi.js
  88. 2
      lib/javascript/plupload/js/i18n/fr.js
  89. 2
      lib/javascript/plupload/js/i18n/he.js
  90. 2
      lib/javascript/plupload/js/i18n/hr.js
  91. 2
      lib/javascript/plupload/js/i18n/hu.js
  92. 2
      lib/javascript/plupload/js/i18n/hy.js
  93. 2
      lib/javascript/plupload/js/i18n/id.js
  94. 2
      lib/javascript/plupload/js/i18n/it.js
  95. 2
      lib/javascript/plupload/js/i18n/ja.js
  96. 2
      lib/javascript/plupload/js/i18n/ka.js
  97. 2
      lib/javascript/plupload/js/i18n/kk.js
  98. 2
      lib/javascript/plupload/js/i18n/km.js
  99. 2
      lib/javascript/plupload/js/i18n/ko.js
  100. 2
      lib/javascript/plupload/js/i18n/ku_IQ.js

1
.gitignore

@ -0,0 +1 @@
lib/controller/data/*

12
index.php

@ -7,8 +7,12 @@
'argus_general.js',
array(
'argus_global_vars.js',
'argus_logs.js',
'argus_monitoring.js',
'argus_events.js',
'argus_media.js',
'argus_reports.js',
'argus_settings.js',
'argus_users.js',
'argus_main.js'
)
);
@ -17,8 +21,12 @@
'argus_general.js',
array(
'argus_global_vars.js',
'argus_logs.js',
'argus_monitoring.js',
'argus_events.js',
'argus_media.js',
'argus_reports.js',
'argus_settings.js',
'argus_users.js',
'argus_main.js'
)
);

2
lib/1.json
File diff suppressed because it is too large
View File

6
lib/ajax_asm.php

@ -14,8 +14,8 @@ if( $TT_123[0] == '4' ){
} else {
exit();
};
//require_once( 'php/db/SQLite_Class.php');
require_once( 'php/db/internal.php' );
require_once( 'php/db/SQLite_Class.php');
//$DATABASE = new SQLite_DB( '/srv/www/web/lib/controller/data/mysqlitedb.db');
@ -33,7 +33,7 @@ require_once('php/db/language_json_class.php');
$Labels=new Language_json( $SYSPath . 'lib/'.$UserLang.'.json');
$Labels=new Language_json( $SYSPath .'/lib/'.$UserLang.'.json');
if( $UserLang == 3 || $UserLang == 255 ){
$RTL_SITE = true;

3
lib/assembler.php

@ -54,8 +54,7 @@ if( isset($_GET['Lang']) ){
exit();
};
//echo $SYSPath ; exit();
$Labels=new Language_json( $SYSPath .'lib/'.$UserLang.'.json');
$Labels=new Language_json( $SYSPath .'/lib/'.$UserLang.'.json');
if( $UserLang == 3 || $UserLang == 255 ){
$RTL_SITE = true;

1
lib/controller/data

@ -0,0 +1 @@
/srv/samba/dr_frucht/Projects/la_serva/Debug86/data

112
lib/controller/doAckOperation.php

@ -1,112 +0,0 @@
<?php
require_once('../ajax_asm.php');
if( $CUser->Data['id'] > 1 ){
$Data = array();
$Data['status'] = 'na';
if( isset( $_POST['CMD'] ) ){
$CMD = intval( $_POST['CMD'] );
} else $CMD = 0;
if( isset( $_POST['NID'] ) ) {
$NodeID = intval($_POST['NID']);
} else $NodeID = 0;
if( $NodeID ){
$QS = "SELECT `aux_id` FROM `nodes` WHERE `id`={$NodeID}";
$JJ = $DATABASE->Query( $QS );
$SenID = $JJ[0]['aux_id'];
switch( $CMD ){
case 0:{
if( isset( $_POST['MID'] ) ){
$MID = intval( $_POST['MID'] );
} else {
$MID = 0;
};
if( isset( $_POST['LID'] ) ){
$LID = intval( $_POST['LID'] );
} else {
$LID = 0;
};
$QS = "SELECT `id` FROM `lrf_masks` WHERE `sensor_id`={$SenID} AND `lrf_id`={$LID} AND `layer`={$MID}";
$JJ = $DATABASE->Query( $QS );
if( count( $JJ ) ){
$CID = $JJ[0]['id'];
$QS = "UPDATE `lrf_masks` SET `status`='D' WHERE `id`={$CID}";
$DATABASE->Query( $QS );
$RBASE = new SQLite_DB( '/dev/shm/argus/mem_db.db');
$Data['success'] = true;
$Data['status'] = 'ok';
$QS = "INSERT INTO `nodes_qcq`(`node_id`,`cmd`,`status`,`parameter`) VALUES({$NodeID},65,0,'')";
$Data['query'] = $QS;
$RBASE->Query( $QS, false );
$Data['operation_id'] = intval( $RBASE->getLastInsertID() );
};
break;
};
case 1:{
if( isset( $_POST['MID'] ) ){
$MID = intval( $_POST['MID'] );
} else {
$MID = 0;
};
if( isset( $_POST['LID'] ) ){
$LID = intval( $_POST['LID'] );
} else {
$LID = 0;
};
$QS = "SELECT `id` FROM `lrf_masks` WHERE `sensor_id`={$SenID} AND `lrf_id`={$LID} AND `layer`={$MID}";
$JJ = $DATABASE->Query( $QS );
if( count( $JJ ) ){
$CID = $JJ[0]['id'];
$QS = "UPDATE `lrf_masks` SET `status`='E' WHERE `id`={$CID}";
$DATABASE->Query( $QS );
$RBASE = new SQLite_DB( '/dev/shm/argus/mem_db.db');
$Data['success'] = true;
$Data['status'] = 'ok';
$QS = "INSERT INTO `nodes_qcq`(`node_id`,`cmd`,`status`,`parameter`) VALUES({$NodeID},65,0,'')";
$Data['query'] = $QS;
$RBASE->Query( $QS, false );
$Data['operation_id'] = intval( $RBASE->getLastInsertID() );
};
break;
};
case 3:{
if( isset( $_POST['MID'] ) ){
$MID = intval( $_POST['MID'] );
} else {
$MID = 0;
};
if( isset( $_POST['LID'] ) ){
$LID = intval( $_POST['LID'] );
} else {
$LID = 0;
};
$QS = "SELECT `id` FROM `lrf_masks` WHERE `sensor_id`={$SenID} AND `lrf_id`={$LID} AND `layer`={$MID}";
$JJ = $DATABASE->Query( $QS );
if( count( $JJ ) ){
$CID = $JJ[0]['id'];
$QS = "SELECT `id` FROM `lrf_mask_vertexes` WHERE `mask_id`={$CID}";
$JJ = $DATABASE->Query( $QS );
foreach( $JJ as $J ){
$QS = "DELETE FROM `lrf_mask_vertex_points` WHERE `vertex_id`={$J['id']}";
$DATABASE->Query( $QS );
$QS = "DELETE FROM `lrf_mask_vertexes` WHERE `id`={$J['id']}";
$DATABASE->Query( $QS );
};
$QS = "DELETE FROM `lrf_masks` WHERE `id`={$CID}";
$DATABASE->Query( $QS );
$RBASE = new SQLite_DB( '/dev/shm/argus/mem_db.db');
$Data['success'] = true;
$Data['status'] = 'ok';
$CMD = 75+$MID;
$QS = "INSERT INTO `nodes_qcq`(`node_id`,`cmd`,`status`,`parameter`) VALUES({$NodeID},{$CMD},0,'')";
$Data['query'] = $QS;
$RBASE->Query( $QS, false );
$Data['operation_id'] = intval( $RBASE->getLastInsertID() );
};
};
};
};
echo json_encode( $Data );
} else {
header('location: /');
};
?>

172
lib/controller/doModuleOperations.php

@ -0,0 +1,172 @@
<?php
require_once('../ajax_asm.php');
if( $CUser->Data['id'] > 1 ){
$Data = array();
$Data['status'] = 'na';
if( isset( $_POST['OPID'] ) ){
$CMD = intval( $_POST['OPID'] );
} elseif( isset( $_GET['OPID'] ) ){
$CMD = intval( $_GET['OPID'] );
} else $CMD = 0;
if( isset( $_POST['MID'] ) ) {
$ModuleID = intval($_POST['MID']);
} elseif( isset( $_GET['MID'] ) ){
$ModuleID = intval($_GET['MID']);
} else $ModuleID = 0;
if( $ModuleID ){
switch( $CMD ){
case 1:{
$QS = "SELECT * FROM `metro_modules` WHERE `id`={$ModuleID}";
$RR = $DATABASE->Query( $QS );
if( count( $RR ) ){
if( $RR[0]['IP4']!=''){
if( $RR[0]['m_login']!='' && $RR[0]['m_password']!='' ){
header("location: http://{$RR[0]['IP4']}:80/login.php?login=poocka&pwd=terrarium");
} else {
header("location: http://{$RR[0]['IP4']}:80/");
};
exit();
};
};
exit();
};
case 2:{
$QS = "SELECT * FROM `metro_modules` WHERE `id`={$ModuleID}";
$RR = $DATABASE->Query( $QS );
if( count( $RR ) ){
if( $RR[0]['IP4']!=''){
header("location: http://{$RR[0]['IP4']}:8080");
exit();
};
};
exit();
};
case 3:{
$QS = "SELECT * FROM `metro_modules` WHERE `id`={$ModuleID}";
$RR = $DATABASE->Query( $QS );
if( count( $RR ) ){
if( $RR[0]['IP4']!=''){
header("location: http://{$RR[0]['IP4']}:9090");
exit();
};
};
exit();
};
case 4:{ // Edit IP
$EIP = $DATABASE->escape( $_POST['OPCODE'] );
$QS = "UPDATE `metro_modules` SET `IP4`='{$EIP}' WHERE `id`={$ModuleID}";
$DATABASE->Query( $QS );
exit();
};
case 5:{ // Edit IDENTITY
$EIP = $DATABASE->escape( $_POST['OPCODE'] );
$QS = "UPDATE `metro_modules` SET `IP4`='{$EIP}' WHERE `id`={$ModuleID}";
$DATABASE->Query( $QS );
exit();
};
case 6:{ // Edit Login
$EIP = $DATABASE->escape( $_POST['OPCODE'] );
$QS = "UPDATE `metro_modules` SET `m_login`='{$EIP}' WHERE `id`={$ModuleID}";
$DATABASE->Query( $QS );
exit();
};
case 7:{ // Edit Password
$EIP = $DATABASE->escape( $_POST['OPCODE'] );
$QS = "UPDATE `metro_modules` SET `m_password`='{$EIP}' WHERE `id`={$ModuleID}";
$DATABASE->Query( $QS );
exit();
};
case 8:{ // Direct PTZ Controll
$QS = "SELECT `cam_id` FROM `metro_modules` WHERE `id`={$ModuleID}";
$RR = $DATABASE->Query( $QS );
if( count( $RR ) ){
$CameraID = intval( $RR[0]['cam_id'] );
if( $CameraID && isset( $_POST['MOV'] ) ){
$CCC = intval( $_POST['MOV'] );
switch( $CCC ){
case 0: $ACMD = 0x01; break; //Stop
case 10: $ACMD = 0x21; break; //Zoom In
case 11: $ACMD = 0x41; break; //Zoom Out
case 27: $ACMD = 0x03; break; // Right
case 28: $ACMD = 0x13; break; // RD
case 29: $ACMD = 0x11; break; // Down
case 30: $ACMD = 0x15; break; // LD
case 31: $ACMD = 0x05; break; // Left
case 32: $ACMD = 0x0d; break; // LU
case 33: $ACMD = 0x09; break; // Up
case 34: $ACMD = 0x0B; break; // RU
case 35: $ACMD = 0x82; break; // IR Off
case 36: $ACMD = 0x81; break; // IR On
case 37: $ACMD = 0x84; break; // Wiper
case 38: $ACMD = 0x83; break; // IR Auto
case 39: $ACMD = 0x85; break; // Set Home Preset Via Comntrol
};
if( $ACMD ){
$QS = "INSERT INTO `mem_web_queue`(`module_id`,`cmd`,`aux_id`,`status`) VALUES ({$ModuleID},{$ACMD},{$CameraID},0)";
$DATABASE->Query( $QS );
};
};
} else header('location: /');
exit();
};
case 9:{ // Set PTZ Home
exit();
};
case 10:{ // Edit Cam Login
$EIP = $DATABASE->escape( $_POST['OPCODE'] );
$QS = "UPDATE `metro_modules` SET `c_login`='{$EIP}' WHERE `id`={$ModuleID}";
$DATABASE->Query( $QS );
exit();
};
case 11:{ // Edit Cam Password
$EIP = $DATABASE->escape( $_POST['OPCODE'] );
$QS = "UPDATE `metro_modules` SET `c_password`='{$EIP}' WHERE `id`={$ModuleID}";
$DATABASE->Query( $QS );
exit();
};
case 12:{ // Edit Host Login
$EIP = $DATABASE->escape( $_POST['OPCODE'] );
$QS = "UPDATE `metro_modules` SET `h_login`='{$EIP}' WHERE `id`={$ModuleID}";
$DATABASE->Query( $QS );
exit();
};
case 13:{ // Edit Host Password
$EIP = $DATABASE->escape( $_POST['OPCODE'] );
$QS = "UPDATE `metro_modules` SET `h_password`='{$EIP}' WHERE `id`={$ModuleID}";
$DATABASE->Query( $QS );
exit();
};
case 14:{//Set Ena/Dis
$EIP = $DATABASE->escape( $_POST['OPCODE'] );
$QS = "UPDATE `metro_modules` SET `status`='{$EIP}' WHERE `id`={$ModuleID}";
$DATABASE->Query( $QS );
exit();
};
case 200:{ // Delete Module
$QS = "SELECT * FROM `metro_modules` WHERE `id`={$ModuleID}";
$RR = $DATABASE->Query( $QS );
if( count( $RR ) ){
$CR = $RR[0];
if( $CR['side'] == 'N' ){
$QS = "UPDATE `metro_tracks` SET `near_module_id`=0 WHERE `id`={$CR['track_id']}";
} else {
$QS = "UPDATE `metro_tracks` SET `far_module_id`=0 WHERE `id`={$CR['track_id']}";
};
$DATABASE->Query( $QS );
$QS = "DELETE FROM `metro_modules` WHERE `id`={$ModuleID}";
$DATABASE->Query( $QS );
};
exit();
};
};
echo json_encode( $Data );
} else {
//Check if need to add module
if( $CMD == 300 ){
exit();
};
};
header('location: /');
} else header('location: /');
?>

93
lib/controller/doSessionOperations.php

@ -0,0 +1,93 @@
<?php
require_once('../ajax_asm.php');
ob_start();
$ACCESS = intval( $CUser->Data['access'] );
$UID = intval( $CUser->Data['id'] );
if( $UID > 1 ){
$Data = array();
$Data['status'] = 'err';
if( isset( $_POST['OPID'] ) ){
$CMD = intval( $_POST['OPID'] );
} else {
$CMD = 0;
};
if( isset( $_POST['SESSION'] ) ){
$OID = intval( $_POST['SESSION'] );
} else {
$OID = 0;
};
if( $CMD > 0 && $OID > 0 ){
switch( $CMD ){
case 1:{
if( $ACCESS > 2 ){
$QS = "SELECT * FROM `sessions` WHERE `id`={$OID}";
$RR = $DATABASE->Query( $QS );
if( count( $RR ) ){
$SD = $RR[0];
$Data['basepath'] = $SYSPath .'/lib/controller/data/reports/'.$SD['track_id'].'/'.date("Y/m/d",intval($SD['ts'] ));
if( file_exists( $Data['basepath'] )){
$RBASE = new SQLite_DB( $Data['basepath'] .'/report.db' );
$QS = "DELETE FROM `events` WHERE `session_id`={$OID}";
$RBASE->Query( $QS );
$QS = "SELECT * FROM `videos` WHERE `session_id`={$OID}";
$RR = $RBASE->Query( $QS );
foreach( $RR as $V ) unlink( $Data['basepath'] .'/'.$V['uuid'] . '.'. $V['ext'] );
$QS = "DELETE FROM `videos` WHERE `session_id`={$OID}";
$RBASE->Query( $QS );
$QS = "DELETE FROM `sessions` WHERE `id`={$OID}";
$DATABASE->Query( $QS );
//ToDo: Check if there other session if not -> delete database and report folder
$Data['status'] = 'ok';
} else {
$Data['msg']='Report DataBase is Corupted!';
};
} else {
$Data['msg']='Session is already Deleted!';
};
} else {
$Data['msg']='Wrong Access Level!';
};
};
case 2:{ // Set Session Status
$ST = intval( $_POST['OPAR'] );
if( $ST ){
if( $ST == 6 ) $ST = 4;
$QS = "UPDATE `sessions` SET `status`={$ST} WHERE `id`={$OID}";
$DATABASE->Query( $QS );
};
// Get SetStatus UI
$QS = "SELECT `status`, `final` FROM `sessions` WHERE `id`={$OID}";
$SR = $DATABASE->Query( $QS );
$CS = $SR[0];
if( $CS['final']=='Y' ){
$QS = "SELECT * FROM `session_statuses` WHERE `min_access`<={$ACCESS}";
} else {
$QS = "SELECT * FROM `session_statuses` WHERE `min_access`<={$ACCESS} AND `special`=''";
};
$SR = $DATABASE->Query( $QS );
$TDS = '';
$PPP = 100.0 / count($SR);
foreach( $SR as $S ){
$FUNC = ($S['special']!='')?$S['special']:'setSessionStatus';
if( $CS['status'] >= $S['lvl'] ){
$TDS .= "<td align=\"center\" width=\"{$PPP}%\"><span class=\"sideInfo_item passive_gray\">{$S['label']}</span></td>";
} else {
$TDS .= "<td align=\"center\" width=\"{$PPP}%\"><span class=\"sideInfo_item {$S['class']}\" onclick=\"{$FUNC}({$OID},{$S['lvl']});\" >{$S['label']}</span></td>";
};
};
$Data['content']="{ id: 'sets_ui', frame: true, html: '<table width=\"100%\" border=0><tr>{$TDS}</tr></table>'}";
$Data['status'] = 'ok';
};
};
} else {
$Data['msg']='Wrong Parameters!';
};
$Data['messages'] = ob_get_clean();
echo json_encode( $Data );
exit();
} else {
$LOG->security_treat( $_POST );
};
header('location: /');
?>

18
lib/controller/doStationOperations.php

@ -8,8 +8,8 @@
} else {
$CMD = 0;
};
if( isset( $_POST['ID'] ) ){
$OID = intval( $_POST['ID'] );
if( isset( $_POST['STATION'] ) ){
$OID = intval( $_POST['STATION'] );
} else {
$OID = 0;
};
@ -269,6 +269,20 @@
};
break;
};
case 11:{//Update location
$PARAM = intval( $_POST['TYPE'] );
if( $PARAM ){
$LAT = floatval( $_POST['LAT'] );
$LON = floatval( $_POST['LON'] );
$QS = "UPDATE `metro_stations` SET `lat`={$LAT}, `lon`={$LON} WHERE `id`={$OID}";
} else {
$X = intval( $_POST['X'] );
$Y = intval( $_POST['Y'] );
$QS = "UPDATE `metro_stations` SET `x`={$X}, `y`={$Y} WHERE `id`={$OID}";
};
$DATABASE->Query( $QS );
break;
};
};
} else {
$Data['msg']='Wrong Parameters!';

165
lib/controller/getAddModuleWindow.php

@ -0,0 +1,165 @@
<?php
require_once('../ajax_asm.php');
require_once('../php/argus/server.php');
if( $CUser->Data['id'] > 1 ){
$PID = intval( $_POST['PID'] );
$QS = "SELECT * FROM `metro_tracks` WHERE `platform_id`={$PID}";
$RR = $DATABASE->Query( $QS, false );
if( count( $RR ) ){
$MODS = array();
$ATN = '';
$ATS = '';
$BTN = '';
$BTS = '';
foreach( $RR as $CT ){
if( $CT['side'] == 'U' ){
$FID = intval( $CT['far_module_id'] );
$NID = intval( $CT['near_module_id'] );
if( !$FID ) $MODS['UL']=$CT['id'];
if( !$NID ) $MODS['UR']=$CT['id'];
$ATN = $CT['name'];
$ATS = $CT['short'];
} else {
$FID = intval( $CT['far_module_id'] );
$NID = intval( $CT['near_module_id'] );
if( !$FID ) $MODS['BR']=$CT['id'];
if( !$NID ) $MODS['BL']=$CT['id'];
$BTN = $CT['name'];
$BTS = $CT['short'];
};
};
//If no mods = all are defined
if( count( $MODS ) ){
$PAPA = array();
$LOCK = count( $MODS );
$CVAL = '';
foreach( $MODS as $KEY=>$VALUE ){
$PAPA[] = "['".$KEY . "','" .$Labels->GetLabel( 'MOD_LOC_'.$KEY ) . "','" .'/style/assets/ms_'.strtolower( $KEY ).".png']";
if( $CVAL == '' ) $CVAL = $KEY;
};
$CDATA = implode(',', $PAPA );
$WTPL =<<<DATA_BOUNDARY
{
id: 'huba_buba',
title: "{$Labels->GetLabel( '_ADD_MODULE_' )}",
modal: true,
resizable: false,
width: 450,
height: 290,
items:[{
xtype: 'form',
labelWidth: 150,
labelAlign: 'right',
items: [{
xtype: 'textfield',
fieldLabel: "{$Labels->GetLabel( 'MOD_NAME' )}",
id: 'mod_name',
width: 200,
},{
xtype: 'textfield',
fieldLabel: "{$Labels->GetLabel( 'MOD_IP' )}",
id: 'mod_ip',
width: 200,
},{
xtype: 'textfield',
fieldLabel: "{$Labels->GetLabel( 'MOD_IDENT' )}",
id: 'mod_id',
width: 200,
},{
xtype: 'combo',
fieldLabel: "{$Labels->GetLabel( 'MOD_LOCATION' )}",
id: 'mod_loc',
width: 200,
lazyRender: true,
mode: 'local',
forceSelection: true,
triggerAction: 'all',
editable: false,
readOnly: ({$LOCK}==1),
disableKeyFilter: true,
tpl:'<tpl for="."><div class="x-combo-list-item"><img width="16px" src="{icon}"/>&nbsp;{name}</div></tpl>',
store: new Ext.data.ArrayStore({
fields: ['abbr','name','icon'],
data: [{$CDATA}]
}),
valueField: 'abbr',
displayField: 'name',
value: '{$CVAL}',
listeners:{
select: function( t, r, i ){
t.getEl().setStyle({
'background-image': 'url(' + r.data.icon + ')',
'background-repeat': 'no-repeat',
'background-position': '3px center',
'background-size': '16px 16px',
'padding-left': '25px'
});
},
afterrender: function( t ){
t.getEl().setStyle({
'background-image': 'url(' + t.store.data.items[t.store.findExact( 'abbr', t.value )].data.icon + ')',
'background-repeat': 'no-repeat',
'background-position': '3px center',
'background-size': '16px 16px',
'padding-left': '25px'
});
}
}
},{
xtype: 'panel',
id: 'infopan',
html: '<table width="100%" border=1><tr><td class="mod_sch_ucell">{$ATN}[{$ATS}]</td></tr><tr><td class="mod_sch_bcell">{$BTN}[{$BTS}]</td></tr></table>'
}]
}],
bbar:[{
text: '{$Labels->GetLabel( '_CANCEL_' )}',
handler: function(){
var tt = Ext.getCmp('huba_buba');
tt.close();
}
},{
text: '{$Labels->GetLabel( '_ADD_' )}',
handler: function(){
var mtyp = Ext.getCmp('mod_type').getValue();
Ext.Ajax.request({
url: '/lib/controller/addModule.php',
params: {
SERVID: 1,
TYPE: mtyp,
UID: {$UserID},
SID: '{$Session}'
},
success: function( response, opts ){
// If the response is JSON, you have to decode it
var data = Ext.decode(response.responseText);
if( data.status == 'ok' ){
addModuleWindow.close();
loadModules();
} else {
Ext.Msg.show({
title: "{$Labels->GetLabel("_INFO_MSG_")}",
msg: data.message,
buttons: Ext.Msg.OK,//YESNOCANCEL,
fn: function(){
//SettingsLidar3D.hide();
},
icon: Ext.MessageBox.INFO //QUESTION
});
}
},
failure: failureAJAXFunction
});
}
}]
}
DATA_BOUNDARY;
};
echo $WTPL;
} else {
echo '{ xtype: \'panel\', html: \'Node '.$_POST['NODE'].' Loadded\'}';
};
} else {
header('location: /');
};
?>

54
lib/controller/getHelpTopic.php

@ -0,0 +1,54 @@
<?php
require_once('../ajax_asm.php');
if( $CUser->Data['id'] > 1 ){
$Data['status'] = 'error';
$HID = intval( $_POST['HID'] );
switch( $HID ){
case 312:{
$TOPIC = 'Video Container';
$INFO_BREEF = 'Video containers, also known as container formats, are file formats that hold various types of media data, including video, audio, subtitles, and metadata.';
$HELP_FULL = 'Types of Video Containers<br/>The most common types of video containers include:<br/>MP4 (MPEG-4 Part 14): Widely used for video streaming and distribution, MP4 is compatible with most devices and supports advanced content like 3D graphics and user interactivity.<br/>AVI (Audio Video Interleave): Introduced by Microsoft, AVI is a traditional format that can contain high-quality video and audio but often results in larger file sizes than other containers.<br/>MOV: Developed by Apple, MOV is the basis of the QuickTime framework and is popular in professional video editing environments due to its high quality and flexibility.<br/>MKV (Matroska Video): An open-source container with unlimited video, audio, picture, or subtitle tracks in one file, making it highly versatile for complex content.<br/>FLV (Flash Video): Previously dominant for online video streaming, FLV has declined in popularity with the decrease in support for Adobe Flash Player.<br/>Each container has its own features and compatibility, influencing its use for different applications.';
break;
};
case 122:{
$TOPIC = 'Encoder Bitrate Setting';
$INFO_BREEF = 'Video bitrate is essentially any video data that is being transferred at any given moment. A high bitrate is essential for streamers, as it is what defines the quality of a video. Bitrate is a measurement of the amount of data used to encode a single second of video.';
$HELP_FULL = 'On YouTube’s support page, a full breakdown of the best bitrate settings is given for YouTube video uploads. They recommend a bitrate of at least 5 Mbps for 720p videos, 8 Mbps for 1080p videos, 16 Mbps for 1440p videos, and 35-45 Mbps for 4K videos at standard frame rates. Check out the support page for further information.';
break;
};
default:
$TOPIC = 'UNKNOWN HELP TOPIC';
$INFO_BREEF = 'UNKNOWN HELP TOPIC';
$HELP_FULL = 'UNKNOWN HELP TOPIC';
};
$SKEL=<<<DATABOUNDARY
{
xtype: 'panel',
border: false,
frame: false,
items:[{
xtype:'panel',
border: false,
frame: false,
html: '<table width="100%" border=0 class="setEd_infoPanel" id="LIBAV_LOGO"><tr><td width="200px"><div class="help_logo_img"></div></td><td valign="middle">{$TOPIC}</td></tr><tr><td colspan=2>{$INFO_BREEF}</td></tr></table><br/>'
},{
xtype: 'spacer',
height: 10
},{
xtype:'panel',
border: false,
frame: false,
html: '<table width="100%" border=0 class="setEd_infoPanel" id="IOVRY_BODY"><tr><td>{$HELP_FULL}</td></tr>'
},]
}
DATABOUNDARY;
$Data['status'] = 'ok';
$Data['content'] = $SKEL;
echo json_encode( $Data );
} else {
header('location: /');
};
?>

30
lib/controller/getHistoryDates.php

@ -0,0 +1,30 @@
<?php
require_once('../ajax_asm.php');
if( $CUser->Data['id'] > 1 ){
//$TZ = new DateTimeZone( date_default_timezone_get() );
//$DT = new DateTime("now", $TZ );
//$DIDI = $TZ->getOffset( $DT );
if(isset($_POST['STATION'])){
$STT = intval( $_POST['STATION'] );
$QS = "SELECT DISTINCT FROM_UNIXTIME( `ts`,'%Y-%m-%d' ) AS `d` FROM `sessions` WHERE `track_id` IN (SELECT DISTINCT `id` FROM `metro_tracks` WHERE `platform_id` IN ( SELECT DISTINCT `id` FROM `metro_platforms` WHERE `station_id`={$STT}))";
} else {
$QS = "SELECT DISTINCT FROM_UNIXTIME( `ts`,'%Y-%m-%d' ) AS `d` FROM `sessions`";
};
$RR = $DATABASE->Query( $QS );
if( count( $RR ) ){
$DD = array();
foreach( $RR as $R ){
$CC = 40; //intval( $R['s_cnt'] );
$DS = $R['d'] . ' 00:00:00';
$TS = strtotime( $DS );//+$DIDI;
if( $CC > 100 ) $CC = 100;
$DD[] = '{"t": '.( $TS * 1000 ).',"v":'.$CC.', "d":"'.$DS.'"}';
};
echo "[" . implode(",", $DD ) . "]";
} else {
echo "[]";
};
} else {
header('location: /');
};
?>

57
lib/controller/getHistoryDay.php

@ -0,0 +1,57 @@
<?php
require_once('../ajax_asm.php');
if( $CUser->Data['id'] > 1 ){
$STS = intval( $_POST['DTS'] );
if( isset( $_POST['STT'] ) ){
$STT = intval( $_POST['STT'] );
} else $STT = 0;
if( $STS ){
//$TZ = new DateTimeZone( date_default_timezone_get() );
//$DT = new DateTime("now", $TZ );
//$DIDI = $TZ->getOffset( $DT );
//$DTS += $DIDI;
$ETS = $STS + 86400;
//$Y = date("Y", $DTS );
//$M = date("m", $DTS );
//$D = date("d", $DTS );
//$DS = date("Y/m/d", $DTS );
$SECTIONS = array();
$QS = "SELECT * FROM `metro_platforms` WHERE `station_id`={$STT} ORDER BY `index`";
$JU = $DATABASE->Query( $QS );
if( count($JU) ){
foreach( $JU as $CP ){
//$QS = "SELECT * FROM `sessions` WHERE `final`='Y' AND `track_id` IN (SELECT DISTINCT `id` FROM `metro_tracks` AND `platform_id` IN ( SELECT DISTINCT `id` FROM `metro_platforms` WHERE `station_id`={$STT} )) ORDER BY `ts`*1000+`ts_ms`";
$QS = "SELECT * FROM `sessions` WHERE `ts` >= {$STS} AND `ts` <= {$ETS} AND `final`='Y' AND `track_id` IN ( SELECT DISTINCT `id` FROM `metro_tracks` WHERE `platform_id`={$CP['id']}) ORDER BY `ts`*1000+`ts_ms`";
$RR = $DATABASE->Query( $QS );
$S = count( $RR );
$V = 0;//intval( $RR[0]['v'] );
$E = 0;//intval( $RR[0]['e'] );
if( $S ){
$JIGA = array();
foreach( $RR as $R ){
$V += intval( $R['vid_cnt']);
$E += intval( $R['evt_cnt']);
$QS = "SELECT `short` FROM `metro_tracks` WHERE `id`={$R['track_id']}";
$ZD = $DATABASE->Query( $QS );
$BTM = "[{$ZD[0]['short']}]&nbsp;".date( "H:i:s", $R['ts'] );
$SID = intval( $R['id']);
$LABEL = "<table><tr><td style=\"background-image: url(/style/wicons/046.png);background-size: 16px 16px;background-repeat: no-repeat;background-position: 6px 4px;\">&nbsp;<td>{$R['vid_cnt']}</td><td>{$R['evt_cnt']}</td></tr></table>";
$JIGA[] = "{ id: 'tn_{$SID}', text: '{$BTM}', qtip: '{$LABEL}', iconCls: 'ses_stat_{$R['status']}', leaf: true, sid: {$SID} }";
};
if( count( $JIGA ) ){
$SECTIONS[] = "{ text: '{$CP['name']}', cls: 'ses_stat_head', leaf: false, expanded: true, children:[". implode( ",", $JIGA ) . "]}";
};
};
};
echo "{expanded: true, children: [".implode(',',$SECTIONS )."], sessions:{$S}, events:{$E}, videos:{$V} }";
} else {
echo "[]";
};
} else {
echo "[]";
};
} else {
header('location: /');
};
?>

70
lib/controller/getHistoryEvents.php

@ -0,0 +1,70 @@
<?php
require_once('../ajax_asm.php');
if( $CUser->Data['id'] > 1 ){
$BID = intval( $_POST['BID'] );
$EID = intval( $_POST['EID'] );
$DTS = intval( $_POST['TS'] );
if( 1 || $BID ){
$QS = "SELECT * FROM `system_props` LIMIT 1";
$SPD = $DATABASE->Query( $QS );
$SP = $SPD[0];
$QS = "SELECT * FROM nodes";
$result = $DATABASE->Query( $QS, false );
$NodeNames = array();
foreach( $result as $R ) $NodeNames[$R['id']] = $R['name'];
$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');
//$LREC = array_reverse( $ZIZI->Query( $QS ) );
$LREC = $ZIZI->Query( $QS );
$Data['log'] = array();
foreach( $LREC as $REC ){
$CR['id'] = intval( $REC['id'] );
$CR['node_id'] = intval( $REC['node_id'] );
$CR['node_name'] = $NodeNames[$CR['node_id']];
$CR['rts'] = $DTS;
$CR['ts'] = intval( $REC['ts'] );
$CR['ms'] = intval( $REC['ts_ms'] );
$CR['dts'] = date( "Y-m-d H:i:s.{$CR['ms']}", $CR['ts'] );
$CR['type'] = intval( $REC['evt_type'] );
$CR['range'] = sprintf( "%0.2f", floatval( $REC['range'] ));
$CR['az'] = sprintf( "%0.2f", floatval( $REC['azimuth'] ));
$CR['el'] = sprintf( "%0.2f", floatval( $REC['elevation'] ));
$CR['r'] = intval( $REC['range_digital'] );
$CR['width'] = intval( $REC['area'] );
if( intval( $REC['video_id'] ) ){
$CR['video'] = 2;
} elseif( intval( $REC['picture_id'] ) ){
$CR['video'] = 1;
} else {
$CR['video'] = 0;
};
//$CR['video_id'] = intval( $REC['video_id'] );
if( $REC['lat'] != 0 && $REC['lon'] != 0 ){
$CR['geo'] = true;
if( $SP['local_binding'] != 0 ){
//$CHUCHA = ( M_PI / 180 ) * (floatval( $REC['azimuth'] )-40.9);
//$RUR = sqrt( $REC['lon']* $REC['lon'] + $REC['lat']*$REC['lat']);
$CR['lon'] = floatval( $SP['anchor_lon'] ) + floatval( $REC['lon'] );
//$CR['lon'] = floatval( $SP['anchor_lon'] ) + cos( $CHUCHA ) * $RUR;
$CR['lat'] = floatval( $SP['anchor_lat'] ) + floatval( $REC['lat'] );
//$CR['lat'] = floatval( $SP['anchor_lat'] ) + sin( $CHUCHA ) * $RUR;
} else {
$CR['lon'] = floatval( $REC['lon'] );
$CR['lat'] = floatval( $REC['lat'] );
};
} else {
$CR['geo'] = false;
if( isset( $CR['lon'] ) ) unset( $CR['lon'] );
if( isset( $CR['lat'] ) ) unset( $CR['lat'] );
};
$Data['log'][] = $CR;
};
echo json_encode( $Data );
exit();
};
};
header('location: /');
?>

50
lib/controller/getHistoryMapView.php

@ -0,0 +1,50 @@
<?php
require_once('../ajax_asm.php');
require_once('../php/argus/server.php');
ob_start();
$UID = intval( $CUser->Data['id'] );
$ACCESS = intval( $CUser->Data['access'] );
if( $UID > 1 ){
$Data['content'] =<<<DATA_BOUNDARY
{
xtype: 'panel',
layout: 'vbox',
border: false,
frame: false,
width: '100%',
tbar:[{
xtype: 'button',
text: 'Map Level',
enableToggle: true,
pressed: true,
allowDepress: false
},'->',{
xtype: 'button',
id: 'aer_button',
text: 'Event Auto Rise',
enableToggle: true,
pressed: autoRiseEvent,
handler: function( t ){
autoRiseEvent = t.pressed;
}
}],
items: [{
xtype: 'panel',
id: 'history_map',
height: PanelH+16,
listeners:{
afterrender: function(){
initHistoryMap('history_map', 2057,1474 );
}
}
}]
}
DATA_BOUNDARY;
$Data['status'] = 'ok';
$Data['messages'] = ob_get_clean();
echo json_encode( $Data );
} else {
header('location: /');
};
?>

195
lib/controller/getHistorySessionView.php

@ -0,0 +1,195 @@
<?php
require_once('../ajax_asm.php');
require_once('../php/argus/server.php');
require_once('../php/argus/templates.php');
ob_start();
$UID = intval( $CUser->Data['id'] );
$ACCESS = intval( $CUser->Data['access'] );
if( isset($_POST['SESSION']) ) $SESSION_ID = intval( $_POST['SESSION'] ); else $SESSION_ID = 0;
if( $UID > 1 && $SESSION_ID ){
$QS = "SELECT * FROM `sessions` WHERE `id`={$SESSION_ID}";
$Result = $DATABASE->Query( $QS, false );
if( count( $Result ) ){
$CS = $Result[0];
$CTID = intval( $CS['track_id'] );
$QS = "SELECT * FROM `metro_tracks` WHERE `id`={$CTID}";
$Result = $DATABASE->Query( $QS, false );
$CTR = $Result[0];
$CPID = intval( $CTR['platform_id'] );
$QS = "SELECT * FROM `metro_platforms` WHERE `id`={$CPID}";
$Result = $DATABASE->Query( $QS, false );
$CPL = $Result[0];
$STID = $CPL['station_id'];
$QS = "SELECT * FROM `metro_stations` WHERE `id`={$STID}";
$Result = $DATABASE->Query( $QS, false );
$CST = $Result[0];
$Data['status']='ok';
$CTITLE = $CPL['name'] . ' <span class="level_label_title">'.$CPL['level'].'</span>';
if( $CTR['name']!=''){
$TNAME = $CTR['name'] . ':' . $CTR['short'] ;
} else {
$TNAME = $CTR['short'] ;
};
$MAIN_TPL = str_ireplace( '%%STATION%NAME%%', $CST['name'], $TRACK_HISTORY_CTX );
$MAIN_TPL = str_ireplace( '%%STATION%ID%%', $STID, $MAIN_TPL );
$MAIN_TPL = str_ireplace( '%%PLATFORM%NAME%%', $CPL['name'], $MAIN_TPL );
$MAIN_TPL = str_ireplace( '%%PLATFORM%ID%%', $CPID, $MAIN_TPL );
$MAIN_TPL = str_ireplace( '%%PLATFORM%TITLE%%', $CTITLE, $MAIN_TPL );
$MAIN_TPL = str_ireplace( '%%TRACK%NAME%%', $TNAME, $MAIN_TPL );
if( $CTR['side'] == 'U' ){
$LMID = intval( $CTR['far_module_id'] );
$RMID = intval( $CTR['near_module_id'] );
} else {
$RMID = intval( $CTR['far_module_id'] );
$LMID = intval( $CTR['near_module_id'] );
};
if( $LMID ){
$QS = "SELECT * FROM `metro_modules` WHERE `id`={$LMID}";
$DD = $DATABASE->Query( $QS, false );
$MD = $DD[0];
$URL = '/style/assets/no-signal_h.png';
$LVID = str_ireplace( '%%MID%%', $LMID, $VIDEOJS_CTX );
$LVID = str_ireplace( '%%%TITLE%%%', $MD['name'], $LVID );
$LTitle = $MD['name'];
$LVID = str_ireplace( '%%%SELURL%%%', $URL, $LVID );
$LVID = str_ireplace( '%%%HBTN%%%','&nbsp;', $LVID );
} else {
$LVID = str_ireplace( '%%MID%%', '0', $EMPTY_VIDEO_CTX );
$LVID = str_ireplace( '%%PLATFORM%ID%%', $CPID, $LVID );
};
if( $RMID ){
$QS = "SELECT * FROM `metro_modules` WHERE `id`={$RMID}";
$DD = $DATABASE->Query( $QS, false );
$MD = $DD[0];
$URL = '/style/assets/no-signal_h.png';
$RVID = str_ireplace( '%%MID%%', $RMID, $VIDEOJS_CTX );
$RVID = str_ireplace( '%%%TITLE%%%', $MD['name'], $RVID );
$RTitle = $MD['name'];
$RVID = str_ireplace( '%%%SELURL%%%', $URL, $RVID );
$RVID = str_ireplace( '%%%HBTN%%%','&nbsp;', $RVID );
} else {
$RVID = str_ireplace( '%%MID%%', '0', $EMPTY_VIDEO_CTX );
$RVID = str_ireplace( '%%PLATFORM%ID%%', $CPID, $RVID );
};
$PLO = getPlatformLineInfo( $CPID );
if( count( $PLO ) ){
$LINES='<table><tr>';
foreach( $PLO as $Z ) $LINES.="<td><div style=\"border-radius:16px;width:32px;height:32px;background-color:#{$Z['color']};color:#fff;font-size:16px;padding-left:10px;padding-top:6px;\">{$Z['short']}</div></td>";
$LINES.='</tr></table>';
} else {
$LINES=$Labels->GetLabel('_NOBI_LINE_');
};
$NAME = '<table border=0><tr><td colspan=2>'.getStationName( $PLO[0]['station_id'] ).'</td></tr><tr><td><span class="level_label_title_2">B2</span>&nbsp;'.getPlatformName( $CPID ) . '</td><td>'.$LINES.'</td></tr></table>';
$PLAT_PARTS[] = "{ xtype:'panel', border: false, frame: false, html: '<table border=0 width=\"100%\" style=\"display: block; padding: 5px; color: black; background-color: silver;\"><tr><td width=\"120px\" class=\"setEd_infoPanel track_short_big\">{$CTR['short']}</td><td valign=\"middle\" align=\"left\" style=\"padding-left:30px;font-size: 22px; font-weight: bold;\">{$NAME}</td></tr></table>'}";
//$PLAT_PARTS[] = "{html:'Track Nfo'}";//str_ireplace( '%%%MODULE%MAP%%%', $ITEM_X, $ITEM );
//$PLAT_PARTS[] = str_ireplace( '%%MID%%', $MID , $VIDEOJS_CTX );
//$PLAT_PARTS[] = str_ireplace( '%%MID%%', '' , $VIDEOJS_CTX );
$MSVG = createTrackBackground( $CPL['layout'], $CTR['side'], $LTitle, $RTitle );
$QS = "SELECT * FROM `session_statuses` WHERE `min_access`<={$ACCESS}";
$SR = $DATABASE->Query( $QS );
$TDS = '';
$PPP = 100.0 / count($SR);
foreach( $SR as $S ){
$FUNC = ($S['special']!='')?$S['special']:'setSessionStatus';
if( $CS['status'] >= $S['lvl'] ){
$TDS .= "<td align=\"center\" width=\"{$PPP}%\"><span class=\"sideInfo_item passive_gray\">{$S['label']}</span></td>";
} else {
$TDS .= "<td align=\"center\" width=\"{$PPP}%\"><span class=\"sideInfo_item {$S['class']}\" onclick=\"{$FUNC}({$SESSION_ID},{$S['lvl']});\" >{$S['label']}</span></td>";
};
};
$PLAT_PARTS[] =<<<DATA_BOUNDARY
{
xtype: 'panel',
layout: 'table',
frame: true,
width: '100%',
defaults: {
bodyStyle:'padding:0px'
},
layoutConfig: {
columns: 2
},
items:[{
html: '{$MSVG}',
width: '100%',
colspan: 2
},{$LVID},{$RVID}]
},{
xtype: 'panel',
layout: 'hbox',
frame: true,
items:[{
xtype: 'spacer',
width: 5
},{
xtype: 'button',
id: 'hpl_pl_btn',
text: 'Play',
iconCls: 'plr_op_play',
width: 75,
scale: 'small',
handler: function(){
mSesPlay.play();
}
},{
xtype: 'spacer',
width: 5
},{
xtype: 'button',
text: 'Loop',
iconCls: 'plr_op_loop',
enableToggle: true,
width: 60,
pressed: true,
scale: 'small',
handler: function(){
mSesPlay.toggleLoop();
}
},{
xtype: 'spacer',
width: 10
},{
id: 'hpl_slider',
xtype: 'slider',
//autoWidth: true,
width: 400,
//cls: 'hpl_evt_slider_bg',
minValue: 0,
maxValue: 30000,
listeners:{
change: function( sl, nv, tt ){
mSesPlay.setPosition( nv );
}
}
},{
xtype: 'spacer',
width: 5
},{
html: '<div id="hpl_time_mon"></div>'
}]
},{
id: 'sets_ui',
frame: true,
html: '<table width="100%" border=0><tr>{$TDS}</tr></table>'
}
DATA_BOUNDARY;
//$TOP = str_ireplace('%%%PANELS%%%', implode( ",{ xtype:'spacer', height: 10 },",$PLAT_PARTS ), $MAIN_TPL );
$TOP = str_ireplace('%%%PANELS%%%', implode( ",",$PLAT_PARTS ), $MAIN_TPL );
$Data['pid'] = $PID;
$Data['mid'] = $MID;
$Data['content']= $TOP;
};
$Data['messages'] = ob_get_clean();
echo json_encode( $Data );
} else {
header('location: /');
};
?>

91
lib/controller/getHistoryStationView.php

@ -0,0 +1,91 @@
<?php
require_once('../ajax_asm.php');
require_once('../php/argus/server.php');
require_once('../php/argus/templates.php');
ob_start();
$UID = intval( $CUser->Data['id'] );
$ACCESS = intval( $CUser->Data['access'] );
if( $UID > 1 ){
$STID = intval( $_POST['STT'] );
$QS = "SELECT * FROM `metro_stations` WHERE `id`={$STID}";
$SR = $DATABASE->Query( $QS, false );
if( count( $SR ) ){
$CR = $SR[0];
$QS = "SELECT count(`id`) cnt FROM `metro_platforms` WHERE `station_id`={$STID}";
$Rt = $DATABASE->Query( $QS, false );
$PCO = $Rt[0]['cnt'];
$NAME =$CR['name'] .'<br/>';
$INFO = '<table width="100%" border=0><tr><td width="130px" align="right">'.$Labels->GetLabel('_LBL_PLATFORMS_').':</td><td>'.$PCO.'</td></tr></table>';
$QS = "SELECT `ln`.`short`,`ln`.`color`,`ln`.`name` FROM `metro_lines` `ln` LEFT JOIN `metro_stations_2_lines` `sl` ON ( `ln`.`id`=`sl`.`line_id` ) WHERE `sl`.`station_id`={$STID} ORDER BY `ln`.`short`";
$Rz = $DATABASE->Query( $QS, false );
if( count( $Rz ) ){
$LINES='<table><tr>';
foreach( $Rz as $Z ) $LINES.="<td><div style=\"border-radius:16px;width:32px;height:32px;background-color:#{$Z['color']};color:#fff;font-size:16px;padding-left:10px;padding-top:6px;\">{$Z['short']}</div></td>";
$LINES.='</tr></table>';
} else {
$LINES=$Labels->GetLabel('_NOBI_LINE_');
};
$STATAG="{ xtype:'panel', border: false, frame: false, html: '<table border=0 class=\"setEd_infoPanel\" id=\"SENSOR_N\"><tr><td valign=\"middle\" align=\"center\" style=\"padding-left:30px;font-size: 22px; font-weight: bold;\">{$NAME}</td></tr><tr><td>{$INFO}</td></tr><tr><td style=\"padding-left:30px;\">{$LINES}</td></tr></table>'}";
$PLAT_PARTS = array();
$PLAT_PARTS[] = createTopLabel( $CR['name'], $Labels->GetLabel('_LBL_PLATFORMS_').':&nbsp;'.$PCO, $LINES );
$MAIN_TPL = str_ireplace( '%%STATION%NAME%%', $CR['name'], $STATION_HISTORY_CTX );
$Data['status']='ok';
$PLAT_PARTS[]=<<<DATA_BOUNDARY
{
xtype: 'panel',
height: PanelH-213,
html: '<div id="activity_ph"></div>',
listeners:{
afterrender: function(){
ReportMask = new Ext.LoadMask(Ext.getCmp('main_content').getEl(), {msg:"{$Labels->GetLabel('_Please_Wait_')}..."});
ReportMask.show();
var jj = (PanelW - 230)/55;
changeStyleSheet('amap-empty-day','{width: '+jj+'px; height: '+jj+'px;}');
changeStyleSheet('amap-week-day','{width: '+jj+'px; height: '+jj+'px;}');
changeStyleSheet('amap-week-name','{width: '+jj+'px; height: '+jj+'px;}');
Ext.Ajax.request({
url: '/lib/controller/getHistoryDates.php',
params: {
UID: {$UserID},
SID: '{$Session}',
STATION: {$STID}
},
success: function(response, opts ){
var data = Ext.decode( response.responseText );
var activityMap = new ActivityMap( data, {
id: "dji-volume-map",
parent: '#activity_ph',
showTitle: false,
showYears: true,
width: 100,
hue: 1,
fit: true,
compact: true,
timeColumn: "t",
valueColumn: "v"
});
activityMap.render();
ReportMask.hide();
},
error: function(){
ReportMask.hide();
}
});
}
}
}
DATA_BOUNDARY;
$TOP = str_ireplace('%%%PANELS%%%', implode( ",{ xtype:'spacer', height: 2 },",$PLAT_PARTS ), $MAIN_TPL );
$Data['pids'] = $PLAT_IDS;
$Data['content']= $TOP;
} else {
$Data['status']='na';
}
$Data['messages'] = ob_get_clean();
echo json_encode( $Data );
} else {
header('location: /');
};
?>

34
lib/controller/getMediaLog.php

@ -0,0 +1,34 @@
<?php
require_once('../ajax_asm.php');
ob_start();
$UID = intval( $CUser->Data['id'] );
$ACCESS = intval( $CUser->Data['access'] );
if( $UID > 1 ){
$LID = intval( $_POST['LID'] );
$QS = "SELECT * FROM `media_queue` WHERE `id` > {$LID} ORDER BY `id` DESC LIMIT 100";
$Result = $DATABASE->Query( $QS, false );
if( count( $Result ) ){
$SenPart = array();
foreach( $Result as $R ){
$CC = array();
$CC[0] = $R['id'];
$CC[1] = Date( "H:i:s", $R['ts']);
$CC[2] = $R['uuid'];
$CC[3] = $R['width'].'x'.$R['height'];
$CC[4] = $R['status'];
$CC[5] = $R['progress'];
$SenPart[] = $CC;
};
$Data['status']='ok';
$Data['log'] = $SenPart;
} else {
$Data['status']='na';
};
$Data['messages'] = ob_get_clean();
echo json_encode( $Data );
} else {
header('location: /');
};
?>

255
lib/controller/getMediaSettings.php

@ -0,0 +1,255 @@
<?php
require_once('../ajax_asm.php');
if( $CUser->Data['id'] > 1 ){
$Data['status'] = 'error';
if( $CUser->Data['access'] > 5 ){
$QS = "SELECT * FROM `system_props` WHERE `id`=1";
$Result = $DATABASE->Query( $QS );
$CS = $Result[0];
$SKEL=<<<DATABOUNDARY
{
xtype: 'panel',
border: false,
frame: false,
items:[{
xtype: 'form',
labelAlign: 'right',
labelWidth: 180,
//height: PanelH - 30,
items:[{
xtype:'panel',
border: false,
frame: false,
html: '<table width="100%" border=0 class="setEd_infoPanel" id="LIBAV_LOGO"><tr><td width="200px"><div class="libav_logo_img"></div></td><td valign="middle">Encoder Settings</td></tr><tr><td colspan=2>INFO</td></tr></table><br/>'
},{
xtype: 'spacer',
height: 10
},{
xtype: 'combo',
id: 'menc_cont',
fieldLabel: '{$Labels->GetLabel('_ENC_CONTAINER_')}',
editable: false,
typeAhead: true,
triggerAction: 'all',
width: '100%',
lazyRender:true,
mode: 'local',
store: new Ext.data.ArrayStore({
fields: ['cid', 'cnam'],
data: [['mp4',"MP4"], ['avi',"AVI"], ['mov',"MOV"]]
}),
valueField: 'cid',
displayField: 'cnam',
listeners:{
focus: function( t ){
loadHelpTopic( 'encoder_op_small', 312 );
},
select: function( t, r, i ){
//alert('buba');
//doApplicationOperation( 1, i );
}
},
value: 'mp4'//'{$CS['menc_container']}'
},{
xtype: 'spacer',
height: 10
},{
xtype: 'combo',
id: 'menc_cdc',
fieldLabel: '{$Labels->GetLabel('_ENC_CODEC_')}',
editable: false,
typeAhead: true,
triggerAction: 'all',
width: '100%',
lazyRender:true,
mode: 'local',
store: new Ext.data.ArrayStore({
fields: ['cid', 'cnam'],
data: [[0,"H264"], [1,"H265"]]
}),
valueField: 'cid',
displayField: 'cnam',
listeners:{
select: function( t, r, i ){
doApplicationOperation( 1, i );
}
},
value: '0'//'{$CS['menc_thread_mode']}'
},{
xtype: 'spacer',
height: 10
},{
xtype: 'combo',
id: 'menc_thm',
fieldLabel: '{$Labels->GetLabel('_ENC_THREAD_M_')}',
editable: false,
typeAhead: true,
triggerAction: 'all',
width: '100%',
lazyRender:true,
mode: 'local',
store: new Ext.data.ArrayStore({
fields: ['sid', 'snam'],
data: [[1,"{$Labels->GetLabel('__DISABLED__')}"], [2,"{$Labels->GetLabel('_ENC_TH_PERF_')}"], [3,"{$Labels->GetLabel('_ENC_TH_PERS_')}"]]
}),
valueField: 'sid',
displayField: 'snam',
listeners:{
select: function( t, r, i ){
doApplicationOperation( 1, i );
}
},
value: 2//'{$CS['menc_thread_mode']}'
},{
xtype: 'spacer',
height: 10
},{
xtype: 'combo',
id: 'menc_preset',
fieldLabel: '{$Labels->GetLabel('_ENC_PRESET_')}',
editable: false,
typeAhead: true,
triggerAction: 'all',
width: '100%',
lazyRender:true,
mode: 'local',
store: new Ext.data.ArrayStore({
fields: ['sid', 'snam'],
data: [[0,"placebo"],[1,"ultrafast"], [2,"superfast"], [3,"veryfast"], [4,"faster"], [5,"fast"], [6,"medium"], [7,"slow"], [8,"slower"], [9,"veryslow"]]
}),
valueField: 'sid',
displayField: 'snam',
listeners:{
focus: function( t ){
loadHelpTopic( 'encoder_op_small', 122 );
},
select: function( t, r, i ){
//alert('buba');
//doApplicationOperation( 1, i );
}
},
value: 4//'{$CS['menc_thread_mode']}'
},{
xtype: 'spacer',
height: 10
},{
xtype: 'combo',
id: 'menc_tune',
fieldLabel: '{$Labels->GetLabel('_ENC_TUNE_')}',
editable: false,
typeAhead: true,
triggerAction: 'all',
width: '100%',
lazyRender:true,
mode: 'local',
store: new Ext.data.ArrayStore({
fields: ['sid', 'snam'],
data: [[0,"not set"],[1,"film"], [2,"animation"], [3,"grain"], [4,"stillimage"], [5,"fastdecode"], [6,"zerolatency"],[7,"psnr"], [8,"ssim"]]
}),
valueField: 'sid',
displayField: 'snam',
listeners:{
focus: function( t ){
loadHelpTopic( 'encoder_op_small', 122 );
},
select: function( t, r, i ){
//alert('buba');
//doApplicationOperation( 1, i );
}
},
value: 4//'{$CS['menc_thread_mode']}'
},{
xtype: 'spacer',
height: 10
},{
xtype: 'combo',
id: 'menc_profile',
fieldLabel: '{$Labels->GetLabel('_ENC_PROFILE_')}',
editable: false,
typeAhead: true,
triggerAction: 'all',
width: '100%',
lazyRender:true,
mode: 'local',
store: new Ext.data.ArrayStore({
fields: ['sid', 'snam'],
data: [[0,"baseline"], [1,"main"], [2,"high"], [3,"high10"], [4,"high422"], [5,"high444"]]
}),
valueField: 'sid',
displayField: 'snam',
listeners:{
focus: function( t ){
loadHelpTopic( 'encoder_op_small', 122 );
},
select: function( t, r, i ){
//alert('buba');
//doApplicationOperation( 1, i );
}
},
value: 4//'{$CS['menc_thread_mode']}'
},{
xtype: 'spacer',
height: 10
},{
xtype: 'combo',
id: 'menc_bitrate',
fieldLabel: '{$Labels->GetLabel('_ENC_BITRATE_')}',
editable: false,
typeAhead: true,
triggerAction: 'all',
width: '100%',
lazyRender:true,
mode: 'local',
store: new Ext.data.ArrayStore({
fields: ['sid', 'snam'],
data: [[1,"1500K"], [2,"2000K"], [3,"3000K"], [4,"4000K"], [5,"5000K"], [6,"6000K"]]
}),
valueField: 'sid',
displayField: 'snam',
listeners:{
focus: function( t ){
loadHelpTopic( 'encoder_op_small', 122 );
},
select: function( t, r, i ){
//alert('buba');
//doApplicationOperation( 1, i );
}
},
value: 4//'{$CS['menc_thread_mode']}'
},{
xtype: 'spacer',
height: 10
},{
xtype: 'slider',
id: 'menc_crm',
fieldLabel: '{$Labels->GetLabel('_ENC_QUAL_')}',
//triggerAction: 'all',
width: '70%',
listeners:{
click: function( t ){
alert('JUJACLIK');
},
focus: function( t ){
alert('JUJA');
},
change: function( t, r, i ){
//alert('buba');
//doApplicationOperation( 1, i );
}
},
value: 20//'{$CS['menc_thread_mode']}'
}]
}]
}
DATABOUNDARY;
$Data['status'] = 'ok';
$Data['content'] = $SKEL;
} else {
$Data['msg']='Access Denied!';
};
echo json_encode( $Data );
} else {
header('location: /');
};
?>

52
lib/controller/getMediaStatus.php

@ -0,0 +1,52 @@
<?php
require_once('../ajax_asm.php');
if( $CUser->Data['id'] > 1 ){
$Data['status'] = 'error';
if( $CUser->Data['access'] > 5 ){
if( $MID = intval( $_POST['MID'] ) ){
$SKEL=<<<DATABOUNDARY
{
xtype: 'panel',
border: false,
frame: false,
items:[{
xtype:'panel',
border: false,
frame: false,
html: '<table width="100%" border=0 class="setEd_infoPanel" id="LIBAV_LOGO"><tr><td align="center"><svg class="donut" width="200" height="100%" viewBox="0 0 42 42"><circle id="status_34_donut0_segment2" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#b1c94e" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><circle id="status_34_donut0_segment3" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#aaddff" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><circle id="status_34_donut0_segment1" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#ce4b99" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><g class="chart-text"><text x="50%" y="50%" class="chart-number" id="status_34_totalValue0">0</text><text x="50%" y="50%" class="chart-label">PROCESS</text></g></svg></td><td valign="middle">Media Status</td></tr><tr><td colspan=2>INFO</td></tr></table><br/>'
},{ xtype:'spacer', height: 10
},{
html:'<video id="my-video" class="video-js" controls preload="auto" width="100%" data-setup="{}" poster="/style/assets/no-signal_d.png" sdsdarc="/lib/controller/data/8a171d17-978c-eda4-03f1-c1c4123a07a7.mp4"></video>'
}],
listeners:{
afterrender: function( t ){
UpdateMediaItemStatus();
}
}
}
DATABOUNDARY;
$QS = "SELECT * FROM `media_queue` WHERE `id`={$MID}";
$Result = $DATABASE->Query( $QS );
if( count( $Result ) ){
$CM = $Result[0];
$Data['status']= 'ok';
$Data['content']=$SKEL;
} else {
$Data['msg']="No Media Item[{$MID}] Found!";
};
} else {
$Data['msg']='Wrong Parameter!';
};
} else {
$Data['msg']='Access Denied!';
};
echo json_encode( $Data );
} else {
header('location: /');
};
?>

184
lib/controller/getModuleEditor.php

@ -0,0 +1,184 @@
<?php
require_once('../ajax_asm.php');
require_once('../php/argus/server.php');
if( $CUser->Data['id'] > 1 ){
$MID = intval( $_POST['MID'] );
$QS = "SELECT * FROM `metro_modules` WHERE `id`={$MID}";
$Result = $DATABASE->Query( $QS, false );
if( count( $Result ) ){
$CR = $Result[0];
$TTPL=<<<DATA_BOUNDARY
{
xtype: 'panel',
border: false,
frame: false,
tbar:[{
id: 'btn_del_module',
text: '{$Labels->GetLabel('_SMM_DEL_MODULE_')}',
handler: function(){
Ext.Msg.show({
title:'{$Labels->GetLabel('_REMOVE_MODULE_')}?',
msg: '{$Labels->GetLabel('_REMOVE_MODU_QUES_')}?',
buttons: Ext.Msg.YESNOCANCEL,
fn: function(btn){
if( btn == 'yes' ){
SelectedModule = 0;
doModuleOperation( {$CR['id']}, 200, '', true );
};
},
animEl: 'elId',
icon: Ext.MessageBox.QUESTION
});
}
}],
items:[%%%ITEMS%%%]
}
DATA_BOUNDARY;
$ITEMS = array();
$INFO = '<table width="100%" border=0 style="font-weight: bold;"><tr><td width="130px" align="right">'.$Labels->GetLabel('_STATUS_').':</td><td>'.((0)?'Online':'Offline').'</td></tr><tr><td align="right">'.$Labels->GetLabel('_VERSION_').':</td><td>'.(($CR['tls_version']!='')?$CR['tls_version']:'No Version Info').'</td></tr></table>';
$ITEMS[0]="{ xtype:'panel', border: false, frame: false, html: '<span class=\"setEd_infoPanel\" id=\"SENSOR_".(($CR['status']=='E')?'A':'N')."\"><table width=\"100%\" border=0><tr><td align=\"center\" valign=\"middle\"><div class=\"module_img_sset\"></div></td></tr><tr><td>{$INFO}</td></tr></table></span><br/>'}";
$ITEMS[1] =<<<DATA_BOUNDARY
{
xtype: 'tabpanel',
activeTab: 0,
items:[{
title: 'General',
items:[{
xtype: 'button',
text: '{$Labels->GetLabel('_OP_MODULE_CTRL_')}',
width: '100%',
iconCls: 'srv_op_modctrl',
scale: 'large',
handler: moduleControl
},{
xtype: 'button',
text: '{$Labels->GetLabel('_OP_CAMERA_CTRL_')}',
width: '100%',
iconCls: 'srv_op_camctrl',
scale: 'large',
handler: moduleCamControl
},{
xtype: 'button',
text: 'Open Host Control',
width: '100%',
iconCls: 'srv_op_hostctrl',
scale: 'large',
handler: moduleHostControl
}]
},{
title: 'Connection Settings',
xtype: 'form',
labelWidth: 200,
border: false,
frame: false,
labelAlign: 'right',
items:[{
xtype: 'combo',
fieldLabel: "{$Labels->GetLabel( '_STATUS_' )}",
id: 'mod_stst',
width: 200,
lazyRender: true,
mode: 'local',
forceSelection: true,
triggerAction: 'all',
editable: false,
disableKeyFilter: true,
store: new Ext.data.ArrayStore({
fields: ['val','disp'],
data: [['E','Enabled'], ['D','Disabled']]
}),
valueField: 'val',
displayField: 'disp',
value: '{$CR['status']}',
listeners:{
select: function( t, r, i ){
doModuleOperation( {$CR['id']}, 14, r.data.val, true );
}
}
},{
xtype: 'textfield',
fieldLabel: 'IP Address',
value: '{$CR['IP4']}',
listeners:{
change: function( a, c, b ){
doModuleOperation( {$CR['id']}, 4, c, true );
}
}
},{
xtype: 'textfield',
fieldLabel: 'Identity',
value: '{$CR['identity']}',
listeners:{
change: function( a, c, b ){
doModuleOperation( {$CR['id']}, 5, c, false );
}
}
},{
xtype: 'textfield',
fieldLabel: 'Module Login',
value: '{$CR['m_login']}',
listeners:{
change: function( a, c, b ){
doModuleOperation( {$CR['id']}, 6, c, false );
}
}
},{
xtype: 'textfield',
fieldLabel: 'Module Password',
value: '{$CR['m_password']}',
listeners:{
change: function( a, c, b ){
doModuleOperation( {$CR['id']}, 7, c, false );
}
}
},{
xtype: 'textfield',
fieldLabel: 'Host Login',
value: '{$CR['h_login']}',
listeners:{
change: function( a, c, b ){
doModuleOperation( {$CR['id']}, 10, c, false );
}
}
},{
xtype: 'textfield',
fieldLabel: 'Host Password',
value: '{$CR['h_password']}',
listeners:{
change: function( a, c, b ){
doModuleOperation( {$CR['id']}, 11, c, false );
}
}
},{
xtype: 'textfield',
fieldLabel: 'Camera Login',
value: '{$CR['c_login']}',
listeners:{
change: function( a, c, b ){
doModuleOperation( {$CR['id']}, 12, c, false );
}
}
},{
xtype: 'textfield',
fieldLabel: 'Camera Password',
value: '{$CR['c_password']}',
listeners:{
change: function( a, c, b ){
doModuleOperation( {$CR['id']}, 13, c, false );
}
}
}]
}]
}
DATA_BOUNDARY;
$CONTENT = implode(',',$ITEMS);
$TTPL = str_ireplace( '%%%ITEMS%%%', $CONTENT, $TTPL );
echo $TTPL;
} else {
echo '{ xtype: \'panel\', html: \'Node '.$_POST['NODE'].' Loadded\'}';
};
} else {
header('location: /');
};
?>

90
lib/controller/getModules.php

@ -6,55 +6,59 @@
$ACCESS = intval( $CUser->Data['access'] );
if( $UID > 1 ){
$Data = array();
$EID = intval( $_POST['OID'] );
if( isset( $_POST['ABQ'] ) ){
if( strlen( $_POST['ABQ'] ) < 3 ){
$Data['status']='na';
} else {
$EABQ = strtolower( $DATABASE->escape( $_POST['ABQ'] ) );
$QS = "SELECT * FROM `metro_stations` WHERE LOWER(`name`) like '%{$EABQ}%' ORDER BY `name`";
$Result = $DATABASE->Query( $QS, false );
if( count( $Result ) ){
$SenPart = array();
foreach( $Result as $R ){
$SenPart[] = '{ xtype: \'panel\', boder: false, frame: false, html: \'<a class="sideInfo_item" id="UART_O" style="background-color: #'.$R['color'].';" onclick="bindStationToLine('.$R['id'].');">'.urldecode($R['name']).'</a>\'}';
if( isset( $_POST['OID'] ) ) $PID = intval( $_POST['OID'] ); else $PID = 0;
$Data['status']='error';
$Data['b_a_b'] = false;
if( $PID ){
$OP = array();
$QS = "SELECT * FROM `metro_tracks` WHERE `platform_id`={$PID}";
$RR = $DATABASE->Query( $QS );
if( count( $RR ) ){
$MID = array();
foreach( $RR as $CT ){
if( intval($CT['far_module_id']) ){
$CC = array();
$CC['id']=intval($CT['far_module_id']);
$CC['hside']=($CT['side']=='U')?'L':'R';
$CC['vside']=$CT['side'];
$CC['tname']=$CT['name'];
$CC['tshort']=$CT['short'];
$MID[] = $CC;
};
if( intval($CT['near_module_id']) ){
$CC = array();
$CC['id']=intval($CT['near_module_id']);
$CC['hside']=($CT['side']=='U')?'R':'L';;
$CC['vside']=$CT['side'];
$CC['tname']=$CT['name'];
$CC['tshort']=$CT['short'];
$MID[] = $CC;
};
$Data['status']='ok';
$Data['stations'] = '['.implode( ',', $SenPart ) .']';
} else {
$Data['status']='na';
};
};
} else {
$QS = "SELECT * FROM `metro_tracks` WHERE `platform_id`={$EID}";
$TRACD = $DATABASE->Query( $QS, false );
$PINFO = getPlatformInfo( $EID );
$ModPart = array();
if( count( $TRACD ) ){
if( $NMID = intval( $TRACD[0]['near_module_id'] ) ){
$QS = "SELECT * FROM `module_nodes` WHERE `id`={$NMID}";
$MD = $DATABASE->Query( $QS, false );
$OS = getModleOnlineStatus( $NMID );
$ModPart[] = '{ xtype: \'panel\', boder: false, frame: false, html: \'<a class="sideInfo_item" id="UART_O" onclick="editModule('.$NMID.');">'.urldecode($R['name']).'</a>\'}';
} else {
};
if( $FMID = intval( $TRACD[0]['far_module_id'] ) ){
$QS = "SELECT * FROM `module_nodes` WHERE `id`={$FMID}";
$MD = $DATABASE->Query( $QS, false );
$OS = getModleOnlineStatus( $FMID );
$CCC = count( $MID );
$PLO = getPlatformLineInfo( $PID );
$NAME = getStationName( $PLO[0]['station_id'] ).'<br/>'.getPlatformName( $PID );
$INFO = '<table width="100%" border=0><tr><td width="130px" align="right">'.$Labels->GetLabel('_MODULES_').':</td><td>'.$CCC.'</td></tr></table>';
if( count( $PLO ) ){
$LINES='<table><tr>';
foreach( $PLO as $Z ) $LINES.="<td><div style=\"border-radius:16px;width:32px;height:32px;background-color:#{$Z['color']};color:#fff;font-size:16px;padding-left:10px;padding-top:6px;\">{$Z['short']}</div></td>";
$LINES.='</tr></table>';
} else {
$LINES=$Labels->GetLabel('_NOBI_LINE_');
};
if( count( $TRACD ) > 1 ){
$OP[] = "{ xtype:'panel', border: false, frame: false, html: '<table border=0 class=\"setEd_infoPanel\" id=\"SENSOR_N\"><tr><td valign=\"middle\" align=\"left\" style=\"padding-left:30px;font-size: 22px; font-weight: bold;\">{$NAME}</td></tr><tr><td>{$INFO}</td></tr><tr><td>{$LINES}</td></tr></table><br/>'}";
if( $CCC ){
if( $CCC > 3 ) $Data['b_a_b'] = true;
foreach( $MID as $CM ){
$QS = "SELECT * FROM `metro_modules` WHERE `id`={$CM['id']}";
$ZZ = $DATABASE->Query( $QS );
$MM = $ZZ[0];
$OP[] = '{ xtype: \'panel\', border: false, frame: false, html: \'<table width="100%" border=0><tr><td><span class="sideInfo_item '.(($MM['status']=='D')?'active_gray':'active_green').'" id="MODULE_TAG_'.$CM['id'].'" onclick="editModule('.$CM['id'].');"><table width="100%" border=0><tr><td width="32px"><div class="level_label">'.$CM['tshort'].'</div></td><td width="32px"><img width="16px" title="'.$Labels->GetLabel('MOD_LOC_'.$CM['vside'].$CM['hside']).'" src="/style/assets/ms_'.strtolower($CM['vside'].$CM['hside']).'.png"></td><td width="50%">'.urldecode($MM['name']).'</td><td>'.$MM['IP4'].'</td></tr></table></span></td></tr></table>\'}';
};
};
} else {
$Data['status']='ok';
$Data['ut_tag'] = $STATAG;
$Data['bt_tag'] = $STATAG;
$Data['tracks'] = '[]';
};
$Data['status']='ok';
$Data['modules'] = '[' . implode( ',', $OP ) . ']';
};
$Data['messages'] = ob_get_clean();
echo json_encode( $Data );

25
lib/controller/getMonitoringMapStatus.php

@ -0,0 +1,25 @@
<?php
require_once('../ajax_asm.php');
ob_start();
$UID = intval( $CUser->Data['id'] );
$ACCESS = intval( $CUser->Data['access'] );
if( $UID > 1 ){
$QS = "SELECT * FROM `metro_lines` ORDER BY `name`";
$Result = $DATABASE->Query( $QS, false );
if( count( $Result ) ){
$SenPart = array();
foreach( $Result as $R ){
$AA = ($R['status']=='E')?'active_blue':'active_gray';
$SenPart[] = '{ xtype: \'panel\', boder: false, frame: false, html: \'<a class="sideInfo_item '.$AA.'" id="LINE_TAG_'.$R['id'].'" onclick="editLine('.$R['id'].');">'.urldecode($R['name']).'</a>\'}';
};
$Data['status']='ok';
$Data['lines'] = '['.implode( ',', $SenPart ) .']';
} else {
$Data['status']='na';
};
$Data['messages'] = ob_get_clean();
echo json_encode( $Data );
} else {
header('location: /');
};
?>

50
lib/controller/getMonitoringMapView.php

@ -0,0 +1,50 @@
<?php
require_once('../ajax_asm.php');
require_once('../php/argus/server.php');
ob_start();
$UID = intval( $CUser->Data['id'] );
$ACCESS = intval( $CUser->Data['access'] );
if( $UID > 1 ){
$Data['content'] =<<<DATA_BOUNDARY
{
xtype: 'panel',
layout: 'vbox',
border: false,
frame: false,
width: '100%',
tbar:[{
xtype: 'button',
text: 'Map Level',
enableToggle: true,
pressed: true,
allowDepress: false
},'->',{
xtype: 'button',
id: 'aer_button',
text: 'Event Auto Rise',
enableToggle: true,
pressed: autoRiseEvent,
handler: function( t ){
autoRiseEvent = t.pressed;
}
}],
items: [{
xtype: 'panel',
id: 'metro_map',
height: PanelH+16,
listeners:{
afterrender: function(){
initMonitoringMap('metro_map', 2057,1474 );
}
}
}]
}
DATA_BOUNDARY;
$Data['status'] = 'ok';
$Data['messages'] = ob_get_clean();
echo json_encode( $Data );
} else {
header('location: /');
};
?>

94
lib/controller/getMonitoringModuleView.php

@ -0,0 +1,94 @@
<?php
require_once('../ajax_asm.php');
require_once('../php/argus/server.php');
require_once('../php/argus/templates.php');
ob_start();
$UID = intval( $CUser->Data['id'] );
$ACCESS = intval( $CUser->Data['access'] );
$PID = intval( $_POST['PID'] );
$MID = intval( $_POST['MID'] );
if( $UID > 1 && $MID && $PID ){
$QS = "SELECT * FROM `metro_platforms` WHERE `id`={$PID}";
$Result = $DATABASE->Query( $QS, false );
if( count( $Result ) ){
$CR = $Result[0];
$STID = $CR['station_id'];
$QS = "SELECT * FROM `metro_stations` WHERE `id`={$STID}";
$SR = $DATABASE->Query( $QS, false );
if( count( $SR ) ){
$QS = "SELECT * FROM `metro_modules` WHERE `id`={$MID}";
$MR = $DATABASE->Query( $QS, false );
if( count( $MR ) ){
$MD = $MR[0];
$Data['status']='ok';
$QS = "SELECT * FROM `metro_tracks` WHERE `id`={$MD['track_id']}";
$TR = $DATABASE->Query( $QS, false );
$TD = $TR[0];
$CTITLE = $CR['name'] . ' <span class="level_label_title">'.$CR['level'].'</span>';
$MTITLE = $TD['short'] . ':' . $MD['name'];
$MAIN_TPL = str_ireplace( '%%STATION%NAME%%', $SR[0]['name'], $MODULE_VIEW_CTX );
$MAIN_TPL = str_ireplace( '%%STATION%ID%%', $STID, $MAIN_TPL );
$MAIN_TPL = str_ireplace( '%%PLATFORM%NAME%%', $CR['name'], $MAIN_TPL );
$MAIN_TPL = str_ireplace( '%%%PLATFORM%ID%%%', $PID, $MAIN_TPL );
$MAIN_TPL = str_ireplace( '%%PLATFORM%TITLE%%', $CTITLE, $MAIN_TPL );
$MAIN_TPL = str_ireplace( '%%MODULE%NAME%%', $MTITLE, $MAIN_TPL );
$ITEM = str_ireplace( '%%%MODULE%TITLE%%%', 'Module View', $MODULE_CTX );
$ITEM = str_ireplace( '%%%VIDEO%%%', $EXT_VIDEO_CTX, $ITEM );
$ITEM = str_ireplace( '%%%PLATFORM%ID%%%', $PID, $ITEM );
$ITEM = str_ireplace( '%%%HBTN%%%','&nbsp;', $ITEM );
$ITEM = str_ireplace( '%%%TITLE%%%', 'Camera View', $ITEM );
$ITEM = str_ireplace( '%%%WIDTH%%%', '16', $ITEM );
$ITEM = str_ireplace( '%%%HEIGHT%%%', '9', $ITEM );
$ITEM = str_ireplace( '%%MID%%', $MID , $ITEM );
if( $MD['cam_stream'] != 0 ){
$URL = "http://{$MD['IP4']}/video_feed/stream?id={$MD['cam_stream']}";
//$URL = "http://{$MD['IP4']}/video_feed/preview?id={$MD['cam_stream']}";
} else {
$URL = '/style/assets/16-9-nocam.png';
};
$ITEM = str_ireplace( '%%%SELURL%%%', $URL , $ITEM );
$HMID = 0;
$VMID = 0;
$QS="SELECT `id` FROM `metro_modules` WHERE `track_id`={$TD['id']} AND NOT `side`='{$MD['side']}'";
$TRT=$DATABASE->Query( $QS, false );
if( count( $TRT ) ) $HMID = $TRT[0]['id'];
$QS="SELECT `mo`.`id` FROM `metro_modules` `mo` LEFT JOIN `metro_tracks` `mt` ON ( `mo`.`track_id`=`mt`.`id` ) WHERE `mt`.`platform_id`={$TD['platform_id']} AND NOT `mt`.`id`={$TD['id']} AND NOT `mo`.`side`='{$MD['side']}'";
$TRT=$DATABASE->Query( $QS, false );
if( count( $TRT ) ) $VMID = $TRT[0]['id'];
if( $TD['side']=='U' && $MD['side']=='F' ){
$CORNER_ID = 0;
$ITEM_X="<table border=0 width=\"100%\" id=\"mod_table_{$MID}\"><tr><td>".createModuleBackground( $CR['layout'], $CORNER_ID, $MTITLE )."</td><td width=\"20px\" class=\"mon_module_btn\" onclick=\"loadModuleView({$TD['platform_id']},{$HMID});\"><img src=\"/style/wicons/060.png\"></td></tr><tr><td colspan=2 class=\"mon_module_btn\" onclick=\"loadModuleView({$TD['platform_id']},{$VMID});\"><img src=\"/style/wicons/062.png\"></td></tr></table>";
} elseif( $TD['side']=='U' && $MD['side']=='N' ){
$CORNER_ID = 1;
$ITEM_X="<table border=0 width=\"100%\" id=\"mod_table_{$MID}\"><tr><td width=\"20px\" class=\"mon_module_btn\" onclick=\"loadModuleView({$TD['platform_id']},{$HMID});\"><img src=\"/style/wicons/059.png\"></td><td>".createModuleBackground( $CR['layout'], $CORNER_ID, $MTITLE )."</td></tr><tr><td colspan=2 class=\"mon_module_btn\" onclick=\"loadModuleView({$TD['platform_id']},{$VMID});\"><img src=\"/style/wicons/062.png\"></td></tr></table>";
} elseif( $TD['side']=='B' && $MD['side']=='F' ){
$CORNER_ID = 2;
$ITEM_X="<table border=0 width=\"100%\" id=\"mod_table_{$MID}\"><tr><td colspan=2 class=\"mon_module_btn\" onclick=\"loadModuleView({$TD['platform_id']},{$VMID});\"><img src=\"/style/wicons/061.png\"></td></tr><tr><td width=\"20px\" class=\"mon_module_btn\" onclick=\"loadModuleView({$TD['platform_id']},{$HMID});\"><img src=\"/style/wicons/059.png\"></td><td>".createModuleBackground( $CR['layout'], $CORNER_ID, $MTITLE )."</td></tr></table>";
} else {
$CORNER_ID = 3;
$ITEM_X="<table border=0 width=\"100%\" id=\"mod_table_{$MID}\"><tr><td colspan=2 class=\"mon_module_btn\" onclick=\"loadModuleView({$TD['platform_id']},{$VMID});\"><img src=\"/style/wicons/061.png\"></td></tr><tr><td>".createModuleBackground( $CR['layout'], $CORNER_ID, $MTITLE )."</td><td width=\"20px\" class=\"mon_module_btn\" onclick=\"loadModuleView({$TD['platform_id']},{$HMID});\"><img src=\"/style/wicons/060.png\"></td></tr></table>";
};
$PLAT_PARTS[] = str_ireplace( '%%%MODULE%MAP%%%', $ITEM_X, $ITEM );
$TOP = str_ireplace('%%%PANELS%%%', implode( ",{ xtype:'spacer', height: 10 },",$PLAT_PARTS ), $MAIN_TPL );
$Data['pid'] = $PID;
$Data['mid'] = $MID;
$Data['content']= $TOP;
} else {
$Data['status']='na';
};
} else {
$Data['status']='na';
};
};
$Data['messages'] = ob_get_clean();
echo json_encode( $Data );
} else {
header('location: /');
};
?>

201
lib/controller/getMonitoringPlatformView.php

@ -0,0 +1,201 @@
<?php
require_once('../ajax_asm.php');
require_once('../php/argus/server.php');
require_once('../php/argus/templates.php');
ob_start();
$UID = intval( $CUser->Data['id'] );
$ACCESS = intval( $CUser->Data['access'] );
if( $UID > 1 ){
$PID = intval( $_POST['PID'] );
$QS = "SELECT * FROM `metro_platforms` WHERE `id`={$PID}";
$Result = $DATABASE->Query( $QS, false );
if( count( $Result ) ){
$STID = $Result[0]['station_id'];
$QS = "SELECT * FROM `metro_stations` WHERE `id`={$STID}";
$SR = $DATABASE->Query( $QS, false );
if( count( $SR ) ){
$Data['status']='ok';
$CR = $Result[0];
$PLAT_IDS = array();
$MODU_IDS = array();
$PLAT_PARTS = array();
$MAIN_TPL = str_ireplace( '%%STATION%NAME%%', $SR[0]['name'], $PLATFORM_VIEW_CTX );
$MAIN_TPL = str_ireplace( '%%STATION%ID%%', $STID, $MAIN_TPL );
$MAIN_TPL = str_ireplace( '%%PLATFORM%NAME%%', $Result[0]['name'], $MAIN_TPL );
$CTITLE = $CR['name'] . ' <span class="level_label_title">'.$CR['level'].'</span>';
$PLO = getPlatformLineInfo( $PID );
if( count( $PLO ) ){
$LINES='<table><tr>';
foreach( $PLO as $Z ) $LINES.="<td><div style=\"border-radius:16px;width:32px;height:32px;background-color:#{$Z['color']};color:#fff;font-size:16px;padding-left:10px;padding-top:6px;\">{$Z['short']}</div></td>";
$LINES.='</tr></table>';
} else {
$LINES=$Labels->GetLabel('_NOBI_LINE_');
};
//$PLAT_PARTS[] = '{ xtype:\'spacer\', height: 10 }';
$PLAT_PARTS[] = createTopLabel( $SR[0]['name'], $Result[0]['name'], $LINES );
//foreach( $Result as $CR )
{
$CID = intval( $CR['id'] );
$ITEMS = array();
$PLAT_IDS[] = $CID;
$PINFO = getPlatformInfo( $CID );
$QS = "SELECT * FROM `metro_tracks` WHERE `platform_id`={$CID} ORDER BY `side` ASC";
$TI = $DATABASE->Query( $QS, false );
$TCO = count( $TI );
if( $TCO ){
$COS = count( $PINFO['PREV'] );
if( $COS ) $COS = "rowspan={$COS} "; else $COS="";
$TRU = "<td width=\"120px\" {$COS} onclick=\"loadTrackView({$TI[0]['id']})\" class=\"_infoPanel active_overlay_orange_bl\" style=\"color:#fff; font-weight: bold; text-align: center;\">{$TI[0]['short']}</td>";
if( count( $TI ) > 1 ){
$COS = count( $PINFO['NEXT'] );
if( $COS ) $COS = "rowspan={$COS} "; else $COS="";
$TRB = "<td width=\"120px\" {$COS} onclick=\"loadTrackView({$TI[1]['id']})\" class=\"_infoPanel active_overlay_orange_bl\" style=\"color:#fff; font-weight: bold; text-align: center;\">{$TI[1]['short']}</td>";
};
} else {
$COS = count( $PINFO['PREV'] );
if( $COS ) $COS = "rowspan={$COS} "; else $COS="";
$TRU = "<td width=\"120px\" {$COS} class=\"_infoPanel\" style=\"color:#fff; font-weight: bold; background-color:#000; text-align: center;\">&nbsp;</td>";
$COS = count( $PINFO['NEXT'] );
if( $COS ) $COS = "rowspan={$COS} "; else $COS="";
$TRB = "<td width=\"120px\" {$COS} class=\"_infoPanel\" style=\"color:#fff; font-weight: bold; background-color:#000; text-align: center;\">&nbsp;</td>";
};
$TOP ="<td><table width=\"100%\" border=0><tr><td><table border=0 width=\"100%\" style=\"border-collapse: collapse; border-spacing: 5px 5px;\">";
if( $PINFO['PREV_IS_MULTI'] ){
foreach( $PINFO['PREV'] as $P ){
//{$P['bg_style']}
$TOP .= "<tr><td><table border=0 width=\"100%\" class=\"_infoPanel active_overlay_orange\" style=\"color:#fff; font-weight: bold;\"><tr><td class=\"ar_to_left\">&nbsp;</td><td align=\"left\"><span class=\"inline_link\" onclick=\"loadStationView({$P['id']});\">{$P['name']}</span></td></tr></table></td></tr>";
}
} else {
if( count( $PINFO['PREV'] )){
//{$PINFO['PREV'][0]['bg_style']}
$TOP .= "<tr><td><table border=0 width=\"100%\" class=\"_infoPanel active_overlay_orange\" style=\"color:#fff; font-weight: bold;\"><tr><td class=\"ar_to_left\">&nbsp;</td><td align=\"left\"><span class=\"inline_link\" onclick=\"loadStationView({$PINFO['PREV'][0]['id']});\">{$PINFO['PREV'][0]['name']}</span></td></tr></table></td></tr>";
} else {
//background-color:#000;
$TOP .="<tr><td><table border=0 width=\"100%\" class=\"_infoPanel active_overlay_orange\" style=\"color:#fff; font-weight: bold;\"><tr><td class=\"ar_to_left\">&nbsp;</td><td align=\"left\">{$Labels->GetLabel('_SMM_NO_NESTA_')}</td></tr></table></td></tr>";
};
};
$TOP .="</table></td>{$TRU}</tr></table></td>";
$BOTTOM ="<td><table width=\"100%\" border=0><tr>{$TRB}<td><table border=0 width=\"100%\" style=\"border-collapse: collapse; border-spacing: 5px 5px;\">";
if( $PINFO['NEXT_IS_MULTI'] ){
foreach( $PINFO['NEXT'] as $P ){
//{$P['bg_style']}
$BOTTOM .= "<tr><td><table border=0 width=\"100%\" class=\"_infoPanel active_overlay_orange\" style=\"color:#fff; font-weight: bold;\"><tr><td align=\"right\"><span class=\"inline_link\" onclick=\"loadStationView({$P['id']});\">{$P['name']}</span></td><td class=\"ar_to_right\">&nbsp;</td></tr></table></td></tr>";
}
} else {
if( count( $PINFO['NEXT'] )){
//{$PINFO['NEXT'][0]['bg_style']}
$BOTTOM .= "<tr><td><table border=0 width=\"100%\" class=\"_infoPanel active_overlay_orange\" style=\"color:#fff; font-weight: bold;\"><tr><td align=\"right\"><span class=\"inline_link\" onclick=\"loadStationView({$PINFO['NEXT'][0]['id']});\">{$PINFO['NEXT'][0]['name']}</span></td><td class=\"ar_to_right\">&nbsp;</td></tr></table></td></tr>";
} else {
// background-color:#000;
$BOTTOM .= "<tr><td><table border=0 width=\"100%\" class=\"_infoPanel active_overlay_orange\" style=\"color:#fff; font-weight: bold;\"><tr><td align=\"right\">{$Labels->GetLabel('_SMM_NO_NESTA_')}</td><td class=\"ar_to_right\">&nbsp;</td></tr></table></td></tr>";
};
};
$BOTTOM .="</table></td></tr></table></td>";
$ITEM = str_ireplace( '%%%PLATFORM%TITLE%%%', $CTITLE , $PLATFORM_PLATFORM_CTX );
$ITEM = str_ireplace( '%%%PLATFORM%ID%%%', $CID , $ITEM );
$QS = "SELECT * FROM `metro_tracks` WHERE `platform_id`={$CID}";
$TRES = $DATABASE->Query( $QS );
if( count( $TRES ) ){
$vcount = 1;
foreach( $TRES as $CTRK ){
if( $CTRK['side'] == 'U' ){
$QS = "SELECT * FROM `metro_modules` WHERE `track_id`={$CTRK['id']} ORDER BY `side`";
$MRES = $DATABASE->Query( $QS );
foreach( $MRES as $MM ){
$TTL = "{$CTRK['short']}:{$MM['name']}";
$MDT = array();
$MDT['id'] = $MM['id'];
$MDT['name'] = $TTL;
$MDT['status'] = 0;
if( $MM['side']=='F'){
$MDD[0] = $MDT;
} else {
$MDD[1] = $MDT;
};
//if( $MM['cam_stream'] != 0 ){
// $URL = "http://{$MM['IP4']}/video_feed/stream?id={$MM['cam_stream']}";
//} else {
$URL = '/style/assets/no-signal_h.png';
//};
$CVTPL = str_ireplace( '%%%PLATFORM%ID%%%', $CID, $SIMPLE_VIDEO_CTX );
$CVTPL = str_ireplace( '%%MID%%', $MM['id'], $CVTPL );
$CVTPL = str_ireplace( '%%TRACK%ID%%',$CTRK['id'], $CVTPL );
$CVTPL = str_ireplace( '%%%%TITLE%%%', $TTL, $CVTPL );
$CVTPL = str_ireplace( '%%%STATUS%CLASS%%', 'aaBB', $CVTPL );
$CVTPL = str_ireplace( '%%%IMG%URL%%%', $URL, $CVTPL );
$CVTPL = str_ireplace( '%%%STATUS%%%', 'Status', $CVTPL );
$ITEM = str_ireplace( '%%%VIDEO'.$vcount.'%%%', $CVTPL, $ITEM );
$MODU_IDS[] = $MM['id'];
$vcount++;
};
} else {
$QS = "SELECT * FROM `metro_modules` WHERE `track_id`={$CTRK['id']} ORDER BY `side` DESC ";
$MRES = $DATABASE->Query( $QS );
foreach( $MRES as $MM ){
$TTL = "{$CTRK['short']}:{$MM['name']}";
$MDT = array();
$MDT['id'] = $MM['id'];
$MDT['name'] = $TTL;
$MDT['status'] = 0;
if( $MM['side']=='F'){
$MDD[3] = $MDT;
} else {
$MDD[2] = $MDT;
};
//if( $MM['cam_stream'] != 0 ){
//$URL = "http://{$MM['IP4']}/video_feed/stream?id={$MM['cam_stream']}";
// $URL = "http://{$MM['IP4']}/video_feed/preview?id={$MM['cam_stream']}";
//} else {
$URL = '/style/assets/no-signal_h.png';
//};
$CVTPL = str_ireplace( '%%%PLATFORM%ID%%%', $CID, $SIMPLE_VIDEO_CTX );
$CVTPL = str_ireplace( '%%MID%%', $MM['id'], $CVTPL );
$CVTPL = str_ireplace( '%%TRACK%ID%%', $CTRK['id'], $CVTPL );
$CVTPL = str_ireplace( '%%%%TITLE%%%', $TTL, $CVTPL );
$CVTPL = str_ireplace( '%%%STATUS%CLASS%%', 'aaBB', $CVTPL );
$CVTPL = str_ireplace( '%%%IMG%URL%%%', $URL, $CVTPL );
$CVTPL = str_ireplace( '%%%STATUS%%%', 'Status', $CVTPL );
$ITEM = str_ireplace( '%%%VIDEO'.$vcount.'%%%', $CVTPL, $ITEM );
$MODU_IDS[] = $MM['id'];
$vcount++;
};
};
};
if( $vcount < 5 ){
for( ;$vcount < 5; $vcount++ ){
$CVTPL = str_ireplace( '%%%PLATFORM%ID%%%', $CID, $EMPTY_VIDEO_CTX );
$CVTPL = str_ireplace( '%%MID%%', 'A'.$vcount, $CVTPL );
$ITEM = str_ireplace( '%%%VIDEO'.$vcount.'%%%', $CVTPL, $ITEM );
$MODU_IDS[] = $vcount;
};
};
} else {
for( $i = 1; $i < 5; $i++ ){
$CVTPL = str_ireplace( '%%%PLATFORM%ID%%%', $CID, $EMPTY_VIDEO_CTX );
$CVTPL = str_ireplace( '%%MID%%', 'A'.$i, $CVTPL );
$ITEM = str_ireplace( '%%%VIDEO'.$i.'%%%', $CVTPL, $ITEM );
$MODU_IDS[] = $i;
};
};
$SCADA = "<td class=\"mon_scada_passive_panel\"><b>SCADA Status</b><hr/><table width=\"100%\"><tr><td>Module Status:</td><td colspan=4><div class=\"mon_scada_status_tag_na\">Not Assigned</div></td></tr><tr><td>&nbsp</td><td class=\"mon_scada_head\">Track1:ALRM</td><td class=\"mon_scada_head\">Track2:ALRM</td><td class=\"mon_scada_head\">Helth</td><td class=\"mon_scada_head\">AUX</td></tr><tr><td>&nbsp;</td><td></td><td></td><td></td><td></td></tr></table></td>";
$ITEM_X="<table border=0 width=\"100%\" id=\"plat_table_{$CID}\"><tr>{$TOP}</tr><tr><td width=\"100%\">".createPlatformBackground( $CR['layout'], $CID, array()/*$MDD*/ )."</td></tr><tr>{$BOTTOM}</tr><tr>{$SCADA}</tr></table>";
$PLAT_PARTS[] = str_ireplace( '%%%PLATFORM%MAP%%%', $ITEM_X, $ITEM );
};
//$TIPTOP = str_ireplace('%%%PLATFORM_IDS%%%', implode( ',',$PLAT_IDS ), $TIPTOP );
$TOP = str_ireplace('%%%PANELS%%%', implode( ",",$PLAT_PARTS ), $MAIN_TPL );
$Data['pid'] = $PID;
$Data['content']= $TOP;
} else {
$Data['status']='na';
};
};
$Data['messages'] = ob_get_clean();
echo json_encode( $Data );
} else {
header('location: /');
};
?>

199
lib/controller/getMonitoringSessionView.php

@ -0,0 +1,199 @@
<?php
require_once('../ajax_asm.php');
require_once('../php/argus/server.php');
require_once('../php/argus/templates.php');
ob_start();
$UID = intval( $CUser->Data['id'] );
$ACCESS = intval( $CUser->Data['access'] );
if( isset($_POST['SESSION']) ) $SESSION_ID = intval( $_POST['SESSION'] ); else $SESSION_ID = 0;
if( $UID > 1 && $SESSION_ID ){
$QS = "SELECT * FROM `sessions` WHERE `id`={$SESSION_ID}";
$Result = $DATABASE->Query( $QS, false );
if( count( $Result ) ){
$CS = $Result[0];
$CTID = intval( $CS['track_id'] );
$QS = "SELECT * FROM `metro_tracks` WHERE `id`={$CTID}";
$Result = $DATABASE->Query( $QS, false );
$CTR = $Result[0];
$CPID = intval( $CTR['platform_id'] );
$QS = "SELECT * FROM `metro_platforms` WHERE `id`={$CPID}";
$Result = $DATABASE->Query( $QS, false );
$CPL = $Result[0];
$STID = $CPL['station_id'];
$QS = "SELECT * FROM `metro_stations` WHERE `id`={$STID}";
$Result = $DATABASE->Query( $QS, false );
$CST = $Result[0];
$Data['status']='ok';
$CTITLE = $CPL['name'] . ' <span class="level_label_title">'.$CPL['level'].'</span>';
if( $CTR['name']!=''){
$TNAME = $CTR['name'] . ':' . $CTR['short'] ;
} else {
$TNAME = $CTR['short'] ;
};
$MAIN_TPL = str_ireplace( '%%STATION%NAME%%', $CST['name'], $TRACK_VIEW_CTX );
$MAIN_TPL = str_ireplace( '%%STATION%ID%%', $STID, $MAIN_TPL );
$MAIN_TPL = str_ireplace( '%%PLATFORM%NAME%%', $CPL['name'], $MAIN_TPL );
$MAIN_TPL = str_ireplace( '%%PLATFORM%ID%%', $CPID, $MAIN_TPL );
$MAIN_TPL = str_ireplace( '%%PLATFORM%TITLE%%', $CTITLE, $MAIN_TPL );
$MAIN_TPL = str_ireplace( '%%TRACK%NAME%%', $TNAME, $MAIN_TPL );
if( $CTR['side'] == 'U' ){
$LMID = intval( $CTR['far_module_id'] );
$RMID = intval( $CTR['near_module_id'] );
} else {
$RMID = intval( $CTR['far_module_id'] );
$LMID = intval( $CTR['near_module_id'] );
};
if( $LMID ){
$QS = "SELECT * FROM `metro_modules` WHERE `id`={$LMID}";
$DD = $DATABASE->Query( $QS, false );
$MD = $DD[0];
$URL = '/style/assets/no-signal_h.png';
$LVID = str_ireplace( '%%MID%%', $LMID, $VIDEOJS_CTX );
$LVID = str_ireplace( '%%%TITLE%%%', $MD['name'], $LVID );
$LTitle = $MD['name'];
$LVID = str_ireplace( '%%%SELURL%%%', $URL, $LVID );
$LVID = str_ireplace( '%%%HBTN%%%','&nbsp;', $LVID );
} else {
$LVID = str_ireplace( '%%MID%%', '0', $EMPTY_VIDEO_CTX );
$LVID = str_ireplace( '%%PLATFORM%ID%%', $CPID, $LVID );
};
if( $RMID ){
$QS = "SELECT * FROM `metro_modules` WHERE `id`={$RMID}";
$DD = $DATABASE->Query( $QS, false );
$MD = $DD[0];
$URL = '/style/assets/no-signal_h.png';
$RVID = str_ireplace( '%%MID%%', $RMID, $VIDEOJS_CTX );
$RVID = str_ireplace( '%%%TITLE%%%', $MD['name'], $RVID );
$RTitle = $MD['name'];
$RVID = str_ireplace( '%%%SELURL%%%', $URL, $RVID );
$RVID = str_ireplace( '%%%HBTN%%%','&nbsp;', $RVID );
} else {
$RVID = str_ireplace( '%%MID%%', '0', $EMPTY_VIDEO_CTX );
$RVID = str_ireplace( '%%PLATFORM%ID%%', $CPID, $RVID );
};
$PLO = getPlatformLineInfo( $CPID );
if( count( $PLO ) ){
$LINES='<table><tr>';
foreach( $PLO as $Z ) $LINES.="<td><div style=\"border-radius:16px;width:32px;height:32px;background-color:#{$Z['color']};color:#fff;font-size:16px;padding-left:10px;padding-top:6px;\">{$Z['short']}</div></td>";
$LINES.='</tr></table>';
} else {
$LINES=$Labels->GetLabel('_NOBI_LINE_');
};
$NAME = '<table border=0><tr><td colspan=2>'.getStationName( $PLO[0]['station_id'] ).'</td></tr><tr><td><span class="level_label_title_2">B2</span>&nbsp;'.getPlatformName( $CPID ) . '</td><td>'.$LINES.'</td></tr></table>';
//$PLAT_PARTS[] = "{ xtype:'panel', border: false, frame: false, html: '<table border=0 width=\"100%\" class=\"setEd_infoPanel\"><tr><td valign=\"middle\" align=\"left\" style=\"padding-left:30px;font-size: 22px; font-weight: bold;\">{$NAME}</td><td width=\"100%\" class=\"setEd_infoPanel track_short_big\">{$CTR['short']}</td></tr></table>'}";
$PLAT_PARTS[] = createTopLabel(getStationName( $PLO[0]['station_id'] ), getPlatformName( $CPID ), $LINES, $CTR['short'] );
//$PLAT_PARTS[] = "{html:'Track Nfo'}";//str_ireplace( '%%%MODULE%MAP%%%', $ITEM_X, $ITEM );
//$PLAT_PARTS[] = str_ireplace( '%%MID%%', $MID , $VIDEOJS_CTX );
//$PLAT_PARTS[] = str_ireplace( '%%MID%%', '' , $VIDEOJS_CTX );
$MSVG = createTrackBackground( $CPL['layout'], $CTR['side'], $LTitle, $RTitle );
if( $CS['final'] == 'Y' ){
$QS = "SELECT * FROM `session_statuses` WHERE `min_access`<={$ACCESS}";
} else {
$QS = "SELECT * FROM `session_statuses` WHERE `min_access`<={$ACCESS} AND `special`=''";
};
$SR = $DATABASE->Query( $QS );
$TDS = '';
$PPP = 100.0 / count($SR);
foreach( $SR as $S ){
$FUNC = ($S['special']!='')?$S['special']:'setSessionStatus';
if( $CS['status'] >= $S['lvl'] ){
$TDS .= "<td align=\"center\" width=\"{$PPP}%\"><span class=\"sideInfo_item passive_gray\">{$S['label']}</span></td>";
} else {
$TDS .= "<td align=\"center\" width=\"{$PPP}%\"><span class=\"sideInfo_item {$S['class']}\" onclick=\"{$FUNC}({$SESSION_ID},{$S['lvl']});\" >{$S['label']}</span></td>";
};
};
$PLAT_PARTS[] =<<<DATA_BOUNDARY
{
xtype: 'panel',
layout: 'table',
frame: true,
width: '100%',
defaults: {
bodyStyle:'padding:0px'
},
layoutConfig: {
columns: 2
},
items:[{
html: '{$MSVG}',
width: '100%',
colspan: 2
},{$LVID},{$RVID}]
},{
xtype: 'panel',
layout: 'hbox',
frame: true,
items:[{
xtype: 'spacer',
width: 5
},{
xtype: 'button',
id: 'hpl_pl_btn',
text: 'Play',
iconCls: 'plr_op_play',
width: 75,
scale: 'small',
handler: function(){
mSesPlay.play();
}
},{
xtype: 'spacer',
width: 5
},{
xtype: 'button',
text: 'Loop',
iconCls: 'plr_op_loop',
enableToggle: true,
width: 60,
pressed: true,
scale: 'small',
handler: function(){
mSesPlay.toggleLoop();
}
},{
xtype: 'spacer',
width: 10
},{
id: 'hpl_slider',
xtype: 'slider',
//autoWidth: true,
width: 400,
//cls: 'hpl_evt_slider_bg',
minValue: 0,
maxValue: 30000,
listeners:{
change: function( sl, nv, tt ){
mSesPlay.setPosition( nv );
}
}
},{
xtype: 'spacer',
width: 5
},{
html: '<div id="hpl_time_mon"></div>'
}]
},{
id: 'sets_ui',
frame: true,
html: '<table width="100%" border=0><tr>{$TDS}</tr></table>'
}
DATA_BOUNDARY;
//$TOP = str_ireplace('%%%PANELS%%%', implode( ",{ xtype:'spacer', height: 10 },",$PLAT_PARTS ), $MAIN_TPL );
$TOP = str_ireplace('%%%PANELS%%%', implode( ",",$PLAT_PARTS ), $MAIN_TPL );
$Data['pid'] = $PID;
$Data['mid'] = $MID;
$Data['content']= $TOP;
};
$Data['messages'] = ob_get_clean();
echo json_encode( $Data );
} else {
header('location: /');
};
?>

86
lib/controller/getMonitoringStationView.php

@ -0,0 +1,86 @@
<?php
require_once('../ajax_asm.php');
require_once('../php/argus/server.php');
require_once('../php/argus/templates.php');
ob_start();
$UID = intval( $CUser->Data['id'] );
$ACCESS = intval( $CUser->Data['access'] );
if( $UID > 1 ){
$STID = intval( $_POST['STT'] );
$QS = "SELECT * FROM `metro_stations` WHERE `id`={$STID}";
$SR = $DATABASE->Query( $QS, false );
if( count( $SR ) ){
$CR = $SR[0];
$QS = "SELECT count(`id`) cnt FROM `metro_platforms` WHERE `station_id`={$STID}";
$Rt = $DATABASE->Query( $QS, false );
$PCO = $Rt[0]['cnt'];
$NAME =$CR['name'] .'<br/>';
$INFO = '<table width="100%" border=0><tr><td width="130px" align="right">'.$Labels->GetLabel('_LBL_PLATFORMS_').':</td><td>'.$PCO.'</td></tr></table>';
$QS = "SELECT `ln`.`short`,`ln`.`color`,`ln`.`name` FROM `metro_lines` `ln` LEFT JOIN `metro_stations_2_lines` `sl` ON ( `ln`.`id`=`sl`.`line_id` ) WHERE `sl`.`station_id`={$STID} ORDER BY `ln`.`short`";
$Rz = $DATABASE->Query( $QS, false );
if( count( $Rz ) ){
$LINES='<table><tr>';
foreach( $Rz as $Z ) $LINES.="<td><div style=\"border-radius:16px;width:32px;height:32px;background-color:#{$Z['color']};color:#fff;font-size:16px;padding-left:10px;padding-top:6px;\">{$Z['short']}</div></td>";
$LINES.='</tr></table>';
} else {
$LINES=$Labels->GetLabel('_NOBI_LINE_');
};
$STATAG="{ xtype:'panel', border: false, frame: false, html: '<table border=0 class=\"setEd_infoPanel\" id=\"SENSOR_N\"><tr><td valign=\"middle\" align=\"center\" style=\"padding-left:30px;font-size: 22px; font-weight: bold;\">{$NAME}</td></tr><tr><td>{$INFO}</td></tr><tr><td style=\"padding-left:30px;\">{$LINES}</td></tr></table>'}";
$STATAG = createTopLabel( $CR['name'], $Labels->GetLabel('_LBL_PLATFORMS_').':&nbsp;'.$PCO, $LINES );
$Data['status']='ok';
$QS = "SELECT * FROM `metro_platforms` WHERE `station_id`={$STID} AND `status`='E' ORDER BY `index`";
$Result = $DATABASE->Query( $QS, false );
if( count( $Result ) ){
if( count( $Result ) == 1 ){
//Go streight to the platform
$Data['status']='steight';
$Data['next_id']= intval( $Result[0]['id'] );
$Data['messages'] = ob_get_clean();
echo json_encode( $Data );
exit();
};
$MAIN_TPL = str_ireplace( '%%STATION%NAME%%', $CR['name'], $STATION_VIEW_CTX );
$PLAT_IDS = array();
$MODU_IDS = array();
$PLAT_PARTS = array();
$PLAT_PARTS[]=$STATAG;
foreach( $Result as $CR ){
$CTITLE = 'Platform Level: <span class="level_label_title">'.$CR['level'].'</span>';
$PID = intval( $CR['id'] );
$ITEMS = array();
$PLAT_IDS[] = $CID;
$PLO = getPlatformLineInfo( $PID );
if( count( $PLO ) ){
$LINES='<table><tr>';
foreach( $PLO as $Z ) $LINES.="<td><div style=\"border-radius:16px;width:32px;height:32px;background-color:#{$Z['color']};color:#fff;font-size:16px;padding-left:10px;padding-top:6px;\">{$Z['short']}</div></td>";
$LINES.='</tr></table>';
} else {
$LINES=$Labels->GetLabel('_NOBI_LINE_');
};
//$PLAT_PARTS[] = '{ xtype:\'spacer\', height: 10 }';
$PLAT_PARTS[] = createChopLabel( $CR['name'], $CTITLE, $LINES, '','active_green', "loadPlatformView({$PID})" );
};
//$TIPTOP = str_ireplace('%%%PLATFORM_IDS%%%', implode( ',',$PLAT_IDS ), $TIPTOP );
$TOP = str_ireplace('%%%PANELS%%%', implode( ",{ xtype:'spacer', height: 2 },",$PLAT_PARTS ), $MAIN_TPL );
} else {
$MAIN_TPL = str_ireplace( '%%STATION%NAME%%', $SR[0]['name'], $STATION_VIEW_CTX );
// No Platforms
$TOP = str_ireplace('%%%PANELS%%%', $STATAG, $MAIN_TPL );
};
$Data['pids'] = $PLAT_IDS;
$Data['content']= $TOP;
} else {
$Data['status']='na';
}
$Data['messages'] = ob_get_clean();
echo json_encode( $Data );
} else {
header('location: /');
};
?>

148
lib/controller/getMonitoringTrackView.php

@ -0,0 +1,148 @@
<?php
require_once('../ajax_asm.php');
require_once('../php/argus/server.php');
require_once('../php/argus/templates.php');
ob_start();
$UID = intval( $CUser->Data['id'] );
$ACCESS = intval( $CUser->Data['access'] );
if( isset($_POST['SESSION']) ) {
$SESSION_ID = intval( $_POST['SESSION'] );
$QS = "SELECT `status`, `track_id` FROM `sessions` WHERE `id`={$SESSION_ID}";
$Result = $DATABASE->Query( $QS, false );
if( count( $Result ) ){
$CS = $Result[0];
$CTID = intval( $CS['track_id'] );
} else {
$CTID = 0;
};
} else {
$SESSION_ID = 0;
if( isset($_POST['TID']) ) $CTID = intval( $_POST['TID'] ); else $CTID = 0;
};
if( $UID > 1 && $CTID ){
$QS = "SELECT * FROM `metro_tracks` WHERE `id`={$CTID}";
$Result = $DATABASE->Query( $QS, false );
$CTR = $Result[0];
$CPID = intval( $CTR['platform_id'] );
$QS = "SELECT * FROM `metro_platforms` WHERE `id`={$CPID}";
$Result = $DATABASE->Query( $QS, false );
$CPL = $Result[0];
$STID = $CPL['station_id'];
$QS = "SELECT * FROM `metro_stations` WHERE `id`={$STID}";
$Result = $DATABASE->Query( $QS, false );
$CST = $Result[0];
$Data['status']='ok';
$Data['track_id']=$CTID;
$CTITLE = $CPL['name'] . ' <span class="level_label_title">'.$CPL['level'].'</span>';
if( $CTR['name']!=''){
$TNAME = $CTR['name'] . ':' . $CTR['short'] ;
} else {
$TNAME = $CTR['short'] ;
};
$MAIN_TPL = str_ireplace( '%%STATION%NAME%%', $CST['name'], $TRACK_VIEW_CTX );
$MAIN_TPL = str_ireplace( '%%STATION%ID%%', $STID, $MAIN_TPL );
$MAIN_TPL = str_ireplace( '%%PLATFORM%NAME%%', $CPL['name'], $MAIN_TPL );
$MAIN_TPL = str_ireplace( '%%PLATFORM%ID%%', $CPID, $MAIN_TPL );
$MAIN_TPL = str_ireplace( '%%PLATFORM%TITLE%%', $CTITLE, $MAIN_TPL );
$MAIN_TPL = str_ireplace( '%%TRACK%NAME%%', $TNAME, $MAIN_TPL );
if( $CTR['side'] == 'U' ){
$LMID = intval( $CTR['far_module_id'] );
$RMID = intval( $CTR['near_module_id'] );
} else {
$RMID = intval( $CTR['far_module_id'] );
$LMID = intval( $CTR['near_module_id'] );
};
if( $LMID ){
$QS = "SELECT * FROM `metro_modules` WHERE `id`={$LMID}";
$DD = $DATABASE->Query( $QS, false );
$MD = $DD[0];
$URL = '/style/assets/no-signal_h.png';
$LVID = str_ireplace( '%%MID%%', $LMID, $EXT_VIDEO_CTX );
$LVID = str_ireplace( '%%%TITLE%%%', $MD['name'], $LVID );
$LTitle = $MD['name'];
$LVID = str_ireplace( '%%%SELURL%%%', $URL, $LVID );
$LVID = str_ireplace( '%%%HBTN%%%','&nbsp;', $LVID );
} else {
$LVID = str_ireplace( '%%MID%%', '0', $EMPTY_VIDEO_CTX );
$LVID = str_ireplace( '%%PLATFORM%ID%%', $CPID, $LVID );
};
if( $RMID ){
$QS = "SELECT * FROM `metro_modules` WHERE `id`={$RMID}";
$DD = $DATABASE->Query( $QS, false );
$MD = $DD[0];
$URL = '/style/assets/no-signal_h.png';
$RVID = str_ireplace( '%%MID%%', $RMID, $EXT_VIDEO_CTX );
$RVID = str_ireplace( '%%%TITLE%%%', $MD['name'], $RVID );
$RTitle = $MD['name'];
$RVID = str_ireplace( '%%%SELURL%%%', $URL, $RVID );
$RVID = str_ireplace( '%%%HBTN%%%','&nbsp;', $RVID );
} else {
$RVID = str_ireplace( '%%MID%%', '1', $EMPTY_VIDEO_CTX );
$RVID = str_ireplace( '%%PLATFORM%ID%%', $CPID, $RVID );
};
$PLO = getPlatformLineInfo( $CPID );
if( count( $PLO ) ){
$LINES='<table><tr>';
foreach( $PLO as $Z ) $LINES.="<td><div style=\"border-radius:16px;width:32px;height:32px;background-color:#{$Z['color']};color:#fff;font-size:16px;padding-left:10px;padding-top:6px;\">{$Z['short']}</div></td>";
$LINES.='</tr></table>';
} else {
$LINES=$Labels->GetLabel('_NOBI_LINE_');
};
$NAME = '<table border=0><tr><td colspan=2>'.getStationName( $PLO[0]['station_id'] ).'</td></tr><tr><td><span class="level_label_title_2">B2</span>&nbsp;'.getPlatformName( $CPID ) . '</td><td>'.$LINES.'</td></tr></table>';
//$PLAT_PARTS[] = "{ xtype:'panel', border: false, frame: false, html: '<table border=0 width=\"100%\" class=\"setEd_infoPanel\"><tr><td valign=\"middle\" align=\"left\" style=\"padding-left:30px;font-size: 22px; font-weight: bold;\">{$NAME}</td><td width=\"100%\" class=\"setEd_infoPanel track_short_big\">{$CTR['short']}</td></tr></table>'}";
$PLAT_PARTS[] = createTopLabel(getStationName( $PLO[0]['station_id'] ), getPlatformName( $CPID ), $LINES, $CTR['short'] );
//$PLAT_PARTS[] = "{html:'Track Nfo'}";//str_ireplace( '%%%MODULE%MAP%%%', $ITEM_X, $ITEM );
//$PLAT_PARTS[] = str_ireplace( '%%MID%%', $MID , $VIDEOJS_CTX );
//$PLAT_PARTS[] = str_ireplace( '%%MID%%', '' , $VIDEOJS_CTX );
$MSVG = createTrackBackground( $CPL['layout'], $CTR['side'], $LTitle, $RTitle );
if( $SESSION_ID ){
$QS = "SELECT * FROM `session_statuses` WHERE `min_access`<={$ACCESS} AND `special`=''";
$SR = $DATABASE->Query( $QS );
$TDS = '';
$PPP = 100.0 / count($SR);
foreach( $SR as $S ){
$FUNC = ($S['special']!='')?$S['special']:'setSessionStatus';
if( $CS['status'] >= $S['lvl'] ){
$TDS .= "<td align=\"center\" width=\"{$PPP}%\"><span class=\"sideInfo_item passive_gray\">{$S['label']}</span></td>";
} else {
$TDS .= "<td align=\"center\" width=\"{$PPP}%\"><span class=\"sideInfo_item {$S['class']}\" onclick=\"{$FUNC}({$SESSION_ID},{$S['lvl']});\" >{$S['label']}</span></td>";
};
};
};
$PLAT_PARTS[] =<<<DATA_BOUNDARY
{
xtype: 'panel',
layout: 'table',
frame: true,
width: '100%',
defaults: {
bodyStyle:'padding:0px'
},
layoutConfig: {
columns: 2
},
items:[{
html: '{$MSVG}',
width: '100%',
colspan: 2
},{$LVID},{$RVID}]
}
DATA_BOUNDARY;
if( $SESSION_ID ) $PLAT_PARTS[] ="{ id:'sets_ui', frame: true, html: '<table width=\"100%\" border=0><tr>{$TDS}</tr></table>'}";
//$TOP = str_ireplace('%%%PANELS%%%', implode( ",{ xtype:'spacer', height: 10 },",$PLAT_PARTS ), $MAIN_TPL );
$TOP = str_ireplace('%%%PANELS%%%', implode( ",",$PLAT_PARTS ), $MAIN_TPL );
$Data['platform_id'] = $CPID;
$Data['station_id'] = $STID;
$Data['content']= $TOP;
$Data['messages'] = ob_get_clean();
echo json_encode( $Data );
} else {
header('location: /');
};
?>

4
lib/controller/getPlatforms.php

@ -32,7 +32,7 @@
$Rt = $DATABASE->Query( $QS, false );
$PCO = $Rt[0]['cnt'];
$NAME =$CR['name'] .'<br/>';
$INFO = '<table width="100%" border=0><tr><td width="130px" align="right">'.$Labels->GetLabel('_LBL_PLATFORMS_').':</td><td>'.$PCO.'</td></tr><tr><td align="right">'.$Labels->GetLabel('_MODULES_').':</td><td>'."0" .'</td></tr></table>';
$INFO = '<table width="100%" border=0><tr><td width="130px" align="right">'.$Labels->GetLabel('_LBL_PLATFORMS_').':</td><td>'.$PCO.'</td></tr></table>';
$QS = "SELECT `ln`.`short`,`ln`.`color`,`ln`.`name` FROM `metro_lines` `ln` LEFT JOIN `metro_stations_2_lines` `sl` ON ( `ln`.`id`=`sl`.`line_id` ) WHERE `sl`.`station_id`={$EID} ORDER BY `ln`.`short`";
$Rz = $DATABASE->Query( $QS, false );
if( count( $Rz ) ){
@ -43,7 +43,7 @@
$LINES=$Labels->GetLabel('_NOBI_LINE_');
};
//$ITEMS[0]="{ xtype: 'spacer', height: 28 }";
$STATAG[0]="{ xtype:'panel', border: false, frame: false, html: '<table border=0 class=\"setEd_infoPanel\" id=\"SENSOR_N\"><tr><td valign=\"middle\" align=\"center\" style=\"padding-left:30px;font-size: 22px; font-weight: bold;\">{$NAME}</td></tr><tr><td>{$INFO}</td></tr><tr><td>{$LINES}</td></tr></table><br/>'}";
$STATAG[0]="{ xtype:'panel', border: false, frame: false, html: '<table border=0 class=\"setEd_infoPanel\" id=\"SENSOR_N\"><tr><td valign=\"middle\" align=\"center\" style=\"padding-left:30px;font-size: 22px; font-weight: bold;\">{$NAME}</td></tr><tr><td>{$INFO}</td></tr><tr><td style=\"padding-left:30px;\">{$LINES}</td></tr></table><br/>'}";
$QS = "SELECT `ms`.* FROM `metro_stations_2_lines` `sl` LEFT JOIN `metro_stations` `ms` ON ( `ms`.`id`=`sl`.`station_id`) WHERE `sl`.`line_id`={$EID} ORDER BY `sl`.`index`";
$QS = "SELECT * FROM `metro_platforms` WHERE `station_id`={$EID}";
$Result = $DATABASE->Query( $QS, false );

358
lib/controller/getServerSettings.php

@ -0,0 +1,358 @@
<?php
require_once('../ajax_asm.php');
$UID = intval( $CUser->Data['id'] );
$ACCESS = intval( $CUser->Data['access'] );
if( $UID > 1 ){
ob_start();
$QS="SELECT * FROM system_props LIMIT 1";
$RV = $DATABASE->Query( $QS );
if( count( $RV ) ){
$AP_DATA = $RV[0];
if( $AP_DATA['version_string'] == '' ) $AP_DATA['version_string'] = $Labels->GetLabel('APP_IS_NOT_RUNING');
if( $AP_DATA['hw_info'] == '' ) $AP_DATA['hw_info'] = $Labels->GetLabel('APP_IS_NOT_RUNING');
if( $AP_DATA['os_info'] == '' ) $AP_DATA['os_info'] = $Labels->GetLabel('APP_IS_NOT_RUNING');
} else {
$AP_DATA = array(
'anchor_lat'=>0,
'anchor_lon'=>0,
'anchor_alt'=>0,
'type'=>0,
'version_string'=>$Labels->GetLabel('APP_IS_NOT_RUNING'),
'os_info'=>$Labels->GetLabel('APP_IS_NOT_RUNING'),
'hw_info'=>$Labels->GetLabel('APP_IS_NOT_RUNING')
);
};
if(isset( $_POST['TYP'] )) $T = intval( $_POST['TYP'] ); else $T = 0;
$build = $AP_DATA['version_string'];//getServerProp( 11 );
//if( $build == '' ) $build = $AP_DATA['version_string'];
//if( $build == '' ) $build = $Labels->GetLabel('APP_IS_NOT_RUNING');
$os_info = $AP_DATA['os_info'];//getServerProp( 12 );
//if( $os_info == '' ) $os_info = $Labels->GetLabel('APP_IS_NOT_RUNING');
$hw_info = $AP_DATA['hw_info']; //getServerProp( 13 );
//if( $hw_info == '' ) $hw_info = $Labels->GetLabel('APP_IS_NOT_RUNING');
$BASIC_CONTENT=<<<DATA_BOUNDARY
{
xtype: 'tabpanel',
frame: false,
id: 'node_settings_content',
border: false,
activeTab: {$T},
items: [{
xtype: 'panel',
id: 'gi_tab',
title: "{$Labels->GetLabel('_GENERAL_NFO_')}",
layout: 'hbox',
items:[{
xtype: 'panel',
flex: 1,
height: PanelH-15,
autoScroll: false,
html: '<table width="100%" height="100%" border=0><tr><td height="290px" align="center" valign="middle"><div class="server_img_set"></div></td></tr><tr><td height="100px"><table width="100%" border=0><tr><td align="center"><svg class="donut" width="80" height="100%" viewBox="0 0 42 42"><circle id="status_1_donut0_segment2" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#b1c94e" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><circle id="status_1_donut0_segment3" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#aaddff" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><circle id="status_1_donut0_segment1" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#ce4b99" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><g class="chart-text"><text x="50%" y="50%" class="chart-number" id="status_1_totalValue0">0</text><text x="50%" y="50%" class="chart-label">CPU</text></g></svg></td><td align="center"><svg class="donut" width="80" height="100%" viewBox="0 0 42 42"><circle id="status_1_donut1_segment2" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#b1c94e" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><circle id="status_1_donut1_segment3" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#aaddff" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><circle id="status_1_donut1_segment1" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#ce4b99" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><g class="chart-text"><text x="50%" y="50%" class="chart-number" id="status_1_totalValue1">0</text><text x="50%" y="50%" class="chart-label">MEM</text></g></svg></td><td align="center"><svg class="donut" width="80" height="100%" viewBox="0 0 42 42"><circle id="status_1_donut2_segment2" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#b1c94e" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><circle id="status_1_donut2_segment3" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#aaddff" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><circle id="status_1_donut2_segment1" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#ce4b99" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><g class="chart-text"><text x="50%" y="50%" class="chart-number" id="status_1_totalValue2">0</text><text x="50%" y="50%" class="chart-label">DISK</text></g></svg></td><td align="center"><svg class="donut" width="80" height="100%" viewBox="0 0 42 42"><circle id="status_1_donut3_segment2" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#b1c94e" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><circle id="status_1_donut3_segment3" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#aaddff" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><circle id="status_1_donut3_segment1" cx="21" cy="21" r="15.91549430918954" fill="transparent" stroke="#ce4b99" stroke-width="3" stroke-dasharray="0 100" stroke-dashoffset="25"></circle><g class="chart-text"><text x="50%" y="50%" class="chart-number" id="status_1_totalValue3">0</text><text x="50%" y="50%" class="chart-label">TEMP</text></g></svg></td></tr></table></td></tr><tr><td valign="top"><div class="setEd_infoPanel" id="INFO_SPS"><div class="sideInfo_item" id="SW_INFO">{$build}</div><div class="sideInfo_item" id="OS_INFO">{$os_info}</div><div class="sideInfo_item" id="HW_INFO">{$hw_info}</div></div></td></tr><tr><td height="60%">&nbsp;</td></tr></table>'
},{
xtype: 'panel',
id: '_ed_small',
flex: 1,
height: PanelH-15,
autoScroll: false,
items:[ %%CTX_ACCESS_4%% %%CTX_ACCESS_5%% %%CTX_ACCESS_6%% ]
}]
} %%TAB_CTX%%% ],
listeners:{
tabchange: function( tp, t ){
switch( t.getId() ){
case 'gi_tab': {
content_lvl3=0;
serverStatusUpdater();
break;
};
case 'res_tab': {
//content_lvl3=1;
stopStatusUpdater();
//loadRessources();
break;
};
case 'mod_tab':{
//content_lvl3=2;
stopStatusUpdater();
//loadModules();
break;
};
case 'flt_tab':{
//content_lvl3=3;
stopStatusUpdater();
//loadFilters();
break;
};
};
updateUserContent();
},
afterrender: function(){
settingsAreChanged = false;
}
},
updateSettings: function(){
alert('Update Settings');
}
}
DATA_BOUNDARY;
$MAIN_A_4=<<<DATA_BOUNDARY
{
xtype: 'panel',
baseCls:'servopInfo_item00',
id: 'servopPanel01',
items:[{
xtype: 'panel',
frame: false,
border: false,
unstyled: true,
html: "<p>{$Labels->GetLabel('_SERV_RESTART_DESC_')}</p><br/>"
},{
xtype: 'button',
lazyRender: true,
iconCls: 'srv_op_restart',
text: "{$Labels->GetLabel('_SERV_RESTART_OP_')}",
id: 'tbtn_sop01',
scale: 'large',
width: '95%',
disabled: true,
handler: function( bt ){
Ext.Msg.show({
title:"{$Labels->GetLabel('_SERV_RESTART_QT_')}",
msg: "{$Labels->GetLabel('_SERV_RESTART_QM_')}",
buttons: Ext.Msg.YESNO,
width: 400,
icon: Ext.MessageBox.INFO,
fn: function(btn, text){
if( btn == 'yes' ){
disableServOps();
doDeviceOperation( 1, 250,'', true );
};
}
});
}
}]
},{
xtype: 'spacer',
height: 8
}
DATA_BOUNDARY;
$MAIN_A_5=<<<DATA_BOUNDARY
,{
xtype: 'panel',
baseCls:'servopInfo_item10',
id: 'servopPanel02',
items:[{
xtype: 'panel',
frame: false,
border: false,
unstyled: true,
html: "<p>{$Labels->GetLabel('_SERV_HW_DET_DESC_')}</p><br/>"
},{
xtype: 'button',
iconCls: 'srv_op_hw_init',
text: "{$Labels->GetLabel('_SERV_HW_DET_OP_')}",
id: 'tbtn_sop02',
scale: 'large',
width: '95%',
disabled: true,
handler: function( bt ){
Ext.Msg.show({
title:"{$Labels->GetLabel('_SERV_HW_DET_QT_')}",
msg: "{$Labels->GetLabel('_SERV_HW_DET_QM_')}",
buttons: Ext.Msg.YESNO,
width: 400,
icon: Ext.MessageBox.INFO,
fn: function(btn, text){
if( btn == 'yes' ){
disableServOps();
doDeviceOperation( 1, 251,'', true );
};
}
});
}
}]
},{
xtype: 'spacer',
height: 8
}
DATA_BOUNDARY;
$MAIN_A_6=<<<DATA_BOUNDARY
,{
xtype: 'panel',
baseCls:'servopInfo_item20',
id: 'servopPanel03',
items:[{
xtype: 'panel',
frame: false,
border: false,
unstyled: true,
html: "<p>{$Labels->GetLabel('_SERV_OSRESET_DESC_')}</p><br/>"
},{
xtype: 'button',
iconCls: 'srv_op_power_cycle',
text: "{$Labels->GetLabel('_SERV_OSRESET_OP_')}",
id: 'tbtn_sop03',
scale: 'large',
width: '95%',
disabled: true,
handler: function( bt ){
Ext.Msg.show({
title: "{$Labels->GetLabel('_SERV_OSRESET_QT_')}",
msg: "{$Labels->GetLabel('_SERV_OSRESET_QM_')}",
buttons: Ext.Msg.YESNO,
width: 400,
icon: Ext.MessageBox.WARNING,
fn: function(btn, text){
if( btn == 'yes' ){
cleanupChangeNotifier();
} else {
loadEditor = false;
};
}
});
}
}]
},{
xtype: 'spacer',
height: 8
},{
xtype: 'panel',
baseCls:'servopInfo_item30',
id: 'servopPanel04',
items:[{
xtype: 'panel',
frame: false,
border: false,
unstyled: true,
html: "<p>{$Labels->GetLabel('_SERV_FACTORY_DESC_')}</p><br/>"
},{
xtype: 'button',
iconCls: 'srv_op_factory_reset',
text: "{$Labels->GetLabel('_SERV_FACTORY_OP_')}",
id: 'tbtn_sop04',
scale: 'large',
width: '95%',
disabled: true,
handler: function( bt ){
Ext.Msg.show({
title: "{$Labels->GetLabel('_SERV_FACTORY_QT_')}",
msg: "{$Labels->GetLabel('_SERV_FACTORY_QM_')}",
buttons: Ext.Msg.YESNO,
width: 400,
icon: Ext.MessageBox.ERROR,
fn: function(btn, text){
if( btn == 'yes' ){
disableServOps();
doDeviceOperation( 1, 254,'', true );
};
}
});
}
}]
}
DATA_BOUNDARY;
$TAB_CTX=<<<DATA_BOUNDARY
,{
xtype: 'panel',
title: "{$Labels->GetLabel( '_RESOURCES_' )}",
id: 'res_tab',
layout: 'hbox',
items:[{
xtype: 'panel',
id: 'resources_container',
flex: 1,
height: PanelH-15,
autoScroll: 'auto',
tbar:[{
text: "{$Labels->GetLabel( '_ADD_REMOTE_UART_' )}",
handler: function(){} //addEthernet2Uart
}],
items:[]
},{
xtype: 'panel',
id: 'res_ed_small',
flex: 1,
height: PanelH-15,
layout: 'fit',
items:[{
html: "<div class='setEd_infoPanel' id='NUNU'>{$Labels->GetLabel('_PLS_SEL_LEFT_ITEM_')}</div>"
}]
}]
},{
xtype: 'panel',
title: "{$Labels->GetLabel( '_SERVER_MODULES_' )}",
id: 'mod_tab',
layout: 'hbox',
items:[{
xtype: 'panel',
id: 'modules_container',
flex: 1,
height: PanelH-15,
autoScroll: 'auto',
tbar:[{
text: "{$Labels->GetLabel( '_ADD_MODULE_' )}",
handler: addModule
}],
items:[]
},{
xtype: 'panel',
id: 'mod_ed_small',
flex: 1,
height: PanelH-15,
layout: 'fit',
items:[{
html: "<div class='setEd_infoPanel' id='NUNU'>{$Labels->GetLabel('_PLS_SEL_LEFT_ITEM_')}</div>"
}]
}]
},{
xtype: 'panel',
title: "{$Labels->GetLabel( '_TARGET_FILTERS_' )}",
id: 'flt_tab',
layout: 'hbox',
items:[{
xtype: 'panel',
id: 'filters_container',
flex: 1,
height: PanelH-15,
autoScroll: 'auto',
tbar:[{
text: "{$Labels->GetLabel( '_ADD_FILTER_' )}",
handler: addFilter
}],
items:[]
},{
xtype: 'panel',
id: 'flt_ed_small',
flex: 1,
height: PanelH-15,
layout: 'fit',
items:[{
html: "<div class='setEd_infoPanel' id='NUNU'>{$Labels->GetLabel('_PLS_SEL_LEFT_ITEM_')}</div>"
}]
}]
}
DATA_BOUNDARY;
if( $CUser->Data['access'] < 6 ){
$TAB_CTX = '';
$MAIN_A_6 = '';
if( $CUser->Data['access'] < 5 ){
$MAIN_A_5 = '';
if( $CUser->Data['access'] < 4 ){
$MAIN_A_4 = '';
};
};
};
$Data['content'] = $BASIC_CONTENT;
$Data['content'] = str_ireplace( '%%CTX_ACCESS_4%%', $MAIN_A_4, $Data['content'] );
$Data['content'] = str_ireplace( '%%CTX_ACCESS_5%%', $MAIN_A_5, $Data['content'] );
$Data['content'] = str_ireplace( '%%CTX_ACCESS_6%%', $MAIN_A_6, $Data['content'] );
$Data['content'] = str_ireplace( '%%TAB_CTX%%%', $TAB_CTX, $Data['content'] );
$Data['messages'] = ob_get_clean();
} else {
header('location: /');
exit();
};
echo json_encode( $Data );
?>

26
lib/controller/getServerStatus.php

@ -4,24 +4,36 @@
$ACCESS = intval( $CUser->Data['access'] );
if( $UID > 1 ){
ob_start();
//@$MEMDB = new SQLite_DB( '/dev/shm/argus/mem_db.db');
$QS = "SELECT * FROM `servers` LIMIT 1";
//$RV = $MEMDB->Query( $QS );
$RV = array();
if( count( $RV ) ){
if( ( time() - intval( $RV[0]['ts'] ) ) < 3 ){
$LTS = intval( getServerProp( 0 ) );
if( $LTS ){
if( ( time() - $LTS ) < 3 ){
$Data['status']='ok';
$Data['stats']=$RV[0];
$Data['stats']=array();
$Data['stats']['stat_cpu15'] = intval( getServerProp( 3 ) );
$Data['stats']['stat_mem'] = intval( getServerProp( 6 ) );
$Data['stats']['stat_disk'] = intval( getServerProp( 9 ) );
$Data['stats']['temp0'] = intval( getServerProp( 10 ) );
$Data['online'] = 1;
$Data['build'] = getServerProp( 11 );
$Data['os_info'] = getServerProp( 12 );
$Data['hw_info'] = getServerProp( 13 );
} else {
$Data['status'] ='na';
$Data['status_ts'] = $LTS;
$Data['stats'] = array();
$Data['online'] = 0;
$Data['build'] = getServerProp( 11 );
$Data['os_info'] = getServerProp( 12 );
$Data['hw_info'] = getServerProp( 13 );
};
} else {
$Data['status']='na';
$Data['stats'] = array();
$Data['status_ts'] = $LTS;
$Data['online'] = 0;
$Data['build'] = getServerProp( 11 );
$Data['os_info'] = getServerProp( 12 );
$Data['hw_info'] = getServerProp( 13 );
};
$Data['messages'] = ob_get_clean();
} else {

92
lib/controller/getSessionData.php

@ -0,0 +1,92 @@
<?php
require_once('../ajax_asm.php');
require_once('../php/argus/server.php');
ob_start();
$UID = intval( $CUser->Data['id'] );
$ACCESS = intval( $CUser->Data['access'] );
if( $CUser->Data['id'] > 1 ){
$Data['status'] = 'error';
if( isset( $_POST['SESSION'] ) ) $SESID = intval( $_POST['SESSION'] ); else $SESID = 0;
if( $SESID ){
$QS = "SELECT * FROM `sessions` WHERE `id`={$SESID}";
$RR = $DATABASE->Query( $QS );
if( count( $RR ) ){
$SD = $RR[0];
$Data['ses_status']=intval( $SD['status'] );
$Data['start_ts'] = intval( $SD['ts'] ) * 1000 + intval( $SD['ts_ms'] );
$Data['track_id'] = intval( $SD['track_id'] );
$QS = "SELECT * FROM `metro_tracks` WHERE `id`={$Data['track_id']}";
$RR = $DATABASE->Query( $QS );
$TRD = $RR[0];
if( $TRD['side'] == 'U' ){
$Data['r_module_id'] = intval( $TRD['near_module_id'] );
$Data['l_module_id'] = intval( $TRD['far_module_id'] );
} else {
$Data['r_module_id'] = intval( $TRD['far_module_id'] );
$Data['l_module_id'] = intval( $TRD['near_module_id'] );
};
$QS = "SELECT `layout` FROM `metro_platforms` WHERE `id`={$TRD['platform_id']}";
$RR = $DATABASE->Query( $QS );
$Data['layout'] = $RR[0]['layout'];
$Data['basepath'] = '/lib/controller/data/reports/'.$Data['track_id'].'/'.date("Y/m/d",intval( $SD['ts'] ));
if( file_exists( $SYSPath . $Data['basepath'] )){
$Data['events']= array();
$Data['videos']= array();
$Data['data_ok'] = true;
echo $SYSPath . $Data['basepath'] .'/reports.db';
$RBASE = new SQLite_DB( $SYSPath . $Data['basepath'] .'/report.db' );
$QS = "SELECT * FROM `events` WHERE `session_id`={$SESID} AND `evt_type` IN(13,14,36) ORDER BY `ts`*1000+`ts_ms` ASC";
$RR = $RBASE->Query( $QS );
foreach( $RR as $CR ){
$CE = array();
//$CE['id']=intval($CR['id']);
$CE['ts']=intval($CR['ts'])*1000+intval($CR['ts_ms']);
if( $Data['start_ts'] > $CE['ts'] ) $Data['start_ts'] = $CE['ts'];
//$CE['module_id']=intval( $CR['module_id'] );
$CE['az']=floatval( $CR['azimuth'] );
$CE['r']=floatval( $CR['range'] );//cos( floatval( $CR['azimuth'] ) )
if( $TRD['side'] == 'U' ){
if( $Data['r_module_id'] == intval( $CR['module_id'] ) ){
$CE['x'] = 75.0+25.0 *(($CR['azimuth']>90 && $CR['azimuth'] < 210)?1.0:-1.0) * floatval( $CR['range'] ) / 70.0;
} else {
$CE['x'] = 25.0+25.0 *(($CR['azimuth']>90 && $CR['azimuth'] < 210)?1.0:-1.0) * floatval( $CR['range'] ) / 70.0;
};
} else {
if( $Data['r_module_id'] == intval( $CR['module_id'] ) ){
$CE['x'] = 75.0+25.0 *(($CR['azimuth']>90 && $CR['azimuth'] < 210)?-1.0:1.0) * floatval( $CR['range'] ) / 70.0;
} else {
$CE['x'] = 25.0+25.0 *(($CR['azimuth']>90 && $CR['azimuth'] < 210)?-1.0:1.0) * floatval( $CR['range'] ) / 70.0;
};
};
$Data['events'][] = $CE;
};
$QS = "SELECT * FROM `videos` WHERE `session_id`={$SESID} ORDER BY `ts`*1000+`ts_ms` ASC";
$RR = $RBASE->Query( $QS );
foreach( $RR as $CR ){
$CV = array();
$CV['id']=intval($CR['id']);
$CV['sts']=intval($CR['ts'])*1000+intval($CR['ts_ms'])+7000;
if( $Data['start_ts'] > $CV['sts'] ) $Data['start_ts'] = $CV['sts'];
$CV['ets'] = $CV['sts']+60000;
//Check if Session was ended before Video Ends
if( $SD['lts'] < ($CR['ts'] + 54) ) $SD['lts'] = $CR['ts'] + 54;
$CV['module_id']=intval( $CR['module_id'] );
if( $Data['r_module_id'] == $CV['module_id'] ) $CV['side'] = 'R'; else $CV['side'] = 'L';
$CV['name']=$CR['uuid'] . '.'. $CR['ext'];
$CV['fps']=intval( $CR['fps'] );
$CV['playing'] = false;
$Data['videos'][] = $CV;
};
$Data['length'] = intval( $SD['lts'] ) * 1000 - $Data['start_ts'];
} else {
$Data['data_ok'] = false;
};
$Data['status'] = 'ok';
} else $Data['err_msg'] = 'Session ID is Wrong!';
} else $Data['err_msg'] = 'No Session ID provided!';
$Data['messages'] = ob_get_clean();
echo json_encode( $Data );
} else {
header('location: /');
};
?>

33
lib/controller/getStationEditor.php

@ -49,46 +49,19 @@ JOJOKA;
{
xtype: 'spacer',
height: 20
},{
xtype: 'panel',
border: false,
html: '<p><center>{$Labels->GetLabel('_ADD_OP_SETTINGS_')}</center></p>'
},{
xtype: 'spacer',
height: 20
},{
xtype: 'tabpanel',
border: false,
frame: false,
height: PanelH - 283,
height: PanelH - 190,
activeTab: 0,
items:[{
xtype: 'panel',
title: '{$Labels->GetLabel('_SMM_SCH_LOCATION_')}',
items: [{
xtype: 'compositefield',
labelWidth: 120,
items: [
{
xtype : 'textfield',
fieldLabel: 'lat',
width : 200
},
{
xtype : 'textfield',
fieldLabel: 'lon',
flex : 1
},
{
xtype : 'textfield',
fieldLabel: 'Last',
flex : 1
}
]
},{
xtype: 'panel',
id: 'schematic_map',
height: PanelH - 283,
height: PanelH - 190,
listeners:{
afterrender: function(){
inintSchematicEditor('schematic_map',{$CR['y']},{$CR['x']});
@ -101,7 +74,7 @@ JOJOKA;
items: [{
xtype: 'panel',
id: 'gis_map',
height: PanelH - 283,
height: PanelH - 190,
listeners:{
afterrender: function(){
inintGisEditor('gis_map',{$CR['lat']},{$CR['lon']});

262
lib/controller/getStatus.php

@ -0,0 +1,262 @@
<?php
require_once('../ajax_asm.php');
require_once('../php/argus/server.php');
ob_start();
$UID = intval( $CUser->Data['id'] );
$ACCESS = intval( $CUser->Data['access'] );
if( $UID > 1 ){
$Data = array();
$Data['VLVL'] = intval( $_POST['VLVL'] );
$Data['LTS'] = intval( $_POST['LTS'] );
$LID = intval( $_POST['LID'] );
if( $Data['LTS'] == 0 ) $Data['LTS'] = floor(microtime(true) * 1000);//time();
$ALRM_STATIONS = array();
//Data for Side Panel
$QS = "SELECT * FROM `sessions` WHERE `final`='N' ORDER BY (`ts`*1000)+`ts_ms` DESC LIMIT 32";
$RR = $DATABASE->Query( $QS );
if( count( $RR ) ){
$Data['actual'] = array();
foreach( $RR as $R ){
$CA = array();
$CA['id']=intval($R['id'] );
$CA['track']=intval( $R['track_id'] );
$QS = "SELECT `st`.`id` AS `s_id`, `st`.`name` AS `s_name`, `pt`.`name` AS `p_name`, `tr`.`short` FROM `metro_tracks` `tr` LEFT JOIN `metro_platforms` `pt` ON (`tr`.`platform_id`=`pt`.`id`) LEFT JOIN `metro_stations` `st` ON (`pt`.`station_id`=`st`.`id`) WHERE `tr`.`id`={$CA['track']}";
$GG = $DATABASE->Query( $QS );
$CA['station_name']=$GG[0]['s_name'];
$CA['platform_name']=$GG[0]['p_name'];
$CA['track_tag']=$GG[0]['short'];
$CA['status']=0;
$Data['actual'][] = $CA;
$ALRM_STATIONS[$GG[0]['s_id']] = 4;
};
};
$QS = "SELECT * FROM `sessions` WHERE `final`='Y' AND `status`=0 ORDER BY (`ts`*1000)+`ts_ms` DESC LIMIT 32";
$RR = $DATABASE->Query( $QS );
if( count( $RR ) ){
$Data['expired'] = array();
foreach( $RR as $R ){
$CA = array();
$CA['id']=intval($R['id'] );
$CA['track']=intval( $R['track_id'] );
$QS = "SELECT `st`.`id` AS `s_id`, `st`.`name` AS `s_name`, `pt`.`name` AS `p_name`, `tr`.`short` FROM `metro_tracks` `tr` LEFT JOIN `metro_platforms` `pt` ON (`tr`.`platform_id`=`pt`.`id`) LEFT JOIN `metro_stations` `st` ON (`pt`.`station_id`=`st`.`id`) WHERE `tr`.`id`={$CA['track']}";
$GG = $DATABASE->Query( $QS );
$CA['station_name']=$GG[0]['s_name'];
$CA['platform_name']=$GG[0]['p_name'];
$CA['track_tag']=$GG[0]['short'];
$CA['status']=1;
$Data['expired'][] = $CA;
if( !isset($ALRM_STATIONS[$GG[0]['s_id']] ) ) $ALRM_STATIONS[$GG[0]['s_id']] = 3;
};
};
switch( $Data['VLVL'] ){
case 0:{ // Map Level Monitoring
// check the station/modules online statuses, check just side sessions
$QS = "SELECT id FROM `metro_stations`";
$RR = $DATABASE->Query( $QS );
foreach( $RR as $CR ){
//If station not Alarmed
if( !isset($ALRM_STATIONS[$CR['id']] ) ){
$ALRM_STATIONS[$CR['id']] = 1; // default Station is ok
$QS = "SELECT `mt`.`id` as `id` FROM `metro_tracks` `mt` LEFT JOIN `metro_platforms` `mp` ON ( `mt`.`platform_id` = `mp`.`id` ) WHERE `mp`.`station_id` = {$CR['id']}";
$ZZ = $DATABASE->Query( $QS );
if( count( $ZZ ) ){
foreach( $ZZ as $CZ ){
$QS = "SELECT `id` FROM `metro_modules` WHERE `track_id`={$CZ['id']}";
$JJ = $DATABASE->Query( $QS );
if( count( $JJ ) ){
foreach( $JJ as $J ){
//check online status of module
//$QS = "SELECT
};
} else $ALRM_STATIONS[$CR['id']] = 2; // Has No Modules at all
};
} else {
$ALRM_STATIONS[$CR['id']] = 0; // No Infrostructure
};
};
};
$SI = array();
$SS = array();
foreach( $ALRM_STATIONS as $K=>$V ){
$SI[] = $K;
$SS[] = $V;
};
$Data['station_ids'] = $SI;
$Data['station_status'] = $SS;
break;
};
case 2:{ //Platform View
$PID = intval( $_POST['PID'] );
if( $PID ){
$QS = "SELECT * FROM `metro_tracks` WHERE `platform_id`={$PID}";
$RR = $DATABASE->Query( $QS );
if( count( $RR ) ){
$Modules = array();
foreach( $RR as $CT ){
$CM = intval( $CT['near_module_id'] );
$LD = array();
if( $CM ){
$LD['id']=$CM;
if( getOnlineStatus( $CM ) ){
$LD['status'] = 2;
$QS = "SELECT * FROM `metro_modules` WHERE `id`={$CM}";
$RZ = $DATABASE->Query( $QS );
$MM = $RZ[0];
//$LD['img'] = "http://{$MM['IP4']}/video_feed/stream?id={$MM['cam_stream']}";
$LD['img'] = "http://{$MM['IP4']}/video_feed/preview?id={$MM['cam_stream']}";
$QS = "SELECT `id` FROM `sessions` WHERE `track_id`={$CT['id']} AND `status`=0";
$RZ = $DATABASE->Query( $QS );
if( count( $RZ ) ){
$LD['status'] = 3;
$LD['session'] = intval( $RZ[0]['id'] );
};
} else {
$LD['status'] = 1;
$LD['img'] = '/style/assets/no-signal_h.png';
};
} else {
$LD['status'] = 0;
};
$Modules[] = $LD;
$CM = $CT['far_module_id'];
$LD = array();
if( $CM ){
$LD['id']=$CM;
if( getOnlineStatus( $CM ) ){
$LD['status'] = 2;
$QS = "SELECT * FROM `metro_modules` WHERE `id`={$CM}";
$RZ = $DATABASE->Query( $QS );
$MM = $RZ[0];
//$LD['img'] = "http://{$MM['IP4']}/video_feed/stream?id={$MM['cam_stream']}";
$LD['img'] = "http://{$MM['IP4']}/video_feed/preview?id={$MM['cam_stream']}";
$QS = "SELECT `id` FROM `sessions` WHERE `track_id`={$CT['id']} AND `status`=0";
$RZ = $DATABASE->Query( $QS );
if( count( $RZ ) ){
$LD['status'] = 3;
$LD['session'] = intval( $RZ[0]['id'] );
};
} else {
$LD['status'] = 1;
$LD['img'] = '/style/assets/no-signal_h.png';
};
} else {
$LD['status'] = 0;
};
$Modules[] = $LD;
};
$Data['modules'] = $Modules;
};
};
break;
};
case 3:{ // Track View
$TID = intval( $_POST['TID'] );
if( $TID ){
$QS = "SELECT * FROM `metro_tracks` WHERE `id`={$TID}";
$RR = $DATABASE->Query( $QS );
if( count( $RR ) ){
$CT = $RR[0];
$Modules = array();
$CM = intval( $CT['near_module_id'] );
$LD = array();
if( $CM ){
$LD['id']=$CM;
if( getOnlineStatus( $CM ) ){
$LD['status'] = 2;
$QS = "SELECT * FROM `metro_modules` WHERE `id`={$CM}";
$RZ = $DATABASE->Query( $QS );
$MM = $RZ[0];
$LD['img'] = "http://{$MM['IP4']}/video_feed/stream?id={$MM['cam_stream']}";
//$LD['img'] = "http://{$MM['IP4']}/video_feed/preview?id={$MM['cam_stream']}";
$QS = "SELECT `id` FROM `sessions` WHERE `track_id`={$CT['id']} AND `status`=0";
$RZ = $DATABASE->Query( $QS );
if( count( $RZ ) ){
$LD['status'] = 3;
$LD['session'] = intval( $RZ[0]['id'] );
};
} else {
$LD['status'] = 1;
$LD['img'] = '/style/assets/no-signal_h.png';
};
} else {
$LD['status'] = 0;
};
$Modules[] = $LD;
$CM = $CT['far_module_id'];
$LD = array();
if( $CM ){
$LD['id']=$CM;
if( getOnlineStatus( $CM ) ){
$LD['status'] = 2;
$QS = "SELECT * FROM `metro_modules` WHERE `id`={$CM}";
$RZ = $DATABASE->Query( $QS );
$MM = $RZ[0];
$LD['img'] = "http://{$MM['IP4']}/video_feed/stream?id={$MM['cam_stream']}";
//$LD['img'] = "http://{$MM['IP4']}/video_feed/preview?id={$MM['cam_stream']}";
$QS = "SELECT `id` FROM `sessions` WHERE `track_id`={$CT['id']} AND `status`=0";
$RZ = $DATABASE->Query( $QS );
if( count( $RZ ) ){
$LD['status'] = 3;
$LD['session'] = intval( $RZ[0]['id'] );
};
} else {
$LD['status'] = 1;
$LD['img'] = '/style/assets/no-signal_h.png';
};
} else {
$LD['status'] = 0;
};
$Modules[] = $LD;
$Data['modules'] = $Modules;
};
$QS="SELECT `id`, `ts` FROM `sessions` WHERE `track_id`={$TID} AND `final`='N' ORDER BY (`ts`*1000)+`ts_ms` LIMIT 1";
$RR = $DATABASE->Query( $QS );
if( count( $RR ) ){
$Data['active_session_id']=intval( $RR[0]['id'] );
//Fetch Targets
$Basepath = '/lib/controller/data/reports/'.$TID.'/'.date("Y/m/d",intval( $RR[0]['ts'] ));
if( file_exists( $SYSPath . $Basepath ) ){
$RBASE = new SQLite_DB( $SYSPath . $Basepath .'/report.db' );
$QS = "SELECT * FROM `events` WHERE `session_id`={$Data['active_session_id']} AND `evt_type` IN(13,14,36) ORDER BY `ts`*1000+`ts_ms` DESC LIMIT 32";
$RR = $RBASE->Query( $QS );
$RR = array_reverse( $RR );
foreach( $RR as $CR ){
$CE = array();
//$CE['id']=intval($CR['id']);
//$CE['ts']=intval($CR['ts'])*1000+intval($CR['ts_ms']);
//if( $Data['start_ts'] > $CE['ts'] ) $Data['start_ts'] = $CE['ts'];
//$CE['module_id']=intval( $CR['module_id'] );
$CE['az']=floatval( $CR['azimuth'] );
$CE['r']=floatval( $CR['range'] );//cos( floatval( $CR['azimuth'] ) )
if( $CT['side'] == 'U' ){
if( $CT['near_module_id'] == intval( $CR['module_id'] ) ){
$CE['x'] = 75.0+25.0 *(($CR['azimuth']>90 && $CR['azimuth'] < 210)?1.0:-1.0) * floatval( $CR['range'] ) / 70.0;
} else {
$CE['x'] = 25.0+25.0 *(($CR['azimuth']>90 && $CR['azimuth'] < 210)?1.0:-1.0) * floatval( $CR['range'] ) / 70.0;
};
} else {
if( $CT['far_module_id'] == intval( $CR['module_id'] ) ){
$CE['x'] = 75.0+25.0 *(($CR['azimuth']>90 && $CR['azimuth'] < 210)?-1.0:1.0) * floatval( $CR['range'] ) / 70.0;
} else {
$CE['x'] = 25.0+25.0 *(($CR['azimuth']>90 && $CR['azimuth'] < 210)?-1.0:1.0) * floatval( $CR['range'] ) / 70.0;
};
};
$Data['events'][] = $CE;
};
};
};
};
break;
};
};// Data By Level
$Data['status'] = 'ok';
$Data['messages'] = ob_get_clean();
echo json_encode( $Data );
} else {
header('location: /');
};
?>

35
lib/controller/listHistoryStations.php

@ -0,0 +1,35 @@
<?php
require_once('../ajax_asm.php');
ob_start();
$UID = intval( $CUser->Data['id'] );
$ACCESS = intval( $CUser->Data['access'] );
if( $UID > 1 ){
$Data = array();
$QS = "SELECT * FROM `metro_stations`";//Check if has Reports!!
$Result = $DATABASE->Query( $QS, false );
if( count( $Result ) ){
$Data['status']='ok';
$Data['stations'] = array();
$QS = "SELECT station_id FROM metro_platforms WHERE id IN ( SELECT DISTINCT platform_id FROM metro_tracks WHERE id IN (SELECT DISTINCT track_id FROM sessions) )";
$RR = $DATABASE->Query( $QS, false );
$test = array();
foreach( $RR as $R ) $test[$R['station_id']] = 1;
foreach( $Result as $R ) {
$CS['id'] = intval( $R['id'] );
$CS['x'] = $R['x'];
$CS['y'] = $R['y'];
if( isset( $test[$CS['id']] ) ) $CS['status'] = 1; else $CS['status'] = 0;
$Data['stations'][] = $CS;
};
} else {
$Data['status']='ok';
$Data['stations'] = '[]';
};
$Data['messages'] = ob_get_clean();
echo json_encode( $Data );
} else {
header('location: /');
};
?>

31
lib/controller/listStations.php

@ -0,0 +1,31 @@
<?php
require_once('../ajax_asm.php');
ob_start();
$UID = intval( $CUser->Data['id'] );
$ACCESS = intval( $CUser->Data['access'] );
if( $UID > 1 ){
$Data = array();
$QS = "SELECT * FROM `metro_stations`";
$Result = $DATABASE->Query( $QS, false );
if( count( $Result ) ){
$Data['status']='ok';
$Data['stations'] = array();
foreach( $Result as $R ) {
$CS['id'] = $R['id'];
$CS['x'] = $R['x'];
$CS['y'] = $R['y'];
$CS['status'] = 0;
$Data['stations'][] = $CS;
};
} else {
$Data['status']='ok';
$Data['stations'] = '[]';
};
$Data['messages'] = ob_get_clean();
echo json_encode( $Data );
} else {
header('location: /');
};
?>

6
lib/controller/listUsers.php

@ -1,6 +1,6 @@
<?php
require_once('../ajax_asm.php');
require_once('../php/onvif/toto.php');
//require_once('../php/onvif/toto.php');
if( $CUser->Data['id'] > 1 ){
if( $CUser->Data['access'] > 5 ){
$QS = "SELECT * FROM users";
@ -9,7 +9,7 @@
$cnode['id'] = intval( $CD['id'] );
$cnode['status'] = $CD['status'];
$cnode['access'] = intval( $CD['access'] );
$cnode['login'] = $CD['login'];
$cnode['login'] = $CD['login_id'];
$cnode['created']= $CD['create_ts'];
$cnode['last'] = $CD['login_ts'];
$cnode['lang'] = intval( $CD['language'] );
@ -22,6 +22,6 @@
$Data['totalCount']= count($Data['users']);
echo json_encode( $Data );
} else {
header('location: /');
header('location: /');
};
?>

8
lib/controller/updateUserSettings.php

@ -31,8 +31,14 @@
break;
};
case 26:{
$CID = $DATABASE->escape($_POST['CID']);
$QS="UPDATE `users` SET `last_content_view`='{$CID}' WHERE id={$CUser->Data['id']}";
$DATABASE->Query( $QS );
break;
};
case 27:{
$CID = intval($_POST['CID']);
$QS="UPDATE `users` SET `last_content_view`={$CID} WHERE id={$CUser->Data['id']}";
$QS="UPDATE `users` SET `ss_mode`={$CID} WHERE id={$CUser->Data['id']}";
$DATABASE->Query( $QS );
break;
};

2
lib/defines.php

@ -4,7 +4,7 @@ $ARGUS_WEB_VERSION = trim( file_get_contents( '/srv/www/srv/lib/version.var' )
$SSL_INSTALLLED = false;
if( $_SERVER['SERVER_PORT'] == 80 || $_SERVER['SERVER_PORT'] == 8090 ){
if( $_SERVER['SERVER_PORT'] != 443 ){
$WEBPath='http://' . $_SERVER['HTTP_HOST'] . '/';//$_SERVER['SERVER_NAME'] . '/';
if( $SSL_INSTALLLED ){
header( 'location: https://'.$_SERVER['SERVER_ADDR'].'/'.$_SERVER['QUERY_STRING'] );

114
lib/javascript/activitymap/activitymap.css

@ -0,0 +1,114 @@
/* Copyright 2014 Gagarine Yaikhom (The MIT License) */
.activity-map {
width: 100%;
height: 100%;
}
.activity-map div {
box-sizing:border-box;
-moz-box-sizing:border-box; /* Firefox */
}
.amap-title {
width: 100%;
color: #333;
font-size: 13px;
font-family: arial;
font-weight: bold;
text-align: center;
padding: 10px;
}
.amap-year-blocks {
overflow: auto;
padding: 10px;
width: 100%;
height: 100%;
border: 0px solid #ddd;
}
.amap-year-block {
display: inline-block;
float: left;
}
.amap-year-name {
display: block;
float: left;
width: 100%;
color: #fcfcfc;
font-family: arial;
font-size: 20px;
padding-top: 15px;
padding-bottom: 5px;
}
.amap-months {
display: inline-block;
float: left;
}
.amap-month {
display: inline-block;
margin: 10px;
height: 170px;
}
.amap-month .has-value {
border-color: #fff;
}
.amap-month-name,
.amap-month-name-filler {
height: 24px;
}
.amap-month-name {
color: #fcfcfc;
font-size: 14px;
font-family: arial;
font-weight: bold;
text-align: center;
background: #3f4757;
border: 2px solid #232d38;
padding: 2px;
}
.amap-empty-day,
.amap-week-day,
.amap-week-name {
width: 25px;
height: 25px;
margin-left: 3px;
float: left;
padding: 3px;
background: #3f4757;
border: 3px solid #232d38;
cursor: pointer;
}
.amap-empty-day {
background: #1c2126;
/*border-color: #fff;*/
}
.amap-week-day {
background: #41573f;
}
.amap-week-name {
color: #fcfcfc;
font-size: 14px;
font-family: arial;
text-align: center;
/*border-color: #fff;*/
}
.amap-week-start {
clear: left;
}
.amap-compact .amap-month-days {
float: left;
}
.amap-compact .amap-week-days {
display: inline-block;
}
.amap-compact .amap-week-days div {
clear: both;
margin: 0px;
border-bottom: 0px;
border-right: 0px;
}
.amap-month-names {
display: inline-block;
float: left;
}
.amap-month-names .amap-month-name {
float: left;
}

389
lib/javascript/activitymap/activitymap.js

@ -0,0 +1,389 @@
/* Copyright 2014 Gagarine Yaikhom (The MIT License) */
(function() {
ActivityMap = function(data, config) {
/* Contains an array of data points in the following format:
[
{
"t": 1393009249000, // timestamp in milliseconds, or JS Date() object
"v": 3, // value
} ...
]
*/
this.data = data;
this.id = 'example-activity-map';
this.parent = 'body';
this.hue = 85;
this.title = 'Activity map: ';
this.showTitle = true;
this.showYears = true;
this.timeColumn = 't';
this.valueColumn = 'v';
this.fit = false;
this.compact = true;
if (config) {
if (config.id !== undefined)
this.id = config.id;
if (config.parent !== undefined)
this.parent = config.parent;
if (config.colours !== undefined)
this.colours = config.colours;
if (config.title !== undefined)
this.title = config.title;
if (config.timeColumn !== undefined)
this.timeColumn = config.timeColumn;
if (config.valueColumn !== undefined)
this.valueColumn = config.valueColumn;
if (config.fit !== undefined)
this.fit = config.fit;
if (config.compact !== undefined)
this.compact = config.compact;
if (config.hue !== undefined) {
if (isNaN(config.hue))
throw 'Invalid Hue specification: should be an integer';
else if (config.hue < 0 || config.hue > 360)
throw 'Invalid Hue specification: should be >= 0 and <= 360';
else
this.hue = config.hue;
}
if( config.showTitle != undefined ) this.showTitle = config.showTitle;
if( config.showYears != undefined ) this.showYears = config.showYears;
}
this.luminosityScale = d3.scaleLinear();
this.init();
};
ActivityMap.prototype = {
init: function() {
var me = this, parent;
me.process();
if (typeof me.parent === 'string')
parent = d3.select(me.parent);
me.node = parent.append('div')
.attr('id', me.id)
.attr('class', 'activity-map');
me.parent = parent;
me.months = {
'0': {
'n': 31,
'l': 'January'
},
'1': {
'n': 28,
'l': 'February'
},
'2': {
'n': 31,
'l': 'March'
},
'3': {
'n': 30,
'l': 'April'
},
'4': {
'n': 31,
'l': 'May'
},
'5': {
'n': 30,
'l': 'June'
},
'6': {
'n': 31,
'l': 'July'
},
'7': {
'n': 31,
'l': 'August'
},
'8': {
'n': 30,
'l': 'September'
},
'9': {
'n': 31,
'l': 'October'
},
'10': {
'n': 30,
'l': 'November'
},
'11': {
'n': 31,
'l': 'December'
}
};
me.weeks = 'SMTWTFS';
},
reorderColours: function() {
var me = this, c = me.colours, t, i = 0, j = c.length - 1;
while (i < j) {
t = c[i];
c[i++] = c[j];
c[j--] = t;
}
},
process: function() {
var me = this, data = me.data, record, ltab = { }, lts = {},
y, m, d, i, c, t, v, years = [ ], temp = { },
minY = Number.MAX_VALUE, maxY = 0,
minV = Number.MAX_VALUE, maxV = 0,
tc = me.timeColumn, vc = me.valueColumn;
/* Create a three-dimensional lookup table from the array
of activity data points */
for (i = 0, c = data.length; i < c; ++i) {
record = data[i];
if (record) {
t = record[tc];
if (!(t instanceof Date))
t = new Date(parseInt(t));
y = t.getFullYear();
m = t.getMonth();
d = t.getDate() - 1;
v = parseFloat(record[vc]);
if (ltab[y] === undefined){
ltab[y] = { };
lts[y] = {};
};
if (ltab[y][m] === undefined){
ltab[y][m] = { };
lts[y][m] = {};
};
if (ltab[y][m][d] === undefined){
ltab[y][m][d] = v;
lts[y][m][d] = parseInt(record[tc]) / 1000;
};
/* Get minimum and maximum years that defines the
activity data range */
if (minY > y)
minY = y;
if (maxY < y)
maxY = y;
if (minV > v)
minV = v;
if (maxV < v)
maxV = v;
/* Make an array of the years in range */
if (temp[y] === undefined) {
temp[y] = y;
years.push(y);
}
}
}
me.luminosityScale.domain([0, maxV]);
me.luminosityScale.range([100, 0]);
me.processed = {
'm': minY,
'M': maxY,
'v': minV,
'V': maxV,
'y': years,
'l': ltab,
't': lts
};
},
fillWeekDayInitials: function(parent) {
var me = this, i;
for (i = 0; i < 7; ++i)
parent.append('div')
.attr('class', 'amap-week-name')
.text(me.weeks[i]);
},
addWeekDayContainer: function(parent) {
return parent.append('div')
.attr('class', 'amap-week-days');
},
renderMonth: function(node, y, m, d) {
var me = this, i, j, w, v, t, month = me.months[m],
ltab = me.processed.l, colours = me.colours,
percent;
if (me.compact) {
node.classed('amap-compact', true);
n = node.append('div')
.attr('class', 'amap-month-days');
n.append('div')
.attr('class', 'amap-month-name')
.text(month.l.substring(0,3));
if (me.cellCount === 0) {
week = me.addWeekDayContainer(n);
me.fillWeekDayInitials(week);
week = me.addWeekDayContainer(n);
/* Fill this with empty cells, so that the valid days are
aligned correctly to the week-days */
for (i = 0; i < d; ++i, ++me.cellCount)
week.append('div')
.attr('class', 'amap-empty-day');
}
} else {
n = node.append('div')
.attr('class', 'amap-month');
n.append('div')
.attr('class', 'amap-month-name')
.text(month.l);
n = n.append('div')
.attr('class', 'amap-month-days');
week = me.addWeekDayContainer(n);
me.fillWeekDayInitials(week);
week = me.addWeekDayContainer(n);
/* Fill this with empty cells, so that the valid days are
aligned correctly to the week-days */
for (i = 0; i < d; ++i)
week.append('div')
.attr('class', 'amap-empty-day')
.attr('title', (j + 1) + ' '
+ month.l + ' ' + y);
}
/* Now add cells for the valid days */
for (j = 0, d = month.n; j < d; ++i, ++j) {
if (me.cellCount % 7 === 0)
week = n.append('div')
.attr('class', 'amap-week-days');
try {
v = ltab[y][m][j];
t = me.processed.t[y][m][j];
} catch(e) {
t = -1;
}
if( t > 0 ){
w = week.append('div')
.attr('class', 'amap-week-day')
.attr('title', (j + 1) + ' '
+ month.l + ' ' + y +
(v ? (' : ' + v) : ''))
.attr('onclick', 'loadReportDayTree('+t+');');
} else {
w = week.append('div')
.attr('class', 'amap-week-day')
.attr('title', (j + 1) + ' '
+ month.l + ' ' + y +
(v ? (' : ' + v) : ''));
};
me.cellCount++;
if (i % 7 === 0)
w.classed('amap-week-start', true);
if (v) {
percent = me.luminosityScale(v) + '%';
w.classed('has-value', true)
.style('background-color',
d3.hsl('hsl('
+ me.hue + ','
+ 100 + '%,'
+ percent + ')')
);
}
}
/* weekday for next month */
d = i % 7;
if (!me.compact) {
/* Fill remaining invalid days with empty cells */
while (i++ % 7)
week.append('div')
.attr('class', 'amap-empty-day')
.attr('title', (j + 1) + ' '
+ month.l + ' ' + y);
}
return d;
},
renderYear: function(y) {
var me = this, d, i, m, n;
/* Account for leap-year */
me.months[1].n = y % 4 ? 28 : 29;
n = me.blocks.append('div')
.attr('class', 'amap-year-block')
.attr('year', y);
if( me.showYears ){
n.append('div')
.attr('class', 'amap-year-name')
.text(y);
};
m = n.append('div')
.attr('class', 'amap-month-names')
n = n.append('div')
.attr('class', 'amap-months');
/* Find at what week day the first month of year begins */
d = new Date(y, 0, 1);
d = d.getDay();
for (i = 0; i < 12; ++i)
d = me.renderMonth(n, y, i, d);
if (me.compact) {
n = n.append('div')
.attr('class', 'amap-month-days');
n.append('div')
.attr('class', 'amap-month-name-filler');
week = me.addWeekDayContainer(n);
me.fillWeekDayInitials(week);
}
},
isVisible: function(block, parent) {
var yearDim = block.getBoundingClientRect(),
parentDim = parent.getBoundingClientRect();
return !(yearDim.top > parentDim.bottom ||
yearDim.bottom < parentDim.top);
},
onScroll: function(me) {
var minYear = Number.MAX_VALUE, maxYear = 0, year;
me.blocks.selectAll('.amap-year-block')
.each(function() {
if (me.isVisible(this, me.blocks.node())) {
year = parseInt(d3.select(this).attr('year'));
if (minYear > year)
minYear = year;
if (maxYear < year)
maxYear = year;
}
});
if( me.showTitle ){
if (minYear === maxYear)
me.year.text(me.title + maxYear);
else
me.year.text(me.title + minYear + '-' + maxYear);
};
},
render: function() {
var me = this, i, c, years = me.processed.y;
if( me.showTitle ){
me.year = me.node.append('div')
.attr('class', 'amap-title');
};
me.blocks = me.node.append('div')
.attr('class', 'amap-year-blocks');
me.blocks.on('scroll', function() {
me.onScroll(me);
});
for (i = 0, c = years.length; i < c; ++i) {
me.cellCount = 0;
me.renderYear(years[i]);
}
me.onScroll(me);
me.refit();
},
refit: function() {
var me = this;
if (!me.fit)
me.blocks.style('height',
(parseInt(me.node.style('height'))
- parseInt(me.year.style('height'))) + 'px');
}
};
})();

1
lib/javascript/activitymap/activitymap.min.css

@ -0,0 +1 @@
.activity-map{width:100%;height:100%}.activity-map div{box-sizing:border-box;-moz-box-sizing:border-box}.amap-title{width:100%;color:#333;font-size:13px;font-family:arial;font-weight:bold;text-align:center;padding:10px}.amap-year-blocks{overflow:auto;padding:10px;width:100%;border:1px solid #ddd}.amap-year-block{display:inline-block;float:left}.amap-year-name{display:block;float:left;width:100%;color:#09f;font-family:arial;font-size:18px;padding-top:15px;padding-bottom:5px}.amap-months{display:inline-block;float:left}.amap-month{display:inline-block;margin:10px;height:170px}.amap-month .has-value{border-color:#ccc}.amap-month-name,.amap-month-name-filler{height:24px}.amap-month-name{color:#555;font-size:11px;font-family:arial;font-weight:bold;text-align:center;padding:5px}.amap-empty-day,.amap-week-day,.amap-week-name{width:15px;height:15px;margin:2px;float:left;border:1px solid #eee}.amap-empty-day{background:#fff;border-color:#fff}.amap-week-day{background:#fbfbfb}.amap-week-name{color:#aaa;font-size:10px;font-family:arial;text-align:center;border-color:#fff}.amap-week-start{clear:left}.amap-compact .amap-month-days{float:left}.amap-compact .amap-week-days{display:inline-block}.amap-compact .amap-week-days div{clear:both;margin:0;border-bottom:0;border-right:0}.amap-month-names{display:inline-block;float:left}.amap-month-names .amap-month-name{float:left}

1
lib/javascript/activitymap/activitymap.min.js
File diff suppressed because it is too large
View File

20591
lib/javascript/d3/d3.js
File diff suppressed because it is too large
View File

2
lib/javascript/d3/d3.min.js
File diff suppressed because it is too large
View File

6
lib/javascript/jsapi_dynamic/argus_events.js

@ -0,0 +1,6 @@
//<?php require_once('../../js_asm.php'); ?>
function showEventBus(){
};

18
lib/javascript/jsapi_dynamic/argus_global_vars.js

@ -9,11 +9,12 @@ var ap_title='<?=$AP_DATA['name'];?>';
var winW=<?=intval($CUser->Data['width']);?>;
var winH=<?=intval($CUser->Data['height']);?>;
var my_access=parseInt(<?=intval($CUser->Data['access']);?>);
var initView=parseInt(<?=intval($CUser->Data['last_content_view']);?>);
var content_lvl0= -1;
var content_lvl1= -1;
var content_lvl2= -1;
var content_lvl3= -1;
var contentViewConfig = '<?=$CUser->Data['last_content_view'];?>';
var contentView = Ext.decode( contentViewConfig );
//var content_lvl0= -1;
//var content_lvl1= -1;
//var content_lvl2= -1;
//var content_lvl3= -1;
var SoundMode=<?=($AP_DATA['type']==1)?0:intval($CUser->Data['sound_enable']);?>;
var PanelW = winW;
var PanelH = winH-90;
@ -28,8 +29,8 @@ var nodeTHREEviewers = new Array();
var nodeTHREEanimationId = 0;
var serverIsOnLine = false;
var SelectedSensor = 0;
var MAP_ID = <?=intval($AP_DATA['map_id']);?>;
var MAP_IS_LOCAL = <?=($AP_DATA['map_id']!=0)?intval($AP_DATA['local_binding']):0;?>;
var MAP_ID = <?=$AP_DATA['map_id'];?>;
var MAP_IS_LOCAL = <?=($AP_DATA['map_id']!=0)?$AP_DATA['local_binding']:0;?>;
var MAP_SET=<?php
$QS = "SELECT * FROM `location_maps` WHERE `id`={$AP_DATA['map_id']}";
$R = array();//$DATABASE->Query( $QS );
@ -59,7 +60,8 @@ var SCHEMATIC_SET = <?php
$MD['id']=2;
$MD['type']=2;
$MD['name']='LA Metro Schematic';
$MD['layer_url']='/style/assets/Los_Angeles_Metro_System_Map.png';
//$MD['layer_url']='/style/assets/Los_Angeles_Metro_System_Map.png';
$MD['layer_url']='/style/assets/Los_Angeles_Metro_System_Map_BB.png';
$MD['attribution']='';
$MD['bounds_lx']=0;
$MD['bounds_ly']=0;

163
lib/javascript/jsapi_dynamic/argus_main.js

@ -24,6 +24,10 @@ function ssShowSS() {
ssInterval = window.setInterval( ssShowTime, 333 );
};
ssIsActive = true;
autoRiseEvent = true;
var tt = Ext.getCmp('aer_button');
if( tt != undefined ) tt.toggle( true, true );
updateSSMode( 1 );
};
function ssShowTime(){
document.getElementById('ss_content').style.fontSize = '240px';
@ -69,6 +73,7 @@ function ssHideSS(){
};
ssSetupTimer();
ssIsActive = false;
updateSSMode( 0 );
};
@ -158,35 +163,47 @@ function updateUserScreenResolution( x, y ){
});
};
function setUserContent( c_id ){
initView = c_id;
function updateUserContent(){
var ser_c = Ext.encode( contentView );
if( contentViewConfig != ser_c ) {
Ext.Ajax.request({
url: '/lib/controller/updateUserSettings.php',
params: {
UID: <?=$UserID;?>,
SID: '<?=$Session;?>',
SSS: 26,
CID: ser_c
},
success: function(){
contentViewConfig = ser_c;
},
failure: failureAJAXFunction
});
return true;
};
return false;
};
if( contentView.l == undefined ){
contentView.l =[];
contentView.l[0] = { v: 0, p: '' };
contentView.l[1] = { v: 0, p: '' };
contentView.l[3] = { v: 0, p: '' };
updateUserContent();
};
function updateSSMode( mode ){
Ext.Ajax.request({
url: '/lib/controller/updateUserSettings.php',
params: {
UID: <?=$UserID;?>,
SID: '<?=$Session;?>',
SSS: 26,
CID: initView
},
success: function(){
content_lvl0 = Math.floor( initView / 1000 );
content_lvl1 = Math.floor( ( initView % 1000 )/ 100 );
content_lvl2 = Math.floor( ( initView % 100 )/ 10 );
content_lvl3 = initView % 10;
},
failure: failureAJAXFunction
SSS: 27,
CID: mode
}
});
};
function updateUserContent(){
cid = content_lvl3 + content_lvl2 * 10 + content_lvl1*100 + content_lvl0*1000;
if( initView != cid ) {
setUserContent( cid );
return true;
};
return false;
};
var gSessionValidatorInterval = null;
function sessionValidator(){
@ -243,20 +260,33 @@ function tryKeepScreenAlive(minutes) {
});
}
function showContent( cid ){
var lvl0 = Math.floor( cid / 1000 );
var lvl1 = Math.floor( ( cid % 1000 )/ 100 );
var lvl2 = Math.floor( ( cid % 100 )/ 10 );
var lvl3 = cid % 10;
var refresh = ( lvl0 != content_lvl0 );
if( lvl3 != content_lvl3 ){ content_lvl3 = lvl3; };
if( lvl2 != content_lvl2 ){ content_lvl2 = lvl2; };
if( lvl1 != content_lvl1 ){ content_lvl1 = lvl1; };
if( lvl0 != content_lvl0 ){ content_lvl0 = lvl0; };
updateUserContent();
if( refresh ){
switch( content_lvl0 ){
function changeContent( lvl, ctx, param ){
if( lvl <= contentView.l.length ){
for( i = 0; i< contentView.l.length; i++){
if( i == lvl ){
contentView.l[i].p = param;
contentView.l[i].v = ctx;
} else if( i > lvl ) {
contentView.l[i].p = '';
contentView.l[i].v = 0;
};
};
} else {
contentView.l[lvl]={
v: ctx,
p: ''
};
};
};
function showContent( force ){
if( force || updateUserContent() ){
switch( contentView.l[0].v ){
case 0:{
if( mSesPlay!= null ) {
mSesPlay.dispose();
mSesPlay = null;
};
var tt = Ext.getCmp('tbtn_0');
tt.toggle( true, true );
tt = Ext.getCmp('tbtn_1');
@ -264,14 +294,18 @@ function showContent( cid ){
tt = Ext.getCmp('tbtn_2');
tt.toggle( false, true );
var tP = Ext.getCmp('left_side_menu');
tP.setVisible( false );
tP.setVisible( true );
var tZ = Ext.getCmp('right_side_menu');
tZ.setVisible( false );
//initMonitoring();
initMonitoring();
Ext.getCmp('main_viewport').doLayout();
break;
};
case 1:{
if( mSesPlay!= null ) {
mSesPlay.dispose();
mSesPlay = null;
};
var tt = Ext.getCmp('tbtn_0');
tt.toggle( false, true );
tt = Ext.getCmp('tbtn_1');
@ -282,11 +316,15 @@ function showContent( cid ){
tP.setVisible( true );
var tZ = Ext.getCmp('right_side_menu');
tZ.setVisible( false );
//initReportsView();
initReportsView();
Ext.getCmp('main_viewport').doLayout();
break;
};
case 2:{
if( mSesPlay!= null ) {
mSesPlay.dispose();
mSesPlay = null;
};
var tt = Ext.getCmp('tbtn_0');
tt.toggle( false, true );
tt = Ext.getCmp('tbtn_1');
@ -305,15 +343,35 @@ function showContent( cid ){
};
};
function loadHelpTopic( cid, htopic ){
Ext.Ajax.request({
url: '/lib/controller/getHelpTopic.php',
params: {
HID: htopic,
UID: <?=$UserID;?>,
SID: '<?=$Session;?>',
},
success: function( response, opts ){
var data = Ext.decode(response.responseText);
if( data.status == 'ok' ){
var tPanel = Ext.getCmp( cid );
var res = Ext.decode( data.content );
tPanel.removeAll( true );
tPanel.add( res );
tPanel.doLayout();
};
},
failure: failureAJAXFunction
});
};
Ext.onReady(function(){
if ('wakeLock' in navigator) {
// Screen Wake Lock API supported
tryKeepScreenAlive(10);
};
if( 'wakeLock' in navigator ) tryKeepScreenAlive(10);
doCheckWindowSize();
//loadSystemDevices();
if( <?=intval($CUser->Data['ss_mode']);?> == 1 ) ssShowSS();
gSessionValidatorInterval = window.setInterval( sessionValidator, 1000 );
NotificationStack = new PNotify.Stack({dir1: 'down', firstpos1: 25});
//window.onresize = doCheckWindowSize;
@ -376,7 +434,10 @@ Ext.onReady(function(){
allowDepress: false,
toggleGroup: 'gopa_gopa',
toggleHandler: function( bt, state ){
if( state ) showContent( 0 );
if( state ) {
changeContent(0,0,'');
showContent();
};
}
},{
xtype: 'spacer',
@ -391,8 +452,11 @@ Ext.onReady(function(){
//pressed: (Math.floor(initView/100)==1),
allowDepress: false,
toggleGroup: 'gopa_gopa',
toggleHandler: function( bt, state ){
if( state ) showContent( 1000 );
toggleHandler: function( bt, state ){
if( state ){
changeContent(0,1,'');
showContent();
};
}
},{
xtype: 'spacer',
@ -407,7 +471,10 @@ Ext.onReady(function(){
allowDepress: false,
toggleGroup: 'gopa_gopa',
toggleHandler: function( bt, state ){
if( state ) showContent( 2000 );
if( state ) {
changeContent(0,2,'');
showContent();
};
}
},{
xtype: 'spacer',
@ -481,7 +548,7 @@ Ext.onReady(function(){
width: 180,
minWidth: 180,
maxWidth: 180,
hidden: (Math.floor(initView/100)==0),
hidden: ( contentView.l[1].v == 0 ),
margins: '5 0 5 5',
cmargins:'5 5 5 5',
items: []
@ -522,5 +589,5 @@ Ext.onReady(function(){
items:[]
}]
});
showContent( initView );
showContent( true );
});

293
lib/javascript/jsapi_dynamic/argus_media.js

@ -0,0 +1,293 @@
//<?php require_once('../../js_asm.php'); ?>
var media_log_store = new Ext.data.ArrayStore({
autoDestroy: false,
storeId: 'm_log_store',
idIndex: 0,
fields: [
{name: 'id', type: 'int' },
{name: 'ts', type: 'string'},
{name: 'uuid', type: 'string'},
{name: 'size', type: 'string'},
{name: 'status', type: 'int' },
{name: 'progress', type: 'int'}
]
});
var selectedMediaLogRowId = 0;
var lastMediaLogId = 0;
function mediaProgressRenderer( value, meta, record ){
Ext.defer( function( id ){
var p = new Ext.ProgressBar({
id: 'progress_'+id,
renderTo: 'div_'+id,
animate: false,
width: '100%',
value: 0,
text: 'Procedure Pending',
});
}, 50, undefined, [ record.data.file_id ] );
return '<div id="div_' + record.data.file_id + '"></div>';
};
function mediaStatusRenderer( value, meta, record ){
switch( value ){
case 0: return 'Get Info';
case 1: return 'Transfering';
case 2: return 'Encoding';
case 3: return 'Ready';
};
};
var mediaLogColModel_ops = {
columns: [
//{header: "id", width: 50, align: 'center', css: 'vertical-align: middle;', dataIndex: 'id' },
{header: "<?=$Labels->GetLabel('_DATETIME_');?>", width: 100, align: 'left', css: 'vertical-align: middle;', dataIndex: 'ts' },
{header: "<?=$Labels->GetLabel('_UUID_');?>", fixed: false, align: 'left', css: 'vertical-align: middle;', dataIndex: 'uuid' },
{header: "<?=$Labels->GetLabel('_SIZE_');?>", width: 80, align: 'left', css: 'vertical-align: middle;', dataIndex: 'size' },
{header: " ", width: 80, renderer: mediaStatusRenderer, dataIndex: 'status' }
],
defaults: {
sortable: false,
fixed: true,
menuDisabled: true,
width: 100
}
};
var mediaLogSelModel_ops = {
singleSelect: true,
listeners: {
rowselect: function( sm, row, rec ) {
selectedMediaLogRowId = rec.data.id;
loadMediaItemInfo();
//cWTRowSelectedRange = rec.data.range_m;
//cWTRowSelectedRangeP = rec.data.range;
//todo
//Ext.getCmp('edit_btn_width_table').enable();
}
}
};
function loadMediaItemInfo(){
if( selectedMediaLogRowId ){
stopStatusUpdater();
Ext.Ajax.request({
url: '/lib/controller/getMediaStatus.php',
params: {
MID: selectedMediaLogRowId,
UID: <?=$UserID;?>,
SID: '<?=$Session;?>',
},
success: function( response, opts ){
var data = Ext.decode(response.responseText);
if( data.status == 'ok' ){
var tPanel = Ext.getCmp('media_op_small');
var res = Ext.decode( data.content );
tPanel.removeAll( true );
tPanel.add( res );
tPanel.doLayout();
};
if( tlInterval == null ){
tlInterval = window.setInterval( UpdateMediaItemStatus, 1200 );
};
},
failure: failureAJAXFunction
});
};
};
function UpdateMediaItemStatus(){
if( selectedMediaLogRowId ){
stopStatusUpdater();
Ext.Ajax.request({
url: '/lib/controller/getMediaStatus.php',
params: {
MID: selectedMediaLogRowId,
UID: <?=$UserID;?>,
SID: '<?=$Session;?>',
},
success: function( response, opts ){
var val1D = document.getElementById('my-video');
val1D.src = '/lib/controller/data/8a171d17-978c-eda4-03f1-c1c4123a07a7.mp4';
val1D.play();
setDonatStatus( 34, 0, 34 );
},
failure: failureAJAXFunction
});
} else stopStatusUpdater();
};
var mediaLogArray=[];
function loadMediaLog(){
Ext.Ajax.request({
url: '/lib/controller/getMediaLog.php',
params: {
LID: lastMediaLogId,
UID: <?=$UserID;?>,
SID: '<?=$Session;?>',
},
success: function( response, opts ){
var data = Ext.decode(response.responseText);
if( data.status == 'ok' ){
if( data.log.length ){
//lastMediaLogId = data.log[0].id;
//mediaLogArray = data.log.concat( mediaLogArray );
//if( mediaLogArray.length > 32 ){
// mediaLogArray = mediaLogArray.slice( 0, 31 );
//};
//log_store.removeAll();
//log_store.loadData( mediaLogArray );
if( lastMediaLogId ){
media_log_store.add( data.log );
} else {
media_log_store.removeAll();
media_log_store.loadData( data.log );
};
lastMediaLogId = data.log[0][0];
};
};
if( tlInterval == null ){
tlInterval = window.setInterval( loadMediaLog, 1200 );//, selectedSite );
};
},
failure: failureAJAXFunction
});
};
function loadMediaSettings(){
Ext.Ajax.request({
url: '/lib/controller/getMediaSettings.php',
params: {
LID: lastMediaLogId,
UID: <?=$UserID;?>,
SID: '<?=$Session;?>',
},
success: function( response, opts ){
var data = Ext.decode(response.responseText);
if( data.status == 'ok' ){
var tPanel = Ext.getCmp('media_settings_container');
var res = Ext.decode( data.content );
tPanel.removeAll( true );
tPanel.add( res );
tPanel.doLayout();
tPanel = Ext.getCmp('encoder_op_small');
tPanel.removeAll( true );
tPanel.add({
html: "<div class='setEd_infoPanel' id='NUNU'><?=$Labels->GetLabel('_PLS_SEL_LEFT_ITEM_');?></div>"
});
tPanel.doLayout();
} else {
Ext.Msg.show({
title:'<?=$Labels->GetLabel('_ERROR_');?>',
msg: data.msg,
buttons: Ext.Msg.OK,
icon: Ext.MessageBox.ERROR
});
};
},
failure: failureAJAXFunction
});
};
function showSettingsMedia(){
stopStatusUpdater();
//content_lvl1 = 1;
//content_lvl2 = 4;
var tPanel = Ext.getCmp('main_content');
tPanel.removeAll( true );
tPanel.add({
xtype: 'tabpanel',
frame: false,
id: 'node_settings_content',
border: false,
activeTab: 0,//content_lvl3,
listeners:{
tabchange: function( tp, t ){
switch( t.getId() ){
case 'media_log_tab': {
stopStatusUpdater();
loadMediaLog();
break;
};
case 'media_settings_tab': {
stopStatusUpdater();
loadMediaSettings();
break;
};
};
//updateUserContent();
}
},
items: [{
xtype: 'panel',
id: 'media_log_tab',
title: "<?=$Labels->GetLabel( '_LBL_MEDIA_LOG_' );?>",
layout: 'hbox',
items:[{
xtype: 'panel',
id: 'media_log_container',
flex: 1,
height: PanelH-15,
autoScroll: 'auto',
items:[{
height: PanelH-20,
xtype: 'grid',
id: 'media_log_grid',
border: false,
frame: false,
mode: 'local',
lazyRender: true,
width: '100%',
autoScroll: true,
ds: media_log_store,
cm: new Ext.grid.ColumnModel( mediaLogColModel_ops ),
sm: new Ext.grid.RowSelectionModel( mediaLogSelModel_ops ),
viewConfig: {
forceFit: true
}
}]
},{
xtype: 'panel',
id: 'media_op_small',
flex: 1,
height: PanelH-15,
layout: 'fit',
items:[{
html: "<div class='setEd_infoPanel' id='NUNU'><?=$Labels->GetLabel('_PLS_SEL_LEFT_ITEM_');?></div>"
}]
}]
},{
xtype: 'panel',
id: 'media_settings_tab',
title: "<?=$Labels->GetLabel( '_LBL_MEDIA_SETTINGS_' );?>",
layout: 'hbox',
items:[{
xtype: 'panel',
id: 'media_settings_container',
tbar:[{ xtype: 'spacer', height: 20}],
flex: 1,
height: PanelH-15,
autoScroll: 'auto',
items:[]
},{
xtype: 'panel',
id: 'encoder_op_small',
flex: 1,
height: PanelH-15,
layout: 'fit',
items:[{
html: "<div class='setEd_infoPanel' id='NUNU'><?=$Labels->GetLabel('_PLS_SEL_LEFT_ITEM_');?></div>"
}]
}]
}]
});
tPanel.doLayout();
//oSelectedLine = 0;
loadMediaLog();
};

985
lib/javascript/jsapi_dynamic/argus_monitoring.js

@ -0,0 +1,985 @@
//<?php require_once('../../js_asm.php'); ?>
var monitoringViewLevel = 0;
var mon_selectedEventId = 0;
var mon_selectedPlatform = 0;
var mon_selectedStation = 0;
var mon_selectedTrack = 0;
var mon_selectedModule = 0;
var autoRiseEvent = true;
var activeEvents = [];
var expiredEvents = [];
function imgLoadEvent(){
alert('l c');
};
function createEventTagContent( a ){
var gif='green_2.gif';
var add=','+a.status;
if( a.status == 0 ){
gif='red_2.gif';
};
if( mon_selectedEventId == a.id ){
return '<div id="event_tag_'+a.id+'"class="evt_side_tag_selected" onclick="selectEvent('+a.id+add+');"><table width="100%" border=0><tr><td colspan=2><div class="evt_side_stname">'+a.station_name+'</div></td><td width="18px"><img src="/style/assets/'+gif+'"></td></tr><tr><td><div class="evt_side_plname">'+a.id+' '+a.platform_name+'</div></td><td colspan=2><div class="level_label_title">'+a.track_tag+'</div></td></tr></div>';
};
return '<div id="event_tag_'+a.id+'"class="evt_side_tag" onclick="selectEvent('+a.id+add+');"><table width="100%" border=0><tr><td colspan=2><div class="evt_side_stname">'+a.station_name+'</div></td><td width="18px"><img src="/style/assets/'+gif+'"></td></tr><tr><td><div class="evt_side_plname">'+a.id+' '+a.platform_name+'</div></td><td colspan=2><div class="level_label_title">'+a.track_tag+'</div></td></tr></div>';
};
var GREEN_Icon = L.icon({
iconUrl: '/style/assets/igr.png',
iconSize: [44, 44],
iconAnchor: [22, 22],
popupAnchor: [0, -22]
//shadowUrl: 'leaf-shadow.png',
//shadowSize: [50, 64], // size of the shadow
//shadowAnchor: [4, 62], // the same for the shadow
});
var RED_Icon = L.icon({
iconUrl: '/style/assets/ira.png',
iconSize: [44, 44],
iconAnchor: [22, 22],
popupAnchor: [0, -22]
});
var REDB_Icon = L.icon({
iconUrl: '/style/assets/irabl.gif',
iconSize: [44, 44],
iconAnchor: [22, 22],
popupAnchor: [0, -22]
});
var GREY_Icon = L.icon({
iconUrl: '/style/assets/ign.png',
iconSize: [44, 44],
iconAnchor: [22, 22],
popupAnchor: [0, -22]
});
var GREYN_Icon = L.icon({
iconUrl: '/style/assets/ign.png',
iconSize: [44, 44],
iconAnchor: [22, 22],
popupAnchor: [0, -22]
});
function makePtzMove( me ){
var name = me.target.id;
const myArray = name.split("_");
Ext.Ajax.request({
url: '/lib/controller/doModuleOperations.php',
params: {
UID: <?=$UserID;?>,
SID: '<?=$Session;?>',
OPID: 8,
MID: myArray[3],
MOV: myArray[2]
},
failure: failureAJAXFunction
});
};
function makePtzStop( me ){
var name = me.target.id;
const myArray = name.split("_");
Ext.Ajax.request({
url: '/lib/controller/doModuleOperations.php',
params: {
SITE: <?=$SiteID;?>,
UID: <?=$UserID;?>,
SID: '<?=$Session;?>',
OPID: 8,
MID: myArray[3],
MOV: 0
},
failure: failureAJAXFunction
});
};
function makePtzHome( me ){
var name = me.target.id;
const myArray = name.split("_");
Ext.Ajax.request({
url: '/lib/controller/doModuleOperation.php',
params: {
SITE: <?=$SiteID;?>,
UID: <?=$UserID;?>,
SID: '<?=$Session;?>',
OPID: 9,
MID: myArray[3],
MOV: 0
},
failure: failureAJAXFunction
});
};
var fsDrawID = 0;
function exitFullScreen( evt ){
if( document.fullscreenElement ){
} else {
if( fsDrawID ){
console.log("Leaving fullscreen mode.");
};
};
};
function fullScreen( id = '' ){
if(
id == '' ||
document.fullscreenElement ||
document.webkitFullscreenElement ||
document.mozFullScreenElement ||
document.msFullscreenElement
){
if( document.exitFullscreen ){
document.exitFullscreen();
}else if( document.mozCancelFullScreen ){
document.mozCancelFullScreen();
}else if( document.webkitExitFullscreen ){
document.webkitExitFullscreen();
}else if( document.msExitFullscreen ){
document.msExitFullscreen();
};
if( fsDrawID ){
console.log('resized');
};
}else{
var element = document.getElementById( id );
if( element.requestFullscreen ){
element.requestFullscreen();
}else if( element.mozRequestFullScreen ){
element.mozRequestFullScreen();
}else if( element.webkitRequestFullscreen ){
element.webkitRequestFullscreen(Element.ALLOW_KEYBOARD_INPUT);
}else if( element.msRequestFullscreen ){
element.msRequestFullscreen();
};
};
};
function loadStationViewEvt( e ){
loadStationView( e.target.options.mycustomid );
};
function loadStationView( STT, buba ){
if( buba == undefined ){
autoRiseEvent = false;
} else {
autoRiseEvent = buba;
};
if( mon_selectedEventId ) unselectEvent();
changeContent( 1, 1, STT );
updateUserContent();
Ext.Ajax.request({
url: '/lib/controller/getMonitoringStationView.php',
params: {
STT: STT,
UID: <?=$UserID;?>,
SID: '<?=$Session;?>'
},
success: function( response, opts ){
var data = Ext.decode(response.responseText);
if( data.status == 'ok' ){
monitoringViewLevel = 1;
Ext.getCmp('main_content').removeAll(true);
Ext.getCmp('main_content').add( Ext.decode( data.content ) );
Ext.getCmp('main_content').doLayout();
if( data.pids != undefined ){
if( data.pids.length > 0 ){
//for( i=0; i<data.pids.length; i++ )correctPlatformView( data.pids[i] );
};
};
fetchStatus();
} else {
if( data.status == 'steight' ){
loadPlatformView( data.next_id );
};
};
},
failure: failureAJAXFunction
});
return;
};
function correctPlatformView( id ){
var pp = Ext.getCmp('plat_panel_'+id);
var pawi = pp.getWidth() / 70;
var tt = document.getElementById('plat_table_'+id );
if( tt != null ){
tt.width = 36.5 * pawi +'px';
};
tt = Ext.getCmp('plat_schematics_'+id );
if( tt != null ){
tt.setHeight( 18 * pawi + 2 * 56 );
};
tt = document.getElementById('plat_video_'+id+'_'+pp.getComponent(0).custom);
if( tt != null ){
tt.style.width = 16 * pawi +'px';
tt.style.height = 9 * pawi +'px';
};
tt = document.getElementById('plat_video_'+id+'_'+pp.getComponent(2).custom);
if( tt != null ){
tt.style.width = 16 * pawi +'px';
tt.style.height = 9 * pawi +'px';
};
tt = document.getElementById('plat_video_'+id+'_'+pp.getComponent(3).custom);
if( tt != null ){
tt.style.width = 16 * pawi +'px';
tt.style.height = 9 * pawi +'px';
};
tt = document.getElementById('plat_video_'+id+'_'+pp.getComponent(4).custom);
if( tt != null ){
tt.style.width = 16 * pawi +'px';
tt.style.height = 9 * pawi +'px';
};
};
function correctModuleView( id ){
var juja = Ext.getCmp('module_panel_'+id );
var pawi = juja.getWidth() / 70;
var tt = Ext.getCmp('module_schematics_'+id);
tt.setWidth( 20+35 * pawi );
tt.setHeight( 38+19 * pawi );
tt = document.getElementById('plat_video_div_'+id );
tt.style.width = 32 * pawi +'px';
tt.style.height = 18 * pawi +'px';
pawi = Ext.getCmp('plat_video_panel_'+id);
pawi.setWidth( 32+32 * pawi);
pawi.setHeight( 32+ 18 * pawi);
};
function addSetSessionUI( session_id ){
Ext.Ajax.request({
url: '/lib/controller/doSessionOperations.php',
params: {
SESSION: session_id,
OPID: 2,
OPAR: 0,
UID: <?=$UserID;?>,
SID: '<?=$Session;?>'
},
success: function( response, opts ){
var data = Ext.decode(response.responseText);
if( data.status == 'ok' ){
var tv = Ext.getCmp('trx_view');
if( tv != undefined ){
var tt = Ext.getCmp('sets_ui');
if( tt != undefined ){
tv.remove( tt );
};
tv.add( Ext.decode( data.content ) );
tv.doLayout();
};
};
},
failure: failureAJAXFunction
});
};
function doSessionOperation( session_id, op, param, reload ){
Ext.Ajax.request({
url: '/lib/controller/doSessionOperations.php',
params: {
SESSION: session_id,
OPID: op,
OPAR: param,
UID: <?=$UserID;?>,
SID: '<?=$Session;?>'
},
success: function( response, opts ){
var data = Ext.decode(response.responseText);
if( data.status == 'ok' ){
if( reload ){
};
};
},
failure: failureAJAXFunction
});
};
function loadPlatformView( pid, buba ){
if( buba == undefined ){
autoRiseEvent = false;
} else {
autoRiseEvent = buba;
};
if( mon_selectedEventId ) unselectEvent( mon_selectedEventId );
mon_selectedPlatform = pid;
changeContent( 1, 2, pid );
updateUserContent();
Ext.Ajax.request({
url: '/lib/controller/getMonitoringPlatformView.php',
params: {
PID: mon_selectedPlatform,
UID: <?=$UserID;?>,
SID: '<?=$Session;?>'
},
success: function( response, opts ){
var data = Ext.decode(response.responseText);
if( data.status == 'ok' ){
monitoringViewLevel = 2;
Ext.getCmp('main_content').removeAll(true);
Ext.getCmp('main_content').add( Ext.decode( data.content ) );
Ext.getCmp('main_content').doLayout();
correctPlatformView( data.pid );
fetchStatus();
};
},
failure: failureAJAXFunction
});
return;
};
function loadTrackViewBySession( session_id ){
autoRiseEvent = false;
mSvgElements = [];
Ext.Ajax.request({
url: '/lib/controller/getMonitoringTrackView.php',
params: {
SESSION: session_id,
UID: <?=$UserID;?>,
SID: '<?=$Session;?>'
},
success: function( response, opts ){
var data = Ext.decode(response.responseText);
if( data.status == 'ok' ){
monitoringViewLevel = 3;
mon_selectedTrack = data.track_id;
changeContent( 1, 3, mon_selectedTrack );
updateUserContent();
Ext.getCmp('main_content').removeAll(true);
Ext.getCmp('main_content').add( Ext.decode( data.content ) );
Ext.getCmp('main_content').doLayout();
fetchStatus();
};
},
failure: failureAJAXFunction
});
return;
};
function loadTrackView( tid ){
autoRiseEvent = false;
mon_selectedTrack = tid;
changeContent( 1, 3, mon_selectedTrack );
updateUserContent();
mSvgElements = [];
Ext.Ajax.request({
url: '/lib/controller/getMonitoringTrackView.php',
params: {
TID: mon_selectedTrack,
UID: <?=$UserID;?>,
SID: '<?=$Session;?>'
},
success: function( response, opts ){
var data = Ext.decode(response.responseText);
if( data.status == 'ok' ){
monitoringViewLevel = 3;
mon_selectedPlatform = data.platform_id;
mon_selectedStation = data.station_id;
Ext.getCmp('main_content').removeAll(true);
Ext.getCmp('main_content').add( Ext.decode( data.content ) );
Ext.getCmp('main_content').doLayout();
fetchStatus();
};
},
failure: failureAJAXFunction
});
return;
};
function loadModuleView( pid, mid ){
autoRiseEvent = false;
if( mon_selectedEventId ) unselectEvent( mon_selectedEventId );
changeContent( 1, 4, pid+'-'+mid );
updateUserContent();
Ext.Ajax.request({
url: '/lib/controller/getMonitoringModuleView.php',
params: {
PID: pid,
MID: mid,
UID: <?=$UserID;?>,
SID: '<?=$Session;?>'
},
success: function( response, opts ){
var data = Ext.decode(response.responseText);
if( data.status == 'ok' ){
monitoringViewLevel = 4;
Ext.getCmp('main_content').removeAll(true);
Ext.getCmp('main_content').add( Ext.decode( data.content ) );
Ext.getCmp('main_content').doLayout();
correctModuleView( mid );
fetchStatus();
};
},
failure: failureAJAXFunction
});
return;
};
function loadMapView(){
autoRiseEvent = false;
if( mon_selectedEventId ) unselectEvent( mon_selectedEventId );
Ext.Ajax.request({
url: '/lib/controller/getMonitoringMapView.php',
params: {
UID: <?=$UserID;?>,
SID: '<?=$Session;?>'
},
success: function( response, opts ){
var data = Ext.decode(response.responseText);
if( data.status == 'ok' ){
monitoringViewLevel = 0;
Ext.getCmp('main_content').removeAll(true);
Ext.getCmp('main_content').add( Ext.decode( data.content ) );
Ext.getCmp('main_content').doLayout();
};
},
failure: failureAJAXFunction
});
return;
};
var monitoring_map = null;
var c_icon = null;
var stationMarkers = [];
function initMonitoringMap( map_id, x, y ){
var mapLayers = [];
if( monitoring_map != null ){
monitoring_map.off();
monitoring_map.remove();
monitoring_map = null;
};
monitoring_map = L.map( map_id,{
crs: L.CRS.Simple,
attributionControl: false,
preferCanvas: true,
zoomControl: true,
center: [x,y],
zoom: 0,
minZoom: -3,
maxZoom: 0,
keyboard: false
});
var bounds = [[SCHEMATIC_SET.bounds_lx,SCHEMATIC_SET.bounds_ly], [SCHEMATIC_SET.bounds_rx,SCHEMATIC_SET.bounds_ry]];
var image = L.imageOverlay( SCHEMATIC_SET.layer_url, bounds ).addTo( monitoring_map );
Ext.Ajax.request({
url: '/lib/controller/listStations.php',
params: {
UID: <?=$UserID;?>,
SID: '<?=$Session;?>'
},
success: function( response, opts ){
var data = Ext.decode(response.responseText);
if( data.status == 'ok' ){
for( i=0; i < data.stations.length; i++ ){
stationMarkers[ data.stations[i].id ] = L.marker([data.stations[i].y, data.stations[i].x], { draggable: false, icon: GREY_Icon, zIndexOffset: 1000, mycustomid: data.stations[i].id } ).addTo( monitoring_map ).on('click', loadStationViewEvt );;
};
};
// Ready -> Start Getting data
fetchStatus();
},
failure: failureAJAXFunction
});
};
function getBackToMap(){
autoRiseEvent = true;
changeContent( 1, 0 );
updateUserContent();
loadMapView();
};
function initMonitoring( x, y ){
if( tlInterval!= null ){
window.clearInterval( tlInterval );
tlInterval = null;
timelineObj = null;
};
var tP = Ext.getCmp('left_side_menu');
tP.removeAll( true );
tP.add({
layout:'vbox',
frame: false,
border: false,
items:[{
width: "100%",
html: '<div class="mon_side_tag">Active Alerts</div>'
},{
id: 'sme_inner',
layout:'vbox',
width: "100%",
height: PanelH/2,
frame: false,
border: false,
items:[]
},{
width: "100%",
html: '<div class="mon_side_tag">Expired Alerts</div>'
},{
id: 'sme_outer',
layout:'vbox',
width: "100%",
height: PanelH/2,
frame: false,
border: true,
items:[]
}]
});
tP.doLayout();
monitoringViewLevel = contentView.l[1].v;
switch( monitoringViewLevel ){
case 0:{
loadMapView();
break;
};
case 1:{
loadStationView( parseInt( contentView.l[1].p ), autoRiseEvent );
break;
};
case 2:{
loadPlatformView( parseInt( contentView.l[1].p ), autoRiseEvent );
break;
};
case 3:{
loadTrackView( parseInt( contentView.l[1].p ), autoRiseEvent );
break;
};
case 4:{
var tA = contentView.l[1].p.split('-');
a = parseInt( tA[0] );
b = parseInt( tA[1] );
loadModuleView( a, b );
break;
};
case 5:{
selectEvent( parseInt( contentView.l[1].p ), true );
break;
};
};
Ext.getCmp('main_content').doLayout();
};
var statusLTS = 0;
var statusLID = 0;
function manageSideTags( tag_area, buba ){
var tP = Ext.getCmp( tag_area );
if( tP != undefined ){
if( buba != undefined ){
if( buba.length ){
var idx_a = 0;
//alert( tag_area + ' has '+tP.items.getCount() );
while( a = tP.getComponent( idx_a ) ){
var f=false;
for( var zz=0; zz < buba.length; zz++ ){
if( a.getId() == 'tag_panel_'+buba[zz].id ){
f = true;
break;
};
};
if( !f ) {
tt--;
tP.remove( a, true );
} else idx_a++;
};
tP.doLayout();
var aa = tP.items.getRange();
var tt = aa.length;
for( var zz=0; zz < buba.length; zz++ ){
var f=false;
for( var i=0; i < aa.length; i++ ){
if( aa[i].getId() == 'tag_panel_'+buba[zz].id ){
f = true;
break;
};
};
if( !f ){
tP.insert( 0,{
id: 'tag_panel_'+buba[zz].id,
width: "100%",
html: createEventTagContent( buba[zz] )
});
tt++;
};
if( tt > 32 ){
tP.remove( aa[31], true );
tt--;
};
};
if( tag_area == 'sme_inner' ){
// Active
activeEvents = [];
for( var zz=0; zz < buba.length; zz++ ) activeEvents[zz]={id: buba[zz].id};
} else {
// Expired
expiredEvents = [];
for( var zz=0; zz < buba.length; zz++ ) expiredEvents[zz]={id: buba[zz].id};
};
} else {
tP.removeAll( true );
if( tag_area == 'sme_inner' ){
// Active
activeEvents = [];
} else {
// Expired
expiredEvents = [];
};
};
} else {
tP.removeAll( true );
if( tag_area == 'sme_inner' ){
// Active
activeEvents = [];
} else {
// Expired
expiredEvents = [];
};
};
tP.doLayout();
};
};
var mSvgElements = [];
function fetchStatus(){
if( tlInterval!= null ){
window.clearTimeout( tlInterval );
tlInterval = null;
};
switch(monitoringViewLevel){
case 0:{
var ll = monitoring_map.getCenter();
CX = ll.lat;
CY = ll.lng;
ajax_params = {
VLVL: monitoringViewLevel,
UID: <?=$UserID;?>,
SID: '<?=$Session;?>',
LTS: statusLTS,
LID: statusLID,
MX: CX,
MY: CY
};
break;
};
case 1:{
ajax_params = {
VLVL: monitoringViewLevel,
UID: <?=$UserID;?>,
SID: '<?=$Session;?>',
LTS: statusLTS,
LID: statusLID,
SSID: mon_selectedStation
};
break;
};
case 2:{
ajax_params = {
VLVL: monitoringViewLevel,
UID: <?=$UserID;?>,
SID: '<?=$Session;?>',
PID: mon_selectedPlatform,
LTS: statusLTS,
LID: statusLID
};
break;
};
case 3:{
ajax_params = {
VLVL: monitoringViewLevel,
UID: <?=$UserID;?>,
SID: '<?=$Session;?>',
TID: mon_selectedTrack,
LTS: statusLTS,
LID: statusLID
};
break;
};
case 4:{
ajax_params = {
VLVL: monitoringViewLevel,
UID: <?=$UserID;?>,
SID: '<?=$Session;?>',
MID: mon_selectedModule,
LTS: statusLTS,
LID: statusLID
};
break;
};
case 5:{
ajax_params = {
VLVL: monitoringViewLevel,
UID: <?=$UserID;?>,
SID: '<?=$Session;?>',
SESSION: mon_selectedEventId,
LTS: statusLTS,
LID: statusLID
};
break;
};
};
Ext.Ajax.request({
url: '/lib/controller/getStatus.php',
params: ajax_params,
success: function( response, opts ){
var data = Ext.decode(response.responseText);
if( data.status == 'ok' ){
if( monitoringViewLevel == data.VLVL ){
statusLTS = data.LTS;
//debugger;
switch( monitoringViewLevel ){
case 0:{
for( i=0; i < data.station_ids.length; i++ ){
switch( data.station_status[i] ){
case 0: {
if( stationMarkers[data.station_ids[i]].options.icon != GREY_Icon ) stationMarkers[data.station_ids[i]].setIcon( GREY_Icon );
break;
};
case 1: {
if( stationMarkers[data.station_ids[i]].options.icon != GREEN_Icon ) stationMarkers[data.station_ids[i]].setIcon( GREEN_Icon );
break;
};
case 2: {
if( stationMarkers[data.station_ids[i]].options.icon != GREY_Icon ) stationMarkers[data.station_ids[i]].setIcon( GREY_Icon );
break;
};
case 3: {
if( ( Math.floor(Date.now() / 1000) % 2 ) == 0 ) {
if( stationMarkers[data.station_ids[i]].options.icon != GREEN_Icon ) stationMarkers[data.station_ids[i]].setIcon( GREEN_Icon );
} else {
if( stationMarkers[data.station_ids[i]].options.icon != RED_Icon ) stationMarkers[data.station_ids[i]].setIcon( RED_Icon );
};
break;
};
case 4: {
if( stationMarkers[data.station_ids[i]].options.icon != REDB_Icon ) stationMarkers[data.station_ids[i]].setIcon( REDB_Icon );
break;
};
};
};
break;
};
case 2:{
if( data.modules != undefined ){
for( var i=0; i< data.modules.length; i++){
if( data.modules[i].status > 0 ){
var tt = document.getElementById('plat_video_'+mon_selectedPlatform+'_'+data.modules[i].id );
if( tt.src != data.modules[i].img ) tt.src = data.modules[i].img;
tt = document.getElementById('plat_status_'+mon_selectedPlatform+'_'+data.modules[i].id );
switch( data.modules[i].status ){
case 1: tt.innerHTML='<img src="/style/assets/bul_gray.png">'; break;
case 2: tt.innerHTML='<img src="/style/assets/bul_green.png">'; break;
case 3: tt.innerHTML='<img src="/style/assets/bul_green_rst.png">'; break;
};
};
};
};
if( data.events != undefined ){
};
if( data.scada != undefined ){
};
break;
};
case 3:{
if( data.active_session_id != undefined ){
if( mon_selectedEventId != data.active_session_id ){
mon_selectedEventId = data.active_session_id;
for( var zz=0; zz< activeEvents.length; zz++ ){
var tP = document.getElementById('event_tag_'+activeEvents[zz].id );
if( tP != undefined ){
tP.className ='';
if( activeEvents[zz].id == mon_selectedEventId ){
tP.classList.add("evt_side_tag_selected");
} else {
tP.classList.add("evt_side_tag");
};
};
};
addSetSessionUI( mon_selectedEventId );
};
};
if( data.modules != undefined ){
for( var i=0; i< data.modules.length; i++){
if( data.modules[i].status > 0 ){
var tt = document.getElementById('plat_video_img_'+data.modules[i].id );
if( tt.src != data.modules[i].img ) tt.src = data.modules[i].img;
tt = document.getElementById('plat_status_'+mon_selectedPlatform+'_'+data.modules[i].id );
var tt = document.getElementById('cam_ctrl_'+data.modules[i].id );
if( data.modules[i].status > 1 ) {
if( tt.style.display != 'block' )tt.style.display = 'block';
} else {
if( tt.style.display != 'none' )tt.style.display = 'none';
};
};
};
};
if( data.events != undefined ){
var sid = data.events.length - 1;
if( sid > -1 ){
for( var i=0; i< max_grad_levels; i++ ){
var cid = sid-i;
var csize = getSize( i );
//debugger;
if( typeof mSvgElements[i] === 'undefined') {
if( cid > -1 ){
var svgns = "http://www.w3.org/2000/svg";
mSvgElements[i] = document.createElementNS(svgns, 'rect');
mSvgElements[i].setAttribute('x', data.events[cid].x+'%');
mSvgElements[i].setAttribute('y', ''+(50+(100-csize)/2) );
mSvgElements[i].setAttribute('height', ''+csize);
mSvgElements[i].setAttribute('width', ''+csize);
mSvgElements[i].setAttribute('fill', '#FF0000'+getTransperecy(i));
var tt = document.getElementById('svgTrackMap');
var zz = document.getElementById('scheme_anch');
tt.insertBefore( mSvgElements[i], zz );
//document.getElementById('svgTrackMap').appendChild(this.mSvgElements[i]);
};
} else {
if( cid > -1 ){
mSvgElements[i].setAttribute('x', data.events[cid].x+'%');
mSvgElements[i].setAttribute('y', ''+(50+(100-csize)/2) );
mSvgElements[i].setAttribute('height', ''+csize);
mSvgElements[i].setAttribute('width', ''+csize);
mSvgElements[i].setAttribute('fill', '#FF0000'+getTransperecy(i) );
} else {
mSvgElements[i].setAttribute('fill', '#FF000000');
};
};
};
} else
for( var i=0; i< max_grad_levels; i++ )
if( typeof mSvgElements[i] !== 'undefined') mSvgElements[i].setAttribute('fill', '#FF000000');
};
if( data.scada != undefined ){
};
break;
};
};
manageSideTags('sme_inner', data.actual );
manageSideTags('sme_outer', data.expired );
};
};
tlInterval = window.setTimeout( fetchStatus, 333, selectedSite );
},
failure: failureAJAXFunction
});
};
function selectEvent( ii, bb ){
mon_selectedEventId = ii;
if( tlInterval!= null ){
window.clearTimeout( tlInterval );
tlInterval = null;
};
for( var zz=0; zz< expiredEvents.length; zz++ ){
var tP = document.getElementById('event_tag_'+expiredEvents[zz].id );
if( tP != undefined ){
tP.className ='';
if( expiredEvents[zz].id == mon_selectedEventId ){
tP.classList.add("evt_side_tag_selected");
} else {
tP.classList.add("evt_side_tag");
};
};
};
for( var zz=0; zz< activeEvents.length; zz++ ){
var tP = document.getElementById('event_tag_'+activeEvents[zz].id );
if( tP != undefined ){
tP.className ='';
if( activeEvents[zz].id == mon_selectedEventId ){
tP.classList.add("evt_side_tag_selected");
} else {
tP.classList.add("evt_side_tag");
};
};
};
if( bb ){
loadMonitoringSessionView( ii );
} else {
loadTrackViewBySession( ii );
};
};
function setSessionStatus( a , b ){
Ext.Ajax.request({
url: '/lib/controller/doSessionOperations.php',
params: {
SESSION: a,
OPID: 2,
OPAR: b,
UID: <?=$UserID;?>,
SID: '<?=$Session;?>'
},
success: function( response, opts ){
var data = Ext.decode(response.responseText);
if( data.status == 'ok' ){
var tv = Ext.getCmp('trx_view');
if( tv != undefined ){
var tt = Ext.getCmp('sets_ui');
if( tt != undefined ){
tv.remove( tt );
};
tv.add( Ext.decode( data.content ) );
tv.doLayout();
};
};
},
failure: failureAJAXFunction
});
};
function unselectEvent( ii ){
mon_selectedEventId = 0;
for( var zz=0; zz< activeEvents.length; zz++ ){
var tP = document.getElementById('event_tag_'+activeEvents[zz].id );
if( tP != undefined ){
tP.className ='';
tP.classList.add("evt_side_tag");
};
};
for( var zz=0; zz< expiredEvents.length; zz++ ){
var tP = document.getElementById('event_tag_'+expiredEvents[zz].id );
if( tP != undefined ){
tP.className ='';
tP.classList.add("evt_side_tag");
};
};
};
function loadMonitoringSessionView( session_id ){
autoRiseEvent = false;
mon_selectedEventId = session_id;
changeContent( 1, 5, mon_selectedEventId );
updateUserContent();
Ext.Ajax.request({
url: '/lib/controller/getMonitoringSessionView.php',
params: {
SESSION: mon_selectedEventId,
UID: <?=$UserID;?>,
SID: '<?=$Session;?>'
},
success: function( response, opts ){
var data = Ext.decode(response.responseText);
if( data.status == 'ok' ){
monitoringViewLevel = 5;
if( mSesPlay!= null ) {
mSesPlay.dispose();
mSesPlay = null;
};
Ext.getCmp('main_content').removeAll(true);
Ext.getCmp('main_content').add( Ext.decode( data.content ) );
Ext.getCmp('main_content').doLayout();
mSesPlay = new argusSessionPlayer( mon_selectedEventId );
fetchStatus();
};
},
failure: failureAJAXFunction
});
};

1858
lib/javascript/jsapi_dynamic/argus_reports.js
File diff suppressed because it is too large
View File

736
lib/javascript/jsapi_dynamic/argus_settings.js
File diff suppressed because it is too large
View File

lib/javascript/jsapi_dynamic/mojo_users.js → lib/javascript/jsapi_dynamic/argus_users.js

1
lib/javascript/jsapi_dynamic/mojo_dashboard.js

@ -1155,6 +1155,7 @@ function Drawss2DTargets( k, b ){
var lastNotificationID = 0;
function setDonatStatus( node_id, param_id, value ){
alert('zaza');
var val1D = document.getElementById('status_'+node_id+'_donut'+param_id+'_segment1');
var val2D = document.getElementById('status_'+node_id+'_donut'+param_id+'_segment2');
var val3D = document.getElementById('status_'+node_id+'_donut'+param_id+'_segment3');

269
lib/javascript/jsapi_dynamic/mojo_logs.js

@ -0,0 +1,269 @@
//<?php require_once('../../js_asm.php'); ?>
var um_selected_log_id = 0;
var um_server_log_store = new Ext.data.JsonStore({
root: 'records',
totalProperty: 'totalCount',
idProperty: 'id',
remoteSort: true,
fields: [{
name: 'id',
type: 'int'
},{
name: 'type',
type: 'string'
},{
name: 'ts',
type: 'string'
},{
name: 'ptr',
type: 'string'
},{
name: 'module',
type: 'string'
},{
name: 'msg',
type: 'string'
}],
proxy : new Ext.data.HttpProxy({
method: 'POST',
prettyUrls: false,
url: '/lib/controller/listServerLog.php',
headers: {
UID: <?=$UserID;?>,
SID: '<?=$Session;?>'
}
})
});
var um_server_log_col_model_opt = {
columns: [
{header: "<?=$Labels->GetLabel("_ID_");?>", width: 50, sortable: false, menuDisabled: true, align: 'center', fixed: true, css: 'vertical-align: middle;', dataIndex: 'id' },
{header: "<?=$Labels->GetLabel("_DATETIME_");?>", width: 150, sortable: false, fixed: true, menuDisabled: true, align: 'left', css: 'vertical-align: middle;', dataIndex: 'ts' },
{header: "<?=$Labels->GetLabel("_POINTER_");?>", width: 100, sortable: false, fixed: true, menuDisabled: true, /*renderer: camCapRenderer,*/ dataIndex: 'ptr' },
{header: "<?=$Labels->GetLabel("_MODULE_");?>", width: 100, sortable: false, fixed: true, menuDisabled: true, /*renderer: camCapRenderer,*/ dataIndex: 'module' },
{header: "<?=$Labels->GetLabel("_INFO_");?>", resizable: true, sortable: false, fixed: false, flex: 1, menuDisabled: true, align: 'left', css: 'vertical-align: middle;', dataIndex: 'msg' }
],
defaults: {
sortable: false,
menuDisabled: true,
width: 100
}
};
var um_log_sel_model_opt = {
singleSelect: true,
listeners: {
rowselect: function(sm, row, rec) {
um_selected_log_id = rec.data.id;
}
}
};
var um_access_log_store = new Ext.data.JsonStore({
root: 'records',
totalProperty: 'totalCount',
idProperty: 'id',
remoteSort: true,
fields: [{
name: 'id',
type: 'int'
},{
name: 'user',
type: 'string'
},{
name: 'ts',
type: 'string'
},{
name: 'cmd',
type: 'int'
},{
name: 'data_line',
type: 'string'
}],
proxy : new Ext.data.HttpProxy({
method: 'POST',
prettyUrls: false,
url: '/lib/controller/listAccessLog.php',
headers: {
UID: <?=$UserID;?>,
SID: '<?=$Session;?>'
}
})
});
function um_action_renderer( val ){
switch( val ){
case 1: return "<?=$Labels->GetLabel("_LOGIN_");?>";
case 13: return "<?=$Labels->GetLabel("_ACCESS_DENIED_");?>";
case 145: return "<?=$Labels->GetLabel("_SCREEN_RESIZE_");?>";
};
return "unknown action";
};
var um_access_log_col_model_opt = {
columns: [
{header: "<?=$Labels->GetLabel("_ID_");?>", width: 50, sortable: false, menuDisabled: true, align: 'center', fixed: true, css: 'vertical-align: middle;', dataIndex: 'id' },
{header: "<?=$Labels->GetLabel("_USER_");?>",width: 80, sortable: false, fixed: true, menuDisabled: true, /*renderer: camCapRenderer,*/ dataIndex: 'user' },
{header: "<?=$Labels->GetLabel("_DATETIME_");?>", width: 150, sortable: false, renderer: unix_ts_renderer, fixed: true, menuDisabled: true, align: 'left', css: 'vertical-align: middle;', dataIndex: 'ts' },
{header: "<?=$Labels->GetLabel("_ACTION_");?>", width: 150, sortable: false, fixed: true, menuDisabled: true, align: 'left', css: 'vertical-align: middle;', renderer: um_action_renderer, dataIndex: 'cmd' },
{header: "<?=$Labels->GetLabel("_INFO_");?>", resizable: true, sortable: false, fixed: false, flex: 1, dataindex: 'data_line' }
],
defaults: {
sortable: false,
menuDisabled: true,
width: 100
}
};
var um_access_log_sel_model_opt = {
singleSelect: true,
listeners: {
rowselect: function(sm, row, rec) {
um_selected_log_id = rec.data.id;
}
}
};
function loadAccessLog(){
if( tlInterval!= null ){
window.clearInterval( tlInterval );
tlInterval = null;
timelineObj = null;
};
var tPanel = Ext.getCmp('main_content');
tPanel.removeAll( true );
Ext.getCmp('main_content').setTitle( '<?=$Labels->GetLabel("_ACC_LOG_");?>' );
tPanel.add({
columnWidth: 1.0,
frame: false,
border: false,
items: [{
xtype: 'panel',
layout: 'fit',
layoutConfig: {
align : 'stretch',
pack : 'start'
},
height: PanelH-5,
flex: 1,
frame: false,
border: false,
items:{
frame: false,
height: PanelH-5,
xtype: 'grid',
forceFit: true,
viewConfig: {
forceFit: true,
getRowClass: function( record, rowIndex, rowParams, store){
switch( record.get('cmd') ){
case 1: return 'row-level01';
case 2: return 'row-level02';
case 3: return 'row-level03';
case 4: return 'row-level04';
case 145: return 'row-level05';
};
return '';
}
},
ds: um_access_log_store,
cm: new Ext.grid.ColumnModel( um_access_log_col_model_opt ),
sm: new Ext.grid.RowSelectionModel( um_log_sel_model_opt )
},tbar: [{
xtype: 'button',
id: 'um_access_reload_btn',
text: '<?=$Labels->GetLabel("_RELOAD_");?>',
handler: function(){
um_access_log_store.reload();
}
}]
}]
});
tPanel.doLayout();
um_selected_log_id = 0;
um_access_log_store.reload();
};
function loadServerLog(){
if( tlInterval!= null ){
window.clearInterval( tlInterval );
tlInterval = null;
timelineObj = null;
};
var tPanel = Ext.getCmp('main_content');
tPanel.removeAll( true );
Ext.getCmp('main_content').setTitle( '<?=$Labels->GetLabel("_SERV_LOG_");?>' );
tPanel.add({
columnWidth: 1.0,
frame: false,
border: false,
items: [{
xtype: 'panel',
layout: 'fit',
layoutConfig: {
align : 'stretch',
pack : 'start'
},
height: PanelH-5,
flex: 1,
frame: false,
border: false,
items:{
frame: false,
height: PanelH-5,
xtype: 'grid',
forceFit: true,
viewConfig: {
forceFit: true,
getRowClass: function( record, rowIndex, rowParams, store){
switch( record.get('type') ){
case '01': return 'row-level01';
case '02': return 'row-level02';
case '03': return 'row-level03';
case '04': return 'row-level04';
case '05': return 'row-level05';
};
return '';
}
},
ds: um_server_log_store,
cm: new Ext.grid.ColumnModel( um_server_log_col_model_opt ),
sm: new Ext.grid.RowSelectionModel( um_log_sel_model_opt )
},tbar: [{
xtype: 'button',
id: 'um_server_reload_btn',
text: '<?=$Labels->GetLabel("_RELOAD_");?>',
handler: function(){
um_server_log_store.reload();
}
},{
xtype: 'button',
id: 'um_server_clean_btn',
text: '<?=$Labels->GetLabel("_CLEAR_");?>',
handler: function(){
Ext.Ajax.request({
url: '/lib/controller/clearServerLog.php',
params: {
NID: NID,
UID: <?=$UserID;?>,
SID: '<?=$Session;?>'
},
success: function( response, opts ){
um_server_log_store.reload();
}
});
}
}]
}]
});
tPanel.doLayout();
um_selected_log_id = 0;
um_server_log_store.reload();
tlInterval = window.setInterval( um_server_log_store.reload, 333, 0 );
};

101
lib/javascript/jsapi_dynamic/mojo_monitoring.js

@ -1,101 +0,0 @@
//<?php require_once('../../js_asm.php'); ?>
function updateDashBoardItemLayout( id, x, y ){
Ext.Ajax.request({
url: '/lib/controller/updateDashBoardItems.php',
params: {
SITE: <?=$SiteID;?>,
UID: <?=$UserID;?>,
SID: '<?=$Session;?>',
PANEL: id,
X: x,
Y: y
},
success: function( response, opts ){
//var data = Ext.decode(response.responseText);
//var tPanel = Ext.getCmp('main_portal');
//tPanel.removeAll(true);
//for( i=0; i < data.length; i++) tPanel.add( data[i] );
//tPanel.doLayout();
},
failure: failureAJAXFunction
});
};
function initMonitoring(){
if( tlInterval!= null ){
window.clearInterval( tlInterval );
tlInterval = null;
timelineObj = null;
};
Ext.Ajax.request({
url: '/lib/controller/getDashBoardItems.php',
params: {
SITE: <?=$SiteID;?>,
UID: <?=$UserID;?>,
SID: '<?=$Session;?>'
},
success: function( response, opts ){
var data = Ext.decode(response.responseText);
Ext.getCmp('main_content').setTitle( '<?=$Labels->GetLabel('_SYS_DASHBOARD_');?>' );
Ext.getCmp('main_content').removeAll(true);
Ext.getCmp('main_content').add({
xtype: 'portal',
id: 'main_portal',
frame: false,
border: false,
items:{
html: ''
},
listeners:{
drop: function( a ){
updateDashBoardItemLayout( a.panel.id, a.columnIndex, a.position );
}
}
});
Ext.getCmp('main_content').doLayout();
var tPanel = Ext.getCmp('main_portal');
tPanel.removeAll(true);
nodeDashboardStatuses = new Array();
for( i=0; i < data.length; i++) tPanel.add( data[i] );
tPanel.doLayout();
$('img[data-enlargeable]').addClass('img-enlargeable').click(function() {
var src = $(this).attr('src');
var modal;
function removeModal() {
modal.remove();
$('body').off('keyup.modal-close');
}
modal = $('<div>').css({
background: 'RGBA(0,0,0,.5) url(' + src + ') no-repeat center',
backgroundSize: 'contain',
width: '100%',
height: '100%',
position: 'fixed',
zIndex: '10000',
top: '0',
left: '0',
cursor: 'zoom-out'
}).click(function() {
removeModal();
}).appendTo('body');
//handling ESC
$('body').on('keyup.modal-close', function(e) {
if (e.key === 'Escape') {
removeModal();
}
});
});
tlInterval = window.setInterval( fetchSiteStatus, 333, selectedSite );
},
failure: failureAJAXFunction
});
//var tPanel = Ext.getCmp('main_content');
//tPanel.removeAll( true );
//tPanel.add({
// xtype: 'panel',
// html: 'KOKO'
//});
//tPanel.doLayout();
};

1
lib/javascript/jsapi_dynamic/rgoose_dashboard.js

@ -556,6 +556,7 @@ function Draw2DTargets( k, b ){
var lastNotificationID = 0;
function setDonatStatus( node_id, param_id, value ){
alert('zaza');
var val1D = document.getElementById('status_'+node_id+'_donut'+param_id+'_segment1');
var val2D = document.getElementById('status_'+node_id+'_donut'+param_id+'_segment2');
var val3D = document.getElementById('status_'+node_id+'_donut'+param_id+'_segment3');

4
lib/javascript/jsapi_static/argus_general.js

@ -298,7 +298,9 @@ function setDonatStatus( node_id, param_id, value ){
var val1D = document.getElementById('status_'+node_id+'_donut'+param_id+'_segment1');
var val2D = document.getElementById('status_'+node_id+'_donut'+param_id+'_segment2');
var val3D = document.getElementById('status_'+node_id+'_donut'+param_id+'_segment3');
if( val1D == null ){
return;
};
var val1 = (value>-1)?value:0;
var val2 = (value>-1)?100 - val1:0;//data.nodes[i].cpu5 * 100;
var val3 = (value>-1)?0:100;//data.nodes[i].cpu15 * 100;

1
lib/javascript/plupload/SECURITY.md

@ -0,0 +1 @@
Tiny values the work of security researchers in improving the security of technology products worldwide. We welcome researchers who wish to responsibly disclose vulnerabilities in our products or systems. Note that we do not offer any “bug bounty” program or any form of payment for disclosed vulnerabilities. If you would like to report a vulnerability, please email infosec@tiny.cloud.

27
lib/javascript/plupload/bower.json

@ -0,0 +1,27 @@
{
"name": "plupload",
"license": "AGPLv3",
"authors": [
"Davit Barbakadze <davit.barbakadze@ephox.com>"
],
"homepage": "http://plupload.com",
"repository": {
"type": "git",
"url": "https://github.com/moxiecode/plupload.git"
},
"main": [
"./js/plupload.full.min.js"
],
"ignore": [
"tests/",
"src/",
"build/",
"examples/",
"Jakefile.js",
"package.json",
"bower.json",
"composer.json",
"README.md",
".*"
]
}

85
lib/javascript/plupload/examples/custom.html

@ -0,0 +1,85 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Plupload - Custom example</title>
<!-- production -->
<script type="text/javascript" src="../js/plupload.full.min.js"></script>
<!-- debug
<script type="text/javascript" src="../js/moxie.js"></script>
<script type="text/javascript" src="../js/plupload.dev.js"></script>
-->
</head>
<body style="font: 13px Verdana; background: #eee; color: #333">
<h1>Custom example</h1>
<p>Shows you how to use the core plupload API.</p>
<div id="filelist">Your browser doesn't have Flash, Silverlight or HTML5 support.</div>
<br />
<div id="container">
<a id="pickfiles" href="javascript:;">[Select files]</a>
<a id="uploadfiles" href="javascript:;">[Upload files]</a>
</div>
<br />
<pre id="console"></pre>
<script type="text/javascript">
// Custom example logic
var uploader = new plupload.Uploader({
runtimes : 'html5,flash,silverlight,html4',
browse_button : 'pickfiles', // you can pass an id...
container: document.getElementById('container'), // ... or DOM Element itself
url : 'upload.php',
flash_swf_url : '../js/Moxie.swf',
silverlight_xap_url : '../js/Moxie.xap',
filters : {
max_file_size : '10mb',
mime_types: [
{title : "Image files", extensions : "jpg,gif,png"},
{title : "Zip files", extensions : "zip"}
]
},
init: {
PostInit: function() {
document.getElementById('filelist').innerHTML = '';
document.getElementById('uploadfiles').onclick = function() {
uploader.start();
return false;
};
},
FilesAdded: function(up, files) {
plupload.each(files, function(file) {
document.getElementById('filelist').innerHTML += '<div id="' + file.id + '">' + file.name + ' (' + plupload.formatSize(file.size) + ') <b></b></div>';
});
},
UploadProgress: function(up, file) {
document.getElementById(file.id).getElementsByTagName('b')[0].innerHTML = '<span>' + file.percent + "%</span>";
},
Error: function(up, err) {
document.getElementById('console').appendChild(document.createTextNode("\nError #" + err.code + ": " + err.message));
}
}
});
uploader.init();
</script>
</body>
</html>

34
lib/javascript/plupload/examples/dump.php

@ -0,0 +1,34 @@
<?php
#!! IMPORTANT:
#!! this file is just an example, it doesn't incorporate any security checks and
#!! is not recommended to be used in production environment as it is. Be sure to
#!! revise it and customize to your needs.
die("Make sure that you enable some form of authentication before removing this line.");
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Plupload - Form dump</title>
</head>
<body style="font: 13px Verdana; background: #eee; color: #333">
<h1>Post dump</h1>
<p>Shows the form items posted.</p>
<table>
<tr>
<th>Name</th>
<th>Value</th>
</tr>
<?php $count = 0; foreach ($_POST as $name => $value) { ?>
<tr class="<?php echo $count % 2 == 0 ? 'alt' : ''; ?>">
<td><?php echo htmlentities(stripslashes($name)) ?></td>
<td><?php echo nl2br(htmlentities(stripslashes($value))) ?></td>
</tr>
<?php } ?>
</table>
</body>
</html>

217
lib/javascript/plupload/examples/events.html

@ -0,0 +1,217 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Plupload - Events example</title>
<!-- production -->
<script type="text/javascript" src="../js/plupload.full.min.js"></script>
<!-- debug
<script type="text/javascript" src="../js/moxie.js"></script>
<script type="text/javascript" src="../js/plupload.dev.js"></script>
-->
</head>
<body style="font: 13px Verdana; background: #eee; color: #333">
<h1>Events example</h1>
<div id="container">
<a id="pickfiles" href="javascript:;">[Select files]</a>
<a id="uploadfiles" href="javascript:;">[Upload files]</a>
</div>
<br />
<pre id="console"></pre>
 
<script type="text/javascript">
var uploader = new plupload.Uploader({
        // General settings
        runtimes : 'silverlight,html4',
browse_button : 'pickfiles', // you can pass in id...
        url : 'upload.php',
        chunk_size : '1mb',
        unique_names : true,
 
        // Resize images on client-side if we can
        resize : { width : 320, height : 240, quality : 90 },
        
        filters : {
            max_file_size : '10mb',
// Specify what files to browse for
            mime_types: [
                {title : "Image files", extensions : "jpg,gif,png"},
                {title : "Zip files", extensions : "zip"}
            ]
        },
 
flash_swf_url : '../js/Moxie.swf',
silverlight_xap_url : '../js/Moxie.xap',
         
        // PreInit events, bound before the internal events
        preinit : {
            Init: function(up, info) {
                log('[Init]', 'Info:', info, 'Features:', up.features);
            },
 
            UploadFile: function(up, file) {
                log('[UploadFile]', file);
 
                // You can override settings before the file is uploaded
                // up.setOption('url', 'upload.php?id=' + file.id);
                // up.setOption('multipart_params', {param1 : 'value1', param2 : 'value2'});
            }
        },
 
        // Post init events, bound after the internal events
        init : {
PostInit: function() {
// Called after initialization is finished and internal event handlers bound
log('[PostInit]');
document.getElementById('uploadfiles').onclick = function() {
uploader.start();
return false;
};
},
Browse: function(up) {
                // Called when file picker is clicked
                log('[Browse]');
            },
            Refresh: function(up) {
                // Called when the position or dimensions of the picker change
                log('[Refresh]');
            },
 
            StateChanged: function(up) {
                // Called when the state of the queue is changed
                log('[StateChanged]', up.state == plupload.STARTED ? "STARTED" : "STOPPED");
            },
 
            QueueChanged: function(up) {
                // Called when queue is changed by adding or removing files
                log('[QueueChanged]');
            },
OptionChanged: function(up, name, value, oldValue) {
// Called when one of the configuration options is changed
log('[OptionChanged]', 'Option Name: ', name, 'Value: ', value, 'Old Value: ', oldValue);
},
BeforeUpload: function(up, file) {
// Called right before the upload for a given file starts, can be used to cancel it if required
log('[BeforeUpload]', 'File: ', file);
},
 
            UploadProgress: function(up, file) {
                // Called while file is being uploaded
                log('[UploadProgress]', 'File:', file, "Total:", up.total);
            },
FileFiltered: function(up, file) {
// Called when file successfully files all the filters
                log('[FileFiltered]', 'File:', file);
},
 
            FilesAdded: function(up, files) {
                // Called when files are added to queue
                log('[FilesAdded]');
 
                plupload.each(files, function(file) {
                    log('  File:', file);
                });
            },
 
            FilesRemoved: function(up, files) {
                // Called when files are removed from queue
                log('[FilesRemoved]');
 
                plupload.each(files, function(file) {
                    log('  File:', file);
                });
            },
 
            FileUploaded: function(up, file, info) {
                // Called when file has finished uploading
                log('[FileUploaded] File:', file, "Info:", info);
            },
 
            ChunkUploaded: function(up, file, info) {
                // Called when file chunk has finished uploading
                log('[ChunkUploaded] File:', file, "Info:", info);
            },
UploadComplete: function(up, files) {
// Called when all files are either uploaded or failed
                log('[UploadComplete]');
},
Destroy: function(up) {
// Called when uploader is destroyed
                log('[Destroy] ');
},
 
            Error: function(up, args) {
                // Called when error occurs
                log('[Error] ', args);
            }
        }
    });
 
 
    function log() {
        var str = "";
 
        plupload.each(arguments, function(arg) {
            var row = "";
 
            if (typeof(arg) != "string") {
                plupload.each(arg, function(value, key) {
                    // Convert items in File objects to human readable form
                    if (arg instanceof plupload.File) {
                        // Convert status to human readable
                        switch (value) {
                            case plupload.QUEUED:
                                value = 'QUEUED';
                                break;
 
                            case plupload.UPLOADING:
                                value = 'UPLOADING';
                                break;
 
                            case plupload.FAILED:
                                value = 'FAILED';
                                break;
 
                            case plupload.DONE:
                                value = 'DONE';
                                break;
                        }
                    }
 
                    if (typeof(value) != "function") {
                        row += (row ? ', ' : '') + key + '=' + value;
                    }
                });
 
                str += row + " ";
            } else {
                str += arg + " ";
            }
        });
 
        var log = document.getElementById('console');
        log.innerHTML += str + "\n";
    }
uploader.init();
</script>
</body>
</html>

139
lib/javascript/plupload/examples/jquery/all_runtimes.html

@ -0,0 +1,139 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Plupload - Queue widget example</title>
<link rel="stylesheet" href="../../js/jquery.plupload.queue/css/jquery.plupload.queue.css" type="text/css" media="screen" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<!-- production -->
<script type="text/javascript" src="../../js/plupload.full.min.js"></script>
<script type="text/javascript" src="../../js/jquery.plupload.queue/jquery.plupload.queue.js"></script>
<!-- debug
<script type="text/javascript" src="../../js/moxie.js"></script>
<script type="text/javascript" src="../../js/plupload.dev.js"></script>
<script type="text/javascript" src="../../js/jquery.plupload.queue/jquery.plupload.queue.js"></script>
-->
</head>
<body style="font: 13px Verdana; background: #eee; color: #333">
<form method="post" action="dump.php">
<h1>Queue widget example</h1>
<p>Shows the jQuery Plupload Queue widget and under different runtimes.</p>
<div style="float: left; margin-right: 20px">
<h3>Flash runtime</h3>
<div id="flash_uploader" style="width: 500px; height: 330px;">Your browser doesn't have Flash installed.</div>
<h3>Silverlight runtime</h3>
<div id="silverlight_uploader" style="width: 500px; height: 330px;">Your browser doesn't have Silverlight installed.</div>
</div>
<div style="float: left; margin-right: 20px">
<h3>HTML 4 runtime</h3>
<div id="html4_uploader" style="width: 500px; height: 330px;">Your browser doesn't have HTML 4 support.</div>
<h3>HTML 5 runtime</h3>
<div id="html5_uploader" style="width: 500px; height: 330px;">Your browser doesn't support native upload.</div>
</div>
<br style="clear: both" />
<input type="submit" value="Send" />
</form>
<script type="text/javascript">
$(function() {
// Setup flash version
$("#flash_uploader").pluploadQueue({
// General settings
runtimes : 'flash',
url : '../upload.php',
chunk_size : '1mb',
unique_names : true,
filters : {
max_file_size : '10mb',
mime_types: [
{title : "Image files", extensions : "jpg,gif,png"},
{title : "Zip files", extensions : "zip"}
]
},
// Resize images on clientside if we can
resize : {width : 320, height : 240, quality : 90},
// Flash settings
flash_swf_url : '../../js/Moxie.swf'
});
// Setup silverlight version
$("#silverlight_uploader").pluploadQueue({
// General settings
runtimes : 'silverlight',
url : '../upload.php',
chunk_size : '1mb',
unique_names : true,
filters : {
max_file_size : '10mb',
mime_types: [
{title : "Image files", extensions : "jpg,gif,png"},
{title : "Zip files", extensions : "zip"}
]
},
// Resize images on clientside if we can
resize : {width : 320, height : 240, quality : 90},
// Silverlight settings
silverlight_xap_url : '../../js/Moxie.xap'
});
// Setup html5 version
$("#html5_uploader").pluploadQueue({
// General settings
runtimes : 'html5',
url : '../upload.php',
chunk_size : '1mb',
unique_names : true,
filters : {
max_file_size : '10mb',
mime_types: [
{title : "Image files", extensions : "jpg,gif,png"},
{title : "Zip files", extensions : "zip"}
]
},
// Resize images on clientside if we can
resize : {width : 320, height : 240, quality : 90}
});
// Setup html4 version
$("#html4_uploader").pluploadQueue({
// General settings
runtimes : 'html4',
url : '../upload.php',
unique_names : true,
filters : {
mime_types: [
{title : "Image files", extensions : "jpg,gif,png"},
{title : "Zip files", extensions : "zip"}
]
}
});
});
</script>
</body>
</html>

113
lib/javascript/plupload/examples/jquery/jquery_ui_widget.html

@ -0,0 +1,113 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Plupload - jQuery UI Widget</title>
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/themes/base/jquery-ui.css" type="text/css" />
<link rel="stylesheet" href="../../js/jquery.ui.plupload/css/jquery.ui.plupload.css" type="text/css" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script type="text/javascript" src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js"></script>
<!-- production -->
<script type="text/javascript" src="../../js/plupload.full.min.js"></script>
<script type="text/javascript" src="../../js/jquery.ui.plupload/jquery.ui.plupload.js"></script>
<!-- debug
<script type="text/javascript" src="../../js/moxie.js"></script>
<script type="text/javascript" src="../../js/plupload.dev.js"></script>
<script type="text/javascript" src="../../js/jquery.ui.plupload/jquery.ui.plupload.js"></script>
-->
</head>
<body style="font: 13px Verdana; background: #eee; color: #333">
<h1>jQuery UI Widget</h1>
<p>You can see this example with different themes on the <a href="http://plupload.com/example_jquery_ui.php">www.plupload.com</a> website.</p>
<form id="form" method="post" action="../dump.php">
<div id="uploader">
<p>Your browser doesn't have Flash, Silverlight or HTML5 support.</p>
</div>
<br />
<input type="submit" value="Submit" />
</form>
<script type="text/javascript">
// Initialize the widget when the DOM is ready
$(function() {
$("#uploader").plupload({
// General settings
runtimes : 'html5,flash,silverlight,html4',
url : '../upload.php',
// User can upload no more then 20 files in one go (sets multiple_queues to false)
max_file_count: 20,
chunk_size: '1mb',
// Resize images on clientside if we can
resize : {
width : 200,
height : 200,
quality : 90,
crop: true // crop to exact dimensions
},
filters : {
// Maximum file size
max_file_size : '1000mb',
// Specify what files to browse for
mime_types: [
{title : "Image files", extensions : "jpg,gif,png"},
{title : "Zip files", extensions : "zip"}
]
},
// Rename files by clicking on their titles
rename: true,
// Sort files
sortable: true,
// Enable ability to drag'n'drop files onto the widget (currently only HTML5 supports that)
dragdrop: true,
// Views to activate
views: {
list: true,
thumbs: true, // Show thumbs
active: 'thumbs'
},
// Flash settings
flash_swf_url : '../../js/Moxie.swf',
// Silverlight settings
silverlight_xap_url : '../../js/Moxie.xap'
});
// Handle the case when form was submitted before uploading has finished
$('#form').submit(function(e) {
// Files in queue upload them first
if ($('#uploader').plupload('getFiles').length > 0) {
// When all files are uploaded submit form
$('#uploader').on('complete', function() {
$('#form')[0].submit();
});
$('#uploader').plupload('start');
} else {
alert("You must have at least one file in the queue.");
}
return false; // Keep the form from submitting
});
});
</script>
</body>
</html>

66
lib/javascript/plupload/examples/jquery/queue_widget.html

@ -0,0 +1,66 @@
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Plupload - Queue widget example</title>
<link rel="stylesheet" href="../../js/jquery.plupload.queue/css/jquery.plupload.queue.css" type="text/css" media="screen" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<!-- production -->
<script type="text/javascript" src="../../js/plupload.full.min.js"></script>
<script type="text/javascript" src="../../js/jquery.plupload.queue/jquery.plupload.queue.js"></script>
<!-- debug
<script type="text/javascript" src="../../js/moxie.js"></script>
<script type="text/javascript" src="../../js/plupload.dev.js"></script>
<script type="text/javascript" src="../../js/jquery.plupload.queue/jquery.plupload.queue.js"></script>
-->
</head>
<body style="font: 13px Verdana; background: #eee; color: #333">
<form method="post" action="dump.php">
<div id="uploader">
<p>Your browser doesn't have Flash, Silverlight or HTML5 support.</p>
</div>
<input type="submit" value="Send" />
</form>
<script type="text/javascript">
$(function() {
// Setup html5 version
$("#uploader").pluploadQueue({
// General settings
runtimes : 'html5,flash,silverlight,html4',
url : '../upload.php',
chunk_size: '1mb',
rename : true,
dragdrop: true,
filters : {
// Maximum file size
max_file_size : '10mb',
// Specify what files to browse for
mime_types: [
{title : "Image files", extensions : "jpg,gif,png"},
{title : "Zip files", extensions : "zip"}
]
},
// Resize images on clientside if we can
resize : {width : 320, height : 240, quality : 90},
flash_swf_url : '../../js/Moxie.swf',
silverlight_xap_url : '../../js/Moxie.xap'
});
});
</script>
</body>
</html>

131
lib/javascript/plupload/examples/jquery/s3.php

@ -0,0 +1,131 @@
<?php
#!! IMPORTANT:
#!! this file is just an example, it doesn't incorporate any security checks and
#!! is not recommended to be used in production environment as it is. Be sure to
#!! revise it and customize to your needs.
die("Make sure that you enable some form of authentication before removing this line.");
/*
In order to upload files to S3 using Flash runtime, one should start by placing crossdomain.xml into the bucket.
crossdomain.xml can be as simple as this:
<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "http://www.macromedia.com/xml/dtds/cross-domain-policy.dtd">
<cross-domain-policy>
<allow-access-from domain="*" secure="false" />
</cross-domain-policy>
In our tests SilverLight didn't require anything special and worked with this configuration just fine. It may fail back
to the same crossdomain.xml as last resort.
!!!Important!!! Plupload UI Widget here, is used only for demo purposes and is not required for uploading to S3.
*/
// important variables that will be used throughout this example
$bucket = 'BUCKET';
// these can be found on your Account page, under Security Credentials > Access Keys
$accessKeyId = 'ACCESS_KEY_ID';
$secret = 'SECRET_ACCESS_KEY';
// prepare policy
$policy = base64_encode(json_encode(array(
// ISO 8601 - date('c'); generates uncompatible date, so better do it manually
'expiration' => date('Y-m-d\TH:i:s.000\Z', strtotime('+1 day')),
'conditions' => array(
array('bucket' => $bucket),
array('acl' => 'public-read'),
array('starts-with', '$key', ''),
// for demo purposes we are accepting only images
array('starts-with', '$Content-Type', 'image/'),
// Plupload internally adds name field, so we need to mention it here
array('starts-with', '$name', ''),
// One more field to take into account: Filename - gets silently sent by FileReference.upload() in Flash
// http://docs.amazonwebservices.com/AmazonS3/latest/dev/HTTPPOSTFlash.html
array('starts-with', '$Filename', ''),
)
)));
// sign policy
$signature = base64_encode(hash_hmac('sha1', $policy, $secret, true));
?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" dir="ltr">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
<title>Plupload to Amazon S3 Example</title>
<link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.8.9/themes/base/jquery-ui.css" type="text/css" />
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.9.0/jquery.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.10.2/jquery-ui.min.js"></script>
<!-- Load plupload and all it's runtimes and finally the UI widget -->
<link rel="stylesheet" href="../../js/jquery.ui.plupload/css/jquery.ui.plupload.css" type="text/css" />
<!-- production -->
<script type="text/javascript" src="../../js/plupload.full.min.js"></script>
<script type="text/javascript" src="../../js/jquery.ui.plupload/jquery.ui.plupload.js"></script>
<!-- debug
<script type="text/javascript" src="../../js/moxie.js"></script>
<script type="text/javascript" src="../../js/plupload.dev.js"></script>
<script type="text/javascript" src="../../js/jquery.ui.plupload/jquery.ui.plupload.js"></script>
-->
</head>
<body style="font: 13px Verdana; background: #eee; color: #333">
<h1>Plupload to Amazon S3 Example</h1>
<div id="uploader">
<p>Your browser doesn't have Flash, Silverlight or HTML5 support.</p>
</div>
<script type="text/javascript">
// Convert divs to queue widgets when the DOM is ready
$(function() {
$("#uploader").plupload({
runtimes : 'html5,flash,silverlight',
url : 'http://<?php echo $bucket; ?>.s3.amazonaws.com/',
multipart: true,
multipart_params: {
'key': '${filename}', // use filename as a key
'Filename': '${filename}', // adding this to keep consistency across the runtimes
'acl': 'public-read',
'Content-Type': 'image/jpeg',
'AWSAccessKeyId' : '<?php echo $accessKeyId; ?>',
'policy': '<?php echo $policy; ?>',
'signature': '<?php echo $signature; ?>'
},
// !!!Important!!!
// this is not recommended with S3, since it will force Flash runtime into the mode, with no progress indication
//resize : {width : 800, height : 600, quality : 60}, // Resize images on clientside, if possible
// optional, but better be specified directly
file_data_name: 'file',
filters : {
// Maximum file size
max_file_size : '10mb',
// Specify what files to browse for
mime_types: [
{title : "Image files", extensions : "jpg,jpeg"}
]
},
// Flash settings
flash_swf_url : '../../js/Moxie.swf',
// Silverlight settings
silverlight_xap_url : '../../js/Moxie.xap'
});
});
</script>
</body>
</html>

126
lib/javascript/plupload/examples/upload.php

@ -0,0 +1,126 @@
<?php
/**
* upload.php
*
* Copyright 2013, Moxiecode Systems AB
* Released under GPL License.
*
* License: http://www.plupload.com/license
* Contributing: http://www.plupload.com/contributing
*/
#!! IMPORTANT:
#!! this file is just an example, it doesn't incorporate any security checks and
#!! is not recommended to be used in production environment as it is. Be sure to
#!! revise it and customize to your needs.
die("Make sure that you enable some form of authentication before removing this line.");
// Make sure file is not cached (as it happens for example on iOS devices)
header("Expires: Mon, 26 Jul 1997 05:00:00 GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
/*
// Support CORS
header("Access-Control-Allow-Origin: *");
// other CORS headers if any...
if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') {
exit; // finish preflight CORS requests here
}
*/
// 5 minutes execution time
@set_time_limit(5 * 60);
// Uncomment this one to fake upload time
// usleep(5000);
// Settings
$targetDir = ini_get("upload_tmp_dir") . DIRECTORY_SEPARATOR . "plupload";
//$targetDir = 'uploads';
$cleanupTargetDir = true; // Remove old files
$maxFileAge = 5 * 3600; // Temp file age in seconds
// Create target dir
if (!file_exists($targetDir)) {
@mkdir($targetDir);
}
// Get a file name
if (isset($_REQUEST["name"])) {
$fileName = $_REQUEST["name"];
} elseif (!empty($_FILES)) {
$fileName = $_FILES["file"]["name"];
} else {
$fileName = uniqid("file_");
}
$filePath = $targetDir . DIRECTORY_SEPARATOR . $fileName;
// Chunking might be enabled
$chunk = isset($_REQUEST["chunk"]) ? intval($_REQUEST["chunk"]) : 0;
$chunks = isset($_REQUEST["chunks"]) ? intval($_REQUEST["chunks"]) : 0;
// Remove old temp files
if ($cleanupTargetDir) {
if (!is_dir($targetDir) || !$dir = opendir($targetDir)) {
die('{"jsonrpc" : "2.0", "error" : {"code": 100, "message": "Failed to open temp directory."}, "id" : "id"}');
}
while (($file = readdir($dir)) !== false) {
$tmpfilePath = $targetDir . DIRECTORY_SEPARATOR . $file;
// If temp file is current file proceed to the next
if ($tmpfilePath == "{$filePath}.part") {
continue;
}
// Remove temp file if it is older than the max age and is not the current file
if (preg_match('/\.part$/', $file) && (filemtime($tmpfilePath) < time() - $maxFileAge)) {
@unlink($tmpfilePath);
}
}
closedir($dir);
}
// Open temp file
if (!$out = @fopen("{$filePath}.part", $chunks ? "ab" : "wb")) {
die('{"jsonrpc" : "2.0", "error" : {"code": 102, "message": "Failed to open output stream."}, "id" : "id"}');
}
if (!empty($_FILES)) {
if ($_FILES["file"]["error"] || !is_uploaded_file($_FILES["file"]["tmp_name"])) {
die('{"jsonrpc" : "2.0", "error" : {"code": 103, "message": "Failed to move uploaded file."}, "id" : "id"}');
}
// Read binary input stream and append it to temp file
if (!$in = @fopen($_FILES["file"]["tmp_name"], "rb")) {
die('{"jsonrpc" : "2.0", "error" : {"code": 101, "message": "Failed to open input stream."}, "id" : "id"}');
}
} else {
if (!$in = @fopen("php://input", "rb")) {
die('{"jsonrpc" : "2.0", "error" : {"code": 101, "message": "Failed to open input stream."}, "id" : "id"}');
}
}
while ($buff = fread($in, 4096)) {
fwrite($out, $buff);
}
@fclose($out);
@fclose($in);
// Check if file has been uploaded
if (!$chunks || $chunk == $chunks - 1) {
// Strip the temp .part suffix off
rename("{$filePath}.part", $filePath);
}
// Return Success JSON-RPC response
die('{"jsonrpc" : "2.0", "result" : null, "id" : "id"}');

BIN
lib/javascript/plupload/js/Moxie.swf

Binary file not shown.

BIN
lib/javascript/plupload/js/Moxie.xap

Binary file not shown.

2
lib/javascript/plupload/js/i18n/ar.js

@ -0,0 +1,2 @@
// Arabic (ar)
plupload.addI18n({"Stop Upload":"أيقاف التحميل","Upload URL might be wrong or doesn't exist.":"عنوان التحميل ربما يكون خاطئ أو غير متوفر","tb":"تيرابايت","Size":"الحجم","Close":"أغلاق","You must specify either browse_button or drop_element.":"","Init error.":"خطأ في تهيئة","Add files to the upload queue and click the start button.":"أضف ملفات إلى القائمة إنتظار التحميل ثم أضغط على زر البداية","List":"","Filename":"أسم الملف","%s specified, but cannot be found.":"","Image format either wrong or not supported.":"صيغة الصورة أما خطاء أو غير مدعومه","Status":"الحالة","HTTP Error.":"خطأ في برتوكول نقل الملفات","Start Upload":"أبدا التحميل","Error: File too large:":" خطاء : حجم الملف كبير :","kb":"كيلوبايت","Duplicate file error.":"خطاء في تكرار الملف","File size error.":"خطأ في حجم الملف","N/A":"لا شي","gb":"جيجابايت","Error: Invalid file extension:":"خطاء : أمتداد الملف غير صالح :","Select files":"أختر الملفات","%s already present in the queue.":"%s الملف موجود بالفعل في قائمة الانتظار","Resoultion out of boundaries! <b>%s</b> runtime supports images only up to %wx%hpx.":"","File: %s":"ملف: %s","b":"بايت","Uploaded %d/%d files":"تحميل %d/%d ملف","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"العناصر المقبوله لتحميل هي %d ملف في هذا الوقت. الملفات الاضافية أزيلة.","%d files queued":"%d الملفات في قائمة الانتظار","File: %s, size: %d, max file size: %d":"ملف: %s, أقصى حجم للملف: %d, حجم: %d","Thumbnails":"","Drag files here.":"سحب الملف هنا","Runtime ran out of available memory.":"الذاكرة المتوفره أنتهت لمدة التشغيل","File count error.":"خطاء في عد الملفات","File extension error.":"خطأ في أمتداد الملف","mb":"ميجابايت","Add Files":"أضف ملفات"});

2
lib/javascript/plupload/js/i18n/az.js

@ -0,0 +1,2 @@
// Azerbaijani (az)
plupload.addI18n({"Stop Upload":"Yükləməni saxla","Upload URL might be wrong or doesn't exist.":"Yükləmə ünvanı səhvdir və ya mövcud deyil","tb":"tb","Size":"Həcm","Close":"Bağla","You must specify either browse_button or drop_element.":"","Init error.":"Init error.","Add files to the upload queue and click the start button.":"Faylları əlavə edin və yüklə düyməsinə klikləyin.","List":"","Filename":"Faylın adı","%s specified, but cannot be found.":"","Image format either wrong or not supported.":"Şəklin formatı uyğun deyil və ya dəstəklənmir.","Status":"Status","HTTP Error.":"HTTP xətası.","Start Upload":"Yüklə","Error: File too large:":"Xəta:Fayl həcmi çox böyükdür.","kb":"kb","Duplicate file error.":"Bu fayl artıq növbədə var.","File size error.":"Fayl həcmi xətası.","N/A":"N/A","gb":"gb","Error: Invalid file extension:":"Xəta: Yanlış fayl uzantısı:","Select files":"Faylları seçin","%s already present in the queue.":"%s artıq növbədə var.","Resoultion out of boundaries! <b>%s</b> runtime supports images only up to %wx%hpx.":"","File: %s":"Fayl: %s","b":"b","Uploaded %d/%d files":"%d/%d fayl yüklənib","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Upload element accepts only %d file(s) at a time. Extra files were stripped.","%d files queued":"Növbədə %d fayl var","File: %s, size: %d, max file size: %d":"Fayl: %s, həcm: %d, max fayl həcmi: %d","Thumbnails":"","Drag files here.":"Faylları bura çəkin.","Runtime ran out of available memory.":"Runtime ran out of available memory.","File count error.":"Fayl sayı çox böyükdür.","File extension error.":"Fayl uzantısı xətası.","mb":"mb","Add Files":"Fayl əlavə et"});

2
lib/javascript/plupload/js/i18n/bg.js

@ -0,0 +1,2 @@
// Bulgarian (bg)
plupload.addI18n({"Stop Upload":"Спрете качването","Upload URL might be wrong or doesn't exist.":"URL за качване може да е грешен или да не съществува.","tb":"tb","Size":"Размер","Close":"Затвори","You must specify either browse_button or drop_element.":"","Init error.":"Грешка: инициализиране.","Add files to the upload queue and click the start button.":"Добавете файлове в опашката за качване, и щракнете бутона старт.","List":"","Filename":"Име на файла","%s specified, but cannot be found.":"","Image format either wrong or not supported.":"Формата на изображението или е объркан, или не се поддържа.","Status":"Статус","HTTP Error.":"Грешка: HTTP .","Start Upload":"Започнете качването","Error: File too large:":"Грешка: Файла е твърде голям:","kb":"kb","Duplicate file error.":"Грешка: файла е вече качен на сървъра.","File size error.":"Грешка: размер на файла.","N/A":"не приложимо","gb":"gb","Error: Invalid file extension:":"Грешка: Невалидно разширение на файл:","Select files":"Изберете файлове","%s already present in the queue.":"%s вече го има в опашката.","Resoultion out of boundaries! <b>%s</b> runtime supports images only up to %wx%hpx.":"","File: %s":"Файл: %s","b":"b","Uploaded %d/%d files":"Качени %d/%d файла","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Елемента за качване приема само %d файл(а) наведнъж. Допълнителните файлове бяха отстранени.","%d files queued":"%d файла в опашката","File: %s, size: %d, max file size: %d":"Файл: %s, размер: %d, максимален размер: %d","Thumbnails":"","Drag files here.":"Довлечете файловете тук.","Runtime ran out of available memory.":"Недостатъчна свободна памет.","File count error.":"Грешка в броя на файловете.","File extension error.":"Грешка: разширение на файла.","mb":"mb","Add Files":"Добавете файлове"});

2
lib/javascript/plupload/js/i18n/bs.js

@ -0,0 +1,2 @@
// Bosnian (bs)
plupload.addI18n({"Stop Upload":"Prekini dodavanje","Upload URL might be wrong or doesn't exist.":"URL za dodavanje je neispravan ili ne postoji.","tb":"tb","Size":"Veličina","Close":"Zatvori","You must specify either browse_button or drop_element.":"","Init error.":"Inicijalizacijska greška.","Add files to the upload queue and click the start button.":"Dodajte datoteke u red i kliknite na dugme za pokretanje.","List":"","Filename":"Naziv datoteke","%s specified, but cannot be found.":"","Image format either wrong or not supported.":"Format slike je neispravan ili nije podržan.","Status":"Status","HTTP Error.":"HTTP greška.","Start Upload":"Započni dodavanje","Error: File too large:":"Greška! Datoteka je prevelika:","kb":"kb","Duplicate file error.":"Dupla datoteka.","File size error.":"Greška u veličini datoteke.","N/A":"N/A","gb":"gb","Error: Invalid file extension:":"Greška! Neispravan ekstenzija datoteke:","Select files":"Odaberite datoteke","%s already present in the queue.":"%s se već nalazi u redu.","Resoultion out of boundaries! <b>%s</b> runtime supports images only up to %wx%hpx.":"","File: %s":"Datoteka: %s","b":"b","Uploaded %d/%d files":"Dodano %d/%d datoteka","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Dodavanje trenutno dozvoljava samo %d datoteka istovremeno. Dodatne datoteke su uklonjene.","%d files queued":"%d datoteka čeka","File: %s, size: %d, max file size: %d":"Datoteka: %s, veličina: %d, maksimalna veličina: %d","Thumbnails":"","Drag files here.":"Dovucite datoteke ovdje.","Runtime ran out of available memory.":"Nema više dostupne memorije.","File count error.":"Greška u brojanju datoeka.","File extension error.":"Greška u ekstenziji datoteke.","mb":"mb","Add Files":"Dodaj datoteke"});

2
lib/javascript/plupload/js/i18n/ca.js

@ -0,0 +1,2 @@
// Catalan (ca)
plupload.addI18n({"Stop Upload":"Parar pujada","Upload URL might be wrong or doesn't exist.":"La URL de càrrega no és correcte o bé no existeix.","tb":"Tb","Size":"Tamany","Close":"Tancar","You must specify either browse_button or drop_element.":"Has d'especificar o bé el botó de selecció de fitxers `browse_button` o bé l'àrea per arrosegar els fitxers `drop_element`.","Init error.":"Error d´inicialització.","Add files to the upload queue and click the start button.":"Afegeixi els fitxers a la cua de pujada i cliqui el botó Iniciar","List":"Llistat","Filename":"Nom de fitxer","%s specified, but cannot be found.":"%s especificat, però no es pot trobar.","Image format either wrong or not supported.":"Format d'imatge incorrecte o no suportat.","Status":"Estat","HTTP Error.":"Error HTTP.","Start Upload":"Començar pujada","Error: File too large:":"Error: Fitxer massa gran:","kb":"Kb","Duplicate file error.":"Error per duplicitat de fitxer.","File size error.":"Error en la mida del fitxer.","N/A":"N/D","gb":"Gb","Error: Invalid file extension:":"Error: Extensió de fitxer no vàlida:","Select files":"Seleccionar fitxers","%s already present in the queue.":"%s ja existeix a la cua.","Resoultion out of boundaries! <b>%s</b> runtime supports images only up to %wx%hpx.":"Resolució de la imatge massa gran! El pujador <b>%s</b> suporta mides d'imatge fins a %wx%hpx.","File: %s":"Fitxer: %s","b":"b","Uploaded %d/%d files":"Pujats %d/%d fitxers","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"La càrrega d'elements tan sols accepta %d fitxer(s) alhora. Els fitxers sobrants seran descartats.","%d files queued":"%d fitxers en cua","File: %s, size: %d, max file size: %d":"Fitxer: %s, mida: %d, mida màxima de fitxer: %d","Thumbnails":"Miniatures","Drag files here.":"Arrossegui fitxers aquí","Runtime ran out of available memory.":"L'execució ha arribat al límit de memòria.","File count error.":"Error en el recompte de fitxers","File extension error.":"Error en l´extensió del fitxer.","mb":"Mb","Add Files":"Afegir fitxers"});

2
lib/javascript/plupload/js/i18n/cs.js

@ -0,0 +1,2 @@
// Czech (cs)
plupload.addI18n({"Stop Upload":"Zastavit nahrávání","Upload URL might be wrong or doesn't exist.":"URL uploadu je možná špatně, nebo neexistuje.","tb":"tb","Size":"Velikost","Close":"Zavřít","You must specify either browse_button or drop_element.":"Musíte specifikovat browse_button či drop_element.","Init error.":"Chyba inicializace.","Add files to the upload queue and click the start button.":"Přidejte soubory do fronty a pak spusťte nahrávání.","List":"Seznam","Filename":"Název souboru","%s specified, but cannot be found.":"%s bylo specifikováno, ale nebylo nalezeno.","Image format either wrong or not supported.":"Špatný, nebo nepodporovaný formát obrázku.","Status":"Stav","HTTP Error.":"Chyba HTTP.","Start Upload":"Spustit nahrávání","Error: File too large:":"Chyba: Soubor je příliš veliký:","kb":"kb","Duplicate file error.":"Chyba - duplikovaný soubor.","File size error.":"Chyba velikosti souboru.","N/A":"N/A","gb":"gb","Error: Invalid file extension:":"Chyba: Neplatná koncovka souboru:","Select files":"Vyberte soubory","%s already present in the queue.":"%s je již zařazen ve frontě.","Resoultion out of boundaries! <b>%s</b> runtime supports images only up to %wx%hpx.":"Rozlišení je mimo rozmezí! <b>%s</b> runtime podporuje obrázky pouze do %wx%hpx.","File: %s":"Soubor: %s","b":"b","Uploaded %d/%d files":"Nahráno %d/%d souborů","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Upload akceptuje pouze %d soubor(ů) najednou. Další soubory byly odstraněny.","%d files queued":"%d souborů ve frontě","File: %s, size: %d, max file size: %d":"Soubor: %s, velikost: %d, maximální velikost souboru: %d","Thumbnails":"Náhledy","Drag files here.":"Sem přetáhněte soubory.","Runtime ran out of available memory.":"Běh skriptu přesáhl dostupnou paměť.","File count error.":"Chyba v počtu souborů.","File extension error.":"Chyba přípony souboru.","mb":"mb","Add Files":"Přidat soubory"});

2
lib/javascript/plupload/js/i18n/cy.js

@ -0,0 +1,2 @@
// Welsh (cy)
plupload.addI18n({"Stop Upload":"Atal Lanlwytho","Upload URL might be wrong or doesn't exist.":"URL y lanlwythiad ynb anghywir neu ddim yn bodoli.","tb":"tb","Size":"Maint","Close":"Cau","You must specify either browse_button or drop_element.":"","Init error.":"Gwall cych.","Add files to the upload queue and click the start button.":"Ychwanegwch ffeiliau i'r ciw lanlwytho a chlicio'r botwm dechrau.","List":"","Filename":"Enw'r ffeil","%s specified, but cannot be found.":"","Image format either wrong or not supported.":"Fformat delwedd yn anghywir neu heb ei gynnal.","Status":"Statws","HTTP Error.":"Gwall HTTP.","Start Upload":"Dechrau Lanlwytho","Error: File too large:":"Gwall: Ffeil yn rhy fawr:","kb":"kb","Duplicate file error.":"Gwall ffeil ddyblyg.","File size error.":"Gwall maint ffeil.","N/A":"Dd/A","gb":"gb","Error: Invalid file extension:":"Gwall: estyniad ffeil annilys:","Select files":"Dewis ffeiliau","%s already present in the queue.":"%s yn y ciw yn barod.","Resoultion out of boundaries! <b>%s</b> runtime supports images only up to %wx%hpx.":"","File: %s":"Ffeil: %s","b":"b","Uploaded %d/%d files":"Lanlwythwyd %d/%d ffeil","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Mae'r elfen lanlwytho yn derbyn %d ffeil ar y tro. Caiff ffeiliau ychwanegol eu tynnu.","%d files queued":"%d ffeil mewn ciw","File: %s, size: %d, max file size: %d":"Ffeil: %s, maint: %d, maint mwyaf ffeil: %d","Thumbnails":"","Drag files here.":"Llusgwch ffeiliau yma.","Runtime ran out of available memory.":"Allan o gof.","File count error.":"Gwall cyfri ffeiliau.","File extension error.":"Gwall estyniad ffeil.","mb":"mb","Add Files":"Ychwanegu Ffeiliau"});

2
lib/javascript/plupload/js/i18n/da.js

@ -0,0 +1,2 @@
// Danish (da)
plupload.addI18n({"Stop Upload":"Stop upload","Upload URL might be wrong or doesn't exist.":"Upload URL kan være forkert eller ikke eksisterende.","tb":"tb","Size":"Størrelse","Close":"Luk","You must specify either browse_button or drop_element.":"","Init error.":"Opstarts fejl.","Add files to the upload queue and click the start button.":"Tilføj filer til køen og klik Start upload knappen.","List":"","Filename":"Filnavn","%s specified, but cannot be found.":"","Image format either wrong or not supported.":"Billede format er enten forkert eller ikke understøttet.","Status":"Status","HTTP Error.":"HTTP fejl.","Start Upload":"Start upload","Error: File too large:":"Fejl: Filen er for stor:","kb":"kb","Duplicate file error.":"Filen findes allerede.","File size error.":"Filstørrelse fejl.","N/A":"N/A","gb":"gb","Error: Invalid file extension:":"Fejl: Ugyldigt fil format:","Select files":"Vælg filer","%s already present in the queue.":"%s findes allerede i køen.","Resoultion out of boundaries! <b>%s</b> runtime supports images only up to %wx%hpx.":"","File: %s":"Fil: %s","b":"b","Uploaded %d/%d files":"Uploaded %d/%d filer","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Upload accepterer kun %d fil(er) af gangen. Ekstra filer blev skippet.","%d files queued":"%d filer i kø","File: %s, size: %d, max file size: %d":"Fil: %s, størrelse: %d, maks. filstørrelse: %d","Thumbnails":"","Drag files here.":"Træk filer her.","Runtime ran out of available memory.":"Runtime mangler tilgængelige hukommelse.","File count error.":"Fil antal fejl.","File extension error.":"Fil format fejl.","mb":"mb","Add Files":"Tilføj filer"});

2
lib/javascript/plupload/js/i18n/de.js

@ -0,0 +1,2 @@
// German (de)
plupload.addI18n({"Stop Upload":"Hochladen abbrechen","Upload URL might be wrong or doesn't exist.":"Upload-URL ist falsch oder existiert nicht.","tb":"TB","Size":"Größe","Close":"Schließen","You must specify either browse_button or drop_element.":"","Init error.":"Initialisierungsfehler","Add files to the upload queue and click the start button.":"Dateien hinzufügen und auf 'Hochladen' klicken.","List":"Liste","Filename":"Dateiname","%s specified, but cannot be found.":"","Image format either wrong or not supported.":"Bildformat falsch oder nicht unterstützt.","Status":"Status","HTTP Error.":"HTTP-Fehler","Start Upload":"Hochladen beginnen","Error: File too large:":"Fehler: Datei zu groß:","kb":"KB","Duplicate file error.":"Datei bereits hochgeladen","File size error.":"Fehler bei Dateigröße","N/A":"Nicht verfügbar","gb":"GB","Error: Invalid file extension:":"Fehler: Ungültige Dateiendung:","Select files":"Dateien auswählen","%s already present in the queue.":"%s ist bereits in der Warteschlange","Resoultion out of boundaries! <b>%s</b> runtime supports images only up to %wx%hpx.":"","File: %s":"Datei: %s","b":"B","Uploaded %d/%d files":"%d/%d Dateien wurden hochgeladen","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Pro Durchgang können nur %d Datei(en) akzeptiert werden. Überzählige Dateien wurden ignoriert.","%d files queued":"%d Dateien in der Warteschlange","File: %s, size: %d, max file size: %d":"Datei: %s, Größe: %d, maximale Dateigröße: %d","Thumbnails":"Vorschaubilder","Drag files here.":"Dateien auf diese Fläche bewegen.","Runtime ran out of available memory.":"Nicht genügend Speicher verfügbar.","File count error.":"Fehlerhafte Dateianzahl.","File extension error.":"Fehler bei Dateiendung","mb":"MB","Add Files":"Dateien hinzufügen"});

2
lib/javascript/plupload/js/i18n/el.js

@ -0,0 +1,2 @@
// Greek (el)
plupload.addI18n({"Stop Upload":"Ακύρωση Μεταφόρτωσης","Upload URL might be wrong or doesn't exist.":"Το URL μεταφόρτωσης είναι λάθος ή δεν υπάρχει.","tb":"tb","Size":"Μέγεθος","Close":"Κλείσιμο","You must specify either browse_button or drop_element.":"","Init error.":"Σφάλμα αρχικοποίησης.","Add files to the upload queue and click the start button.":"Προσθέστε αρχεία στην ουρά μεταφόρτωσης και πατήστε το κουμπί εκκίνησης.","List":"Λίστα","Filename":"Όνομα Αρχείου","%s specified, but cannot be found.":"","Image format either wrong or not supported.":"Ο τύπος εικόνας είναι λάθος ή δεν υποστηρίζεται.","Status":"Κατάσταση","HTTP Error.":"Σφάλμα HTTP.","Start Upload":"Εκκίνηση Μεταφόρτωσης","Error: File too large:":"Σφάλμα: Πολύ μεγάλο αρχείο:","kb":"kb","Duplicate file error.":"Το αρχείο έχει ξαναπροστεθεί.","File size error.":"Σφάλμα με το μέγεθος του αρχείου.","N/A":"Δεν ισχύει","gb":"gb","Error: Invalid file extension:":"Σφάλμα: Μη έγκυρος τύπος αρχείου:","Select files":"Επιλέξτε Αρχεία","%s already present in the queue.":"Το «%s» βρίσκεται ήδη στην ουρά.","Resoultion out of boundaries! <b>%s</b> runtime supports images only up to %wx%hpx.":"","File: %s":"Αρχείο: %s","b":"b","Uploaded %d/%d files":"Μεταφορτώθηκαν %d/%d αρχεία","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Μπορείτε να μεταφορτώσετε μεχρι και %d αρχείο/α κάθε φορά. Τα επιπλέον αρχεία αφαιρέθηκαν.","%d files queued":"%d αρχεία στην ουρά","File: %s, size: %d, max file size: %d":"Αρχείο: %s, μέγεθος: %d, μέγιστο μέγεθος αρχείου: %d","Thumbnails":"Μικρογραφίες","Drag files here.":"Σύρετε αρχεία εδώ","Runtime ran out of available memory.":"Δεν υπάρχει αρκετή διαθέσιμη μνήμη.","File count error.":"Σφάλμα με τον αριθμό αρχείων.","File extension error.":"Σφάλμα με τον τύπο αρχείου.","mb":"mb","Add Files":"Προσθέστε Αρχεία"});

2
lib/javascript/plupload/js/i18n/en.js

@ -0,0 +1,2 @@
// English (en)
plupload.addI18n({"Stop Upload":"Stop Upload","Upload URL might be wrong or doesn't exist.":"Upload URL might be wrong or doesn't exist.","tb":"tb","Size":"Size","Close":"Close","You must specify either browse_button or drop_element.":"You must specify either browse_button or drop_element.","Init error.":"Init error.","Add files to the upload queue and click the start button.":"Add files to the upload queue and click the start button.","List":"List","Filename":"Filename","%s specified, but cannot be found.":"%s specified, but cannot be found.","Image format either wrong or not supported.":"Image format either wrong or not supported.","Status":"Status","HTTP Error.":"HTTP Error.","Start Upload":"Start Upload","Error: File too large:":"Error: File too large:","kb":"kb","Duplicate file error.":"Duplicate file error.","File size error.":"File size error.","N/A":"N/A","gb":"gb","Error: Invalid file extension:":"Error: Invalid file extension:","Select files":"Select files","%s already present in the queue.":"%s already present in the queue.","Resoultion out of boundaries! <b>%s</b> runtime supports images only up to %wx%hpx.":"Resoultion out of boundaries! <b>%s</b> runtime supports images only up to %wx%hpx.","File: %s":"File: %s","b":"b","Uploaded %d/%d files":"Uploaded %d/%d files","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Upload element accepts only %d file(s) at a time. Extra files were stripped.","%d files queued":"%d files queued","File: %s, size: %d, max file size: %d":"File: %s, size: %d, max file size: %d","Thumbnails":"Thumbnails","Drag files here.":"Drag files here.","Runtime ran out of available memory.":"Runtime ran out of available memory.","File count error.":"File count error.","File extension error.":"File extension error.","mb":"mb","Add Files":"Add Files"});

2
lib/javascript/plupload/js/i18n/es.js

@ -0,0 +1,2 @@
// Spanish (es)
plupload.addI18n({"Stop Upload":"Detener Subida.","Upload URL might be wrong or doesn't exist.":"URL de carga inexistente.","tb":"TB","Size":"Tamaño","Close":"Cerrar","You must specify either browse_button or drop_element.":"Debe especificar el browse_button o el drop_element","Init error.":"Error de inicialización.","Add files to the upload queue and click the start button.":"Agregue archivos a la lista de subida y pulse clic en el botón de Iniciar carga","List":"Lista","Filename":"Nombre de archivo","%s specified, but cannot be found.":"%s especificado, pero no se puede encontrar","Image format either wrong or not supported.":"Formato de imagen no soportada.","Status":"Estado","HTTP Error.":"Error de HTTP.","Start Upload":"Iniciar carga","Error: File too large:":"Error: archivo demasiado grande:","kb":"KB","Duplicate file error.":"Error, archivo duplicado","File size error.":"Error de tamaño de archivo.","N/A":"No disponible","gb":"GB","Error: Invalid file extension:":"Error: Extensión de archivo inválida:","Select files":"Elija archivos","%s already present in the queue.":"%s ya se encuentra en la lista.","Resoultion out of boundaries! <b>%s</b> runtime supports images only up to %wx%hpx.":"Resolución fuera de límites! El tiempo de ejecución <b>%s</b> sólo admite imágenes hasta %wx%hpx","File: %s":"Archivo: %s","b":"B","Uploaded %d/%d files":"Subidos %d/%d archivos","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Se aceptan sólo %d archivo(s) al tiempo. Más, no se tienen en cuenta.","%d files queued":"%d archivos en cola.","File: %s, size: %d, max file size: %d":"Archivo: %s, tamaño: %d, tamaño máximo de archivo: %d","Thumbnails":"Miniaturas","Drag files here.":"Arrastre archivos aquí","Runtime ran out of available memory.":"No hay memoria disponible.","File count error.":"Error en contador de archivos.","File extension error.":"Error de extensión de archivo.","mb":"MB","Add Files":"Agregar archivos"});

2
lib/javascript/plupload/js/i18n/et.js

@ -0,0 +1,2 @@
// Estonian (et)
plupload.addI18n({"Stop Upload":"Stop Upload","Upload URL might be wrong or doesn't exist.":"Üleslaadimise URL võib olla vale või seda pole.","tb":"","Size":"Suurus","Close":"Sulge","You must specify either browse_button or drop_element.":"","Init error.":"Lähtestamise viga.","Add files to the upload queue and click the start button.":"Lisa failid üleslaadimise järjekorda ja klõpsa alustamise nupule.","List":"","Filename":"Failinimi","%s specified, but cannot be found.":"","Image format either wrong or not supported.":"Image format either wrong or not supported.","Status":"Olek","HTTP Error.":"HTTP ühenduse viga.","Start Upload":"Start Upload","Error: File too large:":"Error: File too large:","kb":"","Duplicate file error.":"","File size error.":"Failisuuruse viga.","N/A":"N/A","gb":"","Error: Invalid file extension:":"Error: Invalid file extension:","Select files":"Vali faile","%s already present in the queue.":"","Resoultion out of boundaries! <b>%s</b> runtime supports images only up to %wx%hpx.":"","File: %s":"Fail: %s","b":"","Uploaded %d/%d files":"Üles laaditud %d/%d","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Üleslaadimise element saab vastu võtta ainult %d faili ühe korraga. Ülejäänud failid jäetakse laadimata.","%d files queued":"Järjekorras on %d faili","File: %s, size: %d, max file size: %d":"","Thumbnails":"","Drag files here.":"Lohista failid siia.","Runtime ran out of available memory.":"Runtime ran out of available memory.","File count error.":"Failide arvu viga.","File extension error.":"Faililaiendi viga.","mb":"","Add Files":"Add Files"});

2
lib/javascript/plupload/js/i18n/fa.js

@ -0,0 +1,2 @@
// Persian (fa)
plupload.addI18n({"Stop Upload":"توقف انتقال","Upload URL might be wrong or doesn't exist.":"Upload URL might be wrong or doesn't exist.","tb":"ترابایت","Size":"سایز","Close":"بستن","You must specify either browse_button or drop_element.":"","Init error.":"خطا در استارت اسکریپت","Add files to the upload queue and click the start button.":"اضافه کنید فایل ها را به صف آپلود و دکمه شروع را کلیک کنید.","List":"","Filename":"نام فایل","%s specified, but cannot be found.":"","Image format either wrong or not supported.":"Image format either wrong or not supported.","Status":"وضعیت","HTTP Error.":"HTTP خطای","Start Upload":"شروع انتقال","Error: File too large:":"Error: File too large:","kb":"کیلوبایت","Duplicate file error.":"خطای فایل تکراری","File size error.":"خطای سایز فایل","N/A":"N/A","gb":"گیگابایت","Error: Invalid file extension:":"Error: Invalid file extension:","Select files":"انتخاب فایل","%s already present in the queue.":"%s در لیست آپلود وجود دارد.","Resoultion out of boundaries! <b>%s</b> runtime supports images only up to %wx%hpx.":"","File: %s":" فایل ها : %s","b":"بایت","Uploaded %d/%d files":"منتقل شد %d/%d از فایلها","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"عنصر بارگذار فقط %d فایل رو در یک زمان می پذیرد. سایر فایل ها مجرد از این موضوع هستند.","%d files queued":"%d فایل در صف","File: %s, size: %d, max file size: %d":"فایل: %s, اندازه: %d, محدودیت اندازه فایل: %d","Thumbnails":"","Drag files here.":"بکشید فایل ها رو به اینجا","Runtime ran out of available memory.":"Runtime ran out of available memory.","File count error.":"خطای تعداد فایل","File extension error.":"خطا پیشوند فایل","mb":"مگابایت","Add Files":"افزودن فایل"});

2
lib/javascript/plupload/js/i18n/fi.js

@ -0,0 +1,2 @@
// Finnish (fi)
plupload.addI18n({"Stop Upload":"Pysäytä lähetys","Upload URL might be wrong or doesn't exist.":"Lähetyksen URL-osoite saattaa olla väärä tai sitä ei ole olemassa.","tb":"TB","Size":"Koko","Close":"Sulje","You must specify either browse_button or drop_element.":"","Init error.":"Init virhe.","Add files to the upload queue and click the start button.":"Lisää tiedostoja lähetysjonoon ja klikkaa aloita-nappia.","List":"","Filename":"Tiedostonimi","%s specified, but cannot be found.":"","Image format either wrong or not supported.":"Kuvaformaatti on joko väärä tai ei tuettu.","Status":"Tila","HTTP Error.":"HTTP-virhe.","Start Upload":"Aloita lähetys","Error: File too large:":"Virhe: Liian suuri tiedosto:","kb":"kB","Duplicate file error.":"Tuplatiedostovirhe.","File size error.":"Tiedostokokovirhe.","N/A":"N/A","gb":"GB","Error: Invalid file extension:":"Virhe: Virheellinen tiedostopääte:","Select files":"Valitse tiedostoja","%s already present in the queue.":"%s on jo jonossa.","Resoultion out of boundaries! <b>%s</b> runtime supports images only up to %wx%hpx.":"","File: %s":"Tiedosto: %s","b":"B","Uploaded %d/%d files":"Lähetetty %d/%d tiedostoa","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Vain %d tiedosto(a) voidaan lähettää kerralla. Ylimääräiset tiedostot ohitettiin.","%d files queued":"%d tiedostoa jonossa","File: %s, size: %d, max file size: %d":"Tiedosto: %s, koko: %d, suurin sallittu tiedostokoko: %d","Thumbnails":"","Drag files here.":"Raahaa tiedostot tähän.","Runtime ran out of available memory.":"Toiminnon käytettävissä oleva muisti loppui kesken.","File count error.":"Tiedostolaskentavirhe.","File extension error.":"Tiedostopäätevirhe.","mb":"MB","Add Files":"Lisää tiedostoja"});

2
lib/javascript/plupload/js/i18n/fr.js

@ -0,0 +1,2 @@
// French (fr)
plupload.addI18n({"Stop Upload":"Arrêter l'envoi.","Upload URL might be wrong or doesn't exist.":"L'URL d'envoi est soit erronée soit n'existe pas.","tb":"To","Size":"Taille","Close":"Fermer","You must specify either browse_button or drop_element.":"Vous devez spécifier browse_button ou drop_element.","Init error.":"Erreur d'initialisation.","Add files to the upload queue and click the start button.":"Ajoutez des fichiers à la file d'attente de téléchargement et appuyez sur le bouton 'Démarrer l'envoi'","List":"Liste","Filename":"Nom du fichier","%s specified, but cannot be found.":"%s spécifié, mais ne peut pas être trouvé.","Image format either wrong or not supported.":"Le format d'image est soit erroné soit pas géré.","Status":"État","HTTP Error.":"Erreur HTTP.","Start Upload":"Démarrer l'envoi","Error: File too large:":"Erreur: Fichier trop volumineux:","kb":"Ko","Duplicate file error.":"Erreur: Fichier déjà sélectionné.","File size error.":"Erreur de taille de fichier.","N/A":"Non applicable","gb":"Go","Error: Invalid file extension:":"Erreur: Extension de fichier non valide:","Select files":"Sélectionnez les fichiers","%s already present in the queue.":"%s déjà présent dans la file d'attente.","Resoultion out of boundaries! <b>%s</b> runtime supports images only up to %wx%hpx.":"Résolution sur les frontières ! L'exécution de <b>%s</b> supporte seulement les images de %wx%hpx","File: %s":"Fichier: %s","b":"o","Uploaded %d/%d files":"%d fichiers sur %d ont été envoyés","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Que %d fichier(s) peuvent être envoyé(s) à la fois. Les fichiers supplémentaires ont été ignorés.","%d files queued":"%d fichiers en attente","File: %s, size: %d, max file size: %d":"Fichier: %s, taille: %d, taille max. d'un fichier: %d","Thumbnails":"Miniatures","Drag files here.":"Déposez les fichiers ici.","Runtime ran out of available memory.":"Le traitement a manqué de mémoire disponible.","File count error.":"Erreur: Nombre de fichiers.","File extension error.":"Erreur d'extension de fichier","mb":"Mo","Add Files":"Ajouter des fichiers"});

2
lib/javascript/plupload/js/i18n/he.js

@ -0,0 +1,2 @@
// Hebrew (he)
plupload.addI18n({"Stop Upload":"בטל העלאה","Upload URL might be wrong or doesn't exist.":"כתובת URL שגויה או לא קיימת.","tb":"tb","Size":"גודל","Close":"סגור","You must specify either browse_button or drop_element.":"יש לציין או browse_button או drop_element.","Init error.":"שגיאת איתחול","Add files to the upload queue and click the start button.":"הוסף קבצים לרשימה ולחץ על כפתור שליחה להתחלת פעולות העלאה","List":"רשימה","Filename":"שם קובץ","%s specified, but cannot be found.":"%s צויין, אך לא נמצא.","Image format either wrong or not supported.":"תמונה פגומה או סוג תמונה לא נתמך","Status":"אחוז","HTTP Error.":"שגיאת פרוטוקול","Start Upload":"שליחה","Error: File too large:":"שגיאה: קובץ חורג מהגודל המותר:","kb":"KB","Duplicate file error.":"קובץ כפול","File size error.":"גודל קובץ חורג מהמותר","N/A":"שגיאה","gb":"GB","Error: Invalid file extension:":"שגיאה: סוג קובץ לא נתמך:","Select files":"בחר קבצים","%s already present in the queue.":"%sקובץ נמצא כבר ברשימת הקבצים.","Resoultion out of boundaries! <b>%s</b> runtime supports images only up to %wx%hpx.":"הרזולוציה גבוהה מדי! <b>%s</b> הפלטפורמה תומכת בתמונות עד גודל px.","File: %s":"קובץ: %s","b":"B","Uploaded %d/%d files":"מעלה: %d/%d","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"אלמנטי ההעלאה מקבלים רק %d קובץ(ים) בפעם אחת. קבצים נוספים הוסרו.","%d files queued":"%d קבצים נותרו","File: %s, size: %d, max file size: %d":"קובץ: %s, גודל: %d, גודל מקסימלי: %d","Thumbnails":"תמונות ממוזערות","Drag files here.":"גרור קבצים לכאן","Runtime ran out of available memory.":"שגיאת מחסור בזיכרון","File count error.":"שגיאת מספר קבצים","File extension error.":"קובץ זה לא נתמך","mb":"MB","Add Files":"הוסף קבצים"});

2
lib/javascript/plupload/js/i18n/hr.js

@ -0,0 +1,2 @@
// Croatian (hr)
plupload.addI18n({"Stop Upload":"Zaustavi upload.","Upload URL might be wrong or doesn't exist.":"Upload URL might be wrong or doesn't exist.","tb":"tb","Size":"Veličina","Close":"Zatvori","You must specify either browse_button or drop_element.":"","Init error.":"Greška inicijalizacije.","Add files to the upload queue and click the start button.":"Dodajte datoteke u listu i kliknite Upload.","List":"","Filename":"Ime datoteke","%s specified, but cannot be found.":"","Image format either wrong or not supported.":"Image format either wrong or not supported.","Status":"Status","HTTP Error.":"HTTP greška.","Start Upload":"Pokreni upload.","Error: File too large:":"Pogreška: Datoteka je prevelika:","kb":"kb","Duplicate file error.":"Pogreška dvostruke datoteke.","File size error.":"Greška veličine datoteke.","N/A":"N/A","gb":"gb","Error: Invalid file extension:":"Pogreška: Nevažeći nastavak datoteke:","Select files":"Odaberite datoteke:","%s already present in the queue.":"%s je već prisutan u listi čekanja.","Resoultion out of boundaries! <b>%s</b> runtime supports images only up to %wx%hpx.":"","File: %s":"Datoteka: %s","b":"b","Uploaded %d/%d files":"Uploadano %d/%d datoteka","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Upload element accepts only %d file(s) at a time. Extra files were stripped.","%d files queued":"%d datoteka na čekanju.","File: %s, size: %d, max file size: %d":"Datoteka: %s, veličina: %d, maksimalna veličina: %d","Thumbnails":"","Drag files here.":"Dovucite datoteke ovdje","Runtime ran out of available memory.":"Runtime aplikaciji je ponestalo memorije.","File count error.":"Pogreška u broju datoteka.","File extension error.":"Pogreška u nastavku datoteke.","mb":"mb","Add Files":"Dodaj datoteke"});

2
lib/javascript/plupload/js/i18n/hu.js

@ -0,0 +1,2 @@
// Hungarian (hu)
plupload.addI18n({"Stop Upload":"Feltöltés leállítása","Upload URL might be wrong or doesn't exist.":"A feltöltő URL hibás vagy nem létezik.","tb":"TB","Size":"Méret","Close":"Bezárás","You must specify either browse_button or drop_element.":"","Init error.":"Init hiba.","Add files to the upload queue and click the start button.":"A fájlok feltöltési sorhoz való hozzáadása után az Indítás gombra kell kattintani.","List":"","Filename":"Fájlnév","%s specified, but cannot be found.":"","Image format either wrong or not supported.":"Rossz vagy nem támogatott képformátum.","Status":"Állapot","HTTP Error.":"HTTP-hiba.","Start Upload":"Feltöltés indítása","Error: File too large:":"Hiba: a fájl túl nagy:","kb":"kB","Duplicate file error.":"Duplikáltfájl-hiba.","File size error.":"Hibás fájlméret.","N/A":"Nem elérhető","gb":"GB","Error: Invalid file extension:":"Hiba: érvénytelen fájlkiterjesztés:","Select files":"Fájlok kiválasztása","%s already present in the queue.":"%s már szerepel a listában.","Resoultion out of boundaries! <b>%s</b> runtime supports images only up to %wx%hpx.":"","File: %s":"Fájl: %s","b":"b","Uploaded %d/%d files":"Feltöltött fájlok: %d/%d","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"A feltöltés egyszerre csak %d fájlt fogad el, a többi fájl nem lesz feltöltve.","%d files queued":"%d fájl sorbaállítva","File: %s, size: %d, max file size: %d":"Fájl: %s, méret: %d, legnagyobb fájlméret: %d","Thumbnails":"","Drag files here.":"Ide lehet húzni a fájlokat.","Runtime ran out of available memory.":"Futásidőben elfogyott a rendelkezésre álló memória.","File count error.":"A fájlok számával kapcsolatos hiba.","File extension error.":"Hibás fájlkiterjesztés.","mb":"MB","Add Files":"Fájlok hozzáadása"});

2
lib/javascript/plupload/js/i18n/hy.js

@ -0,0 +1,2 @@
// Armenian (hy)
plupload.addI18n({"Stop Upload":"Կանգնեցնել","Upload URL might be wrong or doesn't exist.":"Ավեցաված URL-ը սխալ է կամ գոյություն չունի։","tb":"տբ","Size":"Չափ","Close":"Փակել","You must specify either browse_button or drop_element.":"","Init error.":"Ստեղծման սխալ","Add files to the upload queue and click the start button.":"Ավելացրեք ֆայլեր ցուցակում և սեղմեք \"Վերբեռնել\"։","List":"","Filename":"Ֆայլի անուն","%s specified, but cannot be found.":"","Image format either wrong or not supported.":"Նկարի ֆորմատը սխալ է կամ չի ընդունվում։","Status":"Կարգավիճակ","HTTP Error.":"HTTP սխալ","Start Upload":"Վերբեռնել","Error: File too large:":"Սխալ։ Ֆայլի չափը մեծ է։","kb":"կբ","Duplicate file error.":"Ֆայլի կրկնման սխալ","File size error.":"Ֆայլի չափի սխալ","N/A":"N/A","gb":"գբ","Error: Invalid file extension:":"Սխալ։ Ֆայլի ընդլայնումը սխալ է։","Select files":"Ընտրեք ֆայլերը","%s already present in the queue.":"%s ֆայլը արդեն ավելացված է ցուցակում.","Resoultion out of boundaries! <b>%s</b> runtime supports images only up to %wx%hpx.":"","File: %s":"Ֆայլ: %s","b":"բ","Uploaded %d/%d files":"Վերբեռնվել են %d/%d ֆայլերը","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Վերբեռնիչը միանգամից ըդունում է միայն %d ֆայլ(եր). Ավելորդ ֆայլերը հեռացվել են.","%d files queued":"ցուցակում կա %d ֆայլ","File: %s, size: %d, max file size: %d":"Ֆայլ: %s, չափ: %d, ֆայլի մաքսիմում չափ: %d","Thumbnails":"","Drag files here.":"Տեղափոխեք ֆայլերը այստեղ","Runtime ran out of available memory.":"Օպերատիվ հիշողության անբավարարուտյուն.","File count error.":"Ֆայլերի քանակի սխալ","File extension error.":"Ֆայլի ընդլայնման սխալ","mb":"մբ","Add Files":"Ավելացնել ֆայլեր"});

2
lib/javascript/plupload/js/i18n/id.js

@ -0,0 +1,2 @@
// Indonesian (id)
plupload.addI18n({"Stop Upload":"Hentikan Upload","Upload URL might be wrong or doesn't exist.":"Alamat URL untuk upload tidak benar atau tidak ada","tb":"tb","Size":"Ukuran","Close":"Tutup","You must specify either browse_button or drop_element.":"","Init error.":"Kesalahan pada Init","Add files to the upload queue and click the start button.":"Tambahkan file kedalam antrian upload dan klik tombol Mulai","List":"","Filename":"Nama File","%s specified, but cannot be found.":"","Image format either wrong or not supported.":"Kesalahan pada jenis gambar atau jenis file tidak didukung","Status":"Status","HTTP Error.":"HTTP Bermasalah","Start Upload":"Mulai Upload","Error: File too large:":"Kesalahan: File terlalu besar","kb":"kb","Duplicate file error.":"Terjadi duplikasi file","File size error.":"Kesalahan pada ukuran file","N/A":"N/A","gb":"gb","Error: Invalid file extension:":"Kesalahan: Ekstensi file tidak dikenal","Select files":"Pilih file","%s already present in the queue.":"%s sudah ada dalam daftar antrian","Resoultion out of boundaries! <b>%s</b> runtime supports images only up to %wx%hpx.":"","File: %s":"File: %s","b":"b","Uploaded %d/%d files":"File terupload %d/%d","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Tempat untuk upload hanya menerima %d file(s) dalam setiap upload. File lainnya tidak akan disertakan","%d files queued":"%d file dalam antrian","File: %s, size: %d, max file size: %d":"File: %s, ukuran: %d, maksimum ukuran file: %d","Thumbnails":"","Drag files here.":"Tarik file kesini","Runtime ran out of available memory.":"Tidak cukup memori","File count error.":"Kesalahan pada jumlah file","File extension error.":"Kesalahan pada ekstensi file","mb":"mb","Add Files":"Tambah File"});

2
lib/javascript/plupload/js/i18n/it.js

@ -0,0 +1,2 @@
// Italian (it)
plupload.addI18n({"Stop Upload":"Ferma Upload","Upload URL might be wrong or doesn't exist.":"URL di Upload errata o non esistente","tb":"tb","Size":"Dimensione","Close":"Chiudi","You must specify either browse_button or drop_element.":"Devi indicare almeno uno tra browse_button o drop_element.","Init error.":"Errore inizializzazione.","Add files to the upload queue and click the start button.":"Aggiungi i file alla coda di caricamento e clicca il pulsante di avvio.","List":"Lista","Filename":"Nome file","%s specified, but cannot be found.":"%s specificato, ma non è stato possibile trovarlo.","Image format either wrong or not supported.":"Formato immagine errato o non supportato.","Status":"Stato","HTTP Error.":"Errore HTTP.","Start Upload":"Inizia Upload","Error: File too large:":"Errore: File troppo grande:","kb":"kb","Duplicate file error.":"Errore file duplicato.","File size error.":"Errore dimensione file.","N/A":"N/D","gb":"gb","Error: Invalid file extension:":"Errore: Estensione file non valida:","Select files":"Seleziona i files","%s already present in the queue.":"%s già presente nella coda.","Resoultion out of boundaries! <b>%s</b> runtime supports images only up to %wx%hpx.":"Risoluzione oltre i limiti! <b>%s</b> runtime supporta immagini fino a %wx%hpx.","File: %s":"File: %s","b":"byte","Uploaded %d/%d files":"Caricati %d/%d file","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Upload element accepts only %d file(s) at a time. Extra files were stripped.","%d files queued":"%d file in coda","File: %s, size: %d, max file size: %d":"File: %s, dimensione: %d, dimensione max file: %d","Thumbnails":"Anteprime","Drag files here.":"Trascina i files qui.","Runtime ran out of available memory.":"Runtime ha esaurito la memoria disponibile.","File count error.":"File count error.","File extension error.":"Errore estensione file.","mb":"mb","Add Files":"Aggiungi file"});

2
lib/javascript/plupload/js/i18n/ja.js

@ -0,0 +1,2 @@
// Japanese (ja)
plupload.addI18n({"Stop Upload":"アップロード停止","Upload URL might be wrong or doesn't exist.":"アップロード先の URL が存在しません","tb":"TB","Size":"サイズ","Close":"閉じる","You must specify either browse_button or drop_element.":"ブラウザのボタンで または ファイルをドロップするか いずれかの方法で指定する必要があります。","Init error.":"イニシャライズエラー","Add files to the upload queue and click the start button.":"ファイルをアップロードキューに追加してスタートボタンをクリックしてください","List":"リスト","Filename":"ファイル名","%s specified, but cannot be found.":"指定された %s は見つかりません。","Image format either wrong or not supported.":"画像形式が間違っているかサポートされていません","Status":"ステータス","HTTP Error.":"HTTP エラー","Start Upload":"アップロード開始","Error: File too large:":"エラー: ファイルが大きすぎます:","kb":"KB","Duplicate file error.":"重複ファイルエラー","File size error.":"ファイルサイズエラー","N/A":"N/A","gb":"GB","Error: Invalid file extension:":"エラー: ファイルの拡張子が無効です:","Select files":"ファイル選択","%s already present in the queue.":"%s 既にキューに存在しています","Resoultion out of boundaries! <b>%s</b> runtime supports images only up to %wx%hpx.":"解像度がしきい値を超えています! ランタイム <b>%s</b> は縦 %h px 横 %w px までをサポートします","File: %s":"ファイル: %s","b":"B","Uploaded %d/%d files":"アップロード中 %d/%d ファイル","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"アップロード可能なファイル数は %d です 余分なファイルは削除されました","%d files queued":"%d ファイルが追加されました","File: %s, size: %d, max file size: %d":"ファイル: %s, サイズ: %d, 最大ファイルサイズ: %d","Thumbnails":"サムネイル","Drag files here.":"ここにファイルをドラッグ","Runtime ran out of available memory.":"ランタイムが使用するメモリが不足しました","File count error.":"ファイル数エラー","File extension error.":"ファイル拡張子エラー","mb":"MB","Add Files":"ファイルを追加"});

2
lib/javascript/plupload/js/i18n/ka.js

@ -0,0 +1,2 @@
// Georgian (ka)
plupload.addI18n({"Stop Upload":"ატვირთვის შეჩერება","Upload URL might be wrong or doesn't exist.":"ატვირთვის მისამართი არასწორია ან არ არსებობს.","tb":"ტბ","Size":"ზომა","Close":"დავხუროთ","You must specify either browse_button or drop_element.":"თქვენ უნდა მიუთითოთ browse_button ან drop_element.","Init error.":"ინიციალიზაციის შეცდომა.","Add files to the upload queue and click the start button.":"დაამატეთ ფაილები და დააჭირეთ ღილაკს - ატვირთვა.","List":"","Filename":"ფაილის სახელი","%s specified, but cannot be found.":"%s მითითებულია, მაგრამ ვერ მოიძებნა.","Image format either wrong or not supported.":"ფაილის ფორმატი არ არის მხარდაჭერილი ან არასწორია.","Status":"სტატუსი","HTTP Error.":"HTTP შეცდომა.","Start Upload":"ატვირთვა","Error: File too large:":"შეცდომა: ფაილი ზედმეტად დიდია.","kb":"კბ","Duplicate file error.":"ესეთი ფაილი უკვე დამატებულია.","File size error.":"ფაილის ზომა დაშვებულზე დიდია.","N/A":"N/A","gb":"გბ","Error: Invalid file extension:":"შეცდომა: ფაილს აქვს არასწორი გაფართოება.","Select files":"ფაილების მონიშვნა","%s already present in the queue.":"%s უკვე დამატებულია.","Resoultion out of boundaries! <b>%s</b> runtime supports images only up to %wx%hpx.":"სურათის გარჩევადობა აღემატება <b>%s</b> გარემოს მიერ მხარდაჭერილ მქსიმუმებს - %wx%hpx.","File: %s":"ფაილი: %s","b":"ბ","Uploaded %d/%d files":"ატვირთულია %d/%d ფაილი","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"ერთდროულად დაშვებულია მხოლოდ %d ფაილის დამატება.","%d files queued":"რიგშია %d ფაილი","File: %s, size: %d, max file size: %d":"ფაილი: %s, ზომა: %d, მაქსიმალური დაშვებული ზომა: %d","Thumbnails":"","Drag files here.":"ჩააგდეთ ფაილები აქ.","Runtime ran out of available memory.":"ხელმისაწვდომი მეხსიერება გადაივსო.","File count error.":"აღმოჩენილია ზედმეტი ფაილები.","File extension error.":"ფაილის ფორმატი დაშვებული არ არის.","mb":"მბ","Add Files":"დაამატეთ ფაილები"});

2
lib/javascript/plupload/js/i18n/kk.js

@ -0,0 +1,2 @@
// Kazakh (kk)
plupload.addI18n({"Stop Upload":"Жүктеуді тоқтату","Upload URL might be wrong or doesn't exist.":"Жүктеуді қабылдаушы URL қате не мүлдем көрсетілмеген.","tb":"тб","Size":"Өлшемі","Close":"Жабу","You must specify either browse_button or drop_element.":"","Init error.":"Инициализация қатесі.","Add files to the upload queue and click the start button.":"Жүктеу кезегіне файлдар қосып, Бастау кнопкасын басыңыз.","List":"","Filename":"Файл аты","%s specified, but cannot be found.":"","Image format either wrong or not supported.":"Сурет форматы қате немесе оның қолдауы жоқ.","Status":"Күйі","HTTP Error.":"HTTP қатесі.","Start Upload":"Жүктеуді бастау","Error: File too large:":"Қате: Файл мөлшері тым үлкен:","kb":"кб","Duplicate file error.":"Файл қайталамасының қатесі.","File size error.":"Файл өлшемінің қатесі.","N/A":"Қ/Ж","gb":"гб","Error: Invalid file extension:":"Қате: Файл кеңейтілуі қате:","Select files":"Файлдар таңдаңыз","%s already present in the queue.":"%s файлы кезекте бұрыннан бар.","Resoultion out of boundaries! <b>%s</b> runtime supports images only up to %wx%hpx.":"","File: %s":"Файл: %s","b":"б","Uploaded %d/%d files":"Жүктелген: %d/%d файл","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"Жүктеу элементі бір кезде %d файл ғана жүктей алады. Артық файлдар жүктелмейді.","%d files queued":"%d файл кезекке қойылды","File: %s, size: %d, max file size: %d":"Файл: %s, өлшемі: %d, макс. файл өлшемі: %d","Thumbnails":"","Drag files here.":"Файлдарды мына жерге тастаңыз.","Runtime ran out of available memory.":"Орындау кезінде жады жетпей қалды.","File count error.":"Файл санының қатесі.","File extension error.":"Файл кеңейтілуінің қатесі.","mb":"мб","Add Files":"Файл қосу"});

2
lib/javascript/plupload/js/i18n/km.js

@ -0,0 +1,2 @@
// Khmer (km)
plupload.addI18n({"Stop Upload":"បញ្ឈប់​ការ​ផ្ទុក​ឡើង","Upload URL might be wrong or doesn't exist.":"URL ផ្ទុក​ឡើង​អាច​ខុស ឬ​ក៏​គ្មាន។","tb":"tb","Size":"ទំហំ","Close":"បិទ","You must specify either browse_button or drop_element.":"","Init error.":"កំហុស Init។","Add files to the upload queue and click the start button.":"បន្ថែម​ឯកសារ​ទៅ​ក្នុង​ជួរ​លំដាប់​ផ្ទុក​ឡើង ហើយ​ចុច​ប៊ូតុង​ចាប់​ផ្ដើម។","List":"","Filename":"ឈ្មោះ​ឯកសារ","%s specified, but cannot be found.":"","Image format either wrong or not supported.":"ទ្រង់​ទ្រាយ​រូបភាព​អាច​ខុស ឬ​ក៏​មិន​ស្គាល់​តែ​ម្ដង។","Status":"ស្ថានភាព","HTTP Error.":"កំហុស HTTP ។","Start Upload":"ចាប់​ផ្ដើម​ផ្ទុក​ឡើង","Error: File too large:":"កំហុស៖ ឯកសារ​ធំ​ពេក៖","kb":"kb","Duplicate file error.":"កំហុស​ឯកសារ​ស្ទួន​គ្នា។","File size error.":"កំហុស​ទំហំ​ឯកសារ។","N/A":"គ្មាន","gb":"gb","Error: Invalid file extension:":"កំហុស៖ កន្ទុយ​ឯកសារ​មិន​ត្រឹម​ត្រូវ៖","Select files":"ជ្រើស​ឯកសារ","%s already present in the queue.":"មាន %s នៅ​ក្នុង​ជួរ​លំដាប់​ហើយ។","Resoultion out of boundaries! <b>%s</b> runtime supports images only up to %wx%hpx.":"","File: %s":"ឯកសារ៖ %s","b":"b","Uploaded %d/%d files":"បាន​ផ្ទុក​ឡើង​ឯកសារ %d/%d","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"ការ​ផ្ទុក​ឡើង​ទទួល​ឯកសារ​បាន​តែ %d ប៉ុណ្ណោះ​ក្នុង​ពេល​តែ​មួយ។ ឯកសារ​ផ្សេង​ទៀត​នឹង​ត្រូវ​ដក​ចេញ។","%d files queued":"បាន​ដាក់​ឯកសារ %d បន្ត​គ្នា","File: %s, size: %d, max file size: %d":"ឯកសារ៖ %s, size: %d, ទំហំ​ឯកសារ​អតិបរមា៖ %d","Thumbnails":"","Drag files here.":"អូស​ឯកសារ​មក​ទីនេះ។","Runtime ran out of available memory.":"ពេល​ដំណើរ​ការ​អស់​អង្គ​ចងចាំ​ទំនេរ​ហើយ។","File count error.":"កំហុស​ការ​រាប់​ឯកសារ។","File extension error.":"កំហុស​កន្ទុយ​ឯកសារ។","mb":"mb","Add Files":"បន្ថែម​ឯកសារ"});

2
lib/javascript/plupload/js/i18n/ko.js

@ -0,0 +1,2 @@
// Korean (ko)
plupload.addI18n({"Stop Upload":"업로드 중지","Upload URL might be wrong or doesn't exist.":"업로드할 URL이 존재하지 않습니다.","tb":"tb","Size":"크기","Close":"닫기","You must specify either browse_button or drop_element.":"browse_button 이나 drop_element 둘 중 하나를 지정해 주세요.","Init error.":"초기화 오류.","Add files to the upload queue and click the start button.":"파일을 업로드 큐에 추가한 후 시작 버튼을 클릭하십시오.","List":"목록","Filename":"파일명","%s specified, but cannot be found.":"%s 가 지정됐지만, 찾을 수 없습니다.","Image format either wrong or not supported.":"지원되지 않는 이미지 형식입니다.","Status":"상태","HTTP Error.":"HTTP 오류.","Start Upload":"업로드 시작","Error: File too large:":"오류: 파일 크기가 너무 큽니다.","kb":"kb","Duplicate file error.":"파일 중복 오류.","File size error.":"파일 크기 오류.","N/A":"N/A","gb":"gb","Error: Invalid file extension:":"오류: 허용되지 않은 확장자입니다.","Select files":"파일 선택","%s already present in the queue.":"%s 파일이 이미 대기열에 존재합니다.","Resoultion out of boundaries! <b>%s</b> runtime supports images only up to %wx%hpx.":"해상도 지원 범위를 초과했습니다! <b>%s</b> 런타임은 %wx%hpx 이상의 이미지를 지원합니다.","File: %s":"파일: %s","b":"b","Uploaded %d/%d files":"%d / %d 파일 업로드 완료","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"업로드 가능한 파일의 수는 %d 입니다. 불필요한 파일은 삭제되었습니다.","%d files queued":"%d 파일이 추가됨","File: %s, size: %d, max file size: %d":"파일: %s, 크기: %d, 최대 파일 크기: %d","Thumbnails":"미리보기","Drag files here.":"이곳에 파일을 드래그 하세요.","Runtime ran out of available memory.":"런타임 메모리가 부족합니다.","File count error.":"파일 갯수 오류.","File extension error.":"파일 확장자 오류.","mb":"mb","Add Files":"파일 추가"});

2
lib/javascript/plupload/js/i18n/ku_IQ.js

@ -0,0 +1,2 @@
// Kurdish (Iraq) (ku_IQ)
plupload.addI18n({"Stop Upload":"وەستانی بارکردن","Upload URL might be wrong or doesn't exist.":".بەستەری بارکراو نادروستە یان بەردەست نییە","tb":"تێرابایت","Size":"قەبارە","Close":"داخستن","You must specify either browse_button or drop_element.":"","Init error.":".هەڵەی ئامادەکردن","Add files to the upload queue and click the start button.":".زیادکردنی پەڕگەکان بۆ ڕیزی بارکردن و کرتەکردن لە دوگمەی دەستپێکردن","List":"","Filename":"ناوی پەڕگە","%s specified, but cannot be found.":"","Image format either wrong or not supported.":".شێوازی وێنە هەڵەیە یان پاڵپشتی ناکرێت","Status":"ڕەوش","HTTP Error.":".HTTP هەڵەی","Start Upload":"دەستپێکردنی بارکردن","Error: File too large:":":هەڵە: پەڕگەکە زۆر گەورەیە","kb":"کیلۆبایت","Duplicate file error.":".هەڵەی پەڕگەی دوبارە","File size error.":".هەڵەی قەبارەی پەڕگە","N/A":"بەردەست نییە","gb":"گێگابایت","Error: Invalid file extension:":":هەڵە: پاشگری پەڕگەی نادروست","Select files":"دیاریکردنی پەڕگەکان","%s already present in the queue.":".ئامادەیی هەیە لە ڕیز %s","Resoultion out of boundaries! <b>%s</b> runtime supports images only up to %wx%hpx.":"","File: %s":"%s :پەڕگە","b":"بایت","Uploaded %d/%d files":"پەڕگە بارکران %d/%d","Upload element accepts only %d file(s) at a time. Extra files were stripped.":"بەشی بارکردن تەنها %d پەڕگە(کان) وەردەگرێت لەیەک کاتدا. پەڕگە زیادەکان .جیادەکرێنەوە","%d files queued":"پەڕگە ڕیزکران %d","File: %s, size: %d, max file size: %d":"پەڕگە: %s، قەبارە: %d، گەورەترین قەبارەی پەڕگە: %d","Thumbnails":"","Drag files here.":".پەڕگەکان ڕاکێشە بۆ ئێرە","Runtime ran out of available memory.":"هەڵەی دەرچوون لە بیرگەی بەردەست.","File count error.":".هەڵەی ژماردنی پەڕگە","File extension error.":".هەڵەی پاشگری پەڕگە","mb":"مێگابایت","Add Files":"زیادکردنی پەڕگەکان"});

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save