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.
|
|
<?php require_once('../ajax_asm.php'); ob_start(); $UID = intval( $CUser->Data['id'] ); $ACCESS = intval( $CUser->Data['access'] ); if( $UID > 1 ){ $QS = "SELECT * FROM modules"; $Result = $DATABASE->Query( $QS, false ); if( count( $Result ) ){ foreach( $Result as $R ){ $QS = "SELECT * FROM module_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: case 11: case 12: case 13: $ModPart[] = '{ xtype: \'panel\', boder: false, frame: false, html: \'<a class="sideInfo_item" id="UART_'.(($R['enabled']==0)?'N':'O').'" onclick="editModule('.$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: /'); };
?>
|