// Common functions
require_once 'plc_functions.php';
-$value=$_GET["value"];
-$person_id=$_GET["person_id"];
-$slice_id=$_GET["slice_id"];
-$tag_id=intval($_GET["tag_id"]);
-
-$api->UpdatePersonTag( $tag_id, $value );
-
-$myFile = "/var/log/myslice-log";
-$fh = fopen($myFile, 'a') or die("can't open file");
-$stringData = "\n".date('Ymd-H:i')."|".$person_id.":".$slice_id.":".$value;
+$value=get_array($_GET, "value");
+$person_id=intval(get_array($_GET, "person_id"));
+$slice_id=get_array($_GET, "slice_id");
+$tag_id=intval(get_array($_GET, "tag_id"));
+$tag_name=get_array($_GET, "tag_name");
+
+#$res = $api->UpdatePersonTag( $tag_id, $value );
+if ($tag_name == "columnconf")
+$res = $api->SetPersonColumnconf( $person_id, $value );
+else if ($tag_name == "showconf")
+$res = $api->SetPersonShowconf( $person_id, $value );
+
+$myFile = "/var/log/myslice/myslice.log";
+if (file_exists($myFile))
+ $fh = fopen($myFile, 'a') or die("can't open file");
+
+$stringData = date('Y-m-d@H:i')."|p=".$person_id.":s=".$slice_id.":t=".$tag_name.":v=".$value."\n";
fwrite($fh, $stringData);
fclose($fh);