示例#1
0
        $ersteller = true;
    }
} else {
    if (!$coodle->checkBerechtigung($coodle_id, '', $_GET['zugangscode'])) {
        die($p->t('coodle/keineBerechtigung'));
    }
}
// checkboxen speichern
if (isset($_POST['save'])) {
    $coodle_help = new coodle();
    $error = false;
    // Ressource ID von Zugangscode oder UID holen und Beiträge löschen
    if (isset($_GET['zugangscode'])) {
        // Einträge löschen
        $coodle_help->getRessourceFromUser($coodle_id, '', $_GET['zugangscode']);
        $coodle_ressource_termin = $coodle_help->deleteRessourceTermin($coodle_id, $coodle_help->coodle_ressource_id);
    } else {
        if ($coodle_help->RessourceExists($coodle_id, $uid)) {
            $coodle_help->getRessourceFromUser($coodle_id, $uid);
            $coodle_ressource_termin = $coodle_help->deleteRessourceTermin($coodle_id, $coodle_help->coodle_ressource_id);
        }
    }
    //  Einträge speichern
    foreach ($_POST as $key => $value) {
        if (mb_substr($key, 0, 5) == 'check') {
            $termin = explode('_', $key);
            $ressource_id = $termin[1];
            $termin_id = $termin[2];
            $coodle_ressource_termin = new coodle();
            $coodle_ressource_termin->coodle_ressource_id = $ressource_id;
            $coodle_ressource_termin->coodle_termin_id = $termin_id;