summaryrefslogtreecommitdiff
path: root/akas.php
diff options
context:
space:
mode:
Diffstat (limited to 'akas.php')
-rw-r--r--akas.php51
1 files changed, 51 insertions, 0 deletions
diff --git a/akas.php b/akas.php
new file mode 100644
index 0000000..f6e657b
--- /dev/null
+++ b/akas.php
@@ -0,0 +1,51 @@
+<?php
+
+echo <<<HTML
+<!DOCTYPE html>
+
+<html>
+<head>
+ <title>Miami-Dade Clerk of Courts: AKAs</title>
+ <link rel='stylesheet' media='all' type='text/css' href='style.css' />
+</head>
+<body>
+HTML;
+
+$dbh = new PDO('mysql:host=localhost;dbname=mdcc', 'mdcc', 'Mdcc.');
+
+echo <<<HTML
+<table class="results_table">
+ <tr class="tablehead">
+ <th>ID</th>
+ <th>Case ID</th>
+ <th>Last name</th>
+ <th>First name</th>
+ <th>Middle name</th>
+ <th>Race</th>
+ <th>Sex</th>
+ </tr>
+HTML;
+
+echo "<h3>AKAs for case <a href='./search.php?case_id={$_REQUEST['case_id']}'><em>{$_GET['case_no']}</em></a></h3>";
+
+$st = $dbh->prepare("SELECT * FROM akas WHERE case_id = '{$_GET['case_id']}'");
+if ( $st->execute() ) {
+ $alt = 'alt';
+ while ( $row = $st->fetch(PDO::FETCH_ASSOC) ) {
+ $alt = $alt ? '' : 'alt';
+ echo " <tr class='$alt'>\n";
+ foreach ( $row as $field ) {
+ echo " <td>$field</td>\n";
+ }
+ echo " </tr>\n";
+ }
+}
+
+echo <<<HTML
+</table>
+
+</body>
+</html>
+HTML;
+
+?>