コード例 #1
0
ファイル: posts_update.php プロジェクト: noikiy/owaspbwa
This file is part of GetBoo.

GetBoo is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

GetBoo is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
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
***************************************************************************/
// Based on Scuttle API classes
// Implements the del.icio.us API request for a user's last update time and date.
// Force HTTP authentication first!
require_once 'httpauth.inc.php';
include "../includes/tags_functions.php";
$user = new User();
$userName = $user->getUsername();
$bookmarks = getUserBookmarks($userName, 0, 1, "../");
// Set up the XML file and output all the posts.
header('Content-Type: text/xml');
echo '<?xml version="1.0" standalone="yes" ?' . ">\r\n";
foreach ($bookmarks as $row) {
    echo '<update time="' . date('Y-m-d\\TH:i:s\\Z', strtotime($row['ADD_DATE'])) . '" />';
}
コード例 #2
0
ファイル: posts_all.php プロジェクト: noikiy/owaspbwa
    $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";
}
echo '</posts>';
コード例 #3
0
    }
}
$admins = getAdmins();
$now_betting = false;
$closed_bets = false;
$total_closed_bets = 0;
$usermenu = 'active';
$user_id = isset($_GET['user_id']) ? $_GET['user_id'] : '';
$activ = isset($_GET['active']) ? $_GET['active'] : 'bet';
if (!$user_id) {
    $redir = $baseurl . "/admin/users?lang={$LANGUAGE}";
    header('Location: ' . $redir);
    exit;
}
$user_likes = getUserLikes($user_id);
$user_bookmarks = getUserBookmarks($user_id);
$user_bets = getUserBetsByUserId($user_id);
$user_coin_deals = getUserCoinDeals($user_id);
$user_info = getUserInfo($user_id);
if ($user_bets) {
    $now_betting = getUserNowBetting($user_bets);
    $closed_bets = getUserClosedBetting($user_bets);
    $total_closed_bets = count($closed_bets['win']) + count($closed_bets['lose']);
}
?>
<!DOCTYPE html>
<html>
	<head>
		<?php 
include $basedir . '/admin/include/header.php';
?>
コード例 #4
0
ファイル: userb.php プロジェクト: noikiy/owaspbwa
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";
include '../templates/rss.tpl.php';
コード例 #5
0
ファイル: posts_get.php プロジェクト: noikiy/owaspbwa
$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";
}
echo '</posts>';
コード例 #6
0
ファイル: userb.php プロジェクト: noikiy/owaspbwa
     $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;
     }
 } else {
     echo "<p class=\"error\">" . sprintf(T_("User %s was not found"), $userName) . ".</p>";
     $userNotFound = true;
コード例 #7
0
ファイル: posts_recent.php プロジェクト: noikiy/owaspbwa
        $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";
}
echo '</posts>';