From bd9d442f63d31ffc0d437175aa571211c0ead8c7 Mon Sep 17 00:00:00 2001 From: niekt0 Date: Thu, 17 Mar 2011 01:06:25 +0100 Subject: [PATCH] First draft of set_synapse_weight --- wwwroot/backend/mysql/backend.inc | 18 ++++++++++++++++++ wwwroot/inc/eventz/add.inc | 20 ++++++++++++-------- 2 files changed, 30 insertions(+), 8 deletions(-) diff --git a/wwwroot/backend/mysql/backend.inc b/wwwroot/backend/mysql/backend.inc index d65fc94..bea0e50 100644 --- a/wwwroot/backend/mysql/backend.inc +++ b/wwwroot/backend/mysql/backend.inc @@ -341,4 +341,22 @@ function getKNeurons($user_id,$interval) { return $k_array; } +// Set synapse weight, + +// XXX TODO + +function setSynapseWeight($synapse_weightl) { + global $db,$node,$error,$error_messages; + + // XXX security fix +// $q="update neurons set synapse_weight='$synapse_weight' where dst = '$dst' and src = '$src'"; +// $q="insert into neurons values('$synapse_weight','$dst','$src',NULL,'synapse',XXX,now(),XXX,$src)"; + +// $set=$db->query($q); + + return true; +} + + + } diff --git a/wwwroot/inc/eventz/add.inc b/wwwroot/inc/eventz/add.inc index b18a2ca..7bd3f9a 100644 --- a/wwwroot/inc/eventz/add.inc +++ b/wwwroot/inc/eventz/add.inc @@ -1,12 +1,15 @@ +} + +?> -- 2.30.2