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 =<<  
    ', 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: '
Proceed to Cameras Settings to Assign One
' },{ xtype: 'spacer', height: 20 },{ xtype: 'button', width: '100%', text: 'Open Camera Settings', handler: function(){ showContent( 2020 ); } }] }); jaja.doLayout(); } } } jodjhowierewt; $LOGIO=<<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 '[]'; }; ?>