function blobPageStartup($pActions)
{
    if (in_array('authenticated', $pActions)) {
        if (!blobIsLoggedIn()) {
            blobRedirect(BLOB_WEB_PAGE_TO_ROOT . 'login.php');
        }
    }
    if (in_array('notauthenticated', $pActions)) {
        if (blobIsLoggedIn()) {
            blobMessagePush("You are logged in!");
            blobRedirect(BLOB_WEB_PAGE_TO_ROOT . 'index.php');
        }
    }
    if (in_array('admin', $pActions)) {
        if (!blobIsAdmin()) {
            blobMessagePush("You are not admin!");
            blobRedirect(BLOB_WEB_PAGE_TO_ROOT . 'index.php');
        }
    }
}
Exemple #2
0
<?php

define('BLOB_WEB_PAGE_TO_ROOT', '');
require_once BLOB_WEB_PAGE_TO_ROOT . 'blob/includes/blobPage.inc.php';
$page = blobPageNewGrab();
$page['title'] .= $page['title_separator'] . 'About';
$page['page_id'] = 'about';
$page['body'] .= "\r\n<div class=\"body_padded\">\r\n\t<h1>About</h1>\r\n\r\n\t<p>\r\n\tVersion " . blobVersionGet() . " (Release date: " . blobReleaseDateGet() . ")\r\n\t<br /><br />\r\n\tGreenify is a Free and OpenSource Microblogging client. All material is &copy; 2015\r\n\t</p>\r\n</div>\r\n";
$right = "\r\n<center><strong>New to blob?</strong></center>\r\n<br />\r\n<div class=\"join\">\r\n<form action=\"register.php\">\r\n<input id=\"join\" value=\"Join!\" type=\"submit\">\r\n</form>\r\n</div><br />\r\n<center><b>Already have a blob account?</b><br /><br />\r\n<div class=\"join\">\r\n<form action=\"login.php\">\r\n<input id=\"login\" value=\"Login!\" type=\"submit\">\r\n</form>\r\n</div>\r\n<br /><br />Easy, free, and instant updates. Get access to the information that interests you most.\r\n";
if (blobIsLoggedIn()) {
    blobHtmlEcho($page);
} else {
    blobNoLoginHtmlEcho($page, $right);
}
Exemple #3
0
 * blob is a micro-blogging service where you can share notices
 * about yourself with friends, family, and colleagues!
 *
 * Copyright (C) 2011  Avinash Joshi <*****@*****.**>
 *
 * This program 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 3 of the License, or
 * (at your option) any later version.
 *
 * This program 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 this program.  If not, see <http://www.gnu.org/licenses/>.
 */
define('BLOB_WEB_PAGE_TO_ROOT', '');
require_once BLOB_WEB_PAGE_TO_ROOT . 'blob/includes/blobPage.inc.php';
if (!blobIsLoggedIn()) {
    // The user shouldn't even be on this page
    //	blobMessagePush( "You were not logged in!!" );
    blobRedirect('login.php');
}
blobLogout();
blobMessagePush("You have logged out");
blobRedirect('login.php');
?>