// break 1; case BUTTON_DISP: button_send($SCION, $HTML); echo $HTML; $SCION->status = STATE::CHANGE; break 2; case STATE::CHANGE: if (isset($_GET["reset"])) { $_STATE->goback(1); //go back to log_list break 3; } if (isset($_POST["actupd"])) { update_activity($SCION); } else { new_hours($SCION); //msgStatus='-' says to "reset", ie. goback(1), so set that state's totals: $temp = STATE_pull($_STATE->thread, 1); total_hours($temp); //re-calculate for all projects $temp->replace(); } echo $SCION->msgStatus; break 2; default: throw_the_bum_out(NULL, "Evicted(" . __LINE__ . "): error"); } } //while & switch $SCION->push(); break 2;
function changes(&$state, &$response) { $response = "-"; //initialize to reset page switch ($state->agent) { case "BN": //button => adding/updating hours new_hours($state); $response = $state->msgStatus; break; case "TK": //task //task case "ST": //subtask change_subtask($state); break; case "AC": //account change_account($state); break; case "AT": //activity change_activity($state); break; } }