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.
23 lines
803 B
23 lines
803 B
<?php
|
|
require_once('../ajax_asm.php');
|
|
ob_start();
|
|
if( $CUser->Data['id'] > 1 ){
|
|
$Data['status'] = 'na';
|
|
$EID = intval( $_POST['PID'] );
|
|
$QS = "SELECT * FROM `modbus_modules` WHERE `platform_id`={$EID}";
|
|
$Result = $DATABASE->Query( $QS, false );
|
|
if( count( $Result ) ){
|
|
$SenPart = array();
|
|
foreach( $Result as $R ){
|
|
$AA = ($R['wm']=='E')?'active_green':'active_gray';
|
|
$SenPart[] = '{ xtype: \'panel\', boder: false, frame: false, html: \'<a class="sideInfo_item '.$AA.'" onclick="editScadaModule('.$R['id'].');">'.$R['ip4'].' '.urldecode($R['label']).'</a>\'}';
|
|
};
|
|
$Data['status']='ok';
|
|
$Data['modules'] = '['.implode( ',', $SenPart ) .']';
|
|
};
|
|
$Data['messages'] = ob_get_clean();
|
|
echo json_encode( $Data );
|
|
} else {
|
|
header('location: /');
|
|
};
|
|
?>
|