Ejemplo n.º 1
0
Archivo: API.php Proyecto: rrsc/freemed
function page_push()
{
    global $page_title;
    $page_history = HTTP_Session2::get('page_history');
    // Import it if it exists
    if (isset($page_history)) {
        // Import
        $_page_history = $page_history;
        // Check to see if this is the last item on the list...
        // ... kick out without adding.
        if (basename($_page_history[count($_page_history)]) == basename($_SERVER['PHP_SELF'])) {
            return true;
        }
    }
    // end checking for existing history
    // Add to the list of pages
    $_page_history["{$page_title}"] = basename($_SERVER['PHP_SELF']) . "?" . "module=" . urlencode($_REQUEST['module']) . "&" . "action=" . urlencode($_REQUEST['action']) . "&" . "type=" . urlencode($_REQUEST['type']);
    // Reimport into SESSION
    HTTP_Session2::put('page_history', $_page_history);
}