Ejemplo n.º 1
0
                              <!--  <a class="collapsed" data-toggle="collapse" data-parent="#accordion" href="#methodOfCapture" aria-expanded="false" aria-controls="methodOfCapture">Method of Capture</a> -->
                                <a class="collapsed" data-toggle="collapse" href="#methodOfCapture" aria-expanded="false" aria-controls="methodOfCapture">Method of Capture</a>
                            </h4> <!-- class="panel-title -->
                        </div> <!-- class="panel-heading" role="tab" id="headingMethodOfCapture -->
                        <div id="methodOfCapture" class="panel-collapse collapse" role="tabpanel" aria-labelledby="headingMethodOfCapture">
                            <div class="panel-body">
                                <form class="form container-fluid" role="form" method="get" action="<?php 
echo htmlspecialchars($_SERVER["PHP_SELF"]);
?>
">
                                    <!-- <input name="methodOfCaptureId" type="hidden" class="form-control" id="methodOfCaptureId"><br> -->
                                    <label for="methodOfCaptureId">Method of Capture</label>
                                    <select name="methodOfCaptureId" class="form-control" id="methodOfCaptureId">
                                        <option value=""></option>
<?php 
$result = $daoMethodOfCapture->getAllMethodOfCapture();
foreach ($result as $row) {
    echo '                                   <option value="' . $row->MethodOfCaptureId . '">' . $row->MethodOfCapture . '</option>' . PHP_EOL;
}
?>

                                  </select><br>
                                    <input href="admin.php" class="btn btn-warning" type="submit" name="SaveCapture" value="Save"/>
                                    <input href="admin.php" class="btn btn-warning" type="submit" name="DeleteCapture" value="Delete"/><br>
                                </form> <!-- class="form container-fluid" role="form" method="get" action="" -->
                            </div> <!-- class="panel-body" -->
                        </div> <!-- id="methodOfCapture" class="panel-collapse collapse in" role="tabpanel" aria-labelledby="headingMethodOfCapture" -->
                    </div> <!-- class="panel panel-default" -->
    
                    <!-- Specimen Gender panel -->
                    <div class="panel panel-default">
Ejemplo n.º 2
0
                            echo '<tr>
                       <td><input type="checkbox" class="moc" name="moc[]" value ="' . $record->MethodOfCaptureId . '"></td>
                       <td>' . $record->MethodOfCapture . '</td>
                     <tr>' . PHP_EOL;
                        }
                    }
                }
            }
        }
    }
}
if (!isset($_GET['getMOC'])) {
    // Get the amount of rows to be displayed.
    $rowCount = isset($_GET['rowCount']) ? $_GET['rowCount'] : 10;
    $recPointer = isset($_SESSION['recPointer']) ? $_SESSION['recPointer'] : 0;
    // Display records based on the last record pointer and amount of records to show.
    $result = $daoMethodOfCapture->getAllMethodOfCapture($recPointer, $rowCount);
    // Get the number of records returned.
    $recCount = count($result);
    // Display the records returned in a table grid.
    foreach ($result as $row) {
        echo '
                <tr>
                  <td><input type="checkbox" class="moc" name="moc[]" value ="' . $row->MethodOfCaptureId . '"></td>
                  <td>' . $row->MethodOfCapture . '</td>
                <tr>' . PHP_EOL;
    }
    //Check to see if there are more rows requested than are records in the database.  Set the value
    //to rowCount if less than the recCount.
    $_SESSION['recPointer'] = ($rowCount <= $recCount ? $rowCount : $recCount) + $recPointer;
}