Exemplo n.º 1
0
} else {
    if ($update->getName() != "MOPDiff") {
        die("Unknown data");
    }
}
foreach ($update->children() as $d) {
    if ($d->getName() == "cmp") {
        processCompetitor($cmpId, $d);
    } else {
        if ($d->getName() == "tm") {
            processTeam($cmpId, $d);
        } else {
            if ($d->getName() == "cls") {
                processClass($cmpId, $d);
            } else {
                if ($d->getName() == "org") {
                    processOrganization($cmpId, $d);
                } else {
                    if ($d->getName() == "ctrl") {
                        processControl($cmpId, $d);
                    } else {
                        if ($d->getName() == "competition") {
                            processCompetition($cmpId, $d);
                        }
                    }
                }
            }
        }
    }
}
returnStatus('OK');
Exemplo n.º 2
0
    if (mysql_num_rows($st) != 1) {
        $item = array('body_text' => '', 'subject_text' => '');
    }
    echo json_encode($item);
    exit;
}
$name = isset($_GET['name']) ? html_entity_decode($_GET['name'], ENT_NOQUOTES, 'UTF-8') : '';
$description = isset($_GET['description']) ? html_entity_decode($_GET['description'], ENT_NOQUOTES, 'UTF-8') : '';
$id = isset($_GET['id']) && $_GET['id'] > 0 ? $_GET['id'] : '';
$choice_type = isset($_GET['choice_type']) ? $_GET['choice_type'] : '';
switch ($_GET['meta']) {
    case "organization_id":
        $address = isset($_GET['address']) ? $_GET['address'] : '';
        $url = isset($_GET['url']) ? $_GET['url'] : '';
        $admin_user_id = isset($_GET['admin_user_id']) ? $_GET['admin_user_id'] : 0;
        processOrganization($_GET['action'], $id, $name, $address, $url, $admin_user_id);
        break;
    case "role_id":
        processRole($_GET['action'], $id, $name, $description);
        break;
    case 'language_id':
        $status = isset($_GET['status']) ? $_GET['status'] : 1;
        processLanguage($_GET['action'], $id, $name, $description, $status);
        break;
    case "reference_id":
        $rec = isset($_GET['choices']) ? html_entity_decode($_GET['choices'], ENT_NOQUOTES, 'UTF-8') : '';
        $choices = array();
        $choices = preg_split('/\\n/', $rec, null, PREG_SPLIT_NO_EMPTY);
        processReference($_GET['action'], $id, $name, $description, $choice_type, $choices);
        break;
    case "study_period_id":