Web UI for ARGUS server
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.
 
 
 
 

26 lines
903 B

<?php
require_once('../ajax_asm.php');
if( $CUser->Data['id'] > 1 ){
if( isset( $_POST['UART'] ) ){
$UART_ID = intval($_POST['UART']);
if( $UART_ID ){
$UART_SPEED = intval($_POST['USPD']);
$UART_BIT = intval($_POST['UBIT']);
$UART_STOP = floatval($_POST['USTP']);
switch( strtoupper( substr( $_POST['UPAR'], 1 ) ) ){
case 'E': $UART_PARITY = 'E'; break;
case 'O': $UART_PARITY = 'O'; break;
default:
$UART_PARITY = 'N';
};
$UART_IP = $DATABASE->escape( $_POST['UADR'] );
$UART_PORT = intval( $_POST['UPOR'] );
$UART_MODE = intval( $_POST['UMOD'] );
if( $UART_PORT > 0 ){
$QS="UPDATE `uart_settings` SET `speed`={$UART_SPEED}, `bit`={$UART_BIT}, `parity`='{$UART_PARITY}', `stop_bit`={$UART_STOP}, `port`={$UART_PORT}, `path`='{$UART_IP}', `mode`={$UART_MODE} WHERE id ={$UART_ID}";
$DATABASE->Query( $QS );
};
};
};
};
?>