Example #1
0
                echo $path;
            }
        }
        if ($results) {
            arsort($results);
            reset($results);
            echo "<p><b>" . T_("Bookmark Matches") . "</b></p>\n\n";
            echo "<ul>";
            while (list($id, $score) = each($results)) {
                //$b = apb_bookmark($id);
                //$g = apb_group($b->group_id());
                $folderid = get_bfolderid($id, $name);
                $path = get_group_path($folderid, $name, false);
                if ($path == "") {
                    $path = "Main";
                }
                echo "<li>";
                #echo "<tt>[$score]</tt> ";
                $btitle = get_btitle($id, $name);
                echo "<a href=\"redirect.php?id={$id}\" target=\"blank\">{$btitle}</a>" . " <div>" . $path . "</div></li> ";
                $desc = get_bdescription($id, $name);
                if ($desc) {
                    echo " - " . $desc;
                }
                echo "\n";
            }
            echo "</ul>";
        }
    }
}
include 'footer.php';
Example #2
0
        } else {
            $msgError = T_("The form is incomplete");
        }
    } else {
        $msgError = T_("You are not logged in, or your session has expired");
    }
}
$exists = false;
$public = false;
if ($bookmarkID != null) {
    $exists = b_exists($bookmarkID);
    $public = checkIfPublic($bookmarkID);
}
if ($bookmarkID != null && $exists && $public) {
    //Get bookmark title
    $bTitle = get_btitle($bookmarkID);
    //Display bookmarks
    // Strip title if too long!
    if (strlen($bTitle) > MAX_TITLE_LENGTH) {
        $bTitle = substr($bTitle, 0, MAX_TITLE_LENGTH) . "..";
    }
    $customTitle = T_("Comments on bookmark:") . " " . $bTitle;
    include 'header.php';
    echo "<h2>" . $customTitle . "</h2>";
    if ($_POST['submitted']) {
        if ($success) {
            echo "<p class=\"success\">" . T_("Your comment has been added") . ".</p>";
        } else {
            if ($msgError) {
                echo "<p class=\"error\">{$msgError}.</p>";
            } else {