Esempio n. 1
0
function changes(&$state, &$response)
{
    $response = "-";
    //initialize to reset page
    switch ($state->agent) {
        case "BN":
            //button => adding/updating hours
            new_counts($state);
            $response = $state->msgStatus;
            break;
        case "AC":
            //account
            change_account($state);
            break;
        case "EV":
            //event
            change_event($state);
            break;
    }
}
Esempio n. 2
0
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;
    }
}
Esempio n. 3
0
<?php

// change_account.php
// allows the user to view and change his account's details
if (!isset($inIndex) || !$inIndex) {
    include "../../redirect.php";
} elseif (!$loggedUser) {
    throw new Exception(LangExcpetion001);
} elseif (!$objUtil->checkAdminOrUserID($loggedUser)) {
    throw new Exception(LangExcpetion012);
} else {
    change_account();
}
function change_account()
{
    global $baseURL, $instDir, $languageMenu, $loggedUser, $objAtlas, $objInstrument, $objLanguage, $objLocation, $objObserver, $objPresentations, $objUtil;
    $sites = $objLocation->getSortedLocations("name", $loggedUser);
    $tempLocationList = "<select name=\"site\" class=\"inputfield form-control\">";
    $tempLocationList .= "<option value=\"0\">-----</option>";
    // If there are locations with the same name, the province should also be shown
    $previous = "fskfskf";
    for ($i = 0; $i < count($sites); $i++) {
        $adapt[$i] = 0;
        if ($objLocation->getLocationPropertyFromId($sites[$i], 'name') == $previous) {
            $adapt[$i] = 1;
            $adapt[$i - 1] = 1;
        }
        $previous = $objLocation->getLocationPropertyFromId($sites[$i], 'name');
    }
    for ($i = 0; $i < count($sites); $i++) {
        $sitename = $objLocation->getLocationPropertyFromId($sites[$i], 'name');