Web Interface For Lite Argus Control modules
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

1746 lines
50 KiB

<?php
require_once('../ajax_asm.php');
ob_start();
$UID = intval( $CUser->Data['id'] );
$ACCESS = intval( $CUser->Data['access'] );
if( $UID > 1 ){
$CID = intval( $_POST['CID'] );
$QS = "SELECT * FROM `cameras` WHERE `id`={$CID}";
$Result = $DATABASE->Query( $QS, false );
$STREAMS = array();
if( count( $Result ) ){
$Cam = $Result[0];
$QS="SELECT * FROM `nodes` WHERE `type`>9 AND `type`<16 AND `aux_id`={$CID}";
$JJ = $DATABASE->Query( $QS );
if( count( $JJ ) ){
$Node = $JJ[0];
} else {
$Node['id'] = 0;
};
$Cam['node_name'] = $Node['name'];
$Cam['name']=urldecode( $Cam['name'] );
$TB = explode( ' ', $Cam['name'] );
$Cam['name'] = $TB[0];
if( stripos($Cam['ip'],'/dev/video') !==false ){
$CLS = "camera_analog_set";
$CAM_IP = false;
} else {
$CAM_IP = true;
$CamLabel = $Cam['name'] . '_' . $CID;
if( stripos( $Cam['name'], 'hikvision' ) !== false ){
$CLS = "camera_hikvision_set";
} elseif( stripos( $Cam['name'], 'dahua' ) !== false ){
$CLS = "camera_dahua_set";
} elseif( stripos( $Cam['name'], 'axis' ) !== false ){
$CLS = "camera_axis_set";
} elseif( stripos( $Cam['name'], 'General' ) !== false ){
$CLS = "cam_vehicle_set";
} else {
$CLS = "camera_generic_set";
};
};
if( intval($Cam['port'] ) ) $Cam['ip'] = $Cam['ip'] . ':' . $Cam['port'];
$QS = "SELECT * FROM media_streams WHERE source_id={$CID}";
$Result = $DATABASE->Query($QS,false);
$SELECTED_STREAM = 0;
$STREAMS = array();
if( count( $Result ) > 0 ){
$ii = 0;
foreach( $Result as $CD ){
$STREAMS[] = "[{$CD['id']},'{$CD['name']}','{$CD['img_width']}x{$CD['img_height']}@{$CD['fps']}','{$CD['compression_type']}',{$CD['bitrate']}]";
if( $Cam['stream_id'] == $CD['id'] ) $SELECTED_STREAM = $ii;
$ii++;
};
};
$STREAMS = implode(',',$STREAMS);
$QS="SELECT re.aux_id, re.device FROM resources re LEFT JOIN nodes no ON( re.node_id = no.id ) WHERE ( re.type=1 OR re.type=129 ) ORDER BY re.aux_id";
$RR=$DATABASE->Query( $QS );
if( count( $RR ) ){
$RE=array();
foreach( $RR as $R ){
$RE[] = "[ {$R['aux_id']}, '{$R['device']}']";
};
$UARTS = implode( ',', $RE );
} else {
$UARTS = "[0, \"".$Labels->GetLabel('_NO_UARTS_DEF_')."\"]";
};
$ATAB = 0;
//v4l2-ctl -d /dev/video0 --stream-mmap --stream-count=1 --stream-to=output.jpg
$QS = "SELECT `no`.`id`, `sen`.`type`, `sen`.`max_range`, `no`.`enable`, `no`.`name` FROM `lrf_sensors` `sen` LEFT JOIN `nodes` `no` ON( `no`.`aux_id`=`sen`.`id` AND `no`.`type`=`sen`.`type`)";
$Result = $DATABASE->Query( $QS, false );
$SENSORS = array();
$SENSOID = 0;
if( count( $Result ) ){
$SenPart = array();
foreach( $Result as $R ){
switch( $R['type'] ){
case 1: $HWT = 'ALS ' . $R['max_range'] . ' meters'; break;
case 2: $HWT = 'LFS ' . $R['max_range'] . ' meters'; break;
case 3: $HWT = 'PLS200 ' . $R['max_range'] . ' meters'; break;
case 4: $HWT = 'PLS360 ' . $R['max_range'] . ' meters'; break;
case 5: $HWT = '3DLRF ' . $R['max_range'] . ' meters'; break;
};
$SenPart[] = '[ '.$R['id'].',\''.$R['name'].'('.$HWT.')\']';
};
$SENSORS = '['.implode( ',', $SenPart ) .']';
if( $SENSOID == 0 ) $SENSOID = intval( $R['id'] );
} else {
$SENSORS ='[ [ 0, \'--No Sensors Defined--\']]';
};
if( $CAM_IP ){
$RESET_CREDENTIALS=<<<kskjhiiuwye
,{
xtype: 'button',
width: '100%',
text: '{$Labels->GetLabel('_CHANGE_CREDENTIALS_')}/{$Labels->GetLabel('_CONNECTION_')}',
handler: function(){
var RCC_Window = new Ext.Window({
title: '{$Labels->GetLabel('_CHANGE_CREDENTIALS_')}/{$Labels->GetLabel('_CONNECTION_')}',
width: 500,
height: 400,
modal: true,
layout: 'form',
labelWidth: 150,
labelAlign: 'right',
items:[{
xtype: 'textfield',
id: 'am_ip_addr',
fieldLabel: '{$Labels->GetLabel('_CAM_IP_ADDRESS_')}',
width: '100%',
value: '{$Cam['ip']}'
},{
xtype: 'textfield',
id: 'am_login',
fieldLabel: '{$Labels->GetLabel('_ACCESS_LOGIN_')}',
width: '100%',
value: '{$Cam['access_login']}'
},{
xtype: 'textfield',
id: 'am_password',
fieldLabel: '{$Labels->GetLabel('_ACCESS_PASSWORD_')}',
width: '100%',
value: '{$Cam['access_pass']}'
},{
xtype: 'combo',
id: 'am_auth_mode',
fieldLabel: '{$Labels->GetLabel('_AUTH_MODE_0_')}',
lazyRender: true,
mode: 'local',
forceSelection: true,
triggerAction: 'all',
editable: false,
disableKeyFilter: true,
store: new Ext.data.ArrayStore({
fields: ['mode','mode_txt'],
data: [
[0,'BASIC'],
[1,'DIGEST'],
[2,'DIGEST_IE'],
[3,'BEARER'],
[4,'NEGOTIATE'],
[5,'NTLM'],
[6,'NTLM_WB'],
[7,'ANY'],
[8,'ANYSAFE'],
[9,'ONLY'],
[10,'AWS_SIGV4']
]
}),
valueField: 'mode',
displayField: 'mode_txt',
value: '{$Cam['auth_mode']}',
width: 200
},{
xtype: 'button',
text: 'Apply',
width: '100%',
handler: function(){
var NIP = Ext.getCmp('am_ip_addr').getValue();
var NUU = Ext.getCmp('am_login').getValue();
var NPP = Ext.getCmp('am_password').getValue();
var NAM = Ext.getCmp('am_auth_mode').getValue();
Ext.Ajax.request({
url: '/lib/controller/doCameraOperation.php',
params: {
UID: {$UserID},
SID: '{$Session}',
CID: {$CID},
UI: NIP,
UU: NUU,
PP: NPP,
AU: NAM,
CMD: 4
},
success: function( response, opts ){
RCC_Window.destroy();
var data = Ext.decode(response.responseText);
if( data.status == 'ok' ){
loadDetectedCameras();
} else {
Ext.Msg.show({
title:'Error!',
msg: data.msg,
buttons: Ext.Msg.OK,
icon: Ext.MessageBox.WARNING
});
};
},
failure: failureAJAXFunction
});
}
},{
xtype: 'button',
text: 'Cancel',
width: '100%',
handler: function(){
RCC_Window.destroy();
}
}]
});
RCC_Window.show();
}
}
kskjhiiuwye;
} else {
$RESET_CREDENTIALS='';
};
if( $Cam['status'] < 3 ){
$ADD_CAMERA=<<<hzzhoiuyhetrkh
{
xtype: 'button',
width: '100%',
text: '{$Labels->GetLabel('_ASSIGN_CAMERA_')}',
handler: function(){
Ext.Ajax.request({
url: '/lib/controller/doCameraOperation.php',
params: {
UID: {$UserID},
SID: '{$Session}',
CMD: 2,
CID: {$CID}
},
success: function( response, opts ){
var tData = Ext.decode(response.responseText);
if( tData.status == 'ok' ){
loadDetectedCameras();
} else {
Ext.Msg.show({
title:'{$Labels->GetLabel('_ERROR_')}',
msg: tData.msg,
buttons: Ext.Msg.OK,
icon: Ext.MessageBox.ERROR
});
};
},
failure: failureAJAXFunction
});
}
}
hzzhoiuyhetrkh;
} else {
//$RESET_CREDENTIALS='';
$ADD_CAMERA=<<<hhoiuyhetrkh
{
xtype: 'button',
width: '100%',
text: '{$Labels->GetLabel('_REMOVE_CAMERA_')}',
handler: function(){
Ext.Ajax.request({
url: '/lib/controller/doCameraOperation.php',
params: {
UID: {$UserID},
SID: '{$Session}',
CMD: 7,
CID: {$CID}
},
success: function( response, opts ){
var tData = Ext.decode(response.responseText);
if( tData.status == 'ok' ){
loadAssignedCameras();
} else {
Ext.Msg.show({
title:'Error!',
msg: tData.msg,
buttons: Ext.Msg.OK,
icon: Ext.MessageBox.ERROR
});
};
},
failure: failureAJAXFunction
});
}
}
hhoiuyhetrkh;
};
$BBAR_BTN = $ADD_CAMERA;
$TPL_SET_CREDS_IP=<<<ZUZAKA
{
xtype: 'form',
id: 'cam_credentials',
labelWidth: 260,
labelAlign: 'right',
items: [{
xtype: 'panel',
height: 290,
border: false,
frame: false,
html: '<table width="100%" border=0><tr><td height=290 align="center"><div class="{$CLS}"></div></td>'
},{
xtype: 'panel',
html: '<div class="sideInfo_item" id="INFO_ON"><b>{$Cam['ip']}</b><br/>{$Cam['name']}<br/>{$Cam['hardware']}</div>'
},{
xtype: 'panel',
html: '<div class="sideInfo_item" id="INFO_ID">{$Labels->GetLabel('_PROV_CAC_')}</div>'
},{
xtype: 'textfield',
id: 'cam_login',
fieldLabel: '{$Labels->GetLabel('__LOGIN__')}',
width: 200
},{
xtype: 'textfield',
id: 'cam_password',
inputType: 'password',
fieldLabel: '{$Labels->GetLabel('__PASSWORD__')}',
width: 200
},{
xtype: 'combo',
id: 'cam_auth_mode',
fieldLabel: '{$Labels->GetLabel('_AUTH_MODE_0_')}',
lazyRender: true,
mode: 'local',
forceSelection: true,
triggerAction: 'all',
editable: false,
disableKeyFilter: true,
store: new Ext.data.ArrayStore({
fields: ['mode','mode_txt'],
data: [
[0,'BASIC'],
[1,'DIGEST'],
[2,'DIGEST_IE'],
[3,'BEARER'],
[4,'NEGOTIATE'],
[5,'NTLM'],
[6,'NTLM_WB'],
[7,'ANY'],
[8,'ANYSAFE'],
[9,'ONLY'],
[10,'AWS_SIGV4']
]
}),
valueField: 'mode',
displayField: 'mode_txt',
value: 0,
width: 200
},{
xtype: 'button',
width: '100%',
text: '{$Labels->GetLabel('_SET_CREDENTIALS_')}',
handler: function(){
addDetCamWM = new Ext.LoadMask( Ext.getCmp('cam_credentials').getEl(), {msg:"{$Labels->GetLabel('_Please_Wait_')}..."});
addDetCamWM.show();
var NUU = Ext.getCmp('cam_login').getValue();
var NPP = Ext.getCmp('cam_password').getValue();
var NAM = Ext.getCmp('cam_auth_mode').getValue();
Ext.Ajax.request({
url: '/lib/controller/doCameraOperation.php',
params: {
UID: {$UserID},
SID: '{$Session}',
CID: {$CID},
UU: NUU,
PP: NPP,
AU: NAM,
CMD: 3
},
success: function( response, opts ){
addDetCamWM.hide();
var data = Ext.decode(response.responseText);
if( data.status == 'ok' ){
loadDetectedCameras();
} else {
Ext.Msg.show({
title:'Error!',
msg: data.msg,
buttons: Ext.Msg.OK,
icon: Ext.MessageBox.WARNING
});
};
},
failure: failureAJAXFunction
});
}
}]
}
ZUZAKA;
$TPL_ANALOG_CAM =<<<CHUPAKABRA
{
xtype: 'panel',
id: 'cam_info',
labelWidth: 260,
labelAlign: 'right',
bbar:[{$BBAR_BTN}],
items: [{
xtype: 'panel',
height: 290,
border: false,
frame: false,
html: '<table width="100%" border=0><tr><td height=290 align="center"><div class="{$CLS}"></div></td>'
},{
xtype: 'panel',
html: '<div class="sideInfo_item" id="INFO_ON"><b>{$Cam['ip']}</b><br/>{$Cam['name']}<br/>{$Cam['hardware']}</div>'
}]
}
CHUPAKABRA;
//$QS="SELECT * FROM `module_eve` WHERE `id`=1";
//$S=$DATABASE->Query( $QS );
//$MODULE_DATA = $S[0];
if( $Cam['status'] < 3 ){
$FU = "/lib/controller/getCameraPreview.php?UID={$CUser->Data['id']}&SID={$Session}&FID=";
} else {
//$FU = 'http://' . $_SERVER['SERVER_ADDR'].':' . $MODULE_DATA['web_port'] .'/stream?id=';
$FU = '/video_feed/stream?id=';
};
$TPL_CAM_EDITOR=<<<PZAKSJEJSDKGJHGASD
{
id: 'camedi_tabs',
xtype: 'tabpanel',
activeTab: 0,
bbar:[{$BBAR_BTN}],
items: [{
title: '{$Labels->GetLabel('_GENERAL_')}',
id: 'cam_info',
frame: false,
border: false,
items: [{
xtype: 'panel',
height: 290,
border: false,
frame: false,
html: '<table width="100%" border=0><tr><td height=290 align="center"><div class="{$CLS}"></div></td>'
},{
xtype: 'panel',
html: '<div class="sideInfo_item" id="INFO_ON"><b>{$Cam['ip']}</b><br/>{$Cam['name']}<br/>{$Cam['hardware']}</div>'
},{
xtype: 'form',
labelWidth: 200,
border: false,
frame: false,
labelAlign: 'right',
items:[{
xtype: 'combo',
id: 'cam_status_ed',
fieldLabel: '{$Labels->GetLabel('_STATUS_')}',
lazyRender: true,
mode: 'local',
forceSelection: true,
triggerAction: 'all',
editable: false,
disableKeyFilter: true,
store: new Ext.data.ArrayStore({
fields: ['mode','mode_txt'],
data: [
[0,'{$Labels->GetLabel('__DISABLED__')}'],
[1,'{$Labels->GetLabel('___ENABLED__')}']
]
}),
valueField: 'mode',
displayField: 'mode_txt',
value: '{$Node['enable']}',
width: 200,
listeners:{
select: function( a, c, b ){
doCamOperation( {$Node['id']}, 41, b, true );
}
}
},{
xtype: 'checkbox',
id: 'cam_manassign',
fieldLabel: '{$Labels->GetLabel('_STATIC_CONNECTION_')}',
width: 200,
checked: {$Cam['manual']},
listeners:{
check: function( a, c ){
if( c ){
doCamOperation( {$CID}, 24, 1 );
} else {
doCamOperation( {$CID}, 24, 0 );
};
}
}
}]
}{$RESET_CREDENTIALS}]
},{
title: '{$Labels->GetLabel('_STREAMS_')}',
id: 'str_tab',
frame: false,
border: false,
layout: 'form',
labelWidth: 150,
labelAlign: 'right',
items:[{
xtype: 'grid',
height: 124,
id: 'nd_cam_grid',
frame: false,
ds: new Ext.data.ArrayStore({
fields: ['id','name','size','encode','bitrate'],
data: [{$STREAMS}]
}),
cm: new Ext.grid.ColumnModel({
columns: [
{header: "id", width: 50, sortable: false, menuDisabled: true, align: 'center', fixed: true, css: 'vertical-align: middle;', dataIndex: 'id' },
{header: "Name", dataIndex: 'name' },
{header: "Encoding",width: 120, sortable: false, fixed: true, menuDisabled: true, dataIndex: 'encode' },
{header: "Frame", width: 120, sortable: false, menuDisabled: true, align: 'left', css: 'vertical-align: middle;', dataIndex: 'size' },
{header: "Bitrate", width: 80, sortable: false, fixed: true, menuDisabled: true, align: 'left', css: 'vertical-align: middle;', dataIndex: 'bitrate' }
],
defaults: {
sortable: false,
menuDisabled: true,
width: 100
}
}),
sm: new Ext.grid.RowSelectionModel({
singleSelect: true,
listeners: {
rowselect: function(sm, row, rec) {
SelectedSource = rec.data.id;
doCamOperation( {$CID}, 1, SelectedSource );
var tt = Ext.getCmp('pic_prev');
if( tt!= undefined ){
//tt.update( '<center><img width="100%" src="/lib/controller/getCameraPreview.php?UID={$CUser->Data['id']}&SID={$Session}&FID='+SelectedSource+'"></center>' );
tt.update( '<center><img width="100%" ondblclick="fullScreen(\'img-{$CID}\');" style="cursor: zoom-in" id="img-{$CID}" src="{$FU}'+SelectedSource+'"></center>' );
};
}
}
}),
listeners:{
viewready: function( t ){
var tt = t.getSelectionModel();
tt.selectRow({$SELECTED_STREAM});
}
}
},{
xtype: 'combo',
fieldLabel: '{$Labels->GetLabel('_CAM_FLIPMO_')}',
lazyRender: true,
id: 'flip_mo',
mode: 'local',
forceSelection: true,
triggerAction: 'all',
editable: false,
disableKeyFilter: true,
store: new Ext.data.ArrayStore({
fields: ['fm','fm_txt'],
data: [
[0,'{$Labels->GetLabel('__DISABLED__')}'],
[1,'{$Labels->GetLabel('_CAM_FLIPHO_')}'],
[2,'{$Labels->GetLabel('_CAM_FLIPVE_')}'],
[3,'{$Labels->GetLabel('_CAM_FLIPVEHO_')}']
]
}),
valueField: 'fm',
displayField: 'fm_txt',
value: '{$Cam['flip_mode']}',
listeners:{
select:function( c, r, i ){
doCamOperation( {$CID}, 42, i );
}
}
},{
height: PanelH,
id: 'pic_prev',
html: '<center><img width="100%" src="/style/img/cam_cap0.png"></center>',
listeners:{
afterrender: function( t ){
if( SelectedSource ){
//t.update( '<center><img width="100%" src="/lib/controller/getCameraPreview.php?UID={$CUser->Data['id']}&SID={$Session}&FID='+SelectedSource+'"></center>' );
};
}
}
}],
},{
title: '{$Labels->GetLabel('_CAM_LENS_SETTINGS_')}',
id: 'lens_tab',
frame: false,
border: false,
items:[{
layout: 'table',
frame: false,
border: false,
layoutConfig: {
columns: 3
},
defaults: {
frame: false,
bodyStyle: 'padding:10px',
border: false
},
items:[{
html: '{$Labels->GetLabel('_CAM_ZOOMMO_')}'
},{
xtype: 'combo',
fieldLabel: '{$Labels->GetLabel('_CAM_ZOOMMO_')}',
lazyRender: true,
id: 'zoom_mo',
mode: 'local',
forceSelection: true,
triggerAction: 'all',
editable: false,
disableKeyFilter: true,
store: new Ext.data.ArrayStore({
fields: ['zm','zm_txt'],
data: [
[0,'{$Labels->GetLabel('_CAM_FIXEDZ_')}'],
[1,'{$Labels->GetLabel('_CAM_CUSTOMZ_')}'],
[2,'{$Labels->GetLabel('_CAM_VARIOZ_')}']
]
}),
valueField: 'zm',
displayField: 'zm_txt',
value: {$Cam['zoom_model']},
listeners:{
select:function( c, r, i ){
doCamOperation( {$CID}, 21, i );
switch( i ){
case 0:{
Ext.getCmp('lbbel0').show();
Ext.getCmp('sens_size').show();
Ext.getCmp('empty0').show();
Ext.getCmp('lbbel11').show();
Ext.getCmp('lens_fl').show();
Ext.getCmp('empty1').show();
Ext.getCmp('lbbel1').hide();
Ext.getCmp('zoom_val').hide();
Ext.getCmp('zoom_d').hide();
Ext.getCmp('lbbel2').hide();
Ext.getCmp('zoom_val2').hide();
Ext.getCmp('zoom_d2').hide();
Ext.getCmp('lbbel3').hide();
Ext.getCmp('zoom_range1').hide();
Ext.getCmp('empup_2').hide();
Ext.getCmp('zoom_perc1').hide();
Ext.getCmp('lbbel4').hide();
Ext.getCmp('empup_3').hide();
break;
};
case 1:{
Ext.getCmp('lbbel2').hide();
Ext.getCmp('zoom_val2').hide();
Ext.getCmp('zoom_d2').hide();
Ext.getCmp('lbbel3').hide();
Ext.getCmp('zoom_range1').hide();
Ext.getCmp('empup_2').hide();
Ext.getCmp('zoom_perc1').hide();
Ext.getCmp('lbbel4').hide();
Ext.getCmp('empup_3').hide();
Ext.getCmp('lbbel0').show();
Ext.getCmp('sens_size').show();
Ext.getCmp('empty0').show();
Ext.getCmp('lbbel11').show();
Ext.getCmp('lens_fl').show();
Ext.getCmp('empty1').show();
Ext.getCmp('lbbel1').show();
Ext.getCmp('zoom_val').show();
Ext.getCmp('zoom_d').show();
break;
};
case 2:{
Ext.getCmp('lbbel0').hide();
Ext.getCmp('sens_size').hide();
Ext.getCmp('empty0').hide();
Ext.getCmp('lbbel11').hide();
Ext.getCmp('lens_fl').hide();
Ext.getCmp('empty1').hide();
Ext.getCmp('lbbel1').hide();
Ext.getCmp('zoom_val').hide();
Ext.getCmp('zoom_d').hide();
Ext.getCmp('lbbel2').show();
Ext.getCmp('zoom_val2').show();
Ext.getCmp('zoom_d2').show();
Ext.getCmp('lbbel3').show();
Ext.getCmp('zoom_range1').show();
Ext.getCmp('empup_2').show();
Ext.getCmp('zoom_perc1').show();
Ext.getCmp('lbbel4').show();
Ext.getCmp('empup_3').show();
break;
};
};
}
}
},{
html: '&nbsp;'
},{
id: 'lbbel0',
width: 200,
hidden: ({$Cam['zoom_model']}==2),
html: '{$Labels->GetLabel('_CAM_SENS_SIZE_')}'
},{
xtype: 'combo',
id: 'sens_size',
hidden: ({$Cam['zoom_model']}==2),
fieldLabel: '{$Labels->GetLabel('_CAM_SENS_SIZE_')}',
lazyRender: true,
mode: 'local',
forceSelection: true,
triggerAction: 'all',
editable: false,
disableKeyFilter: true,
store: new Ext.data.ArrayStore({
fields: ['size','size_txt'],
data: [
[0,'1/3.6"'],
[1,'1/3.2"'],
[2,'1/3"'],
[3,'1/2.7"'],
[4,'1/2"'],
[5,'1/1.8"'],
[6,'2/3"'],
[7,'1"'],
[8,'4/3"'],
[9,'APS-C'],
[10,'35 mm'],
[11,'645']
]
}),
valueField: 'size',
displayField: 'size_txt',
value: {$Cam['imager_type']},
listeners:{
select:function( c, r, i ){
doCamOperation( {$CID}, 2, i );
}
}
},{
id: 'empty0',
hidden: ({$Cam['zoom_model']}==2),
html: '&nbsp;'
},{
id: 'lbbel11',
hidden: ({$Cam['zoom_model']}==2),
html: '{$Labels->GetLabel('_CAM_FOCALL_')}'
},{
xtype: 'combo',
id: 'lens_fl',
hidden: ({$Cam['zoom_model']}==2),
fieldLabel: '{$Labels->GetLabel('_CAM_FOCALL_')}',
lazyRender: true,
mode: 'local',
forceSelection: true,
triggerAction: 'all',
editable: false,
disableKeyFilter: true,
store: new Ext.data.ArrayStore({
fields: ['fl','fl_txt'],
data: [
[0,'2.7 mm.'],
[1,'3.0 mm.'],
[2,'3.2 mm.'],
[3,'3.5 mm.'],
[4,'3.7 mm.'],
[5,'3.9 mm.'],
[6,'4.0 mm.'],
[7,'4.3 mm.'],
[8,'4.8 mm.'],
[9,'5.0 mm.'],
[10,'5.1 mm.'],
[11,'5.5 mm.'],
[12,'5.8 mm.'],
[13,'6.0 mm.'],
[14,'6.2 mm.'],
[15,'6.6 mm.'],
[16,'7.0 mm.'],
[17,'7.1 mm.'],
[18,'7.5 mm.'],
[19,'7.6 mm.'],
[20,'8.0 mm.'],
[21,'8.6 mm.'],
[22,'8.9 mm.'],
[23,'9.0 mm.'],
[24,'9.2 mm.'],
[25,'9.3 mm.'],
[26,'10.0 mm.'],
[27,'10.5 mm.'],
[28,'10.6 mm.'],
[29,'10.7 mm.'],
[30,'11.0 mm.'],
[31,'11.3 mm.'],
[32,'12.0 mm.'],
[33,'12.9 mm.'],
[34,'13.0 mm.'],
[35,'13.5 mm.'],
[36,'13.6 mm.'],
[37,'14.0 mm.'],
[38,'14.6 mm.'],
[39,'15.0 mm.'],
[40,'15.1 mm.'],
[41,'15.5 mm.'],
[42,'16.0 mm.'],
[43,'17.0 mm.'],
[44,'17.5 mm.'],
[44,'17.7 mm.'],
[45,'18.0 mm.'],
[46,'18.2 mm.'],
[47,'19.0 mm.']
]
}),
valueField: 'fl',
displayField: 'fl_txt',
value: {$Cam['lens_f']},
listeners:{
select:function( c, r, i ){
doCamOperation( {$CID}, 3, i );
}
}
},{
id: 'empty1',
hidden: ({$Cam['zoom_model']}==2),
html: '&nbsp;'
},{
id: 'lbbel1',
hidden: ({$Cam['zoom_model']}!=1),
html: '{$Labels->GetLabel('_CAM_ZOOMR_')}'
},{
xtype: 'slider',
id: 'zoom_val',
hidden: ({$Cam['zoom_model']}!=1),
disabled: ( parseFloat({$Cam['zoom']})==0 ),
minValue: 1.0,
maxValue: 140.0,
value: {$Cam['zoom']},
listeners:{
change: function( a, c, b ){
doCamOperation( {$CID}, 4, c );
var zz = Ext.getCmp('zoom_d');
if( zz.rendered ) zz.update('<p>X&nbsp;'+ c + '</p>');
}
}
},{
id: 'zoom_d',
hidden: ({$Cam['zoom_model']}!=1),
html: (( parseFloat({$Cam['zoom']})==0 )?'&nbsp;':'<p>X&nbsp;'+ {$Cam['zoom']} + '</p>' )
},{
id: 'lbbel3',
hidden: ({$Cam['zoom_model']}!=2),
html: '{$Labels->GetLabel('_CAM_MAX_RANGE_')}'
},{
xtype: 'numberfield',
id: 'zoom_range1',
width: 240,
hidden: ({$Cam['zoom_model']}!=2),
value: {$Cam['max_range']},
listeners:{
change: function( a, c, b ){
doCamOperation( {$CID}, 22, c );
}
}
},{
id: 'empup_2',
hidden: ({$Cam['zoom_model']}!=2),
html: '{$Labels->GetLabel('_METERS_')}'
},{
id: 'lbbel4',
hidden: ({$Cam['zoom_model']}!=2),
html: ''
},{
id: 'zoom_perc1',
width: 240,
hidden: ({$Cam['zoom_model']}!=2),
html: '<center><p>'+ {$Cam['zoom']} + '%</p></center>'
},{
id: 'empup_3',
hidden: ({$Cam['zoom_model']}!=2),
html: ''
},{
id: 'lbbel2',
hidden: ({$Cam['zoom_model']}!=2),
style: {
marginLeft: '120px' //https://www.biostar.com.tw/app/en/eol/introduction.php?S_ID=711
},
html: '<img width="32px" src="/style/wicons/wide.png"/>'
},{
xtype: 'slider',
id: 'zoom_val2',
hidden: ({$Cam['zoom_model']}!=2),
minValue: 1.0,
maxValue: 100.0,
value: {$Cam['zoom']},
listeners:{
change: function( a, c, b ){
doCamOperation( {$CID}, 23, c );
var zz = Ext.getCmp('zoom_perc1');
if( zz.rendered ) zz.update('<center><p>'+ c + '%</p></center>');
}
}
},{
id: 'zoom_d2',
hidden: ({$Cam['zoom_model']}!=2),
html: '<img width="32px" src="/style/wicons/narrow.png"/>'
}]
}]
},{
title: '{$Labels->GetLabel('_PTZ_TAB_')}',
id: 'ptz_tab',
frame: false,
border: false,
items:[{
layout: 'table',
frame: false,
border: false,
layoutConfig: {
columns: 3
},
defaults: {
frame: false,
bodyStyle: 'padding:10px',
border: false
},
items:[{
width: 200,
html: '{$Labels->GetLabel('__PTZ_CONTROL__')}'
},{
xtype: 'combo',
fieldLabel: '{$Labels->GetLabel('__PTZ_CONTROL__')}',
lazyRender: true,
id: 'ptz_proto',
mode: 'local',
forceSelection: true,
triggerAction: 'all',
editable: false,
disableKeyFilter: true,
store: new Ext.data.ArrayStore({
fields: ['type','type_txt'],
data: [
[0,'{$Labels->GetLabel('_NO_PTZ_')}'],
[1,'Sony VISCA'],
[2,'Pelco-D'],
[3,'OnVif'],
[4,'PSIA'],
[5,'GB/T28181'],
[6,'BOSCH RCP+ via CGI']
]
}),
value: {$Cam['protocol']},
valueField: 'type',
displayField: 'type_txt',
listeners:{
select: function( a, c, b ){
doCamOperation( {$CID}, 5, b );
if( b > 0 ){
Ext.getCmp('cam_drive_par').show();
if(({$Cam['type']}==13)||({$Cam['type']}==11)){
Ext.getCmp('cam_ptz_par').show();
} else {
Ext.getCmp('cam_ptz_par').hide();
};
if( b == 1 || b == 2 ){
Ext.getCmp('cam_uart_par').show();
Ext.getCmp('uart_id').enable();
Ext.getCmp('prot_id').enable();
} else {
Ext.getCmp('cam_uart_par').hide();
Ext.getCmp('uart_id').disable();
Ext.getCmp('prot_id').disable();
};
Ext.getCmp('pan_mode').enable();
Ext.getCmp('tilt_mode').enable();
Ext.getCmp('pan_ang').enable();
Ext.getCmp('tilt_ang').enable();
} else {
Ext.getCmp('cam_ptz_par').hide();
Ext.getCmp('cam_drive_par').hide();
Ext.getCmp('cam_uart_par').hide();
Ext.getCmp('uart_id').disable();
Ext.getCmp('prot_id').disable();
Ext.getCmp('pan_mode').disable();
Ext.getCmp('tilt_mode').disable();
Ext.getCmp('pan_ang').disable();
Ext.getCmp('tilt_ang').disable();
};
}
}
},{
html: '&nbsp;'
}]
},{
layout: 'table',
id: 'cam_uart_par',
frame: false,
border: false,
hidden: (({$Cam['protocol']}!=1) || ({$Cam['protocol']}!=2)),
layoutConfig: {
columns: 3
},
defaults: {
frame: false,
bodyStyle: 'padding:10px',
border: false
},
items:[{
width: 200,
html: '{$Labels->GetLabel('_UART_PORT_')}'
},{
xtype: 'combo',
fieldLabel: '{$Labels->GetLabel('_UART_PORT_')}',
lazyRender: true,
id: 'uart_id',
mode: 'local',
forceSelection: true,
triggerAction: 'all',
editable: false,
disableKeyFilter: true,
disabled: (({$Cam['protocol']}!=1 ) && ( {$Cam['protocol']}!=2 )),
store: new Ext.data.ArrayStore({
fields: ['uart','uart_txt'],
data: [{$UARTS}]
}),
valueField: 'uart',
displayField: 'uart_txt',
value: {$Cam['uart_id']},
listeners:{
select: function( a, c, b ){
doCamOperation( {$CID}, 6, b );
}
}
},{
html: '&nbsp;'
},{
html: '{$Labels->GetLabel('_CAM_PROTO_ID_')}'
},{
xtype: 'numberfield',
id: 'prot_id',
width: '95%',
disabled: (({$Cam['protocol']}!=1 ) && ( {$Cam['protocol']}!=2 )),
minValue: 0,
maxValue: 255,
value: {$Cam['protocol_aux']},
listeners:{
change: function( a, c, b ){
doCamOperation( {$CID}, 7, c );
}
}
},{
html: '&nbsp;'
}]
},{
layout: 'table',
id: 'cam_drive_par',
frame: false,
border: false,
hidden: ({$Cam['protocol']}<1),
layoutConfig: {
columns: 3
},
defaults: {
frame: false,
bodyStyle: 'padding:10px',
border: false
},
items:[{
width: 200,
html: '{$Labels->GetLabel('_CAM_PTZ_MODE_')}'
},{
xtype: 'combo',
fieldLabel: '{$Labels->GetLabel('_CAM_PTZ_MODE_')}',
lazyRender: true,
id: 'cam_ptz_mode',
mode: 'local',
forceSelection: true,
triggerAction: 'all',
editable: false,
disableKeyFilter: true,
store: new Ext.data.ArrayStore({
fields: ['momo','momo_txt'],
data: [[0,'Absolute'],[1,'Presetets']]
}),
valueField: 'momo',
displayField: 'momo_txt',
value: ((({$Cam['type']}==13)||({$Cam['type']}==11))?0:1),
listeners:{
select: function( a, c, b ){
doCamOperation( {$CID}, 27, b );
if( b == 1 ){
Ext.getCmp('cam_ed_preset').enable();
Ext.getCmp('cam_ptz_par').hide();
} else {
Ext.getCmp('cam_ed_preset').disable();
Ext.getCmp('cam_ptz_par').show();
};
}
}
},{
xtype: 'button',
id: 'cam_ed_preset',
//disabled: (({$Cam['type']}==13)||({$Cam['type']}==11)),
text: '{$Labels->GetLabel('_CAM_PRES_EDIT_')}',
handler: function(){
var zaza = new Ext.Window({
title: '{$Labels->GetLabel('_CAM_PRES_EDITOR_')}',
modal: true,
resizable: false,
width: 800,
height: 804,
sukaMineWidth: -1,
items:[{
id: 'db_node_{$Node['id']}_pic',
border: true,
width: '100%',
html: '<div id="img-1" style="display: flex;align-items: center;" ><img id="img-img-1" src="/video_feed/stream?id={$Cam['stream_id']}" 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_{$Node['id']}" class="ptz_ctrl_btn" src="/style/png/player/010.png"></td><td width="24"><img id="img_btn_032_{$Node['id']}" class="ptz_ctrl_btn" src="/style/png/player/032.png"></td><td width="24"><img id="img_btn_033_{$Node['id']}" class="ptz_ctrl_btn" src="/style/png/player/033.png"></td><td width="24"><img id="img_btn_034_{$Node['id']}" class="ptz_ctrl_btn" src="/style/png/player/034.png"></td><td width="24"><img id="img_btn_035_{$CID}" class="ptz_ctrl_btn_hdn" src="/style/png/player/ir_off.png"></td></tr><tr><td><img id="img_btn_011_{$Node['id']}" class="ptz_ctrl_btn" src="/style/png/player/011.png"></td><td><img id="img_btn_031_{$Node['id']}" class="ptz_ctrl_btn" src="/style/png/player/031.png"></td><td><img id="img_btn_020_{$Node['id']}" class="ptz_ctrl_btn" src="/style/png/basic/020.png"></td><td><img id="img_btn_027_{$Node['id']}" class="ptz_ctrl_btn" src="/style/png/player/027.png"></td><td width="24"><img id="img_btn_036_{$CID}" class="ptz_ctrl_btn_hdn" src="/style/png/player/ir_on.png"></td></tr><tr><td></td><td><img id="img_btn_030_{$Node['id']}" class="ptz_ctrl_btn" src="/style/png/player/030.png"></td><td><img id="img_btn_029_{$Node['id']}" class="ptz_ctrl_btn" src="/style/png/player/029.png"></td><td><img id="img_btn_028_{$Node['id']}" class="ptz_ctrl_btn" src="/style/png/player/028.png"></td><td width="24"><img id="img_btn_037_{$CID}" class="ptz_ctrl_btn_hdn" src="/style/png/player/washer.png"></td></tr></table></div><div style="float: right; position: absolute; right: 0px; top: 0px; z-index: 1000;"><svg width="450px" height="450px" id="ptz_presets_0" version="1.1" style="shape-rendering:geometricPrecision; text-rendering:geometricPrecision; image-rendering:optimizeQuality; fill-rule:evenodd; clip-rule:evenodd;"></svg></div></div>'
},{
layout: 'table',
layoutConfig: {
columns: 3
},
defaults: {
frame: false,
bodyStyle: 'padding:10px',
border: false
},
items:[{
width: 200,
html: '{$Labels->GetLabel('_CAM_PRES_SSELECT_')}'
},{
xtype: 'combo',
lazyRender: true,
id: 'sensor_id',
mode: 'local',
forceSelection: true,
triggerAction: 'all',
editable: false,
disableKeyFilter: true,
//disabled: (({$Cam['protocol']}!=1 ) && ( {$Cam['protocol']}!=2 )),
store: new Ext.data.ArrayStore({
fields: ['sens','sens_txt'],
data: {$SENSORS}
}),
valueField: 'sens',
displayField: 'sens_txt',
value: {$SENSOID},
listeners:{
select: function( a, c, b ){
selectedPresetsBackgroundSensor = c.data.sens;
}
}
},{
xtype: 'button',
text: '{$Labels->GetLabel('_CAM_PRES_LOBACK_')}',
width: 240,
handler: function(){
if( selectedPresetsBackgroundSensor == 0 ){
selectedPresetsBackgroundSensor = Ext.getCmp( 'sensor_id' ).getValue();
//selectedPresetsBackgroundSensor = {$SENSOID};
};
if( selectedPresetsBackgroundSensor ) preview2DDraw( selectedPresetsBackgroundSensor, 'ptz_presets_');
}
},{
html: ''
},{
xtype: 'button',
text: '{$Labels->GetLabel('_CAM_PRES_DELALL_')}',
width: 230,
handler: function(){
doCamOperation( {$CID}, 34, 0 );
window.setTimeout( "showCameraPresets( 'ptz_presets_0', "+{$Cam['id']}+" );", 1000 );
}
},{
xtype: 'button',
text: '{$Labels->GetLabel('_CAM_PRES_REMBG_')}',
width: 240,
handler: function(){
selectedPresetsBackgroundSensor = 0;
showCameraPresets( 'ptz_presets_0', {$Cam['id']} );
}
},{
html: '{$Labels->GetLabel('_CAM_PRES_COUNT_')}'
},{
xtype: 'numberfield',
id: 'pres_count',
width: 240
},{
xtype: 'button',
text: 'Set',
width: 240,
handler: function(){
var vv = Ext.getCmp('pres_count').getValue();
if( vv ){
doCamOperation( {$CID}, 31, vv );
};
}
},{
html: '{$Labels->GetLabel('_CAM_PRES_COLS_')}'
},{
xtype: 'numberfield',
id: 'pres_p_seg',
width: 240
},{
xtype: 'button',
text: '{$Labels->GetLabel('__SET__')}',
width: 240,
handler: function(){
var vv = Ext.getCmp('pres_p_seg').getValue();
if( vv ){
doCamOperation( {$CID}, 32, vv );
window.setTimeout( "showCameraPresets( 'ptz_presets_0', "+{$Cam['id']}+" );", 300 );
};
}
},{
html: '{$Labels->GetLabel('_CAM_PRES_ROWS_')}'
},{
xtype: 'numberfield',
id: 'pres_z_seg',
width: 240
},{
xtype: 'button',
text: '{$Labels->GetLabel('__SET__')}',
width: 240,
handler: function(){
var vv = Ext.getCmp('pres_z_seg').getValue();
if( vv ){
doCamOperation( {$CID}, 33, vv );
window.setTimeout( "showCameraPresets( 'ptz_presets_0', "+{$Cam['id']}+" );", 300 );
};
}
},{
html: '{$Labels->GetLabel('_CAM_PRES_IROFF_')}'
},{
xtype: 'numberfield',
id: 'pres_iroff',
width: 240
},{
xtype: 'button',
text: '{$Labels->GetLabel('__SET__')}',
width: 240,
handler: function(){
var vv = Ext.getCmp('pres_iroff').getValue();
doCamOperation( {$CID}, 35, vv );
}
},{
html: '{$Labels->GetLabel('_CAM_PRES_IRON_')}'
},{
xtype: 'numberfield',
id: 'pres_iron',
width: 240
},{
xtype: 'button',
text: '{$Labels->GetLabel('__SET__')}',
width: 240,
handler: function(){
var vv = Ext.getCmp('pres_iron').getValue();
doCamOperation( {$CID}, 36, vv );
}
},{
html: '{$Labels->GetLabel('_CAM_PRES_IRAUTO_')}'
},{
xtype: 'numberfield',
id: 'pres_irauto',
width: 240
},{
xtype: 'button',
text: '{$Labels->GetLabel('__SET__')}',
width: 240,
handler: function(){
var vv = Ext.getCmp('pres_irauto').getValue();
doCamOperation( {$CID}, 37, vv );
}
},{
html: '{$Labels->GetLabel('_CAM_PRES_IRWIPER_')}'
},{
xtype: 'numberfield',
id: 'pres_wiper',
width: 240
},{
xtype: 'button',
text: '{$Labels->GetLabel('__SET__')}',
width: 240,
handler: function(){
var vv = Ext.getCmp('pres_wiper').getValue();
doCamOperation( {$CID}, 38, vv );
}
}]
}],
listeners:{
resize: function( p, adjWidth, adjHeight, rawWidth, rawHeight ){
if( rawWidth!= undefined ){
if( p.sukaMineWidth != adjWidth ){
p.sukaMineWidth = adjWidth;
var XX = p.sukaMineWidth * 9 / 16;
//p.setHeight( XX + 32 );
var z = Ext.getCmp('db_node_{$Node['id']}_pic');
z.setHeight( XX );
};
};
},
afterrender: function( p ){
var xx = p.getWidth() * 9 / 16;
//p.setHeight( xx + 32 );
var z = Ext.getCmp('db_node_{$Node['id']}_pic');
z.setHeight( xx );
document.getElementById('img_btn_010_{$Node['id']}').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_010_{$Node['id']}').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_011_{$Node['id']}').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_011_{$Node['id']}').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_027_{$Node['id']}').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_027_{$Node['id']}').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_028_{$Node['id']}').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_028_{$Node['id']}').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_029_{$Node['id']}').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_029_{$Node['id']}').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_030_{$Node['id']}').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_030_{$Node['id']}').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_031_{$Node['id']}').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_031_{$Node['id']}').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_032_{$Node['id']}').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_032_{$Node['id']}').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_033_{$Node['id']}').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_033_{$Node['id']}').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_034_{$Node['id']}').addEventListener( 'mouseup', makePtzStop );
document.getElementById('img_btn_034_{$Node['id']}').addEventListener( 'mousedown', makePtzMove );
document.getElementById('img_btn_020_{$Node['id']}').addEventListener( 'mousedown', makePtzStop );
showCameraPresets( 'ptz_presets_0', {$Cam['id']} );
}
}
});
zaza.show();
}
},{
html: '{$Labels->GetLabel('_CAM_IR_ECO_')}'
},{
xtype: 'checkbox',
id: 'ptz_ir_eco',
checked: ({$Cam['eco_ir']} > 0 ),
listeners:{
check: function( a, c ){
if( c ){
doCamOperation( {$CID}, 39, 1 );
} else {
doCamOperation( {$CID}, 39, 0 );
};
}
}
},{
html: '&nbsp;'
},{
html: '{$Labels->GetLabel('_CAM_PTZ_AAC_')}'
},{
xtype: 'checkbox',
id: 'ptz_axel_c',
disabled: ({$Cam['protocol']} == 0),
checked: ({$Cam['ptz_axel']} < 6 ),
listeners:{
check: function( a, c ){
if( c ){
doCamOperation( {$CID}, 13, 0 );
var zz = Ext.getCmp('ptz_axel');
zz.disable();
} else {
var zz = Ext.getCmp('ptz_axel');
zz.enable();
var vava = zz.getValue();
if( vava < 5 ){
vava = 5;
zz.setValue( vava, true );
} else {
doCamOperation( {$CID}, 13, vava );
};
var jj = Ext.getCmp('ptz_axel_d');
if( jj.rendered ) jj.update('<p>X&nbsp;'+ vava + '</p>');
};
}
}
},{
html: '&nbsp;'
},{
html: '{$Labels->GetLabel('_CAM_PTZ_MAC_')}'
},{
xtype: 'slider',
id: 'ptz_axel',
disabled: (({$Cam['protocol']} == 0)||({$Cam['ptz_axel']} < 6)),
minValue: 5,
maxValue: 20,
value: {$Cam['ptz_axel']},
listeners:{
change: function( a, c, b ){
doCamOperation( {$CID}, 13, c );
var zz = Ext.getCmp('ptz_axel_d');
if( zz.rendered ) zz.update('<p>X&nbsp;'+ c + '</p>');
}
}
},{
id: 'ptz_axel_d',
html: '<p>X&nbsp;'+ {$Cam['ptz_axel']} + '</p>'
}]
},{
layout: 'table',
id: 'cam_ptz_par',
hidden: (({$Cam['protocol']}<1) || ({$Cam['type']}>13)),
frame: false,
border: false,
layoutConfig: {
columns: 3
},
defaults: {
frame: false,
bodyStyle: 'padding:10px',
border: false
},
items:[{
width: 200,
html: '{$Labels->GetLabel('_CAM_PANMOD_')}'
},{
xtype: 'combo',
fieldLabel: '{$Labels->GetLabel('_CAM_PANMOD_')}',
lazyRender: true,
id: 'pan_mode',
disabled: ({$Cam['protocol']} == 0),
mode: 'local',
forceSelection: true,
triggerAction: 'all',
editable: false,
disableKeyFilter: true,
store: new Ext.data.ArrayStore({
fields: ['pm','pm_txt'],
data: [
[0,'{$Labels->GetLabel('_CAM_TM_REGULAR_')}'],
[1,'{$Labels->GetLabel('_CAM_TM_REVERSED_')}']
]
}),
valueField: 'pm',
displayField: 'pm_txt',
value: {$Cam['pan_model']},
listeners:{
select: function( a, c, b ){
doCamOperation( {$CID}, 8, b );
}
}
},{
html: '&nbsp;'
},{
html: '{$Labels->GetLabel('_CAM_PANANGS_')}'
},{
xtype: 'numberfield',
id: 'pan_ang',
width: '95%',
disabled: ({$Cam['protocol']} == 0),
minValue: 0,
maxValue: 360,
value: {$Cam['pan_angles']},
listeners:{
change: function( a, c, b ){
doCamOperation( {$CID}, 9, c );
}
}
},{
html: '&nbsp;'
},{
html: '{$Labels->GetLabel('_CAM_TILTMOD_')}'
},{
xtype: 'combo',
fieldLabel: '{$Labels->GetLabel('_CAM_TILTMOD_')}',
lazyRender: true,
id: 'tilt_mode',
disabled: ({$Cam['protocol']} == 0),
mode: 'local',
forceSelection: true,
triggerAction: 'all',
editable: false,
disableKeyFilter: true,
store: new Ext.data.ArrayStore({
fields: ['tm','tm_txt'],
data: [
[0,'{$Labels->GetLabel('_CAM_TM_REGULAR_')}'],
[1,'{$Labels->GetLabel('_CAM_TM_REVERSED_')}'],
[2,'{$Labels->GetLabel('_CAM_TM_SHIFTED_')} 90°'],
[3,'{$Labels->GetLabel('_CAM_TM_RSHIFTED_')} 90°']
]
}),
valueField: 'tm',
displayField: 'tm_txt',
value: {$Cam['tilt_model']},
listeners:{
select: function( a, c, b ){
doCamOperation( {$CID}, 10, b );
}
}
},{
html: '&nbsp;'
},{
html: '{$Labels->GetLabel('_CAM_TILTANGS_')}'
},{
xtype: 'numberfield',
id: 'tilt_ang',
width: '95%',
disabled: ({$Cam['protocol']} == 0),
minValue: 0,
maxValue: 180,
value: {$Cam['tilt_angles']},
listeners:{
change: function( a, c, b ){
doCamOperation( {$CID}, 11, c );
}
}
},{
html: '&nbsp;'
}]
},{
layout: 'table',
id: 'cam_loc_ori',
frame: false,
border: false,
layoutConfig: {
columns: 3
},
defaults: {
frame: false,
bodyStyle: 'padding:10px',
border: false
},
items:[{
width: 200,
html: '<table ><tr><td>{$Labels->GetLabel('_AXIS_ROT_')}</td><td><img width="32" src="/style/wicons/rotate-axis-x-512.png"></td></tr></table>'
},{
xtype: 'numberfield',
decimalPrecision: 3,
value: {$Cam['x_rot']},
listeners:{
change: function( a, c, b ){
doCamOperation( {$CID}, 14, c );
}
}
},{
html: '&nbsp;'
},{
html: '<table ><tr><td>{$Labels->GetLabel('_AXIS_ROT_')}</td><td><img width="32" src="/style/wicons/rotate-axis-y-512.png"></td></tr></table>'
},{
xtype: 'numberfield',
decimalPrecision: 3,
value: {$Cam['y_rot']},
listeners:{
change: function( a, c, b ){
doCamOperation( {$CID}, 15, c );
}
}
},{
html: '&nbsp;'
},{
html: '<table ><tr><td>{$Labels->GetLabel('_AXIS_ROT_')}</td><td><img width="32" src="/style/wicons/rotate-axis-z-512.png"></td></tr></table>'
},{
xtype: 'numberfield',
decimalPrecision: 3,
value: {$Cam['z_rot']},
listeners:{
change: function( a, c, b ){
doCamOperation( {$CID}, 16, c );
}
}
},{
html: '&nbsp;'
},{
html: '<table ><tr><td>Δ {$Labels->GetLabel('_FROM_ANCH_')}</td><td><img width="32" src="/style/wicons/rotate-position-x-512.png"></td></tr></table>'
},{
xtype: 'numberfield',
decimalPrecision: 3,
value: {$Cam['x']},
listeners:{
change: function( a, c, b ){
doCamOperation( {$CID}, 17, c );
}
}
},{
html: '&nbsp;'
},{
html: '<table ><tr><td>Δ {$Labels->GetLabel('_FROM_ANCH_')}</td><td><img width="32" src="/style/wicons/rotate-position-y-512.png"></td></tr></table>'
},{
xtype: 'numberfield',
decimalPrecision: 3,
value: {$Cam['y']},
listeners:{
change: function( a, c, b ){
doCamOperation( {$CID}, 18, c );
}
}
},{
html: '&nbsp;'
},{
html: '<table ><tr><td>Δ {$Labels->GetLabel('_FROM_ANCH_')}</td><td><img width="32" src="/style/wicons/rotate-position-z-512.png"></td></tr></table>'
},{
xtype: 'numberfield',
decimalPrecision: 3,
value: {$Cam['z']},
listeners:{
change: function( a, c, b ){
doCamOperation( {$CID}, 19, c );
}
}
},{
html: '&nbsp;'
}]
}]
},{
title: '{$Labels->GetLabel('_TARGETING_TAB_')}',
id: 'target_tab',
frame: false,
border: false,
items:[{
layout: 'table',
frame: false,
border: false,
layoutConfig: {
columns: 3
},
defaults: {
frame: false,
bodyStyle: 'padding:10px',
border: false
},
items:[{
width: 200,
html: '{$Labels->GetLabel('_CAM_LABEL_')}'
},{
xtype: 'textfield',
id: 'cam_label',
width: 200,
value: '{$Cam['node_name']}',
listeners:{
change: function( a, c, b ){
doCamOperation( {$CID}, 20, c );
}
}
},{
xtype: 'spacer'
},{
width: 200,
html: '{$Labels->GetLabel('_CAM_TRIGGERING_MODE_')}'
},{
xtype: 'combo',
lazyRender: true,
id: 'cam_targeting',
mode: 'local',
forceSelection: true,
triggerAction: 'all',
editable: false,
disableKeyFilter: true,
store: new Ext.data.ArrayStore({
fields: ['type','type_txt'],
data: [
[0,'{$Labels->GetLabel('_CAM_TM_STRICT_VISIBLE_')}'],
[1,'{$Labels->GetLabel('_CAM_TM_ALL_NEAR_')}'],
[2,'{$Labels->GetLabel('_CAM_TM_ALL_FAR_')}'],
[3,'{$Labels->GetLabel('_CAM_TM_ALL_')}']
]
}),
value: {$Cam['trigger_mode']},
valueField: 'type',
displayField: 'type_txt',
listeners:{
select: function( a, c, b ){
doCamOperation( {$CID}, 12, b );
}
}
},{
xtype: 'spacer'
},{
width: 200,
html: '{$Labels->GetLabel('_CAM_PREF_ONLY_')}'
},{
xtype: 'checkbox',
id: 'cam_pref_only',
fieldLabel: '',
width: 200,
checked: {$Cam['prefered_events_only']},
listeners:{
check: function( a, c ){
if( c ){
doCamOperation( {$CID}, 40, 1 );
} else {
doCamOperation( {$CID}, 40, 0 );
};
}
}
},{
xtype: 'spacer'
},{
width: 200,
html: '{$Labels->GetLabel('_CAM_AUTO_HOMING_')}'
},{
xtype: 'checkbox',
id: 'cam_horeten',
fieldLabel: '',
width: 200,
checked: {$Cam['homing_enable']},
listeners:{
check: function( a, c ){
if( c ){
doCamOperation( {$CID}, 25, 1 );
} else {
doCamOperation( {$CID}, 25, 0 );
};
}
}
},{
xtype: 'spacer'
},{
width: 200,
html: '{$Labels->GetLabel('_CAM_AH_TIME_')}'
},{
xtype: 'numberfield',
id: 'cam_horetto',
width: 200,
value: '{$Cam['homing_to']}',
listeners:{
change: function( a, c, b ){
doCamOperation( {$CID}, 26, c );
}
}
},{
xtype: 'spacer'
},{
width: 200,
html: '{$Labels->GetLabel('_CAM_AH_TOKEN_')}'
},{
xtype: 'textfield',
id: 'cam_horettk',
fieldLabel: '',
width: 200,
value: '{$Cam['home_token']}',
readOnly: true
},{
xtype: 'spacer'
}]
}]
}]
}
PZAKSJEJSDKGJHGASD;
$Data['status']='ok';
if( $Cam['status'] == 0 ){
$ADDCAMPOPO = '';
} else {
$ADDCAMPOPO = '';
};
if( $CAM_IP ){
switch( $Cam['status'] ){
case 0: $Data['content'] = $TPL_SET_CREDS_IP; break;
default: $Data['content'] = $TPL_CAM_EDITOR; break;
};
} else {
$Data['content'] = $TPL_CAM_EDITOR;
};
} else {
$Data['status']='error';
};
echo $Data['content'];
} else {
header('location: /');
};
?>