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'); if( $CUser->Data['id'] > 1 ){ $Data = array(); $Data['success'] = false; if( isset( $_POST['NID'] ) ) { $NodeID = intval($_POST['NID']); } else $NodeID = 0; if( isset( $_POST['CMD'] ) ){ $CMD = intval( $_POST['CMD'] ); } else { $CMD = 0; }; if( isset( $_POST['PARAM'] ) ){ $PARAM = $DATABASE->escape( $_POST['PARAM'] ); } else { $PARAM = ''; }; if( $NodeID > 0 && $CMD > 0 ){ $Data['success'] = true; $QS = "INSERT INTO `nodes_qcq`(`node_id`,`cmd`,`status`,`parameter`) VALUES({$NodeID},{$CMD},0,'{$PARAM}')"; $Data['query'] = $QS ; @$MEMDB = new SQLite_DB( '/dev/shm/argus/mem_db.db'); $MEMDB->Query( $QS, false ); $Data['operation_id'] = intval( $MEMDB->getLastInsertID() ); } else { $Data['msg']='Wrong Parameters'; }; echo json_encode( $Data ); exit(); }; header('location: /');?>
|