Exemple #1
0
    $tag = trim($_REQUEST['tag']);
    $tagNames = explode(' ', trim($tag));
    $tagcount = count($tagNames);
    for ($i = 0; $i < $tagcount; $i++) {
        $tagNames[$i] = trim($tagNames[$i]);
    }
} else {
    $tagNames = NULL;
}
// Get the posts relevant to the passed-in variables.
include "../includes/tags_functions.php";
require_once "../includes/protection.php";
$user = new User();
$userName = $user->getUsername();
if ($tagNames) {
    $bookmarks = getTagsBookmarks($tagNames, 0, MAX_API_BOOKMARKS, $userName, "../");
} else {
    $bookmarks = getUserBookmarks($userName, 0, MAX_API_BOOKMARKS, "../");
}
// Set up the XML file and output all the posts.
header('Content-Type: text/xml');
echo '<?xml version="1.0" standalone="yes" ?' . ">\r\n";
echo '<posts update="' . date('Y-m-d\\TH:i:s\\Z') . '" user="******"' . (is_null($tag) ? '' : ' tag="' . htmlspecialchars($tag) . '"') . ">\r\n";
foreach ($bookmarks as $row) {
    if (is_null($row['description']) || trim($row['description']) == '') {
        $description = '';
    } else {
        $description = 'extended="' . filter($row['description'], 'xml') . '" ';
    }
    $taglist = returnAllTags($row['id'], "../");
    echo "\t<post href=\"" . filter($row['url'], 'xml') . '" description="' . filter($row['title'], 'xml') . '" ' . $description . 'hash="' . md5($row['url']) . '" tag="' . filter($taglist, 'xml') . '" time="' . date('Y-m-d\\TH:i:s\\Z', strtotime($row['ADD_DATE'])) . "\" />\r\n";
Exemple #2
0
$tagName = "";
if (isset($_GET['tag'])) {
    $tagName = $_GET['tag'];
}
//If there is any tags for the user
$tagName = filter($tagName);
//echo("Tag Name:" . $tagName . ":");
$tagName = strtolower($tagName);
//$tagNames = split("+", $tagName, 8);
$tagNames = explode(' ', trim($tagName));
$tagcount = count($tagNames);
for ($i = 0; $i < $tagcount; $i++) {
    $tagNames[$i] = trim($tagNames[$i]);
}
if ($tagName != "") {
    $bookmarks_user = getTagsBookmarks($tagNames, 0, TAGS_PER_PAGE, $userName, "../");
} else {
    $bookmarks_user = getUserBookmarks($userName, 0, TAGS_PER_PAGE, "../");
}
$bookmarks = getFeedVars($bookmarks_user);
$strPageQuery = "?uname=" . $userName;
if ($tagName != "") {
    $strPageQuery .= "&amp;tag=" . $tagName;
}
$feedTitle = WEBSITE_NAME;
$feedLink = WEBSITE_ROOT . "userb.php" . $strPageQuery;
$feedDesc = "Public bookmarks for " . $userName;
if ($tagName != "") {
    $feedDesc .= ": " . $tagName;
}
$feedTTL = "60";
Exemple #3
0
    $dtstart = date('Y-m-d H:i:s');
}
$dtend = date('Y-m-d H:i:s', strtotime($dtstart . '+1 day'));
// Filter by URL
if (isset($_REQUEST['url']) && strlen($_REQUEST['url']) > 0) {
    $hash = $_REQUEST['url'];
} else {
    $hash = NULL;
}
// Get the posts relevant to the passed-in variables.
include "../includes/tags_functions.php";
require_once "../includes/protection.php";
$user = new User();
$userName = $user->getUsername();
if ($tagNames) {
    $bookmarks = getTagsBookmarks($tagNames, 0, MAX_API_BOOKMARKS, $userName, "../", $dtstart, $dtend, $hash);
} else {
    $bookmarks = getUserBookmarks($userName, 0, MAX_API_BOOKMARKS, "../", $dtstart, $dtend, $hash);
}
// Set up the XML file and output all the tags.
header('Content-Type: text/xml');
echo '<?xml version="1.0" standalone="yes" ?' . ">\r\n";
echo '<posts' . (is_null($dtstart) ? '' : ' dt="' . $dtstart . '"') . ' tag="' . (is_null($tag) ? '' : filter($tag, 'xml')) . '" user="******"\">\r\n";
foreach ($bookmarks as $row) {
    if (is_null($row['description']) || trim($row['description']) == '') {
        $description = '';
    } else {
        $description = 'extended="' . filter($row['description'], 'xml') . '" ';
    }
    $taglist = returnAllTags($row['id'], "../");
    echo "\t<post href=\"" . filter($row['url'], 'xml') . '" description="' . filter($row['title'], 'xml') . '" ' . $description . 'hash="' . md5($row['url']) . '" tag="' . filter($taglist, 'xml') . '" time="' . date('Y-m-d\\TH:i:s\\Z', strtotime($row['ADD_DATE'])) . "\" />\r\n";
Exemple #4
0
     $userName = $rec_name;
     $exists = true;
 } else {
     $exists = false;
 }
 echo $userName;
 if ($tagTitle != "") {
     echo " -- <span id=\"crumb\">" . $tagTitle . "</span><script type=\"text/javascript\">if(window.Crumb) Crumb.go('userb.php?uname=" . $userName . "&tag=')</script>";
 }
 echo "</h2>";
 if ($exists) {
     if ($rec_status != "disabled") {
         $moreBooks = false;
         if ($tagName != "") {
             $bookmarks = getTagsBookmarks($tagNames, $minTagsNb, $maxTagsNb, $userName);
             $bookmarkToCome = getTagsBookmarks($tagNames, $minTagsNb + $maxTagsNb, 1, $userName);
             $moreBooks = count($bookmarkToCome) != 0;
         } else {
             $bookmarks = getUserBookmarks($userName, $minTagsNb, $maxTagsNb);
             $countBookmarks = numberOfPublicBookmarksUser($userName);
             $moreBooks = $pageNb * $perPageNb < $countBookmarks;
         }
         $current_page = "userb.php?uname=" . $userName . "&amp;tag=";
         //Display the bookmarks
         $displayUser = false;
         $displayDivs = true;
         include 'templates/publicb.tpl.php';
     } else {
         echo "<p class=\"notice\">" . sprintf(T_("User %s's account is disabled"), $userName) . ".</p>";
         $userNotFound = true;
     }
Exemple #5
0
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with GetBoo; if not, write to the Free Software
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
***************************************************************************/
header('Content-Type: application/xml');
$SETTINGS['path_mod'] = "../";
include '../conn.php';
include '../includes/tags_functions.php';
include '../includes/protection.php';
include 'rss_functions.php';
$tagName = "";
if (isset($_GET['tag'])) {
    $tagName = $_GET['tag'];
}
$tagName = filter($tagName);
$tagName = strtolower($tagName);
$tagNames = explode(' ', trim($tagName));
$tagcount = count($tagNames);
for ($i = 0; $i < $tagcount; $i++) {
    $tagNames[$i] = trim($tagNames[$i]);
}
$bookmarks_tags = getTagsBookmarks($tagNames, 0, TAGS_PER_PAGE, "", "../");
$bookmarks = getFeedVars($bookmarks_tags);
$tagName = str_replace(" ", "%20", $tagName);
$feedTitle = WEBSITE_NAME;
$feedLink = WEBSITE_ROOT . "tags.php?tag=" . $tagName;
$feedDesc = "Bookmarks for tag " . $tagName;
$feedTTL = "60";
include '../templates/rss.tpl.php';
Exemple #6
0
    $count = intval($_REQUEST['count']);
    if ($count > $countMax) {
        $count = $countMax;
    } elseif ($count < 0) {
        $count = 0;
    }
} else {
    $count = $countDefault;
}
// Get the posts relevant to the passed-in variables.
include "../includes/tags_functions.php";
require_once "../includes/protection.php";
$user = new User();
$userName = $user->getUsername();
if ($tagNames) {
    $bookmarks = getTagsBookmarks($tagNames, 0, $count, $userName, "../");
} else {
    $bookmarks = getUserBookmarks($userName, 0, $count, "../");
}
// Set up the XML file and output all the posts.
header('Content-Type: text/xml');
echo '<?xml version="1.0" standalone="yes" ?' . ">\r\n";
echo '<posts update="' . date('Y-m-d\\TH:i:s\\Z') . '" user="******"' . (is_null($tag) ? '' : ' tag="' . htmlspecialchars($tag) . '"') . ">\r\n";
foreach ($bookmarks as $row) {
    if (is_null($row['description']) || trim($row['description']) == '') {
        $description = '';
    } else {
        $description = 'extended="' . filter($row['description'], 'xml') . '" ';
    }
    $taglist = returnAllTags($row['id'], "../");
    echo "\t<post href=\"" . filter($row['url'], 'xml') . '" description="' . filter($row['title'], 'xml') . '" ' . $description . 'hash="' . md5($row['url']) . '" tag="' . filter($taglist, 'xml') . '" time="' . date('Y-m-d\\TH:i:s\\Z', strtotime($row['ADD_DATE'])) . "\" />\r\n";