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.
 
 
 
 

40 lines
2.9 KiB

<?php
require_once('../ajax_asm.php');
if( $CUser->Data['id'] > 1 ){
if( isset( $_POST['NID'] ) ) $NID = intval($_POST['NID']); else $NID = 0;
if( isset( $_POST['PID'] ) ) $PID = intval($_POST['PID']); else $PID = 0;
if( $PID > 3 ) $PID = 3;
if( $NID ){
$QS = "SELECT `aux_id` FROM `nodes` WHERE `id`={$NID}";
$RR = $DATABASE->Query( $QS, false );
$CSID = intval( $RR[0]['aux_id'] );
if( $CSID ){
if( isset( $_POST['MOFS'] ) ) $MOFS = intval( $_POST['MOFS'] ); else $MOFS = 10;
if( isset( $_POST['MDEL'] ) ) $MDEL = intval( $_POST['MDEL'] ); else $MDEL = 20;
if( isset( $_POST['MWIT'] ) ) $MWIT = intval( $_POST['MWIT'] ); else $MWIT = 1800;
if( isset( $_POST['MORD'] ) ) $MORD = intval( $_POST['MORD'] ); else $MORD = 5;
if( isset( $_POST['MSST'] ) ) $MSST = intval( $_POST['MSST'] ); else $MSST = 1;
if( isset( $_POST['MFLP'] ) ) $MFLP = intval( $_POST['MFLP'] ); else $MFLP = 16;
if( isset( $_POST['MSUN'] ) ) $MSUN = intval( $_POST['MSUN'] ); else $MSUN = 100;
if( isset( $_POST['MGP'] ) ) $MGP = intval( $_POST['MGP'] ); else $MGP = 8;
if( isset( $_POST['MSPK'] ) ) $MSPK = intval( $_POST['MSPK'] ); else $MSPK = 2;
if( isset( $_POST['SOFS'] ) ) $SOFS = intval( $_POST['SOFS'] ); else $SOFS = 10;
if( isset( $_POST['SDEL'] ) ) $SDEL = intval( $_POST['SDEL'] ); else $SDEL = 20;
if( isset( $_POST['SWIT'] ) ) $SWIT = intval( $_POST['SWIT'] ); else $SWIT = 1800;
if( isset( $_POST['SORD'] ) ) $SORD = intval( $_POST['SORD'] ); else $SORD = 5;
if( isset( $_POST['SSST'] ) ) $SSST = intval( $_POST['SSST'] ); else $SSST = 1;
if( isset( $_POST['SFLP'] ) ) $SFLP = intval( $_POST['SFLP'] ); else $SFLP = 16;
if( isset( $_POST['SSUN'] ) ) $SSUN = intval( $_POST['SSUN'] ); else $SSUN = 100;
if( isset( $_POST['SGP'] ) ) $SGP = intval( $_POST['SGP'] ); else $SGP = 8;
if( isset( $_POST['SSPK'] ) ) $SSPK = intval( $_POST['SSPK'] ); else $SSPK = 2;
$QS = "INSERT INTO `lrf_detection_profiles` SET `aux_id`={$CSID}, `profile_id`={$PID}, `master`=b'1', `order`={$MORD},`offset`={$MOFS},`delta`={$MDEL},`flip`={$MFLP},`width`={$MWIT},`sst`={$MSST},`sun`={$MSUN},`gp`={$MGP},`spikes`={$MSPK} ON DUPLICATE KEY UPDATE `order`={$MORD},`offset`={$MOFS},`delta`={$MDEL},`flip`={$MFLP},`width`={$MWIT},`sst`={$MSST},`sun`={$MSUN},`gp`={$MGP},`spikes`={$MSPK}";
$DATABASE->Query( $QS );
$QS = "INSERT INTO `lrf_detection_profiles` SET `aux_id`={$CSID}, `profile_id`={$PID}, `master`=b'0', `order`={$SORD},`offset`={$SOFS},`delta`={$SDEL},`flip`={$SFLP},`width`={$SWIT},`sst`={$SSST},`sun`={$SSUN},`gp`={$SGP},`spikes`={$SSPK} ON DUPLICATE KEY UPDATE `order`={$SORD},`offset`={$SOFS},`delta`={$SDEL},`flip`={$SFLP},`width`={$SWIT},`sst`={$SSST},`sun`={$SSUN},`gp`={$SGP},`spikes`={$SSPK}";
$DATABASE->Query( $QS );
$NCMD = 100+$PID;
$QS = "INSERT INTO `nodes_qcq` SET `node_id`={$NID}, `cmd`={$NCMD}";
$DATABASE->Query( $QS );
};
};
};
?>