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.

1179 lines
31 KiB

4 years ago
​
​
​
​
​
​
​
​
​
​
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
4 years ago
4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 years ago
4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
4 years ago
4 years ago
​
​
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
3 years ago
3 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
4 years ago
​
​
​
4 years ago
​
​
​
​
​
​
​
​
4 years ago
4 years ago
​
​
​
​
​
​
4 years ago
​
​
​
​
​
​
4 years ago
​
​
​
​
​
4 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <?php
  2. require_once('../ajax_asm.php');
  3. ob_start();
  4. $UID = intval( $CUser->Data['id'] );
  5. $ACCESS = intval( $CUser->Data['access'] );
  6. if( $UID > 1 ){
  7. $CID = intval( $_POST['CID'] );
  8. $QS = "SELECT * FROM `cameras` WHERE `id`={$CID}";
  9. $Result = $DATABASE->Query( $QS, false );
  10. $STREAMS = array();
  11. if( count( $Result ) ){
  12. $Cam = $Result[0];
  13. $QS="SELECT `name` FROM `nodes` WHERE `type`>9 AND `type`<14 AND `aux_id`={$CID}";
  14. $JJ = $DATABASE->Query( $QS );
  15. $Cam['node_name'] = $JJ[0]['name'];
  16. $Cam['name']=urldecode( $Cam['name'] );
  17. $TB = explode( ' ', $Cam['name'] );
  18. $Cam['name'] = $TB[0];
  19. if( stripos($Cam['ip'],'/dev/video') !==false ){
  20. $CLS = "camera_analog_set";
  21. $CAM_IP = false;
  22. } else {
  23. $CAM_IP = true;
  24. $CamLabel = $Cam['name'] . '_' . $CID;
  25. if( stripos( $Cam['name'], 'hikvision' ) !== false ){
  26. $CLS = "camera_hikvision_set";
  27. } elseif( stripos( $Cam['name'], 'dahua' ) !== false ){
  28. $CLS = "camera_dahua_set";
  29. } elseif( stripos( $Cam['name'], 'axis' ) !== false ){
  30. $CLS = "camera_axis_set";
  31. } elseif( stripos( $Cam['name'], 'General' ) !== false ){
  32. $CLS = "cam_vehicle_set";
  33. } else {
  34. $CLS = "camera_generic_set";
  35. };
  36. };
  37. $QS = "SELECT * FROM media_streams WHERE source_id={$CID}";
  38. $Result = $DATABASE->Query($QS,false);
  39. $SELECTED_STREAM = 0;
  40. $STREAMS = array();
  41. if( count( $Result ) > 0 ){
  42. $ii = 0;
  43. foreach( $Result as $CD ){
  44. $STREAMS[] = "[{$CD['id']},'{$CD['name']}','{$CD['img_width']}x{$CD['img_height']}@{$CD['fps']}','{$CD['compression_type']}',{$CD['bitrate']}]";
  45. if( $Cam['stream_id'] == $CD['id'] ) $SELECTED_STREAM = $ii;
  46. $ii++;
  47. };
  48. };
  49. $STREAMS = implode(',',$STREAMS);
  50. $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 ) ";
  51. $RR=$DATABASE->Query( $QS );
  52. if( count( $RR ) ){
  53. $RE=array();
  54. foreach( $RR as $R ){
  55. $RE[] = "[ {$R['aux_id']}, '{$R['device']}']";
  56. };
  57. $UARTS = implode( ',', $RE );
  58. } else {
  59. $UARTS = "[0, \"".$Labels->GetLabel('_NO_UARTS_DEF_')."\"]";
  60. };
  61. $ATAB = 0;
  62. //v4l2-ctl -d /dev/video0 --stream-mmap --stream-count=1 --stream-to=output.jpg
  63. if( $CAM_IP ){
  64. $RESET_CREDENTIALS=<<<kskjhiiuwye
  65. ,{
  66. xtype: 'button',
  67. width: '100%',
  68. text: '{$Labels->GetLabel('_RSET_CREDENTIALS_')}',
  69. handler: function(){
  70. }
  71. }
  72. kskjhiiuwye;
  73. } else {
  74. $RESET_CREDENTIALS='';
  75. };
  76. if( $Cam['status'] < 3 ){
  77. $ADD_CAMERA=<<<hzzhoiuyhetrkh
  78. {
  79. xtype: 'button',
  80. width: '100%',
  81. text: '{$Labels->GetLabel('_ASSIGN_CAMERA_')}',
  82. handler: function(){
  83. Ext.Ajax.request({
  84. url: '/lib/controller/doCameraOperation.php',
  85. params: {
  86. UID: {$UserID},
  87. SID: '{$Session}',
  88. CMD: 2,
  89. CID: {$CID}
  90. },
  91. success: function( response, opts ){
  92. var tData = Ext.decode(response.responseText);
  93. if( tData.status == 'ok' ){
  94. loadDetectedCameras();
  95. } else {
  96. Ext.Msg.show({
  97. title:'{$Labels->GetLabel('_ERROR_')}',
  98. msg: tData.msg,
  99. buttons: Ext.Msg.OK,
  100. icon: Ext.MessageBox.ERROR
  101. });
  102. };
  103. },
  104. failure: failureAJAXFunction
  105. });
  106. }
  107. }
  108. hzzhoiuyhetrkh;
  109. } else {
  110. $RESET_CREDENTIALS='';
  111. $ADD_CAMERA=<<<hhoiuyhetrkh
  112. {
  113. xtype: 'button',
  114. width: '100%',
  115. text: '{$Labels->GetLabel('_REMOVE_CAMERA_')}',
  116. handler: function(){
  117. Ext.Ajax.request({
  118. url: '/lib/controller/doCameraOperation.php',
  119. params: {
  120. UID: {$UserID},
  121. SID: '{$Session}',
  122. CMD: 7,
  123. CID: {$CID}
  124. },
  125. success: function( response, opts ){
  126. var tData = Ext.decode(response.responseText);
  127. if( tData.status == 'ok' ){
  128. loadAssignedCameras();
  129. } else {
  130. Ext.Msg.show({
  131. title:'Error!',
  132. msg: tData.msg,
  133. buttons: Ext.Msg.OK,
  134. icon: Ext.MessageBox.ERROR
  135. });
  136. };
  137. },
  138. failure: failureAJAXFunction
  139. });
  140. }
  141. }
  142. hhoiuyhetrkh;
  143. };
  144. $BBAR_BTN = $ADD_CAMERA;
  145. $TPL_SET_CREDS_IP=<<<ZUZAKA
  146. {
  147. xtype: 'form',
  148. id: 'cam_credentials',
  149. labelWidth: 260,
  150. labelAlign: 'right',
  151. items: [{
  152. xtype: 'panel',
  153. height: 290,
  154. border: false,
  155. frame: false,
  156. html: '<table width="100%" border=0><tr><td height=290 align="center"><div class="{$CLS}"></div></td>'
  157. },{
  158. xtype: 'panel',
  159. html: '<div class="sideInfo_item" id="INFO_ON"><b>{$Cam['ip']}</b><br/>{$Cam['name']}<br/>{$Cam['hardware']}</div>'
  160. },{
  161. xtype: 'panel',
  162. html: '<div class="sideInfo_item" id="INFO_ID">{$Labels->GetLabel('_PROV_CAC_')}</div>'
  163. },{
  164. xtype: 'textfield',
  165. id: 'cam_login',
  166. fieldLabel: '{$Labels->GetLabel('__LOGIN__')}',
  167. width: 200
  168. },{
  169. xtype: 'textfield',
  170. id: 'cam_password',
  171. inputType: 'password',
  172. fieldLabel: '{$Labels->GetLabel('__PASSWORD__')}',
  173. width: 200
  174. },{
  175. xtype: 'combo',
  176. id: 'cam_auth_mode',
  177. fieldLabel: '{$Labels->GetLabel('_AUTH_MODE_0_')}',
  178. lazyRender: true,
  179. mode: 'local',
  180. forceSelection: true,
  181. triggerAction: 'all',
  182. editable: false,
  183. disableKeyFilter: true,
  184. store: new Ext.data.ArrayStore({
  185. fields: ['mode','mode_txt'],
  186. data: [
  187. [0,'BASIC'],
  188. [1,'DIGEST'],
  189. [2,'DIGEST_IE'],
  190. [3,'BEARER'],
  191. [4,'NEGOTIATE'],
  192. [5,'NTLM'],
  193. [6,'NTLM_WB'],
  194. [7,'ANY'],
  195. [8,'ANYSAFE'],
  196. [9,'ONLY'],
  197. [10,'AWS_SIGV4']
  198. ]
  199. }),
  200. valueField: 'mode',
  201. displayField: 'mode_txt',
  202. value: 0,
  203. width: 200
  204. },{
  205. xtype: 'button',
  206. width: '100%',
  207. text: '{$Labels->GetLabel('_SET_CREDENTIALS_')}',
  208. handler: function(){
  209. addDetCamWM = new Ext.LoadMask( Ext.getCmp('cam_credentials').getEl(), {msg:"{$Labels->GetLabel('_Please_Wait_')}..."});
  210. addDetCamWM.show();
  211. var NUU = Ext.getCmp('cam_login').getValue();
  212. var NPP = Ext.getCmp('cam_password').getValue();
  213. var NAM = Ext.getCmp('cam_auth_mode').getValue();
  214. Ext.Ajax.request({
  215. url: '/lib/controller/doCameraOperation.php',
  216. params: {
  217. UID: {$UserID},
  218. SID: '{$Session}',
  219. CID: {$CID},
  220. UU: NUU,
  221. PP: NPP,
  222. AU: NAM,
  223. CMD: 3
  224. },
  225. success: function( response, opts ){
  226. addDetCamWM.hide();
  227. var data = Ext.decode(response.responseText);
  228. if( data.status == 'ok' ){
  229. loadDetectedCameras();
  230. } else {
  231. Ext.Msg.show({
  232. title:'Error!',
  233. msg: data.msg,
  234. buttons: Ext.Msg.OK,
  235. icon: Ext.MessageBox.WARNING
  236. });
  237. };
  238. },
  239. failure: failureAJAXFunction
  240. });
  241. }
  242. }]
  243. }
  244. ZUZAKA;
  245. $TPL_ANALOG_CAM =<<<CHUPAKABRA
  246. {
  247. xtype: 'panel',
  248. id: 'cam_info',
  249. labelWidth: 260,
  250. labelAlign: 'right',
  251. bbar:[{$BBAR_BTN}],
  252. items: [{
  253. xtype: 'panel',
  254. height: 290,
  255. border: false,
  256. frame: false,
  257. html: '<table width="100%" border=0><tr><td height=290 align="center"><div class="{$CLS}"></div></td>'
  258. },{
  259. xtype: 'panel',
  260. html: '<div class="sideInfo_item" id="INFO_ON"><b>{$Cam['ip']}</b><br/>{$Cam['name']}<br/>{$Cam['hardware']}</div>'
  261. }]
  262. }
  263. CHUPAKABRA;
  264. //$QS="SELECT * FROM `module_eve` WHERE `id`=1";
  265. //$S=$DATABASE->Query( $QS );
  266. //$MODULE_DATA = $S[0];
  267. if( $Cam['status'] < 3 ){
  268. $FU = "/lib/controller/getCameraPreview.php?UID={$CUser->Data['id']}&SID={$Session}&FID=";
  269. } else {
  270. //$FU = 'http://' . $_SERVER['SERVER_ADDR'].':' . $MODULE_DATA['web_port'] .'/stream?id=';
  271. $FU = '/video_feed/stream?id=';
  272. };
  273. $TPL_CAM_EDITOR=<<<PZAKSJEJSDKGJHGASD
  274. {
  275. id: 'camedi_tabs',
  276. xtype: 'tabpanel',
  277. activeTab: 0,
  278. bbar:[{$BBAR_BTN}],
  279. items: [{
  280. title: '{$Labels->GetLabel('_CAC_TAB_')}',
  281. id: 'cam_info',
  282. frame: false,
  283. border: false,
  284. items: [{
  285. xtype: 'panel',
  286. height: 290,
  287. border: false,
  288. frame: false,
  289. html: '<table width="100%" border=0><tr><td height=290 align="center"><div class="{$CLS}"></div></td>'
  290. },{
  291. xtype: 'panel',
  292. html: '<div class="sideInfo_item" id="INFO_ON"><b>{$Cam['ip']}</b><br/>{$Cam['name']}<br/>{$Cam['hardware']}</div>'
  293. },{
  294. xtype: 'form',
  295. labelWidth: 200,
  296. border: false,
  297. frame: false,
  298. labelAlign: 'right',
  299. items:[{
  300. xtype: 'checkbox',
  301. id: 'cam_manassign',
  302. fieldLabel: '{$Labels->GetLabel('_STATIC_CONNECTION_')}',
  303. width: 200,
  304. checked: {$Cam['manual']},
  305. listeners:{
  306. check: function( a, c ){
  307. if( c ){
  308. doCamOperation( {$CID}, 24, 1 );
  309. } else {
  310. doCamOperation( {$CID}, 24, 0 );
  311. };
  312. }
  313. }
  314. }]
  315. }{$RESET_CREDENTIALS}]
  316. },{
  317. title: '{$Labels->GetLabel('_STREAMS_')}',
  318. id: 'str_tab',
  319. frame: false,
  320. border: false,
  321. items:[{
  322. xtype: 'grid',
  323. height: 124,
  324. id: 'nd_cam_grid',
  325. frame: false,
  326. ds: new Ext.data.ArrayStore({
  327. fields: ['id','name','size','encode','bitrate'],
  328. data: [{$STREAMS}]
  329. }),
  330. cm: new Ext.grid.ColumnModel({
  331. columns: [
  332. {header: "id", width: 50, sortable: false, menuDisabled: true, align: 'center', fixed: true, css: 'vertical-align: middle;', dataIndex: 'id' },
  333. {header: "Name", dataIndex: 'name' },
  334. {header: "Encoding",width: 120, sortable: false, fixed: true, menuDisabled: true, dataIndex: 'encode' },
  335. {header: "Frame", width: 120, sortable: false, menuDisabled: true, align: 'left', css: 'vertical-align: middle;', dataIndex: 'size' },
  336. {header: "Bitrate", width: 80, sortable: false, fixed: true, menuDisabled: true, align: 'left', css: 'vertical-align: middle;', dataIndex: 'bitrate' }
  337. ],
  338. defaults: {
  339. sortable: false,
  340. menuDisabled: true,
  341. width: 100
  342. }
  343. }),
  344. sm: new Ext.grid.RowSelectionModel({
  345. singleSelect: true,
  346. listeners: {
  347. rowselect: function(sm, row, rec) {
  348. SelectedSource = rec.data.id;
  349. doCamOperation( {$CID}, 1, SelectedSource );
  350. var tt = Ext.getCmp('pic_prev');
  351. if( tt!= undefined ){
  352. //tt.update( '<center><img width="100%" src="/lib/controller/getCameraPreview.php?UID={$CUser->Data['id']}&SID={$Session}&FID='+SelectedSource+'"></center>' );
  353. tt.update( '<center><img width="100%" ondblclick="fullScreen(\'img-{$CID}\');" style="cursor: zoom-in" id="img-{$CID}" src="{$FU}'+SelectedSource+'"></center>' );
  354. };
  355. }
  356. }
  357. }),
  358. listeners:{
  359. viewready: function( t ){
  360. var tt = t.getSelectionModel();
  361. tt.selectRow({$SELECTED_STREAM});
  362. }
  363. }
  364. },{
  365. height: PanelH,
  366. id: 'pic_prev',
  367. html: '<center><img width="100%" src="/style/img/cam_cap0.png"></center>',
  368. listeners:{
  369. afterrender: function( t ){
  370. if( SelectedSource ){
  371. //t.update( '<center><img width="100%" src="/lib/controller/getCameraPreview.php?UID={$CUser->Data['id']}&SID={$Session}&FID='+SelectedSource+'"></center>' );
  372. };
  373. }
  374. }
  375. }],
  376. },{
  377. title: '{$Labels->GetLabel('_CAM_LENS_SETTINGS_')}',
  378. id: 'lens_tab',
  379. frame: false,
  380. border: false,
  381. items:[{
  382. layout: 'table',
  383. frame: false,
  384. border: false,
  385. layoutConfig: {
  386. columns: 3
  387. },
  388. defaults: {
  389. frame: false,
  390. bodyStyle: 'padding:10px',
  391. border: false
  392. },
  393. items:[{
  394. html: '{$Labels->GetLabel('_CAM_ZOOMMO_')}'
  395. },{
  396. xtype: 'combo',
  397. fieldLabel: '{$Labels->GetLabel('_CAM_ZOOMMO_')}',
  398. lazyRender: true,
  399. id: 'zoom_mo',
  400. mode: 'local',
  401. forceSelection: true,
  402. triggerAction: 'all',
  403. editable: false,
  404. disableKeyFilter: true,
  405. store: new Ext.data.ArrayStore({
  406. fields: ['zm','zm_txt'],
  407. data: [
  408. [0,'{$Labels->GetLabel('_CAM_FIXEDZ_')}'],
  409. [1,'{$Labels->GetLabel('_CAM_VARIOZ_')}'],
  410. [2,'{$Labels->GetLabel('_CAM_CUSTOMZ_')}']
  411. ]
  412. }),
  413. valueField: 'zm',
  414. displayField: 'zm_txt',
  415. value: {$Cam['zoom_model']},
  416. listeners:{
  417. select:function( c, r, i ){
  418. doCamOperation( {$CID}, 21, i );
  419. switch( i ){
  420. case 0:{
  421. Ext.getCmp('lbbel0').show();
  422. Ext.getCmp('sens_size').show();
  423. Ext.getCmp('empty0').show();
  424. Ext.getCmp('lbbel11').show();
  425. Ext.getCmp('lens_fl').show();
  426. Ext.getCmp('empty1').show();
  427. Ext.getCmp('lbbel1').hide();
  428. Ext.getCmp('zoom_val').hide();
  429. Ext.getCmp('zoom_d').hide();
  430. Ext.getCmp('lbbel2').hide();
  431. Ext.getCmp('zoom_val2').hide();
  432. Ext.getCmp('zoom_d2').hide();
  433. Ext.getCmp('lbbel3').hide();
  434. Ext.getCmp('zoom_range1').hide();
  435. Ext.getCmp('empup_2').hide();
  436. Ext.getCmp('zoom_perc1').hide();
  437. Ext.getCmp('lbbel4').hide();
  438. Ext.getCmp('empup_3').hide();
  439. break;
  440. };
  441. case 1:{
  442. Ext.getCmp('lbbel2').hide();
  443. Ext.getCmp('zoom_val2').hide();
  444. Ext.getCmp('zoom_d2').hide();
  445. Ext.getCmp('lbbel3').hide();
  446. Ext.getCmp('zoom_range1').hide();
  447. Ext.getCmp('empup_2').hide();
  448. Ext.getCmp('zoom_perc1').hide();
  449. Ext.getCmp('lbbel4').hide();
  450. Ext.getCmp('empup_3').hide();
  451. Ext.getCmp('lbbel0').show();
  452. Ext.getCmp('sens_size').show();
  453. Ext.getCmp('empty0').show();
  454. Ext.getCmp('lbbel11').show();
  455. Ext.getCmp('lens_fl').show();
  456. Ext.getCmp('empty1').show();
  457. Ext.getCmp('lbbel1').show();
  458. Ext.getCmp('zoom_val').show();
  459. Ext.getCmp('zoom_d').show();
  460. break;
  461. };
  462. case 2:{
  463. Ext.getCmp('lbbel0').hide();
  464. Ext.getCmp('sens_size').hide();
  465. Ext.getCmp('empty0').hide();
  466. Ext.getCmp('lbbel11').hide();
  467. Ext.getCmp('lens_fl').hide();
  468. Ext.getCmp('empty1').hide();
  469. Ext.getCmp('lbbel1').hide();
  470. Ext.getCmp('zoom_val').hide();
  471. Ext.getCmp('zoom_d').hide();
  472. Ext.getCmp('lbbel2').show();
  473. Ext.getCmp('zoom_val2').show();
  474. Ext.getCmp('zoom_d2').show();
  475. Ext.getCmp('lbbel3').show();
  476. Ext.getCmp('zoom_range1').show();
  477. Ext.getCmp('empup_2').show();
  478. Ext.getCmp('zoom_perc1').show();
  479. Ext.getCmp('lbbel4').show();
  480. Ext.getCmp('empup_3').show();
  481. break;
  482. };
  483. };
  484. }
  485. }
  486. },{
  487. html: '&nbsp;'
  488. },{
  489. id: 'lbbel0',
  490. width: 200,
  491. hidden: ({$Cam['zoom_model']}==2),
  492. html: '{$Labels->GetLabel('_CAM_SENS_SIZE_')}'
  493. },{
  494. xtype: 'combo',
  495. id: 'sens_size',
  496. hidden: ({$Cam['zoom_model']}==2),
  497. fieldLabel: '{$Labels->GetLabel('_CAM_SENS_SIZE_')}',
  498. lazyRender: true,
  499. mode: 'local',
  500. forceSelection: true,
  501. triggerAction: 'all',
  502. editable: false,
  503. disableKeyFilter: true,
  504. store: new Ext.data.ArrayStore({
  505. fields: ['size','size_txt'],
  506. data: [
  507. [0,'1/3.6"'],
  508. [1,'1/3.2"'],
  509. [2,'1/3"'],
  510. [3,'1/2.7"'],
  511. [4,'1/2"'],
  512. [5,'1/1.8"'],
  513. [6,'2/3"'],
  514. [7,'1"'],
  515. [8,'4/3"'],
  516. [9,'APS-C'],
  517. [10,'35 mm'],
  518. [11,'645']
  519. ]
  520. }),
  521. valueField: 'size',
  522. displayField: 'size_txt',
  523. value: {$Cam['imager_type']},
  524. listeners:{
  525. select:function( c, r, i ){
  526. doCamOperation( {$CID}, 2, i );
  527. }
  528. }
  529. },{
  530. id: 'empty0',
  531. hidden: ({$Cam['zoom_model']}==2),
  532. html: '&nbsp;'
  533. },{
  534. id: 'lbbel11',
  535. hidden: ({$Cam['zoom_model']}==2),
  536. html: '{$Labels->GetLabel('_CAM_FOCALL_')}'
  537. },{
  538. xtype: 'combo',
  539. id: 'lens_fl',
  540. hidden: ({$Cam['zoom_model']}==2),
  541. fieldLabel: '{$Labels->GetLabel('_CAM_FOCALL_')}',
  542. lazyRender: true,
  543. mode: 'local',
  544. forceSelection: true,
  545. triggerAction: 'all',
  546. editable: false,
  547. disableKeyFilter: true,
  548. store: new Ext.data.ArrayStore({
  549. fields: ['fl','fl_txt'],
  550. data: [
  551. [0,'2.7 mm.'],
  552. [1,'3.0 mm.'],
  553. [2,'3.2 mm.'],
  554. [3,'3.5 mm.'],
  555. [4,'3.7 mm.'],
  556. [5,'3.9 mm.'],
  557. [6,'4.0 mm.'],
  558. [7,'4.3 mm.'],
  559. [8,'4.8 mm.'],
  560. [9,'5.0 mm.'],
  561. [10,'5.1 mm.'],
  562. [11,'5.5 mm.'],
  563. [12,'5.8 mm.'],
  564. [13,'6.0 mm.'],
  565. [14,'6.2 mm.'],
  566. [15,'6.6 mm.'],
  567. [16,'7.0 mm.'],
  568. [17,'7.1 mm.'],
  569. [18,'7.5 mm.'],
  570. [19,'7.6 mm.'],
  571. [20,'8.0 mm.'],
  572. [21,'8.6 mm.'],
  573. [22,'8.9 mm.'],
  574. [23,'9.0 mm.'],
  575. [24,'9.2 mm.'],
  576. [25,'9.3 mm.'],
  577. [26,'10.0 mm.'],
  578. [27,'10.5 mm.'],
  579. [28,'10.6 mm.'],
  580. [29,'10.7 mm.'],
  581. [30,'11.0 mm.'],
  582. [31,'11.3 mm.'],
  583. [32,'12.0 mm.'],
  584. [33,'12.9 mm.'],
  585. [34,'13.0 mm.'],
  586. [35,'13.5 mm.'],
  587. [36,'13.6 mm.'],
  588. [37,'14.0 mm.'],
  589. [38,'14.6 mm.'],
  590. [39,'15.0 mm.'],
  591. [40,'15.1 mm.'],
  592. [41,'15.5 mm.'],
  593. [42,'16.0 mm.'],
  594. [43,'17.0 mm.'],
  595. [44,'17.5 mm.'],
  596. [44,'17.7 mm.'],
  597. [45,'18.0 mm.'],
  598. [46,'18.2 mm.'],
  599. [47,'19.0 mm.']
  600. ]
  601. }),
  602. valueField: 'fl',
  603. displayField: 'fl_txt',
  604. value: {$Cam['lens_f']},
  605. listeners:{
  606. select:function( c, r, i ){
  607. doCamOperation( {$CID}, 3, i );
  608. }
  609. }
  610. },{
  611. id: 'empty1',
  612. hidden: ({$Cam['zoom_model']}==2),
  613. html: '&nbsp;'
  614. },{
  615. id: 'lbbel1',
  616. hidden: ({$Cam['zoom_model']}!=1),
  617. html: '{$Labels->GetLabel('_CAM_ZOOMR_')}'
  618. },{
  619. xtype: 'slider',
  620. id: 'zoom_val',
  621. hidden: ({$Cam['zoom_model']}!=1),
  622. disabled: ( parseFloat({$Cam['zoom']})==0 ),
  623. minValue: 1.0,
  624. maxValue: 140.0,
  625. value: {$Cam['zoom']},
  626. listeners:{
  627. change: function( a, c, b ){
  628. doCamOperation( {$CID}, 4, c );
  629. var zz = Ext.getCmp('zoom_d');
  630. if( zz.rendered ) zz.update('<p>X&nbsp;'+ c + '</p>');
  631. }
  632. }
  633. },{
  634. id: 'zoom_d',
  635. hidden: ({$Cam['zoom_model']}!=1),
  636. html: (( parseFloat({$Cam['zoom']})==0 )?'&nbsp;':'<p>X&nbsp;'+ {$Cam['zoom']} + '</p>' )
  637. },{
  638. id: 'lbbel3',
  639. hidden: ({$Cam['zoom_model']}!=2),
  640. html: '{$Labels->GetLabel('_CAM_MAX_RANGE_')}'
  641. },{
  642. xtype: 'numberfield',
  643. id: 'zoom_range1',
  644. width: 240,
  645. hidden: ({$Cam['zoom_model']}!=2),
  646. value: {$Cam['max_range']},
  647. listeners:{
  648. change: function( a, c, b ){
  649. doCamOperation( {$CID}, 22, c );
  650. }
  651. }
  652. },{
  653. id: 'empup_2',
  654. hidden: ({$Cam['zoom_model']}!=2),
  655. html: '{$Labels->GetLabel('_METERS_')}'
  656. },{
  657. id: 'lbbel4',
  658. hidden: ({$Cam['zoom_model']}!=2),
  659. html: ''
  660. },{
  661. id: 'zoom_perc1',
  662. width: 240,
  663. hidden: ({$Cam['zoom_model']}!=2),
  664. html: '<center><p>'+ {$Cam['zoom']} + '%</p></center>'
  665. },{
  666. id: 'empup_3',
  667. hidden: ({$Cam['zoom_model']}!=2),
  668. html: ''
  669. },{
  670. id: 'lbbel2',
  671. hidden: ({$Cam['zoom_model']}!=2),
  672. style: {
  673. marginLeft: '120px' //https://www.biostar.com.tw/app/en/eol/introduction.php?S_ID=711
  674. },
  675. html: '<img width="32px" src="/style/wicons/wide.png"/>'
  676. },{
  677. xtype: 'slider',
  678. id: 'zoom_val2',
  679. hidden: ({$Cam['zoom_model']}!=2),
  680. minValue: 1.0,
  681. maxValue: 100.0,
  682. value: {$Cam['zoom']},
  683. listeners:{
  684. change: function( a, c, b ){
  685. doCamOperation( {$CID}, 23, c );
  686. var zz = Ext.getCmp('zoom_perc1');
  687. if( zz.rendered ) zz.update('<center><p>'+ c + '%</p></center>');
  688. }
  689. }
  690. },{
  691. id: 'zoom_d2',
  692. hidden: ({$Cam['zoom_model']}!=2),
  693. html: '<img width="32px" src="/style/wicons/narrow.png"/>'
  694. }]
  695. }]
  696. },{
  697. title: '{$Labels->GetLabel('_PTZ_TAB_')}',
  698. id: 'ptz_tab',
  699. frame: false,
  700. border: false,
  701. items:[{
  702. layout: 'table',
  703. frame: false,
  704. border: false,
  705. layoutConfig: {
  706. columns: 3
  707. },
  708. defaults: {
  709. frame: false,
  710. bodyStyle: 'padding:10px',
  711. border: false
  712. },
  713. items:[{
  714. width: 200,
  715. html: '{$Labels->GetLabel('__PTZ_CONTROL__')}'
  716. },{
  717. xtype: 'combo',
  718. fieldLabel: '{$Labels->GetLabel('__PTZ_CONTROL__')}',
  719. lazyRender: true,
  720. id: 'ptz_proto',
  721. mode: 'local',
  722. forceSelection: true,
  723. triggerAction: 'all',
  724. editable: false,
  725. disableKeyFilter: true,
  726. store: new Ext.data.ArrayStore({
  727. fields: ['type','type_txt'],
  728. data: [
  729. [0,'{$Labels->GetLabel('_NO_PTZ_')}'],
  730. [1,'Sony VISCA'],
  731. [2,'Pelco-D'],
  732. [3,'OnVif'],
  733. [4,'PSIA'],
  734. [5,'GB/T28181']
  735. ]
  736. }),
  737. value: {$Cam['protocol']},
  738. valueField: 'type',
  739. displayField: 'type_txt',
  740. listeners:{
  741. select: function( a, c, b ){
  742. doCamOperation( {$CID}, 5, b );
  743. if( b > 0 ){
  744. if( b != 3 ){
  745. Ext.getCmp('uart_id').enable();
  746. Ext.getCmp('prot_id').enable();
  747. } else {
  748. Ext.getCmp('uart_id').disable();
  749. Ext.getCmp('prot_id').disable();
  750. };
  751. Ext.getCmp('pan_mode').enable();
  752. Ext.getCmp('tilt_mode').enable();
  753. Ext.getCmp('pan_ang').enable();
  754. Ext.getCmp('tilt_ang').enable();
  755. } else {
  756. Ext.getCmp('uart_id').disable();
  757. Ext.getCmp('prot_id').disable();
  758. Ext.getCmp('pan_mode').disable();
  759. Ext.getCmp('tilt_mode').disable();
  760. Ext.getCmp('pan_ang').disable();
  761. Ext.getCmp('tilt_ang').disable();
  762. };
  763. }
  764. }
  765. },{
  766. html: '&nbsp;'
  767. },{
  768. html: '{$Labels->GetLabel('_UART_PORT_')}'
  769. },{
  770. xtype: 'combo',
  771. fieldLabel: '{$Labels->GetLabel('_UART_PORT_')}',
  772. lazyRender: true,
  773. id: 'uart_id',
  774. mode: 'local',
  775. forceSelection: true,
  776. triggerAction: 'all',
  777. editable: false,
  778. disableKeyFilter: true,
  779. disabled: (({$Cam['protocol']}!=1 ) && ( {$Cam['protocol']}!=2 )),
  780. store: new Ext.data.ArrayStore({
  781. fields: ['uart','uart_txt'],
  782. data: [{$UARTS}]
  783. }),
  784. valueField: 'uart',
  785. displayField: 'uart_txt',
  786. value: {$Cam['uart_id']},
  787. listeners:{
  788. select: function( a, c, b ){
  789. doCamOperation( {$CID}, 6, b );
  790. }
  791. }
  792. },{
  793. html: '&nbsp;'
  794. },{
  795. html: '{$Labels->GetLabel('_CAM_PROTO_ID_')}'
  796. },{
  797. xtype: 'numberfield',
  798. id: 'prot_id',
  799. width: '95%',
  800. disabled: (({$Cam['protocol']}!=1 ) && ( {$Cam['protocol']}!=2 )),
  801. minValue: 0,
  802. maxValue: 255,
  803. value: {$Cam['protocol_aux']},
  804. listeners:{
  805. change: function( a, c, b ){
  806. doCamOperation( {$CID}, 7, c );
  807. }
  808. }
  809. },{
  810. html: '&nbsp;'
  811. },{
  812. html: '{$Labels->GetLabel('_CAM_PANMOD_')}'
  813. },{
  814. xtype: 'combo',
  815. fieldLabel: '{$Labels->GetLabel('_CAM_PANMOD_')}',
  816. lazyRender: true,
  817. id: 'pan_mode',
  818. disabled: ({$Cam['protocol']} == 0),
  819. mode: 'local',
  820. forceSelection: true,
  821. triggerAction: 'all',
  822. editable: false,
  823. disableKeyFilter: true,
  824. store: new Ext.data.ArrayStore({
  825. fields: ['pm','pm_txt'],
  826. data: [
  827. [0,'{$Labels->GetLabel('_CAM_TM_REGULAR_')}'],
  828. [1,'{$Labels->GetLabel('_CAM_TM_REVERSED_')}']
  829. ]
  830. }),
  831. valueField: 'pm',
  832. displayField: 'pm_txt',
  833. value: {$Cam['pan_model']},
  834. listeners:{
  835. select: function( a, c, b ){
  836. doCamOperation( {$CID}, 8, b );
  837. }
  838. }
  839. },{
  840. html: '&nbsp;'
  841. },{
  842. html: '{$Labels->GetLabel('_CAM_PANANGS_')}'
  843. },{
  844. xtype: 'numberfield',
  845. id: 'pan_ang',
  846. width: '95%',
  847. disabled: ({$Cam['protocol']} == 0),
  848. minValue: 0,
  849. maxValue: 360,
  850. value: {$Cam['pan_angles']},
  851. listeners:{
  852. change: function( a, c, b ){
  853. doCamOperation( {$CID}, 9, c );
  854. }
  855. }
  856. },{
  857. html: '&nbsp;'
  858. },{
  859. html: '{$Labels->GetLabel('_CAM_TILTMOD_')}'
  860. },{
  861. xtype: 'combo',
  862. fieldLabel: '{$Labels->GetLabel('_CAM_TILTMOD_')}',
  863. lazyRender: true,
  864. id: 'tilt_mode',
  865. disabled: ({$Cam['protocol']} == 0),
  866. mode: 'local',
  867. forceSelection: true,
  868. triggerAction: 'all',
  869. editable: false,
  870. disableKeyFilter: true,
  871. store: new Ext.data.ArrayStore({
  872. fields: ['tm','tm_txt'],
  873. data: [
  874. [0,'{$Labels->GetLabel('_CAM_TM_REGULAR_')}'],
  875. [1,'{$Labels->GetLabel('_CAM_TM_REVERSED_')}'],
  876. [2,'{$Labels->GetLabel('_CAM_TM_SHIFTED_')} 90�'],
  877. [3,'{$Labels->GetLabel('_CAM_TM_RSHIFTED_')} 90�']
  878. ]
  879. }),
  880. valueField: 'tm',
  881. displayField: 'tm_txt',
  882. value: {$Cam['tilt_model']},
  883. listeners:{
  884. select: function( a, c, b ){
  885. doCamOperation( {$CID}, 10, b );
  886. }
  887. }
  888. },{
  889. html: '&nbsp;'
  890. },{
  891. html: '{$Labels->GetLabel('_CAM_TILTANGS_')}'
  892. },{
  893. xtype: 'numberfield',
  894. id: 'tilt_ang',
  895. width: '95%',
  896. disabled: ({$Cam['protocol']} == 0),
  897. minValue: 0,
  898. maxValue: 180,
  899. value: {$Cam['tilt_angles']},
  900. listeners:{
  901. change: function( a, c, b ){
  902. doCamOperation( {$CID}, 11, c );
  903. }
  904. }
  905. },{
  906. html: '&nbsp;'
  907. },{
  908. html: '{$Labels->GetLabel('_CAM_PTZ_AAC_')}'
  909. },{
  910. xtype: 'checkbox',
  911. id: 'ptz_axel_c',
  912. disabled: ({$Cam['protocol']} == 0),
  913. checked: ({$Cam['ptz_axel']} < 6 ),
  914. listeners:{
  915. check: function( a, c ){
  916. if( c ){
  917. doCamOperation( {$CID}, 13, 0 );
  918. var zz = Ext.getCmp('ptz_axel');
  919. zz.disable();
  920. } else {
  921. var zz = Ext.getCmp('ptz_axel');
  922. zz.enable();
  923. var vava = zz.getValue();
  924. if( vava < 5 ){
  925. vava = 5;
  926. zz.setValue( vava, true );
  927. } else {
  928. doCamOperation( {$CID}, 13, vava );
  929. };
  930. var jj = Ext.getCmp('ptz_axel_d');
  931. if( jj.rendered ) jj.update('<p>X&nbsp;'+ vava + '</p>');
  932. };
  933. }
  934. }
  935. },{
  936. html: '&nbsp;'
  937. },{
  938. html: '{$Labels->GetLabel('_CAM_PTZ_MAC_')}'
  939. },{
  940. xtype: 'slider',
  941. id: 'ptz_axel',
  942. disabled: (({$Cam['protocol']} == 0)||({$Cam['ptz_axel']} < 6)),
  943. minValue: 5,
  944. maxValue: 20,
  945. value: {$Cam['ptz_axel']},
  946. listeners:{
  947. change: function( a, c, b ){
  948. doCamOperation( {$CID}, 13, c );
  949. var zz = Ext.getCmp('ptz_axel_d');
  950. if( zz.rendered ) zz.update('<p>X&nbsp;'+ c + '</p>');
  951. }
  952. }
  953. },{
  954. id: 'ptz_axel_d',
  955. html: '<p>X&nbsp;'+ {$Cam['ptz_axel']} + '</p>'
  956. },{
  957. html: '<table ><tr><td>{$Labels->GetLabel('_AXIS_ROT_')}</td><td><img width="32" src="/style/wicons/rotate-axis-x-512.png"></td></tr></table>'
  958. },{
  959. xtype: 'numberfield',
  960. decimalPrecision: 3,
  961. value: {$Cam['x_rot']},
  962. listeners:{
  963. change: function( a, c, b ){
  964. doCamOperation( {$CID}, 14, c );
  965. }
  966. }
  967. },{
  968. html: '&nbsp;'
  969. },{
  970. html: '<table ><tr><td>{$Labels->GetLabel('_AXIS_ROT_')}</td><td><img width="32" src="/style/wicons/rotate-axis-y-512.png"></td></tr></table>'
  971. },{
  972. xtype: 'numberfield',
  973. decimalPrecision: 3,
  974. value: {$Cam['y_rot']},
  975. listeners:{
  976. change: function( a, c, b ){
  977. doCamOperation( {$CID}, 15, c );
  978. }
  979. }
  980. },{
  981. html: '&nbsp;'
  982. },{
  983. html: '<table ><tr><td>{$Labels->GetLabel('_AXIS_ROT_')}</td><td><img width="32" src="/style/wicons/rotate-axis-z-512.png"></td></tr></table>'
  984. },{
  985. xtype: 'numberfield',
  986. decimalPrecision: 3,
  987. value: {$Cam['z_rot']},
  988. listeners:{
  989. change: function( a, c, b ){
  990. doCamOperation( {$CID}, 16, c );
  991. }
  992. }
  993. },{
  994. html: '&nbsp;'
  995. },{
  996. html: '<table ><tr><td>Δ {$Labels->GetLabel('_FROM_ANCH_')}</td><td><img width="32" src="/style/wicons/rotate-position-x-512.png"></td></tr></table>'
  997. },{
  998. xtype: 'numberfield',
  999. decimalPrecision: 3,
  1000. value: {$Cam['x']},
  1001. listeners:{
  1002. change: function( a, c, b ){
  1003. doCamOperation( {$CID}, 17, c );
  1004. }
  1005. }
  1006. },{
  1007. html: '&nbsp;'
  1008. },{
  1009. html: '<table ><tr><td>Δ {$Labels->GetLabel('_FROM_ANCH_')}</td><td><img width="32" src="/style/wicons/rotate-position-y-512.png"></td></tr></table>'
  1010. },{
  1011. xtype: 'numberfield',
  1012. decimalPrecision: 3,
  1013. value: {$Cam['y']},
  1014. listeners:{
  1015. change: function( a, c, b ){
  1016. doCamOperation( {$CID}, 18, c );
  1017. }
  1018. }
  1019. },{
  1020. html: '&nbsp;'
  1021. },{
  1022. html: '<table ><tr><td>Δ {$Labels->GetLabel('_FROM_ANCH_')}</td><td><img width="32" src="/style/wicons/rotate-position-z-512.png"></td></tr></table>'
  1023. },{
  1024. xtype: 'numberfield',
  1025. decimalPrecision: 3,
  1026. value: {$Cam['z']},
  1027. listeners:{
  1028. change: function( a, c, b ){
  1029. doCamOperation( {$CID}, 19, c );
  1030. }
  1031. }
  1032. },{
  1033. html: '&nbsp;'
  1034. }]
  1035. }]
  1036. },{
  1037. title: '{$Labels->GetLabel('_TARGETING_TAB_')}',
  1038. id: 'target_tab',
  1039. frame: false,
  1040. border: false,
  1041. items:[{
  1042. layout: 'table',
  1043. frame: false,
  1044. border: false,
  1045. layoutConfig: {
  1046. columns: 3
  1047. },
  1048. defaults: {
  1049. frame: false,
  1050. bodyStyle: 'padding:10px',
  1051. border: false
  1052. },
  1053. items:[{
  1054. width: 200,
  1055. html: '{$Labels->GetLabel('_CAM_LABEL_')}'
  1056. },{
  1057. xtype: 'textfield',
  1058. id: 'cam_label',
  1059. width: 200,
  1060. value: '{$Cam['node_name']}',
  1061. listeners:{
  1062. change: function( a, c, b ){
  1063. doCamOperation( {$CID}, 20, c );
  1064. }
  1065. }
  1066. },{
  1067. xtype: 'spacer'
  1068. },{
  1069. width: 200,
  1070. html: '{$Labels->GetLabel('_CAM_TRIGGERING_MODE_')}'
  1071. },{
  1072. xtype: 'combo',
  1073. lazyRender: true,
  1074. id: 'cam_targeting',
  1075. mode: 'local',
  1076. forceSelection: true,
  1077. triggerAction: 'all',
  1078. editable: false,
  1079. disableKeyFilter: true,
  1080. store: new Ext.data.ArrayStore({
  1081. fields: ['type','type_txt'],
  1082. data: [
  1083. [0,'{$Labels->GetLabel('_CAM_TM_STRICT_VISIBLE_')}'],
  1084. [1,'{$Labels->GetLabel('_CAM_TM_ALL_NEAR_')}'],
  1085. [2,'{$Labels->GetLabel('_CAM_TM_ALL_FAR_')}'],
  1086. [3,'{$Labels->GetLabel('_CAM_TM_ALL_')}']
  1087. ]
  1088. }),
  1089. value: {$Cam['trigger_mode']},
  1090. valueField: 'type',
  1091. displayField: 'type_txt',
  1092. listeners:{
  1093. select: function( a, c, b ){
  1094. doCamOperation( {$CID}, 12, b );
  1095. }
  1096. }
  1097. },{
  1098. xtype: 'spacer'
  1099. },{
  1100. width: 200,
  1101. html: '{$Labels->GetLabel('_CAM_AUTO_HOMING_')}'
  1102. },{
  1103. xtype: 'checkbox',
  1104. id: 'cam_horeten',
  1105. fieldLabel: '',
  1106. width: 200,
  1107. checked: {$Cam['homing_enable']},
  1108. listeners:{
  1109. check: function( a, c ){
  1110. if( c ){
  1111. doCamOperation( {$CID}, 25, 1 );
  1112. } else {
  1113. doCamOperation( {$CID}, 25, 0 );
  1114. };
  1115. }
  1116. }
  1117. },{
  1118. xtype: 'spacer'
  1119. },{
  1120. width: 200,
  1121. html: '{$Labels->GetLabel('_CAM_AH_TIME_')}'
  1122. },{
  1123. xtype: 'numberfield',
  1124. id: 'cam_horetto',
  1125. width: 200,
  1126. value: '{$Cam['homing_to']}',
  1127. listeners:{
  1128. change: function( a, c, b ){
  1129. doCamOperation( {$CID}, 26, c );
  1130. }
  1131. }
  1132. },{
  1133. xtype: 'spacer'
  1134. },{
  1135. width: 200,
  1136. html: '{$Labels->GetLabel('_CAM_AH_TOKEN_')}'
  1137. },{
  1138. xtype: 'textfield',
  1139. id: 'cam_horettk',
  1140. fieldLabel: '',
  1141. width: 200,
  1142. value: '{$Cam['home_token']}',
  1143. readOnly: true
  1144. },{
  1145. xtype: 'spacer'
  1146. }]
  1147. }]
  1148. }]
  1149. }
  1150. PZAKSJEJSDKGJHGASD;
  1151. $Data['status']='ok';
  1152. if( $Cam['status'] == 0 ){
  1153. $ADDCAMPOPO = '';
  1154. } else {
  1155. $ADDCAMPOPO = '';
  1156. };
  1157. if( $CAM_IP ){
  1158. switch( $Cam['status'] ){
  1159. case 0: $Data['content'] = $TPL_SET_CREDS_IP; break;
  1160. default: $Data['content'] = $TPL_CAM_EDITOR; break;
  1161. };
  1162. } else {
  1163. $Data['content'] = $TPL_CAM_EDITOR;
  1164. };
  1165. } else {
  1166. $Data['status']='error';
  1167. };
  1168. echo $Data['content'];
  1169. } else {
  1170. header('location: /');
  1171. };
  1172. ?>