-
119index.php
-
4lib/assembler.php
-
54lib/controller/addFilter.php
-
9lib/controller/addModule.php
-
42lib/controller/addPhoneBookRecord.php
-
0lib/controller/checkDeviceOperation.php
-
123lib/controller/dash/node_11.js
-
3lib/controller/dash/node_13.js
-
229lib/controller/dash/node_3.js
-
BINlib/controller/data/factory.db
-
BINlib/controller/data/mysqlitedb.db
-
BINlib/controller/data/reports.db
-
2lib/controller/data/server.log
-
12lib/controller/doApplicationOperation.php
-
130lib/controller/doCameraOperation.php
-
98lib/controller/doFilterOperation.php
-
114lib/controller/doMaskOperation.php
-
136lib/controller/doSensorOperation.php
-
168lib/controller/getCameraEditor.php
-
8lib/controller/getCameraPreview.php
-
154lib/controller/getDashBoardItems.php
-
5lib/controller/getDetectionProfile.php
-
6lib/controller/getDeviceDraw.php
-
25lib/controller/getDeviceFiles.php
-
3lib/controller/getDeviceMask.php
-
21lib/controller/getDeviceUploadStatus.php
-
204lib/controller/getFilterEditor.php
-
17lib/controller/getFilterInfo.php
-
43lib/controller/getFilters.php
-
16lib/controller/getHistoryDates.php
-
38lib/controller/getHistoryDay.php
-
33lib/controller/getHistoryEvents.php
-
0lib/controller/getMaskSchedule.php
-
0lib/controller/getMaskScheduleEditor.php
-
145lib/controller/getMetroBottomSensorEditor.php
-
126lib/controller/getMetroFusionEditor.php
-
145lib/controller/getMetroUpperSensorEditor.php
-
7lib/controller/getModuleEditor.php
-
6lib/controller/getModuleInfo.php
-
251lib/controller/getModuleSettings.php
-
10lib/controller/getPhoneBook.php
-
206lib/controller/getReportLayout.php
-
10lib/controller/getResourceEditor.php
-
729lib/controller/getSensorEditor.php
-
2lib/controller/getServerStatus.php
-
59lib/controller/getStatus.php
-
34lib/controller/getSystemDevices.php
-
17lib/controller/getVideoInfo.php
-
0lib/controller/getWidthTable.php
-
0lib/controller/getWidthTableEditor.php
-
24lib/controller/listAccessLog.php
-
0lib/controller/listServerLog.php
-
22lib/controller/listUarts.php
-
27lib/controller/listUsers.php
-
75lib/controller/medeminfo 1.txt
-
28lib/controller/report/node_0.js
-
96lib/controller/report/node_1.js
-
39lib/controller/report/node_10.js
-
61lib/controller/report/node_11.js
-
18lib/controller/report/node_12.js
-
72lib/controller/report/node_13 - Copy.js
-
91lib/controller/report/node_13.js
-
19lib/controller/report/node_13.js.bk2
-
88lib/controller/report/node_2.js
-
95lib/controller/report/node_3 - Copy.js
-
95lib/controller/report/node_3.js
-
95lib/controller/report/node_4.js
-
164lib/controller/report/node_5.js
-
16lib/controller/report/tpl.js
-
124lib/controller/updateUser.php
-
125lib/controller/uploadDeviceMask.php
-
63lib/controller/uploadToDevice.php
-
1lib/controller/vfd.txt
-
15lib/defines.php
-
2lib/error.log
-
346lib/javascript/jsapi_dynamic/loaders.html
-
828lib/javascript/jsapi_dynamic/mojo_dashboard.js
-
1lib/javascript/jsapi_dynamic/mojo_global_vars.js
-
6lib/javascript/jsapi_dynamic/mojo_logs.js
-
15lib/javascript/jsapi_dynamic/mojo_main.js
-
94lib/javascript/jsapi_dynamic/mojo_metro.js
-
309lib/javascript/jsapi_dynamic/mojo_reports.js
-
807lib/javascript/jsapi_dynamic/mojo_settings.js
-
649lib/javascript/jsapi_dynamic/mojo_users.js
-
162lib/javascript/jsapi_dynamic/rgoose_devices.js
-
67lib/javascript/jsapi_dynamic/rgoose_swupgrade.js
-
171lib/javascript/jsapi_dynamic/rgoose_users.js
-
BINlib/javascript/jsapi_dynamic/vatican_308px-100m.jpg
-
13lib/javascript/jsapi_static/mojo_general.js
-
2lib/php/argus/argus.php
-
16lib/php/db/user_class.php
-
71lib/php/ui/UI_functions.php
-
BINstyle/assets/and.png
-
BINstyle/assets/bul_blue.png
-
BINstyle/assets/bul_blue_rst.png
-
BINstyle/assets/bul_gray.png
-
BINstyle/assets/bul_green.png
-
BINstyle/assets/bul_green_rst.png
-
BINstyle/assets/ios.png
-
BINstyle/assets/load_bullets.psd
@ -1,42 +1,95 @@ |
|||||
<?php |
<?php |
||||
require_once('lib/assembler.php'); |
require_once('lib/assembler.php'); |
||||
if( $CUser->Data['id'] > 1 ){ |
|
||||
if( $CUser->Data['access'] > 5 ){ |
|
||||
UI_PageHeaderExt( |
|
||||
'mojo_general.js', |
|
||||
array( |
|
||||
'rgoose_global_vars.js', |
|
||||
'rgoose_swupgrade.js', |
|
||||
'rgoose_map.js', |
|
||||
'mojo_reports.js', |
|
||||
'rgoose_devices.js', |
|
||||
'rgoose_cameras.js', |
|
||||
'rgoose_modules.js', |
|
||||
'mojo_monitoring.js', |
|
||||
'rgoose_location_editor.js', |
|
||||
'mojo_dashboard.js', |
|
||||
'rgoose_users.js', |
|
||||
'rgoose_logs.js', |
|
||||
//'rgoose_single_ipi.js',
|
|
||||
'mojo_settings.js', |
|
||||
'mojo_main.js' |
|
||||
) |
|
||||
); |
|
||||
|
if( $SSL_INSTALLLED || 1 ){ |
||||
|
if( $CUser->Data['id'] > 1 ){ |
||||
|
if( $CUser->Data['access'] > 5 ){ |
||||
|
UI_PageHeaderExt( |
||||
|
'mojo_general.js', |
||||
|
array( |
||||
|
'mojo_global_vars.js', |
||||
|
'rgoose_map.js', |
||||
|
'mojo_reports.js', |
||||
|
'rgoose_devices.js', |
||||
|
'rgoose_cameras.js', |
||||
|
'rgoose_modules.js', |
||||
|
'mojo_monitoring.js', |
||||
|
'rgoose_location_editor.js', |
||||
|
'mojo_dashboard.js', |
||||
|
'mojo_users.js', |
||||
|
'mojo_logs.js', |
||||
|
'mojo_metro.js', |
||||
|
'mojo_settings.js', |
||||
|
'mojo_main.js' |
||||
|
) |
||||
|
); |
||||
|
} else { |
||||
|
UI_PageHeaderExt( |
||||
|
'mojo_general.js', |
||||
|
array( |
||||
|
'mojo_global_vars.js', |
||||
|
'rgoose_map.js', |
||||
|
'mojo_reports.js', |
||||
|
'rgoose_devices.js', |
||||
|
'rgoose_cameras.js', |
||||
|
'rgoose_modules.js', |
||||
|
'mojo_monitoring.js', |
||||
|
'mojo_dashboard.js', |
||||
|
'mojo_settings.js', |
||||
|
'mojo_main.js' |
||||
|
) |
||||
|
); |
||||
|
}; |
||||
|
UI_PageBottomExt(); |
||||
} else { |
} else { |
||||
UI_PageHeaderExt( |
|
||||
'mojo_general.js', |
|
||||
array( |
|
||||
'rgoose_map.js', |
|
||||
'rgoose_reports.js', |
|
||||
'rgoose_dashboard.js', |
|
||||
'rgoose_main.js' |
|
||||
) |
|
||||
); |
|
||||
|
UI_PageHeader(); |
||||
|
UI_LoginForm(); |
||||
|
UI_PageBottom(); |
||||
}; |
}; |
||||
UI_PageBottomExt(); |
|
||||
} else { |
} else { |
||||
|
$UPLOAD = false; |
||||
|
$VALID = false; |
||||
|
if( isset( $_FILES ) ){ |
||||
|
$UPLOAD = true; |
||||
|
$Z = '/srv/www/web/lib/tmp/'.basename($_FILES["fcert"]["name"]); |
||||
|
$JUJA = $_FILES["fcert"]["tmp_name"]; |
||||
|
$CMD = 'openssl verify -verbose -CAfile /srv/www/web/style/assets/rootCA.crt ' . $_FILES["fcert"]["tmp_name"]; |
||||
|
$DATA = `{$CMD}`; |
||||
|
if( stripos( $DATA, ': OK')!== false ){ |
||||
|
$CMD = 'openssl x509 -ext subjectAltName -noout -in ' . $_FILES["fcert"]["tmp_name"]; |
||||
|
$DATA = `{$CMD}`; |
||||
|
$TArr = explode( "\n", $DATA ); |
||||
|
if( count( $TArr ) > 1 ){ |
||||
|
$IPS = array(); |
||||
|
foreach( $TArr as $T ){ |
||||
|
$CL = explode( ',', trim( $T ) ); |
||||
|
foreach( $CL as $C ){ |
||||
|
$PArr = explode( ':', $C ); |
||||
|
if( stripos( $PArr[0], 'IP Address' )!== false ) $IPS[] = $PArr[1]; |
||||
|
}; |
||||
|
}; |
||||
|
if( count( $IPS ) ){ |
||||
|
foreach( $IPS as $IP ) if ( $IP == $_SERVER['HTTP_HOST'] ) $VALID = true; |
||||
|
if( $VALID ){ |
||||
|
// Setup SSL
|
||||
|
@unlink($_FILES['fcert']['tmp_name']); |
||||
|
} else { |
||||
|
$ERR = $Labels->GetLabel('_SSL_CERT_IP_NO_'); |
||||
|
}; |
||||
|
} else { |
||||
|
// No IP defined in Cert
|
||||
|
$ERR = $Labels->GetLabel('_SSL_NO_IP_CERT_'); |
||||
|
}; |
||||
|
} else { |
||||
|
// No Extension
|
||||
|
$ERR = $Labels->GetLabel('_SSL_NO_EXT_CERT_'); |
||||
|
}; |
||||
|
} else { |
||||
|
// CERT is invalid
|
||||
|
$ERR = $Labels->GetLabel('_SSL_CERT_INVALID__'); |
||||
|
}; |
||||
|
}; |
||||
UI_PageHeader(); |
UI_PageHeader(); |
||||
UI_LoginForm(); |
|
||||
|
UI_SSLDialog(); |
||||
UI_PageBottom(); |
UI_PageBottom(); |
||||
}; |
}; |
||||
?>
|
?>
|
||||
@ -0,0 +1,54 @@ |
|||||
|
<?php |
||||
|
require_once('../ajax_asm.php'); |
||||
|
$UID = intval($CUser->Data['id'] ); |
||||
|
$ACCESS = intval($CUser->Data['access'] ); |
||||
|
if( $UID > 1 && $ACCESS > 4 ){ |
||||
|
$Data['status'] = 'nok'; |
||||
|
$T = intval( $_POST['TYPE'] ); |
||||
|
if( $T ){ |
||||
|
$QS = "SELECT * FROM `target_filter_types` WHERE `id`={$T}"; |
||||
|
$ZZ = $DATABASE->Query( $QS ); |
||||
|
if( count( $ZZ ) ){ |
||||
|
$CTI = $ZZ[0]; |
||||
|
$ADE = true; |
||||
|
if( intval( $CTI['allow_multiply'] ) == 0 ){ |
||||
|
$QS = "SELECT * FROM `target_filters` WHERE `type`={$T}"; |
||||
|
$SS = $DATABASE->Query( $QS ); |
||||
|
if( count( $SS ) ){ |
||||
|
$ADE = false; |
||||
|
$Data['msg'] = 'This type of Target Fiter can be added only Once!'; |
||||
|
}; |
||||
|
}; |
||||
|
if( $ADE ){ |
||||
|
$QAS = "INSERT INTO `target_filters`(`type`,`aux_id`,`enabled`) VALUES({$T},0,0);"; |
||||
|
$DATABASE->Query( $QAS ); |
||||
|
$MID = $DATABASE->getLastInsertID(); |
||||
|
$MCID = 0; |
||||
|
switch( $T ){ |
||||
|
case 1:{ |
||||
|
//TRAIN
|
||||
|
$QS = "INSERT INTO `target_filter_train`(`TRAIN_DETECT`,`TRAIN_WIDTH`,`DECISION_TIME`,`SUSPECT_TIME`) VALUES(1,60000,10,20)"; |
||||
|
$DATABASE->Query( $QS ); |
||||
|
$MCID = $DATABASE->getLastInsertID(); |
||||
|
$QS = "UPDATE `target_filters` SET `aux_id`={$MCID} WHERE `id`={$MID}"; |
||||
|
$DATABASE->Query( $QS ); |
||||
|
break; |
||||
|
}; |
||||
|
}; |
||||
|
$Data['status'] = 'ok'; |
||||
|
//$fd = fopen( "debug.txt", "a+" );
|
||||
|
//fprintf( $fd, $DATABASE->getDebugLog() );
|
||||
|
//fclose( $fd );
|
||||
|
//$Data['dblog'] = $DATABASE->getDebugLog();
|
||||
|
}; |
||||
|
} else { |
||||
|
$Data['msg'] = 'Wrong Target Filter Type is supplied!'; |
||||
|
}; |
||||
|
} else { |
||||
|
$Data['msg'] = 'No Target Filter Type is supplied!'; |
||||
|
}; |
||||
|
echo json_encode( $Data ); |
||||
|
exit(); |
||||
|
}; |
||||
|
header('location: /'); |
||||
|
?>
|
||||
@ -0,0 +1,42 @@ |
|||||
|
<?php |
||||
|
require_once('../ajax_asm.php'); |
||||
|
|
||||
|
if( $CUser->Data['id'] > 1 ){ |
||||
|
$Data['success'] = false; |
||||
|
if( $CUser->Data['access'] > 5 ){ |
||||
|
$NL = trim( $_POST['PNAM'] ); |
||||
|
$NN = str_ireplace('+','', |
||||
|
str_ireplace('-','', |
||||
|
str_ireplace( ' ', '', $_POST['PNUM'] |
||||
|
) |
||||
|
) |
||||
|
); |
||||
|
$CO = intval( $_POST['PCAL'] ); |
||||
|
if( $CO == 0 ){ |
||||
|
$CMS = $DATABASE->escape( $_POST['PMSG'] ); |
||||
|
}; |
||||
|
if( strlen( $NN ) > 7 ) { |
||||
|
if( substr( $NN, 1 ) == '0' ){ |
||||
|
} else { |
||||
|
}; |
||||
|
if( strlen( $NL ) == 0 ){ |
||||
|
$NL = 'New Number'; |
||||
|
}; |
||||
|
if( $CO ){ |
||||
|
$QS = "INSERT INTO `module_modem_phonebook`(`number`,`call_only`,`label`) VALUES('{$NN}',1,'{$NL}')"; |
||||
|
} else { |
||||
|
$QS = "INSERT INTO `module_modem_phonebook`(`number`,`call_only`,`label`,`custom_msg`) VALUES('{$NN}', 0,'{$NL}','{$CMS}')"; |
||||
|
}; |
||||
|
$DATABASE->Query( $QS ); |
||||
|
$Data['success'] = true; |
||||
|
} else { |
||||
|
$Data['msg'] = 'Number is Invalid!'; |
||||
|
}; |
||||
|
} else { |
||||
|
$Data['msg'] = 'Access Denied!'; |
||||
|
}; |
||||
|
echo json_encode( $Data ); |
||||
|
exit(); |
||||
|
}; |
||||
|
header( 'location: /'); |
||||
|
?>
|
||||
@ -1,96 +1,61 @@ |
|||||
{ |
{ |
||||
id: 'db_node_%%%NODEID%%%', |
id: 'db_node_%%%NODEID%%%', |
||||
//xxtype: 'panel',
|
|
||||
xtype: 'portlet', |
|
||||
//columnWidth:.33,
|
|
||||
//layout: 'fit',
|
|
||||
width: 258, |
|
||||
height: %%%HEIGHT%%%+68, |
|
||||
|
layout:'vbox', |
||||
tools: [{ |
tools: [{ |
||||
id:'gear', |
id:'gear', |
||||
handler: function(){ |
handler: function(){ |
||||
editAnalogStream( %%%STREAMID%%%, 1 ); |
|
||||
} |
} |
||||
}/*,{ |
|
||||
id:'close', |
|
||||
handler: function(e, target, panel){ |
|
||||
panel.ownerCt.remove(panel, true); |
|
||||
} |
|
||||
}*/], |
|
||||
|
}], |
||||
frame: true, |
frame: true, |
||||
|
draggable: false, |
||||
|
collapsible: false, |
||||
bodyStyle: 'padding: 0px;', |
bodyStyle: 'padding: 0px;', |
||||
plr: null, |
|
||||
title: '%%%NODENAME%%%', |
title: '%%%NODENAME%%%', |
||||
|
sukaMineWidth: -1, |
||||
items:[{ |
items:[{ |
||||
html: '<img onmouseover="ptzCtrl(\'img-%%%NODEID%%%\');" ondblclick="fullScreen(\'img-%%%NODEID%%%\');" style="cursor: zoom-in" id="img-%%%NODEID%%%" src="%%%SELURL%%%" width="%%%WIDTH%%%" height="%%%HEIGHT%%%"/>', |
|
||||
},{ |
|
||||
xtype: 'spacer', |
|
||||
height: 5 |
|
||||
},{ |
|
||||
xtype: 'button', |
|
||||
id: 'ptz_btn_%%%NODEID%%%', |
|
||||
|
id: 'db_node_%%%NODEID%%%_pic', |
||||
|
border: true, |
||||
width: '100%', |
width: '100%', |
||||
text: 'PTZ Control', |
|
||||
enableToggle: true, |
|
||||
handler: function(){ |
|
||||
var t = Ext.getCmp('db_node_%%%NODEID%%%'); |
|
||||
if( Ext.getCmp('ptz_btn_%%%NODEID%%%').pressed ){ |
|
||||
document.getElementById('img_btn_010_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
|
||||
document.getElementById('img_btn_010_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
|
||||
document.getElementById('img_btn_011_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
|
||||
document.getElementById('img_btn_011_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
|
||||
document.getElementById('img_btn_027_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
|
||||
document.getElementById('img_btn_027_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
|
||||
document.getElementById('img_btn_028_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
|
||||
document.getElementById('img_btn_028_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
|
||||
document.getElementById('img_btn_029_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
|
||||
document.getElementById('img_btn_029_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
|
||||
document.getElementById('img_btn_030_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
|
||||
document.getElementById('img_btn_030_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
|
||||
document.getElementById('img_btn_031_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
|
||||
document.getElementById('img_btn_031_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
|
||||
document.getElementById('img_btn_032_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
|
||||
document.getElementById('img_btn_032_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
|
||||
document.getElementById('img_btn_033_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
|
||||
document.getElementById('img_btn_033_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
|
||||
document.getElementById('img_btn_034_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
|
||||
document.getElementById('img_btn_034_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
|
||||
document.getElementById('img_btn_020_%%%NODEID%%%').addEventListener( 'mousedown', makePtzStop ); |
|
||||
} else { |
|
||||
t.setSize( 258, %%%HEIGHT%%%+68 ); |
|
||||
//Ext.Msg.alert('Message', 'The 270 tool was clicked.');
|
|
||||
}; |
|
||||
t.doLayout(); |
|
||||
} |
|
||||
},{ |
|
||||
xtype: 'spacer', |
|
||||
height: 3 |
|
||||
},{ |
|
||||
html: '<table width="100%" border=0><tr><td width="24"><img id="img_btn_010_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/010.png"></td><td width="24"><img id="img_btn_032_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/032.png"></td><td width="24"><img id="img_btn_033_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/033.png"></td><td width="24"><img id="img_btn_034_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/034.png"></td><td> </td></tr><tr><td><img id="img_btn_011_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/011.png"></td><td><img id="img_btn_031_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/031.png"></td><td><img id="img_btn_020_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/basic/020.png"></td><td><img id="img_btn_027_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/027.png"></td><td> </td></tr><tr><td> </td><td><img id="img_btn_030_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/030.png"></td><td><img id="img_btn_029_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/029.png"></td><td><img id="img_btn_028_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/028.png"></td><td> </td></tr></table>', |
|
||||
height: 90 |
|
||||
|
html: '<div id="img-%%%NODEID%%%" style="display: flex;align-items: center;" ><img id="img-img-%%%NODEID%%%" ondblclick="fullScreen(\'img-%%%NODEID%%%\');" style="cursor: zoom-in" src="%%%SELURL%%%" width="100%" /><div style="float: left; position: absolute; left: 30px; bottom: 50px; z-index: 1000;"><table width="100%" border=0><tr><td width="24"><img id="img_btn_010_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/010.png"></td><td width="24"><img id="img_btn_032_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/032.png"></td><td width="24"><img id="img_btn_033_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/033.png"></td><td width="24"><img id="img_btn_034_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/034.png"></td><td> </td></tr><tr><td><img id="img_btn_011_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/011.png"></td><td><img id="img_btn_031_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/031.png"></td><td><img id="img_btn_020_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/basic/020.png"></td><td><img id="img_btn_027_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/027.png"></td><td> </td></tr><tr><td> </td><td><img id="img_btn_030_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/030.png"></td><td><img id="img_btn_029_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/029.png"></td><td><img id="img_btn_028_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/028.png"></td><td> </td></tr></table></div></div>' |
||||
}], |
}], |
||||
listeners:{ |
listeners:{ |
||||
afterrender: function( t ){ |
|
||||
/* |
|
||||
t.plr = videojs.getPlayer('hls-%%%NODEID%%%'); |
|
||||
if( t.plr == null ){ |
|
||||
t.plr = videojs('hls-%%%NODEID%%%',{ |
|
||||
autoplay: 'muted', |
|
||||
controls: true, |
|
||||
controlBar: { |
|
||||
volumePanel: false, |
|
||||
playToggle: false, |
|
||||
pictureInPictureToggle: false |
|
||||
} |
|
||||
}); |
|
||||
|
resize: function( p, adjWidth, adjHeight, rawWidth, rawHeight ){ |
||||
|
if( rawWidth!= undefined ){ |
||||
|
if( p.sukaMineWidth != adjWidth ){ |
||||
|
p.sukaMineWidth = adjWidth; |
||||
|
var XX = p.sukaMineWidth * %%%HEIGHT%%% / %%%WIDTH%%%; |
||||
|
p.setHeight( XX + 32 ); |
||||
|
var z = Ext.getCmp('db_node_%%%NODEID%%%_pic'); |
||||
|
z.setHeight( XX ); |
||||
|
}; |
||||
}; |
}; |
||||
t.plr.src({type: 'application/x-mpegURL', src: '%%%SELURL%%%'}); |
|
||||
*/ |
|
||||
return true; |
|
||||
}, |
|
||||
destroy: function( t ){ |
|
||||
if( t.plr != null ) t.plr.dispose(); |
|
||||
t.plr = null; |
|
||||
|
}, |
||||
|
afterrender: function( p ){ |
||||
|
var xx = p.getWidth() * %%%HEIGHT%%% / %%%WIDTH%%%; |
||||
|
p.setHeight( xx + 32 ); |
||||
|
var z = Ext.getCmp('db_node_%%%NODEID%%%_pic'); |
||||
|
z.setHeight( xx ); |
||||
|
document.getElementById('img_btn_010_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_010_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_011_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_011_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_027_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_027_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_028_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_028_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_029_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_029_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_030_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_030_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_031_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_031_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_032_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_032_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_033_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_033_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_034_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_034_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_020_%%%NODEID%%%').addEventListener( 'mousedown', makePtzStop ); |
||||
} |
} |
||||
} |
} |
||||
} |
} |
||||
@ -1 +1 @@ |
|||||
/srv/samba/dr_frucht/Projects/argus/Debug/server.log |
|
||||
|
/srv/mojo/server.log |
||||
@ -0,0 +1,98 @@ |
|||||
|
<?php |
||||
|
require_once('../ajax_asm.php'); |
||||
|
if( $CUser->Data['id'] > 1 ){ |
||||
|
$Data = array(); |
||||
|
$Data['success'] = false; |
||||
|
if( isset( $_POST['FID'] ) ) { |
||||
|
$FID = intval($_POST['FID']); |
||||
|
} else $FID = 0; |
||||
|
if( isset( $_POST['OPID'] ) ){ |
||||
|
$CMD = intval( $_POST['OPID'] ); |
||||
|
} else { |
||||
|
$CMD = 0; |
||||
|
}; |
||||
|
if( isset( $_POST['OPCODE'] ) ){ |
||||
|
$OPCODE = intval( $_POST['OPCODE'] ); |
||||
|
} else { |
||||
|
$OPCODE = 0; |
||||
|
}; |
||||
|
if( $FID > 0 && $CMD > 0 ){ |
||||
|
$QS = "SELECT * FROM `target_filters` WHERE `id`={$FID}"; |
||||
|
$TT = $DATABASE->Query( $QS ); |
||||
|
$Data['success'] = true; |
||||
|
if( count( $TT ) ){ |
||||
|
$JJ = $TT[0]; |
||||
|
switch( $JJ['type'] ){ |
||||
|
case 1:{//Train
|
||||
|
switch( $CMD ){ |
||||
|
case 1: { |
||||
|
$QS = "UPDATE `lrf_sensors` SET `filter_id` = 0 WHERE `filter_id` = {$FID}"; |
||||
|
$DATABASE->Query( $QS ); |
||||
|
$QS = "DELETE FROM `target_filter_train` WHERE `id`={$JJ['aux_id']}"; |
||||
|
$DATABASE->Query( $QS ); |
||||
|
$QS = "DELETE FROM `target_filters` WHERE `id`={$FID}"; |
||||
|
break; |
||||
|
}; |
||||
|
case 2: $QS = "UPDATE `target_filters` SET `enabled`={$OPCODE} WHERE `id`={$FID}"; break; |
||||
|
case 3:{ |
||||
|
if( $OPCODE ){ |
||||
|
$QS = "SELECT `aux_id` FROM `nodes` WHERE `id`={$OPCODE}"; |
||||
|
$R = $DATABASE->Query( $QS ); |
||||
|
$SID = $R[0]['aux_id']; |
||||
|
$QS = "UPDATE `lrf_sensors` SET `filter_id`={$FID} WHERE `id`={$SID}"; |
||||
|
$DATABASE->Query( $QS ); |
||||
|
}; |
||||
|
$QS = "UPDATE `target_filter_train` SET `UPPER_SENSOR`={$OPCODE} WHERE `id`={$JJ['aux_id']}"; |
||||
|
break; |
||||
|
}; |
||||
|
case 4:{ |
||||
|
if( $OPCODE ){ |
||||
|
$QS = "SELECT `aux_id` FROM `nodes` WHERE `id`={$OPCODE}"; |
||||
|
$R = $DATABASE->Query( $QS ); |
||||
|
$SID = $R[0]['aux_id']; |
||||
|
$QS = "UPDATE `lrf_sensors` SET `filter_id`={$FID} WHERE `id`={$SID}"; |
||||
|
$DATABASE->Query( $QS ); |
||||
|
}; |
||||
|
$QS = "UPDATE `target_filter_train` SET `LOWER_SENSOR`={$OPCODE} WHERE `id`={$JJ['aux_id']}"; |
||||
|
break; |
||||
|
}; |
||||
|
case 5: $QS = "UPDATE `target_filter_train` SET `TRAIN_DETECT`={$OPCODE} WHERE `id`={$JJ['aux_id']}"; break; |
||||
|
case 6: $QS = "UPDATE `target_filter_train` SET `TRAIN_WIDTH`={$OPCODE} WHERE `id`={$JJ['aux_id']}"; break; |
||||
|
case 7: $QS = "UPDATE `target_filter_train` SET `DECISION_TIME`={$OPCODE} WHERE `id`={$JJ['aux_id']}"; break; |
||||
|
case 8: $QS = "UPDATE `target_filter_train` SET `SUSPECT_TIME`={$OPCODE} WHERE `id`={$JJ['aux_id']}"; break; |
||||
|
case 9:{ |
||||
|
if( isset( $_POST['DTR'] ) ) $DTR=intval( $_POST['DTR'] ); else $DTR = 0; |
||||
|
if( isset( $_POST['DTM'] ) ) $DTM=intval( $_POST['DTM'] ); else $DTM = 0; |
||||
|
if( isset( $_POST['STM'] ) ) $STM=intval( $_POST['STM'] ); else $STM = 0; |
||||
|
if( isset( $_POST['TTR'] ) ) $TTR=intval( $_POST['TTR'] ); else $TTR = 0; |
||||
|
if( isset( $_POST['WIZ'] ) ) $WIZ=intval( $_POST['WIZ'] ); else $WIZ = 0; |
||||
|
if( isset( $_POST['DBG'] ) ) $DBG=intval( $_POST['DBG'] ); else $DBG = 0; |
||||
|
$QS = "UPDATE `target_filter_train` SET `TRAIN_DETECT`={$DTR},`TRAIN_WIDTH`={$WIZ},`DECISION_TIME`={$DTM},`SUSPECT_TIME`={$STM},`TRACK_TRAIN`={$TTR},`DEBUG`={$DBG} WHERE `id`={$JJ['aux_id']}"; |
||||
|
break; |
||||
|
}; |
||||
|
}; |
||||
|
break; |
||||
|
}; |
||||
|
case 2:{//AFP
|
||||
|
switch( $CMD ){ |
||||
|
case 1: { |
||||
|
$QS = "UPDATE `lrf_sensors` SET `filter_id` = 0 WHERE `filter_id` = {$FID}"; |
||||
|
$DATABASE->Query( $QS ); |
||||
|
$QS = "DELETE FROM `target_filters` WHERE `id`={$FID}"; |
||||
|
break; |
||||
|
}; |
||||
|
}; |
||||
|
break; |
||||
|
}; |
||||
|
}; |
||||
|
$DATABASE->Query( $QS, false ); |
||||
|
$Data['query'] = $QS; |
||||
|
}; |
||||
|
} else { |
||||
|
$Data['msg']='Wrong Parameters'; |
||||
|
}; |
||||
|
echo json_encode( $Data ); |
||||
|
exit(); |
||||
|
}; |
||||
|
header('location: /'); |
||||
|
?>
|
||||
@ -0,0 +1,114 @@ |
|||||
|
<?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'; |
||||
|
$CMD = 70+$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() ); |
||||
|
}; |
||||
|
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'; |
||||
|
$CMD = 65+$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() ); |
||||
|
}; |
||||
|
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: /'); |
||||
|
}; |
||||
|
?>
|
||||
@ -0,0 +1,25 @@ |
|||||
|
<?php |
||||
|
require_once('../ajax_asm.php'); |
||||
|
if( $CUser->Data['id'] > 1 ){ |
||||
|
$AID = intval($_POST['DID']); |
||||
|
$Data['files']=array(); |
||||
|
$QS = "SELECT * FROM `lrf_uploads` WHERE `sensor_id`={$AID} ORDER BY `ts` DESC"; |
||||
|
$result = $DATABASE->Query( $QS, false ); |
||||
|
if( count($result) ){ |
||||
|
|
||||
|
foreach( $result as $R ){ |
||||
|
$CN = array(); |
||||
|
$CN['id'] = intval( $R['id'] ); |
||||
|
$CN['file_name'] = $R['file']; |
||||
|
$CN['size'] = intval( filesize( 'data/uploads/'.$R['md5'] ) ); |
||||
|
$CN['status'] = intval($R['status']) + (($R['issue_reset'])?512:0); |
||||
|
$CN['ts'] = date( "Y-m-d H:i:s", $R['ts'] ); |
||||
|
$CN['memo'] = ($R['memo']?$R['memo']:''); |
||||
|
$Data['files'][] = array( intval( $R['id'] ), $R['file'], $CN['size'], (intval($R['status']) + (($R['issue_reset'])?512:0)), date( "Y-m-d H:i:s", $R['ts'] ), ($R['memo']?$R['memo']:'') ); |
||||
|
}; |
||||
|
}; |
||||
|
echo json_encode( $Data ); |
||||
|
exit(); |
||||
|
}; |
||||
|
header('location: /'); |
||||
|
?>
|
||||
@ -0,0 +1,21 @@ |
|||||
|
<?php |
||||
|
require_once('../ajax_asm.php'); |
||||
|
if( $CUser->Data['id'] > 1 ){ |
||||
|
$AID = intval($_POST['DID']); |
||||
|
$QS = "SELECT * FROM `lrf_uploads` WHERE `sensor_id`={$AID} AND `status` < 101"; |
||||
|
$result = $DATABASE->Query( $QS, false ); |
||||
|
$Data['count'] = count($result); |
||||
|
if( count($result) ){ |
||||
|
foreach( $result as $R ){ |
||||
|
if( $R['status'] > -1 && $R['status'] < 101 ){ |
||||
|
$Data['current']=$R['file']; |
||||
|
$Data['progress']=$R['status']/100.0; |
||||
|
break; |
||||
|
}; |
||||
|
}; |
||||
|
}; |
||||
|
echo json_encode( $Data ); |
||||
|
exit(); |
||||
|
}; |
||||
|
header('location: /'); |
||||
|
?>
|
||||
@ -0,0 +1,204 @@ |
|||||
|
<?php |
||||
|
require_once('../ajax_asm.php'); |
||||
|
|
||||
|
if( $CUser->Data['id'] > 1 ){ |
||||
|
$EID = intval( $_POST['FID'] ); |
||||
|
$QS = "SELECT * FROM `target_filters` WHERE `id`={$EID}"; |
||||
|
$Result = $DATABASE->Query( $QS, false ); |
||||
|
if( count( $Result ) ){ |
||||
|
$CR = $Result[0]; |
||||
|
switch( $CR['type'] ){ |
||||
|
case 1: //Train
|
||||
|
$QS = "SELECT * FROM `target_filter_train` WHERE `id`={$CR['aux_id']}"; |
||||
|
$JKA = $DATABASE->Query( $QS ); |
||||
|
$FD = $JKA[0]; |
||||
|
$TPL =<<<EFUFU |
||||
|
{ |
||||
|
xtype: 'form', |
||||
|
labelAlign: 'right', |
||||
|
autoScroll: 'auto', |
||||
|
labelWidth: 120, |
||||
|
items:[{ |
||||
|
border: false, |
||||
|
frame: false, |
||||
|
xtype: 'panel', |
||||
|
html: '<table width="100%" border=0 class="setEd_infoPanel" id="TRAIN"><tr><td width="65px"><img width="64px" src="/style/assets/train.png"></td><td valign="middle">%%%NAME%%%</td></tr><tr><td colspan=2>%%%INFO%%%</td></tr></table>' |
||||
|
},{ |
||||
|
xtype: 'spacer', |
||||
|
height: 5 |
||||
|
},{ |
||||
|
border: false, |
||||
|
frame: false, |
||||
|
xtype: 'panel', |
||||
|
html: '<table width="100%" border=0 class="setEd_infoPanel" id="TRAIN"><tr><td valign="middle">%%%LOINFO%%%</td></tr></table>' |
||||
|
},{ |
||||
|
xtype: 'spacer', |
||||
|
height: 5 |
||||
|
},{ |
||||
|
xtype: 'combo', |
||||
|
fieldLabel: 'Filter Status', |
||||
|
id: 'flt_ena', |
||||
|
lazyRender:true, |
||||
|
mode: 'local', |
||||
|
forceSelection: true, |
||||
|
triggerAction: 'all', |
||||
|
editable: false, |
||||
|
disableKeyFilter: true, |
||||
|
store: new Ext.data.ArrayStore({ |
||||
|
fields: ['status_val','status_txt'], |
||||
|
data: [[0,'Disabled'],[1,'Enabled']] |
||||
|
}), |
||||
|
value: %%%ENA_VAL%%%, |
||||
|
valueField: 'status_val', |
||||
|
displayField: 'status_txt', |
||||
|
listeners:{ |
||||
|
select: function( t, r, i ){ |
||||
|
Ext.Ajax.request({ |
||||
|
url: '/lib/controller/doFilterOperation.php', |
||||
|
params: { |
||||
|
OPID: 2, |
||||
|
OPCODE: r.data.status_val, |
||||
|
FID: {$EID}, |
||||
|
UID: {$UserID}, |
||||
|
SID: '{$Session}' |
||||
|
}, |
||||
|
success: function(){ |
||||
|
loadFilters(); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'spacer', |
||||
|
height: 5 |
||||
|
},{ |
||||
|
xtype: 'combo', |
||||
|
fieldLabel: 'Upper Sensor', |
||||
|
id: 'flt_uper', |
||||
|
lazyRender:true, |
||||
|
mode: 'local', |
||||
|
forceSelection: true, |
||||
|
triggerAction: 'all', |
||||
|
editable: false, |
||||
|
disableKeyFilter: true, |
||||
|
store: new Ext.data.ArrayStore({ |
||||
|
fields: ['node_id','node_name'], |
||||
|
data: %%%UPSENS%%% |
||||
|
}), |
||||
|
value: {$FD['UPPER_SENSOR']}, |
||||
|
valueField: 'node_id', |
||||
|
displayField: 'node_name', |
||||
|
listeners:{ |
||||
|
select: function( t, r, i ){ |
||||
|
Ext.Ajax.request({ |
||||
|
url: '/lib/controller/doFilterOperation.php', |
||||
|
params: { |
||||
|
OPID: 3, |
||||
|
OPCODE: r.data.node_id, |
||||
|
FID: {$EID}, |
||||
|
UID: {$UserID}, |
||||
|
SID: '{$Session}' |
||||
|
}, |
||||
|
success: function(){ |
||||
|
loadFilters(); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'combo', |
||||
|
fieldLabel: 'Bottom Sensor', |
||||
|
id: 'flt_bottom', |
||||
|
lazyRender:true, |
||||
|
mode: 'local', |
||||
|
forceSelection: true, |
||||
|
triggerAction: 'all', |
||||
|
editable: false, |
||||
|
disableKeyFilter: true, |
||||
|
store: new Ext.data.ArrayStore({ |
||||
|
fields: ['node_id','node_name'], |
||||
|
data: %%%LOSENS%%% |
||||
|
}), |
||||
|
value: {$FD['LOWER_SENSOR']}, |
||||
|
valueField: 'node_id', |
||||
|
displayField: 'node_name', |
||||
|
listeners:{ |
||||
|
select: function( t, r, i ){ |
||||
|
Ext.Ajax.request({ |
||||
|
url: '/lib/controller/doFilterOperation.php', |
||||
|
params: { |
||||
|
OPID: 4, |
||||
|
OPCODE: r.data.node_id, |
||||
|
FID: {$EID}, |
||||
|
UID: {$UserID}, |
||||
|
SID: '{$Session}' |
||||
|
}, |
||||
|
success: function(){ |
||||
|
loadFilters(); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'spacer', |
||||
|
height: 5 |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
disabled: false, |
||||
|
width: '100%', |
||||
|
text: 'Remove Target Filter', |
||||
|
handler: function(){ |
||||
|
Ext.Ajax.request({ |
||||
|
url: '/lib/controller/doFilterOperation.php', |
||||
|
params: { |
||||
|
OPID: 1, |
||||
|
OPCODE: 0, |
||||
|
FID: {$EID}, |
||||
|
UID: {$UserID}, |
||||
|
SID: '{$Session}' |
||||
|
}, |
||||
|
success: function(){ |
||||
|
loadFilters(); |
||||
|
} |
||||
|
}); |
||||
|
} |
||||
|
}] |
||||
|
|
||||
|
} |
||||
|
EFUFU; |
||||
|
$QS = "SELECT * FROM `target_filter_train` WHERE `id`={$CR['aux_id']}"; |
||||
|
$Zult = $DATABASE->Query( $QS, false ); |
||||
|
if( count( $Zult ) ){ |
||||
|
$UID = intval($Zult[0]['UPPER_SENSOR']); |
||||
|
$LID = intval($Zult[0]['LOWER_SENSOR']); |
||||
|
} else { |
||||
|
$UID = 0; |
||||
|
$LID = 0; |
||||
|
}; |
||||
|
$UPSENS = array( array( 0,'Not Set' ) ); |
||||
|
$LOSENS = array( array( 0,'Not Set' ) ); |
||||
|
|
||||
|
$QS = "SELECT * FROM `nodes` WHERE `type`=3"; |
||||
|
$Mult = $DATABASE->Query( $QS, false ); |
||||
|
if( count( $Mult ) ){ |
||||
|
foreach( $Mult as $M ){ |
||||
|
if( $M['id'] != $LID ) $UPSENS[] = array( $M['id'], $M['name'] ); |
||||
|
if( $M['id'] != $UID ) $LOSENS[] = array( $M['id'], $M['name'] ); |
||||
|
}; |
||||
|
}; |
||||
|
$TPL = str_ireplace( '%%%UPSENS%%%', json_encode( $UPSENS ), $TPL ); |
||||
|
$TPL = str_ireplace( '%%%LOSENS%%%', json_encode( $LOSENS ), $TPL ); |
||||
|
$TPL = str_ireplace( '%%%NAME%%%',$Labels->GetLabel('_ZL_MEDIA_DESC_SHO_') , $TPL ); |
||||
|
$TPL = str_ireplace( '%%%INFO%%%', $Labels->GetLabel('_ZL_MEDIA_DESC_LOO_'), $TPL ); |
||||
|
$TPL = str_ireplace( '%%%LOINFO%%%','' , $TPL ); |
||||
|
$TPL = str_ireplace( '%%%ENA_VAL%%%',$CR['enabled'], $TPL ); |
||||
|
echo $TPL; |
||||
|
break; |
||||
|
}; |
||||
|
} else { |
||||
|
echo '{ xtype: \'panel\', html: \'Node '.$_POST['NODE'].' Loadded\'}'; |
||||
|
}; |
||||
|
} else { |
||||
|
header('location: /'); |
||||
|
}; |
||||
|
?>
|
||||
@ -0,0 +1,17 @@ |
|||||
|
<?php |
||||
|
require_once('../ajax_asm.php'); |
||||
|
|
||||
|
if( $CUser->Data['id'] > 1 ){ |
||||
|
$EID = intval( $_POST['FID'] ); |
||||
|
switch( $EID ){ |
||||
|
case 1: //Train
|
||||
|
$TPL ='<table width="100%" border=0 class="setEd_infoPanel" id="TRAIN"><tr><td width="65px"><img width="64px" src="/style/assets/train.png"></td><td valign="middle">%%%NAME%%%</td></tr><tr><td colspan=2>%%%INFO%%%</td></tr></table>'; |
||||
|
$TPL = str_ireplace( '%%%NAME%%%','Train Presence Filter' , $TPL ); |
||||
|
$TPL = str_ireplace( '%%%INFO%%%','Disables Detection of Large Objects', $TPL ); |
||||
|
echo $TPL; |
||||
|
break; |
||||
|
}; |
||||
|
} else { |
||||
|
header('location: /'); |
||||
|
}; |
||||
|
?>
|
||||
@ -0,0 +1,43 @@ |
|||||
|
<?php |
||||
|
require_once('../ajax_asm.php'); |
||||
|
ob_start(); |
||||
|
$UID = intval( $CUser->Data['id'] ); |
||||
|
$ACCESS = intval( $CUser->Data['access'] ); |
||||
|
if( $UID > 1 ){ |
||||
|
$QS = "SELECT * FROM `target_filters`"; |
||||
|
$Result = $DATABASE->Query( $QS, false ); |
||||
|
if( count( $Result ) ){ |
||||
|
foreach( $Result as $R ){ |
||||
|
$QS = "SELECT * FROM `target_filter_types` WHERE `id`={$R['type']}"; |
||||
|
$MOMO = $DATABASE->Query( $QS, false ); |
||||
|
$MOD = $MOMO[0]; |
||||
|
switch( $R['type'] ){ |
||||
|
case 1: |
||||
|
case 2: |
||||
|
case 3: |
||||
|
case 4: |
||||
|
case 5: |
||||
|
case 6: |
||||
|
case 7: |
||||
|
case 8: |
||||
|
case 9: |
||||
|
case 10: |
||||
|
$ModPart[] = '{ xtype: \'panel\', boder: false, frame: false, html: \'<a class="sideInfo_item" id="UART_'.(($R['enabled']==0)?'N':'O').'" onclick="editFilter('.$R['id'].');">'.$Labels->GetLabel($MOD['name']).'</a>\'}'; |
||||
|
break; |
||||
|
default: |
||||
|
$ModPart[] = '{ xtype: \'panel\', boder: false, frame: false, html: \'<a align="center" style="padding: 5px; color: black; background-color: grey;">'.$R['device'].'</a>\'}'; |
||||
|
}; |
||||
|
}; |
||||
|
$Data['status']='ok'; |
||||
|
$Data['modules'] = '['.implode( ',', $ModPart ) .']'; |
||||
|
} else { |
||||
|
$Data['status']='na'; |
||||
|
}; |
||||
|
$Data['messages'] = ob_get_clean(); |
||||
|
echo json_encode( $Data ); |
||||
|
} else { |
||||
|
header('location: /'); |
||||
|
}; |
||||
|
|
||||
|
|
||||
|
?>
|
||||
@ -1,7 +1,21 @@ |
|||||
<?php |
<?php |
||||
require_once('../ajax_asm.php'); |
require_once('../ajax_asm.php'); |
||||
if( $CUser->Data['id'] > 1 ){ |
if( $CUser->Data['id'] > 1 ){ |
||||
echo '[{"t": 1285891200000,"v": 20},{"t": 1285804800000,"v": 100},{"t": 1672249854000,"v": 50},{"t": 1672279854000,"v": 80}]'; |
|
||||
|
$ZIZI = new SQLite_DB( '/srv/www/web/lib/controller/data/reports.db'); |
||||
|
$QS = "SELECT count(`id`) as `cnt`, `ts`/86400 as `ts` FROM `events` GROUP BY `ts`/86400"; |
||||
|
$RR = $ZIZI->Query( $QS ); |
||||
|
if( count( $RR ) ){ |
||||
|
$DD = array(); |
||||
|
foreach( $RR as $R ){ |
||||
|
$CC = intval( $R['cnt'] ); |
||||
|
if( $CC > 100 ) $CC = 100; |
||||
|
$DD[] = '{"t": '.($R['ts']*86400000).',"v":'.$CC.'}'; |
||||
|
//echo '[{"t": 1285891200000,"v": 20},{"t": 1285804800000,"v": 100},{"t": 1672249854000,"v": 50},{"t": 1672279854000,"v": 80}]';
|
||||
|
}; |
||||
|
echo "[" . implode(",", $DD ) . "]"; |
||||
|
} else { |
||||
|
echo "[]"; |
||||
|
}; |
||||
} else { |
} else { |
||||
header('location: /'); |
header('location: /'); |
||||
}; |
}; |
||||
@ -1,7 +1,43 @@ |
|||||
<?php |
<?php |
||||
require_once('../ajax_asm.php'); |
require_once('../ajax_asm.php'); |
||||
if( $CUser->Data['id'] > 1 ){ |
if( $CUser->Data['id'] > 1 ){ |
||||
echo "{expanded: true, children: [{ text: 'Menu Option 1', leaf: false, expanded: true, children:[{ text: '14:53', leaf: true }] },{ text: 'Menu Option 2', leaf: true },{ text: 'Menu Option 3', leaf: true}]}"; |
|
||||
|
$DTS = intval( $_POST['DTS'] ); |
||||
|
if( $DTS ){ |
||||
|
$ZIZI = new SQLite_DB( '/srv/www/web/lib/controller/data/reports.db'); |
||||
|
$DS = $DTS; |
||||
|
$DE = $DS + 86400; // -> 1 Day
|
||||
|
$QS ="SELECT DISTINCT `node_id` FROM `events` WHERE `ts` >= {$DS} AND `ts` <= {$DE}"; |
||||
|
$NDD = $ZIZI->Query( $QS ); |
||||
|
$lulu = true; |
||||
|
$E = "]}"; |
||||
|
$NONO = array(); |
||||
|
foreach( $NDD as $NID ){ |
||||
|
$id = intval( $NID['node_id'] ); |
||||
|
$QS = "SELECT `name` FROM `nodes` WHERE `id`={$id}"; |
||||
|
$R = $DATABASE->Query( $QS ); |
||||
|
$Name = $R[0]['name']; |
||||
|
if( $lulu ) { |
||||
|
$S = "{ text: '{$Name}', leaf: false, expanded: true, children:["; |
||||
|
$lulu = false; |
||||
|
} else { |
||||
|
$S = "{ text: '{$Name}', leaf: false, expanded: false, children:["; |
||||
|
}; |
||||
|
$QS = "SELECT `ts`, `id` FROM `events` WHERE `node_id`={$id} AND `ts` >= {$DS} AND `ts` <= {$DE} AND ( `evt_type`=52 ) ORDER BY `ts`, `ts_ms`"; |
||||
|
//echo $QS;
|
||||
|
//exit();
|
||||
|
$JJJ = $ZIZI->Query( $QS ); |
||||
|
$JIGA = array(); |
||||
|
foreach( $JJJ as $J ){ |
||||
|
$TM = date( "H:i:s", $J['ts'] ); |
||||
|
$JIGA[] = "{ text: '{$TM}', leaf: true, ts: {$J['ts']}, nid: {$id} }"; |
||||
|
}; |
||||
|
$NONO[] = $S . implode( ",", $JIGA ) . $E; |
||||
|
//echo "{expanded: true, children: [{ text: 'Menu Option 1', leaf: false, expanded: true, children:[{ text: '14:53', leaf: true }] },{ text: 'Menu Option 2', leaf: true },{ text: 'Menu Option 3', leaf: true}]}";
|
||||
|
}; |
||||
|
echo "{expanded: true, children: [".implode(",", $NONO )."]}"; |
||||
|
} else { |
||||
|
echo "[]"; |
||||
|
}; |
||||
} else { |
} else { |
||||
header('location: /'); |
header('location: /'); |
||||
}; |
}; |
||||
@ -1,8 +1,35 @@ |
|||||
<?php |
<?php |
||||
require_once('../ajax_asm.php'); |
require_once('../ajax_asm.php'); |
||||
if( $CUser->Data['id'] > 1 ){ |
if( $CUser->Data['id'] > 1 ){ |
||||
echo '[{"t": 1285891200000,"v": 20},{"t": 1285804800000,"v": 100},{"t": 1672249854000,"v": 50},{"t": 1672279854000,"v": 80}]'; |
|
||||
} else { |
|
||||
header('location: /'); |
|
||||
|
$CTS = intval( $_POST['DTS'] ); |
||||
|
if( $CTS ){ |
||||
|
$QS = "SELECT * FROM nodes"; |
||||
|
$result = $DATABASE->Query( $QS, false ); |
||||
|
$NodeNames = array(); |
||||
|
foreach( $result as $R ) $NodeNames[$R['id']] = $R['name']; |
||||
|
$QS = "SELECT `events`.*, `events_2_videos`.* FROM `events` LEFT JOIN `events_2_videos` ON( `events`.`id` = `events_2_videos`.`evt_id` ) WHERE `ts` >= {$CTS} ORDER BY `ts` DESC, `ts_ms` DESC LIMIT 32"; |
||||
|
$ZIZI = new SQLite_DB( '/srv/www/web/lib/controller/data/reports.db'); |
||||
|
$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['ts'] = intval( $REC['ts'] ); |
||||
|
$CR['ms'] = sprintf( "%03d", intval( $REC['ts_ms'] )); |
||||
|
$CR['dts'] = date( "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'] ); |
||||
|
$CR['video_id'] = intval( $REC['video_id'] ); |
||||
|
$Data['log'][] = $CR; |
||||
|
}; |
||||
|
echo json_encode( $Data ); |
||||
|
exit(); |
||||
|
}; |
||||
}; |
}; |
||||
|
header('location: /'); |
||||
?>
|
?>
|
||||
@ -0,0 +1,145 @@ |
|||||
|
<?php |
||||
|
require_once('../ajax_asm.php'); |
||||
|
|
||||
|
if( $CUser->Data['id'] > 1 ){ |
||||
|
$QS = "SELECT * FROM `target_filters` WHERE `type`=1"; |
||||
|
$RZ = $DATABASE->Query( $QS, false ); |
||||
|
$SOK = false; |
||||
|
$FOK = false; |
||||
|
if( count( $RZ ) ){ |
||||
|
$FL = $RZ[0]; |
||||
|
$FOK = true; |
||||
|
$QS = "SELECT * FROM `target_filter_train` WHERE `id`={$FL['aux_id']}"; |
||||
|
$RK = $DATABASE->Query( $QS, false ); |
||||
|
$FD = $RK[0]; |
||||
|
if( $FD['LOWER_SENSOR'] ){ |
||||
|
$QS = "SELECT `aux_id` FROM `nodes` WHERE `id`={$FD['LOWER_SENSOR']}"; |
||||
|
$JJR = $DATABASE->Query( $QS, false ); |
||||
|
$SI = $JJR[0]['aux_id']; |
||||
|
$QS = "SELECT * FROM `lrf_detection_profiles` WHERE `aux_id`={$SI} AND `profile_id`=0 AND `lrf_id`=0 AND `master`=1"; |
||||
|
$JJR = $DATABASE->Query( $QS, false ); |
||||
|
$SD = $JJR[0]; |
||||
|
$SOK = true; |
||||
|
} else { |
||||
|
$MSG = 'Bottom Sensor is not defined in the Train Filter'; |
||||
|
}; |
||||
|
} else { |
||||
|
$MSG = 'The Train Filter is not defined in the System'; |
||||
|
}; |
||||
|
$LILI=<<<lskdjflsdsdf |
||||
|
,listeners:{ |
||||
|
afterrender: function(){ |
||||
|
Ext.Msg.show({ |
||||
|
title: 'Information', |
||||
|
msg: '{$MSG}', |
||||
|
buttons: Ext.Msg.OK, |
||||
|
fn: function(){ |
||||
|
var tt = Ext.getCmp('up_se_popanel'); |
||||
|
tt.removeAll( true ); |
||||
|
tt.doLayout(); |
||||
|
}, |
||||
|
icon: Ext.MessageBox.INFO |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
lskdjflsdsdf; |
||||
|
|
||||
|
$TPL=<<<JOJOKA |
||||
|
{ |
||||
|
xtype: 'panel', |
||||
|
id: 'up_se_popanel', |
||||
|
border: true, |
||||
|
title: 'Bottom Sensor Detection Settings', |
||||
|
frame: true, |
||||
|
labelWidth: 150, |
||||
|
labelAlign: 'right', |
||||
|
layout: 'form', |
||||
|
height: PanelH, |
||||
|
bbar:[{ |
||||
|
text: 'Apply Detection Settings', |
||||
|
handler: function(){ |
||||
|
var oder = Ext.getCmp('ups_order').getValue(); |
||||
|
var oset = Ext.getCmp('ups_offset').getValue(); |
||||
|
var odel = Ext.getCmp('ups_delta').getValue(); |
||||
|
var ofli = Ext.getCmp('ups_flip').getValue(); |
||||
|
var owid = Ext.getCmp('ups_width').getValue(); |
||||
|
var osst = Ext.getCmp('ups_sst').getValue(); |
||||
|
var osun = Ext.getCmp('ups_sun').getValue(); |
||||
|
Ext.Ajax.request({ |
||||
|
url: '/lib/controller/doSensorOperation.php', |
||||
|
params: { |
||||
|
UID: {$UserID}, |
||||
|
SID: '{$Session}', |
||||
|
SNID: '{$SI}', |
||||
|
OPID: 19, |
||||
|
OFF: oset, |
||||
|
ORD: oder, |
||||
|
DEL: odel, |
||||
|
FLI: ofli, |
||||
|
WIZ: owid, |
||||
|
SST: osst, |
||||
|
SUN: osun |
||||
|
}, |
||||
|
success: function( response, opts ){ |
||||
|
Ext.Msg.show({ |
||||
|
title: 'Information', |
||||
|
msg: 'Settings are Saved', |
||||
|
buttons: Ext.Msg.OK, |
||||
|
icon: Ext.MessageBox.INFO |
||||
|
}); |
||||
|
}, |
||||
|
failure: failureAJAXFunction |
||||
|
}); |
||||
|
} |
||||
|
}], |
||||
|
items:[{ |
||||
|
xtype: 'numberfield', |
||||
|
id: 'ups_order', |
||||
|
fieldLabel: 'Order', |
||||
|
value: '{$SD['order']}' |
||||
|
},{ |
||||
|
xtype: 'numberfield', |
||||
|
id: 'ups_offset', |
||||
|
fieldLabel: 'Offset', |
||||
|
value: '{$SD['offset']}' |
||||
|
},{ |
||||
|
xtype: 'numberfield', |
||||
|
id: 'ups_delta', |
||||
|
fieldLabel: 'Delta', |
||||
|
value: '{$SD['delta']}' |
||||
|
},{ |
||||
|
xtype: 'numberfield', |
||||
|
id: 'ups_flip', |
||||
|
fieldLabel: 'Flip', |
||||
|
value: '{$SD['flip']}' |
||||
|
},{ |
||||
|
xtype: 'numberfield', |
||||
|
id: 'ups_width', |
||||
|
fieldLabel: 'Width', |
||||
|
value: '{$SD['width']}' |
||||
|
},{ |
||||
|
xtype: 'numberfield', |
||||
|
id: 'ups_sst', |
||||
|
fieldLabel: 'SST', |
||||
|
value: '{$SD['sst']}' |
||||
|
},{ |
||||
|
xtype: 'numberfield', |
||||
|
id: 'ups_sun', |
||||
|
fieldLabel: 'Sun', |
||||
|
value: '{$SD['sun']}' |
||||
|
}] |
||||
|
%%%JUMPAPA%%% |
||||
|
|
||||
|
} |
||||
|
JOJOKA; |
||||
|
|
||||
|
if( $FOK && $SOK ){ |
||||
|
$TPL = str_replace('%%%JUMPAPA%%%', '', $TPL ); |
||||
|
} else { |
||||
|
$TPL = str_replace('%%%JUMPAPA%%%', $LILI, $TPL ); |
||||
|
}; |
||||
|
echo $TPL; |
||||
|
} else { |
||||
|
header('location: /'); |
||||
|
}; |
||||
|
?>
|
||||
@ -0,0 +1,126 @@ |
|||||
|
<?php |
||||
|
require_once('../ajax_asm.php'); |
||||
|
|
||||
|
if( $CUser->Data['id'] > 1 ){ |
||||
|
$QS = "SELECT * FROM `target_filters` WHERE `type`=1"; |
||||
|
$RZ = $DATABASE->Query( $QS, false ); |
||||
|
$FOK = false; |
||||
|
if( count( $RZ ) ){ |
||||
|
$FL = $RZ[0]; |
||||
|
$FOK = true; |
||||
|
$QS = "SELECT * FROM `target_filter_train` WHERE `id`={$FL['aux_id']}"; |
||||
|
$RK = $DATABASE->Query( $QS, false ); |
||||
|
$SD = $RK[0]; |
||||
|
} else { |
||||
|
$MSG = 'The Train Filter is not defined in the System'; |
||||
|
}; |
||||
|
$LILI=<<<lskdjflsdsdf |
||||
|
,listeners:{ |
||||
|
afterrender: function(){ |
||||
|
Ext.Msg.show({ |
||||
|
title: 'Information', |
||||
|
msg: '{$MSG}', |
||||
|
buttons: Ext.Msg.OK, |
||||
|
fn: function(){ |
||||
|
var tt = Ext.getCmp('up_se_popanel'); |
||||
|
tt.removeAll( true ); |
||||
|
tt.doLayout(); |
||||
|
}, |
||||
|
icon: Ext.MessageBox.INFO |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
lskdjflsdsdf; |
||||
|
|
||||
|
$TPL=<<<JOJOKA |
||||
|
{ |
||||
|
xtype: 'panel', |
||||
|
id: 'up_se_popanel', |
||||
|
border: true, |
||||
|
title: 'Train Filter Fusion Engine Settings', |
||||
|
frame: true, |
||||
|
labelWidth: 150, |
||||
|
labelAlign: 'right', |
||||
|
layout: 'form', |
||||
|
height: PanelH, |
||||
|
bbar:[{ |
||||
|
text: 'Apply Filter Settings', |
||||
|
handler: function(){ |
||||
|
var odtr = (Ext.getCmp('ups_tdetect').getValue())?1:0; |
||||
|
var odtm = Ext.getCmp('ups_dtime').getValue(); |
||||
|
var ostm = Ext.getCmp('ups_stime').getValue(); |
||||
|
var ottr = (Ext.getCmp('ups_ttrain').getValue())?1:0; |
||||
|
var owid = Ext.getCmp('ups_width').getValue(); |
||||
|
var odbg = (Ext.getCmp('ups_dbg').getValue())?1:0; |
||||
|
Ext.Ajax.request({ |
||||
|
url: '/lib/controller/doFilterOperation.php', |
||||
|
params: { |
||||
|
UID: {$UserID}, |
||||
|
SID: '{$Session}', |
||||
|
FID: {$FL['id']}, |
||||
|
OPID: 9, |
||||
|
DTR: odtr, |
||||
|
DTM: odtm, |
||||
|
STM: ostm, |
||||
|
TTR: ottr, |
||||
|
WIZ: owid, |
||||
|
DBG: odbg |
||||
|
}, |
||||
|
success: function( response, opts ){ |
||||
|
Ext.Msg.show({ |
||||
|
title: 'Information', |
||||
|
msg: 'Settings are Saved', |
||||
|
buttons: Ext.Msg.OK, |
||||
|
icon: Ext.MessageBox.INFO |
||||
|
}); |
||||
|
}, |
||||
|
failure: failureAJAXFunction |
||||
|
}); |
||||
|
} |
||||
|
}], |
||||
|
items:[{ |
||||
|
xtype: 'numberfield', |
||||
|
id: 'ups_width', |
||||
|
fieldLabel: 'Train Width', |
||||
|
value: '{$SD['TRAIN_WIDTH']}' |
||||
|
},{ |
||||
|
xtype: 'checkbox', |
||||
|
id: 'ups_tdetect', |
||||
|
fieldLabel: 'Detect Train', |
||||
|
checked: parseInt('{$SD['TRAIN_DETECT']}') |
||||
|
},{ |
||||
|
xtype: 'numberfield', |
||||
|
id: 'ups_dtime', |
||||
|
fieldLabel: 'Decision Time', |
||||
|
value: '{$SD['DECISION_TIME']}' |
||||
|
},{ |
||||
|
xtype: 'numberfield', |
||||
|
id: 'ups_stime', |
||||
|
fieldLabel: 'Suspect Train Time', |
||||
|
value: '{$SD['SUSPECT_TIME']}' |
||||
|
},{ |
||||
|
xtype: 'checkbox', |
||||
|
id: 'ups_ttrain', |
||||
|
fieldLabel: 'Track Train', |
||||
|
checked: parseInt('{$SD['TRACK_TRAIN']}') |
||||
|
},{ |
||||
|
xtype: 'checkbox', |
||||
|
id: 'ups_dbg', |
||||
|
fieldLabel: 'Debugging Mode', |
||||
|
checked: parseInt('{$SD['DEBUG']}') |
||||
|
}] |
||||
|
%%%JUMPAPA%%% |
||||
|
|
||||
|
} |
||||
|
JOJOKA; |
||||
|
|
||||
|
if( $FOK ){ |
||||
|
$TPL = str_replace('%%%JUMPAPA%%%', '', $TPL ); |
||||
|
} else { |
||||
|
$TPL = str_replace('%%%JUMPAPA%%%', $LILI, $TPL ); |
||||
|
}; |
||||
|
echo $TPL; |
||||
|
} else { |
||||
|
header('location: /'); |
||||
|
}; |
||||
|
?>
|
||||
@ -0,0 +1,145 @@ |
|||||
|
<?php |
||||
|
require_once('../ajax_asm.php'); |
||||
|
|
||||
|
if( $CUser->Data['id'] > 1 ){ |
||||
|
$QS = "SELECT * FROM `target_filters` WHERE `type`=1"; |
||||
|
$RZ = $DATABASE->Query( $QS, false ); |
||||
|
$SOK = false; |
||||
|
$FOK = false; |
||||
|
if( count( $RZ ) ){ |
||||
|
$FL = $RZ[0]; |
||||
|
$FOK = true; |
||||
|
$QS = "SELECT * FROM `target_filter_train` WHERE `id`={$FL['aux_id']}"; |
||||
|
$RK = $DATABASE->Query( $QS, false ); |
||||
|
$FD = $RK[0]; |
||||
|
if( $FD['UPPER_SENSOR'] ){ |
||||
|
$QS = "SELECT `aux_id` FROM `nodes` WHERE `id`={$FD['UPPER_SENSOR']}"; |
||||
|
$JJR = $DATABASE->Query( $QS, false ); |
||||
|
$SI = $JJR[0]['aux_id']; |
||||
|
$QS = "SELECT * FROM `lrf_detection_profiles` WHERE `aux_id`={$SI} AND `profile_id`=0 AND `lrf_id`=0 AND `master`=1"; |
||||
|
$JJR = $DATABASE->Query( $QS, false ); |
||||
|
$SD = $JJR[0]; |
||||
|
$SOK = true; |
||||
|
} else { |
||||
|
$MSG = 'Upper Sensor is not defined in the Train Filter'; |
||||
|
}; |
||||
|
} else { |
||||
|
$MSG = 'The Train Filter is not defined in the System'; |
||||
|
}; |
||||
|
$LILI=<<<lskdjflsdsdf |
||||
|
,listeners:{ |
||||
|
afterrender: function(){ |
||||
|
Ext.Msg.show({ |
||||
|
title: 'Information', |
||||
|
msg: '{$MSG}', |
||||
|
buttons: Ext.Msg.OK, |
||||
|
fn: function(){ |
||||
|
var tt = Ext.getCmp('up_se_popanel'); |
||||
|
tt.removeAll( true ); |
||||
|
tt.doLayout(); |
||||
|
}, |
||||
|
icon: Ext.MessageBox.INFO |
||||
|
}); |
||||
|
} |
||||
|
} |
||||
|
lskdjflsdsdf; |
||||
|
|
||||
|
$TPL=<<<JOJOKA |
||||
|
{ |
||||
|
xtype: 'panel', |
||||
|
id: 'up_se_popanel', |
||||
|
border: true, |
||||
|
title: 'Upper Sensor Detection Settings', |
||||
|
frame: true, |
||||
|
labelWidth: 150, |
||||
|
labelAlign: 'right', |
||||
|
layout: 'form', |
||||
|
height: PanelH, |
||||
|
bbar:[{ |
||||
|
text: 'Apply Detection Settings', |
||||
|
handler: function(){ |
||||
|
var oder = Ext.getCmp('ups_order').getValue(); |
||||
|
var oset = Ext.getCmp('ups_offset').getValue(); |
||||
|
var odel = Ext.getCmp('ups_delta').getValue(); |
||||
|
var ofli = Ext.getCmp('ups_flip').getValue(); |
||||
|
var owid = Ext.getCmp('ups_width').getValue(); |
||||
|
var osst = Ext.getCmp('ups_sst').getValue(); |
||||
|
var osun = Ext.getCmp('ups_sun').getValue(); |
||||
|
Ext.Ajax.request({ |
||||
|
url: '/lib/controller/doSensorOperation.php', |
||||
|
params: { |
||||
|
UID: {$UserID}, |
||||
|
SID: '{$Session}', |
||||
|
SNID: '{$SI}', |
||||
|
OPID: 19, |
||||
|
OFF: oset, |
||||
|
ORD: oder, |
||||
|
DEL: odel, |
||||
|
FLI: ofli, |
||||
|
WIZ: owid, |
||||
|
SST: osst, |
||||
|
SUN: osun |
||||
|
}, |
||||
|
success: function( response, opts ){ |
||||
|
Ext.Msg.show({ |
||||
|
title: 'Information', |
||||
|
msg: 'Settings are Saved', |
||||
|
buttons: Ext.Msg.OK, |
||||
|
icon: Ext.MessageBox.INFO |
||||
|
}); |
||||
|
}, |
||||
|
failure: failureAJAXFunction |
||||
|
}); |
||||
|
} |
||||
|
}], |
||||
|
items:[{ |
||||
|
xtype: 'numberfield', |
||||
|
id: 'ups_order', |
||||
|
fieldLabel: 'Order', |
||||
|
value: '{$SD['order']}' |
||||
|
},{ |
||||
|
xtype: 'numberfield', |
||||
|
id: 'ups_offset', |
||||
|
fieldLabel: 'Offset', |
||||
|
value: '{$SD['offset']}' |
||||
|
},{ |
||||
|
xtype: 'numberfield', |
||||
|
id: 'ups_delta', |
||||
|
fieldLabel: 'Delta', |
||||
|
value: '{$SD['delta']}' |
||||
|
},{ |
||||
|
xtype: 'numberfield', |
||||
|
id: 'ups_flip', |
||||
|
fieldLabel: 'Flip', |
||||
|
value: '{$SD['flip']}' |
||||
|
},{ |
||||
|
xtype: 'numberfield', |
||||
|
id: 'ups_width', |
||||
|
fieldLabel: 'Width', |
||||
|
value: '{$SD['width']}' |
||||
|
},{ |
||||
|
xtype: 'numberfield', |
||||
|
id: 'ups_sst', |
||||
|
fieldLabel: 'SST', |
||||
|
value: '{$SD['sst']}' |
||||
|
},{ |
||||
|
xtype: 'numberfield', |
||||
|
id: 'ups_sun', |
||||
|
fieldLabel: 'Sun', |
||||
|
value: '{$SD['sun']}' |
||||
|
}] |
||||
|
%%%JUMPAPA%%% |
||||
|
|
||||
|
} |
||||
|
JOJOKA; |
||||
|
|
||||
|
if( $FOK && $SOK ){ |
||||
|
$TPL = str_replace('%%%JUMPAPA%%%', '', $TPL ); |
||||
|
} else { |
||||
|
$TPL = str_replace('%%%JUMPAPA%%%', $LILI, $TPL ); |
||||
|
}; |
||||
|
echo $TPL; |
||||
|
} else { |
||||
|
header('location: /'); |
||||
|
}; |
||||
|
?>
|
||||
@ -0,0 +1,10 @@ |
|||||
|
<?php |
||||
|
require_once('../ajax_asm.php'); |
||||
|
|
||||
|
if( $CUser->Data['id'] > 1 ){ |
||||
|
$Data = array(); |
||||
|
echo json_encode( $Data ); |
||||
|
exit(); |
||||
|
}; |
||||
|
header( 'location: /' ); |
||||
|
?>
|
||||
@ -0,0 +1,206 @@ |
|||||
|
<?php |
||||
|
require_once('../ajax_asm.php'); |
||||
|
$UID = intval( $CUser->Data['id'] ); |
||||
|
$Data = ''; |
||||
|
if( $UID > 1 ){ |
||||
|
$QS = "SELECT * FROM `system_props` LIMIT 1"; |
||||
|
$SPD = $DATABASE->Query( $QS ); |
||||
|
if( count( $SPD ) ){ |
||||
|
$SP = $SPD[0]; |
||||
|
$DUMMY = array(); |
||||
|
if( $CUser->Data['access'] > 5 ){ |
||||
|
$TABA =<<<jodjhowierewt |
||||
|
{ |
||||
|
xtype: 'panel', |
||||
|
html: '<table id="tbl_ph_ccc_%%ID%%" style="color: black; background-image: url(\'/style/assets/16-9-nocam.png\');" width="100%" border=0><tr><td colspan=3> </td></tr><tr><td> </td><td align="center"><div id="btn_ph_ccc_%%ID%%"></div></td><td> </td></tr><tr><td> </td><td> </td><td> </td></tr></table>', |
||||
|
listeners:{ |
||||
|
afterrender : function( ){ |
||||
|
var tb = document.getElementById('tbl_ph_ccc_%%ID%%'); |
||||
|
var W = tb.offsetWidth; |
||||
|
var H = (W/16)*9; |
||||
|
tb.setAttribute("height", H ); |
||||
|
tb.style.backgroundSize=W+"px "+H+"px"; |
||||
|
var p = Ext.getCmp('pan_ph_ccc_%%ID%%'); |
||||
|
p.setHeight( H+40 ); |
||||
|
var jaja = Ext.create({ |
||||
|
xtype: 'panel', |
||||
|
title: 'Camera is Not Assigned to the System', |
||||
|
frame: true, |
||||
|
renderTo: 'btn_ph_ccc_%%ID%%', |
||||
|
layout: 'vbox', |
||||
|
width: 500, |
||||
|
height: 120, |
||||
|
items:[{ |
||||
|
xtype: 'spacer', |
||||
|
height: 10 |
||||
|
},{ |
||||
|
width: '100%', |
||||
|
html: '<center>Proceed to Cameras Settings to Assign One</center>' |
||||
|
},{ |
||||
|
xtype: 'spacer', |
||||
|
height: 20 |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
width: '100%', |
||||
|
text: 'Open Camera Settings', |
||||
|
handler: function(){ |
||||
|
showContent( 2020 ); |
||||
|
} |
||||
|
}] |
||||
|
}); |
||||
|
jaja.doLayout(); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
jodjhowierewt; |
||||
|
|
||||
|
$LOGIO=<<<kahkjahskfgkgkh |
||||
|
{ |
||||
|
xtype: 'grid', |
||||
|
id: 'rep_grid', |
||||
|
border: false, |
||||
|
frame: false, |
||||
|
autoScroll: true, |
||||
|
//width: '100%',
|
||||
|
lazyRender: true, |
||||
|
height: 210, |
||||
|
ds: rep_store, |
||||
|
cm: new Ext.grid.ColumnModel( rep_ColModel_ops ), |
||||
|
sm: new Ext.grid.RowSelectionModel( rep_SelModel_ops ), |
||||
|
viewConfig: { |
||||
|
forceFit: true, |
||||
|
getRowClass: function( record, rowIndex, rowParams, store){ |
||||
|
switch( record.get('node_id')%5 ){ |
||||
|
case 0: return 'row-level01'; |
||||
|
case 1: return 'row-level02'; |
||||
|
case 2: return 'row-level03'; |
||||
|
case 3: return 'row-level04'; |
||||
|
case 4: return 'row-level05'; |
||||
|
}; |
||||
|
return ''; |
||||
|
} |
||||
|
}, |
||||
|
listeners:{ |
||||
|
afterrender : function( t ){ |
||||
|
var papa = Ext.getCmp('segment_portal'); |
||||
|
var jj = papa.getComponent( 0 ).getHeight(); |
||||
|
t.setHeight( PanelH - jj - 20 ); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
kahkjahskfgkgkh; |
||||
|
|
||||
|
$DUMMY['camera']="{xtype:'panel', id:'pan_ph_ccc_%%ID%%', title: 'Camera Placeholder', frame: true, border: true, draggable: false, layouit: 'fit', items:{$TABA}}"; |
||||
|
$DUMMY['sensor']="{xtype:'panel', title: 'Sensor Placeholder', frame: true, border: true, draggable: false, html:'NO SENSOR', listeners:{ afterrender: function(p){ var W=p.getWidth(); p.setHeight( 32+(W/16)*9);}}}"; |
||||
|
$DUMMY['map']="{xtype:'panel', title: 'Map Placeholder', frame: true, height: 200, border: true, draggable: false, html:'NO MAP'}"; |
||||
|
$DUMMY['log']="{xtype:'panel', id: 'lg_panel', title: 'Report Log', frame: true, /*height: 200,*/ border: true, draggable: false, items:[{$LOGIO}] }"; |
||||
|
} else { |
||||
|
$DUMMY['camera']="{xtype:'panel', title: false, frame: true, draggable: false, html: ' ', listeners:{ afterrender: function(p){ var W=p.getWidth(); p.setHeight( 32+(W/16)*9);}}}"; |
||||
|
$DUMMY['sensor']="{xtype:'panel', title: false, frame: true, draggable: false, html: ' ', listeners:{ afterrender: function(p){ var W=p.getWidth(); p.setHeight( 32+(W/16)*9);}}}"; |
||||
|
$DUMMY['map']="{xtype:'panel', title: false, frame: true, draggable: false, height: 200, html: ' '}"; |
||||
|
$DUMMY['log']="{xtype:'panel', title: false, frame: true, draggable: false, height: 200, html: ' '}"; |
||||
|
}; |
||||
|
$STA = array(); |
||||
|
$END="]}"; |
||||
|
$OUT = array(); |
||||
|
{ |
||||
|
$STA[0]="{ columnWidth: .25, stylse:'padding:10px 0 10px 10px', items:["; |
||||
|
$STA[1]="{ columnWidth: .25, stylse:'padding:10px 0 10px 10px', items:["; |
||||
|
$STA[2]="{ columnWidth: .50, stylse:'padding:10px 0 10px 10px', items:["; |
||||
|
$STA[3]="{ columnWidth: 1.0, stylse:'padding:10px 0 10px 10px', items:["; |
||||
|
$QS = "SELECT * FROM `nodes` WHERE `type`>0 AND `type`< 10 AND `enable`=1"; |
||||
|
$R = $DATABASE->Query( $QS ); |
||||
|
$idx = 0; |
||||
|
if( count( $R ) ){ |
||||
|
foreach( $R as $DD ){ |
||||
|
if( $idx < 2 ){ |
||||
|
$TFN = 'report/node_' . $DD['type'] . '.js'; |
||||
|
if(!file_exists( $TFN )) continue; |
||||
|
$TPL = file_get_contents( $TFN ); |
||||
|
$TPL = str_replace('%%%NODEID%%%', ''.$DD['id'] , $TPL ); |
||||
|
$TPL = str_replace('%%%NODENAME%%%', ''.html_entity_decode( $DD['name'] ) , $TPL ); |
||||
|
$OUT[]= $STA[$idx] . $TPL . $END; |
||||
|
} else break; |
||||
|
$idx++; |
||||
|
}; |
||||
|
if( $idx < 2 ){ |
||||
|
for( ;$idx<2;$idx++ ){ |
||||
|
$OUT[]= $STA[$idx] . $DUMMY['sensor'] . $END; |
||||
|
}; |
||||
|
}; |
||||
|
} else { |
||||
|
for( ;$idx<2;$idx++ ){ |
||||
|
$OUT[]= $STA[$idx] . $DUMMY['sensor'] . $END; |
||||
|
}; |
||||
|
}; |
||||
|
$QS = "SELECT * FROM `nodes` WHERE `type`>9 AND `type`< 14 AND `enable`=1"; |
||||
|
$R = $DATABASE->Query( $QS ); |
||||
|
$idx = 0; |
||||
|
if( count( $R ) ){ |
||||
|
foreach( $R as $DD ){ |
||||
|
if( $idx < 1 ){ |
||||
|
$TFN = 'report/node_' . $DD['type'] . '.js'; |
||||
|
if(!file_exists( $TFN )) continue; |
||||
|
$TPL = file_get_contents( $TFN ); |
||||
|
$TPL = str_replace('%%%NODEID%%%', ''.$DD['id'] , $TPL ); |
||||
|
$TPL = str_replace('%%%NODENAME%%%', ''.urldecode($DD['name']) , $TPL ); |
||||
|
$QS="SELECT * FROM `nodes` WHERE `id`={$DD['id']}"; |
||||
|
$Z=$DATABASE->Query( $QS ); |
||||
|
$QS="SELECT * FROM `module_eve` WHERE `id`=1"; |
||||
|
$S=$DATABASE->Query( $QS ); |
||||
|
$MODULE_DATA = $S[0]; |
||||
|
$TPL = str_replace( '%%%NODENAME%%%', urldecode( $Z[0]['name'] ) , $TPL ); |
||||
|
//$FU = 'http://' . $_SERVER['SERVER_ADDR'].':' . $MODULE_DATA['web_port'] .'/stream?id='. $Z[0]['aux_parameter'];
|
||||
|
$FU = '/video_feed/stream?id='. $Z[0]['aux_parameter']; |
||||
|
$CS[] = '[' . $Z[0]['aux_parameter'] . ',\'[ 120x120] Video\',\''. $FU .'\']'; |
||||
|
$TPL = str_replace( '%%%URLS%%%', '[' . implode( ',', $CS ) . ']' , $TPL ); |
||||
|
$TPL = str_replace( '%%%SELID%%%', 'value: '. $Z[0]['aux_parameter'] .',', $TPL ); |
||||
|
$TPL = str_replace( '%%%SELURL%%%', $FU, $TPL ); |
||||
|
$TPL = str_replace( '%%%STREAMID%%%', $DD['aux_parameter'], $TPL ); |
||||
|
|
||||
|
$FK = $MODULE_DATA['height'] /$MODULE_DATA['width']; |
||||
|
$W = 244; |
||||
|
$H = $W * $FK; |
||||
|
|
||||
|
$TPL = str_replace( '%%%WIDTH%%%', $W, $TPL ); |
||||
|
$TPL = str_replace( '%%%HEIGHT%%%', $H, $TPL ); |
||||
|
$OUT[]= $STA[2+$idx] . $TPL . $END; |
||||
|
} else break; |
||||
|
$idx++; |
||||
|
}; |
||||
|
if( $idx < 1 ){ |
||||
|
for( ;$idx<1;$idx++ ){ |
||||
|
$T = str_replace( '%%ID%%', 2+$idx , $DUMMY['camera'] ); |
||||
|
$OUT[]= $STA[2+$idx] . $T . $END; |
||||
|
}; |
||||
|
}; |
||||
|
} else { |
||||
|
for( ;$idx<1;$idx++ ){ |
||||
|
$T = str_replace( '%%ID%%', 4+$idx , $DUMMY['camera'] ); |
||||
|
$OUT[]= $STA[2+$idx] . $T . $END; |
||||
|
}; |
||||
|
}; |
||||
|
switch( 1 ){ |
||||
|
case 1:{ |
||||
|
// LA Metro
|
||||
|
$OUT[]= $STA[3] . $DUMMY['log'] . $END; |
||||
|
break; |
||||
|
}; |
||||
|
case 2:{ |
||||
|
//Togo
|
||||
|
$OUT[]= $STA[3] . $DUMMY['map'] . $END; |
||||
|
break; |
||||
|
}; |
||||
|
} |
||||
|
}; |
||||
|
$Data = '[' . implode( ',' , $OUT ) . ']'; |
||||
|
} else { |
||||
|
$Data = '[{columnWidth: 1, items:{html:"NO SYSTEM PROPS"}} ]'; |
||||
|
}; |
||||
|
}; |
||||
|
if( $Data != '' ) { |
||||
|
echo $Data; |
||||
|
} else { |
||||
|
echo '[]'; |
||||
|
}; |
||||
|
?>
|
||||
@ -0,0 +1,34 @@ |
|||||
|
<?php |
||||
|
//await new Promise(r => setTimeout(r, 2000));
|
||||
|
require_once('../ajax_asm.php'); |
||||
|
if( $CUser->Data['id'] > 1 ){ |
||||
|
$Data = array( 'sensors'=>array(), 'cameras'=>array() ); |
||||
|
$QS = "SELECT * FROM `nodes` WHERE `type` > 0 AND `type` < 14"; |
||||
|
$RR = $DATABASE->Query( $QS ); |
||||
|
foreach( $RR AS $R ){ |
||||
|
$CD = array(); |
||||
|
$CD['node_id']=$R['id']; |
||||
|
if( $R['type'] < 10 ){ |
||||
|
$QS = "SELECT * FROM `lrf_sensors` WHERE `id`={$R['aux_id']}"; |
||||
|
$DD = $DATABASE->Query( $QS ); |
||||
|
$D = $DD[0]; |
||||
|
$CD['id']=$D['id']; |
||||
|
$CD['type']=intval( $D['type'] ); |
||||
|
$CD['max_range']=floatval( $D['max_range'] ); |
||||
|
$CD['base_shift']=intval( $D['base_shift'] ); |
||||
|
$Data['sensors'][] = $CD; |
||||
|
} else { |
||||
|
$CD = array(); |
||||
|
$QS = "SELECT * FROM `cameras` WHERE `id`={$R['aux_id']}"; |
||||
|
$DD = $DATABASE->Query( $QS ); |
||||
|
$D = $DD[0]; |
||||
|
$CD['id']=$D['id']; |
||||
|
$CD['type']=intval( $D['type'] ); |
||||
|
$Data['cameras'][] = $CD; |
||||
|
}; |
||||
|
}; |
||||
|
echo json_encode( $Data ); |
||||
|
exit(); |
||||
|
}; |
||||
|
header( 'location: /' ); |
||||
|
?>
|
||||
@ -0,0 +1,17 @@ |
|||||
|
<?php |
||||
|
require_once('../ajax_asm.php'); |
||||
|
if( $CUser->Data['id'] > 1 ){ |
||||
|
$VID = intval( $_POST['VID'] ); |
||||
|
if( $VID ){ |
||||
|
$QS = "SELECT * FROM `videos` WHERE `id` = {$VID}"; |
||||
|
$ZIZI = new SQLite_DB( '/srv/www/web/lib/controller/data/reports.db'); |
||||
|
$LREC = $ZIZI->Query( $QS ); |
||||
|
if( count( $LREC ) ){ |
||||
|
$Data = $LREC[0]; |
||||
|
echo json_encode( $Data ); |
||||
|
exit(); |
||||
|
}; |
||||
|
}; |
||||
|
}; |
||||
|
header('location: /'); |
||||
|
?>
|
||||
@ -0,0 +1,24 @@ |
|||||
|
<?php |
||||
|
require_once('../ajax_asm.php'); |
||||
|
require_once('../php/onvif/toto.php'); |
||||
|
if( $CUser->Data['id'] > 1 ){ |
||||
|
if( $CUser->Data['access'] > 5 ){ |
||||
|
$QS = "SELECT al.*, ur.login FROM access_log al LEFT JOIN users ur ON (al.user_id = ur.id ) ORDER BY id DESC"; |
||||
|
$Result = $DATABASE->Query($QS,false); |
||||
|
foreach( $Result as $CD ){ |
||||
|
$cnode['id'] = intval( $CD['id'] ); |
||||
|
$cnode['user'] = $CD['login']; |
||||
|
$cnode['ts']= $CD['ts']; |
||||
|
$cnode['cmd'] = intval( $CD['cmd'] ); |
||||
|
$cnode['data_line'] = $CD['dataset']; |
||||
|
$Data['records'][] = $cnode; |
||||
|
}; |
||||
|
} else { |
||||
|
$Data['records'] = array(); |
||||
|
}; |
||||
|
$Data['totalCount']= count($Data['records']); |
||||
|
echo json_encode( $Data ); |
||||
|
} else { |
||||
|
header('location: /'); |
||||
|
}; |
||||
|
?>
|
||||
@ -0,0 +1,22 @@ |
|||||
|
<?php |
||||
|
require_once('../ajax_asm.php'); |
||||
|
if( $CUser->Data['id'] > 1 ){ |
||||
|
$Data = array(); |
||||
|
$Data['success'] = false; |
||||
|
if( isset( $_POST['SITE'] ) ){ |
||||
|
$SiteID = intval( $_POST['SITE'] ); |
||||
|
$QS = "SELECT re.aux_id as id, re.device as name FROM resources re LEFT JOIN nodes no ON( re.node_id = no.id ) WHERE ( re.type=1 OR re.type=129 ) AND no.site_id={$SiteID}"; |
||||
|
$Result = $DATABASE->Query($QS,false); |
||||
|
$Data['ports'] = array(); |
||||
|
foreach( $Result as $CD ){ |
||||
|
$cnode['uart_id'] = $CD['id']; |
||||
|
$cnode['uart_name'] = $CD['name']; |
||||
|
$Data['ports'][] = $cnode; |
||||
|
}; |
||||
|
$Data['success'] = true; |
||||
|
}; |
||||
|
echo json_encode( $Data ); |
||||
|
} else { |
||||
|
header('location: /'); |
||||
|
}; |
||||
|
?>
|
||||
@ -0,0 +1,27 @@ |
|||||
|
<?php |
||||
|
require_once('../ajax_asm.php'); |
||||
|
require_once('../php/onvif/toto.php'); |
||||
|
if( $CUser->Data['id'] > 1 ){ |
||||
|
if( $CUser->Data['access'] > 5 ){ |
||||
|
$QS = "SELECT * FROM users"; |
||||
|
$Result = $DATABASE->Query($QS,false); |
||||
|
foreach( $Result as $CD ){ |
||||
|
$cnode['id'] = intval( $CD['id'] ); |
||||
|
$cnode['status'] = $CD['status']; |
||||
|
$cnode['access'] = intval( $CD['access'] ); |
||||
|
$cnode['login'] = $CD['login']; |
||||
|
$cnode['created']= $CD['create_ts']; |
||||
|
$cnode['last'] = $CD['login_ts']; |
||||
|
$cnode['lang'] = intval( $CD['language'] ); |
||||
|
$cnode['site'] = $CD['selected_site']; |
||||
|
$Data['users'][] = $cnode; |
||||
|
}; |
||||
|
} else { |
||||
|
$Data['users'] = array(); |
||||
|
}; |
||||
|
$Data['totalCount']= count($Data['users']); |
||||
|
echo json_encode( $Data ); |
||||
|
} else { |
||||
|
header('location: /'); |
||||
|
}; |
||||
|
?>
|
||||
@ -0,0 +1,75 @@ |
|||||
|
{ |
||||
|
"modem":{ |
||||
|
"3gpp":{ |
||||
|
"enabled-locks":[], |
||||
|
"eps":{ |
||||
|
"initial-bearer":{ |
||||
|
"dbus-path":"--", |
||||
|
"settings":{ |
||||
|
"apn":"--", |
||||
|
"ip-type":"--", |
||||
|
"password":"--", |
||||
|
"user":"--" |
||||
|
} |
||||
|
}, |
||||
|
"ue-mode-operation":"csps-1" |
||||
|
}, |
||||
|
"imei":"860147051348496", |
||||
|
"operator-code":"--", |
||||
|
"operator-name":"--", |
||||
|
"pco":"--", |
||||
|
"registration-state":"--" |
||||
|
}, |
||||
|
"cdma":{ |
||||
|
"activation-state":"--", |
||||
|
"cdma1x-registration-state":"--", |
||||
|
"esn":"--", |
||||
|
"evdo-registration-state":"--", |
||||
|
"meid":"--", |
||||
|
"nid":"--", |
||||
|
"sid":"--" |
||||
|
}, |
||||
|
"dbus-path":"/org/freedesktop/ModemManager1/Modem/2", |
||||
|
"generic":{ |
||||
|
"access-technologies":[], |
||||
|
"bearers":[], |
||||
|
"carrier-configuration":"ROW_Gen_VoLTE", |
||||
|
"carrier-configuration-revision":"05010822", |
||||
|
"current-bands":["egsm","dcs","utran-1","utran-5","utran-8","eutran-1","eutran-3","eutran-5","eutran-7","eutran-8","eutran-20","eutran-38","eutran-40","eutran-41"], |
||||
|
"current-capabilities":["gsm-umts, lte"], |
||||
|
"current-modes":"allowed: 2g, 3g, 4g; preferred: 4g", |
||||
|
"device":"/sys/devices/pci0000:00/0000:00:14.0/usb1/1-4", |
||||
|
"device-identifier":"370583bd437ad3b0629ff381ca0c81fc37647d4a", |
||||
|
"drivers":["qmi_wwan","option1"], |
||||
|
"equipment-identifier":"860147051348496", |
||||
|
"hardware-revision":"10000", |
||||
|
"manufacturer":"QUALCOMM INCORPORATED", |
||||
|
"model":"SIMCOM_SIM7600E-H", |
||||
|
"own-numbers":[], |
||||
|
"plugin":"simtech","ports":[ |
||||
|
"cdc-wdm0 (qmi)", |
||||
|
"ttyUSB1 (qcdm)", |
||||
|
"ttyUSB2 (gps)", |
||||
|
"ttyUSB3 (at)", |
||||
|
"ttyUSB4 (at)", |
||||
|
"ttyUSB5 (audio)", |
||||
|
"wwan0 (net)"], |
||||
|
"power-state":"on", |
||||
|
"primary-port":"cdc-wdm0", |
||||
|
"revision":"LE20B04SIM7600M22_210318", |
||||
|
"signal-quality":{ |
||||
|
"recent":"no", |
||||
|
"value":"0" |
||||
|
}, |
||||
|
"sim":"/org/freedesktop/ModemManager1/SIM/2", |
||||
|
"state":"disabled", |
||||
|
"state-failed-reason":"--", |
||||
|
"supported-bands":["egsm","dcs","utran-1","utran-5","utran-8","eutran-1","eutran-3","eutran-5","eutran-7","eutran-8","eutran-20","eutran-38","eutran-40","eutran-41"], |
||||
|
"supported-capabilities":["gsm-umts, lte"], |
||||
|
"supported-ip-families":["ipv4","ipv6","ipv4v6"], |
||||
|
"supported-modes":["allowed: 2g; preferred: none","allowed: 3g; preferred: none","allowed: 4g; preferred: none","allowed: 2g, 3g; preferred: 3g","allowed: 2g, 3g; preferred: 2g","allowed: 2g, 4g; preferred: 4g","allowed: 2g, 4g; preferred: 2g","allowed: 3g, 4g; preferred: 4g","allowed: 3g, 4g; preferred: 3g","allowed: 2g, 3g, 4g; preferred: 4g","allowed: 2g, 3g, 4g; preferred: 3g","allowed: 2g, 3g, 4g; preferred: 2g"], |
||||
|
"unlock-required":"sim-pin2", |
||||
|
"unlock-retries":["sim-pin (3)","sim-puk (10)","sim-pin2 (3)","sim-puk2 (10)"] |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,28 @@ |
|||||
|
{ |
||||
|
id: 'db_node_%%%NODEID%%%', |
||||
|
tools: [{ |
||||
|
id:'gear', |
||||
|
handler: function(){ |
||||
|
showServerToolBox(%%%NODEID%%%); |
||||
|
} |
||||
|
}], |
||||
|
frame: true, |
||||
|
width: 258, |
||||
|
height: 240, |
||||
|
border: false, |
||||
|
title: '%%%SYSSERVERNAME%%%', |
||||
|
items: [{ |
||||
|
xtype: 'panel', |
||||
|
html: '<table width="100%"><tr><td><p id="status_%%%NODEID%%%_txt">%%%SERVERSTATUS%%%</p></td><td width="16px"><img id="status_%%%NODEID%%%_img" src="/style/icons/icons/%%%SERVERSTATUSIMG%%%"></td></tr></table>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
html: '<table width="100%" border=0><tr><td><svg class="donut" width="80" height="100%" viewBox="0 0 42 42"><circle id="status_%%%NODEID%%%_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_%%%NODEID%%%_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_%%%NODEID%%%_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_%%%NODEID%%%_totalValue0">0</text><text x="50%" y="50%" class="chart-label">CPU</text></g></svg></td><td><svg class="donut" width="80" height="100%" viewBox="0 0 42 42"><circle id="status_%%%NODEID%%%_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_%%%NODEID%%%_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_%%%NODEID%%%_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_%%%NODEID%%%_totalValue1">0</text><text x="50%" y="50%" class="chart-label">MEM</text></g></svg></td><td><svg class="donut" width="80" height="100%" viewBox="0 0 42 42"><circle id="status_%%%NODEID%%%_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_%%%NODEID%%%_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_%%%NODEID%%%_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_%%%NODEID%%%_totalValue2">0</text><text x="50%" y="50%" class="chart-label">DISK</text></g></svg></td></tr></table>' |
||||
|
},{ |
||||
|
xtype: 'panel', |
||||
|
height: 80, |
||||
|
frame: true, |
||||
|
border: false, |
||||
|
autoScroll: true, |
||||
|
items: %%%MODULES%%% |
||||
|
}] |
||||
|
} |
||||
@ -0,0 +1,96 @@ |
|||||
|
{ |
||||
|
id: 'db_node_%%%NODEID%%%', |
||||
|
width: 258, |
||||
|
height: 320, |
||||
|
title: '%%%NODENAME%%%', |
||||
|
tools: [{ |
||||
|
id:'gear', |
||||
|
handler: function(){ |
||||
|
//Ext.Msg.alert('Message', 'The Settings tool was clicked.');
|
||||
|
showSensorToolBox( %%%NODEID%%% ); |
||||
|
} |
||||
|
}], |
||||
|
listeners:{ |
||||
|
afterrender: function(){ |
||||
|
cleanup2DDraw( %%%NODEID%%% ); |
||||
|
drawZoomLevels[%%%NODEID%%%]=100; |
||||
|
//Deffer
|
||||
|
} |
||||
|
}, |
||||
|
items:[{ |
||||
|
html: '<center><img id="draw_img_%%%NODEID%%%" src="/lib/controller/getDeviceDraw.php?NID=%%%NODEID%%%&AUX=100"><canvas id="targ_canvas_%%%NODEID%%%" style="display: none;" onclick="DrawClicker( %%%NODEID%%%, event );" width="200" height="210"></canvas></center>', |
||||
|
height: '260px' |
||||
|
},{ |
||||
|
id: 'status_%%%NODEID%%%', |
||||
|
border: true, |
||||
|
frame: true, |
||||
|
height: 36, |
||||
|
html: '' |
||||
|
}], |
||||
|
bbar:[{ |
||||
|
xtype: 'button', |
||||
|
text: '12.5%', |
||||
|
enableToggle: true, |
||||
|
id: 'zoom_bt12_%%%NODEID%%%', |
||||
|
toggleGroup: 'zoom_tg_%%%NODEID%%%', |
||||
|
toggleHandler: function( bt, st ){ |
||||
|
if( st ){ |
||||
|
drawZoomLevels[%%%NODEID%%%]=12; |
||||
|
var img = document.getElementById('draw_img_%%%NODEID%%%'); |
||||
|
img.src = "/lib/controller/getDeviceDraw.php?NID=%%%NODEID%%%&AUX=12"; |
||||
|
img.onload = function(){ |
||||
|
cleanup2DDraw( %%%NODEID%%% ); |
||||
|
}; |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: '25%', |
||||
|
enableToggle: true, |
||||
|
id: 'zoom_bt25_%%%NODEID%%%', |
||||
|
toggleGroup: 'zoom_tg_%%%NODEID%%%', |
||||
|
toggleHandler: function( bt, st ){ |
||||
|
if( st ){ |
||||
|
drawZoomLevels[%%%NODEID%%%]=25; |
||||
|
var img = document.getElementById('draw_img_%%%NODEID%%%'); |
||||
|
img.src = "/lib/controller/getDeviceDraw.php?NID=%%%NODEID%%%&AUX=25"; |
||||
|
img.onload = function(){ |
||||
|
cleanup2DDraw( %%%NODEID%%% ); |
||||
|
}; |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: '50%', |
||||
|
enableToggle: true, |
||||
|
id: 'zoom_bt50_%%%NODEID%%%', |
||||
|
toggleGroup: 'zoom_tg_%%%NODEID%%%', |
||||
|
toggleHandler: function( bt, st ){ |
||||
|
if( st ){ |
||||
|
drawZoomLevels[%%%NODEID%%%]=50; |
||||
|
var img = document.getElementById('draw_img_%%%NODEID%%%'); |
||||
|
img.src = "/lib/controller/getDeviceDraw.php?NID=%%%NODEID%%%&AUX=50"; |
||||
|
img.onload = function(){ |
||||
|
cleanup2DDraw( %%%NODEID%%% ); |
||||
|
}; |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: '100%', |
||||
|
pressed: true, |
||||
|
enableToggle: true, |
||||
|
id: 'zoom_bt100_%%%NODEID%%%', |
||||
|
toggleGroup: 'zoom_tg_%%%NODEID%%%', |
||||
|
toggleHandler: function( bt, st ){ |
||||
|
if( st ){ |
||||
|
drawZoomLevels[%%%NODEID%%%]=100; |
||||
|
var img = document.getElementById('draw_img_%%%NODEID%%%'); |
||||
|
img.src = "/lib/controller/getDeviceDraw.php?NID=%%%NODEID%%%&AUX=100"; |
||||
|
img.onload = function(){ |
||||
|
cleanup2DDraw( %%%NODEID%%% ); |
||||
|
}; |
||||
|
}; |
||||
|
} |
||||
|
}] |
||||
|
} |
||||
@ -0,0 +1,39 @@ |
|||||
|
{ |
||||
|
id: 'db_node_%%%NODEID%%%', |
||||
|
//xtype: 'portlet',
|
||||
|
layout:'fit', |
||||
|
//width: 258,
|
||||
|
//height: %%%HEIGHT%%%+40,
|
||||
|
tools: [{ |
||||
|
id:'gear', |
||||
|
handler: function(){ |
||||
|
//editAnalogStream( %%%STREAMID%%%, 1 );
|
||||
|
} |
||||
|
}], |
||||
|
frame: true, |
||||
|
draggable: false, |
||||
|
bodyStyle: 'padding: 0px;', |
||||
|
title: '%%%NODENAME%%%', |
||||
|
items:[{ |
||||
|
id: 'db_node_%%%NODEID%%%_pic', |
||||
|
html: '', |
||||
|
}], |
||||
|
sukaMineWidth: -1, |
||||
|
listeners:{ |
||||
|
resize: function( p, adjWidth, adjHeight, rawWidth, rawHeight ){ |
||||
|
if( rawWidth!= undefined ){ |
||||
|
if( p.sukaMineWidth != adjWidth ){ |
||||
|
p.sukaMineWidth = adjWidth; |
||||
|
var XX = 32 + p.sukaMineWidth * %%%HEIGHT%%% / %%%WIDTH%%%; |
||||
|
p.setHeight( XX ); |
||||
|
}; |
||||
|
}; |
||||
|
var z = Ext.getCmp('db_node_%%%NODEID%%%_pic'); |
||||
|
z.update('<img data-enlargeable000 ondblclick="fullScreen(\'img-%%%NODEID%%%\');" style="cursor: zoom-in" id="img-%%%NODEID%%%" src="%%%SELURL%%%" width="100%" />'); |
||||
|
}, |
||||
|
afterrender: function( p ){ |
||||
|
var xx = p.getWidth() * %%%HEIGHT%%% / %%%WIDTH%%%; |
||||
|
p.setHeight( xx+32 ); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,61 @@ |
|||||
|
{ |
||||
|
id: 'db_node_%%%NODEID%%%', |
||||
|
layout:'vbox', |
||||
|
tools: [{ |
||||
|
id:'gear', |
||||
|
handler: function(){ |
||||
|
} |
||||
|
}], |
||||
|
frame: true, |
||||
|
draggable: false, |
||||
|
collapsible: false, |
||||
|
bodyStyle: 'padding: 0px;', |
||||
|
title: '%%%NODENAME%%%', |
||||
|
sukaMineWidth: -1, |
||||
|
items:[{ |
||||
|
id: 'db_node_%%%NODEID%%%_pic', |
||||
|
border: true, |
||||
|
width: '100%', |
||||
|
html: '<div id="img-%%%NODEID%%%" style="display: flex;align-items: center;" ><img id="img-img-%%%NODEID%%%" ondblclick="fullScreen(\'img-%%%NODEID%%%\');" style="cursor: zoom-in" src="%%%SELURL%%%" width="100%" /><div style="float: left; position: absolute; left: 30px; bottom: 50px; z-index: 1000;"><table width="100%" border=0><tr><td width="24"><img id="img_btn_010_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/010.png"></td><td width="24"><img id="img_btn_032_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/032.png"></td><td width="24"><img id="img_btn_033_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/033.png"></td><td width="24"><img id="img_btn_034_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/034.png"></td><td> </td></tr><tr><td><img id="img_btn_011_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/011.png"></td><td><img id="img_btn_031_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/031.png"></td><td><img id="img_btn_020_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/basic/020.png"></td><td><img id="img_btn_027_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/027.png"></td><td> </td></tr><tr><td> </td><td><img id="img_btn_030_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/030.png"></td><td><img id="img_btn_029_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/029.png"></td><td><img id="img_btn_028_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/028.png"></td><td> </td></tr></table></div></div>' |
||||
|
}], |
||||
|
listeners:{ |
||||
|
resize: function( p, adjWidth, adjHeight, rawWidth, rawHeight ){ |
||||
|
if( rawWidth!= undefined ){ |
||||
|
if( p.sukaMineWidth != adjWidth ){ |
||||
|
p.sukaMineWidth = adjWidth; |
||||
|
var XX = p.sukaMineWidth * %%%HEIGHT%%% / %%%WIDTH%%%; |
||||
|
p.setHeight( XX + 32 ); |
||||
|
var z = Ext.getCmp('db_node_%%%NODEID%%%_pic'); |
||||
|
z.setHeight( XX ); |
||||
|
}; |
||||
|
}; |
||||
|
}, |
||||
|
afterrender: function( p ){ |
||||
|
var xx = p.getWidth() * %%%HEIGHT%%% / %%%WIDTH%%%; |
||||
|
p.setHeight( xx + 32 ); |
||||
|
var z = Ext.getCmp('db_node_%%%NODEID%%%_pic'); |
||||
|
z.setHeight( xx ); |
||||
|
document.getElementById('img_btn_010_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_010_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_011_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_011_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_027_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_027_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_028_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_028_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_029_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_029_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_030_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_030_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_031_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_031_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_032_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_032_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_033_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_033_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_034_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_034_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_020_%%%NODEID%%%').addEventListener( 'mousedown', makePtzStop ); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,18 @@ |
|||||
|
{ |
||||
|
id: 'db_node_%%%NODEID%%%', |
||||
|
xtype: 'portlet', |
||||
|
width: 258, |
||||
|
height: %%%HEIGHT%%%+40, |
||||
|
tools: [{ |
||||
|
id:'gear', |
||||
|
handler: function(){ |
||||
|
editAnalogStream( %%%STREAMID%%%, 1 ); |
||||
|
} |
||||
|
}], |
||||
|
frame: true, |
||||
|
bodyStyle: 'padding: 0px;', |
||||
|
title: '%%%NODENAME%%%', |
||||
|
items:[{ |
||||
|
html: '<img data-enlargeable000 ondblclick="fullScreen(\'img-%%%NODEID%%%\');" style="cursor: zoom-in" id="img-%%%NODEID%%%" src="%%%SELURL%%%" width="%%%WIDTH%%%" height="%%%HEIGHT%%%"/>', |
||||
|
}] |
||||
|
} |
||||
@ -0,0 +1,72 @@ |
|||||
|
{ |
||||
|
id: 'db_node_%%%NODEID%%%', |
||||
|
layout:'vbox', |
||||
|
tools: [{ |
||||
|
id:'gear', |
||||
|
handler: function(){ |
||||
|
} |
||||
|
}], |
||||
|
frame: true, |
||||
|
bodyStyle: 'padding: 0px;', |
||||
|
plr: null, |
||||
|
title: '%%%NODENAME%%%', |
||||
|
sukaMineWidth: -1, |
||||
|
items:[{ |
||||
|
id: 'db_node_%%%NODEID%%%_pic', |
||||
|
border: true, |
||||
|
width: '100%', |
||||
|
html: '' |
||||
|
},{ |
||||
|
xtype: 'spacer', |
||||
|
height: 3 |
||||
|
},{ |
||||
|
html: '<table width="100%" border=0><tr><td width="24"><img id="img_btn_010_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/010.png"></td><td width="24"><img id="img_btn_032_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/032.png"></td><td width="24"><img id="img_btn_033_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/033.png"></td><td width="24"><img id="img_btn_034_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/034.png"></td><td> </td></tr><tr><td><img id="img_btn_011_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/011.png"></td><td><img id="img_btn_031_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/031.png"></td><td><img id="img_btn_020_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/basic/020.png"></td><td><img id="img_btn_027_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/027.png"></td><td> </td></tr><tr><td> </td><td><img id="img_btn_030_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/030.png"></td><td><img id="img_btn_029_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/029.png"></td><td><img id="img_btn_028_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/028.png"></td><td> </td></tr></table>', |
||||
|
height: 90 |
||||
|
}], |
||||
|
listeners:{ |
||||
|
resize: function( p, adjWidth, adjHeight, rawWidth, rawHeight ){ |
||||
|
if( rawWidth!= undefined ){ |
||||
|
if( p.sukaMineWidth != adjWidth ){ |
||||
|
p.sukaMineWidth = adjWidth; |
||||
|
var XX = p.sukaMineWidth * %%%HEIGHT%%% / %%%WIDTH%%%; |
||||
|
p.setHeight( XX + 120 ); |
||||
|
var z = Ext.getCmp('db_node_%%%NODEID%%%_pic'); |
||||
|
z.setHeight( XX ); |
||||
|
}; |
||||
|
}; |
||||
|
var z = Ext.getCmp('db_node_%%%NODEID%%%_pic'); |
||||
|
z.update('<img onmouseover="ptzCtrl(\'img-%%%NODEID%%%\');" ondblclick="fullScreen(\'img-%%%NODEID%%%\');" style="cursor: zoom-in" id="img-%%%NODEID%%%" src="%%%SELURL%%%" width="100%" />'); |
||||
|
}, |
||||
|
afterrender: function( p ){ |
||||
|
var xx = p.getWidth() * %%%HEIGHT%%% / %%%WIDTH%%%; |
||||
|
p.setHeight( xx + 120 ); |
||||
|
var z = Ext.getCmp('db_node_%%%NODEID%%%_pic'); |
||||
|
z.setHeight( xx ); |
||||
|
document.getElementById('img_btn_010_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_010_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_011_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_011_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_027_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_027_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_028_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_028_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_029_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_029_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_030_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_030_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_031_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_031_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_032_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_032_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_033_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_033_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_034_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_034_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_020_%%%NODEID%%%').addEventListener( 'mousedown', makePtzStop ); |
||||
|
}, |
||||
|
destroy: function( t ){ |
||||
|
if( t.plr != null ) t.plr.dispose(); |
||||
|
t.plr = null; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,91 @@ |
|||||
|
{ |
||||
|
id: 'db_node_%%%NODEID%%%', |
||||
|
layout:'vbox', |
||||
|
tools: [{ |
||||
|
id:'gear', |
||||
|
handler: function(){ |
||||
|
} |
||||
|
}], |
||||
|
frame: true, |
||||
|
draggable: false, |
||||
|
collapsible: false, |
||||
|
bodyStyle: 'padding: 0px;', |
||||
|
title: '%%%NODENAME%%%', |
||||
|
sukaMineWidth: -1, |
||||
|
/* |
||||
|
{ |
||||
|
id: 'db_node_%%%NODEID%%%_pic', |
||||
|
border: true, |
||||
|
width: '100%', |
||||
|
//html: '<div id="img-%%%NODEID%%%" style="display: flex;align-items: center;" ><img id="img-img-%%%NODEID%%%" ondblclick="fullScreen(\'img-%%%NODEID%%%\');" style="cursor: zoom-in" src="%%%SELURL%%%" width="100%" /><div style="float: left; position: absolute; left: 30px; bottom: 50px; z-index: 1000;"><table width="100%" border=0><tr><td width="24"><img id="img_btn_010_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/010.png"></td><td width="24"><img id="img_btn_032_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/032.png"></td><td width="24"><img id="img_btn_033_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/033.png"></td><td width="24"><img id="img_btn_034_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/034.png"></td><td> </td></tr><tr><td><img id="img_btn_011_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/011.png"></td><td><img id="img_btn_031_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/031.png"></td><td><img id="img_btn_020_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/basic/020.png"></td><td><img id="img_btn_027_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/027.png"></td><td> </td></tr><tr><td>%%%HBTN%%%</td><td><img id="img_btn_030_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/030.png"></td><td><img id="img_btn_029_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/029.png"></td><td><img id="img_btn_028_%%%NODEID%%%" class="ptz_ctrl_btn" src="/style/png/player/028.png"></td><td> </td></tr></table></div></div>'
|
||||
|
//html: '<div id="img-%%%NODEID%%%" style="display: flex;align-items: center;" ><img id="img-img-%%%NODEID%%%" ondblclick="fullScreen(\'img-%%%NODEID%%%\');" style="cursor: zoom-in" src="/style/assets/no-signal.png" width="100%" /></div>'
|
||||
|
//html: '<video id="video-%%%NODEID%%%" class="video-js" controls preload="auto" width="640" height="264" data-setup="{}"><source src="/lib/controller/data/videos/e4e18614af6059501d88ca39e76db15b.mp4" type="video/mp4"></video>'
|
||||
|
html:'' |
||||
|
}, |
||||
|
|
||||
|
*/ |
||||
|
items:[{ |
||||
|
xtype: 'button', |
||||
|
id: 'db_download_video', |
||||
|
scale: 'large', |
||||
|
enableToggle: true, |
||||
|
disabled: true, |
||||
|
text: 'Download Video File', |
||||
|
width: '100%', |
||||
|
handler: function(){ |
||||
|
if( DownloadVideoLink!= '' ){ |
||||
|
var link = document.createElement("a"); |
||||
|
// If you don't know the name or want to use
|
||||
|
// the webserver default set name = ''
|
||||
|
//link.setAttribute('download', name );
|
||||
|
link.setAttribute('download', '' ); |
||||
|
link.href = DownloadVideoLink; |
||||
|
document.body.appendChild(link); |
||||
|
link.click(); |
||||
|
link.remove(); |
||||
|
} |
||||
|
} |
||||
|
}], |
||||
|
listeners:{ |
||||
|
resize: function( p, adjWidth, adjHeight, rawWidth, rawHeight ){ |
||||
|
if( rawWidth!= undefined ){ |
||||
|
if( p.sukaMineWidth != adjWidth ){ |
||||
|
p.sukaMineWidth = adjWidth; |
||||
|
var XX = p.sukaMineWidth * %%%HEIGHT%%% / %%%WIDTH%%%; |
||||
|
p.setHeight( XX + 32 ); |
||||
|
var z = Ext.getCmp('db_download_video'); |
||||
|
z.setHeight( XX ); |
||||
|
}; |
||||
|
}; |
||||
|
}, |
||||
|
afterrender: function( p ){ |
||||
|
var xx = p.getWidth() * %%%HEIGHT%%% / %%%WIDTH%%%; |
||||
|
p.setHeight( xx + 32 ); |
||||
|
//var z = Ext.getCmp('db_node_%%%NODEID%%%_pic');
|
||||
|
//z.setHeight( xx - 132 );
|
||||
|
/* |
||||
|
document.getElementById('img_btn_010_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_010_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_011_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_011_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_027_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_027_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_028_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_028_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_029_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_029_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_030_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_030_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_031_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_031_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_032_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_032_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_033_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_033_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_034_%%%NODEID%%%').addEventListener( 'mouseup', makePtzStop ); |
||||
|
document.getElementById('img_btn_034_%%%NODEID%%%').addEventListener( 'mousedown', makePtzMove ); |
||||
|
document.getElementById('img_btn_020_%%%NODEID%%%').addEventListener( 'mousedown', makePtzStop ); |
||||
|
*/ |
||||
|
} |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,19 @@ |
|||||
|
{ |
||||
|
id: 'db_node_%%%NODEID%%%', |
||||
|
xtype: 'panel', |
||||
|
width: 400, |
||||
|
height: 400, |
||||
|
frame: true, |
||||
|
title: 'Camera %%%NODEID%%%', |
||||
|
items:[{ |
||||
|
html: '<video id="hls-example" class="video-js vjs-default-skin" width="400" height="300"><source type="application/x-mpegURL" src="http://192.168.0.116:8081/d7d823703f68ba05c04efdb7474c2de5/7/hls.m3u8"></video>', |
||||
|
}], |
||||
|
listeners:{ |
||||
|
afterrender: function(){ |
||||
|
var player = videojs('hls-example',{ |
||||
|
autoplay: 'muted' |
||||
|
}); |
||||
|
return true; |
||||
|
}, |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,88 @@ |
|||||
|
{ |
||||
|
id: 'db_node_%%%NODEID%%%', |
||||
|
width: 258, |
||||
|
height: 320, |
||||
|
title: '%%%NODENAME%%%', |
||||
|
listeners:{ |
||||
|
afterrender: function(){ |
||||
|
cleanup2DDraw( %%%NODEID%%% ); |
||||
|
drawZoomLevels[%%%NODEID%%%]=100; |
||||
|
} |
||||
|
}, |
||||
|
items:[{ |
||||
|
html: '<center><img id="draw_img_%%%NODEID%%%" src="/lib/controller/getDeviceDraw.php?NID=%%%NODEID%%%"><canvas id="targ_canvas_%%%NODEID%%%" style="display: none;" width="200" height="210"></canvas></center>', |
||||
|
height: '260px' |
||||
|
},{ |
||||
|
id: 'status_%%%NODEID%%%', |
||||
|
border: true, |
||||
|
frame: true, |
||||
|
height: 36, |
||||
|
html: '' |
||||
|
}], |
||||
|
bbar:[{ |
||||
|
xtype: 'button', |
||||
|
text: '12.5%', |
||||
|
enableToggle: true, |
||||
|
id: 'zoom_bt12_%%%NODEID%%%', |
||||
|
toggleGroup: 'zoom_tg_%%%NODEID%%%', |
||||
|
toggleHandler: function( bt, st ){ |
||||
|
if( st ){ |
||||
|
drawZoomLevels[%%%NODEID%%%]=12; |
||||
|
var img = document.getElementById('draw_img_%%%NODEID%%%'); |
||||
|
img.src = "/lib/controller/getDeviceDraw.php?NID=%%%NODEID%%%&AUX=12"; |
||||
|
img.onload = function(){ |
||||
|
cleanup2DDraw( %%%NODEID%%% ); |
||||
|
}; |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: '25%', |
||||
|
enableToggle: true, |
||||
|
id: 'zoom_bt25_%%%NODEID%%%', |
||||
|
toggleGroup: 'zoom_tg_%%%NODEID%%%', |
||||
|
toggleHandler: function( bt, st ){ |
||||
|
if( st ){ |
||||
|
drawZoomLevels[%%%NODEID%%%]=25; |
||||
|
var img = document.getElementById('draw_img_%%%NODEID%%%'); |
||||
|
img.src = "/lib/controller/getDeviceDraw.php?NID=%%%NODEID%%%&AUX=25"; |
||||
|
img.onload = function(){ |
||||
|
cleanup2DDraw( %%%NODEID%%% ); |
||||
|
}; |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: '50%', |
||||
|
enableToggle: true, |
||||
|
id: 'zoom_bt50_%%%NODEID%%%', |
||||
|
toggleGroup: 'zoom_tg_%%%NODEID%%%', |
||||
|
toggleHandler: function( bt, st ){ |
||||
|
if( st ){ |
||||
|
drawZoomLevels[%%%NODEID%%%]=50; |
||||
|
var img = document.getElementById('draw_img_%%%NODEID%%%'); |
||||
|
img.src = "/lib/controller/getDeviceDraw.php?NID=%%%NODEID%%%&AUX=50"; |
||||
|
img.onload = function(){ |
||||
|
cleanup2DDraw( %%%NODEID%%% ); |
||||
|
}; |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: '100%', |
||||
|
pressed: true, |
||||
|
enableToggle: true, |
||||
|
id: 'zoom_bt100_%%%NODEID%%%', |
||||
|
toggleGroup: 'zoom_tg_%%%NODEID%%%', |
||||
|
toggleHandler: function( bt, st ){ |
||||
|
if( st ){ |
||||
|
drawZoomLevels[%%%NODEID%%%]=100; |
||||
|
var img = document.getElementById('draw_img_%%%NODEID%%%'); |
||||
|
img.src = "/lib/controller/getDeviceDraw.php?NID=%%%NODEID%%%&AUX=100"; |
||||
|
img.onload = function(){ |
||||
|
cleanup2DDraw( %%%NODEID%%% ); |
||||
|
}; |
||||
|
}; |
||||
|
} |
||||
|
}] |
||||
|
} |
||||
@ -0,0 +1,95 @@ |
|||||
|
{ |
||||
|
id: 'db_node_%%%NODEID%%%', |
||||
|
width: 258, |
||||
|
height: 320, |
||||
|
title: '%%%NODENAME%%%', |
||||
|
tools: [{ |
||||
|
id:'gear', |
||||
|
handler: function(){ |
||||
|
//Ext.Msg.alert('Message', 'The Settings tool was clicked.');
|
||||
|
showSensorToolBox( %%%NODEID%%% ); |
||||
|
} |
||||
|
}], |
||||
|
listeners:{ |
||||
|
afterrender: function(){ |
||||
|
cleanup2DDraw( %%%NODEID%%% ); |
||||
|
drawZoomLevels[%%%NODEID%%%]=100; |
||||
|
} |
||||
|
}, |
||||
|
items:[{ |
||||
|
html: '<center><img id="draw_img_%%%NODEID%%%" src="/lib/controller/getDeviceDraw.php?NID=%%%NODEID%%%&AUX=100" style="cursor: crosshair;"><canvas id="targ_canvas_%%%NODEID%%%" style="display: none; cursor: crosshair;" onclick="DrawClicker( %%%NODEID%%%, event );" width="200" height="210"></canvas></center>', |
||||
|
height: '260px' |
||||
|
},{ |
||||
|
id: 'status_%%%NODEID%%%', |
||||
|
border: true, |
||||
|
frame: true, |
||||
|
height: 36, |
||||
|
html: '' |
||||
|
}], |
||||
|
bbar:[{ |
||||
|
xtype: 'button', |
||||
|
text: '12.5%', |
||||
|
enableToggle: true, |
||||
|
id: 'zoom_bt12_%%%NODEID%%%', |
||||
|
toggleGroup: 'zoom_tg_%%%NODEID%%%', |
||||
|
toggleHandler: function( bt, st ){ |
||||
|
if( st ){ |
||||
|
drawZoomLevels[%%%NODEID%%%]=12; |
||||
|
var img = document.getElementById('draw_img_%%%NODEID%%%'); |
||||
|
img.src = "/lib/controller/getDeviceDraw.php?NID=%%%NODEID%%%&AUX=12"; |
||||
|
img.onload = function(){ |
||||
|
cleanup2DDraw( %%%NODEID%%% ); |
||||
|
}; |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: '25%', |
||||
|
enableToggle: true, |
||||
|
id: 'zoom_bt25_%%%NODEID%%%', |
||||
|
toggleGroup: 'zoom_tg_%%%NODEID%%%', |
||||
|
toggleHandler: function( bt, st ){ |
||||
|
if( st ){ |
||||
|
drawZoomLevels[%%%NODEID%%%]=25; |
||||
|
var img = document.getElementById('draw_img_%%%NODEID%%%'); |
||||
|
img.src = "/lib/controller/getDeviceDraw.php?NID=%%%NODEID%%%&AUX=25"; |
||||
|
img.onload = function(){ |
||||
|
cleanup2DDraw( %%%NODEID%%% ); |
||||
|
}; |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: '50%', |
||||
|
enableToggle: true, |
||||
|
id: 'zoom_bt50_%%%NODEID%%%', |
||||
|
toggleGroup: 'zoom_tg_%%%NODEID%%%', |
||||
|
toggleHandler: function( bt, st ){ |
||||
|
if( st ){ |
||||
|
drawZoomLevels[%%%NODEID%%%]=50; |
||||
|
var img = document.getElementById('draw_img_%%%NODEID%%%'); |
||||
|
img.src = "/lib/controller/getDeviceDraw.php?NID=%%%NODEID%%%&AUX=50"; |
||||
|
img.onload = function(){ |
||||
|
cleanup2DDraw( %%%NODEID%%% ); |
||||
|
}; |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: '100%', |
||||
|
pressed: true, |
||||
|
enableToggle: true, |
||||
|
id: 'zoom_bt100_%%%NODEID%%%', |
||||
|
toggleGroup: 'zoom_tg_%%%NODEID%%%', |
||||
|
toggleHandler: function( bt, st ){ |
||||
|
if( st ){ |
||||
|
drawZoomLevels[%%%NODEID%%%]=100; |
||||
|
var img = document.getElementById('draw_img_%%%NODEID%%%'); |
||||
|
img.src = "/lib/controller/getDeviceDraw.php?NID=%%%NODEID%%%&AUX=100"; |
||||
|
img.onload = function(){ |
||||
|
cleanup2DDraw( %%%NODEID%%% ); |
||||
|
}; |
||||
|
}; |
||||
|
} |
||||
|
}] |
||||
|
} |
||||
@ -0,0 +1,95 @@ |
|||||
|
{ |
||||
|
id: 'db_node_%%%NODEID%%%', |
||||
|
title: '%%%NODENAME%%%', |
||||
|
draggable: false, |
||||
|
collapsible: false, |
||||
|
tools: [{ |
||||
|
id:'toggle', |
||||
|
handler: function( a, b, p ){ |
||||
|
fsDrawID = %%%NODEID%%%; |
||||
|
fullScreen( 'div_radar_%%%NODEID%%%' ); |
||||
|
var el = document.getElementById('draw_svgr_'+fsDrawID ); |
||||
|
var nW = Math.floor( ( window.screen.height/window.screen.width ) * 100 ); |
||||
|
el.removeAttribute("width"); |
||||
|
el.setAttribute( "width", nW+'%' ); |
||||
|
} |
||||
|
}], |
||||
|
listeners:{ |
||||
|
afterrender: function(p){ |
||||
|
masks_statuses[%%%NODEID%%%] = 0; |
||||
|
masks_exist[%%%NODEID%%%] = 0; |
||||
|
|
||||
|
var W=p.getWidth(); |
||||
|
var H=9*(W/8); |
||||
|
p.setHeight( H + 32 ); |
||||
|
Ext.getCmp( 'cp_radar_%%%NODEID%%%' ).setHeight( H - 18 ); |
||||
|
//document.getElementById('draw_svg_%%%NODEID%%%').setAttribute("width", H-45 );
|
||||
|
set2DZoomLevel( %%%NODEID%%%, 100 ); |
||||
|
var el = document.getElementById('div_radar_%%%NODEID%%%'); |
||||
|
el.addEventListener( "fullscreenchange", ( evt )=>{ |
||||
|
if( document.fullscreenElement ){ |
||||
|
} else { |
||||
|
if( fsDrawID ){ |
||||
|
var el = document.getElementById('draw_svgr_'+fsDrawID ); |
||||
|
el.removeAttribute("width"); |
||||
|
el.setAttribute( "width", '86%' ); |
||||
|
fsDrawID = 0; |
||||
|
}; |
||||
|
}; |
||||
|
}); |
||||
|
window.setTimeout( load2DDraw, 10*%%%NODEID%%%, %%%NODEID%%%, 'draw_svgr_' ); |
||||
|
} |
||||
|
}, |
||||
|
layout: 'hbox', |
||||
|
items:[{ |
||||
|
id: 'cp_radar_%%%NODEID%%%', |
||||
|
html: '<div id="div_radar_%%%NODEID%%%" style="display: block; padding: 5px; width: \'100%\'; height: \'100%\';"><center><svg id="draw_svgr_%%%NODEID%%%" opacity="1.0" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="86%" version="1.1" onclick="select2DROI( %%%NODEID%%%, event );" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd; cursor: crosshair;" viewBox="0 0 574 574" xmlns:xlink="http://www.w3.org/1999/xlink"><text id="g_txt_%%%NODEID%%%" text-anchor="left" transform="rotate(0,35,35)" x="35" y="35" fill="#FFF212" style="font: 30px sans-serif">100 m.</text><circle fill="#00A859" stroke="#373435" stroke-width="5.92139" cx="287" cy="287" r="284"/><circle id="r50_%%%NODEID%%%" fill="none" stroke="#FFF212" stroke-width="3.94741" cx="287" cy="287" r="142"/><text id="50_txt_%%%NODEID%%%" text-anchor="left" transform="rotate(45,140,140)" x="140" y="140" fill="#FFF212" style="font: 25px sans-serif">50</text><circle id="r25_%%%NODEID%%%" fill="none" stroke="#FFF212" stroke-width="2.96042" cx="287" cy="287" r="71"/><text id="25_txt_%%%NODEID%%%" text-anchor="left" transform="rotate(45,210,210)" x="210" y="210" fill="#FFF212" style="font: 15px sans-serif">25</text><circle id="r12_%%%NODEID%%%" fill="none" stroke="#FFF212" stroke-width="1.47993" cx="287" cy="287" r="34"/><text id="12_txt_%%%NODEID%%%" text-anchor="left" transform="rotate(45,245,245)" x="245" y="245" fill="#FFF212" style="font: 10px sans-serif">12.5</text><line fill="none" stroke="#FFF212" stroke-width="3.94741" x1="287" y1="3" x2="287" y2="571"/><line fill="none" stroke="#FFF212" stroke-width="3.94741" x1="3" y1="287" x2="571" y2="287"/><circle fill="none" stroke="#373435" stroke-width="5.92139" cx="287" cy="287" r="284"/></svg></center></div>', |
||||
|
width: '100%' |
||||
|
}], |
||||
|
bbar:[{ |
||||
|
xtype: 'button', |
||||
|
text: '12.5%', |
||||
|
enableToggle: true, |
||||
|
id: 'zoom_bt12_%%%NODEID%%%', |
||||
|
toggleGroup: 'zoom_tg_%%%NODEID%%%', |
||||
|
toggleHandler: function( bt, st ){ |
||||
|
if( st ){ |
||||
|
set2DZoomLevel( %%%NODEID%%%, 12 ); |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: '25%', |
||||
|
enableToggle: true, |
||||
|
id: 'zoom_bt25_%%%NODEID%%%', |
||||
|
toggleGroup: 'zoom_tg_%%%NODEID%%%', |
||||
|
toggleHandler: function( bt, st ){ |
||||
|
if( st ){ |
||||
|
set2DZoomLevel( %%%NODEID%%%, 25 ); |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: '50%', |
||||
|
enableToggle: true, |
||||
|
id: 'zoom_bt50_%%%NODEID%%%', |
||||
|
toggleGroup: 'zoom_tg_%%%NODEID%%%', |
||||
|
toggleHandler: function( bt, st ){ |
||||
|
if( st ){ |
||||
|
set2DZoomLevel( %%%NODEID%%%, 50 ); |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: '100%', |
||||
|
pressed: true, |
||||
|
enableToggle: true, |
||||
|
id: 'zoom_bt100_%%%NODEID%%%', |
||||
|
toggleGroup: 'zoom_tg_%%%NODEID%%%', |
||||
|
toggleHandler: function( bt, st ){ |
||||
|
if( st ){ |
||||
|
set2DZoomLevel( %%%NODEID%%%, 100 ); |
||||
|
}; |
||||
|
} |
||||
|
}] |
||||
|
} |
||||
@ -0,0 +1,95 @@ |
|||||
|
{ |
||||
|
id: 'db_node_%%%NODEID%%%', |
||||
|
width: 258, |
||||
|
height: 320, |
||||
|
title: '%%%NODENAME%%%', |
||||
|
tools: [{ |
||||
|
id:'gear', |
||||
|
handler: function(){ |
||||
|
//Ext.Msg.alert('Message', 'The Settings tool was clicked.');
|
||||
|
showSensorToolBox( %%%NODEID%%% ); |
||||
|
} |
||||
|
}], |
||||
|
listeners:{ |
||||
|
afterrender: function(){ |
||||
|
cleanup2DDraw( %%%NODEID%%% ); |
||||
|
drawZoomLevels[%%%NODEID%%%]=100; |
||||
|
} |
||||
|
}, |
||||
|
items:[{ |
||||
|
html: '<center><img id="draw_img_%%%NODEID%%%" src="/lib/controller/getDeviceDraw.php?NID=%%%NODEID%%%"><canvas id="targ_canvas_%%%NODEID%%%" style="display: none;" width="200" height="210"></canvas></center>', |
||||
|
height: '260px' |
||||
|
},{ |
||||
|
id: 'status_%%%NODEID%%%', |
||||
|
border: true, |
||||
|
frame: true, |
||||
|
height: 36, |
||||
|
html: '' |
||||
|
}], |
||||
|
bbar:[{ |
||||
|
xtype: 'button', |
||||
|
text: '12.5%', |
||||
|
enableToggle: true, |
||||
|
id: 'zoom_bt12_%%%NODEID%%%', |
||||
|
toggleGroup: 'zoom_tg_%%%NODEID%%%', |
||||
|
toggleHandler: function( bt, st ){ |
||||
|
if( st ){ |
||||
|
drawZoomLevels[%%%NODEID%%%]=12; |
||||
|
var img = document.getElementById('draw_img_%%%NODEID%%%'); |
||||
|
img.src = "/lib/controller/getDeviceDraw.php?NID=%%%NODEID%%%&AUX=12"; |
||||
|
img.onload = function(){ |
||||
|
cleanup2DDraw( %%%NODEID%%% ); |
||||
|
}; |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: '25%', |
||||
|
enableToggle: true, |
||||
|
id: 'zoom_bt25_%%%NODEID%%%', |
||||
|
toggleGroup: 'zoom_tg_%%%NODEID%%%', |
||||
|
toggleHandler: function( bt, st ){ |
||||
|
if( st ){ |
||||
|
drawZoomLevels[%%%NODEID%%%]=25; |
||||
|
var img = document.getElementById('draw_img_%%%NODEID%%%'); |
||||
|
img.src = "/lib/controller/getDeviceDraw.php?NID=%%%NODEID%%%&AUX=25"; |
||||
|
img.onload = function(){ |
||||
|
cleanup2DDraw( %%%NODEID%%% ); |
||||
|
}; |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: '50%', |
||||
|
enableToggle: true, |
||||
|
id: 'zoom_bt50_%%%NODEID%%%', |
||||
|
toggleGroup: 'zoom_tg_%%%NODEID%%%', |
||||
|
toggleHandler: function( bt, st ){ |
||||
|
if( st ){ |
||||
|
drawZoomLevels[%%%NODEID%%%]=50; |
||||
|
var img = document.getElementById('draw_img_%%%NODEID%%%'); |
||||
|
img.src = "/lib/controller/getDeviceDraw.php?NID=%%%NODEID%%%&AUX=50"; |
||||
|
img.onload = function(){ |
||||
|
cleanup2DDraw( %%%NODEID%%% ); |
||||
|
}; |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
text: '100%', |
||||
|
pressed: true, |
||||
|
enableToggle: true, |
||||
|
id: 'zoom_bt100_%%%NODEID%%%', |
||||
|
toggleGroup: 'zoom_tg_%%%NODEID%%%', |
||||
|
toggleHandler: function( bt, st ){ |
||||
|
if( st ){ |
||||
|
drawZoomLevels[%%%NODEID%%%]=100; |
||||
|
var img = document.getElementById('draw_img_%%%NODEID%%%'); |
||||
|
img.src = "/lib/controller/getDeviceDraw.php?NID=%%%NODEID%%%&AUX=100"; |
||||
|
img.onload = function(){ |
||||
|
cleanup2DDraw( %%%NODEID%%% ); |
||||
|
}; |
||||
|
}; |
||||
|
} |
||||
|
}] |
||||
|
} |
||||
@ -0,0 +1,164 @@ |
|||||
|
{ |
||||
|
id: 'db_node_%%%NODEID%%%', |
||||
|
width: 258, |
||||
|
height: 336, |
||||
|
title: '%%%NODENAME%%%', |
||||
|
tools: [{ |
||||
|
id:'gear', |
||||
|
handler: function(){ |
||||
|
//Ext.Msg.alert('Message', 'The Settings tool was clicked.');
|
||||
|
showSensorToolBox( %%%NODEID%%% ); |
||||
|
} |
||||
|
}], |
||||
|
listeners:{ |
||||
|
beforedestroy: function(){ |
||||
|
if( typeof nodeTHREEviewers[%%%NODEID%%%] !== 'undefined' ){ |
||||
|
//nodeTHREEviewers[%%%NODEID%%%].container
|
||||
|
// object.geometry.dispose(); object.material.dispose(); scene.remove( object );
|
||||
|
stopAnimation(); |
||||
|
nodeTHREEviewers[%%%NODEID%%%].renderer.renderLists.dispose(); |
||||
|
delete nodeTHREEviewers[%%%NODEID%%%].renderer; |
||||
|
delete nodeTHREEviewers[%%%NODEID%%%].scene; |
||||
|
delete nodeTHREEviewers[%%%NODEID%%%].mesh; |
||||
|
delete nodeTHREEviewers[%%%NODEID%%%].geometry; |
||||
|
delete nodeTHREEviewers[%%%NODEID%%%].material; |
||||
|
delete nodeTHREEviewers[%%%NODEID%%%].texture; |
||||
|
delete nodeTHREEviewers[%%%NODEID%%%].camera; |
||||
|
delete nodeTHREEviewers[%%%NODEID%%%]; |
||||
|
}; |
||||
|
return true; |
||||
|
}, |
||||
|
afterrender: function(){ |
||||
|
//cleanupDraw( %%%NODEID%%% );
|
||||
|
//drawZoomLevels[%%%NODEID%%%]=100;
|
||||
|
//const panorama = new PANOLENS.ImagePanorama( '/lib/controller/getDeviceDraw.php?NID=%%%NODEID%%%' );
|
||||
|
//const viewer = new PANOLENS.Viewer({container: 'targ_canvas_%%%NODEID%%%' });
|
||||
|
//viewer.add( panorama );
|
||||
|
nodeTHREEviewers[%%%NODEID%%%] = {}; |
||||
|
nodeTHREEviewers[%%%NODEID%%%].container = document.getElementById( 'container_%%%NODEID%%%' ); |
||||
|
|
||||
|
nodeTHREEviewers[%%%NODEID%%%].camera = new THREE.PerspectiveCamera( 75, 1, 1, 1100 ); |
||||
|
nodeTHREEviewers[%%%NODEID%%%].scene = new THREE.Scene(); |
||||
|
nodeTHREEviewers[%%%NODEID%%%].geometry = new THREE.SphereGeometry( 500, 60, 40 ); |
||||
|
// invert the geometry on the x-axis so that all of the faces point inward
|
||||
|
nodeTHREEviewers[%%%NODEID%%%].geometry.scale( -1, 1, 1 ); |
||||
|
|
||||
|
nodeTHREEviewers[%%%NODEID%%%].texture = new THREE.TextureLoader().load( '/lib/controller/getDeviceDraw.php?NID=%%%NODEID%%%' ); |
||||
|
nodeTHREEviewers[%%%NODEID%%%].material = new THREE.MeshBasicMaterial( { map: nodeTHREEviewers[%%%NODEID%%%].texture } ); |
||||
|
nodeTHREEviewers[%%%NODEID%%%].mesh = new THREE.Mesh( nodeTHREEviewers[%%%NODEID%%%].geometry, nodeTHREEviewers[%%%NODEID%%%].material ); |
||||
|
nodeTHREEviewers[%%%NODEID%%%].scene.add( nodeTHREEviewers[%%%NODEID%%%].mesh ); |
||||
|
nodeTHREEviewers[%%%NODEID%%%].scene.add( l3dMapOverlayMesh ); |
||||
|
|
||||
|
nodeTHREEviewers[%%%NODEID%%%].renderer = new THREE.WebGLRenderer(); |
||||
|
nodeTHREEviewers[%%%NODEID%%%].renderer.setPixelRatio( 1 ); |
||||
|
nodeTHREEviewers[%%%NODEID%%%].renderer.setSize( nodeTHREEviewers[%%%NODEID%%%].container.clientWidth, 200 ); |
||||
|
nodeTHREEviewers[%%%NODEID%%%].container.appendChild( nodeTHREEviewers[%%%NODEID%%%].renderer.domElement ); |
||||
|
|
||||
|
nodeTHREEviewers[%%%NODEID%%%].container.style.touchAction = 'none'; |
||||
|
nodeTHREEviewers[%%%NODEID%%%].container.myVID = %%%NODEID%%%; |
||||
|
|
||||
|
nodeTHREEviewers[%%%NODEID%%%].container.addEventListener( 'pointerdown', onPointerDown ); |
||||
|
nodeTHREEviewers[%%%NODEID%%%].container.addEventListener( 'wheel', onDocumentMouseWheel ); |
||||
|
nodeTHREEviewers[%%%NODEID%%%].targets = new Array(); |
||||
|
nodeTHREEviewers[%%%NODEID%%%].targetShowCopunter = 0; |
||||
|
nodeTHREEviewers[%%%NODEID%%%].targetIndex = 0; |
||||
|
|
||||
|
//addl3dTarget( %%%NODEID%%%, 200, Math.PI/4, Math.PI/4 );
|
||||
|
//addl3dTarget( %%%NODEID%%%, 150, 0, 0 );
|
||||
|
//document.addEventListener( 'wheel', onDocumentMouseWheel );
|
||||
|
/* |
||||
|
container.addEventListener( 'dragover', function ( event ) { |
||||
|
|
||||
|
event.preventDefault(); |
||||
|
event.dataTransfer.dropEffect = 'copy'; |
||||
|
|
||||
|
} ); |
||||
|
container.addEventListener('dragenter', function () { |
||||
|
|
||||
|
document.body.style.opacity = 0.5; |
||||
|
|
||||
|
} ); |
||||
|
container.addEventListener('dragleave', function () { |
||||
|
|
||||
|
document.body.style.opacity = 1; |
||||
|
|
||||
|
} ); |
||||
|
container.addEventListener('drop', function ( event ) { |
||||
|
|
||||
|
event.preventDefault(); |
||||
|
|
||||
|
const reader = new FileReader(); |
||||
|
reader.addEventListener( 'load', function ( event ) { |
||||
|
|
||||
|
material.map.image.src = event.target.result; |
||||
|
material.map.needsUpdate = true; |
||||
|
|
||||
|
} ); |
||||
|
reader.readAsDataURL( event.dataTransfer.files[ 0 ] ); |
||||
|
|
||||
|
document.body.style.opacity = 1; |
||||
|
|
||||
|
} ); |
||||
|
*/ |
||||
|
/* |
||||
|
document.addEventListener( 'dragover', function ( event ) { |
||||
|
|
||||
|
event.preventDefault(); |
||||
|
event.dataTransfer.dropEffect = 'copy'; |
||||
|
|
||||
|
} ); |
||||
|
|
||||
|
document.addEventListener( 'dragenter', function () { |
||||
|
|
||||
|
document.body.style.opacity = 0.5; |
||||
|
|
||||
|
} ); |
||||
|
|
||||
|
document.addEventListener( 'dragleave', function () { |
||||
|
|
||||
|
document.body.style.opacity = 1; |
||||
|
|
||||
|
} ); |
||||
|
|
||||
|
document.addEventListener( 'drop', function ( event ) { |
||||
|
|
||||
|
event.preventDefault(); |
||||
|
|
||||
|
const reader = new FileReader(); |
||||
|
reader.addEventListener( 'load', function ( event ) { |
||||
|
|
||||
|
material.map.image.src = event.target.result; |
||||
|
material.map.needsUpdate = true; |
||||
|
|
||||
|
} ); |
||||
|
reader.readAsDataURL( event.dataTransfer.files[ 0 ] ); |
||||
|
|
||||
|
document.body.style.opacity = 1; |
||||
|
|
||||
|
} ); |
||||
|
*/ |
||||
|
//animateTargets();
|
||||
|
animate(); |
||||
|
|
||||
|
//
|
||||
|
|
||||
|
//window.addEventListener( 'resize', onWindowResize );
|
||||
|
} |
||||
|
}, |
||||
|
items:[{ |
||||
|
html: '<center><div id="container_%%%NODEID%%%"></div></center>', |
||||
|
height: 210 |
||||
|
},{ |
||||
|
id: 'status_%%%NODEID%%%', |
||||
|
border: true, |
||||
|
frame: true, |
||||
|
height: 36, |
||||
|
html: '' |
||||
|
},{ xtype: 'spacer', height: 3 },{ |
||||
|
id: 'det_status_%%%NODEID%%%', |
||||
|
border: true, |
||||
|
frame: true, |
||||
|
height: 46, |
||||
|
html: '<canvas id="status_canvas_%%%NODEID%%%" style="display: none;" width="240" height="43"></canvas>' |
||||
|
}] |
||||
|
} |
||||
@ -0,0 +1,16 @@ |
|||||
|
[{ |
||||
|
columnWidth: '320px', |
||||
|
style:'padding:10px 0 10px 10px', |
||||
|
items:[ |
||||
|
%%%ITEMS%%% |
||||
|
] |
||||
|
},{ |
||||
|
columnWidth: '320px', |
||||
|
style:'padding:10px 0 10px 10px' |
||||
|
},{ |
||||
|
columnWidth: '320px', |
||||
|
style:'padding:10px 0 10px 10px' |
||||
|
},{ |
||||
|
columnWidth: '320px', |
||||
|
style:'padding:10px 0 10px 10px' |
||||
|
}] |
||||
@ -0,0 +1,124 @@ |
|||||
|
<?php |
||||
|
require_once('../ajax_asm.php'); |
||||
|
if( $CUser->Data['id'] > 1 ){ |
||||
|
$DATA = array(); |
||||
|
$DATA['success'] = false; |
||||
|
if( $CUser->Data['access'] > 4 ){ |
||||
|
$COP = intval( $_POST['OP'] ); |
||||
|
switch( $COP ){ |
||||
|
case 0:{ |
||||
|
//add new
|
||||
|
$NLO = $DATABASE->escape( $_POST['NLO'] ); |
||||
|
$PWD = $_POST['PW1']; |
||||
|
$RWD = $_POST['PW2']; |
||||
|
$ACC = intval($_POST['ACC']); |
||||
|
if( $PWD == '' ){ |
||||
|
$DATA['msg'] = 'No Password defined!'; |
||||
|
} else { |
||||
|
if( $_POST['NLO'] == '' ){ |
||||
|
$DATA['msg'] = 'No Login defined!'; |
||||
|
} else { |
||||
|
if( $PWD == $RWD ){ |
||||
|
$M5 = md5( $PWD ); |
||||
|
$CTS = time(); |
||||
|
$QS="INSERT INTO `users`(`create_ts`,`login`,`pwdMD5`,`status`,`access`) VALUES ( {$CTS},'{$NLO}','{$M5}','A',{$ACC})"; |
||||
|
$DATABASE->Query( $QS ); |
||||
|
$DATA['success'] = true; |
||||
|
} else { |
||||
|
$DATA['msg'] = 'Passwords does not match!'; |
||||
|
}; |
||||
|
}; |
||||
|
}; |
||||
|
break; |
||||
|
}; |
||||
|
case 1:{ |
||||
|
//change old
|
||||
|
$UID = intval($_POST['SUID']); |
||||
|
if( $UID ){ |
||||
|
$OLO = $DATABASE->escape( $_POST['OLO'] ); |
||||
|
$NLO = $DATABASE->escape( $_POST['NLO'] ); |
||||
|
$PWD = $_POST['PW1']; |
||||
|
$RWD = $_POST['PW2']; |
||||
|
$ACC = intval($_POST['ACC']); |
||||
|
if( $PWD == '' ){ |
||||
|
$QS="UPDATE `users` SET `login`='{$NLO}', `access`={$ACC} WHERE id={$UID}"; |
||||
|
$DATABASE->Query( $QS ); |
||||
|
$DATA['success'] = true; |
||||
|
} else { |
||||
|
if( $PWD == $RWD ){ |
||||
|
$M5 = md5( $PWD ); |
||||
|
$QS="UPDATE `users` SET `login`='{$NLO}', `pwdMD5`='{$M5}', `access`={$ACC} WHERE id={$UID}"; |
||||
|
$DATABASE->Query( $QS ); |
||||
|
$DATA['success'] = true; |
||||
|
} else { |
||||
|
$DATA['msg'] = 'Passwords does not match!'; |
||||
|
}; |
||||
|
}; |
||||
|
} else { |
||||
|
$DATA['msg'] = 'Wrong User ID!'; |
||||
|
}; |
||||
|
break; |
||||
|
}; |
||||
|
case 2:{ |
||||
|
$UID = intval($_POST['SUID']); |
||||
|
if( $UID ){ |
||||
|
if( $UID != $CUser->Data['id'] ){ |
||||
|
if( $UID > 1 ){ |
||||
|
$QS="UPDATE `users` SET `status`='D' WHERE id={$UID}"; |
||||
|
$DATABASE->Query( $QS ); |
||||
|
$DATA['success'] = true; |
||||
|
} else { |
||||
|
$DATA['msg'] = 'You Can not change Guest account!'; |
||||
|
}; |
||||
|
} else { |
||||
|
$DATA['msg'] = 'You Can not block yoreself account!'; |
||||
|
}; |
||||
|
} else { |
||||
|
$DATA['msg'] = 'Wrong User ID!'; |
||||
|
}; |
||||
|
break; |
||||
|
}; |
||||
|
case 3:{ |
||||
|
$UID = intval($_POST['SUID']); |
||||
|
if( $UID ){ |
||||
|
if( $UID > 1 ){ |
||||
|
$QS="UPDATE `users` SET `status`='A' WHERE id={$UID}"; |
||||
|
$DATABASE->Query( $QS ); |
||||
|
$DATA['success'] = true; |
||||
|
} else { |
||||
|
$DATA['msg'] = 'You Can not change Guest account!'; |
||||
|
}; |
||||
|
} else { |
||||
|
$DATA['msg'] = 'Wrong User ID!'; |
||||
|
}; |
||||
|
break; |
||||
|
}; |
||||
|
case 4:{ |
||||
|
$UID = intval($_POST['SUID']); |
||||
|
if( $UID ){ |
||||
|
if( $UID != $CUser->Data['id'] ){ |
||||
|
if( $UID > 1 ){ |
||||
|
$QS="DELETE FROM `users` WHERE id={$UID}"; |
||||
|
$DATABASE->Query( $QS ); |
||||
|
$DATA['success'] = true; |
||||
|
} else { |
||||
|
$DATA['msg'] = 'You Can not remove Guest account!'; |
||||
|
}; |
||||
|
} else { |
||||
|
$DATA['msg'] = 'You Can not remove yoreself account!'; |
||||
|
}; |
||||
|
} else { |
||||
|
$DATA['msg'] = 'Wrong User ID!'; |
||||
|
}; |
||||
|
break; |
||||
|
}; |
||||
|
default: $DATA['msg'] = 'Wrong Operation!'; break; |
||||
|
}; |
||||
|
} else { |
||||
|
$DATA['msg'] = 'Access Permition Denied!'; |
||||
|
}; |
||||
|
echo json_encode( $DATA ); |
||||
|
exit(); |
||||
|
}; |
||||
|
header('location: /'); |
||||
|
?>
|
||||
@ -0,0 +1,125 @@ |
|||||
|
<?php |
||||
|
require_once('../ajax_asm.php'); |
||||
|
if( $CUser->Data['id'] > 1 ){ |
||||
|
$NodeID = intval($_POST['NID']); |
||||
|
//$SiteID = intval($_POST['SITE']);
|
||||
|
$LayerID = intval($_POST['MID']); |
||||
|
$LRFID = intval($_POST['LID']); |
||||
|
$SERIAL = json_decode( $_POST['MDTA'] ); |
||||
|
$MHEI = intval($_POST['MIH']); |
||||
|
$MWID = intval($_POST['MIW']); |
||||
|
$SHX = intval($_POST['MSHX']); |
||||
|
$SHY = intval($_POST['MSHY']); |
||||
|
if( isset( $_POST['DSTD'] ) ) $DSTS = intval( $_POST['DSTD'] ); else $DSTS = 1; |
||||
|
$QS = "SELECT * FROM nodes WHERE id={$NodeID} "; |
||||
|
$Data = array(); |
||||
|
$NPC = 0; |
||||
|
$SCHEDULE_JOB = 0; // NOJOB
|
||||
|
$result = $DATABASE->Query( $QS, false ); |
||||
|
if( $SHX == $SHY ) $Process = 0; else $Process = 1; |
||||
|
if( count( $result ) && $MHEI ){ |
||||
|
if( $Process == 1 ){ |
||||
|
$SCALE = 288.0 / floatval( $MHEI ); |
||||
|
} else { |
||||
|
$SCALE = 4096.0 / floatval( $MHEI ); |
||||
|
}; |
||||
|
$T = $result[0]; |
||||
|
$AID = $T['aux_id']; |
||||
|
$QS = "SELECT id FROM `lrf_masks` WHERE `sensor_id`={$AID} AND `lrf_id`={$LRFID} AND `layer`={$LayerID}"; |
||||
|
$result = $DATABASE->Query( $QS, false ); |
||||
|
$CV = array(); |
||||
|
$MID = 0; |
||||
|
if( count($result) == 0 ){ // No Masks Where Defined
|
||||
|
$QS = "INSERT INTO `lrf_masks` (`sensor_id`,`lrf_id`,`layer`) VALUES ({$AID},{$LRFID},{$LayerID})"; |
||||
|
$DATABASE->Query( $QS, false ); |
||||
|
$MID = $DATABASE->getLastInsertID(); |
||||
|
} else { |
||||
|
$MID = $result[0]['id']; |
||||
|
$QS = "SELECT * FROM `lrf_mask_vertexes` WHERE `mask_id`={$MID}"; |
||||
|
$ZA = $DATABASE->Query( $QS ); |
||||
|
foreach( $ZA as $A ){ |
||||
|
$QS = "DELETE FROM `lrf_mask_vertex_points` WHERE `vertex_id`={$A['id']}"; |
||||
|
$DATABASE->Query( $QS ); |
||||
|
}; |
||||
|
$QS = "DELETE FROM `lrf_mask_vertexes` WHERE `mask_id`={$MID}"; |
||||
|
$DATABASE->Query( $QS ); |
||||
|
}; |
||||
|
|
||||
|
|
||||
|
$SCHEDULE_JOB = 1; // Clear Mask
|
||||
|
foreach( $SERIAL[0][1]->children as $CCC ){ |
||||
|
$R = $CCC[1]->fillColor[0] * 255; |
||||
|
$G = $CCC[1]->fillColor[1] * 255; |
||||
|
$B = $CCC[1]->fillColor[2] * 255; |
||||
|
$QS = "INSERT INTO `lrf_mask_vertexes` (`mask_id`,`r`,`g`,`b`) VALUES ({$MID},{$R},{$G},{$B})"; |
||||
|
$DATABASE->Query( $QS, false ); |
||||
|
$VID = $DATABASE->getLastInsertID(); |
||||
|
foreach( $CCC[1]->segments as $SS ){ |
||||
|
if( $Process == 1 ){ |
||||
|
if( count( $SS ) == 2 ){ |
||||
|
$X = intval( $SCALE * floatval( intval( $SS[0] ) - $SHX ) ); |
||||
|
$Y = intval( $SCALE * floatval( intval( $SS[1] ) - $SHY ) ); |
||||
|
} else { |
||||
|
$X = intval( $SCALE * floatval( intval( $SS[0][0] ) - $SHX ) ); |
||||
|
$Y = intval( $SCALE * floatval( intval( $SS[0][1] ) - $SHY ) ); |
||||
|
}; |
||||
|
if( $X < 0 ) $X = 0; |
||||
|
if( $X > 2304 ) $X = 2304; |
||||
|
if( $Y < 0 ) $Y = 0; |
||||
|
if( $Y > 288 ) $Y = 288; |
||||
|
} else { |
||||
|
if( count( $SS ) == 2 ){ |
||||
|
$X = intval( $SCALE * floatval( intval( $SS[0] ) - $SHX ) ) - 2047; |
||||
|
$Y = intval( $SCALE * floatval( intval( $SS[1] ) - $SHY ) ) - 2047; |
||||
|
} else { |
||||
|
$X = intval( $SCALE * floatval( intval( $SS[0][0] ) - $SHX ) ) - 2047; |
||||
|
$Y = intval( $SCALE * floatval( intval( $SS[0][1] ) - $SHY ) ) - 2047; |
||||
|
}; |
||||
|
if( $X < -2047 ) $X = -2047; |
||||
|
if( $X > 2047 ) $X = 2047; |
||||
|
if( $Y < -2047 ) $Y = -2047; |
||||
|
if( $Y > 2047 ) $Y = 2047; |
||||
|
}; |
||||
|
$QS = "INSERT INTO `lrf_mask_vertex_points` (`vertex_id`,`x`,`y`) VALUES ({$VID},{$X},{$Y}) "; |
||||
|
$DATABASE->Query( $QS, false ); |
||||
|
$NPC++; |
||||
|
$SCHEDULE_JOB = 2; // Update - Set Mask
|
||||
|
}; |
||||
|
}; |
||||
|
switch( $SCHEDULE_JOB ){ |
||||
|
case 1:{ |
||||
|
// Clear Mask No Points.
|
||||
|
$QS = "SELECT * FROM `lrf_mask_vertexes` WHERE `mask_id`={$MID}"; |
||||
|
$ZA = $DATABASE->Query( $QS ); |
||||
|
foreach( $ZA as $A ){ |
||||
|
$QS = "DELETE FROM `lrf_mask_vertex_points` WHERE `vertex_id`={$A['id']}"; |
||||
|
$DATABASE->Query( $QS ); |
||||
|
}; |
||||
|
$QS = "DELETE FROM `lrf_mask_vertexes` WHERE `mask_id`={$MID}"; |
||||
|
$DATABASE->Query( $QS ); |
||||
|
$QS = "DELETE FROM `lrf_masks` WHERE `id`={$MID}"; |
||||
|
$DATABASE->Query( $QS ); |
||||
|
break; |
||||
|
}; |
||||
|
case 2:{ |
||||
|
// Don't Send To Device
|
||||
|
if( $DSTS == 0 ){ |
||||
|
$CMD = 67;//60+$LayerID;
|
||||
|
$QS = "INSERT INTO `nodes_qcq` (`node_id`,`cmd`,`parameter`) VALUES ({$NodeID},{$CMD},'{$LRFID}')"; |
||||
|
//echo $QS;
|
||||
|
$DATABASE->Query( $QS, false ); |
||||
|
}; |
||||
|
break; |
||||
|
}; |
||||
|
}; |
||||
|
$Data[] = $CV; |
||||
|
}; |
||||
|
if( $NPC > 2 ){ |
||||
|
// Need to shcedule Rasterisation and send to device
|
||||
|
|
||||
|
}; |
||||
|
echo json_encode( $Data ); |
||||
|
exit(); |
||||
|
}; |
||||
|
header('location: /'); |
||||
|
?>
|
||||
@ -0,0 +1,63 @@ |
|||||
|
<?php |
||||
|
require_once('../ajax_asm.php'); |
||||
|
// the response function
|
||||
|
function verbose( $ok=1,$info=""){ |
||||
|
// failure to upload throws 400 error
|
||||
|
if( $ok==0 ){ |
||||
|
http_response_code(400); |
||||
|
}; |
||||
|
die(json_encode(["ok"=>$ok, "info"=>$info])); |
||||
|
}; |
||||
|
if( isset( $_GET['DID'] ) ) { |
||||
|
$DID = intval( $_GET['DID'] ); |
||||
|
} else { |
||||
|
verbose( 0,"No Device ID Supplied!"); |
||||
|
}; |
||||
|
// invalid upload
|
||||
|
if( empty( $_FILES ) || $_FILES['file']['error'] ){ |
||||
|
verbose( 0, "Failed to move uploaded file.[" . $_FILES['file']['error'] . "]" ); |
||||
|
}; |
||||
|
// upload destination
|
||||
|
//$filePath = __DIR__ . DIRECTORY_SEPARATOR . "../../vault/working_dir/uploads";
|
||||
|
$filePath = $SYSPath . 'lib/controller/data/uploads'; |
||||
|
if( !file_exists($filePath) ){ |
||||
|
if (!mkdir($filePath, 0777, true)) { |
||||
|
verbose(0, "Failed to create $filePath"); |
||||
|
}; |
||||
|
}; |
||||
|
$rfn = isset($_REQUEST["name"]) ? $_REQUEST["name"] : $_FILES["file"]["name"]; |
||||
|
$fileName = isset($_REQUEST["name"]) ? $_REQUEST["name"] : $_FILES["file"]["name"]; |
||||
|
$filePath = $filePath . DIRECTORY_SEPARATOR . $fileName; |
||||
|
// dealing with the chunks
|
||||
|
$chunk = isset($_REQUEST["chunk"]) ? intval($_REQUEST["chunk"]) : 0; |
||||
|
$chunks = isset($_REQUEST["chunks"]) ? intval($_REQUEST["chunks"]) : 0; |
||||
|
$out = @fopen("{$filePath}.part", $chunk == 0 ? "wb" : "ab"); |
||||
|
if( $out ) { |
||||
|
$in = @fopen($_FILES['file']['tmp_name'], "rb"); |
||||
|
if( $in ){ |
||||
|
while( $buff = fread( $in, 4096 ) ){ |
||||
|
fwrite($out, $buff); |
||||
|
}; |
||||
|
} else { |
||||
|
verbose(0, "Failed to open input stream"); |
||||
|
}; |
||||
|
@fclose($in); |
||||
|
@fclose($out); |
||||
|
@unlink($_FILES['file']['tmp_name']); |
||||
|
} else { |
||||
|
verbose(0, "Failed to open output stream"); |
||||
|
}; |
||||
|
// check if file was uploaded
|
||||
|
if (!$chunks || $chunk == $chunks - 1) { |
||||
|
$MD5 = md5_file( "{$filePath}.part" ); |
||||
|
$Dest = $SYSPath . 'lib/controller/data/uploads/'.$MD5; |
||||
|
rename("{$filePath}.part", $Dest ); |
||||
|
$QS = "INSERT INTO `lrf_uploads`( `sensor_id`, `ts`, `status`, `md5`, `file`, `issue_reset`) VALUES({$DID}, strftime('%s'), -1, '{$MD5}', '{$rfn}', 0 ) ON CONFLICT(`md5`) DO UPDATE SET `status`=-1, `ts`=strftime('%s'), `issue_reset`=0"; |
||||
|
$DATABASE->Query( $QS ); |
||||
|
//if( createNewTask( 3, $fileName, 'Handle Upload File' ) == 0 ){
|
||||
|
// unlink( $filePath );
|
||||
|
// verbose(0, "Failed to create new Task");
|
||||
|
//};
|
||||
|
}; |
||||
|
verbose(1, "Upload OK"); |
||||
|
?>
|
||||
@ -0,0 +1 @@ |
|||||
|
'<center><svg id="me_svg_'+id+'" opacity="0.3" xmlns="http://www.w3.org/2000/svg" xml:space="preserve" width="100%" height="100%" version="1.1" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd; cursor: crosshair;" viewBox="0 0 574 574" xmlns:xlink="http://www.w3.org/1999/xlink"><text id="g_txt_%%%NODEID%%%" text-anchor="left" transform="rotate(0,35,35)" x="35" y="35" fill="#FFF212" style="font: 30px sans-serif">100 m.</text><circle fill="#00A859" stroke="#373435" stroke-width="5.92139" cx="287" cy="287" r="284"/><circle id="r50_%%%NODEID%%%" fill="none" stroke="#FFF212" stroke-width="3.94741" cx="287" cy="287" r="142"/><text id="50_txt_%%%NODEID%%%" text-anchor="left" transform="rotate(45,140,140)" x="140" y="140" fill="#FFF212" style="font: 25px sans-serif">50</text><circle id="r25_%%%NODEID%%%" fill="none" stroke="#FFF212" stroke-width="2.96042" cx="287" cy="287" r="71"/><text id="25_txt_%%%NODEID%%%" text-anchor="left" transform="rotate(45,210,210)" x="210" y="210" fill="#FFF212" style="font: 15px sans-serif">25</text><circle id="r12_%%%NODEID%%%" fill="none" stroke="#FFF212" stroke-width="1.47993" cx="287" cy="287" r="34"/><text id="12_txt_%%%NODEID%%%" text-anchor="left" transform="rotate(45,245,245)" x="245" y="245" fill="#FFF212" style="font: 10px sans-serif">12.5</text><line fill="none" stroke="#FFF212" stroke-width="3.94741" x1="287" y1="3" x2="287" y2="571"/><line fill="none" stroke="#FFF212" stroke-width="3.94741" x1="3" y1="287" x2="571" y2="287"/><circle fill="none" stroke="#373435" stroke-width="5.92139" cx="287" cy="287" r="284"/></svg></center>' |
||||
@ -1 +1 @@ |
|||||
/var/log/apache2/error.log |
|
||||
|
/var/log/nginx/error.log |
||||
@ -0,0 +1,346 @@ |
|||||
|
<!-- Loader1 --> |
||||
|
|
||||
|
<svg version="1.1" id="L1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve"> |
||||
|
<circle fill="none" stroke="#fff" stroke-width="6" stroke-miterlimit="15" stroke-dasharray="14.2472,14.2472" cx="50" cy="50" r="47" > |
||||
|
<animateTransform |
||||
|
attributeName="transform" |
||||
|
attributeType="XML" |
||||
|
type="rotate" |
||||
|
dur="5s" |
||||
|
from="0 50 50" |
||||
|
to="360 50 50" |
||||
|
repeatCount="indefinite" /> |
||||
|
</circle> |
||||
|
<circle fill="none" stroke="#fff" stroke-width="1" stroke-miterlimit="10" stroke-dasharray="10,10" cx="50" cy="50" r="39"> |
||||
|
<animateTransform |
||||
|
attributeName="transform" |
||||
|
attributeType="XML" |
||||
|
type="rotate" |
||||
|
dur="5s" |
||||
|
from="0 50 50" |
||||
|
to="-360 50 50" |
||||
|
repeatCount="indefinite" /> |
||||
|
</circle> |
||||
|
<g fill="#fff"> |
||||
|
<rect x="30" y="35" width="5" height="30"> |
||||
|
<animateTransform |
||||
|
attributeName="transform" |
||||
|
dur="1s" |
||||
|
type="translate" |
||||
|
values="0 5 ; 0 -5; 0 5" |
||||
|
repeatCount="indefinite" |
||||
|
begin="0.1"/> |
||||
|
</rect> |
||||
|
<rect x="40" y="35" width="5" height="30" > |
||||
|
<animateTransform |
||||
|
attributeName="transform" |
||||
|
dur="1s" |
||||
|
type="translate" |
||||
|
values="0 5 ; 0 -5; 0 5" |
||||
|
repeatCount="indefinite" |
||||
|
begin="0.2"/> |
||||
|
</rect> |
||||
|
<rect x="50" y="35" width="5" height="30" > |
||||
|
<animateTransform |
||||
|
attributeName="transform" |
||||
|
dur="1s" |
||||
|
type="translate" |
||||
|
values="0 5 ; 0 -5; 0 5" |
||||
|
repeatCount="indefinite" |
||||
|
begin="0.3"/> |
||||
|
</rect> |
||||
|
<rect x="60" y="35" width="5" height="30" > |
||||
|
<animateTransform |
||||
|
attributeName="transform" |
||||
|
dur="1s" |
||||
|
type="translate" |
||||
|
values="0 5 ; 0 -5; 0 5" |
||||
|
repeatCount="indefinite" |
||||
|
begin="0.4"/> |
||||
|
</rect> |
||||
|
<rect x="70" y="35" width="5" height="30" > |
||||
|
<animateTransform |
||||
|
attributeName="transform" |
||||
|
dur="1s" |
||||
|
type="translate" |
||||
|
values="0 5 ; 0 -5; 0 5" |
||||
|
repeatCount="indefinite" |
||||
|
begin="0.5"/> |
||||
|
</rect> |
||||
|
</g> |
||||
|
</svg> |
||||
|
|
||||
|
|
||||
|
<!-- Loader 2 --> |
||||
|
|
||||
|
<svg version="1.1" id="L2" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" |
||||
|
viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve"> |
||||
|
<circle fill="none" stroke="#fff" stroke-width="4" stroke-miterlimit="10" cx="50" cy="50" r="48"/> |
||||
|
<line fill="none" stroke-linecap="round" stroke="#fff" stroke-width="4" stroke-miterlimit="10" x1="50" y1="50" x2="85" y2="50.5"> |
||||
|
<animateTransform |
||||
|
attributeName="transform" |
||||
|
dur="2s" |
||||
|
type="rotate" |
||||
|
from="0 50 50" |
||||
|
to="360 50 50" |
||||
|
repeatCount="indefinite" /> |
||||
|
</line> |
||||
|
<line fill="none" stroke-linecap="round" stroke="#fff" stroke-width="4" stroke-miterlimit="10" x1="50" y1="50" x2="49.5" y2="74"> |
||||
|
<animateTransform |
||||
|
attributeName="transform" |
||||
|
dur="15s" |
||||
|
type="rotate" |
||||
|
from="0 50 50" |
||||
|
to="360 50 50" |
||||
|
repeatCount="indefinite" /> |
||||
|
</line> |
||||
|
</svg> |
||||
|
|
||||
|
|
||||
|
<!-- Loader 3 --> |
||||
|
|
||||
|
<svg version="1.1" id="L3" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" |
||||
|
viewBox="0 0 100 100" enable-background="new 0 0 0 0" xml:space="preserve"> |
||||
|
<circle fill="none" stroke="#fff" stroke-width="4" cx="50" cy="50" r="44" style="opacity:0.5;"/> |
||||
|
<circle fill="#fff" stroke="#e74c3c" stroke-width="3" cx="8" cy="54" r="6" > |
||||
|
<animateTransform |
||||
|
attributeName="transform" |
||||
|
dur="2s" |
||||
|
type="rotate" |
||||
|
from="0 50 48" |
||||
|
to="360 50 52" |
||||
|
repeatCount="indefinite" /> |
||||
|
|
||||
|
</circle> |
||||
|
</svg> |
||||
|
|
||||
|
|
||||
|
<!-- Loader 4 --> |
||||
|
|
||||
|
<svg version="1.1" id="L4" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" |
||||
|
viewBox="0 0 100 100" enable-background="new 0 0 0 0" xml:space="preserve"> |
||||
|
<circle fill="#fff" stroke="none" cx="6" cy="50" r="6"> |
||||
|
<animate |
||||
|
attributeName="opacity" |
||||
|
dur="1s" |
||||
|
values="0;1;0" |
||||
|
repeatCount="indefinite" |
||||
|
begin="0.1"/> |
||||
|
</circle> |
||||
|
<circle fill="#fff" stroke="none" cx="26" cy="50" r="6"> |
||||
|
<animate |
||||
|
attributeName="opacity" |
||||
|
dur="1s" |
||||
|
values="0;1;0" |
||||
|
repeatCount="indefinite" |
||||
|
begin="0.2"/> |
||||
|
</circle> |
||||
|
<circle fill="#fff" stroke="none" cx="46" cy="50" r="6"> |
||||
|
<animate |
||||
|
attributeName="opacity" |
||||
|
dur="1s" |
||||
|
values="0;1;0" |
||||
|
repeatCount="indefinite" |
||||
|
begin="0.3"/> |
||||
|
</circle> |
||||
|
</svg> |
||||
|
|
||||
|
<!-- Loader 5 --> |
||||
|
|
||||
|
<svg version="1.1" id="L5" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" |
||||
|
viewBox="0 0 100 100" enable-background="new 0 0 0 0" xml:space="preserve"> |
||||
|
<circle fill="#fff" stroke="none" cx="6" cy="50" r="6"> |
||||
|
<animateTransform |
||||
|
attributeName="transform" |
||||
|
dur="1s" |
||||
|
type="translate" |
||||
|
values="0 15 ; 0 -15; 0 15" |
||||
|
repeatCount="indefinite" |
||||
|
begin="0.1"/> |
||||
|
</circle> |
||||
|
<circle fill="#fff" stroke="none" cx="30" cy="50" r="6"> |
||||
|
<animateTransform |
||||
|
attributeName="transform" |
||||
|
dur="1s" |
||||
|
type="translate" |
||||
|
values="0 10 ; 0 -10; 0 10" |
||||
|
repeatCount="indefinite" |
||||
|
begin="0.2"/> |
||||
|
</circle> |
||||
|
<circle fill="#fff" stroke="none" cx="54" cy="50" r="6"> |
||||
|
<animateTransform |
||||
|
attributeName="transform" |
||||
|
dur="1s" |
||||
|
type="translate" |
||||
|
values="0 5 ; 0 -5; 0 5" |
||||
|
repeatCount="indefinite" |
||||
|
begin="0.3"/> |
||||
|
</circle> |
||||
|
</svg> |
||||
|
|
||||
|
|
||||
|
<!-- Loader 6 --> |
||||
|
|
||||
|
<svg version="1.1" id="L6" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" |
||||
|
viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve"> |
||||
|
<rect fill="none" stroke="#fff" stroke-width="4" x="25" y="25" width="50" height="50"> |
||||
|
<animateTransform |
||||
|
attributeName="transform" |
||||
|
dur="0.5s" |
||||
|
from="0 50 50" |
||||
|
to="180 50 50" |
||||
|
type="rotate" |
||||
|
id="strokeBox" |
||||
|
attributeType="XML" |
||||
|
begin="rectBox.end"/> |
||||
|
</rect> |
||||
|
<rect x="27" y="27" fill="#fff" width="46" height="50"> |
||||
|
<animate |
||||
|
attributeName="height" |
||||
|
dur="1.3s" |
||||
|
attributeType="XML" |
||||
|
from="50" |
||||
|
to="0" |
||||
|
id="rectBox" |
||||
|
fill="freeze" |
||||
|
begin="0s;strokeBox.end"/> |
||||
|
</rect> |
||||
|
</svg> |
||||
|
|
||||
|
<!-- Loader 7 --> |
||||
|
|
||||
|
<svg version="1.1" id="L7" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" |
||||
|
viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve"> |
||||
|
<path fill="#fff" d="M31.6,3.5C5.9,13.6-6.6,42.7,3.5,68.4c10.1,25.7,39.2,38.3,64.9,28.1l-3.1-7.9c-21.3,8.4-45.4-2-53.8-23.3 |
||||
|
c-8.4-21.3,2-45.4,23.3-53.8L31.6,3.5z"> |
||||
|
<animateTransform |
||||
|
attributeName="transform" |
||||
|
attributeType="XML" |
||||
|
type="rotate" |
||||
|
dur="2s" |
||||
|
from="0 50 50" |
||||
|
to="360 50 50" |
||||
|
repeatCount="indefinite" /> |
||||
|
</path> |
||||
|
<path fill="#fff" d="M42.3,39.6c5.7-4.3,13.9-3.1,18.1,2.7c4.3,5.7,3.1,13.9-2.7,18.1l4.1,5.5c8.8-6.5,10.6-19,4.1-27.7 |
||||
|
c-6.5-8.8-19-10.6-27.7-4.1L42.3,39.6z"> |
||||
|
<animateTransform |
||||
|
attributeName="transform" |
||||
|
attributeType="XML" |
||||
|
type="rotate" |
||||
|
dur="1s" |
||||
|
from="0 50 50" |
||||
|
to="-360 50 50" |
||||
|
repeatCount="indefinite" /> |
||||
|
</path> |
||||
|
<path fill="#fff" d="M82,35.7C74.1,18,53.4,10.1,35.7,18S10.1,46.6,18,64.3l7.6-3.4c-6-13.5,0-29.3,13.5-35.3s29.3,0,35.3,13.5 |
||||
|
L82,35.7z"> |
||||
|
<animateTransform |
||||
|
attributeName="transform" |
||||
|
attributeType="XML" |
||||
|
type="rotate" |
||||
|
dur="2s" |
||||
|
from="0 50 50" |
||||
|
to="360 50 50" |
||||
|
repeatCount="indefinite" /> |
||||
|
</path> |
||||
|
</svg> |
||||
|
|
||||
|
<!-- Loader 8 --> |
||||
|
|
||||
|
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" |
||||
|
viewBox="0 0 100 100" enable-background="new 0 0 100 100" xml:space="preserve"> |
||||
|
<rect fill="#fff" width="3" height="100" transform="translate(0) rotate(180 3 50)"> |
||||
|
<animate |
||||
|
attributeName="height" |
||||
|
attributeType="XML" |
||||
|
dur="1s" |
||||
|
values="30; 100; 30" |
||||
|
repeatCount="indefinite"/> |
||||
|
</rect> |
||||
|
<rect x="17" fill="#fff" width="3" height="100" transform="translate(0) rotate(180 20 50)"> |
||||
|
<animate |
||||
|
attributeName="height" |
||||
|
attributeType="XML" |
||||
|
dur="1s" |
||||
|
values="30; 100; 30" |
||||
|
repeatCount="indefinite" |
||||
|
begin="0.1s"/> |
||||
|
</rect> |
||||
|
<rect x="40" fill="#fff" width="3" height="100" transform="translate(0) rotate(180 40 50)"> |
||||
|
<animate |
||||
|
attributeName="height" |
||||
|
attributeType="XML" |
||||
|
dur="1s" |
||||
|
values="30; 100; 30" |
||||
|
repeatCount="indefinite" |
||||
|
begin="0.3s"/> |
||||
|
</rect> |
||||
|
<rect x="60" fill="#fff" width="3" height="100" transform="translate(0) rotate(180 58 50)"> |
||||
|
<animate |
||||
|
attributeName="height" |
||||
|
attributeType="XML" |
||||
|
dur="1s" |
||||
|
values="30; 100; 30" |
||||
|
repeatCount="indefinite" |
||||
|
begin="0.5s"/> |
||||
|
</rect> |
||||
|
<rect x="80" fill="#fff" width="3" height="100" transform="translate(0) rotate(180 76 50)"> |
||||
|
<animate |
||||
|
attributeName="height" |
||||
|
attributeType="XML" |
||||
|
dur="1s" |
||||
|
values="30; 100; 30" |
||||
|
repeatCount="indefinite" |
||||
|
begin="0.1s"/> |
||||
|
</rect> |
||||
|
</svg> |
||||
|
|
||||
|
|
||||
|
<!-- Loader 9 --> |
||||
|
|
||||
|
<svg version="1.1" id="L9" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" |
||||
|
viewBox="0 0 100 100" enable-background="new 0 0 0 0" xml:space="preserve"> |
||||
|
<rect x="20" y="50" width="4" height="10" fill="#fff"> |
||||
|
<animateTransform attributeType="xml" |
||||
|
attributeName="transform" type="translate" |
||||
|
values="0 0; 0 20; 0 0" |
||||
|
begin="0" dur="0.6s" repeatCount="indefinite" /> |
||||
|
</rect> |
||||
|
<rect x="30" y="50" width="4" height="10" fill="#fff"> |
||||
|
<animateTransform attributeType="xml" |
||||
|
attributeName="transform" type="translate" |
||||
|
values="0 0; 0 20; 0 0" |
||||
|
begin="0.2s" dur="0.6s" repeatCount="indefinite" /> |
||||
|
</rect> |
||||
|
<rect x="40" y="50" width="4" height="10" fill="#fff"> |
||||
|
<animateTransform attributeType="xml" |
||||
|
attributeName="transform" type="translate" |
||||
|
values="0 0; 0 20; 0 0" |
||||
|
begin="0.4s" dur="0.6s" repeatCount="indefinite" /> |
||||
|
</rect> |
||||
|
</svg> |
||||
|
|
||||
|
|
||||
|
<!-- Loader 10 --> |
||||
|
|
||||
|
<svg version="1.1" id="L9" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" |
||||
|
viewBox="0 0 100 100" enable-background="new 0 0 0 0" xml:space="preserve"> |
||||
|
<path fill="#fff" d="M73,50c0-12.7-10.3-23-23-23S27,37.3,27,50 M30.9,50c0-10.5,8.5-19.1,19.1-19.1S69.1,39.5,69.1,50"> |
||||
|
<animateTransform |
||||
|
attributeName="transform" |
||||
|
attributeType="XML" |
||||
|
type="rotate" |
||||
|
dur="1s" |
||||
|
from="0 50 50" |
||||
|
to="360 50 50" |
||||
|
repeatCount="indefinite" /> |
||||
|
</path> |
||||
|
</svg> |
||||
|
|
||||
|
<!-- follow me template --> |
||||
|
<div class="made-with-love"> |
||||
|
Made with |
||||
|
<i>?</i> by |
||||
|
<a target="_blank" href="https://codepen.io/nikhil8krishnan">Nikhil Krishnan</a> |
||||
|
</div> |
||||
828
lib/javascript/jsapi_dynamic/mojo_dashboard.js
File diff suppressed because it is too large
View File
@ -0,0 +1,94 @@ |
|||||
|
//<?php require_once('../../js_asm.php'); ?>
|
||||
|
|
||||
|
|
||||
|
|
||||
|
function loadMetroControlUpper(){ |
||||
|
|
||||
|
Ext.Ajax.request({ |
||||
|
url: '/lib/controller/getMetroUpperSensorEditor.php', |
||||
|
params: { |
||||
|
UID: <?=$UserID;?>, |
||||
|
SID: '<?=$Session;?>' |
||||
|
}, |
||||
|
success: function( response, opts ){ |
||||
|
var data = Ext.decode( response.responseText ); |
||||
|
var tComp = Ext.getCmp('main_content'); |
||||
|
if( data.status == 'ok' ){ |
||||
|
if( tComp!= null ){ |
||||
|
var content = Ext.decode( data.content ); |
||||
|
tComp.removeAll( true ); |
||||
|
tComp.add( content ); |
||||
|
tComp.doLayout(); |
||||
|
}; |
||||
|
} else { |
||||
|
if( tComp!= null ){ |
||||
|
tComp.removeAll( true ); |
||||
|
tComp.add( data ); |
||||
|
tComp.doLayout(); |
||||
|
}; |
||||
|
}; |
||||
|
}, |
||||
|
failure: function(){ |
||||
|
} |
||||
|
}); |
||||
|
}; |
||||
|
|
||||
|
function loadMetroControlBottom(){ |
||||
|
Ext.Ajax.request({ |
||||
|
url: '/lib/controller/getMetroBottomSensorEditor.php', |
||||
|
params: { |
||||
|
UID: <?=$UserID;?>, |
||||
|
SID: '<?=$Session;?>' |
||||
|
}, |
||||
|
success: function( response, opts ){ |
||||
|
var data = Ext.decode( response.responseText ); |
||||
|
var tComp = Ext.getCmp('main_content'); |
||||
|
if( data.status == 'ok' ){ |
||||
|
if( tComp!= null ){ |
||||
|
var content = Ext.decode( data.content ); |
||||
|
tComp.removeAll( true ); |
||||
|
tComp.add( content ); |
||||
|
tComp.doLayout(); |
||||
|
}; |
||||
|
} else { |
||||
|
if( tComp!= null ){ |
||||
|
tComp.removeAll( true ); |
||||
|
tComp.add( data ); |
||||
|
tComp.doLayout(); |
||||
|
}; |
||||
|
}; |
||||
|
}, |
||||
|
failure: function(){ |
||||
|
} |
||||
|
}); |
||||
|
}; |
||||
|
|
||||
|
function loadMetroControlFusion(){ |
||||
|
Ext.Ajax.request({ |
||||
|
url: '/lib/controller/getMetroFusionEditor.php', |
||||
|
params: { |
||||
|
UID: <?=$UserID;?>, |
||||
|
SID: '<?=$Session;?>' |
||||
|
}, |
||||
|
success: function( response, opts ){ |
||||
|
var data = Ext.decode( response.responseText ); |
||||
|
var tComp = Ext.getCmp('main_content'); |
||||
|
if( data.status == 'ok' ){ |
||||
|
if( tComp!= null ){ |
||||
|
var content = Ext.decode( data.content ); |
||||
|
tComp.removeAll( true ); |
||||
|
tComp.add( content ); |
||||
|
tComp.doLayout(); |
||||
|
}; |
||||
|
} else { |
||||
|
if( tComp!= null ){ |
||||
|
tComp.removeAll( true ); |
||||
|
tComp.add( data ); |
||||
|
tComp.doLayout(); |
||||
|
}; |
||||
|
}; |
||||
|
}, |
||||
|
failure: function(){ |
||||
|
} |
||||
|
}); |
||||
|
}; |
||||
@ -0,0 +1,649 @@ |
|||||
|
//<?php require_once('../../js_asm.php'); ?>
|
||||
|
|
||||
|
var um_user_list_store = new Ext.data.JsonStore({ |
||||
|
root: 'users', |
||||
|
totalProperty: 'totalCount', |
||||
|
idProperty: 'id', |
||||
|
remoteSort: true, |
||||
|
fields: [{ |
||||
|
name: 'id', |
||||
|
type: 'int' |
||||
|
},{ |
||||
|
name: 'status', |
||||
|
type: 'string' |
||||
|
},{ |
||||
|
name: 'login', |
||||
|
type: 'string' |
||||
|
},{ |
||||
|
name: 'created', |
||||
|
type: 'string' |
||||
|
},{ |
||||
|
name: 'last', |
||||
|
type: 'string' |
||||
|
},{ |
||||
|
name: 'access', |
||||
|
type: 'int' |
||||
|
},{ |
||||
|
name: 'lang', |
||||
|
type: 'int' |
||||
|
},{ |
||||
|
name: 'site', |
||||
|
type: 'int' |
||||
|
}], |
||||
|
proxy : new Ext.data.HttpProxy({ |
||||
|
method: 'POST', |
||||
|
prettyUrls: false, |
||||
|
url: '/lib/controller/listUsers.php', |
||||
|
headers: { |
||||
|
UID: <?=$UserID;?>, |
||||
|
SID: '<?=$Session;?>' |
||||
|
} |
||||
|
}) |
||||
|
}); |
||||
|
|
||||
|
var um_selected_user_id = 0; |
||||
|
var um_user_locked = false; |
||||
|
|
||||
|
var um_add_user_window = null; |
||||
|
var um_edit_user_window = null; |
||||
|
|
||||
|
function um_user_access_renderer( val ){ |
||||
|
if( val == 0 ){ |
||||
|
return '<?=$Labels->GetLabel("_GUEST_");?>'; |
||||
|
} else { |
||||
|
if( val < 6 ){ |
||||
|
return '<?=$Labels->GetLabel("_REGULAR_");?>'; |
||||
|
} else { |
||||
|
if( val == 10 ){ |
||||
|
return '<?=$Labels->GetLabel("_FOUNDER_");?>'; |
||||
|
} else { |
||||
|
return '<?=$Labels->GetLabel("_ADMIN_");?>'; |
||||
|
}; |
||||
|
}; |
||||
|
}; |
||||
|
}; |
||||
|
|
||||
|
function um_user_status_renderer( val ){ |
||||
|
switch( val ){ |
||||
|
case 'D': return '<img alt="Disabled" src="/style/icons/icons/status_busy.png">'; |
||||
|
case 'A': return '<img alt="Active" src="/style/icons/icons/status_online.png">'; |
||||
|
}; |
||||
|
return '<img alt="Blocked" src="/style/icons/icons/status_offline.png">'; |
||||
|
}; |
||||
|
|
||||
|
var um_user_list_col_model_opt = { |
||||
|
columns: [ |
||||
|
{header: "id", width: 50, sortable: false, menuDisabled: true, align: 'center', fixed: true, css: 'vertical-align: middle;', dataIndex: 'id' }, |
||||
|
{header: "<?=$Labels->GetLabel("_STATUS_");?>", width: 80, sortable: false, renderer: um_user_status_renderer, fixed: true, menuDisabled: true, align: 'center', css: 'vertical-align: middle;', dataIndex: 'status' }, |
||||
|
{header: "<?=$Labels->GetLabel("_LOGIN_");?>", width: 80, sortable: false, fixed: true, menuDisabled: true, /*renderer: camCapRenderer,*/ dataIndex: 'login' }, |
||||
|
{header: "<?=$Labels->GetLabel("_CREATED_");?>", width: 150, sortable: false, renderer: unix_ts_renderer, menuDisabled: true, align: 'left', css: 'vertical-align: middle;', dataIndex: 'created' }, |
||||
|
{header: "<?=$Labels->GetLabel("_LAST_ACCESS_");?>", width: 150, sortable: false, renderer: unix_ts_renderer, fixed: true, menuDisabled: true, align: 'left', css: 'vertical-align: middle;', dataIndex: 'last' }, |
||||
|
{header: "<?=$Labels->GetLabel("_TYPE_");?>", width: 100, sortable: false, renderer: um_user_access_renderer, dataIndex: 'access' }, |
||||
|
{header: "<?=$Labels->GetLabel("_INFO_");?>", width: 200, sortable: false, dataindex: 'data' } |
||||
|
], |
||||
|
defaults: { |
||||
|
sortable: true, |
||||
|
menuDisabled: true, |
||||
|
width: 100 |
||||
|
}, |
||||
|
listeners: { |
||||
|
hiddenchange: function(cm, colIndex, hidden) { |
||||
|
//saveConfig(colIndex, hidden);
|
||||
|
} |
||||
|
} |
||||
|
}; |
||||
|
|
||||
|
var um_user_list_sel_model_opt = { |
||||
|
singleSelect: true, |
||||
|
listeners: { |
||||
|
rowselect: function( sm, row, rec ) { |
||||
|
um_selected_user_id = rec.data.id; |
||||
|
if ( rec.data.status == 'A' ){ |
||||
|
Ext.getCmp('um_lock_user_btn').setText('<?=$Labels->GetLabel("_LOCK_USER_");?>'); |
||||
|
um_user_locked = false; |
||||
|
} else { |
||||
|
Ext.getCmp('um_lock_user_btn').setText('<?=$Labels->GetLabel("_UNLOCK_USER_");?>'); |
||||
|
um_user_locked = true; |
||||
|
}; |
||||
|
if( um_selected_user_id == 1 || rec.data.access == 10 ){ |
||||
|
Ext.getCmp('um_del_user_btn').disable(); |
||||
|
Ext.getCmp('um_lock_user_btn').disable(); |
||||
|
} else { |
||||
|
Ext.getCmp('um_del_user_btn').enable(); |
||||
|
Ext.getCmp('um_lock_user_btn').enable(); |
||||
|
}; |
||||
|
if( um_selected_user_id == 1 ){ |
||||
|
Ext.getCmp('um_edit_user_btn').disable(); |
||||
|
} else { |
||||
|
Ext.getCmp('um_edit_user_btn').enable(); |
||||
|
}; |
||||
|
} |
||||
|
} |
||||
|
}; |
||||
|
function addNewUser(){ |
||||
|
if( um_add_user_window == null ){ |
||||
|
um_add_user_window = new Ext.Window({ |
||||
|
modal: true, |
||||
|
title: '<?=$Labels->GetLabel("_EDIT_USER_CRACCES_");?>', |
||||
|
width: 400, |
||||
|
height: 250, |
||||
|
layout: 'fit', |
||||
|
closeAction: 'hide', |
||||
|
listeners:{ |
||||
|
beforehide : function(){ |
||||
|
//Ext.getCmp('connectstarterbutton').toggle( false, false );
|
||||
|
} |
||||
|
}, |
||||
|
items:[{ |
||||
|
layout: 'table', |
||||
|
border: false, |
||||
|
defaults: { |
||||
|
// applied to each contained panel
|
||||
|
bodyStyle:'padding-top:10px;padding-left:20px;padding-right:20px;padding-bottom:10px;' |
||||
|
}, |
||||
|
layoutConfig: { |
||||
|
// The total column count must be specified here
|
||||
|
columns: 2 |
||||
|
}, |
||||
|
items: [{ |
||||
|
border: false, |
||||
|
html: 'User Login:' |
||||
|
},{ |
||||
|
xtype: 'textfield', |
||||
|
id: 'um_ua_login', |
||||
|
width: 200 |
||||
|
},{ |
||||
|
border: false, |
||||
|
html: 'New Password:' |
||||
|
},{ |
||||
|
xtype: 'textfield', |
||||
|
id: 'um_ua_pwd1', |
||||
|
inputType: 'password', |
||||
|
width: 200 |
||||
|
},{ |
||||
|
border: false, |
||||
|
html: 'Repeate Password:' |
||||
|
},{ |
||||
|
xtype: 'textfield', |
||||
|
id: 'um_ua_pwd2', |
||||
|
inputType: 'password', |
||||
|
width: 200 |
||||
|
},{ |
||||
|
border: false, |
||||
|
html: 'Access Level:' |
||||
|
},{ |
||||
|
xtype: 'combo', |
||||
|
id: 'um_ua_access', |
||||
|
editable: false, |
||||
|
typeAhead: true, |
||||
|
triggerAction: 'all', |
||||
|
width: 200, |
||||
|
lazyRender:true, |
||||
|
mode: 'local', |
||||
|
value: 2, |
||||
|
store: new Ext.data.ArrayStore({ |
||||
|
id: 0, |
||||
|
fields: ['acc_lvl', 'displayText' ], |
||||
|
data: [[2,'Minimal Access'],[4,'Operator'],[6,'Admin']] |
||||
|
}), |
||||
|
valueField: 'acc_lvl', |
||||
|
displayField: 'displayText' |
||||
|
}] |
||||
|
}], |
||||
|
bbar: [ '->',{ |
||||
|
text: '<?=$Labels->GetLabel("_CANCEL_");?>', |
||||
|
handler: function(){ |
||||
|
um_add_user_window.hide(); |
||||
|
} |
||||
|
},{ |
||||
|
text: '<?=$Labels->GetLabel("_SAVE_");?>', |
||||
|
handler: function(){ |
||||
|
var lo = Ext.getCmp('um_ua_login').getValue(); |
||||
|
var pwd = Ext.getCmp('um_ua_pwd1').getValue(); |
||||
|
var rwd = Ext.getCmp('um_ua_pwd2').getValue(); |
||||
|
var acc = Ext.getCmp('um_ua_access').getValue(); |
||||
|
var sbt = true; |
||||
|
if( acc > my_access ){ |
||||
|
sbt = false; |
||||
|
Ext.Msg.show({ |
||||
|
title:'<?=$Labels->GetLabel("_ERROR_MSG_");?>', |
||||
|
msg: 'You Can not add more privileged user!', |
||||
|
buttons: Ext.Msg.OK, |
||||
|
icon: Ext.MessageBox.ERROR //QUESTION
|
||||
|
}); |
||||
|
}; |
||||
|
if( sbt && pwd!=''){ |
||||
|
if( pwd != rwd ){ |
||||
|
sbt = false; |
||||
|
Ext.Msg.show({ |
||||
|
title:'<?=$Labels->GetLabel("_ERROR_MSG_");?>', |
||||
|
msg: 'Passwords don\'t match!', |
||||
|
buttons: Ext.Msg.OK, |
||||
|
icon: Ext.MessageBox.ERROR //QUESTION
|
||||
|
}); |
||||
|
}; |
||||
|
} else { |
||||
|
sbt = false; |
||||
|
Ext.Msg.show({ |
||||
|
title:'<?=$Labels->GetLabel("_ERROR_MSG_");?>', |
||||
|
msg: 'You Can not Add User Without Password!', |
||||
|
buttons: Ext.Msg.OK, |
||||
|
icon: Ext.MessageBox.ERROR //QUESTION
|
||||
|
}); |
||||
|
}; |
||||
|
if( sbt && lo == '' ){ |
||||
|
sbt = false; |
||||
|
Ext.Msg.show({ |
||||
|
title:'<?=$Labels->GetLabel("_ERROR_MSG_");?>', |
||||
|
msg: 'You Can not Add User Without Login!', |
||||
|
buttons: Ext.Msg.OK, |
||||
|
icon: Ext.MessageBox.ERROR //QUESTION
|
||||
|
}); |
||||
|
}; |
||||
|
if( sbt ){ |
||||
|
Ext.Ajax.request({ |
||||
|
url: '/lib/controller/updateUser.php', |
||||
|
params: { |
||||
|
OP: 0, |
||||
|
UID: <?=$UserID;?>, |
||||
|
SID: '<?=$Session;?>', |
||||
|
NLO: lo, |
||||
|
PW1: pwd, |
||||
|
PW2: rwd, |
||||
|
ACC: acc |
||||
|
}, |
||||
|
success: function( response, opts ){ |
||||
|
// If the response is JSON, you have to decode it
|
||||
|
var data = Ext.decode(response.responseText); |
||||
|
if( data.success == true ) { |
||||
|
Ext.Msg.show({ |
||||
|
title:'<?=$Labels->GetLabel("_INFO_MSG_");?>', |
||||
|
msg: '<?=$Labels->GetLabel("_SETTING_SAVE_OK_");?>', |
||||
|
buttons: Ext.Msg.OK,//YESNOCANCEL,
|
||||
|
fn: function(){ |
||||
|
um_user_list_store.reload(); |
||||
|
um_add_user_window.hide(); |
||||
|
}, |
||||
|
//animEl: 'elId',
|
||||
|
icon: Ext.MessageBox.INFO //QUESTION
|
||||
|
}); |
||||
|
} else { |
||||
|
Ext.Msg.show({ |
||||
|
title:'<?=$Labels->GetLabel("_ERROR_MSG_");?>', |
||||
|
msg: data['error'], |
||||
|
buttons: Ext.Msg.OK,//YESNOCANCEL,
|
||||
|
fn: function(){ |
||||
|
um_add_user_window.hide(); |
||||
|
}, |
||||
|
//animEl: 'elId',
|
||||
|
icon: Ext.MessageBox.ERROR //QUESTION
|
||||
|
}); |
||||
|
}; |
||||
|
}, |
||||
|
failure: failureAJAXFunction |
||||
|
}); |
||||
|
}; |
||||
|
} |
||||
|
}] |
||||
|
}); |
||||
|
}; |
||||
|
um_add_user_window.show(); |
||||
|
Ext.getCmp('um_ua_login').setValue( '' ); |
||||
|
Ext.getCmp('um_ua_pwd1').setValue( '' ); |
||||
|
Ext.getCmp('um_ua_pwd2').setValue( '' ); |
||||
|
Ext.getCmp('um_ua_access').setValue( 2 ); |
||||
|
}; |
||||
|
|
||||
|
function doUserOperation( op ){ |
||||
|
if( um_selected_user_id < 1 ) return; |
||||
|
Ext.Ajax.request({ |
||||
|
url: '/lib/controller/updateUser.php', |
||||
|
params: { |
||||
|
OP: op, |
||||
|
UID: <?=$UserID;?>, |
||||
|
SID: '<?=$Session;?>', |
||||
|
SUID: um_selected_user_id |
||||
|
}, |
||||
|
success: function( response, opts ){ |
||||
|
// If the response is JSON, you have to decode it
|
||||
|
var data = Ext.decode(response.responseText); |
||||
|
if( data.success == true ) { |
||||
|
Ext.Msg.show({ |
||||
|
title:'<?=$Labels->GetLabel("_INFO_MSG_");?>', |
||||
|
msg: '<?=$Labels->GetLabel("_SETTING_SAVE_OK_");?>', |
||||
|
buttons: Ext.Msg.OK,//YESNOCANCEL,
|
||||
|
fn: function(){ |
||||
|
um_user_list_store.reload(); |
||||
|
}, |
||||
|
//animEl: 'elId',
|
||||
|
icon: Ext.MessageBox.INFO //QUESTION
|
||||
|
}); |
||||
|
} else { |
||||
|
Ext.Msg.show({ |
||||
|
title:'<?=$Labels->GetLabel("_ERROR_MSG_");?>', |
||||
|
msg: data.msg, |
||||
|
buttons: Ext.Msg.OK,//YESNOCANCEL,
|
||||
|
//animEl: 'elId',
|
||||
|
icon: Ext.MessageBox.ERROR //QUESTION
|
||||
|
}); |
||||
|
}; |
||||
|
}, |
||||
|
failure: failureAJAXFunction |
||||
|
}); |
||||
|
}; |
||||
|
|
||||
|
function editSelectedUser(){ |
||||
|
if( um_edit_user_window == null ){ |
||||
|
um_edit_user_window = new Ext.Window({ |
||||
|
modal: true, |
||||
|
title: '<?=$Labels->GetLabel("_EDIT_USER_CRACCES_");?>', |
||||
|
width: 400, |
||||
|
height: 250, |
||||
|
layout: 'fit', |
||||
|
closeAction: 'hide', |
||||
|
listeners:{ |
||||
|
beforehide : function(){ |
||||
|
//Ext.getCmp('connectstarterbutton').toggle( false, false );
|
||||
|
} |
||||
|
}, |
||||
|
items:[{ |
||||
|
layout: 'table', |
||||
|
border: false, |
||||
|
defaults: { |
||||
|
// applied to each contained panel
|
||||
|
bodyStyle:'padding-top:10px;padding-left:20px;padding-right:20px;padding-bottom:10px;' |
||||
|
}, |
||||
|
layoutConfig: { |
||||
|
// The total column count must be specified here
|
||||
|
columns: 2 |
||||
|
}, |
||||
|
items: [{ |
||||
|
border: false, |
||||
|
html: 'User Login:' |
||||
|
},{ |
||||
|
xtype: 'textfield', |
||||
|
id: 'um_ue_login', |
||||
|
width: 200 |
||||
|
},{ |
||||
|
border: false, |
||||
|
html: 'New Password:' |
||||
|
},{ |
||||
|
xtype: 'textfield', |
||||
|
id: 'um_ue_pwd1', |
||||
|
inputType: 'password', |
||||
|
width: 200 |
||||
|
},{ |
||||
|
border: false, |
||||
|
html: 'Repeate Password:' |
||||
|
},{ |
||||
|
xtype: 'textfield', |
||||
|
id: 'um_ue_pwd2', |
||||
|
inputType: 'password', |
||||
|
width: 200 |
||||
|
},{ |
||||
|
border: false, |
||||
|
html: 'Access Level:' |
||||
|
},{ |
||||
|
xtype: 'combo', |
||||
|
id: 'um_ue_access', |
||||
|
editable: false, |
||||
|
typeAhead: true, |
||||
|
triggerAction: 'all', |
||||
|
width: 200, |
||||
|
lazyRender:true, |
||||
|
mode: 'local', |
||||
|
value: 2, |
||||
|
store: new Ext.data.ArrayStore({ |
||||
|
id: 0, |
||||
|
fields: ['acc_lvl', 'displayText' ], |
||||
|
data: [[2,'Minimal Access'],[4,'Operator'],[6,'Admin'],[10,'Factory Defined']] |
||||
|
}), |
||||
|
valueField: 'acc_lvl', |
||||
|
displayField: 'displayText' |
||||
|
}] |
||||
|
}], |
||||
|
bbar: [ '->',{ |
||||
|
text: '<?=$Labels->GetLabel("_CANCEL_");?>', |
||||
|
handler: function(){ |
||||
|
um_edit_user_window.hide(); |
||||
|
} |
||||
|
},{ |
||||
|
text: '<?=$Labels->GetLabel("_SAVE_");?>', |
||||
|
handler: function(){ |
||||
|
var aid = um_user_list_store.find( 'id', um_selected_user_id ); |
||||
|
var r = um_user_list_store.getAt( aid ); |
||||
|
var lo = Ext.getCmp('um_ue_login').getValue(); |
||||
|
var pwd = Ext.getCmp('um_ue_pwd1').getValue(); |
||||
|
var rwd = Ext.getCmp('um_ue_pwd2').getValue(); |
||||
|
var acc = Ext.getCmp('um_ue_access').getValue(); |
||||
|
var olo = r.data.login; |
||||
|
var oacc = r.data.access; |
||||
|
var sbt = true; |
||||
|
if( oacc > my_access ){ |
||||
|
sbt = false; |
||||
|
Ext.Msg.show({ |
||||
|
title:'<?=$Labels->GetLabel("_ERROR_MSG_");?>', |
||||
|
msg: 'You Can not change settings of more privileged user!', |
||||
|
buttons: Ext.Msg.OK, |
||||
|
icon: Ext.MessageBox.ERROR |
||||
|
}); |
||||
|
}; |
||||
|
if( sbt && oacc != acc ){ |
||||
|
if( acc > my_access ){ |
||||
|
sbt = false; |
||||
|
Ext.Msg.show({ |
||||
|
title:'<?=$Labels->GetLabel("_ERROR_MSG_");?>', |
||||
|
msg: 'You Can not change access level to more privileged user then you are!', |
||||
|
buttons: Ext.Msg.OK, |
||||
|
icon: Ext.MessageBox.ERROR |
||||
|
}); |
||||
|
} else { |
||||
|
if( acc == 10 ){ |
||||
|
sbt = false; |
||||
|
Ext.Msg.show({ |
||||
|
title:'<?=$Labels->GetLabel("_ERROR_MSG_");?>', |
||||
|
msg: 'You Can not change access level to Factory Defined Master!', |
||||
|
buttons: Ext.Msg.OK, |
||||
|
icon: Ext.MessageBox.ERROR |
||||
|
}); |
||||
|
}; |
||||
|
}; |
||||
|
}; |
||||
|
if( sbt && pwd!=''){ |
||||
|
if( pwd != rwd ){ |
||||
|
sbt = false; |
||||
|
Ext.Msg.show({ |
||||
|
title:'<?=$Labels->GetLabel("_ERROR_MSG_");?>', |
||||
|
msg: 'Passwords does not match!', |
||||
|
buttons: Ext.Msg.OK, |
||||
|
icon: Ext.MessageBox.ERROR |
||||
|
}); |
||||
|
}; |
||||
|
}; |
||||
|
if( sbt && olo != lo ){ |
||||
|
sbt = false; |
||||
|
Ext.Msg.show({ |
||||
|
title:'<?=$Labels->GetLabel("_QERY_MSG_");?>', |
||||
|
msg: 'Are you sure to change Login User Name?', |
||||
|
buttons: Ext.Msg.YESNOCANCEL, |
||||
|
fn: function( a ){ |
||||
|
if( a == 'yes' ){ |
||||
|
Ext.Ajax.request({ |
||||
|
url: '/lib/controller/updateUser.php', |
||||
|
params: { |
||||
|
OP: 1, |
||||
|
SUID: um_selected_user_id, |
||||
|
UID: <?=$UserID;?>, |
||||
|
SID: '<?=$Session;?>', |
||||
|
NLO: lo, |
||||
|
OLO: olo, |
||||
|
PW1: pwd, |
||||
|
PW2: rwd, |
||||
|
ACC: acc |
||||
|
}, |
||||
|
success: function( response, opts ){ |
||||
|
var data = Ext.decode(response.responseText); |
||||
|
if( data.success == true ) { |
||||
|
Ext.Msg.show({ |
||||
|
title:'<?=$Labels->GetLabel("_INFO_MSG_");?>', |
||||
|
msg: '<?=$Labels->GetLabel("_SETTING_SAVE_OK_");?>', |
||||
|
buttons: Ext.Msg.OK,//YESNOCANCEL,
|
||||
|
fn: function(){ |
||||
|
um_user_list_store.reload(); |
||||
|
um_edit_user_window.hide(); |
||||
|
}, |
||||
|
//animEl: 'elId',
|
||||
|
icon: Ext.MessageBox.INFO //QUESTION
|
||||
|
}); |
||||
|
} else { |
||||
|
Ext.Msg.show({ |
||||
|
title:'<?=$Labels->GetLabel("_ERROR_MSG_");?>', |
||||
|
msg: data['error'], |
||||
|
buttons: Ext.Msg.OK,//YESNOCANCEL,
|
||||
|
fn: function(){ |
||||
|
um_edit_user_window.hide(); |
||||
|
}, |
||||
|
//animEl: 'elId',
|
||||
|
icon: Ext.MessageBox.ERROR //QUESTION
|
||||
|
}); |
||||
|
}; |
||||
|
}, |
||||
|
failure: failureAJAXFunction |
||||
|
}); |
||||
|
}; |
||||
|
}, |
||||
|
icon: Ext.MessageBox.QUESTION |
||||
|
}); |
||||
|
}; |
||||
|
if( sbt ){ |
||||
|
Ext.Ajax.request({ |
||||
|
url: '/lib/controller/updateUser.php', |
||||
|
params: { |
||||
|
OP: 1, |
||||
|
SUID: um_selected_user_id, |
||||
|
UID: <?=$UserID;?>, |
||||
|
SID: '<?=$Session;?>', |
||||
|
NLO: lo, |
||||
|
OLO: olo, |
||||
|
PW1: pwd, |
||||
|
PW2: rwd, |
||||
|
ACC: acc |
||||
|
}, |
||||
|
success: function( response, opts ){ |
||||
|
// If the response is JSON, you have to decode it
|
||||
|
var data = Ext.decode(response.responseText); |
||||
|
if( data.success == true ) { |
||||
|
Ext.Msg.show({ |
||||
|
title:'<?=$Labels->GetLabel("_INFO_MSG_");?>', |
||||
|
msg: '<?=$Labels->GetLabel("_SETTING_SAVE_OK_");?>', |
||||
|
buttons: Ext.Msg.OK,//YESNOCANCEL,
|
||||
|
fn: function(){ |
||||
|
//SettingsLidar3D.hide();
|
||||
|
um_user_list_store.reload(); |
||||
|
um_edit_user_window.hide(); |
||||
|
}, |
||||
|
//animEl: 'elId',
|
||||
|
icon: Ext.MessageBox.INFO //QUESTION
|
||||
|
}); |
||||
|
} else { |
||||
|
Ext.Msg.show({ |
||||
|
title:'<?=$Labels->GetLabel("_ERROR_MSG_");?>', |
||||
|
msg: data['error'], |
||||
|
buttons: Ext.Msg.OK,//YESNOCANCEL,
|
||||
|
fn: function(){ |
||||
|
um_edit_user_window.hide(); |
||||
|
}, |
||||
|
//animEl: 'elId',
|
||||
|
icon: Ext.MessageBox.ERROR //QUESTION
|
||||
|
}); |
||||
|
}; |
||||
|
}, |
||||
|
failure: failureAJAXFunction |
||||
|
}); |
||||
|
}; |
||||
|
} |
||||
|
}] |
||||
|
}); |
||||
|
}; |
||||
|
um_edit_user_window.show(); |
||||
|
var aid = um_user_list_store.find( 'id', um_selected_user_id ); |
||||
|
var r = um_user_list_store.getAt( aid ); |
||||
|
Ext.getCmp('um_ue_login').setValue( r.data.login ); |
||||
|
Ext.getCmp('um_ue_access').setValue( r.data.access ); |
||||
|
if( r.data.access == 10 ){ |
||||
|
Ext.getCmp('um_ue_access').disable(); |
||||
|
} else { |
||||
|
Ext.getCmp('um_ue_access').enable(); |
||||
|
}; |
||||
|
}; |
||||
|
|
||||
|
function loadUserEditor(){ |
||||
|
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("_USERS_MNGMT_");?>' ); |
||||
|
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', |
||||
|
ds: um_user_list_store, |
||||
|
cm: new Ext.grid.ColumnModel( um_user_list_col_model_opt ), |
||||
|
sm: new Ext.grid.RowSelectionModel( um_user_list_sel_model_opt ) |
||||
|
}, |
||||
|
tbar: [{ |
||||
|
xtype: 'button', |
||||
|
id: 'um_add_user_btn', |
||||
|
text: '<?=$Labels->GetLabel("_ADD_USER_");?>', |
||||
|
handler: addNewUser |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
id: 'um_edit_user_btn', |
||||
|
text: '<?=$Labels->GetLabel("_EDIT_USER_");?>', |
||||
|
disabled: true, |
||||
|
handler: editSelectedUser |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
id: 'um_lock_user_btn', |
||||
|
text: '<?=$Labels->GetLabel("_LOCK_USER_");?>', |
||||
|
disabled: true, |
||||
|
handler: function(){ |
||||
|
if( um_user_locked ){ |
||||
|
doUserOperation( 3 ); |
||||
|
} else { |
||||
|
doUserOperation( 2 ); |
||||
|
}; |
||||
|
} |
||||
|
},{ |
||||
|
xtype: 'button', |
||||
|
id: 'um_del_user_btn', |
||||
|
text: '<?=$Labels->GetLabel("_DEL_USER_");?>', |
||||
|
disabled: true, |
||||
|
handler: function(){ |
||||
|
doUserOperation( 4 ); |
||||
|
} |
||||
|
}] |
||||
|
}] |
||||
|
}); |
||||
|
tPanel.doLayout(); |
||||
|
um_selected_user_id = 0; |
||||
|
um_user_list_store.reload(); |
||||
|
}; |
||||
@ -1,171 +0,0 @@ |
|||||
//<?php require_once('../../js_asm.php'); ?>
|
|
||||
|
|
||||
var um_user_list_store = new Ext.data.JsonStore({ |
|
||||
root: 'users', |
|
||||
totalProperty: 'totalCount', |
|
||||
idProperty: 'id', |
|
||||
remoteSort: true, |
|
||||
fields: [{ |
|
||||
name: 'id', |
|
||||
type: 'int' |
|
||||
},{ |
|
||||
name: 'status', |
|
||||
type: 'string' |
|
||||
},{ |
|
||||
name: 'login', |
|
||||
type: 'string' |
|
||||
},{ |
|
||||
name: 'created', |
|
||||
type: 'string' |
|
||||
},{ |
|
||||
name: 'last', |
|
||||
type: 'string' |
|
||||
},{ |
|
||||
name: 'access', |
|
||||
type: 'int' |
|
||||
},{ |
|
||||
name: 'lang', |
|
||||
type: 'int' |
|
||||
},{ |
|
||||
name: 'site', |
|
||||
type: 'int' |
|
||||
}], |
|
||||
proxy : new Ext.data.HttpProxy({ |
|
||||
method: 'POST', |
|
||||
prettyUrls: false, |
|
||||
url: '/lib/controller/listUsers.php', |
|
||||
headers: { |
|
||||
UID: <?=$UserID;?>, |
|
||||
SID: '<?=$Session;?>' |
|
||||
} |
|
||||
}) |
|
||||
}); |
|
||||
|
|
||||
var um_selected_user_id = 0; |
|
||||
|
|
||||
var um_add_user_window = null; |
|
||||
var um_edit_user_window = null; |
|
||||
|
|
||||
function um_user_access_renderer( val ){ |
|
||||
if( val == 0 ){ |
|
||||
return '<?=$Labels->GetLabel("_GUEST_");?>'; |
|
||||
} else { |
|
||||
if( val < 6 ){ |
|
||||
return '<?=$Labels->GetLabel("_REGULAR_");?>'; |
|
||||
} else { |
|
||||
if( val == 10 ){ |
|
||||
return '<?=$Labels->GetLabel("_FOUNDER_");?>'; |
|
||||
} else { |
|
||||
return '<?=$Labels->GetLabel("_ADMIN_");?>'; |
|
||||
}; |
|
||||
}; |
|
||||
}; |
|
||||
}; |
|
||||
|
|
||||
var um_user_list_col_model_opt = { |
|
||||
columns: [ |
|
||||
{header: "id", width: 50, sortable: false, menuDisabled: true, align: 'center', fixed: true, css: 'vertical-align: middle;', dataIndex: 'id' }, |
|
||||
{header: "<?=$Labels->GetLabel("_STATUS_");?>", width: 80, sortable: false, fixed: true, menuDisabled: true, align: 'center', css: 'vertical-align: middle;', dataIndex: 'status' }, |
|
||||
{header: "<?=$Labels->GetLabel("_LOGIN_");?>", width: 80, sortable: false, fixed: true, menuDisabled: true, /*renderer: camCapRenderer,*/ dataIndex: 'login' }, |
|
||||
{header: "<?=$Labels->GetLabel("_CREATED_");?>", width: 150, sortable: false, menuDisabled: true, align: 'left', css: 'vertical-align: middle;', dataIndex: 'created' }, |
|
||||
{header: "<?=$Labels->GetLabel("_LAST_ACCESS_");?>", width: 150, sortable: false, fixed: true, menuDisabled: true, align: 'left', css: 'vertical-align: middle;', dataIndex: 'last' }, |
|
||||
{header: "<?=$Labels->GetLabel("_TYPE_");?>", width: 100, sortable: false, renderer: um_user_access_renderer, dataIndex: 'access' }, |
|
||||
{header: "<?=$Labels->GetLabel("_INFO_");?>", width: 200, sortable: false, dataindex: 'data' } |
|
||||
], |
|
||||
defaults: { |
|
||||
sortable: true, |
|
||||
menuDisabled: true, |
|
||||
width: 100 |
|
||||
}, |
|
||||
listeners: { |
|
||||
hiddenchange: function(cm, colIndex, hidden) { |
|
||||
//saveConfig(colIndex, hidden);
|
|
||||
} |
|
||||
} |
|
||||
}; |
|
||||
|
|
||||
var um_user_list_sel_model_opt = { |
|
||||
singleSelect: true, |
|
||||
listeners: { |
|
||||
rowselect: function(sm, row, rec) { |
|
||||
um_selected_user_id = rec.data.id; |
|
||||
if( um_selected_user_id == 0 || rec.data.access == 10 ){ |
|
||||
Ext.getCmp('um_del_user_btn').disable(); |
|
||||
Ext.getCmp('um_lock_user_btn').disable(); |
|
||||
}; |
|
||||
Ext.getCmp('um_edit_user_btn').enable(); |
|
||||
} |
|
||||
} |
|
||||
}; |
|
||||
|
|
||||
|
|
||||
function loadUserEditor(){ |
|
||||
if( tlInterval!= null ){ |
|
||||
window.clearInterval( tlInterval ); |
|
||||
tlInterval = null; |
|
||||
timelineObj = null; |
|
||||
}; |
|
||||
var tPanel = Ext.getCmp('main_portal'); |
|
||||
tPanel.removeAll( true ); |
|
||||
Ext.getCmp('main_content').setTitle( '<?=$Labels->GetLabel("_USERS_MNGMT_");?>' ); |
|
||||
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', |
|
||||
ds: um_user_list_store, |
|
||||
cm: new Ext.grid.ColumnModel( um_user_list_col_model_opt ), |
|
||||
sm: new Ext.grid.RowSelectionModel( um_user_list_sel_model_opt ) |
|
||||
}, |
|
||||
tbar: [{ |
|
||||
xtype: 'button', |
|
||||
id: 'um_add_user_btn', |
|
||||
text: '<?=$Labels->GetLabel("_ADD_USER_");?>', |
|
||||
handler: function(){ |
|
||||
|
|
||||
} |
|
||||
},{ |
|
||||
xtype: 'button', |
|
||||
id: 'um_edit_user_btn', |
|
||||
text: '<?=$Labels->GetLabel("_EDIT_USER_");?>', |
|
||||
disabled: true, |
|
||||
handler: function(){ |
|
||||
|
|
||||
} |
|
||||
},{ |
|
||||
xtype: 'button', |
|
||||
id: 'um_lock_user_btn', |
|
||||
text: '<?=$Labels->GetLabel("_LOCK_USER_");?>', |
|
||||
disabled: true, |
|
||||
handler: function(){ |
|
||||
|
|
||||
} |
|
||||
},{ |
|
||||
xtype: 'button', |
|
||||
id: 'um_del_user_btn', |
|
||||
text: '<?=$Labels->GetLabel("_DEL_USER_");?>', |
|
||||
disabled: true, |
|
||||
handler: function(){ |
|
||||
|
|
||||
} |
|
||||
}] |
|
||||
}] |
|
||||
}); |
|
||||
tPanel.doLayout(); |
|
||||
um_selected_user_id = 0; |
|
||||
um_user_list_store.reload(); |
|
||||
}; |
|
||||
|
Before Width: 3791 | Height: 2763 | Size: 2.0 MiB |
|
After Width: 512 | Height: 512 | Size: 7.3 KiB |
|
After Width: 32 | Height: 12 | Size: 518 B |
|
After Width: 32 | Height: 12 | Size: 538 B |
|
After Width: 32 | Height: 12 | Size: 518 B |
|
After Width: 32 | Height: 12 | Size: 510 B |
|
After Width: 32 | Height: 12 | Size: 582 B |
|
After Width: 512 | Height: 512 | Size: 9.0 KiB |