Exemplo n.º 1
0
$Query = "select title from " . TABLE_PREFIX . "folders where id='" . $folderid . "'";
$dbResult = $dblink->query($Query);
$title = "";
if ($row =& $dbResult->fetchRow(DB_FETCHMODE_ASSOC)) {
    $title = "{$row["title"]}";
}
if ($folderid != MAIN_FID) {
    $Query = "select pid from " . TABLE_PREFIX . "folders where (name='{$username}' and id='{$folderid}')";
    //echo($Query . "<br>\n");
    $dbResult = $dblink->query($Query);
    $parentid = 0;
    if ($row =& $dbResult->fetchRow(DB_FETCHMODE_ASSOC)) {
        $parentid = "{$row["pid"]}";
    }
}
$path = get_group_path($folderid, $username);
//Check if in a group folder
if ($parentid == GROUPS_FID) {
    //Get the group_ip
    $group_id = returnGroupID($title);
    //Check the privilege of the member
    //Check if the manager
    $partOf = checkIfManager($group_id, $username);
    if (!$partOf) {
        $privOfMember = returnMemberPriv($username);
        $privName = returnPrivName($privOfMember);
    } else {
        $privOfMember = 3;
    }
} else {
    $privOfMember = 1;
Exemplo n.º 2
0
     echo "<p><b>" . T_("Folder Matches") . "</b></p>\n\n";
     while (list($id, $score) = each($group_results)) {
         $path = get_group_path($id, $name);
         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>";
 }