Exemplo n.º 1
0
 function add($f3, $params)
 {
     $this->ensureAdmin($f3);
     $lehrerId = $params['id'];
     if ($f3->exists('POST.zeitId')) {
         try {
             $zeitId = $f3->get('POST.zeitId');
             Logger::Info($f3, "AdminPost.add", "Lehrer: {$lehrerId}, Zeit: {$zeitId}");
             DbWrapper::insertSperrung($f3->get('db'), $lehrerId, $zeitId);
         } catch (Exception $e) {
             Logger::Error($f3, "AdminPost.add", "Error: {$e->getMessage()}");
         }
     }
     $f3->reroute('/admin/absences/' . $lehrerId);
 }