- exitWithResponseCode("CEA95615-649C-4837-9E24-0C968FA57647", "OK");
- } else if(strcmp($action, 'saytest') == 0){
- /*
- //for Mac OSX say command.
- system("say " . escapeshellarg("sayのテストをしています。"));
- */
+ exitWithResponseCode("cea95615-649c-4837-9e24-0c968fa57647", "OK");
+ } else if(strcmp($action, 'updatenode') == 0){
+ if(isset($_GET['nid'])){
+ $nodeid = $_GET['nid'];
+ } else{
+ exitWithResponseCode("A0518702-C90C-4785-B5EA-1A213DD0205B", "nodeid needed.");
+ }
+ if(isset($_GET['tid'])){
+ $typeid = $_GET['tid'];
+ } else{
+ exitWithResponseCode("A0518702-C90C-4785-B5EA-1A213DD0205B", "typeid needed.");
+ }
+ if(isset($_GET['ident'])){
+ $ident = $_GET['ident'];
+ } else{
+ exitWithResponseCode("A0518702-C90C-4785-B5EA-1A213DD0205B", "ident needed.");
+ }
+
+ $stmt = $db->prepare(QUERY_UPDATE_Node);
+ $mts = getTimeStampMs();
+ $stmt->bind_param(QUERY_UPDATE_Node_TYPES, $typeid, $ident, $mts, $nodeid);
+ $stmt->execute();
+ //
+ $stmt->store_result();
+ if($stmt->errno != 0){
+ exitWithResponseCode("A0518702-C90C-4785-B5EA-1A213DD0205B", mysqli_error($db));
+ }
+ $stmt->close();
+ exitWithResponseCode("cea95615-649c-4837-9e24-0c968fa57647", "OK");