Ejemplo n.º 1
0
  The CRUD for the Method of Capture table.
*/
echo $_GET['action'];
if (isset($_GET["addMOC"])) {
    $daoMethodOfCapture->addMethodOfCapture(isset($_GET['addMethodOfCapture']) ? $_GET['addMethodOfCapture'] : NULL);
} else {
    if (isset($_GET["deleteMOC"])) {
        $results = isset($_GET["moc"]) ? $_GET["moc"] : NULL;
        if ($results != NULL) {
            foreach ($results as $row) {
                $daoMethodOfCapture->deleteMethodOfCapture($row);
            }
        }
    } else {
        if (isset($_GET["editMOC"])) {
            $daoMethodOfCapture->editMethodOfCapture(isset($_GET['editMethodOfCaptureId']) ? $_GET['editMethodOfCaptureId'] : NULL);
        } else {
            if (isset($_GET["getMOC"])) {
                $results = isset($_GET["moc"]) ? $_GET["moc"] : NULL;
                if ($results != NULL) {
                    foreach ($results as $row) {
                        foreach ($daoMethodOfCapture->getMethodOfCapture($row) as $record) {
                            echo '<tr>
                       <td><input type="checkbox" class="moc" name="moc[]" value ="' . $record->MethodOfCaptureId . '"></td>
                       <td>' . $record->MethodOfCapture . '</td>
                     <tr>' . PHP_EOL;
                        }
                    }
                }
            }
        }