* This page is used to delete a page. * Deleting a page requires that the user be logged in and the owner of a personal wiki page, or a member of * a community. * * @package folio * @param string $page The page title being deleted. Required. * @param string $user The user/community to whom this page belongs. **/ define("context", "folio_page_delete"); // Run includes require_once "../includes.php"; require_once "../mod/folio/control/page_delete.php"; $title = " Wiki :: Delete Page"; // Retrieve page name & user name. // REQUIRED BY THE MENU SYSTEM (mod/folio/lib.php) $page_title = folio_page_decodetitle(required_param('page')); $username = required_param('user'); $page_owner = run('users:name_to_id', $username); $profile_id = $page_owner; // Get the $page_ident where page & user matches. $page_ident = folio_page_translatetitle($username, $page_title); $page = folio_page_select($page_ident); // Validate permissions. This also verifies to see if we have access to create a page. $permissions = folio_page_security_select($page_ident); if (!folio_page_permission($page, $permissions, 'delete')) { // User doesn't have permission to delete the page. $body = 'You do not have permission to delete this page. ' . 'You must be logged in, be deleting your own wiki page, or be a member of the community owning this page.'; $function['display:sidebar'] = array(); } elseif (folio_page_is_homepage($page)) { // Can't delete homepage $body = 'Sorry, but you can not delete a homepage.';
* @package folio * @param string $user The user/community to which this page belongs. * @param string $page The title of the page being shown. */ define("context", "folio_page_history"); // Run includes require "../includes.php"; require_once "../mod/folio/control/pagelist.php"; require_once "../mod/folio/control/breadcrumb.php"; run("profile:init"); run("friends:init"); run("folio:init"); // Retrieve passed variables (page name & user name, as well as created). // These variables will be used by the menu system to build links. See lib.php for more details. // Note that the included side menu depends upon these variable names. $page_title = folio_page_decodetitle(optional_param('page', '')); $username = required_param('user'); $page_owner = run('users:name_to_id', $username); $url = url; // Test to see if this is a valid user. if (!$page_owner) { // Nothing returned by the run command, not a valid user. error('Sorry, but "' . $username . '" is not a valid username in this system.'); die; } else { $profile_id = $page_owner; $name = run('users:display:name', $page_owner); } // Look to see if a page param was passed. If not, find out what page // is set as this user's default homepage. If so, translate title into // a page_ident.
*/ /* Various properties available to calling code. div.innerHTML = "<li>Transaction id: " + o.tId + "</li>"; div.innerHTML += "<li>HTTP status: " + o.status + "</li>"; div.innerHTML += "<li>Status code message: " + o.statusText + "</li>"; div.innerHTML += "<li>HTTP headers: <ul>" + o.getAllResponseHeaders + "</ul></li>"; div.innerHTML += "<li>Server response: " + o.responseText + "</li>"; div.innerHTML += "<li>Argument object: Object ( [foo] => " + o.argument.foo + " [bar] => " + o.argument.bar +" )</li>"; */ require_once "../../../includes.php"; $comment = new StdClass(); $comment->item_ident = required_param('item_ident', 0, PARAM_INT); $comment->item_type = folio_clean(required_param('item_type')); $comment->item_title = folio_page_decodetitle(folio_clean(required_param('item_title'))); $comment->item_owner_ident = required_param('item_owner_ident', 0, PARAM_INT); $comment->item_owner_name = required_param('item_owner_name'); $comment->item_owner_username = required_param('item_owner_username'); $comment->access = folio_clean(required_param('access')); $comment->body = required_param('body'); $comment->posted = time(); $url = required_param('url'); if (isloggedin()) { $comment->creator_username = $_SESSION['username']; $comment->creator_name = $_SESSION['name']; $comment->creator_ident = $_SESSION['userid']; } else { $comment->creator_username = ''; $comment->creator_name = 'Anonymous'; $comment->creator_ident = -1;