Beispiel #1
0
    function delete()
    {
        $translator = new Translator();
        $plan = new Plan();
        try {
            $id = array_shift($this->param);
            $plan->delete($id);
            $training = new Training();
            $training->deleteMore(array('plan_id' => $id));
            echo <<<EOF
<div class="container">
   <div class="page-header">
        <h1>{$translator->Plan_deleted}</h1>
      </div>
   <p class="lead">{$translator->Plan_deleted_Desc}</p>
      <p >{$translator->Error_Backadmintrainings}</p>
</div>
<script type="text/javascript">
window.location.href='/admin_trainings';
</script>

EOF;
        } catch (Exception $e) {
            echo <<<EOF
<div class="container">
   <div class="page-header">
        <h1>{$translator->Plan_error}</h1>
      </div>
   <p class="lead">{$translator->Plan_error_Desc}</p>
      <p >{$translator->Error_Backadmintrainings}</p>
</div>

EOF;
        }
    }