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'); if( $CUser->Data['id'] > 1 ){ $NodeID = intval($_POST['NID']); //$Master = intval($_POST['MST']);
$QS = "SELECT * FROM nodes WHERE id={$NodeID}"; $Data = array(); $result = $DATABASE->Query( $QS, false ); if( count( $result ) ){ $T = $result[0]; $AID = $T['aux_id']; if(isset($_POST['BASH'])){ $BSH = intval( $_POST['BASH'] ); $QS = "UPDATE `lrf_sensors` SET `base_shift`={$BSH} WHERE `id`={$AID}"; $DATABASE->Query( $QS ); }; //if( isset( $_POST['SENSOR'] ) ){
//$S_ID = intval($_POST['SENSOR']);
//if( $S_ID ){
/* $NAME = $DATABASE->escape($_POST['SNAME']); if(isset($_POST['SADDR'])){ $ADDR = intval($_POST['SADDR']); $RANGE = floatval($_POST['SRANGE']); $QS="UPDATE `lrf_sensors` SET `device_id`={$ADDR}, `max_range`={$RANGE} WHERE id={$S_ID}"; $DATABASE->Query( $QS ); //$QS="UPDATE `lrf_sensors` SET `device_id`={$ADDR}, `max_range`={$RANGE}, `label`='{$NAME}' WHERE id={$S_ID}";
//$DATABASE->Query( $QS );
} else { $IP= $DATABASE->escape($_POST['SIPADDR']); $NAME = $DATABASE->escape($_POST['SNAME']); $QS="UPDATE `lrf_sensors` SET `ip_address`='{$IP}' WHERE id={$S_ID}"; $DATABASE->Query( $QS ); //$QS="UPDATE `lrf_sensors` SET `ip_address`='{$IP}', `label`='{$NAME}' WHERE id={$S_ID}";
//$DATABASE->Query( $QS );
}; $QS="UPDATE `nodes` SET `name`='{$NAME}' WHERE `aux_id`={$S_ID}"; $DATABASE->Query( $QS ); */ }; };?>
|