Example #1
0
        }
    }
    $db = NULL;
    return;
}
//Main State Gate: (the while (1==1) allows a loop back through the switch using a 'break 1')
while (1 == 1) {
    switch ($_STATE->status) {
        case STATE::INIT:
            tables_list();
            $_STATE->msgGreet = "Check the tables to load";
            $_STATE->status = STATE::UPDATE;
            break 2;
        case STATE::UPDATE:
            $_STATE->msgGreet = "Tables loaded:";
            entry_audit();
            $_STATE->status = STATE::DONE;
            break 2;
        default:
            $_STATE->status = STATE::ERROR;
            throw_the_bum_out(NULL, "Evicted(" . __LINE__ . "): invalid state=" . $_STATE->status);
    }
}
//while & switch
EX_pageStart();
//standard HTML page start stuff - insert scripts here
EX_pageHead();
//standard page headings - after any scripts
?>
<form method="post" name="frmAction" id="frmAction_ID" action="<?php 
echo $_SERVER['SCRIPT_NAME'];
Example #2
0
    $_STATE = STATE_pull();
    //'pull' the working state
}
$_STATE->fields["txtName"] = "";
$reload = FALSE;
$_STATE->msgGreet = "Please login:"******"";
switch ($_STATE->status) {
    case STATE::INIT:
        $reload = TRUE;
        //make sure other frames load after me
        $_STATE->status = STATE::ENTRY;
        break;
    case STATE::ENTRY:
        require_once "logging.php";
        if (entry_audit()) {
            $_STATE->msgGreet = "";
            $_STATE->msgStatus = "";
            $reload = TRUE;
            //reload other frames to get current login info
            $_STATE->status = STATE::DONE;
        } else {
            error_log("Logerr: by " . $_STATE->fields["txtName"]);
        }
        break;
    default:
        $_STATE->status = STATE::ERROR;
}
$_STATE->replace();
//with new status, etc.
$_DB = NULL;
Example #3
0
            $_STATE->status = SELECTED_PROJECT;
            //for possible goback
            $_STATE->replace();
            //	break 1; //re_switch
        //	break 1; //re_switch
        case SELECTED_PROJECT:
            require_once "project_select.php";
            //in case of goback
            $projects = unserialize($_STATE->project_select);
            $_STATE->project_name = $projects->selected_name();
            $_STATE->msgGreet = $_STATE->project_name . "<br>Assign (check) or Un-assign permissions for <br>" . $_STATE->person_name;
            permit_list($_PERMITS);
            $_STATE->status = STATE::ENTRY;
            break 2;
        case STATE::ENTRY:
            if (entry_audit($_PERMITS)) {
                $_STATE->msgGreet = "New permissions for " . $_STATE->person_name;
                $_STATE->status = STATE::DONE;
            }
            $_STATE->goback(1);
            //sets up goback to STATE::INIT
            break 2;
        default:
            throw_the_bum_out(NULL, "Evicted(" . __LINE__ . "): invalid state=" . $_STATE->status);
    }
}
//while & switch
$redirect = $_SESSION["_SITE_CONF"]["_REDIRECT"];
EX_pageStart();
//standard HTML page start stuff - insert scripts here
if ($_STATE->status == SELECT_PROJECT) {