function l_site ($site_id) { return "/db/sites/index.php?id=$site_id"; }
function l_site_t ($site_id,$text) { return href (l_site($site_id),$text); }
function l_site_obj($site) { return href (l_site($site['site_id']),$site['name']); }
+function l_site_tags ($site_id) { return "/db/sites/site.php?id=$site_id&show_tags=1"; }
function l_slices () { return "/db/slices/index.php"; }
function l_slices_peer ($peer_id) { return "/db/slices/index.php?peerscope=$peer_id"; }
function l_persons_site ($site_id) { return "/db/persons/index.php?site_id=$site_id"; }
function l_persons_slice ($slice_id) { return "/db/persons/index.php?slice_id=$slice_id"; }
function l_person_obj ($person) { return l_person_t($person['person_id'],$person['email']); }
+function l_person_tags ($person_id) { return "/db/persons/person.php?id=$person_id&show_tags=1"; }
function l_tags () { return "/db/tags/index.php"; }
function l_tag ($tag_type_id) { return "/db/tags/index.php?id=$tag_type_id"; }
function reservable_mark () { return "-R-";}
function reservable_legend () { return "reservable nodes are marked with " . reservable_mark (); }
+//////////////////// Vicci simplified portal support
+function plc_advanced() {
+ global $plc, $api;
+
+ if ((!$plc) || (!$api)) {
+ return FALSE;
+ }
+
+ $person_id = $plc->person['person_id'];
+ $tags = $api->GetPersonTags(array("person_id" => $person_id, "tagname" => "advanced"));
+ if (!$tags) {
+ return FALSE;
+ }
+ return (bool) $tags[0]['value'];
+}
+
+function plc_set_advanced($value) {
+ global $plc, $api;
+
+ $person_id = $plc->person['person_id'];
+ $tags = $api->GetPersonTags(array("person_id" => $person_id, "tagname" => "advanced"));
+ if ($tags) {
+ $result = $api->UpdatePersonTag($tags[0]["person_tag_id"], $value);
+ //print "update " . $tags[0]["person_tag_id"] . " " . $value . " " . $result . "<br>";
+ } else {
+ $api->AddPersonTag($person_id, "advanced", $value);
+ //print "add";
+ }
+}
+
?>