Пример #1
0
    $comment_on_type = 'page';
    $comment_on_ident = $page_ident;
    $comment_on_username = $username;
    $comment_on_name = $name;
    $comment_on_ident = $page_owner;
    if (!$page) {
        // We're adding a new page.
        // Build nice titles
        $plain_title = 'Create ' . $page_title;
        $html_title = $username . ' : ' . $page_title;
        // Run the command to actually retrieve the content.
        $body = folio_page_view($page_ident, $page_title, -1, $page, $username);
    } else {
        // Viewing an existing page.
        // Build nice titles
        $html_title = "<a href='{$url}{$username}/subscribe/rss/page+page_comment/'><img border=0 src='{$url}_templates/icons/rss.png' /></a> {$name} : " . folio_control_breadcrumb($page, $username);
        $plain_title = $page->title;
        // Run the command to actually retrieve the content.
        $body = folio_page_view($page_ident, $page_title, -1, $page, $username) . folio_control_childpagelist($username, $page, $page_owner) . folio_control_commentlist('page', $page_ident);
    }
} else {
    // We don't have permissions, and so need some sort of title.
    $html_title = 'You do not have permission to view this page';
    $plain_title = 'You do not have permission to view this page';
    $body = 'You do not have permission to view this page. Please contact the page\'s' . ' owner and ask for the security to be set to <b>Public</b> or <b>Moderated</b>. ' . '  You will be able to view this page once that has been done.  If this page belongs ' . ' to a community, you may also try to join the community.  Once you are a member, ' . ' you will be able to see and edit the page.';
}
// Transfer into template & write.
templates_page_setup();
$body = templates_draw(array('context' => 'contentholder', 'title' => $html_title, 'body' => $body));
echo templates_page_draw(array($plain_title, $body));
//	include_once( 'perfstop.php' );
Пример #2
0
    $html_title = "<a href='{$url}{$username}/subscribe/rss/page+page_comment/'><img border=0 src='{$url}_folio/images/xml.gif' /></a> {$name} : " . folio_control_breadcrumb($page, $username);
    $plain_title = $page->title;
    // See if we're trying to revert the page. Need to check security.
    if ($revert == 'T' && $ok_write) {
        // Revert
        $body = "<p align='center'><b>Restore this older version of the page.</b></p><br/>" . folio_page_edit($page, $permissions, $page_title, $username, $page->parentpage_ident);
    } else {
        // Just viewing.
        // Build warning if this is an older version of the page.
        if ($page->newest != 1) {
            // Create warning link
            $body = "<p align='center'><b>You are looking at an archived version of this page.</b><br/>" . "<a href='{$url}{$username}/page/" . folio_page_encodetitle($page_title) . "'>return to current version</a>";
            if ($ok_write) {
                $body .= " :: " . "<a href='{$url}{$username}/page/{$page_ident}:{$created}/revert'>restore this version</a></p>\n";
            }
        } else {
            $body = '';
        }
        // Run the command to actually retrieve the content.
        $body .= folio_page_view($page_ident, $page_title, $created, $page, $username);
    }
} else {
    // We don't have permissions, and so need some sort of title.
    $html_title = 'You do not have permission to view this page';
    $plain_title = 'You do not have permission to view this page';
    $body = 'You do not have permission to view this page. Please contact the page\'s' . ' owner and ask for the security to be set to <b>Public</b> or <b>Moderated</b>. ' . '  You will be able to view this page once that has been done.  If this page belongs ' . ' to a community, you may also try to join the community.  Once you are a member, ' . ' you will be able to see and edit the page.';
}
// Transfer into template & write.
templates_page_setup();
$body = templates_draw(array('context' => 'contentholder', 'title' => $html_title, 'body' => $body));
echo templates_page_draw(array($plain_title, $body));