コード例 #1
0
ファイル: ajax_wall.php プロジェクト: ASDAFF/myprofile
<?php

require "include.php";
$w = new Wall($_REQUEST['owner']);
echo $w->load($_REQUEST['count'], $_REQUEST['offset'], $_REQUEST['activity']);
コード例 #2
0
ファイル: wall.php プロジェクト: ASDAFF/myprofile
$ret .= "   <p>Subscribe to the current wall using <a href=\"" . $base_uri . "/atom.php?id=" . $owner_hash . "\">this Atom feed</a>.</p>\n";
$ret .= "</div>";
// Add notification message
if (strlen($notification) > 0) {
    $ret .= $notification;
}
// Add message form
$ret .= $form_area;
// Display warning if the user isn't allowed to view a certain wall
if (isset($warning)) {
    $ret .= "<h3>You are not allowed to see this page because you are not a friend of ";
    $ret .= "<a href=\"view?webid=" . urlencode($owner_webid) . "\">" . $profile->get_name() . ".</a></h3>";
} else {
    // Display messages
    $w = new Wall($owner_hash);
    $posts = $w->load(20, 0, $_REQUEST['activity']);
    $offset = $w->get_offset();
    // page content
    $ret .= "<div id=\"wall\">\n";
    $ret .= $posts;
    // add Load more button
    $ret .= "</div>\n";
    $ret .= "<p></p>\n";
}
$ret .= "</div>\n";
// prepare etag
$etag_array = get_etag($owner_hash);
$lastmod = gmdate('D, d M Y H:i:s \\G\\M\\T', $etag_array['date']);
$etag = $etag_array['etag'];
$ifmod = isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) ? $_SERVER['HTTP_IF_MODIFIED_SINCE'] == $lastmod : null;
$iftag = isset($_SERVER['HTTP_IF_NONE_MATCH']) ? $_SERVER['HTTP_IF_NONE_MATCH'] == $etag : null;