Пример #1
0
    $ret .= $confirmation;
}
if (isset($_REQUEST['webid'])) {
    $ret .= '<div>';
    $ret .= "<h3 class=\"demoHeaders\">Details for WebID: <a href=\"" . urldecode($_REQUEST['webid']) . "\">";
    if (strlen($_REQUEST['webid']) > 50) {
        $ret .= substr(urldecode($_REQUEST['webid']), 0, 47) . '...';
    } else {
        $ret .= urldecode($_REQUEST['webid']);
    }
    $ret .= "</a></h3><p>(view  <a href=\"view.php?html=0&webid=" . urlencode($_REQUEST['webid']) . "\">RDF</a> or \n";
    $ret .= "</a></h3><a href=\"view.php?html=1&webid=" . urlencode($_REQUEST['webid']) . "\">normal</a>?)</p><br/>\n";
    // graph
    $person = new MyProfile(urldecode($_REQUEST['webid']), BASE_URI, SPARQL_ENDPOINT);
    $person->load(true);
    $graph = $person->get_graph();
    $profile = $person->get_profile();
    // sameAs is disabled until further notice
    //$profile->loadSameAs();
    // check if the user has subscribed to local messages
    $is_subscribed = strlen($person->get_hash()) > 0 ? true : false;
    $ret .= "<table><tr>\n";
    // add or remove friends if we have them in our list
    if (isset($_SESSION['webid']) && webid_is_local($_SESSION['webid'])) {
        if ($_SESSION['myprofile']->is_friend($_REQUEST['webid'])) {
            // remove friend
            $ret .= "<td style=\"padding-right: 10px; float: left;\"><form action=\"friends.php\" method=\"POST\">\n";
            $ret .= "<input type=\"hidden\" name=\"action\" value=\"delfriend\">\n";
            $ret .= "<input type=\"hidden\" name=\"webid\" value=\"" . $_REQUEST['webid'] . "\">\n";
            $ret .= "<input src=\"img/actions/remove.png\" type=\"image\" title=\"Remove friend\" name=\"submit\" value=\" Remove \">\n";
            $ret .= "</form></td>\n";