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.
45 lines
1.2 KiB
45 lines
1.2 KiB
<?php
|
|
require_once('../ajax_asm.php');
|
|
if( $CUser->Data['id'] > 1 && $CUser->Data['access'] > 5 ){
|
|
$Data = array();
|
|
$Data['success'] = false;
|
|
if( isset( $_POST['OPID'] ) ){
|
|
$CMD = intval( $_POST['OPID'] );
|
|
} else {
|
|
$CMD = 0;
|
|
};
|
|
if( $CMD > 0 ){
|
|
switch( $CMD ){
|
|
case 1:{//Debug Mode
|
|
$PARAM = intval( $_POST['OPCODE'] );
|
|
$QS = "UPDATE `system_props` SET `work_mode`={$PARAM} WHERE `id`=1";
|
|
$DATABASE->Query( $QS );
|
|
$Data['q'] = $QS;
|
|
$Data['success'] = true;
|
|
break;
|
|
};
|
|
case 2:{//Layout
|
|
$PARAM = intval( $_POST['OPCODE'] );
|
|
$QS = "UPDATE `system_props` SET `app_layout`={$PARAM} WHERE `id`=1";
|
|
$DATABASE->Query( $QS );
|
|
$Data['q'] = $QS;
|
|
$Data['success'] = true;
|
|
break;
|
|
};
|
|
case 3:{
|
|
$RBASE = new SQLite_DB( '/dev/shm/argus/mem_db.db');
|
|
$PARAM = md5( time() );
|
|
$QS = "INSERT INTO `nodes_qcq`(`node_id`,`cmd`,`status`,`parameter`) VALUES(1,249,0,'{$PARAM}')";
|
|
$RBASE->Query( $QS, false );
|
|
$Data['q'] = $QS;
|
|
$Data['success'] = true;
|
|
};
|
|
};
|
|
} else {
|
|
$Data['msg']='Wrong Parameters!';
|
|
};
|
|
echo json_encode( $Data );
|
|
exit();
|
|
};
|
|
header('location: /');
|
|
?>
|